perl5-dbi / DBD-mysql

MySQL driver for the Perl5 Database Interface (DBI)
https://metacpan.org/module/DBD::mysql
Other
62 stars 71 forks source link

missing error when a prepared statement with placeholders is executed with an empty bind #259

Open druud opened 6 years ago

druud commented 6 years ago

See: https://rt.cpan.org/Public/Bug/Display.html?id=125517

pali commented 6 years ago

Hi! This problem should be already fixed in DBD::MariaDB 1.00 which is on cpan: https://metacpan.org/pod/DBD::MariaDB

druud commented 6 years ago

Hi pali, how does that apply to DBD::mysql?

pali commented 6 years ago

I guess this cannot be fixed in DBD::mysql due to legacy issues and existing code which depends on this behavior which you descried in the title of the issue (see #117). Therefore if you does not like current behavior of DBD::mysql like you described, you can just switch to the DBD::MariaDB fork.

burak commented 6 years ago

@pali well this is not a complete behavior change and rather a stability issue to report misuse of placeholders. It can still be silent and can be made noisy with a flag, it can even be something to be enabled while building the module, so unless a switch is passed to Makefile.PL to decide between silent / emit warning (even die).

CaptTofu commented 6 years ago

Burak - thank you. We are working on a fix for this for the next release of DBD::mysql