CREATE TEMPORARY TABLE t0 ( c22 TEXT , c57 BOOL ) ;
INSERT INTO t0 VALUES ( -101 , -87 ) , ( -95 , 59 ) ;
CREATE INDEX i0 ON t0 ( c22 ) ;
INSERT INTO t0 ( c57 ) SELECT 48 AS c48 ;
SELECT t4 . c16 AS c37 FROM ( WITH t1 AS ( SELECT 2743131056066857905 AS c24 , MIN( 3762089500126409270 ) AS c62 ) SELECT c22 = ( SELECT t0 . c22 AS c20 FROM ( SELECT t1 . c62 AS c27 FROM t1 LEFT OUTER JOIN t0 AS t2 ON TRUE HAVING RAND ( ) IS NOT UNKNOWN ) AS t3 JOIN t0 ON t0 . c22 = t3 . c27 EXCEPT SELECT c22 + -94 AS c36 FROM t0 WHERE c57 IN ( SELECT c22 AS c25 FROM t0 ) LIMIT 1 ) AS c16 FROM t0 ) AS t4 JOIN t0 ON t0 . c22 = t0 . c22 ;
Will trigger Segmentation fault.
GDB info:
Thread 17 "mariadbd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd1c17300 (LWP 3039)]
0x0000000000cce04f in test_if_quick_select (tab=0x62d000145980) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24361
24361 delete tab->select->quick;
(gdb) p tab->select
$29 = (SQL_SELECT *) 0x0
#0 0x0000000000cce04f in test_if_quick_select (tab=0x62d0000e1a50) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24361
#1 0x0000000000ccd3ae in join_init_quick_read_record (tab=0x62d0000e1a50) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24337
#2 0x0000000000be32cc in sub_select (join=0x6290000c9430, join_tab=0x62d0000e1a50, end_of_records=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23441
#3 0x0000000000c9e284 in evaluate_join_record (join=join@entry=0x6290000c9430, join_tab=<optimized out>, join_tab@entry=0x62d0000e15d8, error=error@entry=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23677
#4 0x0000000000be3396 in sub_select (join=0x6290000c9430, join_tab=0x62d0000e15d8, end_of_records=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23444
#5 0x0000000000c45121 in do_select (join=0x6290000c9430, procedure=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
#6 JOIN::exec_inner (this=0x6290000c9430) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
#7 0x0000000000c428e9 in JOIN::exec (this=0x6290000c9430) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
#8 0x0000000000df0df7 in st_select_lex_unit::exec_inner (this=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_union.cc:2389
#9 0x00000000015d8bb5 in subselect_union_engine::exec (this=<optimized out>) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:4187
#10 0x00000000015b3edc in Item_subselect::exec (this=0x6290000c0700) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:812
#11 0x00000000015b9a0c in Item_singlerow_subselect::val_str (this=0x6290000c0700, str=0x6290000c0ae8) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:1484
#12 0x00000000013aa698 in Arg_comparator::compare_string (this=0x6290000c0998) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:773
#13 0x00000000013b5ea2 in Arg_comparator::compare (this=<optimized out>) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.h:104
#14 Item_func_eq::val_int (this=<optimized out>) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:1780
#15 0x00000000013552b8 in Item::save_int_in_field (this=0x6290000c08e0, field=0x6190001013b8, no_conversions=false) at /home/wx/mariadb-11.3.0/sql/item.cc:6843
#16 0x00000000013554a9 in Item::save_in_field (this=0x6290000c08e0, field=0x6190001013b8, no_conversions=false) at /home/wx/mariadb-11.3.0/sql/item.cc:6853
#17 0x00000000009d9dc9 in fill_record (thd=<optimized out>, table=<optimized out>, ptr=0x61f000013d98, values=..., ignore_errors=<optimized out>, use_value=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_base.cc:9320
#18 0x0000000000de507b in select_unit::send_data (this=0x6290000c5998, values=...) at /home/wx/mariadb-11.3.0/sql/sql_union.cc:122
#19 0x0000000000c36f9a in select_result_sink::send_data_with_check (this=0x0, items=..., u=<optimized out>, sent=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_class.h:5842
#20 end_send (join=0x6290000c5a90, join_tab=0x6290000cb858, end_of_records=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24710
#21 0x0000000000c9e284 in evaluate_join_record (join=join@entry=0x6290000c5a90, join_tab=<optimized out>, join_tab@entry=0x6290000cb3e0, error=error@entry=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23677
#22 0x0000000000be340f in sub_select (join=0x6290000c5a90, join_tab=0x6290000cb3e0, end_of_records=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23481
#23 0x0000000000c45121 in do_select (join=0x6290000c5a90, procedure=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
#24 JOIN::exec_inner (this=0x6290000c5a90) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
#25 0x0000000000c428e9 in JOIN::exec (this=this@entry=0x6290000c5a90) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
#27 0x0000000000a56eb7 in mysql_derived_fill (thd=<optimized out>, lex=<optimized out>, derived=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_derived.cc:1266
#28 0x0000000000a57cc2 in mysql_handle_single_derived (lex=0x62b0001703c8, derived=derived@entry=0x6290000c3238, phases=phases@entry=96) at /home/wx/mariadb-11.3.0/sql/sql_derived.cc:200
#29 0x0000000000c71b80 in st_join_table::preread_init (this=this@entry=0x62d0000e85f8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:16029
#30 0x0000000000be2fea in sub_select (join=0x6290000c51c0, join_tab=0x62d0000e85f8, end_of_records=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23392
#31 0x0000000000c45121 in do_select (join=0x6290000c51c0, procedure=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
#32 JOIN::exec_inner (this=0x6290000c51c0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
#33 0x0000000000c428e9 in JOIN::exec (this=this@entry=0x6290000c51c0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
#35 0x0000000000be4596 in handle_select (thd=thd@entry=0x62b00016c218, lex=<optimized out>, lex@entry=0x62b0001703c8, result=<optimized out>, result@entry=0x6290000c5190, setup_tables_done_option=<optimized out>, setup_tables_done_option@entry=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:628
#36 0x0000000000b3df18 in execute_sqlcom_select (thd=0x62b00016c218, all_tables=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:6013
#37 0x0000000000b2cd51 in mysql_execute_command (thd=0x62b00016c218, is_called_from_prepared_stmt=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:3912
#38 0x0000000000b1fe79 in mysql_parse (thd=thd@entry=0x62b00016c218, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, parser_state@entry=0x7fffd242ca80) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
#39 0x0000000000b19069 in dispatch_command (command=<optimized out>, thd=0x62b00016c218, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
#40 0x0000000000b20b71 in do_command (thd=0x62b00016c218, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
#41 0x0000000000f03476 in do_handle_one_connection (connect=<optimized out>, put_in_cache=<optimized out>) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
#42 0x0000000000f02eb9 in handle_one_connection (arg=arg@entry=0x608001921d38) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
#43 0x0000000001a00c1b in pfs_spawn_thread (arg=0x617000005118) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
#44 0x00007ffff79f7609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#45 0x00007ffff770f133 in clone () from /lib/x86_64-linux-gnu/libc.so.6
Attachments
Issue Links
relates to
MDEV-32397join_read_first, keyread: SEGV at /mariadb-11.3.0/sql/sql_select.cc:24300
But I don't like the fix:
The fix introduces JOIN::insubq which is checked in addition to the "uncacheable" property.
Also, JOIN::insubq changes during execution. This looks odd - a property that "this JOIN mustn't be freed" looks like something that is static, not dynamic.
$109 = 0x555557aac4a0 <dbug_item_print_buf> "select t1.a from t1 semi join (t1) where t1.b = t1.a"
(gdb) n
(gdb) print full
$110 = true
So, we decide to free this JOIN.
(gdb) p select_lex->uncacheable
$111 = 0 '\000'
(gdb) p select_lex->master_unit()->uncacheable
$112 = 2 '\002' -- this is UNCACHEABLE_RAND
So, this SELECT is uncacheable while its parent is not...
The "first sibling" of this select is indeed uncacheable:
(gdb) p select_lex->master_unit()->first_select()->uncacheable
$115 = 2 '\002' ## this is the sibling
(gdb) p select_lex->master_unit()->first_select()->next_select()->uncacheable
$116 = 0 '\000' ## this is us:
(gdb) p select_lex->master_unit()->first_select()->next_select() == select_lex
$117 = true
I think this is already wrong. Let's denote this as UNCACHEABLE-SIBLING-ISSUE
Another thing that might be wrong: looking at this SELECT:
(SELECT 1 FROM (SELECT 1 HAVING rand() ) dt1
is it correct that SELECT 1 FROM (...) dt1 has UNCACHEABLE_RAND? Derived
tables are NOT re-computed. (the exceptions are Split-Materialized or recursive CTEs
but they use totally different execution strategies which are not applicable here.
Let's denote this as RAND-PROPAGATES-OUT-OF-DERIVED-ISSUE issue.
Sergei Petrunia
added a comment - - edited I agree with the analysis.
But I don't like the fix:
The fix introduces JOIN::insubq which is checked in addition to the "uncacheable" property.
Also, JOIN::insubq changes during execution. This looks odd - a property that "this JOIN mustn't be freed" looks like something that is static, not dynamic.
Debugging the testcase from here:
https://jira.mariadb.org/browse/MDEV-32403?focusedCommentId=272489&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-272489
without the patch, I see this in JOIN::join_free:
Thread 19 "mysqld" hit Breakpoint 2, JOIN::join_free (this=0x7fff1001e7c8) at /home/psergey/dev-git2/10.5-review-32403/sql
# here:
# bool full= !(select_lex->uncacheable) && !(thd->lex->describe);
(gdb) p dbug_print_select(select_lex)
$109 = 0x555557aac4a0 <dbug_item_print_buf> "select t1.a from t1 semi join (t1) where t1.b = t1.a"
(gdb) n
(gdb) print full
$110 = true
So, we decide to free this JOIN.
(gdb) p select_lex->uncacheable
$111 = 0 '\000'
(gdb) p select_lex->master_unit()->uncacheable
$112 = 2 '\002' -- this is UNCACHEABLE_RAND
So, this SELECT is uncacheable while its parent is not...
The "first sibling" of this select is indeed uncacheable:
(gdb) p select_lex->master_unit()->first_select()->uncacheable
$115 = 2 '\002' ## this is the sibling
(gdb) p select_lex->master_unit()->first_select()->next_select()->uncacheable
$116 = 0 '\000' ## this is us:
(gdb) p select_lex->master_unit()->first_select()->next_select() == select_lex
$117 = true
I think this is already wrong. Let's denote this as UNCACHEABLE-SIBLING-ISSUE
Another thing that might be wrong: looking at this SELECT:
( SELECT 1 FROM ( SELECT 1 HAVING rand() ) dt1
is it correct that SELECT 1 FROM (...) dt1 has UNCACHEABLE_RAND? Derived
tables are NOT re-computed. (the exceptions are Split-Materialized or recursive CTEs
but they use totally different execution strategies which are not applicable here.
Let's denote this as RAND-PROPAGATES-OUT-OF-DERIVED-ISSUE issue.
Sergei Petrunia
added a comment - - edited UNCACHEABLE-SIBLING-ISSUE :
One can construct a testcase for the problem of UNION sibling with UNCACHEABLE_RAND that doesn't use derived tables:
create table t10 ( a int );
insert into t10 values (1),(2),(3);
create table t11 (a int , b int );
insert into t11 select seq, seq from seq_1_to_10;
create table t12 as select * from t11;
insert into t11 select seq, seq from seq_1_to_10000;
alter table t11 add index (a,b);
select
( select b from t11 where a=3333
union
select b from t12 where a = RAND())
from t10;
Thread 19 "mysqld" received signal SIGSEGV, Segmentation fault.
0x0000555555f2f73d in join_read_next_same (info=0x7fff1c0aaf90)
+------+-------------------+------------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------------+------------+------+---------------+------+---------+------+------+-------------+
| 1 | PRIMARY | t10 | ALL | NULL | NULL | NULL | NULL | 3 | |
| 2 | SUBQUERY | t11 | ALL | NULL | NULL | NULL | NULL | 10 | Using where |
| 3 | UNCACHEABLE UNION | t12 | ALL | NULL | NULL | NULL | NULL | 10 | Using where |
| NULL | UNION RESULT | <union2,3> | ALL | NULL | NULL | NULL | NULL | NULL | |
+------+-------------------+------------+------+---------------+------+---------+------+------+-------------+
4 rows in set (0.002 sec)
/* For uncorrelated SELECT in an UNION with some correlated SELECTs */
#define UNCACHEABLE_UNITED 16
There's another similar piece of logic in st_select_lex::optimize_unflattened_subqueries():
if (is_correlated_unit)
{
/*
Some parts of UNION are not correlated. This means we will need to
re-execute the whole UNION every time. Mark all parts of the UNION
as correlated so that they are prepared to be executed multiple
times (if we don't do that, some part of the UNION may free its
execution data at the end of first execution and crash on the second
execution)
*/
for (SELECT_LEX *sl= un->first_select(); sl; sl= sl->next_select())
sl->uncacheable |= UNCACHEABLE_DEPENDENT;
}
This looks like a good place to add the logic that "if one SELECT in the subquery has UNCACHEABLE_RAND then all SELECTs should be marked as uncorrelated".
Sergei Petrunia
added a comment - - edited UNCACHEABLE-SIBLING-ISSUE :
The issue is limited to UNCACHEABLE_RAND flga.
Using the dataset above, let's build a case where one UNION sibling is correlated while the other is not:
select
( select b from t11 where a=3333444
union
select b from t12 where a=t10.a)
from t10;
The query doesn't crash.
EXPLAIN shows that select b from t11 is "uncacheable":
+------+----------------------+------------+------+---------------+------+---------+-------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+----------------------+------------+------+---------------+------+---------+-------+------+-------------+
| 1 | PRIMARY | t10 | ALL | NULL | NULL | NULL | NULL | 3 | |
| 2 | UNCACHEABLE SUBQUERY | t11 | ref | a | a | 5 | const | 1 | Using index |
| 3 | DEPENDENT UNION | t12 | ALL | NULL | NULL | NULL | NULL | 10 | Using where |
| NULL | UNION RESULT | <union2,3> | ALL | NULL | NULL | NULL | NULL | NULL | |
+------+----------------------+------------+------+---------------+------+---------+-------+------+-------------+
It is marked as uncacheable here:
#0 st_select_lex::mark_as_dependent
#1 0x000055555624c554 in mark_as_dependent
#2 0x000055555624e590 in Item_field::fix_outer_field
#3 0x000055555624ede7 in Item_field::fix_fields
#4 0x0000555555d800fb in Item::fix_fields_if_needed
#5 0x00005555562a69f5 in Item_func::fix_fields
#6 0x0000555555d800fb in Item::fix_fields_if_needed
#7 0x0000555555d80129 in Item::fix_fields_if_needed_for_scalar
#8 0x0000555555e0b6bb in Item::fix_fields_if_needed_for_bool
#9 0x0000555555e07e99 in setup_conds
#10 0x0000555555eeffbc in setup_without_group
#11 0x0000555555ef30b6 in JOIN::prepare
#12 0x0000555555fcf8d7 in st_select_lex_unit::prepare_join
#13 0x0000555555fd1608 in st_select_lex_unit::prepare
#14 0x0000555556314f4c in subselect_union_engine::prepare
#15 0x0000555556306fce in Item_subselect::fix_fields
#16 0x0000555555d800fb in Item::fix_fields_if_needed
#17 0x0000555555d80129 in Item::fix_fields_if_needed_for_scalar
#18 0x0000555555e057ac in setup_fields
#19 0x0000555555ef2f93 in JOIN::prepare
for (SELECT_LEX *sl= munit->first_select(); sl ; sl= sl->next_select())
{
if (sl != s &&
!(sl->uncacheable & (UNCACHEABLE_DEPENDENT_GENERATED |
UNCACHEABLE_UNITED)))
sl->uncacheable|= UNCACHEABLE_UNITED;
}
It uses this value:
/* For uncorrelated SELECT in an UNION with some correlated SELECTs */
#define UNCACHEABLE_UNITED 16
There's another similar piece of logic in st_select_lex::optimize_unflattened_subqueries():
if (is_correlated_unit)
{
/*
Some parts of UNION are not correlated. This means we will need to
re-execute the whole UNION every time. Mark all parts of the UNION
as correlated so that they are prepared to be executed multiple
times (if we don't do that, some part of the UNION may free its
execution data at the end of first execution and crash on the second
execution)
*/
for (SELECT_LEX *sl= un->first_select(); sl; sl= sl->next_select())
sl->uncacheable |= UNCACHEABLE_DEPENDENT;
}
This looks like a good place to add the logic that "if one SELECT in the subquery has UNCACHEABLE_RAND then all SELECTs should be marked as uncorrelated".
When I execute this with breakpoint on entry to JOIN::exec(), I can see
JOIN::exec() select_id=1
JOIN::exec() select_id=2
JOIN::exec() select_id=3
JOIN::exec() select_id=2
JOIN::exec() select_id=2
Note that select_id=3 is executed once. select_id=2 is executed many times although that doesn't make any sense. This probably should be addressed in a separate MDEV.
Sergei Petrunia
added a comment - - edited RAND-PROPAGATES-OUT-OF-DERIVED-ISSUE :
A simpler testcase for this
create table t10 ( a int );
insert into t10 values (1),(2),(3);
create table t15 (a int );
insert into t15 values (1),(2);
select
( select count (*)
from ( select * from t15 where a < rand()*10) TBL
)
from t10;
EXPLAIN shows UNCACHEABLE SUBQUERY:
+------+----------------------+------------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+----------------------+------------+------+---------------+------+---------+------+------+-------------+
| 1 | PRIMARY | t10 | ALL | NULL | NULL | NULL | NULL | 3 | |
| 2 | UNCACHEABLE SUBQUERY | <derived3> | ALL | NULL | NULL | NULL | NULL | 2 | |
| 3 | DERIVED | t15 | ALL | NULL | NULL | NULL | NULL | 2 | Using where |
+------+----------------------+------------+------+---------------+------+---------+------+------+-------------+
When I execute this with breakpoint on entry to JOIN::exec(), I can see
JOIN::exec() select_id=1
JOIN::exec() select_id=2
JOIN::exec() select_id=3
JOIN::exec() select_id=2
JOIN::exec() select_id=2
Note that select_id=3 is executed once. select_id=2 is executed many times although that doesn't make any sense. This probably should be addressed in a separate MDEV.
People
Sergei Petrunia
Xin Wen
Votes:
0Vote for this issue
Watchers:
5Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1477,"ttfb":369.40000009536743,"pageVisibility":"visible","entityId":125657,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"3539c6ea-0498-49d2-b7f9-45aff3cb1e16","navigationType":0,"readyForUser":1557.9000000953674,"redirectCount":0,"resourceLoadedEnd":1839.2000002861023,"resourceLoadedStart":375,"resourceTiming":[{"duration":577.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":375,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":375,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":952.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":577.5999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":375.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":375.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":953,"responseStart":0,"secureConnectionStart":0},{"duration":601.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":375.6000003814697,"connectEnd":375.6000003814697,"connectStart":375.6000003814697,"domainLookupEnd":375.6000003814697,"domainLookupStart":375.6000003814697,"fetchStart":375.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":375.6000003814697,"responseEnd":977.3000001907349,"responseStart":977.3000001907349,"secureConnectionStart":375.6000003814697},{"duration":647.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":375.80000019073486,"connectEnd":375.80000019073486,"connectStart":375.80000019073486,"domainLookupEnd":375.80000019073486,"domainLookupStart":375.80000019073486,"fetchStart":375.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":375.80000019073486,"responseEnd":1023,"responseStart":1023,"secureConnectionStart":375.80000019073486},{"duration":651.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":376,"connectEnd":376,"connectStart":376,"domainLookupEnd":376,"domainLookupStart":376,"fetchStart":376,"redirectEnd":0,"redirectStart":0,"requestStart":376,"responseEnd":1027.1000003814697,"responseStart":1027.1000003814697,"secureConnectionStart":376},{"duration":651.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":376.2000002861023,"connectEnd":376.2000002861023,"connectStart":376.2000002861023,"domainLookupEnd":376.2000002861023,"domainLookupStart":376.2000002861023,"fetchStart":376.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":376.2000002861023,"responseEnd":1027.6000003814697,"responseStart":1027.6000003814697,"secureConnectionStart":376.2000002861023},{"duration":651.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":376.40000009536743,"connectEnd":376.40000009536743,"connectStart":376.40000009536743,"domainLookupEnd":376.40000009536743,"domainLookupStart":376.40000009536743,"fetchStart":376.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":376.40000009536743,"responseEnd":1028,"responseStart":1028,"secureConnectionStart":376.40000009536743},{"duration":748.0999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":376.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":376.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1124.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":651.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":376.7000002861023,"connectEnd":376.7000002861023,"connectStart":376.7000002861023,"domainLookupEnd":376.7000002861023,"domainLookupStart":376.7000002861023,"fetchStart":376.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":376.7000002861023,"responseEnd":1028.5,"responseStart":1028.5,"secureConnectionStart":376.7000002861023},{"duration":747.9000000953674,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":376.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":376.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1124.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":652,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":377.1000003814697,"connectEnd":377.1000003814697,"connectStart":377.1000003814697,"domainLookupEnd":377.1000003814697,"domainLookupStart":377.1000003814697,"fetchStart":377.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":377.1000003814697,"responseEnd":1029.1000003814697,"responseStart":1029,"secureConnectionStart":377.1000003814697},{"duration":1432.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":383.2000002861023,"connectEnd":383.2000002861023,"connectStart":383.2000002861023,"domainLookupEnd":383.2000002861023,"domainLookupStart":383.2000002861023,"fetchStart":383.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":383.2000002861023,"responseEnd":1815.3000001907349,"responseStart":1815.3000001907349,"secureConnectionStart":383.2000002861023},{"duration":1422.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":396.7000002861023,"connectEnd":396.7000002861023,"connectStart":396.7000002861023,"domainLookupEnd":396.7000002861023,"domainLookupStart":396.7000002861023,"fetchStart":396.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":396.7000002861023,"responseEnd":1819,"responseStart":1819,"secureConnectionStart":396.7000002861023},{"duration":194.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1137.1000003814697,"connectEnd":1137.1000003814697,"connectStart":1137.1000003814697,"domainLookupEnd":1137.1000003814697,"domainLookupStart":1137.1000003814697,"fetchStart":1137.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1137.1000003814697,"responseEnd":1331.2000002861023,"responseStart":1331.2000002861023,"secureConnectionStart":1137.1000003814697},{"duration":416.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1406,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1406,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1822.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":426,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1407.1000003814697,"connectEnd":1407.1000003814697,"connectStart":1407.1000003814697,"domainLookupEnd":1407.1000003814697,"domainLookupStart":1407.1000003814697,"fetchStart":1407.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1407.1000003814697,"responseEnd":1833.1000003814697,"responseStart":1833.1000003814697,"secureConnectionStart":1407.1000003814697},{"duration":422.09999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1463.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1463.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1886,"responseStart":0,"secureConnectionStart":0},{"duration":431.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1407.5,"connectEnd":1407.5,"connectStart":1407.5,"domainLookupEnd":1407.5,"domainLookupStart":1407.5,"fetchStart":1407.5,"redirectEnd":0,"redirectStart":0,"requestStart":1407.5,"responseEnd":1839.2000002861023,"responseStart":1839.2000002861023,"secureConnectionStart":1407.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":169,"responseStart":369,"responseEnd":396,"domLoading":373,"domInteractive":1888,"domContentLoadedEventStart":1888,"domContentLoadedEventEnd":1963,"domComplete":2614,"loadEventStart":2614,"loadEventEnd":2615,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1825.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1826.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":1827},{"name":"bigPipe.activity-panel-pipe-id.end","time":1837.2000002861023},{"name":"activityTabFullyLoaded","time":1986.6000003814697}],"measures":[],"correlationId":"f963b829ea8450","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":129,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thank you for the report!
I repeated on 10.4-11.2.
231023 17:56:45 [ERROR] mysqld got signal 11 ;
Server version: 10.4.32-MariaDB-debug-log source revision: babd833685e1fd1da4411a0874ba1c98bb0b631d
sql/signal_handler.cc:238(handle_fatal_signal)[0x5652c5021ca1]
sigaction.c:0(__restore_rt)[0x7f117b54d420]
sql/sql_select.cc:21794(test_if_quick_select(st_join_table*))[0x5652c49b462c]
sql/sql_select.cc:21770(join_init_quick_read_record(st_join_table*))[0x5652c49b4395]
sql/sql_select.cc:20899(sub_select(JOIN*, st_join_table*, bool))[0x5652c49ae1ce]
sql/sql_select.cc:21129(evaluate_join_record(JOIN*, st_join_table*, int))[0x5652c49afa55]
sql/sql_select.cc:20902(sub_select(JOIN*, st_join_table*, bool))[0x5652c49ae38a]
sql/sql_select.cc:20423(do_select(JOIN*, Procedure*))[0x5652c49ac130]
sql/sql_select.cc:4605(JOIN::exec_inner())[0x5652c4939c78]
sql/sql_select.cc:4388(JOIN::exec())[0x5652c49372a8]
sql/sql_union.cc:1603(st_select_lex_unit::exec())[0x5652c4b301ec]
sql/item_subselect.cc:4060(subselect_union_engine::exec())[0x5652c527d373]
sql/item_subselect.cc:758(Item_subselect::exec())[0x5652c5257a78]
sql/item_subselect.cc:1422(Item_singlerow_subselect::val_str(String*))[0x5652c525df81]
sql/sql_type.cc:7104(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x5652c4df0822]
sql/sql_type.h:4980(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x5652c4e0b216]
sql/item.h:1045(Item::send(Protocol*, st_value*))[0x5652c45a25e4]
sql/protocol.cc:1038(Protocol::send_result_set_row(List<Item>*))[0x5652c4593f63]
sql/sql_class.cc:3139(select_send::send_data(List<Item>&))[0x5652c4746d51]
sql/sql_select.cc:22098(end_send(JOIN*, st_join_table*, bool))[0x5652c49b76a7]
sql/sql_select.cc:21129(evaluate_join_record(JOIN*, st_join_table*, int))[0x5652c49afa55]
sql/sql_select.cc:20941(sub_select(JOIN*, st_join_table*, bool))[0x5652c49ae9f0]
sql/sql_select.cc:20423(do_select(JOIN*, Procedure*))[0x5652c49ac130]
sql/sql_select.cc:4605(JOIN::exec_inner())[0x5652c4939c78]
sql/sql_select.cc:4388(JOIN::exec())[0x5652c49372a8]
sql/sql_select.cc:4828(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x5652c493b484]
sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5652c490bf7c]
sql/sql_parse.cc:6475(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5652c4877d80]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x5652c48654f7]
sql/sql_parse.cc:8012(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5652c488125b]
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5652c4857681]
sql/sql_parse.cc:1378(do_command(THD*))[0x5652c48541ac]
sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x5652c4c6256d]
sql/sql_connect.cc:1325(handle_one_connection)[0x5652c4c61e11]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x5652c590cd8a]
nptl/pthread_create.c:478(start_thread)[0x7f117b541609]
Query (0x62b0000a1290): SELECT
(SELECT 1 FROM (SELECT 1 HAVING rand() ) dt1
union
SELECT a FROM t1 WHERE b IN (SELECT a FROM t1) LIMIT 1)
FROM t1
without index -> MDEV-32290 :
Version: '10.4.32-MariaDB-debug-log'
mysqld: /10.4/src/sql/sql_select.cc:20659: enum_nested_loop_state sub_select_cache(JOIN*, JOIN_TAB*, bool): Assertion `cache != __null' failed.
231023 17:57:36 [ERROR] mysqld got signal 6 ;
Server version: 10.4.32-MariaDB-debug-log source revision: babd833685e1fd1da4411a0874ba1c98bb0b631d
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f214181a00b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f21417f9859]
/lib/x86_64-linux-gnu/libc.so.6(+0x22729)[0x7f21417f9729]
/lib/x86_64-linux-gnu/libc.so.6(+0x33fd6)[0x7f214180afd6]
sql/sql_select.cc:20661(sub_select_cache(JOIN*, st_join_table*, bool))[0x557a68749341]
sql/sql_select.cc:21129(evaluate_join_record(JOIN*, st_join_table*, int))[0x557a6874ba55]
sql/sql_select.cc:20902(sub_select(JOIN*, st_join_table*, bool))[0x557a6874a38a]
sql/sql_select.cc:20423(do_select(JOIN*, Procedure*))[0x557a68748130]
sql/sql_select.cc:4605(JOIN::exec_inner())[0x557a686d5c78]
sql/sql_select.cc:4388(JOIN::exec())[0x557a686d32a8]
sql/sql_union.cc:1603(st_select_lex_unit::exec())[0x557a688cc1ec]
sql/item_subselect.cc:4060(subselect_union_engine::exec())[0x557a69019373]
sql/item_subselect.cc:758(Item_subselect::exec())[0x557a68ff3a78]
sql/item_subselect.cc:1422(Item_singlerow_subselect::val_str(String*))[0x557a68ff9f81]
sql/sql_type.cc:7104(Type_handler::Item_send_str(Item*, Protocol*, st_value*) const)[0x557a68b8c822]
sql/sql_type.h:4980(Type_handler_string_result::Item_send(Item*, Protocol*, st_value*) const)[0x557a68ba7216]
sql/item.h:1045(Item::send(Protocol*, st_value*))[0x557a6833e5e4]
sql/protocol.cc:1038(Protocol::send_result_set_row(List<Item>*))[0x557a6832ff63]
sql/sql_class.cc:3139(select_send::send_data(List<Item>&))[0x557a684e2d51]
sql/sql_select.cc:22098(end_send(JOIN*, st_join_table*, bool))[0x557a687536a7]
sql/sql_select.cc:21129(evaluate_join_record(JOIN*, st_join_table*, int))[0x557a6874ba55]
sql/sql_select.cc:20941(sub_select(JOIN*, st_join_table*, bool))[0x557a6874a9f0]
sql/sql_select.cc:20423(do_select(JOIN*, Procedure*))[0x557a68748130]
sql/sql_select.cc:4605(JOIN::exec_inner())[0x557a686d5c78]
sql/sql_select.cc:4388(JOIN::exec())[0x557a686d32a8]
sql/sql_select.cc:4828(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x557a686d7484]
sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x557a686a7f7c]
sql/sql_parse.cc:6475(execute_sqlcom_select(THD*, TABLE_LIST*))[0x557a68613d80]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x557a686014f7]
sql/sql_parse.cc:8012(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x557a6861d25b]
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x557a685f3681]
sql/sql_parse.cc:1378(do_command(THD*))[0x557a685f01ac]
sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x557a689fe56d]
sql/sql_connect.cc:1325(handle_one_connection)[0x557a689fde11]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x557a696a8d8a]
nptl/pthread_create.c:478(start_thread)[0x7f2141d25609]
Query (0x62b0000a1290): SELECT
(SELECT 1 FROM (SELECT 1 HAVING rand() ) dt1
union
SELECT a FROM t1 WHERE b IN (SELECT a FROM t1) LIMIT 1)
FROM t1
with int instead of text ->
MDEV-32397:Version: '10.4.32-MariaDB-debug-log'
mysqld: /10.4/src/sql/sql_select.cc:21905: int join_read_first(JOIN_TAB*): Assertion `table->no_keyread || !table->covering_keys.is_set(tab->index) || table->file->keyread == tab->index' failed.
231023 17:58:08 [ERROR] mysqld got signal 6 ;
Server version: 10.4.32-MariaDB-debug-log source revision: babd833685e1fd1da4411a0874ba1c98bb0b631d
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f4ad857a00b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f4ad8559859]
/lib/x86_64-linux-gnu/libc.so.6(+0x22729)[0x7f4ad8559729]
/lib/x86_64-linux-gnu/libc.so.6(+0x33fd6)[0x7f4ad856afd6]
sql/sql_select.cc:21908(join_read_first(st_join_table*))[0x55bf58a95af7]
sql/sql_select.cc:20899(sub_select(JOIN*, st_join_table*, bool))[0x55bf58a8e1ce]
sql/opt_subselect.cc:5712(join_tab_execution_startup(st_join_table*))[0x55bf58e45933]
sql/sql_select.cc:20891(sub_select(JOIN*, st_join_table*, bool))[0x55bf58a8e08a]
sql/sql_select.cc:21129(evaluate_join_record(JOIN*, st_join_table*, int))[0x55bf58a8fa55]
sql/sql_select.cc:20902(sub_select(JOIN*, st_join_table*, bool))[0x55bf58a8e38a]
sql/sql_select.cc:20423(do_select(JOIN*, Procedure*))[0x55bf58a8c130]
sql/sql_select.cc:4605(JOIN::exec_inner())[0x55bf58a19c78]
sql/sql_select.cc:4388(JOIN::exec())[0x55bf58a172a8]
sql/sql_union.cc:1603(st_select_lex_unit::exec())[0x55bf58c101ec]
sql/item_subselect.cc:4060(subselect_union_engine::exec())[0x55bf5935d373]
sql/item_subselect.cc:758(Item_subselect::exec())[0x55bf59337a78]
sql/item_subselect.cc:1400(Item_singlerow_subselect::val_int())[0x55bf5933d9e1]
sql/sql_type.cc:7137(Type_handler::Item_send_long(Item*, Protocol*, st_value*) const)[0x55bf58ed0e6c]
sql/sql_type.h:5198(Type_handler_long::Item_send(Item*, Protocol*, st_value*) const)[0x55bf58eeb578]
sql/item.h:1045(Item::send(Protocol*, st_value*))[0x55bf586825e4]
sql/protocol.cc:1038(Protocol::send_result_set_row(List<Item>*))[0x55bf58673f63]
sql/sql_class.cc:3139(select_send::send_data(List<Item>&))[0x55bf58826d51]
sql/sql_select.cc:22098(end_send(JOIN*, st_join_table*, bool))[0x55bf58a976a7]
sql/sql_select.cc:21129(evaluate_join_record(JOIN*, st_join_table*, int))[0x55bf58a8fa55]
sql/sql_select.cc:20941(sub_select(JOIN*, st_join_table*, bool))[0x55bf58a8e9f0]
sql/sql_select.cc:20423(do_select(JOIN*, Procedure*))[0x55bf58a8c130]
sql/sql_select.cc:4605(JOIN::exec_inner())[0x55bf58a19c78]
sql/sql_select.cc:4388(JOIN::exec())[0x55bf58a172a8]
sql/sql_select.cc:4828(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55bf58a1b484]
sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55bf589ebf7c]
sql/sql_parse.cc:6475(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55bf58957d80]
sql/sql_parse.cc:3978(mysql_execute_command(THD*))[0x55bf589454f7]
sql/sql_parse.cc:8012(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55bf5896125b]
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55bf58937681]
sql/sql_parse.cc:1378(do_command(THD*))[0x55bf589341ac]
sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x55bf58d4256d]
sql/sql_connect.cc:1325(handle_one_connection)[0x55bf58d41e11]
perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55bf599ecd8a]
nptl/pthread_create.c:478(start_thread)[0x7f4ad8a85609]
Query (0x62b0000a1290): SELECT
(SELECT 1 FROM (SELECT 1 HAVING rand() ) dt1
union
SELECT a FROM t1 WHERE b IN (SELECT a FROM t1) LIMIT 1)
FROM t1