From f900210a0f05511658a8d64d8876b935ab7a5972 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 31 Jan 2010 16:42:06 +0000 Subject: [PATCH] bug #2941101 import timeout when table already created and several data lines --- ChangeLog | 2 ++ import.php | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4cd388e8d1..ab4099aae9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -59,6 +59,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 3.2.6.0 (not yet released) - bug #2938492 [display] information_schema sorting order +- bug #2941101 [import] import timeout when table already created and + several data lines 3.2.5.0 (2010-01-10) - patch #2903400 [bookmarks] Status of bookmark table, diff --git a/import.php b/import.php index 09892a7c37..77966e0905 100644 --- a/import.php +++ b/import.php @@ -433,7 +433,11 @@ if (isset($message)) { } // Parse and analyze the query, for correct db and table name // in case of a query typed in the query window -require_once './libraries/parse_analyze.lib.php'; +// (but if the query is too large, in case of an imported file, the parser +// can choke on it so avoid parsing) +if (strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { + require_once './libraries/parse_analyze.lib.php'; +} // There was an error? if (isset($my_die)) { -- 2.11.4.GIT