[MDEV-11108] Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table Created: 2016-10-22  Updated: 2017-01-24  Resolved: 2017-01-23

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.2
Fix Version/s: 10.2.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Varun Gupta (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 10.2.4-1

 Description   

--source include/have_innodb.inc
 
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
 
CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB;
 
CREATE TABLE t3 (c INT) ENGINE=InnoDB;
CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
 
INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
 
SELECT * FROM t1, t2
WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ;

mysqld: /data/src/10.2/sql/opt_subselect.cc:4056: bool SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD*): Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed.
161023  2:06:04 [ERROR] mysqld got signal 6 ;

10.2 82b974a1b6

#6  0x00007f8808b62266 in __assert_fail_base (fmt=0x7f8808c9b238 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f880bed1920 "uniq_tuple_length_arg <= table->file->max_key_length()", file=file@entry=0x7f880bed14e0 "/data/src/10.2/sql/opt_subselect.cc", line=line@entry=4056, function=function@entry=0x7f880bed2580 <SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD*)::__PRETTY_FUNCTION__> "bool SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD*)") at assert.c:92
#7  0x00007f8808b62312 in __GI___assert_fail (assertion=0x7f880bed1920 "uniq_tuple_length_arg <= table->file->max_key_length()", file=0x7f880bed14e0 "/data/src/10.2/sql/opt_subselect.cc", line=4056, function=0x7f880bed2580 <SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD*)::__PRETTY_FUNCTION__> "bool SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD*)") at assert.c:101
#8  0x00007f880b5ae78e in SJ_TMP_TABLE::create_sj_weedout_tmp_table (this=0x7f87e39266a0, thd=0x7f87e3816070) at /data/src/10.2/sql/opt_subselect.cc:4056
#9  0x00007f880b5af7ee in init_dups_weedout (join=0x7f87e3869b30, first_table=0, first_fanout_table=1, n_tables=4) at /data/src/10.2/sql/opt_subselect.cc:4369
#10 0x00007f880b5afec0 in setup_semijoin_dups_elimination (join=0x7f87e3869b30, options=0, no_jbuf_after=4) at /data/src/10.2/sql/opt_subselect.cc:4626
#11 0x00007f880b46ec50 in make_join_readinfo (join=0x7f87e3869b30, options=0, no_jbuf_after=4) at /data/src/10.2/sql/sql_select.cc:11128
#12 0x00007f880b455a7b in JOIN::optimize_inner (this=0x7f87e3869b30) at /data/src/10.2/sql/sql_select.cc:1905
#13 0x00007f880b452b62 in JOIN::optimize (this=0x7f87e3869b30) at /data/src/10.2/sql/sql_select.cc:1076
#14 0x00007f880b45b412 in mysql_select (thd=0x7f87e3816070, tables=0x7f87e38642d8, wild_num=1, fields=..., conds=0x7f87e3867388, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f87e3869b10, unit=0x7f87e3819b40, select_lex=0x7f87e381a278) at /data/src/10.2/sql/sql_select.cc:3555
#15 0x00007f880b4505c1 in handle_select (thd=0x7f87e3816070, lex=0x7f87e3819a78, result=0x7f87e3869b10, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:373
#16 0x00007f880b41dc56 in execute_sqlcom_select (thd=0x7f87e3816070, all_tables=0x7f87e38642d8) at /data/src/10.2/sql/sql_parse.cc:6353
#17 0x00007f880b413730 in mysql_execute_command (thd=0x7f87e3816070) at /data/src/10.2/sql/sql_parse.cc:3377
#18 0x00007f880b421616 in mysql_parse (thd=0x7f87e3816070, rawbuf=0x7f87e3864088 "SELECT * FROM t1, t2\nWHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) )", length=78, parser_state=0x7f880c51fdd0, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7796
#19 0x00007f880b40f384 in dispatch_command (command=COM_QUERY, thd=0x7f87e3816070, packet=0x7f87e3858071 "SELECT * FROM t1, t2\nWHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ", packet_length=79, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1806
#20 0x00007f880b40dd5e in do_command (thd=0x7f87e3816070) at /data/src/10.2/sql/sql_parse.cc:1366
#21 0x00007f880b554474 in do_handle_one_connection (connect=0x7f880806d6b0) at /data/src/10.2/sql/sql_connect.cc:1354
#22 0x00007f880b554201 in handle_one_connection (arg=0x7f880806d6b0) at /data/src/10.2/sql/sql_connect.cc:1260
#23 0x00007f880b887d78 in pfs_spawn_thread (arg=0x7f87f6be7770) at /data/src/10.2/storage/perfschema/pfs.cc:1862
#24 0x00007f880aa640a4 in start_thread (arg=0x7f880c521300) at pthread_create.c:309
#25 0x00007f8808c1c87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111



 Comments   
Comment by Sergei Petrunia [ 2017-01-23 ]

Ok to push, but see email re which versions to push to.

Generated at Thu Feb 08 07:47:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.