DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

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

Open druud opened this issue 6 years ago • 5 comments

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

druud avatar Aug 30 '18 14:08 druud

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

pali avatar Aug 30 '18 14:08 pali

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

druud avatar Aug 30 '18 14:08 druud

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.

pali avatar Aug 30 '18 14:08 pali

@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).

burak avatar Aug 30 '18 14:08 burak

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

CaptTofu avatar Sep 20 '18 20:09 CaptTofu