Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL)
-
None
Description
This is a 10.3 specific problem.
This script makes the server crash:
CREATE OR REPLACE TABLE t1 (a ENUM('a1')); |
CREATE OR REPLACE TABLE t2 AS SELECT (SELECT a FROM t1 UNION SELECT NULL); |
with this stack trace:
#0 0x00007ffff5ddaa28 in raise () from /lib64/libc.so.6
|
#1 0x00007ffff5ddc62a in abort () from /lib64/libc.so.6
|
#2 0x00007ffff5dd3227 in __assert_fail_base () from /lib64/libc.so.6
|
#3 0x00007ffff5dd32d2 in __assert_fail () from /lib64/libc.so.6
|
#4 0x0000555555d13f72 in Type_handler_enum::make_table_field (
|
this=0x5555571cd9c8 <type_handler_enum>, name=0x7ffe70013b90, addr=...,
|
attr=..., table=0x7ffff4197260)
|
at /home/bar/maria-git/server.10.2-ext/sql/sql_type.cc:1628
|
#5 0x0000555555d12cba in Type_handler::make_and_init_table_field (
|
this=0x5555571cd9c8 <type_handler_enum>, name=0x7ffe70013b90, addr=...,
|
attr=..., table=0x7ffff4197260)
|
at /home/bar/maria-git/server.10.2-ext/sql/sql_type.cc:1218
|
#6 0x0000555555a7c89b in Item::tmp_table_field_from_field_type (
|
this=0x7ffe70013b40, table=0x7ffff4197260)
|
at /home/bar/maria-git/server.10.2-ext/sql/item.h:553
|
Note, if I change the CREATE..SELECT not to use UNION, it works fine:
CREATE OR REPLACE TABLE t1 (a ENUM('a1')); |
CREATE OR REPLACE TABLE t2 AS SELECT (SELECT a FROM t1); |
Attachments
Issue Links
- relates to
-
MDEV-12588 Add Type_handler::type_handler_for_tmp_table() and Type_handler::type_handler_for_union()
- Closed