bug #1159415, data dictionary broken

This commit is contained in:
Marc Delisle
2005-03-09 16:06:10 +00:00
parent b6f79fa798
commit 41ae394e2e
2 changed files with 13 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ $Source$
2005-03-09 Marc Delisle <lem9@users.sourceforge.net>
* db_operations.php: db comments updating broken
* libraries/relation.lib.php: bug #1159415, data dictionary broken
2005-03-08 Michael Keck <mkkeck@users.sourceforge.net>
* themes/*/img/bd_insrow.png, themes/*/bd_insrow.png: Added disabled

View File

@@ -438,15 +438,19 @@ function PMA_getComments($db, $table = '') {
}
// pmadb internal column comments
$com_qry = 'SELECT column_name, comment FROM ' . PMA_backquote($cfgRelation['db']) . '.' .PMA_backquote($cfgRelation['column_info']);
if (PMA_MYSQL_INT_VERSION >= 40100) {
$com_qry .= ' WHERE CONVERT(db_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND CONVERT(table_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($table) . '\'';
} else {
$com_qry .= ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
// (this function can be called even if $cfgRelation['commwork'] is
// FALSE, to get native column comments, so recheck here)
if ($cfgRelation['commwork']) {
$com_qry = 'SELECT column_name, comment FROM ' . PMA_backquote($cfgRelation['db']) . '.' .PMA_backquote($cfgRelation['column_info']);
if (PMA_MYSQL_INT_VERSION >= 40100) {
$com_qry .= ' WHERE CONVERT(db_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND CONVERT(table_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($table) . '\'';
} else {
$com_qry .= ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
}
$com_rs = PMA_query_as_cu($com_qry, TRUE, PMA_DBI_QUERY_STORE);
}
$com_rs = PMA_query_as_cu($com_qry, TRUE, PMA_DBI_QUERY_STORE);
} else {
// pmadb internal db comments
$com_qry = 'SELECT ' . PMA_backquote('comment') . ' FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']);
@@ -536,7 +540,6 @@ function PMA_handleSlashes($val) {
function PMA_setComment($db, $table, $col, $comment, $removekey = '', $mode='auto') {
global $cfgRelation, $charset_connection;
if ($mode=='auto') {
if (PMA_MYSQL_INT_VERSION >= 40100) {
$mode='native';