sending the "fake" header at each it�ration is about ten times faster than checking elapsed time and send the header each 20 seconds
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2001-12-09 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* read_dump.php3; libraries/build_dump.lib.php3: sending the "fake" header
|
||||||
|
at each it<69>ration is about ten times faster than checking elapsed time
|
||||||
|
and send the header each 20 seconds.
|
||||||
|
|
||||||
2001-12-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-12-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/left.js, lines 234-240: fixed a js bug with empty databases.
|
* libraries/left.js, lines 234-240: fixed a js bug with empty databases.
|
||||||
* libraries/functions.js: improved pointer code (for Opera 6.0).
|
* libraries/functions.js: improved pointer code (for Opera 6.0).
|
||||||
|
@@ -202,7 +202,6 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
|||||||
$search = array("\x00", "\x0a", "\x0d", "\x1a"); //\x08\\x09, not required
|
$search = array("\x00", "\x0a", "\x0d", "\x1a"); //\x08\\x09, not required
|
||||||
$replace = array('\0', '\n', '\r', '\Z');
|
$replace = array('\0', '\n', '\r', '\Z');
|
||||||
$is_first_row = TRUE;
|
$is_first_row = TRUE;
|
||||||
$prev_time = time();
|
|
||||||
|
|
||||||
@set_time_limit($GLOBALS['cfgExecTimeLimit']);
|
@set_time_limit($GLOBALS['cfgExecTimeLimit']);
|
||||||
|
|
||||||
@@ -242,13 +241,8 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
|||||||
// Call the handler
|
// Call the handler
|
||||||
$handler($insert_line);
|
$handler($insert_line);
|
||||||
|
|
||||||
// loic1: each 20 seconds, send a fake header to bypass browser
|
// loic1: send a fake header to bypass browser timeout
|
||||||
// timeout
|
|
||||||
$new_time = time();
|
|
||||||
if ($new_time - $prev_time >= 20) {
|
|
||||||
$prev_time = $new_time;
|
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
}
|
|
||||||
} // end while
|
} // end while
|
||||||
|
|
||||||
// Replace last comma by a semi-column in extended inserts case
|
// Replace last comma by a semi-column in extended inserts case
|
||||||
@@ -296,7 +290,6 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$is_first_row = TRUE;
|
$is_first_row = TRUE;
|
||||||
$fields_cnt = mysql_num_fields($result);
|
$fields_cnt = mysql_num_fields($result);
|
||||||
$prev_time = time();
|
|
||||||
|
|
||||||
@set_time_limit($GLOBALS['cfgExecTimeLimit']); // HaRa
|
@set_time_limit($GLOBALS['cfgExecTimeLimit']); // HaRa
|
||||||
|
|
||||||
@@ -359,13 +352,8 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
|
|||||||
$handler(trim($schema_insert));
|
$handler(trim($schema_insert));
|
||||||
++$i;
|
++$i;
|
||||||
|
|
||||||
// loic1: each 20 seconds, send a fake header to bypass browser
|
// loic1: send a fake header to bypass browser timeout
|
||||||
// timeout
|
|
||||||
$new_time = time();
|
|
||||||
if ($new_time - $prev_time >= 20) {
|
|
||||||
$prev_time = $new_time;
|
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
}
|
|
||||||
} // end while
|
} // end while
|
||||||
mysql_free_result($result);
|
mysql_free_result($result);
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ function PMA_splitSqlFile(&$ret, $sql, $release)
|
|||||||
$char = '';
|
$char = '';
|
||||||
$string_start = '';
|
$string_start = '';
|
||||||
$in_string = FALSE;
|
$in_string = FALSE;
|
||||||
$prev_time = time();
|
|
||||||
|
|
||||||
for ($i = 0; $i < $sql_len; ++$i) {
|
for ($i = 0; $i < $sql_len; ++$i) {
|
||||||
$char = $sql[$i];
|
$char = $sql[$i];
|
||||||
@@ -119,12 +118,8 @@ function PMA_splitSqlFile(&$ret, $sql, $release)
|
|||||||
$sql[$i] = ' ';
|
$sql[$i] = ' ';
|
||||||
} // end else if
|
} // end else if
|
||||||
|
|
||||||
// loic1: each 20 seconds, send a fake header to bypass browser timeout
|
// loic1: send a fake header to bypass browser timeout
|
||||||
$new_time = time();
|
|
||||||
if ($new_time - $prev_time >= 20) {
|
|
||||||
$prev_time = $new_time;
|
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
}
|
|
||||||
} // end for
|
} // end for
|
||||||
|
|
||||||
// add any rest to the returned array
|
// add any rest to the returned array
|
||||||
|
Reference in New Issue
Block a user