Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
This query:
CREATE OR REPLACE TABLE t1 ENGINE=INNODB SELECT NULL UNION SELECT NULL; |
returns an unexpected error:
ERROR 1005 (HY000): Can't create table `test`.`t1` (errno: 168 "Unknown (generic) error from engine")
|
Note, with ENGINE=MyISAM it works fine.
Attachments
Issue Links
- relates to
-
MDEV-19849 InnoDB should and can be more specific with errno: 168 "Unknown (generic) error from engine". The output for MyISAM, Aria and RocksDB can also be improved.
-
- Confirmed
-
The reason for this error is that starting with some commit in 10.3 or bb-10.2-ext, the field->type() == MYSQL_TYPE_NULL is being passed to InnoDB, instead of the former MYSQL_TYPE_STRING. get_innobase_type_from_mysql_type() is not ready to handle that.
If this bug is addressed by adjusting get_innobase_type_from_mysql_type(), then extreme care must be taken to ensure that INFORMATION_SCHEMA.INNODB_SYS_COLUMNS will be reporting the same prtype and mtype as before. Otherwise, InnoDB data compatibility with older versions may be broken.