[MDEV-20711] Unexpected 'Unknown .. error from engine' with SELECT NULL UNION SELECT NULL Created: 2019-10-01 Updated: 2022-11-21 Resolved: 2022-11-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types, Storage Engine - InnoDB |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.4.21, 10.5.12, 10.6.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 6 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Epic Link: | Data type cleanups | ||||||||
| Description |
|
This query:
returns an unexpected error:
Note, with ENGINE=MyISAM it works fine. |
| Comments |
| Comment by Marko Mäkelä [ 2019-10-01 ] | ||||||||||
|
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. | ||||||||||
| Comment by Deryl Spielman [ 2020-08-24 ] | ||||||||||
|
I am receiving this same error in MariaDB-10.4.7. It works in MySQL 5.6 and is preventing me from migrating from MySQL to MariaDB.
| ||||||||||
| Comment by Abraham Ciokler [ 2020-08-24 ] | ||||||||||
|
I'm getting the same error as Deryl Spielman. Any ideas? | ||||||||||
| Comment by Roel Van de Paar [ 2022-10-14 ] | ||||||||||
|
The testcase by dukethrash can indeed be reduced as follows (i.e. similar or indentical to the original description):
Which leads to:
On InnoDB only. MyISAM, Aria and Memory do not result in the same issue. Spider gives an interesting issue for which I will create a seperate bug. Bug confirmed not present in: Bug (or feature/syntax) confirmed not present in: |