Assertion `(enum_set_typelib && get_real_type(item) == MYSQL_TYPE_NULL) || (!enum_set_typelib && item->type() == Item::FIELD_ITEM && (get_real_type(item) == MYSQL_TYPE_ENUM || get_real_type(item) == MYSQL_TYPE_SET) && ((Field_enum*)((Item_field *) item)->field)->typelib)' failed at Item_type_holder::get_full_info(Item*)

Bug #921878 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Critical
Oleksandr "Sanja" Byelkin

Bug Description

mysqld: item.cc:9058: void Item_type_holder::get_full_info(Item*): Assertion `(enum_set_typelib && get_real_type(item) == MYSQL_TYPE_NULL) || (!enum_set_typelib && item->type() == Item::FIELD_ITEM && (get_real_type(item) == MYSQL_TYPE_ENUM || get_real_type(item) == MYSQL_TYPE_SET) && ((Field_enum*)((Item_field *) item)->field)->typelib)' failed

#8 0xb74b7014 in __assert_fail () from /lib/libc.so.6
#9 0x08210492 in Item_type_holder::get_full_info (this=0x945f380,
    item=0x945f290) at item.cc:9052
#10 0x0820f7da in Item_type_holder::Item_type_holder (this=0x945f380,
    thd=0x93edad0, item=0x945f290) at item.cc:8712
#11 0x084b08af in st_select_lex_unit::prepare (this=0x93ef240,
    thd_arg=0x93edad0, sel_result=0x945f178, additional_options=268435456)
    at sql_union.cc:339
#12 0x084afac6 in mysql_union (thd=0x93edad0, lex=0x93ef1e4, result=0x945f178,
    unit=0x93ef240, setup_tables_done_option=1073741824) at sql_union.cc:33
#13 0x08350a3c in handle_select (thd=0x93edad0, lex=0x93ef1e4,
    result=0x945f178, setup_tables_done_option=1073741824) at sql_select.cc:262
#14 0x082e6252 in mysql_execute_command (thd=0x93edad0) at sql_parse.cc:3301
#15 0x082ee6d3 in mysql_parse (thd=0x93edad0,
    rawbuf=0x945d4f0 "INSERT INTO t3 SELECT * FROM ( SELECT * FROM t1 ) AS A UNION SELECT * FROM t2", length=77, found_semicolon=0xae930234)
    at sql_parse.cc:6149
#16 0x082e10d6 in dispatch_command (command=COM_QUERY, thd=0x93edad0,
    packet=0x9447361 "INSERT INTO t3 SELECT * FROM ( SELECT * FROM t1 ) AS A UNION SELECT * FROM t2", packet_length=77) at sql_parse.cc:1227
#17 0x082e0580 in do_command (thd=0x93edad0) at sql_parse.cc:922
#18 0x082dd545 in handle_one_connection (arg=0x93edad0) at sql_connect.cc:1193
#19 0xb7745b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: <email address hidden>
date: 2012-01-25 22:05:20 +0400
build-date: 2012-01-26 03:37:01 +0400
revno: 3395
branch-nick: maria-5.3

Also fails on MariaDB-5.5.
Could not reproduce on MariaDB-5.2, MySQL-5.1, 5.5, 5.6.

Test case:

CREATE TABLE t1 ( a ENUM( 'x', 'y' ) );
CREATE TABLE t2 LIKE t1;
CREATE TABLE t3 LIKE t1;
INSERT INTO t3
  SELECT * FROM ( SELECT * FROM t1 ) AS A
    UNION SELECT * FROM t2;

Revision history for this message
Jorge Silva (silvas91) wrote :

Tested with MariaDB 5.3. This happens when derived_merge is enabled.

Michael Widenius (monty)
Changed in maria:
assignee: Michael Widenius (monty) → Oleksandr "Sanja" Byelkin (sanja-byelkin)
importance: Undecided → Medium
Changed in maria:
importance: Medium → Critical
status: New → In Progress
Changed in maria:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.