repair table in db view

This commit is contained in:
Marc Delisle
2002-09-02 19:34:51 +00:00
parent 870dc9724e
commit 6b102058d0
3 changed files with 22 additions and 2 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-09-02 Marc Delisle <lem9@users.sourceforge.net>
* db_details_structure.php3, mult_submits.inc.php3: Patch 582904:
add REPAIR TABLE choice in drop-down of db view, thanks to
Cal Henderson (iamcal)
2002-09-01 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/auth/cookie.auth.lib.php3: bug 601721 (cookie and IIS)

View File

@@ -290,6 +290,8 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) {
. $strPrintView . '</option>' . "\n";
echo ' <option value="' . $strOptimizeTable . '" >'
. $strOptimizeTable . '</option>' . "\n";
echo ' <option value="' . $strRepairTable . '" >'
. $strRepairTable . '</option>' . "\n";
?>
</select>
<script type="text/javascript" language="javascript">

View File

@@ -32,6 +32,11 @@ if (!empty($submit_mult)
$query_type = 'optimize_tbl';
$mult_btn = (get_magic_quotes_gpc() ? addslashes($strYes) : $strYes);
break;
case $strRepairTable:
unset($submit_mult);
$query_type = 'repair_tbl';
$mult_btn = (get_magic_quotes_gpc() ? addslashes($strYes) : $strYes);
break;
} // end switch
}
} else {
@@ -157,6 +162,12 @@ else if ((get_magic_quotes_gpc() && stripslashes($mult_btn) == $strYes)
. (($i == $selected_cnt-1) ? ';' : '');
break;
case 'repair_tbl':
$sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ')
. PMA_backquote(urldecode($selected[$i]))
. (($i == $selected_cnt-1) ? ';' : '');
break;
case 'empty_tbl':
$a_query = 'DELETE FROM '
. PMA_backquote(urldecode($selected[$i]));
@@ -169,10 +180,11 @@ else if ((get_magic_quotes_gpc() && stripslashes($mult_btn) == $strYes)
break;
} // end switch
// All "DROP TABLE","DROP FIELD" and "OPTIMIZE TABLE" statements will
// be run at once below
// All "DROP TABLE","DROP FIELD", "OPTIMIZE TABLE" and "REPAIR TABLE"
// statements will be run at once below
if ($query_type != 'drop_tbl'
&& $query_type != 'drop_fld'
&& $query_type != 'repair_tbl'
&& $query_type != 'optimize_tbl') {
$sql_query .= $a_query . ';' . "\n";
@@ -185,6 +197,7 @@ else if ((get_magic_quotes_gpc() && stripslashes($mult_btn) == $strYes)
if ($query_type == 'drop_tbl'
|| $query_type == 'drop_fld'
|| $query_type == 'repair_tbl'
|| $query_type == 'optimize_tbl') {
PMA_mysql_select_db($db);
$result = @PMA_mysql_query($sql_query) or PMA_mysqlDie('', '', FALSE, $err_url);