mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 08:51:44 +00:00
Fix and test read-only handling in QueryIterator.
This commit is contained in:
@@ -215,7 +215,7 @@ sub next {
|
||||
}
|
||||
|
||||
if ( $self->read_only ) {
|
||||
if ( $event->{arg} !~ m/(?:^SELECT|(?:\*\/\s*SELECT))/i ) {
|
||||
if ( $event->{arg} !~ m{^(?:/\*[^!].*?\*/)?\s*(?:SELECT|SET)}i ) {
|
||||
PTDEBUG && _d('Skipping non-SELECT query');
|
||||
$self->stats->{not_select}++;
|
||||
next EVENT;
|
||||
|
Reference in New Issue
Block a user