From e784fa2b01051f9c02a34e23e8c4f90cd1d383e8 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 13 Jul 2002 12:03:54 +0000 Subject: [PATCH] bug 580929 --- ChangeLog | 4 ++++ libraries/common.lib.php3 | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93afe7049..3c1e794ec 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-07-13 Marc Delisle + * libraries/common.lib.php3: bug 580929: do not EXPLAIN if this is + not a SELECT + 2002-07-13 Alexander M. Turek * Documentation.html: News about bug #540671. diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index bdc493c0b..25c529e2b 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -1203,8 +1203,9 @@ if (typeof(document.getElementById) != 'undefined' . '&sql_query=' . urlencode($GLOBALS['sql_query']) . '&show_query=y#querybox">' . $GLOBALS['strEdit'] . ''; } // Want to have the query explained (Mike Beck 2002-05-22) - // but do not explain an explain (lem9) - if (!eregi('^EXPLAIN[[:space:]]+', $GLOBALS['sql_query'])) { + // but only explain a SELECT (that has not been explained) + if (!eregi('^EXPLAIN[[:space:]]+', $GLOBALS['sql_query']) + && eregi('SELECT[[:space:]]+', $GLOBALS['sql_query'])) { $explain_link = '[' . $GLOBALS['strExplain'] . '] ';