Work on 10MB chunks if no memory limit is set (bug #1399477).
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2006-01-09 Michal Čihař <michal@cihar.com>
|
||||
* import.php: Work on 10MB chunks if no memory limit is set (bug
|
||||
#1399477).
|
||||
|
||||
2006-01-07 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* sql.php: bug #1395590 Safari Bookmark query fieldset float problem,
|
||||
thanks to Ryan Schmidt
|
||||
|
@@ -171,7 +171,13 @@ if (!empty($bkm_label) && !empty($import_text)) {
|
||||
// We can not read all at once, otherwise we can run out of memory
|
||||
$memory_limit = trim(@ini_get('memory_limit'));
|
||||
// 2 MB as default
|
||||
if (empty($memory_limit)) $memory_limit = 2 * 1024 * 1024;
|
||||
if (empty($memory_limit)) {
|
||||
$memory_limit = 2 * 1024 * 1024;
|
||||
}
|
||||
// In case no memory limit we work on 10MB chunks
|
||||
if ($memory_limit = -1) {
|
||||
$memory_limit = 10 * 1024 * 1024;
|
||||
}
|
||||
|
||||
// Calculate value of the limit
|
||||
if (strtolower(substr($memory_limit, -1)) == 'm') $memory_limit = (int)substr($memory_limit, 0, -1) * 1024 * 1024;
|
||||
|
Reference in New Issue
Block a user