From 5c1ae58e07bc39e840209d9262903d4361e099f2 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 9 Aug 2006 12:14:29 +0000 Subject: [PATCH] MySQL 4.1.13 and double quotes in SHOW VARIABLES --- ChangeLog | 5 +++++ libraries/mysql_charsets.lib.php | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a7e0d908e..989a534fd 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-08-09 Marc Delisle + * libraries/mysql_charsets.lib.php: bug #1530574: + MySQL 4.1.13 and double quotes in SHOW VARIABLES, + thanks to Herve Pages + 2006-08-08 Marc Delisle * db_operations.php: added a FIXME for db copy with Add Constraints and mysql extension diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index ea92037fc..d38775f06 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -121,7 +121,9 @@ if (PMA_MYSQL_INT_VERSION >= 40100){ // MySQL 4.1.0 does not support seperate charset settings // for databases. PMA_DBI_select_db( $db ); - $return = PMA_DBI_fetch_value( 'SHOW VARIABLES LIKE "collation_database"', 0, 1 ); + // we got one case in 4.1.13 where the query does not work + // if this string is in double quotes + $return = PMA_DBI_fetch_value( 'SHOW VARIABLES LIKE \'collation_database\'', 0, 1 ); if ( isset( $GLOBALS['db'] ) && $db !== $GLOBALS['db'] ) { PMA_DBI_select_db( $GLOBALS['db'] ); }