mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-04 17:20:07 +00:00
Database: Find the correct table names in DELETE queries with table aliases
Previously, `wpdb::get_table_from_query()` would not find the correct table name in the query `DELETE a FROM table a`, due to not recognising the table alias immediately after the `DELETE` as correct syntax. Fixes #37660. git-svn-id: https://develop.svn.wordpress.org/trunk@38507 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -562,6 +562,8 @@ class Tests_DB extends WP_UnitTestCase {
|
||||
"DELETE QUICK $table",
|
||||
"DELETE IGNORE $table",
|
||||
"DELETE LOW_PRIORITY FROM $table",
|
||||
"DELETE a FROM $table a",
|
||||
"DELETE `a` FROM $table a",
|
||||
|
||||
// STATUS
|
||||
"SHOW TABLE STATUS LIKE '$table'",
|
||||
|
||||
Reference in New Issue
Block a user