Changeset 32232 for trunk/src/wp-includes/wp-db.php
- Timestamp:
- 04/21/2015 05:10:11 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/wp-db.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/wp-db.php
r32162 r32232 2400 2400 } 2401 2401 2402 // We don't need to check the collation for queries that don't read data. 2403 $query = ltrim( $query, "\r\n\t (" ); 2404 if ( preg_match( '/^(?:SHOW|DESCRIBE|DESC|EXPLAIN)\s/i', $query ) ) { 2405 return true; 2406 } 2407 2402 2408 $table = $this->get_table_from_query( $query ); 2403 2409 if ( ! $table ) { … … 2406 2412 2407 2413 $this->checking_collation = true; 2408 $ this->get_table_charset( $table );2414 $collation = $this->get_table_charset( $table ); 2409 2415 $this->checking_collation = false; 2416 2417 // Tables with no collation, or latin1 only, don't need extra checking. 2418 if ( false === $collation || 'latin1' === $collation ) { 2419 return true; 2420 } 2410 2421 2411 2422 $table = strtolower( $table ); … … 2414 2425 } 2415 2426 2427 // If any of the columns don't have one of these collations, it needs more sanity checking. 2416 2428 foreach( $this->col_meta[ $table ] as $col ) { 2417 2429 if ( empty( $col->Collation ) ) {
Note: See TracChangeset
for help on using the changeset viewer.