Skip to content
Snippets Groups Projects
Commit cda610d3 authored by ale's avatar ale
Browse files

Remove two hopefully unnecessary HyperDB patches

parent ba323efc
No related branches found
No related tags found
No related merge requests found
......@@ -18,9 +18,7 @@
},
"wpackagist-plugin/hyperdb": {
"A few fixes to the global wpdb_hash instance (moved into wpdb)": "patches/hyperdb/0106-a-few-fixes-to-the-global-wpdb_hash-instance-moved-i.patch",
"Awful workaround (?)": "patches/hyperdb/0126-awful-workaround.patch",
"Added optional logging": "patches/hyperdb/0158-Added-optional-logging.patch",
"Add support for SHOW TABLES LIKE queries": "patches/hyperdb/show-tables-like.patch"
},
"wpackagist-plugin/more-privacy-options": {
"Do send mail on privacy setting change": "patches/plugins/more-privacy-options.patch"
......
From 4d3f75875c9b27016d9314cb14db1469a9b0b987 Mon Sep 17 00:00:00 2001
From: Joe Oblivian <0blivian@insiberia.net>
Date: Tue, 1 Nov 2011 18:32:23 +0100
Subject: [PATCH 126/229] awful workaround
---
wp-content/db.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/wp-content/db.php b/wp-content/db.php
index 79c189e5..abc3353e 100644
--- a/wp-content/db.php
+++ b/wp-content/db.php
@@ -723,6 +723,15 @@ class hyperdb extends wpdb {
$collate = null;
$this->set_charset($this->dbhs[$dbhname], $charset, $collate);
+
+ if ( !isset( $charset ) )
+ $charset = null;
+
+ if ( !isset( $collate ) )
+ $collate = null;
+
+ // AI workaround: set all queries to latin1
+ $this->set_charset($this->dbhs[$dbhname], 'latin1');
$this->dbh = $this->dbhs[$dbhname]; // needed by $wpdb->_real_escape()
--
2.17.1
diff --git a/wp-content/db.php b/wp-content/db.php
index f900d305..f819e225 100644
--- a/wp-content/db.php
+++ b/wp-content/db.php
@@ -306,6 +312,12 @@ class hyperdb extends wpdb {
. ')\W([\w-]+)\W/is', $q, $maybe) )
return $maybe[1];
+ // SHOW TABLES LIKE (used in some plugins)
+ if ( preg_match('/^\s*'
+ . 'SHOW\s+TABLES\s+LIKE\s+'
+ . '\W(\w+)\W/is', $q, $maybe) )
+ return $maybe[1];
+
// Big pattern for the rest of the table-related queries in MySQL 5.0
if ( preg_match('/^\s*(?:'
. '(?:EXPLAIN\s+(?:EXTENDED\s+)?)?SELECT.*?\s+FROM'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment