Make WordPress Core


Ignore:
Timestamp:
08/10/2025 08:58:31 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Database: Add support for SET STATEMENT in wpdb::get_table_from_query().

MariaDB supports setting various parameters for queries. This commit ensures that wpdb can properly retrieve the table name from such queries.

Reference: MariaDB Documentation: SET STATEMENT.

Follow-up to [30345].

Props dd32.
Fixes #63777.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/db.php

    r59583 r60622  
    851851            // @ticket 32763
    852852            '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",
    853856        );
    854857
Note: See TracChangeset for help on using the changeset viewer.