Skip to content

Commit

Permalink
Merge branch 'xdmod10.0' into convert-moddb-to-innodb
Browse files Browse the repository at this point in the history
  • Loading branch information
eiffel777 authored Dec 14, 2021
2 parents 51063ed + 8d274d7 commit e7909e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions classes/ETL/Ingestor/StructuredFileIngestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ function ($k, $v) {
// Insert each source record. Note that the source record may be an array or an
// object and must be Traversable.

$warnings = array();

foreach ( $this->sourceEndpoint as $sourceRecord ) {

// The same source record may be used in multiple tables.
Expand Down Expand Up @@ -325,10 +327,20 @@ function ($k, $v) {
array('exception' => $e, 'endpoint' => $this)
);
}

$warning = $this->destinationHandle->query("SHOW WARNINGS");

if ( count($warning) > 0 ) {
$warnings[$etlTableKey] = array_key_exists($etlTableKey, $warnings) ? array_merge($warnings[$etlTableKey], $warning) : $warning;
}
}
$numRecords++;
}

foreach ( $warnings as $table => $message) {
$this->logSqlWarnings($message, $this->etlDestinationTableList[$table]->getFullName());
}

return $numRecords;

} // _execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ ALTER TABLE `mod_logger`.`log_id_seq` ENGINE=InnoDB;
ALTER TABLE `mod_logger`.`log_level` ENGINE=InnoDB;
ALTER TABLE `mod_logger`.`log_table` ENGINE=InnoDB;
ALTER TABLE `mod_logger`.`schema_version_history` ENGINE=InnoDB;

CREATE INDEX ident_priority_idx ON `mod_logger`.`log_table` (ident, priority);
1 change: 1 addition & 0 deletions db/schema/mod_logger.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CREATE TABLE `log_table` (
KEY `unique_id_idx` (`id`),
KEY `ident_idx` (`ident`),
KEY `priority_idx` (`priority`),
KEY `ident_priority_idx` (`ident`, `priority`),
KEY `logscan` (`ident`,`priority`,`id`),
KEY `get_messages_idx` (`ident`,`logtime`,`priority`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Expand Down

0 comments on commit e7909e1

Please sign in to comment.