Increase memory_limit
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1183 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
931fff712a
commit
71524c585b
|
@ -20,7 +20,7 @@ if (!$error && $_POST) {
|
||||||
$query = get_file("sql_file", true);
|
$query = get_file("sql_file", true);
|
||||||
}
|
}
|
||||||
if (is_string($query)) { // get_file() returns error as number, fread() as false
|
if (is_string($query)) { // get_file() returns error as number, fread() as false
|
||||||
@ini_set("memory_limit", 2 * strlen($query) + memory_get_usage() + 2e6); // @ - may be disabled, 2 - substr and trim, 2e6 - other variables
|
@ini_set("memory_limit", 2 * strlen($query) + memory_get_usage() + 8e6); // @ - may be disabled, 2 - substr and trim, 8e6 - other variables
|
||||||
if (strlen($query) && strlen($query) < 1e6 && (!$history || end($history) != $query)) { // don't add repeated and big queries
|
if (strlen($query) && strlen($query) < 1e6 && (!$history || end($history) != $query)) { // don't add repeated and big queries
|
||||||
$history[] = $query;
|
$history[] = $query;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue