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