Make WordPress Core


Ignore:
Timestamp:
07/14/2015 10:18:57 AM (11 years ago)
Author:
pento
Message:

WPDB: When extracting the table name from a query, we had a 1000 character limit on the SQL string that would be searched. This was a hangover from when the code was imported from HyperDB, and isn't appropriate for Core, where a wider range of queries are likely to be run.

Fixes #32763

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r33055 r33259  
    28692869        $query = ltrim( $query, "\r\n\t (" );
    28702870
    2871         /*
    2872          * Strip everything between parentheses except nested selects and use only 1,000
    2873          * chars of the query.
    2874          */
    2875         $query = preg_replace( '/\((?!\s*select)[^(]*?\)/is', '()', substr( $query, 0, 1000 ) );
     2871        // Strip everything between parentheses except nested selects.
     2872        $query = preg_replace( '/\((?!\s*select)[^(]*?\)/is', '()', $query );
    28762873
    28772874        // Quickly match most common queries.
Note: See TracChangeset for help on using the changeset viewer.