#9 0x00007fc497253df2 in __GI___assert_fail (assertion=0x55b58203ea60 "!derived->is_excluded()", file=0x55b582039240 "/data/src/10.4/sql/table.cc", line=6470, function=0x55b58203ea00 "void TABLE_LIST::set_check_materialized()") at ./assert/assert.c:101
#10 0x000055b58023deb4 in TABLE_LIST::set_check_materialized (this=0x62b00008e4f8) at /data/src/10.4/sql/table.cc:6470
#11 0x000055b57fdaa1ff in TABLE_LIST::set_materialized_derived (this=0x62b00008e4f8) at /data/src/10.4/sql/table.h:2883
#12 0x000055b580253187 in TABLE_LIST::init_derived (this=0x62b00008e4f8, thd=0x62b00005b208, init_view=true) at /data/src/10.4/sql/table.cc:9241
#13 0x000055b57fe3821e in mysql_derived_init (thd=0x62b00005b208, lex=0x62b00008c238, derived=0x62b00008e4f8) at /data/src/10.4/sql/sql_derived.cc:564
#14 0x000055b57fe35aec in mysql_handle_derived (lex=0x62b00008c238, phases=1) at /data/src/10.4/sql/sql_derived.cc:123
#15 0x000055b57fd8e8de in open_and_lock_tables (thd=0x62b00005b208, options=..., tables=0x62b00008e4f8, derived=true, flags=0, prelocking_strategy=0x7fc48f4daa00) at /data/src/10.4/sql/sql_base.cc:5353
#16 0x000055b57fce8616 in open_and_lock_tables (thd=0x62b00005b208, tables=0x62b00008e4f8, derived=true, flags=0) at /data/src/10.4/sql/sql_base.h:503
#17 0x000055b57ff216a3 in execute_sqlcom_select (thd=0x62b00005b208, all_tables=0x62b00008e4f8) at /data/src/10.4/sql/sql_parse.cc:6384
#18 0x000055b57ff0f638 in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:3966
#19 0x000055b57ff7ee7f in Prepared_statement::execute (this=0x619000084388, expanded_query=0x7fc48f4dcb30, open_cursor=false) at /data/src/10.4/sql/sql_prepare.cc:5024
#20 0x000055b57ff7a4bf in Prepared_statement::execute_loop (this=0x619000084388, expanded_query=0x7fc48f4dcb30, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/10.4/sql/sql_prepare.cc:4493
#21 0x000055b57ff74335 in mysql_sql_stmt_execute (thd=0x62b00005b208) at /data/src/10.4/sql/sql_prepare.cc:3577
#22 0x000055b57ff0f67d in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:3982
#23 0x000055b57ff2b2fb in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "EXECUTE stmt", length=12, parser_state=0x7fc48f4de860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7998
#24 0x000055b57ff017a7 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x62900023f209 "EXECUTE stmt", packet_length=12, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
#25 0x000055b57fefe320 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
#26 0x000055b5802fc31c in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
#27 0x000055b5802fbc33 in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
#28 0x000055b580f6674c in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#29 0x00007fc4972a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#30 0x00007fc4973285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
10.4 c6ef9b1c non-debug
#2 <signal handler called>
#3 0x000055871ef47ec6 in st_select_lex::mark_as_dependent (this=this@entry=0x7fb77407e478, thd=thd@entry=0x7fb774000c58, last=last@entry=0x7fb77407e478, dependency=0x7fb77407e950) at /data/src/10.4/sql/sql_lex.cc:2831
#4 0x000055871f18ce00 in mark_as_dependent (thd=thd@entry=0x7fb774000c58, last=0x7fb77407e478, current=0x7fb77407e478, resolved_item=resolved_item@entry=0x7fb77407e950, mark_item=<optimized out>, suppress_warning_output=suppress_warning_output@entry=false) at /data/src/10.4/sql/item.cc:5119
#5 0x000055871f19d88d in Item_field::fix_outer_field (this=this@entry=0x7fb77407e950, thd=thd@entry=0x7fb774000c58, from_field=from_field@entry=0x7fb784c8f9d0, reference=reference@entry=0x7fb7741283e8) at /data/src/10.4/sql/item.cc:5810
#6 0x000055871f19e347 in Item_field::fix_fields (this=0x7fb77407e950, thd=0x7fb774000c58, reference=0x7fb7741283e8) at /data/src/10.4/sql/item.cc:6013
#7 0x000055871f19f06c in Item::fix_fields_if_needed (ref=0x7fb7741283e8, thd=0x7fb774000c58, this=0x7fb77407e950) at /data/src/10.4/sql/item.h:964
#8 Item::fix_fields_if_needed (ref=0x7fb7741283e8, thd=0x7fb774000c58, this=0x7fb77407e950) at /data/src/10.4/sql/item.h:964
#9 Item_direct_view_ref::fix_fields (this=0x7fb7740883b0, thd=0x7fb774000c58, reference=0x7fb77407bb50) at /data/src/10.4/sql/item.cc:9071
#10 0x000055871ef0eac9 in Item::fix_fields_if_needed (ref=0x7fb77407bb50, thd=0x7fb774000c58, this=0x7fb7740883b0) at /data/src/10.4/sql/item.h:966
#11 Item::fix_fields_if_needed (ref=0x7fb77407bb50, thd=0x7fb774000c58, this=0x7fb7740883b0) at /data/src/10.4/sql/item.h:964
#12 Item::fix_fields_if_needed_for_scalar (ref=0x7fb77407bb50, thd=0x7fb774000c58, this=0x7fb7740883b0) at /data/src/10.4/sql/item.h:970
#16 0x000055871efdb904 in handle_select (thd=thd@entry=0x7fb774000c58, lex=lex@entry=0x7fb774079928, result=result@entry=0x7fb77407e348, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.4/sql/sql_select.cc:442
#17 0x000055871ef637a0 in execute_sqlcom_select (thd=thd@entry=0x7fb774000c58, all_tables=0x7fb77407bb90) at /data/src/10.4/sql/sql_parse.cc:6463
#18 0x000055871ef720bb in mysql_execute_command (thd=0x7fb774000c58) at /data/src/10.4/sql/sql_parse.cc:3966
#19 0x000055871ef89c66 in Prepared_statement::execute (this=this@entry=0x7fb774115338, expanded_query=expanded_query@entry=0x7fb784c91350, open_cursor=open_cursor@entry=false) at /data/src/10.4/sql/sql_prepare.cc:5024
#20 0x000055871ef89de5 in Prepared_statement::execute_loop (packet=<optimized out>, packet_end=<optimized out>, open_cursor=<optimized out>, expanded_query=0x7fb784c91350, this=0x7fb774115338) at /data/src/10.4/sql/sql_prepare.cc:4493
at /home/sanja/maria/git/10.4/sql/sql_select.cc:442
#10 0x000055c03dac3198 in execute_sqlcom_select (thd=0x7f5ffc000da0,
all_tables=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_parse.cc:6463
#11 0x000055c03dab9656 in mysql_execute_command (thd=0x7f5ffc000da0)
at /home/sanja/maria/git/10.4/sql/sql_parse.cc:3966
#12 0x000055c03daeb6df in Prepared_statement::execute (this=0x7f5ffc197a60,
expanded_query=0x7f600d793940, open_cursor=false)
Oleksandr Byelkin
added a comment - It is assert that derived is not excluded here:
#7 0x000055c03dc0c8b9 in TABLE_LIST::set_check_materialized (
this=0x7f5ffc0d7a08) at /home/sanja/maria/git/10.4/sql/table.cc:6470
#8 0x000055c03da1a07b in TABLE_LIST::set_materialized_derived (
this=0x7f5ffc0d7a08) at /home/sanja/maria/git/10.4/sql/table.h:2883
#9 0x000055c03dc14e40 in TABLE_LIST::init_derived (this=0x7f5ffc0d7a08,
thd=0x7f5ffc000da0, init_view=true)
at /home/sanja/maria/git/10.4/sql/table.cc:9241
#10 0x000055c03da59446 in mysql_derived_init (thd=0x7f5ffc000da0,
lex=0x7f5ffc0d57a0, derived=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:564
#11 0x000055c03da5836c in mysql_handle_derived (lex=0x7f5ffc0d57a0, phases=1)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:123
#12 0x000055c03da0da8f in open_and_lock_tables (thd=0x7f5ffc000da0,
options=..., tables=0x7f5ffc0d7a08, derived=true, flags=0,
prelocking_strategy=0x7f600d7929d0)
at /home/sanja/maria/git/10.4/sql/sql_base.cc:5353
#13 0x000055c03d9c080d in open_and_lock_tables (thd=0x7f5ffc000da0,
tables=0x7f5ffc0d7a08, derived=true, flags=0)
at /home/sanja/maria/git/10.4/sql/sql_base.h:503
#14 0x000055c03dac2c77 in execute_sqlcom_select (thd=0x7f5ffc000da0,
all_tables=0x7f5ffc0d7a08)
the derived is in deed excluded, and it had happened here:
#0 0x000055c03da80084 in st_select_lex_unit::exclude_level (
this=0x7f5ffc09dce8) at /home/sanja/maria/git/10.4/sql/sql_lex.cc:2746
#1 0x000055c03da58b06 in mysql_derived_merge (thd=0x7f5ffc000da0,
lex=0x7f5ffc0d57a0, derived=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:417
#2 0x000055c03da5869f in mysql_handle_single_derived (lex=0x7f5ffc0d57a0,
derived=0x7f5ffc0d7a08, phases=8)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:200
#3 0x000055c03dc1497b in TABLE_LIST::handle_derived (this=0x7f5ffc0d7a08,
lex=0x7f5ffc0d57a0, phases=8)
at /home/sanja/maria/git/10.4/sql/table.cc:9090
#4 0x000055c03da75d75 in LEX::handle_list_of_derived (this=0x7f5ffc0d57a0,
table_list=0x7f5ffc0d7a08, phases=8)
at /home/sanja/maria/git/10.4/sql/sql_lex.h:4388
#5 0x000055c03da830e6 in st_select_lex::handle_derived (this=0x7f5ffc0d73f8,
lex=0x7f5ffc0d57a0, phases=8)
at /home/sanja/maria/git/10.4/sql/sql_lex.cc:4309
#6 0x000055c03db09a1f in JOIN::optimize_inner (this=0x7f5ffc014a68)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:1910
#7 0x000055c03db08e56 in JOIN::optimize (this=0x7f5ffc014a68)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:1690
#8 0x000055c03db14d72 in mysql_select (thd=0x7f5ffc000da0,
tables=0x7f5ffc0d7a08, wild_num=0, fields=..., conds=0x0, og_num=0,
order=0x0, group=0x0, having=0x7f5ffc1912a8, proc_param=0x0,
select_options=2416184064, result=0x7f5ffc0da1c0, unit=0x7f5ffc0d5860,
select_lex=0x7f5ffc0d73f8)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:4797
#9 0x000055c03db033eb in handle_select (thd=0x7f5ffc000da0,
lex=0x7f5ffc0d57a0, result=0x7f5ffc0da1c0, setup_tables_done_option=0)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:442
#10 0x000055c03dac3198 in execute_sqlcom_select (thd=0x7f5ffc000da0,
all_tables=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_parse.cc:6463
#11 0x000055c03dab9656 in mysql_execute_command (thd=0x7f5ffc000da0)
at /home/sanja/maria/git/10.4/sql/sql_parse.cc:3966
#12 0x000055c03daeb6df in Prepared_statement::execute (this=0x7f5ffc197a60,
expanded_query=0x7f600d793940, open_cursor=false)
/* A subquery might be forced to be materialized due to a side-effect. */
if (!is_materialized_derived() && unit->can_be_merged() &&
Oleksandr Byelkin
added a comment -
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index 8c31545eb84..97d19aa2690 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -6956,4 +6956,22 @@ create algorithm=merge view v as
select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
ERROR 42S22: Unknown column 'd' in 'field list'
drop table t1,t2,t3;
+#
+# MDEV-31189: Server crash or assertion failure in upon 2nd
+# execution of PS with views and HAVING
+#
+CREATE TABLE t (f INT);
+INSERT INTO t VALUES (1),(2);
+CREATE VIEW v1 AS SELECT 1 AS a;
+CREATE VIEW v2 AS SELECT a FROM v1;
+PREPARE stmt FROM "SELECT * FROM v2 HAVING 1 IN (SELECT f FROM t)";
+EXECUTE stmt;
+a
+1
+EXECUTE stmt;
+a
+1
+DROP VIEW v1;
+DROP VIEW v2;
+DROP TABLE t;
# End of 10.4 tests
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 0e2dce1fb70..385ca523436 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -6696,4 +6696,23 @@ create algorithm=merge view v as
drop table t1,t2,t3;
+--echo #
+--echo # MDEV-31189: Server crash or assertion failure in upon 2nd
+--echo # execution of PS with views and HAVING
+--echo #
+
+CREATE TABLE t (f INT);
+INSERT INTO t VALUES (1),(2); # Optional, fails either way
+CREATE VIEW v1 AS SELECT 1 AS a;
+CREATE VIEW v2 AS SELECT a FROM v1;
+
+PREPARE stmt FROM "SELECT * FROM v2 HAVING 1 IN (SELECT f FROM t)";
+EXECUTE stmt;
+EXECUTE stmt;
+
+# Cleanup
+DROP VIEW v1;
+DROP VIEW v2;
+DROP TABLE t;
+
--echo # End of 10.4 tests
diff --git a/sql/table.cc b/sql/table.cc
index 15a92818b81..0f296a85e58 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -9163,8 +9163,13 @@ void TABLE_LIST::wrap_into_nested_join(List<TABLE_LIST> &join_list)
static inline bool derived_table_optimization_done(TABLE_LIST *table)
{
- return table->derived &&
- (table->derived->is_excluded() ||
+ SELECT_LEX_UNIT *derived= (table->derived ?
+ table->derived :
+ (table->view ?
+ &table->view->unit:
+ NULL));
+ return derived &&
+ (derived->is_excluded() ||
table->is_materialized_derived());
}
@@ -9226,8 +9231,7 @@ bool TABLE_LIST::init_derived(THD *thd, bool init_view)
set_derived();
}
- if (is_view() ||
- !derived_table_optimization_done(this))
+ if (!derived_table_optimization_done(this))
{
/* A subquery might be forced to be materialized due to a side-effect. */
if (!is_materialized_derived() && unit->can_be_merged() &&
People
Oleksandr Byelkin
Elena Stepanova
Votes:
1Vote for this issue
Watchers:
7Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":985.4000000953674,"ttfb":187.5,"pageVisibility":"visible","entityId":121588,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"08448eea-5183-4cda-bda7-b06e9e9007fd","navigationType":0,"readyForUser":1077,"redirectCount":0,"resourceLoadedEnd":1387.0999999046326,"resourceLoadedStart":193.5,"resourceTiming":[{"duration":328.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":193.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":193.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":522.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":328.69999980926514,"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":193.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":193.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":522.5,"responseStart":0,"secureConnectionStart":0},{"duration":338.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":193.90000009536743,"connectEnd":193.90000009536743,"connectStart":193.90000009536743,"domainLookupEnd":193.90000009536743,"domainLookupStart":193.90000009536743,"fetchStart":193.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":193.90000009536743,"responseEnd":532.0999999046326,"responseStart":532.0999999046326,"secureConnectionStart":193.90000009536743},{"duration":400.1000003814697,"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":194.09999990463257,"connectEnd":194.09999990463257,"connectStart":194.09999990463257,"domainLookupEnd":194.09999990463257,"domainLookupStart":194.09999990463257,"fetchStart":194.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":194.09999990463257,"responseEnd":594.2000002861023,"responseStart":594.2000002861023,"secureConnectionStart":194.09999990463257},{"duration":403.69999980926514,"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":194.40000009536743,"connectEnd":194.40000009536743,"connectStart":194.40000009536743,"domainLookupEnd":194.40000009536743,"domainLookupStart":194.40000009536743,"fetchStart":194.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":194.40000009536743,"responseEnd":598.0999999046326,"responseStart":598,"secureConnectionStart":194.40000009536743},{"duration":404,"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":194.5,"connectEnd":194.5,"connectStart":194.5,"domainLookupEnd":194.5,"domainLookupStart":194.5,"fetchStart":194.5,"redirectEnd":0,"redirectStart":0,"requestStart":194.5,"responseEnd":598.5,"responseStart":598.5,"secureConnectionStart":194.5},{"duration":404.19999980926514,"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":194.7000002861023,"connectEnd":194.7000002861023,"connectStart":194.7000002861023,"domainLookupEnd":194.7000002861023,"domainLookupStart":194.7000002861023,"fetchStart":194.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":194.7000002861023,"responseEnd":598.9000000953674,"responseStart":598.9000000953674,"secureConnectionStart":194.7000002861023},{"duration":477.90000009536743,"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":195,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":195,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":672.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":404.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":195.09999990463257,"connectEnd":195.09999990463257,"connectStart":195.09999990463257,"domainLookupEnd":195.09999990463257,"domainLookupStart":195.09999990463257,"fetchStart":195.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":195.09999990463257,"responseEnd":599.4000000953674,"responseStart":599.4000000953674,"secureConnectionStart":195.09999990463257},{"duration":477.7999997138977,"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":195.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":195.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":673,"responseStart":0,"secureConnectionStart":0},{"duration":404.5,"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":195.40000009536743,"connectEnd":195.40000009536743,"connectStart":195.40000009536743,"domainLookupEnd":195.40000009536743,"domainLookupStart":195.40000009536743,"fetchStart":195.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":195.40000009536743,"responseEnd":599.9000000953674,"responseStart":599.9000000953674,"secureConnectionStart":195.40000009536743},{"duration":618,"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":196.09999990463257,"connectEnd":196.09999990463257,"connectStart":196.09999990463257,"domainLookupEnd":196.09999990463257,"domainLookupStart":196.09999990463257,"fetchStart":196.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":196.09999990463257,"responseEnd":814.0999999046326,"responseStart":814,"secureConnectionStart":196.09999990463257},{"duration":1163.9000000953674,"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":203.80000019073486,"connectEnd":203.80000019073486,"connectStart":203.80000019073486,"domainLookupEnd":203.80000019073486,"domainLookupStart":203.80000019073486,"fetchStart":203.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":203.80000019073486,"responseEnd":1367.7000002861023,"responseStart":1367.7000002861023,"secureConnectionStart":203.80000019073486},{"duration":156.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":701.2000002861023,"connectEnd":701.2000002861023,"connectStart":701.2000002861023,"domainLookupEnd":701.2000002861023,"domainLookupStart":701.2000002861023,"fetchStart":701.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":701.2000002861023,"responseEnd":857.7000002861023,"responseStart":857.7000002861023,"secureConnectionStart":701.2000002861023},{"duration":446.5,"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":940.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":940.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1387.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":431.5,"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":941.4000000953674,"connectEnd":941.4000000953674,"connectStart":941.4000000953674,"domainLookupEnd":941.4000000953674,"domainLookupStart":941.4000000953674,"fetchStart":941.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":941.4000000953674,"responseEnd":1372.9000000953674,"responseStart":1372.9000000953674,"secureConnectionStart":941.4000000953674},{"duration":437.5,"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":941.8000001907349,"connectEnd":941.8000001907349,"connectStart":941.8000001907349,"domainLookupEnd":941.8000001907349,"domainLookupStart":941.8000001907349,"fetchStart":941.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":941.8000001907349,"responseEnd":1379.3000001907349,"responseStart":1379.3000001907349,"secureConnectionStart":941.8000001907349},{"duration":514.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":979.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":979.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1493.8000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":8,"responseStart":188,"responseEnd":204,"domLoading":191,"domInteractive":1432,"domContentLoadedEventStart":1432,"domContentLoadedEventEnd":1488,"domComplete":1721,"loadEventStart":1721,"loadEventEnd":1722,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1394.2000002861023},{"name":"bigPipe.sidebar-id.end","time":1395},{"name":"bigPipe.activity-panel-pipe-id.start","time":1395.2000002861023},{"name":"bigPipe.activity-panel-pipe-id.end","time":1399.5},{"name":"activityTabFullyLoaded","time":1504.8000001907349}],"measures":[],"correlationId":"6e3a7a3edf6a6c","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
It is assert that derived is not excluded here:
#7 0x000055c03dc0c8b9 in TABLE_LIST::set_check_materialized (
this=0x7f5ffc0d7a08) at /home/sanja/maria/git/10.4/sql/table.cc:6470
#8 0x000055c03da1a07b in TABLE_LIST::set_materialized_derived (
this=0x7f5ffc0d7a08) at /home/sanja/maria/git/10.4/sql/table.h:2883
#9 0x000055c03dc14e40 in TABLE_LIST::init_derived (this=0x7f5ffc0d7a08,
thd=0x7f5ffc000da0, init_view=true)
at /home/sanja/maria/git/10.4/sql/table.cc:9241
#10 0x000055c03da59446 in mysql_derived_init (thd=0x7f5ffc000da0,
lex=0x7f5ffc0d57a0, derived=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:564
#11 0x000055c03da5836c in mysql_handle_derived (lex=0x7f5ffc0d57a0, phases=1)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:123
#12 0x000055c03da0da8f in open_and_lock_tables (thd=0x7f5ffc000da0,
options=..., tables=0x7f5ffc0d7a08, derived=true, flags=0,
prelocking_strategy=0x7f600d7929d0)
at /home/sanja/maria/git/10.4/sql/sql_base.cc:5353
#13 0x000055c03d9c080d in open_and_lock_tables (thd=0x7f5ffc000da0,
tables=0x7f5ffc0d7a08, derived=true, flags=0)
at /home/sanja/maria/git/10.4/sql/sql_base.h:503
#14 0x000055c03dac2c77 in execute_sqlcom_select (thd=0x7f5ffc000da0,
all_tables=0x7f5ffc0d7a08)
the derived is in deed excluded, and it had happened here:
#0 0x000055c03da80084 in st_select_lex_unit::exclude_level (
this=0x7f5ffc09dce8) at /home/sanja/maria/git/10.4/sql/sql_lex.cc:2746
#1 0x000055c03da58b06 in mysql_derived_merge (thd=0x7f5ffc000da0,
lex=0x7f5ffc0d57a0, derived=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:417
#2 0x000055c03da5869f in mysql_handle_single_derived (lex=0x7f5ffc0d57a0,
derived=0x7f5ffc0d7a08, phases=8)
at /home/sanja/maria/git/10.4/sql/sql_derived.cc:200
#3 0x000055c03dc1497b in TABLE_LIST::handle_derived (this=0x7f5ffc0d7a08,
lex=0x7f5ffc0d57a0, phases=8)
at /home/sanja/maria/git/10.4/sql/table.cc:9090
#4 0x000055c03da75d75 in LEX::handle_list_of_derived (this=0x7f5ffc0d57a0,
table_list=0x7f5ffc0d7a08, phases=8)
at /home/sanja/maria/git/10.4/sql/sql_lex.h:4388
#5 0x000055c03da830e6 in st_select_lex::handle_derived (this=0x7f5ffc0d73f8,
lex=0x7f5ffc0d57a0, phases=8)
at /home/sanja/maria/git/10.4/sql/sql_lex.cc:4309
#6 0x000055c03db09a1f in JOIN::optimize_inner (this=0x7f5ffc014a68)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:1910
#7 0x000055c03db08e56 in JOIN::optimize (this=0x7f5ffc014a68)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:1690
#8 0x000055c03db14d72 in mysql_select (thd=0x7f5ffc000da0,
tables=0x7f5ffc0d7a08, wild_num=0, fields=..., conds=0x0, og_num=0,
order=0x0, group=0x0, having=0x7f5ffc1912a8, proc_param=0x0,
select_options=2416184064, result=0x7f5ffc0da1c0, unit=0x7f5ffc0d5860,
select_lex=0x7f5ffc0d73f8)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:4797
#9 0x000055c03db033eb in handle_select (thd=0x7f5ffc000da0,
lex=0x7f5ffc0d57a0, result=0x7f5ffc0da1c0, setup_tables_done_option=0)
at /home/sanja/maria/git/10.4/sql/sql_select.cc:442
#10 0x000055c03dac3198 in execute_sqlcom_select (thd=0x7f5ffc000da0,
all_tables=0x7f5ffc0d7a08)
at /home/sanja/maria/git/10.4/sql/sql_parse.cc:6463
#11 0x000055c03dab9656 in mysql_execute_command (thd=0x7f5ffc000da0)
at /home/sanja/maria/git/10.4/sql/sql_parse.cc:3966
#12 0x000055c03daeb6df in Prepared_statement::execute (this=0x7f5ffc197a60,
expanded_query=0x7f600d793940, open_cursor=false)