Since 2.11.3 importing sql has been very slow and invariably times out. A test file with only 27 queries takes 22 seconds to complete.
I have traced the issue to line 118 of libraries\import\sql.php
$p8 = stripos($buffer, 'DELIMITER', $i);
Changing to stripos to strpos reduces the import time for my test file to a sensible 2 seconds.
The problem is occuring only on my Windows machine (IIS/5.1 with php 5.26 CGI/FastCGI) but is fine on my Linux server.
I realise that stripos is a new command in php5+ but for some reason it is adding a massive overhead to this process.
Logged In: YES
user_id=210714
Originator: NO
It would be great if you could attach your test file. I'll retest on Windows (I hope the bug happens under Apache too). I think we still need to check for both cases (delimiter/DELIMITER) but this could be done with another logic.
Logged In: YES
user_id=2114158
Originator: YES
This does not happen on my Linux/Apache server only on Windows IIS 5.1
The file is database tables exported with pma. I have removed customer data and attached.
With stripos changed to strpos this imports in 2 seconds. But with stripos it takes 23 seconds
File Added: test.sql
Logged In: YES
user_id=210714
Originator: NO
Confirmed on: Windows + IIS + PHP 5.1.0 (CGI/FastCGI)
Confirmed on: Windows + Apache + PHP 5.2.5
Logged In: YES
user_id=210714
Originator: NO
Fixed in subversion, thanks for reporting.
Logged In: YES
user_id=210714
Originator: NO
Patch:
http://phpmyadmin.svn.sourceforge.net/viewvc/phpmyadmin/branches/QA_2_11/phpMyAdmin/libraries/import/sql.php?r1=11051&r2=11322
Logged In: YES
user_id=210714
Originator: NO
Reported as a PHP 5.2.6 bug:
http://bugs.php.net/bug.php?id=45265