`CREATE_OPTIONS` is nullable in MySQL

parent dac7d607
......@@ -312,11 +312,11 @@ class MySqlSchemaManager extends AbstractSchemaManager
/**
* @return string[]|true[]
*/
private function parseCreateOptions(string $string) : array
private function parseCreateOptions(?string $string) : array
{
$options = [];
if ($string === '') {
if ($string === null || $string === '') {
return $options;
}
......
......@@ -531,4 +531,11 @@ SQL;
self::assertEquals('', $onlineTable->getOption('comment'));
self::assertEquals([], $onlineTable->getOption('create_options'));
}
public function testParseNullCreateOptions() : void
{
$table = $this->schemaManager->listTableDetails('sys.processlist');
self::assertEquals([], $table->getOption('create_options'));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment