bug #590055
This commit is contained in:
@@ -15,6 +15,8 @@ $Source$
|
|||||||
* lang/german-*.inc.php3: Updates.
|
* lang/german-*.inc.php3: Updates.
|
||||||
* tbl_properties_links.php3: Use "TRUNCATE TABLE" instead of "TRUNCATE".
|
* tbl_properties_links.php3: Use "TRUNCATE TABLE" instead of "TRUNCATE".
|
||||||
* tbl_indexes.php3: Default page for databases.
|
* tbl_indexes.php3: Default page for databases.
|
||||||
|
* libraries/common.lib.php3: Workaround against bug #590055
|
||||||
|
(Tables need repair after empty).
|
||||||
|
|
||||||
2002-08-10 Robin Johnson <robbat2@users.sourceforge.net>
|
2002-08-10 Robin Johnson <robbat2@users.sourceforge.net>
|
||||||
* libraries/string.lib.php3:
|
* libraries/string.lib.php3:
|
||||||
|
@@ -1061,13 +1061,12 @@ if (typeof(window.parent) != 'undefined'
|
|||||||
else if (isset($GLOBALS['table']) && $cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303) {
|
else if (isset($GLOBALS['table']) && $cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303) {
|
||||||
$result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\'');
|
$result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\'');
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$tmp = PMA_mysql_fetch_array($result, MYSQL_ASSOC);
|
$tbl_status = PMA_mysql_fetch_array($result, MYSQL_ASSOC);
|
||||||
$tooltip = (empty($tmp['Comment']))
|
$tooltip = (empty($tbl_status['Comment']))
|
||||||
? ''
|
? ''
|
||||||
: $tmp['Comment'] . ' ';
|
: $tbl_status['Comment'] . ' ';
|
||||||
$tooltip .= '(' . $tmp['Rows'] . ' ' . $GLOBALS['strRows'] . ')';
|
$tooltip .= '(' . $tbl_status['Rows'] . ' ' . $GLOBALS['strRows'] . ')';
|
||||||
mysql_free_result($result);
|
mysql_free_result($result);
|
||||||
unset($tmp);
|
|
||||||
$md5_tbl = md5($GLOBALS['table']);
|
$md5_tbl = md5($GLOBALS['table']);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
@@ -1084,6 +1083,23 @@ if (typeof(document.getElementById) != 'undefined'
|
|||||||
<?php
|
<?php
|
||||||
} // end if
|
} // end if
|
||||||
} // end if... else if
|
} // end if... else if
|
||||||
|
|
||||||
|
// Checks if the table needs to be repaired after a TRUNCATE query.
|
||||||
|
if (PMA_MYSQL_INT_VERSION >= 40000
|
||||||
|
&& $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table'])) {
|
||||||
|
if (!isset($tbl_status)) {
|
||||||
|
$result = @PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], TRUE) . '\'');
|
||||||
|
if ($result) {
|
||||||
|
$tbl_status = PMA_mysql_fetch_array($result, MYSQL_ASSOC);
|
||||||
|
mysql_free_result($result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isset($tbl_status) && (int)$tbl_status['Index_length'] > 1024) {
|
||||||
|
@PMA_mysql_query('REPAIR TABLE ' . PMA_backquote($GLOBALS['table']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($tbl_status);
|
||||||
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user