Show result of CHECK/OPTIMIZE/REPAIR queries for multiple tables.
This commit is contained in:
@@ -8,6 +8,9 @@ $Source$
|
||||
2003-03-24 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* db_details_structure.php3, mult_submits.inc.php: Added CHECK TABLE to
|
||||
multisubmit actions (RFE #622603).
|
||||
* db_details_structure.php3, mult_submits.inc.php3, tbl_alter.php3,
|
||||
tbl_properties_structure.php3: Show result of CHECK/OPTIMIZE/REPAIR
|
||||
queries for multiple tables.
|
||||
|
||||
2003-03-23 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/sqlparser.lib.php3, libraries/config_import.lib.php3,
|
||||
|
@@ -8,20 +8,26 @@
|
||||
* because there is no table in the database ($is_info is TRUE)
|
||||
*/
|
||||
if (empty($is_info)) {
|
||||
include('./db_details_common.php3');
|
||||
$url_query .= '&goto=db_details_structure.php3';
|
||||
if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
|
||||
include('./libraries/grab_globals.lib.php3');
|
||||
}
|
||||
if (!defined('PMA_COMMON_LIB_INCLUDED')) {
|
||||
include('./libraries/common.lib.php3');
|
||||
}
|
||||
|
||||
// Drops/deletes multiple tables if required
|
||||
if ((!empty($submit_mult) && isset($selected_tbl))
|
||||
// Drops/deletes/etc. multiple tables if required
|
||||
if ((!empty($submit_mult) && isset($selected_tbl))
|
||||
|| isset($mult_btn)) {
|
||||
$action = 'db_details_structure.php3';
|
||||
include('./mult_submits.inc.php3');
|
||||
}
|
||||
}
|
||||
include('./db_details_common.php3');
|
||||
$url_query .= '&goto=db_details_structure.php3';
|
||||
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
include('./db_details_db_info.php3');
|
||||
echo "\n";
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
include('./db_details_db_info.php3');
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
|
||||
|
@@ -58,6 +58,17 @@ if (!empty($submit_mult)
|
||||
* Displays the confirmation form if required
|
||||
*/
|
||||
if (!empty($submit_mult) && !empty($what)) {
|
||||
$js_to_run = 'functions.js';
|
||||
unset($message);
|
||||
if (!empty($table)) {
|
||||
include('./tbl_properties_common.php3');
|
||||
$url_query .= '&goto=tbl_properties.php3&back=tbl_properties.php3';
|
||||
include('./tbl_properties_table_info.php3');
|
||||
}
|
||||
else {
|
||||
include('./db_details_common.php3');
|
||||
include('./db_details_db_info.php3');
|
||||
}
|
||||
// Builds the query
|
||||
$full_query = '';
|
||||
$selected_cnt = count($selected);
|
||||
@@ -156,20 +167,20 @@ else if ($mult_btn == $strYes) {
|
||||
|
||||
case 'check_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'CHECK TABLE ' : ', ')
|
||||
. PMA_backquote(urldecode($selected[$i]))
|
||||
. (($i == $selected_cnt-1) ? ';' : '');
|
||||
. PMA_backquote(urldecode($selected[$i]));
|
||||
// . (($i == $selected_cnt-1) ? ';' : '');
|
||||
break;
|
||||
|
||||
case 'optimize_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'OPTIMIZE TABLE ' : ', ')
|
||||
. PMA_backquote(urldecode($selected[$i]))
|
||||
. (($i == $selected_cnt-1) ? ';' : '');
|
||||
. PMA_backquote(urldecode($selected[$i]));
|
||||
// . (($i == $selected_cnt-1) ? ';' : '');
|
||||
break;
|
||||
|
||||
case 'repair_tbl':
|
||||
$sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ')
|
||||
. PMA_backquote(urldecode($selected[$i]))
|
||||
. (($i == $selected_cnt-1) ? ';' : '');
|
||||
. PMA_backquote(urldecode($selected[$i]));
|
||||
// . (($i == $selected_cnt-1) ? ';' : '');
|
||||
break;
|
||||
|
||||
case 'empty_tbl':
|
||||
@@ -201,12 +212,14 @@ else if ($mult_btn == $strYes) {
|
||||
} // end for
|
||||
|
||||
if ($query_type == 'drop_tbl'
|
||||
|| $query_type == 'drop_fld'
|
||||
|| $query_type == 'repair_tbl'
|
||||
|| $query_type == 'check_tbl'
|
||||
|| $query_type == 'optimize_tbl') {
|
||||
|| $query_type == 'drop_fld') {
|
||||
PMA_mysql_select_db($db);
|
||||
$result = @PMA_mysql_query($sql_query) or PMA_mysqlDie('', '', FALSE, $err_url);
|
||||
} elseif ($query_type == 'repair_tbl'
|
||||
|| $query_type == 'check_tbl'
|
||||
|| $query_type == 'optimize_tbl') {
|
||||
include('./sql.php3');
|
||||
exit();
|
||||
}
|
||||
|
||||
PMA_showMessage($strSuccess);
|
||||
|
@@ -7,10 +7,8 @@
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require('./libraries/grab_globals.lib.php3');
|
||||
if (!isset($submit_mult)) {
|
||||
$js_to_run = 'functions.js';
|
||||
include('./header.inc.php3');
|
||||
}
|
||||
$js_to_run = 'functions.js';
|
||||
include('./header.inc.php3');
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -3,12 +3,12 @@
|
||||
// vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
|
||||
/**
|
||||
* Runs common work
|
||||
*/
|
||||
require('./tbl_properties_common.php3');
|
||||
$url_query .= '&goto=tbl_properties_structure.php3&back=tbl_properties_structure.php3';
|
||||
|
||||
if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
|
||||
include('./libraries/grab_globals.lib.php3');
|
||||
}
|
||||
if (!defined('PMA_COMMON_LIB_INCLUDED')) {
|
||||
include('./libraries/common.lib.php3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop multiple fields if required
|
||||
@@ -19,6 +19,12 @@ if ((!empty($submit_mult) && isset($selected_fld))
|
||||
include('./mult_submits.inc.php3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs common work
|
||||
*/
|
||||
require('./tbl_properties_common.php3');
|
||||
$url_query .= '&goto=tbl_properties_structure.php3&back=tbl_properties_structure.php3';
|
||||
|
||||
|
||||
/**
|
||||
* Prepares the table structure display
|
||||
|
Reference in New Issue
Block a user