From a5d9024be583ee2f7c32456c08be68024e09b4fc Mon Sep 17 00:00:00 2001
From: Joe <joe@autistici.org>
Date: Fri, 3 May 2013 16:42:59 +0200
Subject: [PATCH] adding extreme debugging when wp_debug is true

---
 wp-content/db.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/wp-content/db.php b/wp-content/db.php
index 0f9f5a1ee..2bd49b416 100644
--- a/wp-content/db.php
+++ b/wp-content/db.php
@@ -416,6 +416,11 @@ class hyperdb extends wpdb {
 
 		$this->run_callbacks( 'dataset_found', $dataset );
 
+        if (WP_DEBUG === true) {
+            $_ai_msg = sprintf("We choose dataset %s for query '%s'", $this->dataset, $query);
+            $this->print_error($_ai_msg);
+        }
+
 		if ( empty( $this->hyper_servers ) ) {
 			if ( $this->is_mysql_connection( $this->dbh ) )
 				return $this->dbh;
-- 
GitLab