bug #1159415, data dictionary broken
This commit is contained in:
@@ -7,6 +7,7 @@ $Source$
|
|||||||
|
|
||||||
2005-03-09 Marc Delisle <lem9@users.sourceforge.net>
|
2005-03-09 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_operations.php: db comments updating broken
|
* 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>
|
2005-03-08 Michael Keck <mkkeck@users.sourceforge.net>
|
||||||
* themes/*/img/bd_insrow.png, themes/*/bd_insrow.png: Added disabled
|
* themes/*/img/bd_insrow.png, themes/*/bd_insrow.png: Added disabled
|
||||||
|
@@ -438,15 +438,19 @@ function PMA_getComments($db, $table = '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// pmadb internal column comments
|
// pmadb internal column comments
|
||||||
$com_qry = 'SELECT column_name, comment FROM ' . PMA_backquote($cfgRelation['db']) . '.' .PMA_backquote($cfgRelation['column_info']);
|
// (this function can be called even if $cfgRelation['commwork'] is
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
// FALSE, to get native column comments, so recheck here)
|
||||||
$com_qry .= ' WHERE CONVERT(db_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($db) . '\''
|
if ($cfgRelation['commwork']) {
|
||||||
. ' AND CONVERT(table_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($table) . '\'';
|
$com_qry = 'SELECT column_name, comment FROM ' . PMA_backquote($cfgRelation['db']) . '.' .PMA_backquote($cfgRelation['column_info']);
|
||||||
} else {
|
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
||||||
$com_qry .= ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
|
$com_qry .= ' WHERE CONVERT(db_name USING ' . $charset_connection . ') = \'' . PMA_sqlAddslashes($db) . '\''
|
||||||
. ' AND table_name = \'' . PMA_sqlAddslashes($table) . '\'';
|
. ' 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 {
|
} else {
|
||||||
// pmadb internal db comments
|
// pmadb internal db comments
|
||||||
$com_qry = 'SELECT ' . PMA_backquote('comment') . ' FROM ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['column_info']);
|
$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') {
|
function PMA_setComment($db, $table, $col, $comment, $removekey = '', $mode='auto') {
|
||||||
global $cfgRelation, $charset_connection;
|
global $cfgRelation, $charset_connection;
|
||||||
|
|
||||||
|
|
||||||
if ($mode=='auto') {
|
if ($mode=='auto') {
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
||||||
$mode='native';
|
$mode='native';
|
||||||
|
Reference in New Issue
Block a user