Assertion `! is_set()' failed in Diagnostics_area::set_ok_status(THD*, ha_rows, ulonglong, const char*) on CREATE .. SELECT with ER_SUBQUERY_NO_1_ROW
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Sergey Petrunia |
Bug Description
Version: '5.3.4-
mysqld: sql_class.cc:565: void Diagnostics_
#8 0xb73bf014 in __assert_fail () from /lib/libc.so.6
#9 0x082b5458 in Diagnostics_
last_
at sql_class.cc:565
#10 0x081ecc73 in my_ok (thd=0x93eeae0, affected_rows=0, id=0,
message=
#11 0x08390ca3 in select_
#12 0x083927c5 in select_
#13 0x0836ae4b in return_zero_rows (join=0x946f8d8, result=0x945ec50, tables=..., fields=...,
send_row=false, select_
info=0x8936114 "Impossible WHERE noticed after reading const tables", having=0x0) at sql_select.cc:10456
#14 0x08356def in JOIN::exec (this=0x946f8d8) at sql_select.cc:2160
#15 0x08359589 in mysql_select (thd=0x93eeae0, rref_pointer_
fields=..., conds=0x945ebb8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
select_
#16 0x083512a3 in handle_select (thd=0x93eeae0, lex=0x93f0204, result=0x945ec50, setup_tables_
at sql_select.cc:284
#17 0x082e4b17 in mysql_execute_
#18 0x082eea54 in mysql_parse (thd=0x93eeae0,
rawbuf=
#19 0x082e1435 in dispatch_command (command=COM_QUERY, thd=0x93eeae0,
packet=
#20 0x082e08df in do_command (thd=0x93eeae0) at sql_parse.cc:923
#21 0x082dd865 in handle_
#22 0xb764db25 in start_thread () from /lib/libpthread
bzr version-info
revision-id: <email address hidden>
date: 2012-02-16 20:15:57 +0400
build-date: 2012-02-18 04:08:37 +0400
revno: 3424
Could not reproduce on MariaDB 5.2, 5.5, MySQL 5.1.60, 5.5.20
Query (0x945dc10): CREATE TABLE t AS SELECT a AS field1 FROM t1 WHERE ( SELECT alias1.a FROM t1 AS alias1 ) IS NOT NULL
Connection ID (thread ID): 2
Status: NOT_KILLED
Minimal optimizer_switch: in_to_exists=on
Full optimizer_switch: index_merge=
# Test case:
CREATE TABLE t1 ( a VARCHAR(1) );
INSERT INTO t1 VALUES ('u'),('k');
CREATE TABLE t AS
SELECT a AS field1 FROM t1
WHERE ( SELECT alias1.a
FROM t1 AS alias1
) IS NOT NULL;
# End of test case
Changed in maria: | |
assignee: | Sergei (sergii) → Sergey Petrunia (sergefp) |
Changed in maria: | |
assignee: | Elena Stepanova (elenst) → Sergey Petrunia (sergefp) |
Changed in maria: | |
status: | New → Fix Committed |
Not repeatable in the latest 5.3 tree:
mysql> CREATE TABLE t AS
-> SELECT a AS field1 FROM t1
-> WHERE ( SELECT alias1.a
-> FROM t1 AS alias1
-> ) IS NOT NULL;
Query OK, 0 rows affected, 1 warning (0.03 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> show warnings\G ******* ******* ****** 1. row ******* ******* ******* ******
*******
Level: Error
Code: 1242
Message: Subquery returns more than 1 row
1 row in set (0.00 sec)