Skip to content

Commit

Permalink
Improve debugging messages (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
smgallo authored Jan 25, 2019
1 parent c2b5194 commit 3f4a028
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions classes/ETL/Maintenance/ExecuteSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,15 @@ public function execute(EtlOverseerOptions $etlOverseerOptions)
// does not support multiple SQL statements in a single query.

$sqlStatementList = explode($delimiter, $sqlFileContents);

// Trim each SQL statement and filter empty items (such as newlines)

$sqlStatementList = array_filter(array_map('trim', $sqlStatementList));
$numSqlStatements = count($sqlStatementList);
$numStatementsProcessed = 0;

foreach ($sqlStatementList as $sql) {

// Skip empty queries

$sql = trim($sql);
if ( "" == $sql ) {
continue;
}

// Remove comments from the SQL before executing for clarity.

$commentPatterns = array(
Expand Down

0 comments on commit 3f4a028

Please sign in to comment.