Added ANALYZE TABLE to multi submit actions.

This commit is contained in:
Michal Čihař
2003-04-07 09:17:19 +00:00
parent 6d7e4ed82d
commit ca64aa09e6
3 changed files with 18 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2003-04-07 Michal Cihar <nijel@users.sourceforge.net>
* db_details_structure.php3, mult_submits.inc.php3: Added ANALYZE TABLE to
multi submit actions.
2003-04-06 Garvin Hicking <me@supergarv.de> 2003-04-06 Garvin Hicking <me@supergarv.de>
* tbl_query_box.php, libraries/functions.js: Patch #705899 included. * tbl_query_box.php, libraries/functions.js: Patch #705899 included.
Now multiple fields can be inserted at cursor position (Mozilla/IE) Now multiple fields can be inserted at cursor position (Mozilla/IE)

View File

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

View File

@@ -40,6 +40,11 @@ if (!empty($submit_mult)
$query_type = 'repair_tbl'; $query_type = 'repair_tbl';
$mult_btn = $strYes; $mult_btn = $strYes;
break; break;
case $strAnalyzeTable:
unset($submit_mult);
$query_type = 'analyze_tbl';
$mult_btn = $strYes;
break;
} // end switch } // end switch
} }
} else { } else {
@@ -175,6 +180,11 @@ else if ($mult_btn == $strYes) {
. PMA_backquote(urldecode($selected[$i])); . PMA_backquote(urldecode($selected[$i]));
break; break;
case 'analyze_tbl':
$sql_query .= (empty($sql_query) ? 'ANALYZE TABLE ' : ', ')
. PMA_backquote(urldecode($selected[$i]));
break;
case 'repair_tbl': case 'repair_tbl':
$sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ') $sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ')
. PMA_backquote(urldecode($selected[$i])); . PMA_backquote(urldecode($selected[$i]));
@@ -197,6 +207,7 @@ else if ($mult_btn == $strYes) {
if ($query_type != 'drop_tbl' if ($query_type != 'drop_tbl'
&& $query_type != 'drop_fld' && $query_type != 'drop_fld'
&& $query_type != 'repair_tbl' && $query_type != 'repair_tbl'
&& $query_type != 'analyze_tbl'
&& $query_type != 'optimize_tbl' && $query_type != 'optimize_tbl'
&& $query_type != 'check_tbl') { && $query_type != 'check_tbl') {
$sql_query .= $a_query . ';' . "\n"; $sql_query .= $a_query . ';' . "\n";
@@ -213,6 +224,7 @@ else if ($mult_btn == $strYes) {
PMA_mysql_select_db($db); PMA_mysql_select_db($db);
$result = @PMA_mysql_query($sql_query) or PMA_mysqlDie('', '', FALSE, $err_url); $result = @PMA_mysql_query($sql_query) or PMA_mysqlDie('', '', FALSE, $err_url);
} elseif ($query_type == 'repair_tbl' } elseif ($query_type == 'repair_tbl'
|| $query_type == 'analyze_tbl'
|| $query_type == 'check_tbl' || $query_type == 'check_tbl'
|| $query_type == 'optimize_tbl') { || $query_type == 'optimize_tbl') {
include('./sql.php3'); include('./sql.php3');