#2 0x00000000007c1b14 in handle_fatal_signal (sig=11) at maria-5.5/sql/signal_handler.cc:262
|
#3 <signal handler called>
|
#4 0x00000000007e0ae2 in Item_field::print (this=0x3c5b9d0, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/item.cc:6554
|
#5 0x000000000081bbc0 in Item_func::print_op (this=0x3c61698, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/item_func.cc:490
|
#6 0x00000000008034e7 in Item_bool_func2::print (this=0x3c61698, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/item_cmpfunc.h:384
|
#7 0x00000000007fe987 in Item_cond::print (this=0x3c5cf70, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/item_cmpfunc.cc:4559
|
#8 0x0000000000674443 in st_select_lex::print (this=0x3be3cd0, thd=0x3abb300, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/sql_select.cc:22446
|
#9 0x000000000085d272 in subselect_single_select_engine::print (this=0x3be7778, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/item_subselect.cc:3695
|
#10 0x000000000085560c in Item_subselect::print (this=0x3be7640, str=0x7f83f41bb030, query_type=QT_ORDINARY) at maria-5.5/sql/item_subselect.cc:874
|
#11 0x000000000066e935 in change_to_use_tmp_fields (thd=0x3abb300, ref_pointer_array=0x3c43cf8, res_selected_fields=..., res_all_fields=..., elements=2, all_fields=...) at maria-5.5/sql/sql_select.cc:20637
|
#12 0x000000000064219d in JOIN::exec (this=0x3c43780) at maria-5.5/sql/sql_select.cc:2421
|
#13 0x00000000006444c7 in mysql_select (thd=0x3abb300, rref_pointer_array=0x3bd66c8, tables=0x3be2a40, wild_num=0, fields=..., conds=0x0, og_num=3, order=0x3c42ee0, group=0x3be77b8, having=0x0, proc_param=0x0, select_options=2416184064, result=0x3c43690, unit=0x3bd5d98, select_lex=0x3bd6470) at maria-5.5/sql/sql_select.cc:3055
|
#14 0x00000000005e82d1 in mysql_derived_fill (thd=0x3abb300, lex=0x3abd680, derived=0x3bbc4c0) at maria-5.5/sql/sql_derived.cc:885
|
#15 0x00000000005e6f76 in mysql_handle_single_derived (lex=0x3abd680, derived=0x3bbc4c0, phases=96) at maria-5.5/sql/sql_derived.cc:179
|
#16 0x0000000000656477 in st_join_table::preread_init (this=0x3c6dff8) at maria-5.5/sql/sql_select.cc:10380
|
#17 0x0000000000663a51 in sub_select (join=0x3c43178, join_tab=0x3c6dff8, end_of_records=false) at maria-5.5/sql/sql_select.cc:16083
|
#18 0x00000000006634b3 in do_select (join=0x3c43178, fields=0x3abdf18, table=0x0, procedure=0x0) at maria-5.5/sql/sql_select.cc:15785
|
#19 0x0000000000643cca in JOIN::exec (this=0x3c43178) at maria-5.5/sql/sql_select.cc:2835
|
#20 0x00000000006444c7 in mysql_select (thd=0x3abb300, rref_pointer_array=0x3abe060, tables=0x3bbc4c0, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x3c43158, unit=0x3abd730, select_lex=0x3abde08) at maria-5.5/sql/sql_select.cc:3055
|
#21 0x000000000063b019 in handle_select (thd=0x3abb300, lex=0x3abd680, result=0x3c43158, setup_tables_done_option=0) at maria-5.5/sql/sql_select.cc:316
|
#22 0x00000000006142b5 in execute_sqlcom_select (thd=0x3abb300, all_tables=0x3bbc4c0) at maria-5.5/sql/sql_parse.cc:4615
|
#23 0x000000000060cdc4 in mysql_execute_command (thd=0x3abb300) at maria-5.5/sql/sql_parse.cc:2182
|
#24 0x0000000000616b1d in mysql_parse (thd=0x3abb300, rawbuf=0x3bbc2e8 "SELECT * FROM v", length=15, parser_state=0x7f83f41bc500) at maria-5.5/sql/sql_parse.cc:5730
|
#25 0x000000000060a337 in dispatch_command (command=COM_QUERY, thd=0x3abb300, packet=0x3c3dee1 "", packet_length=15) at maria-5.5/sql/sql_parse.cc:1055
|
#26 0x00000000006095ee in do_command (thd=0x3abb300) at maria-5.5/sql/sql_parse.cc:794
|
#27 0x000000000070be7b in do_handle_one_connection (thd_arg=0x3abb300) at maria-5.5/sql/sql_connect.cc:1253
|
#28 0x000000000070b866 in handle_one_connection (arg=0x3abb300) at maria-5.5/sql/sql_connect.cc:1168
|
#29 0x0000000000b8e10f in pfs_spawn_thread (arg=0x3c3cc40) at maria-5.5/storage/perfschema/pfs.cc:1015
|
#30 0x00007f83ff81aefc in start_thread (arg=0x7f83f41bd700) at pthread_create.c:304
|
branch: maria/5.5
|
bzr version-info
|
revision-id: wlad@montyprogram.com-20121120142439-zvx42vxhc8lurmnv
|
date: 2012-11-20 15:24:39 +0100
|
revno: 3576
|
branch-nick: maria-5.5
|
Built with BUILD/compile-pentium-debug-max-no-ndb
Reproducible with MyISAM, Aria, InnoDB.
Reproducible on current 5.5 and 10.0.
Could not reproduce on 5.3 and on MySQL 5.6 (in both cases it throws a warning "View merge algorithm can't be used here for now (assumed undefined algorithm)").
Minimal optimizer_switch: materialization=on,semijoin=on
Default optimizer_switch:
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
EXPLAIN with the default optimizer_switch:
EXPLAIN EXTENDED
|
SELECT * FROM v;
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 100.00
|
2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using temporary
|
2 DERIVED table1 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
7 SUBQUERY <subquery8> const distinct_key distinct_key 8 const,const 1 100.00
|
7 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
8 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
|
8 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
5 SUBQUERY <subquery6> const distinct_key distinct_key 8 const,const 1 100.00
|
5 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
6 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
|
6 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
3 SUBQUERY <subquery4> const distinct_key distinct_key 8 const,const 1 100.00
|
3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
4 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
|
4 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join)
|
Warnings:
|
Note 1003 select `v`.`field1` AS `field1`,`v`.`field2` AS `field2` from `test`.`v`
|
Test case:
SET optimizer_switch = 'materialization=on,semijoin=on';
|
|
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
|
INSERT INTO t1 VALUES (1),(7);
|
|
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
|
INSERT INTO t2 VALUES (4),(6);
|
|
CREATE TABLE t3 (c INT) ENGINE=MyISAM;
|
INSERT INTO t3 VALUES (1),(2);
|
|
|
CREATE ALGORITHM=MERGE VIEW v AS SELECT
|
( SELECT a FROM t1 WHERE ( 1, 1 ) IN (
|
SELECT b, c FROM t2, t3 HAVING c > 2 ) ) AS field1,
|
b + c AS field2
|
FROM t2, t3 AS table1
|
GROUP BY field1, field2 ORDER BY field1;
|
|
SELECT * FROM v;
|
{"report":{"fcp":960.7000000476837,"ttfb":248.10000014305115,"pageVisibility":"visible","entityId":22009,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"9fc2fb25-594b-4ef6-9749-f1050096f2aa","navigationType":0,"readyForUser":1047.8000001907349,"redirectCount":0,"resourceLoadedEnd":704.2000000476837,"resourceLoadedStart":253.60000014305115,"resourceTiming":[{"duration":75.29999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":253.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":328.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":75.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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","startTime":253.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":329.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":127.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":254,"connectEnd":254,"connectStart":254,"domainLookupEnd":254,"domainLookupStart":254,"fetchStart":254,"redirectEnd":0,"redirectStart":0,"requestStart":344.40000009536743,"responseEnd":381.60000014305115,"responseStart":355.80000019073486,"secureConnectionStart":254},{"duration":434.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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","startTime":254.10000014305115,"connectEnd":361.90000009536743,"connectStart":361.90000009536743,"domainLookupEnd":361.90000009536743,"domainLookupStart":361.90000009536743,"fetchStart":254.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":362.10000014305115,"responseEnd":688.6000001430511,"responseStart":375.40000009536743,"secureConnectionStart":361.90000009536743},{"duration":122.20000004768372,"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":254.40000009536743,"connectEnd":254.40000009536743,"connectStart":254.40000009536743,"domainLookupEnd":254.40000009536743,"domainLookupStart":254.40000009536743,"fetchStart":254.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":362.90000009536743,"responseEnd":376.60000014305115,"responseStart":374.2000000476837,"secureConnectionStart":254.40000009536743},{"duration":129.10000014305115,"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":254.5,"connectEnd":254.5,"connectStart":254.5,"domainLookupEnd":254.5,"domainLookupStart":254.5,"fetchStart":254.5,"redirectEnd":0,"redirectStart":0,"requestStart":366.40000009536743,"responseEnd":383.60000014305115,"responseStart":380.7000000476837,"secureConnectionStart":254.5},{"duration":130.10000014305115,"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":254.70000004768372,"connectEnd":254.70000004768372,"connectStart":254.70000004768372,"domainLookupEnd":254.70000004768372,"domainLookupStart":254.70000004768372,"fetchStart":254.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":366.5,"responseEnd":384.80000019073486,"responseStart":381.90000009536743,"secureConnectionStart":254.70000004768372},{"duration":109.40000009536743,"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":254.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":254.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":364.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":132,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":255,"connectEnd":255,"connectStart":255,"domainLookupEnd":255,"domainLookupStart":255,"fetchStart":255,"redirectEnd":0,"redirectStart":0,"requestStart":368.40000009536743,"responseEnd":387,"responseStart":385.10000014305115,"secureConnectionStart":255},{"duration":112.5,"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":255.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":255.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":367.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":133.90000009536743,"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":255.40000009536743,"connectEnd":255.40000009536743,"connectStart":255.40000009536743,"domainLookupEnd":255.40000009536743,"domainLookupStart":255.40000009536743,"fetchStart":255.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":370.60000014305115,"responseEnd":389.30000019073486,"responseStart":386,"secureConnectionStart":255.40000009536743},{"duration":434.59999990463257,"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":268.30000019073486,"connectEnd":268.30000019073486,"connectStart":268.30000019073486,"domainLookupEnd":268.30000019073486,"domainLookupStart":268.30000019073486,"fetchStart":268.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":501.90000009536743,"responseEnd":702.9000000953674,"responseStart":698,"secureConnectionStart":268.30000019073486},{"duration":431.89999985694885,"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":272.30000019073486,"connectEnd":272.30000019073486,"connectStart":272.30000019073486,"domainLookupEnd":272.30000019073486,"domainLookupStart":272.30000019073486,"fetchStart":272.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":647.6000001430511,"responseEnd":704.2000000476837,"responseStart":701.7000000476837,"secureConnectionStart":272.30000019073486},{"duration":220.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":509,"connectEnd":509,"connectStart":509,"domainLookupEnd":509,"domainLookupStart":509,"fetchStart":509,"redirectEnd":0,"redirectStart":0,"requestStart":694.4000000953674,"responseEnd":729.2000000476837,"responseStart":728.3000001907349,"secureConnectionStart":509}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":65,"responseStart":248,"responseEnd":272,"domLoading":252,"domInteractive":1115,"domContentLoadedEventStart":1115,"domContentLoadedEventEnd":1166,"domComplete":2203,"loadEventStart":2203,"loadEventEnd":2204,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1093.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1093.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1094.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1095.7000000476837},{"name":"activityTabFullyLoaded","time":1185.4000000953674}],"measures":[],"correlationId":"abf7f13fbc23b2","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Sanja,
I'm only assigning the bugs related to MERGE vs TEMPTABLE views testing to you because you're a "customer" of the test run, so I think you should be aware of the findings. Please feel free to reassign right away any bugs that don't belong to you.