Assertion `maybe_null && item->null_value' failed with ORDER BY LAST_DAY()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Sergei Golubchik |
Bug Description
Not repeatable in mysql-5.1 . Using LAST_DAY() in ORDER BY with non-date argument asserts as follows:
mysqld: filesort.cc:854: void make_sortkey(
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x08386dc0 in make_sortkey (param=0xb6bccbb8,
to=0xb6a041bc "\245\245\
#10 0x08386429 in find_all_keys (param=0xb6bccbb8, select=0xb6a06398, sort_keys=
at filesort.cc:620
#11 0x08385120 in filesort (thd=0x9c59090, table=0xb6a024f0, sortorder=
sort_
#12 0x082f5476 in create_sort_index (thd=0x9c59090, join=0xb6a04b58, order=0xb6a04aa8, filesort_
select_
#13 0x082d918e in JOIN::exec (this=0xb6a04b58) at sql_select.cc:2277
#14 0x082d9c62 in mysql_select (thd=0x9c59090, rref_pointer_
order=
at sql_select.cc:2544
#15 0x082d264e in handle_select (thd=0x9c59090, lex=0x9c5a1ac, result=0xb6a04b40, setup_tables_
#16 0x0827a78f in execute_
#17 0x08271646 in mysql_execute_
#18 0x0827c948 in mysql_parse (thd=0x9c59090, rawbuf=0xb6a04628 "SELECT * FROM t1 ORDER BY LAST_DAY ( f2 )", length=41, found_semicolon
at sql_parse.cc:6054
#19 0x0826f2a0 in dispatch_command (command=COM_QUERY, thd=0x9c59090, packet=0x9c9e539 "SELECT * FROM t1 ORDER BY LAST_DAY ( f2 ) ", packet_length=43)
at sql_parse.cc:1249
#20 0x0826e4d0 in do_command (thd=0x9c59090) at sql_parse.cc:889
#21 0x0826c815 in handle_
#22 0x00821919 in start_thread () from /lib/libpthread
#23 0x0076acce in clone () from /lib/libc.so.6
test case:
CREATE TABLE t1 ( f2 int NOT NULL) ;
INSERT INTO t1 VALUES (0),(0);
SELECT * FROM t1 ORDER BY LAST_DAY ( f2 ) ;
Related branches
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Sergei (sergii) |
Changed in maria: | |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
Nice. This assert has discovered an old bug in LAST_DAY :)
reported as http:// bugs.mysql. com/bug. php?id= 60385