[DBAL-508] MySqlSchemaManager accessing undefined index tableColumn[comment] Created: 30/Apr/13 Updated: 09/May/13 Resolved: 09/May/13
|Reporter:||Martin Kuckert||Assignee:||Benjamin Eberlei|
Linux 3.2.0-24-generic-pae #39-Ubuntu,
in the method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableColumnDefinition the index "comment" in the array $tableColumn is accessed without ensuring that this index is set. This leads to an Undefined index: comment warning in E_ALL-environments.
This method is triggered e.g. by the Doctrine\ORM\Tools\SchemaTool getUpdateSchemaSql method.
|Comment by Benjamin Eberlei [ 01/May/13 ]|
Can't really explain this, the key has to be existant. This is only called with information from MysqlPlatform#getListTableColumnsSQL().
|Comment by Martin Kuckert [ 02/May/13 ]|
I've just found the issue. The main problem is the usage of 'DESCRIBE ' . $table; in the getListTableColumnsSQL, if there's no $database set. describe does not return the comment column, but 'show full columns from ' . $table; does.
Seems like an uncovered code path instead of a bug in a real environment.
|Comment by Benjamin Eberlei [ 09/May/13 ]|
Special case fixed for 2.4