Fixes available "actions" with a "proc analyse" statement in a sql query

This commit is contained in:
Loïc Chapeaux
2002-05-24 11:31:52 +00:00
parent 82ed29381c
commit 413fca97b6
4 changed files with 9 additions and 6 deletions

View File

@@ -11,8 +11,9 @@ $Source$
- Search into database, thanks to Thomas Chaumeny <chaume92 at aol.com>.
* libraries/functions.js, lines 15-17: fixed bug #559815 - Javascript
problem with Opera.
* tbl_properties_structure.php3, lines 541-549; lang/*: patch #559618 -
procedure analyse(), thanks to Mike Beck.
* sql.php3, line 213; tbl_properties_structure.php3, lines 541-549; lang/*;
libraries/display_tbl.lib.php3, lines 71-74: patch #559618 - procedure
analyse(), thanks to Mike Beck.
2002-05-23 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html, config.inc.php3, db_details_structure.php3,

View File

@@ -68,9 +68,10 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
// 2. Display mode is not "false for all elements" -> updates the
// display mode
if ($the_disp_mode != 'nnnn00000') {
// 2.1 Statement is a "SELECT COUNT",
// "CHECK/ANALYZE/REPAIR/OPTIMIZE" or an "EXPLAIN"
if ($GLOBALS['is_count'] || $GLOBALS['is_maint'] || $GLOBALS['is_explain']) {
// 2.1 Statement is a "SELECT COUNT", a
// "CHECK/ANALYZE/REPAIR/OPTIMIZE", an "EXPLAIN" one or
// contains a "PROC ANALYSE" part
if ($GLOBALS['is_count'] || $GLOBALS['is_analyse'] || $GLOBALS['is_maint'] || $GLOBALS['is_explain']) {
$do_display['edit_lnk'] = 'nn'; // no edit link
$do_display['del_lnk'] = 'nn'; // no delete link
$do_display['sort_lnk'] = (string) '0';

View File

@@ -210,6 +210,7 @@ else {
if ($is_select) { // see line 76
$is_count = (eregi('^SELECT[[:space:]]+COUNT\((.*\.+)?.*\)', $sql_query));
$is_export = (eregi('[[:space:]]+INTO[[:space:]]+OUTFILE[[:space:]]+', $sql_query));
$is_analyse = (eregi('[[:space:]]+PROCEDURE[[:space:]]+ANALYSE\(', $sql_query));
} else if (eregi('^EXPLAIN[[:space:]]+', $sql_query)) {
$is_explain = TRUE;
} else if (eregi('^DELETE[[:space:]]+', $sql_query)) {

View File

@@ -542,7 +542,7 @@ echo "\n";
<!-- Let MySQL propose the optimal structure -->
<li>
<div style="margin-bottom: 10px">
<a href="sql.php3?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table) . ' PROCEDURE ANALYSE()'); ?>">
<a href="sql.php3?<?php echo $url_query; ?>&amp;session_max_rows=all&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table) . ' PROCEDURE ANALYSE()'); ?>">
<?php echo $strStructPropose; ?></a>
<?php echo PMA_showDocuShort('p/r/procedure_analyse.html'); ?>
</div>