Make WordPress Core


Ignore:
Timestamp:
12/02/2014 02:59:36 AM (10 years ago)
Author:
pento
Message:

WPDB: When looking up the character set for a table or column, make sure we send the table name to MySQL in the correct case, as MySQL can be configured with case sensitive table names.

Fixes #30538.

File:
1 edited

Legend:

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

    r30631 r30699  
    308308        $this->assertEquals( $charset, $expected_charset );
    309309
     310        $charset = self::$_wpdb->get_table_charset( strtoupper( $table ) );
     311        $this->assertEquals( $charset, $expected_charset );
     312
    310313        self::$_wpdb->query( $drop );
    311314    }
     
    344347        foreach ( $expected_charset as $column => $charset ) {
    345348            $this->assertEquals( $charset, self::$_wpdb->get_col_charset( $table, $column ) );
     349            $this->assertEquals( $charset, self::$_wpdb->get_col_charset( strtoupper( $table ), strtoupper( $column ) ) );
    346350        }
    347351
Note: See TracChangeset for help on using the changeset viewer.