RQG: Crash in get_datetime_value() with virtual columns
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
The following SQL crashes the server. Note that the virtual column expression is not exactly correct type-wise:
CREATE TABLE IF NOT EXISTS X (
f3 DATETIME NOT NULL DEFAULT 0,
v2 BOOLEAN AS ( f3 < ( GET_FORMAT( DATETIME, 'INTERNAL' ) ) ) PERSISTENT
);
INSERT INTO X ( f3 ) VALUES ( '0000-00-00' );
INSERT INTO X ( f3 ) VALUES ( '0000-00-00' );
DELETE FROM X;
backtrace:
#3 0x0826c124 in handle_segfault (sig=11) at mysqld.cc:2693
#4 <signal handler called>
#5 0x081ecfdc in get_datetime_value (thd=0x9f5c658, item_arg=
at item_cmpfunc.
#6 0x081ed44e in Arg_comparator:
#7 0x081d340a in Arg_comparator:
#8 0x081ef15d in Item_func_
#9 0x081bb793 in Item::save_in_field (this=0xb5de7f20, field=0xb5de7d18, no_conversions=
#10 0x082e2a0e in update_
#11 0x082d3298 in fill_record (thd=0x9f5c658, fields=..., values=..., ignore_
#12 0x082d338b in fill_record_
at sql_base.cc:8305
#13 0x08314322 in mysql_insert (thd=0x9f5c658, table_list=
ignore=false) at sql_insert.cc:780
#14 0x0828153b in mysql_execute_
#15 0x08289fa0 in mysql_parse (thd=0x9f5c658, inBuf=0xb5d4a068 "INSERT INTO X ( f3 ) VALUES ( '0000-00-00' )", length=44, found_semicolon
at sql_parse.cc:6024
#16 0x0827c1fa in dispatch_command (command=COM_QUERY, thd=0x9f5c658, packet=0x9f74571 "INSERT INTO X ( f3 ) VALUES ( '0000-00-00' )", packet_length=44)
at sql_parse.cc:1183
#17 0x0827b6a0 in do_command (thd=0x9f5c658) at sql_parse.cc:890
#18 0x08278800 in handle_
#19 0x00a08919 in start_thread () from /lib/libpthread
#20 0x00951e5e in clone () from /lib/libc.so.6
Changed in maria: | |
importance: | Undecided → High |
status: | New → In Progress |
assignee: | nobody → Igor Babaev (igorb-seattle) |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
milestone: | none → 5.2 |
Changed in maria: | |
status: | Fix Committed → Fix Released |