diff --git a/ChangeLog b/ChangeLog index 911de9ff2..23e5c6aa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Jason Day - jday29 - bug #1989081 [profiling] Profiling causes query to be executed again (really causes a problem in case of INSERT/UPDATE) +- bug #1990342 [import] SQL file import very slow on Windows, + thanks to Richard Heaton - wotnot 2.11.7.0 (not yet released) - bug #1908719 [interface] New field cannot be auto-increment and primary key diff --git a/libraries/import/sql.php b/libraries/import/sql.php index 4a6168e7d..a430c00ab 100644 --- a/libraries/import/sql.php +++ b/libraries/import/sql.php @@ -68,7 +68,9 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) { $len = strlen($buffer); // prepare an uppercase copy of buffer for PHP < 5 // outside of the loop - if (PMA_PHP_INT_VERSION < 50000) { + // (but on Windows and PHP 5.2.5, stripos() is very slow + // so prepare this buffer also in this case) + if (PMA_PHP_INT_VERSION < 50000 || PMA_IS_WINDOWS) { $buffer_upper = strtoupper($buffer); } // Grab some SQL queries out of it @@ -114,7 +116,8 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) { $p7 = $big_value; } // catch also "delimiter" - if (PMA_PHP_INT_VERSION >= 50000) { + // stripos() very slow on Windows (at least on PHP 5.2.5) + if (PMA_PHP_INT_VERSION >= 50000 && ! PMA_IS_WINDOWS) { $p8 = stripos($buffer, 'DELIMITER', $i); } else { $p8 = strpos($buffer_upper, 'DELIMITER', $i);