Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/class-wpdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -3874,7 +3874,7 @@ protected function get_table_from_query( $query ) {
// Quickly match most common queries.
if ( preg_match(
'/^\s*(?:'
. 'SELECT.*?\s+FROM'
. 'SELECT.*\s+FROM'
. '|INSERT(?:\s+LOW_PRIORITY|\s+DELAYED|\s+HIGH_PRIORITY)?(?:\s+IGNORE)?(?:\s+INTO)?'
. '|REPLACE(?:\s+LOW_PRIORITY|\s+DELAYED)?(?:\s+INTO)?'
. '|UPDATE(?:\s+LOW_PRIORITY)?(?:\s+IGNORE)?'
Expand Down
3 changes: 3 additions & 0 deletions tests/phpunit/tests/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,9 @@ public function data_get_table_from_query() {

// @ticket 63777
"SET STATEMENT max_statement_time=1 FOR SELECT * FROM $table",

// @ticket 43664
"SELECT c AS 'a from b' FROM $table",
);

$querycount = count( $queries );
Expand Down
Loading