Skip Menu |

This queue is for tickets about the DBD-Multiplex CPAN distribution.

Report information
The Basics
Id: 24220
Status: resolved
Priority: 0/
Queue: DBD-Multiplex

People
Owner: tkishel+perl [...] gmail.com
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Some SELECTs will be falsely classifed as "modifying" statements
The bug is in here: sub mx_is_modify_statement { my ($statement) = @_; return 0 if (! $$statement); if ($$statement =~ /INSERT\s|UPDATE\s|DELETE\s|CREATE\s|DROP\s|INTO\s/i) { return 1; } else { return 0; } } ######### With that regular expression, I think this would be considered a "modifying" statement: SELECT 'insert'; A suggested fix is to add "^\s*" to the regular expression, so that one of these keywords must appear as the first word in the SQL. I believe this is what pgpool does. Mark
Addressed in v 2.00. -- Tom