Skip to content

Commit

Permalink
Display delimiter into SQL trace.
Browse files Browse the repository at this point in the history
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
  • Loading branch information
Tithugues committed Oct 28, 2014
1 parent e85b43b commit 3301bc3
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions libraries/plugins/import/ImportSql.class.php
Expand Up @@ -366,15 +366,13 @@ public function doImport(&$sql_data = array())
*/
$GLOBALS['finished'] = false;
$positionDelimiter = false;
$query = null;

while (!$error && !$timeout_passed) {
if (false === $positionDelimiter) {
$newData = PMA_importGetNextChunk(200);
if ($newData === false) {
// subtract data we didn't handle yet and stop processing
$GLOBALS['offset']
-= $this->_stringFctToUse['strlen']($query);
$GLOBALS['offset'] -= $this->_dataLength;
break;
}

Expand All @@ -397,27 +395,27 @@ public function doImport(&$sql_data = array())
continue;
}

$query = $this->_stringFctToUse['substr'](
$this->_data,
0,
$positionDelimiter
);
$this->_setData(
PMA_importRunQuery(
$this->_stringFctToUse['substr'](
$this->_data,
0,
$positionDelimiter
), //Query to execute
$this->_stringFctToUse['substr'](
$this->_data,
0,
$positionDelimiter + $this->_delimiterLength
)
);

PMA_importRunQuery(
$query, //Query to execute
$query, //Query to display
), //Query to display
false,
$sql_data
);

//After execution, $buffer can be empty.
$query = null;
$this->_setData(
$this->_stringFctToUse['substr'](
$this->_data,
$positionDelimiter + $this->_delimiterLength
)
);
}

//Commit any possible data in buffers
Expand Down

0 comments on commit 3301bc3

Please sign in to comment.