go ahead... be a heretic | |
PerlMonks |
Re^7: Recalcitrant placeholdersby haukex (Archbishop) |
on Jul 17, 2021 at 19:40 UTC ( [id://11135108]=note: print w/replies, xml ) | Need Help?? |
Sorry for the late reply. I addressed this in the original question: Things I have tried...Forcing array context my ($crid) = $crm->db->selectrow_array - no change I missed that, sorry about that. Some testing has proved that it is about tainted data being passed to the placeholders and only with selectrow_array, not execute and fetchrow_array. With taint mode on, if I pass a value to the placeholder that has come from STDIN then it fails silently. But if I pass the same value assigned to the variable in my script and pass that to the placeholder, it works. Thanks for the further information, that does somewhat make sense. Unfortunately, I still haven't been able to reproduce it. What version of MySQL, DBI, DBD::mysql, etc. are you using? Does the code below produce the incorrect results for you? This behaviour makes sense but it would also make sense for it to throw an error when I try to do it rather than failing silently. The DBI docs say that as of v1.31, you can turn on the TaintIn option, which works for me in that it causes DBI to die with tainted arguments.
I spun up the test database with Docker as I showed in this node.
In Section
Seekers of Perl Wisdom
|
|