CREATE TABLE t1 (i INT, c VARCHAR(8), KEY(c));
|
INSERT INTO t1 VALUES (1,'foo'),(9,'bar');
|
|
CREATE TABLE t2 (a INT);
|
INSERT INTO t2 VALUES (1),(2),(3),(4);
|
|
CREATE TABLE t3 (c VARCHAR(8));
|
INSERT INTO t3 VALUES ('abc'),('def');
|
|
CREATE OR REPLACE VIEW v AS
|
SELECT c AS val FROM t1 WHERE i IN ( SELECT i FROM t1 JOIN t2 ) GROUP BY val ;
|
|
SELECT * FROM t3 WHERE c IN ( SELECT val FROM v ) ;
|
10.3 016c35a7f2f4a288542f5fcb0e182c05238398e6
|
#3 <signal handler called>
|
#4 0x00005617ac8daae5 in update_ref_and_keys (thd=0x7f6bf8000b00, keyuse=0x7f6c09bcfb20, join_tab=0x7f6bf8046968, tables=3, cond=0x7f6bf8050718, normal_tables=18446744073709551615, select_lex=0x7f6bf80172e0, sargables=0x7f6c09bcfb18) at /data/src/10.3/sql/sql_select.cc:5683
|
#5 0x00005617ac90edb3 in JOIN::reoptimize (this=0x7f6bf803fa38, added_where=0x7f6bf8050718, join_tables=7, save_to=0x0) at /data/src/10.3/sql/sql_select.cc:25939
|
#6 0x00005617ac8e3324 in JOIN::push_splitting_cond_into_derived (this=0x7f6bf803fa38, thd=0x7f6bf8000b00, cond=0x7f6bf8050718) at /data/src/10.3/sql/sql_select.cc:9078
|
#7 0x00005617ac8e34b1 in JOIN::improve_chosen_plan (this=0x7f6bf803eca8, thd=0x7f6bf8000b00) at /data/src/10.3/sql/sql_select.cc:9105
|
#8 0x00005617ac8d7899 in make_join_statistics (join=0x7f6bf803eca8, tables_list=..., keyuse_array=0x7f6bf803ef98) at /data/src/10.3/sql/sql_select.cc:4516
|
#9 0x00005617ac8ccd3c in JOIN::optimize_inner (this=0x7f6bf803eca8) at /data/src/10.3/sql/sql_select.cc:1528
|
#10 0x00005617ac8cb6f4 in JOIN::optimize (this=0x7f6bf803eca8) at /data/src/10.3/sql/sql_select.cc:1123
|
#11 0x00005617ac8d479e in mysql_select (thd=0x7f6bf8000b00, tables=0x7f6bf8014c30, wild_num=1, fields=..., conds=0x7f6bf8016600, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f6bf801a938, unit=0x7f6bf80047c0, select_lex=0x7f6bf8004f00) at /data/src/10.3/sql/sql_select.cc:3723
|
#12 0x00005617ac8c8dbc in handle_select (thd=0x7f6bf8000b00, lex=0x7f6bf80046f8, result=0x7f6bf801a938, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:378
|
#13 0x00005617ac89426e in execute_sqlcom_select (thd=0x7f6bf8000b00, all_tables=0x7f6bf8014c30) at /data/src/10.3/sql/sql_parse.cc:6466
|
#14 0x00005617ac88a7ef in mysql_execute_command (thd=0x7f6bf8000b00) at /data/src/10.3/sql/sql_parse.cc:3731
|
#15 0x00005617ac897bd4 in mysql_parse (thd=0x7f6bf8000b00, rawbuf=0x7f6bf8014a08 "SELECT * FROM t3 WHERE c IN ( SELECT val FROM v )", length=49, parser_state=0x7f6c09bd1610, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7921
|
#16 0x00005617ac88532e in dispatch_command (command=COM_QUERY, thd=0x7f6bf8000b00, packet=0x7f6bf800af11 "SELECT * FROM t3 WHERE c IN ( SELECT val FROM v ) ", packet_length=50, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1819
|
#17 0x00005617ac883d90 in do_command (thd=0x7f6bf8000b00) at /data/src/10.3/sql/sql_parse.cc:1370
|
#18 0x00005617ac9da646 in do_handle_one_connection (connect=0x5617afd31500) at /data/src/10.3/sql/sql_connect.cc:1418
|
#19 0x00005617ac9da3d3 in handle_one_connection (arg=0x5617afd31500) at /data/src/10.3/sql/sql_connect.cc:1324
|
#20 0x00005617ace521dc in pfs_spawn_thread (arg=0x5617afdd1f00) at /data/src/10.3/storage/perfschema/pfs.cc:1862
|
#21 0x00007f6c1187f494 in start_thread (arg=0x7f6c09bd2700) at pthread_create.c:333
|
#22 0x00007f6c0f9f793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Non-debug crashes in a similar way.
The problem appeared in bb-10.2-ext and later in 10.3 tree with this revision:
commit bf75dcac89d1496032015526dc6ce78d327e329f
|
Author: Igor Babaev <igor@askmonty.org>
|
Date: Thu Aug 10 14:25:19 2017 -0700
|
|
This is a modification of the first patch committed for mdev-13369
|
developed to cover the case of mdev-13389: "Optimization for equi-joins
|
of derived tables with window functions".
|
- relates to
-
MDEV-13710
Assertion `join->best_read < double(1.7...e+308L)' failed in greedy_search / choose_plan / JOIN::reoptimize
-
-
Closed
{"report":{"fcp":1060.2999999523163,"ttfb":330,"pageVisibility":"visible","entityId":62957,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"3dc95dd9-f13f-41fc-8d06-e37b11aa06d1","navigationType":0,"readyForUser":1150.4000000953674,"redirectCount":0,"resourceLoadedEnd":1183.5999999046326,"resourceLoadedStart":337.40000009536743,"resourceTiming":[{"duration":162.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":337.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":337.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":499.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":162.39999985694885,"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":337.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":337.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":500.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":175.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":337.90000009536743,"connectEnd":337.90000009536743,"connectStart":337.90000009536743,"domainLookupEnd":337.90000009536743,"domainLookupStart":337.90000009536743,"fetchStart":337.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":337.90000009536743,"responseEnd":513.2999999523163,"responseStart":513.2999999523163,"secureConnectionStart":337.90000009536743},{"duration":263.7000000476837,"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":338.09999990463257,"connectEnd":338.09999990463257,"connectStart":338.09999990463257,"domainLookupEnd":338.09999990463257,"domainLookupStart":338.09999990463257,"fetchStart":338.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":338.09999990463257,"responseEnd":601.7999999523163,"responseStart":601.7999999523163,"secureConnectionStart":338.09999990463257},{"duration":273.7000000476837,"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":338.2999999523163,"connectEnd":338.2999999523163,"connectStart":338.2999999523163,"domainLookupEnd":338.2999999523163,"domainLookupStart":338.2999999523163,"fetchStart":338.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":338.2999999523163,"responseEnd":612,"responseStart":612,"secureConnectionStart":338.2999999523163},{"duration":274.89999985694885,"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":338.40000009536743,"connectEnd":338.40000009536743,"connectStart":338.40000009536743,"domainLookupEnd":338.40000009536743,"domainLookupStart":338.40000009536743,"fetchStart":338.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":338.40000009536743,"responseEnd":613.2999999523163,"responseStart":613.2000000476837,"secureConnectionStart":338.40000009536743},{"duration":275.2999999523163,"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":338.5,"connectEnd":338.5,"connectStart":338.5,"domainLookupEnd":338.5,"domainLookupStart":338.5,"fetchStart":338.5,"redirectEnd":0,"redirectStart":0,"requestStart":338.5,"responseEnd":613.7999999523163,"responseStart":613.7999999523163,"secureConnectionStart":338.5},{"duration":324.7000000476837,"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":338.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":338.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":663.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":275.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":338.90000009536743,"connectEnd":338.90000009536743,"connectStart":338.90000009536743,"domainLookupEnd":338.90000009536743,"domainLookupStart":338.90000009536743,"fetchStart":338.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":338.90000009536743,"responseEnd":614.5999999046326,"responseStart":614.5999999046326,"secureConnectionStart":338.90000009536743},{"duration":324.30000019073486,"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":339.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":339.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":663.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":274.89999985694885,"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":341.2000000476837,"connectEnd":341.2000000476837,"connectStart":341.2000000476837,"domainLookupEnd":341.2000000476837,"domainLookupStart":341.2000000476837,"fetchStart":341.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":341.2000000476837,"responseEnd":616.0999999046326,"responseStart":616.0999999046326,"secureConnectionStart":341.2000000476837},{"duration":433.7000000476837,"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":347.7000000476837,"connectEnd":347.7000000476837,"connectStart":347.7000000476837,"domainLookupEnd":347.7000000476837,"domainLookupStart":347.7000000476837,"fetchStart":347.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":347.7000000476837,"responseEnd":781.4000000953674,"responseStart":781.4000000953674,"secureConnectionStart":347.7000000476837},{"duration":776.2000000476837,"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":347.7999999523163,"connectEnd":347.7999999523163,"connectStart":347.7999999523163,"domainLookupEnd":347.7999999523163,"domainLookupStart":347.7999999523163,"fetchStart":347.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":347.7999999523163,"responseEnd":1124,"responseStart":1124,"secureConnectionStart":347.7999999523163},{"duration":106.10000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":675.7999999523163,"connectEnd":675.7999999523163,"connectStart":675.7999999523163,"domainLookupEnd":675.7999999523163,"domainLookupStart":675.7999999523163,"fetchStart":675.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":675.7999999523163,"responseEnd":781.9000000953674,"responseStart":781.9000000953674,"secureConnectionStart":675.7999999523163},{"duration":223.89999985694885,"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":959.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":959.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1183.5999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":151,"responseStart":330,"responseEnd":347,"domLoading":333,"domInteractive":1212,"domContentLoadedEventStart":1212,"domContentLoadedEventEnd":1254,"domComplete":2068,"loadEventStart":2068,"loadEventEnd":2070,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1199.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1200.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1200.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1203.5999999046326},{"name":"activityTabFullyLoaded","time":1265.2999999523163}],"measures":[],"correlationId":"5a7d648273faa5","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}