_query .= $import_run_buffer['full'];
}
}
}
// check length of query unless we decided to pass it to sql.php
if (!$go_sql) {
if ($cfg['VerboseMultiSubmit'] && !empty($sql_query)) {
if (strlen($sql_query) > 50000 || $executed_queries > 50 || $max_sql_len > 1000) {
$sql_query = '';
$sql_query_disabled = TRUE;
}
} else {
if (strlen($sql_query) > 10000 || $executed_queries > 10 || $max_sql_len > 500) {
$sql_query = '';
$sql_query_disabled = TRUE;
}
}
}
} // end do query (no skip)
} // end buffer exists
// Do we have something to push into buffer?
if (!empty($sql) || !empty($full)) {
$import_run_buffer = array('sql' => $sql, 'full' => $full);
} else {
unset($GLOBALS['import_run_buffer']);
}
}
/**
* Returns next part of imported file/buffer
*
* @param integer size of buffer to read (this is maximal size
* function will return)
* @return string part of file/buffer
* @access public
*/
function PMA_importGetNextChunk($size = 32768)
{
global $import_file, $import_text, $finished, $compression, $import_handle, $offset, $charset_conversion, $charset_of_file, $charset, $read_multiply, $read_limit;
// Add some progression while reading large amount of data
if ($read_multiply <= 8) {
$size *= $read_multiply;
} else {
$size *= 8;
}
$read_multiply++;
// We can not read too much
if ($size > $read_limit) {
$size = $read_limit;
}
if (PMA_checkTimeout()) {
return FALSE;
}
if ($finished) {
return TRUE;
}
if ($import_file == 'none') {
// Well this is not yet supported and tested, but should return content of textarea
if (strlen($import_text) < $size) {
$fin