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