Skip to content

Commit

Permalink
DibiMysql: ignores empty 'CHARACTER SET'
Browse files Browse the repository at this point in the history
  • Loading branch information
janpecha committed Jul 28, 2023
1 parent 925c96c commit 48abc09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DibiMysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ private function getTables()
');

foreach ($rows as $row) {
if ($row['character_set_name'] === '') {
continue;
}

$this->tableMetas[(string) $row['table_name']]['CHARACTER SET'] = $row['character_set_name'];
}

Expand Down Expand Up @@ -101,7 +105,7 @@ private function createTable($name)
}
}

if ($rowMeta['CHARACTER SET'] !== NULL) {
if ($rowMeta['CHARACTER SET'] !== NULL && $rowMeta['CHARACTER SET'] !== '') {
if (!isset($meta['CHARACTER SET']) || $meta['CHARACTER SET'] !== $rowMeta['CHARACTER SET']) {
$options['CHARACTER SET'] = $rowMeta['CHARACTER SET'];
}
Expand Down

0 comments on commit 48abc09

Please sign in to comment.