diff --git a/ChangeLog b/ChangeLog index 70ec56fe1..73168a846 100755 --- a/ChangeLog +++ b/ChangeLog @@ -15,7 +15,8 @@ $Source$ 2004-08-16 Michal Čihař * read_dump.php: Fix handling of comments -- and # (bug #1009494). - * libraries/relation.lib.php: Fix typo. + * libraries/relation.lib.php: Fix typo, CONVERT is for MySQL >= 4.1 and + not for MySQL >= 4.0. 2004-08-15 Marc Delisle (Patches from Michael Keck) diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 79988c11b..46c215043 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -279,7 +279,7 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both') { if ($cfgRelation['relwork'] && ($source == 'both' || $source == 'internal')) { $rel_query = 'SELECT master_field, foreign_db, foreign_table, foreign_field' . ' FROM ' . PMA_backquote($cfgRelation['relation']); - if (PMA_MYSQL_INT_VERSION >= 40000) { + if (PMA_MYSQL_INT_VERSION >= 40100) { list($conn_charset) = explode('_', $GLOBALS['collation_connection']); $rel_query .= ' WHERE CONVERT(master_db USING ' . $conn_charset . ') = \'' . PMA_sqlAddslashes($db) . '\' ' . ' AND CONVERT(master_table USING ' . $conn_charset . ') = \'' . PMA_sqlAddslashes($table) . '\' ';