bitpiston / oyster

A Perl web application framework.
Other
3 stars 1 forks source link

Remove server_prepare and use prepare_cached where appropriate #78

Closed einkoro closed 11 years ago

einkoro commented 11 years ago

Looks like we don't need to worry about setting drop pg_server_prepare in server_prepare for Postgres as it is the default since version 8.0 – as this was the only reason we had server_prepare to wrap prepare we can safely remove this or at least deprecate it for now.

http://search.cpan.org/dist/DBI/DBI.pm#prepare http://search.cpan.org/dist/DBI/DBI.pm#prepare_cached

einkoro commented 11 years ago

What few things still using server_prepare() are now gone and server_prepare can be deleted entirely in my opinion but for now I've deprecated it.

As for prepare_cached it only caches the handle and not results so there is little point in using this anywhere – better to cache the results ourselves whenever I have time to add the cache library.

einkoro commented 11 years ago

Looks like there is a bug with setting mysql_server_prepare to 1 on connections in DBD::mysql which is causing seg faults on prepared queries, see #79