Ticket #50789: 50789.diff
File 50789.diff, 615 bytes (added by , 4 years ago) |
---|
-
src/wp-includes/wp-db.php
3309 3309 // Strip everything between parentheses except nested selects. 3310 3310 $query = preg_replace( '/\((?!\s*select)[^(]*?\)/is', '()', $query ); 3311 3311 3312 // SELECT FROM information_schema.* WHERE TABLE_NAME = 'wp_12345_foo' 3313 if ( preg_match( 3314 '/^\s*' 3315 . 'SELECT.*?\s+FROM' 3316 . '\s+`?information_schema`?\.' 3317 . '.*\s+TABLE_NAME\s*=\s*["\']([\w-]+)["\']/is', 3318 $query, 3319 $maybe 3320 ) ) { 3321 return $maybe[1]; 3322 } 3323 3312 3324 // Quickly match most common queries. 3313 3325 if ( preg_match( 3314 3326 '/^\s*(?:'