diff --git a/ChangeLog b/ChangeLog index 67e4483f71..25d1da4be0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,8 @@ phpMyAdmin - ChangeLog - bug #4074 GIS column editor: point not displayed - bug #4109 Drizzle tables in navigation are shown as views - bug #4095 NUL symbols added to the end of database dump file +- bug #4105 More disappears in table Structure +- bug #3992 Multi-row edit doesn't clear values when checking NULL 4.0.7.0 (2013-09-23) - bug #3993 Sorting in database overview with statistics doesn't work @@ -268,7 +270,7 @@ VerboseMultiSubmit, ReplaceHelpImg + Removed the "Synchronize" feature + Improved layout of server variables page + rfe #1052091 [config] Double-underscores in PMA table names -+ Improved the "More" dropdown on the table structure page ++ Improved the "" dropdown on the table structure page + [interface] Added "scroll to top" link in menubar + [designer] Fullscreen mode for the designer + Upgraded jquery to v1.8.3 and jquery-ui to v1.9.2 diff --git a/js/tbl_change.js b/js/tbl_change.js index 6ad1461641..452bc8abae 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -236,7 +236,7 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType) AJAX.registerTeardown('tbl_change.js', function () { $('span.open_gis_editor').die('click'); $("input[name='gis_data[save]']").die('click'); - $('input.checkbox_null').unbind('click'); + $('input.checkbox_null').die('click'); $('select[name="submit_type"]').unbind('change'); $("#insert_rows").die('change'); }); @@ -289,7 +289,7 @@ AJAX.registerOnload('tbl_change.js', function () { * "Continue insertion" are handled in the "Continue insertion" code * */ - $('input.checkbox_null').bind('click', function (e) { + $('input.checkbox_null').live('click', function (e) { nullify( // use hidden fields populated by tbl_change.php $(this).siblings('.nullify_code').val(), diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php index 8c0eafc6e7..8eb9683ab0 100644 --- a/libraries/db_info.inc.php +++ b/libraries/db_info.inc.php @@ -51,32 +51,6 @@ if ($GLOBALS['dbi']->isSystemSchema($db)) { */ $tables = array(); -// When used in Nested table group mode, -// only show tables matching the given groupname -$tbl_group_sql = ""; -$whereAdded = false; -if (PMA_isValid($_REQUEST['tbl_group'])) { - $tbl_group_sql .= " WHERE " . PMA_Util::backquote('Tables_in_' . $db) . " LIKE " - . "'" . PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group']) . "%'"; - $whereAdded = true; -} -if (PMA_isValid($_REQUEST['tbl_type'], array('table', 'view'))) { - $tbl_group_sql .= $whereAdded ? " AND" : " WHERE"; - if ($_REQUEST['tbl_type'] == 'view') { - if (PMA_DRIZZLE) { - $tbl_group_sql .= " `Table_type` != 'BASE'"; - } else { - $tbl_group_sql .= " `Table_type` != 'BASE TABLE'"; - } - } else { - if (PMA_DRIZZLE) { - $tbl_group_sql .= " `Table_type` = 'BASE'"; - } else { - $tbl_group_sql .= " `Table_type` = 'BASE TABLE'"; - } - } -} - $tooltip_truename = array(); $tooltip_aliasname = array(); @@ -97,10 +71,54 @@ if (true === $cfg['SkipLockedTables']) { $GLOBALS['dbi']->freeResult($db_info_result); if (isset($sot_cache)) { - $db_info_result = $GLOBALS['dbi']->query( - 'SHOW FULL TABLES FROM ' . PMA_Util::backquote($db) . $tbl_group_sql, - null, PMA_DatabaseInterface::QUERY_STORE - ); + $db_info_result = false; + if (PMA_DRIZZLE) { + $tblGroupSql = " AND"; + if (PMA_isValid($_REQUEST['tbl_group'])) { + $tblGroupSql .= " `TABLE_NAME` LIKE " . "'" + . PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group']) + . "%'"; + } + if (PMA_isValid($_REQUEST['tbl_type'], array('table', 'view'))) { + $tblGroupSql .= " AND"; + if ($_REQUEST['tbl_type'] == 'view') { + $tblGroupSql .= " `TABLE_TYPE` != 'BASE'"; + } else { + $tblGroupSql .= " `TABLE_TYPE` = 'BASE'"; + } + } + $db_info_result = $GLOBALS['dbi']->query( + "SELECT `TABLE_NAME` FROM `INFORMATION_SCHEMA`.`TABLES` WHERE" + . " `TABLE_SCHEMA` = '" . PMA_Util::sqlAddSlashes($db) . "'" + . $tblGroupSql, + null, PMA_DatabaseInterface::QUERY_STORE + ); + unset($tblGroupSql); + } else { + $tblGroupSql = ""; + $whereAdded = false; + if (PMA_isValid($_REQUEST['tbl_group'])) { + $tblGroupSql .= " WHERE " + . PMA_Util::backquote('Tables_in_' . $db) + . " LIKE '" + . PMA_Util::escapeMysqlWildcards($_REQUEST['tbl_group']) + . "%'"; + $whereAdded = true; + } + if (PMA_isValid($_REQUEST['tbl_type'], array('table', 'view'))) { + $tblGroupSql .= $whereAdded ? " AND" : " WHERE"; + if ($_REQUEST['tbl_type'] == 'view') { + $tblGroupSql .= " `Table_type` != 'BASE TABLE'"; + } else { + $tblGroupSql .= " `Table_type` = 'BASE TABLE'"; + } + } + $db_info_result = $GLOBALS['dbi']->query( + 'SHOW FULL TABLES FROM ' . PMA_Util::backquote($db) . $tblGroupSql, + null, PMA_DatabaseInterface::QUERY_STORE + ); + unset($tblGroupSql, $whereAdded); + } if ($db_info_result && $GLOBALS['dbi']->numRows($db_info_result) > 0) { while ($tmp = $GLOBALS['dbi']->fetchRow($db_info_result)) { if (! isset($sot_cache[$tmp[0]])) { @@ -118,7 +136,12 @@ if (true === $cfg['SkipLockedTables']) { } $tables[$sts_tmp['Name']] = $sts_tmp; } else { // table in use - $tables[$tmp[0]] = array('Name' => $tmp[0]); + $tables[$tmp[0]] = array( + 'TABLE_NAME' => $tmp[0], + 'ENGINE' => '', + 'TABLE_TYPE' => '', + 'TABLE_ROWS' => 0, + ); } } if ($GLOBALS['cfg']['NaturalOrder']) { @@ -217,7 +240,7 @@ if (! isset($total_num_tables)) { /** * cleanup */ -unset($each_table, $tbl_group_sql, $db_info_result); +unset($each_table, $db_info_result); /** * If coming from a Show MySQL link on the home page,