[wp-trac] [WordPress Trac] #37660: RegEx in wpdb::get_table_from_query( $q ) in wp-db.php returns table_alias='a' rather than table_name=wp_999_options

WordPress Trac noreply at wordpress.org
Fri Sep 2 00:18:50 UTC 2016


#37660: RegEx in wpdb::get_table_from_query( $q ) in wp-db.php returns
table_alias='a' rather than table_name=wp_999_options
------------------------------------------+---------------------
 Reporter:  webp                          |       Owner:  pento
     Type:  defect (bug)                  |      Status:  closed
 Priority:  normal                        |   Milestone:  4.7
Component:  Database                      |     Version:  4.1.2
 Severity:  normal                        |  Resolution:  fixed
 Keywords:  needs-unit-tests needs-patch  |     Focuses:
------------------------------------------+---------------------
Changes (by pento):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38507"]:
 {{{
 #!CommitTicketReference repository="" revision="38507"
 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.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37660#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list