From 413fca97b6b80f7f5de275fd98edda91826229c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 24 May 2002 11:31:52 +0000 Subject: [PATCH] Fixes available "actions" with a "proc analyse" statement in a sql query --- ChangeLog | 5 +++-- libraries/display_tbl.lib.php3 | 7 ++++--- sql.php3 | 1 + tbl_properties_structure.php3 | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 572cd2af7..6734aa2a5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11,8 +11,9 @@ $Source$ - Search into database, thanks to Thomas Chaumeny . * 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 * Documentation.html, config.inc.php3, db_details_structure.php3, diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 9e3538c2f..cc2cc8603 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -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'; diff --git a/sql.php3 b/sql.php3 index ca1e5b563..52eba8ce9 100755 --- a/sql.php3 +++ b/sql.php3 @@ -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)) { diff --git a/tbl_properties_structure.php3 b/tbl_properties_structure.php3 index a0925b8b2..889ac3706 100755 --- a/tbl_properties_structure.php3 +++ b/tbl_properties_structure.php3 @@ -542,7 +542,7 @@ echo "\n";
  • - +