From 577558664690117e9b5d179fade4eece887637ab Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 21 Apr 2015 05:24:26 +0000 Subject: [PATCH] WPDB: When deciding if a query needs extra sanity checking based on collation, we can quickly return if the query is entirely ASCII characters. See #32029. Built from https://develop.svn.wordpress.org/trunk@32233 git-svn-id: http://core.svn.wordpress.org/trunk@32207 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 27436f6ebe..89a755d50c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-RC2-32232'; +$wp_version = '4.2-RC2-32233'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 7dd81b89cc..489b80d3fb 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2405,6 +2405,11 @@ class wpdb { return true; } + // All-ASCII queries don't need extra checking. + if ( $this->check_ascii( $query ) ) { + return true; + } + $table = $this->get_table_from_query( $query ); if ( ! $table ) { return false;