File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -3803,6 +3803,9 @@ protected function get_table_from_query( $query ) {
3803
3803
// Strip everything between parentheses except nested selects.
3804
3804
$ query = preg_replace ( '/\((?!\s*select)[^(]*?\)/is ' , '() ' , $ query );
3805
3805
3806
+ // Strip any leading SET STATEMENT statements.
3807
+ $ query = preg_replace ( '/^SET STATEMENT.+?\sFOR\s+/is ' , '' , $ query );
3808
+
3806
3809
// Quickly match most common queries.
3807
3810
if ( preg_match (
3808
3811
'/^\s*(?: '
Original file line number Diff line number Diff line change @@ -850,6 +850,9 @@ public function data_get_table_from_query() {
850
850
851
851
// @ticket 32763
852
852
'SELECT ' . str_repeat ( 'a ' , 10000 ) . " FROM (SELECT * FROM $ table) as subquery " ,
853
+
854
+ // @ticket 63777
855
+ "SET STATEMENT max_statement_time=1 FOR SELECT * FROM $ table " ,
853
856
);
854
857
855
858
$ querycount = count ( $ queries );
You can’t perform that action at this time.
0 commit comments