SET use_stat_tables='preferably';
|
CREATE TABLE t (a INT,b INT,KEY i1 (a),KEY i2 (b)) ENGINE=MRG_MyISAM;
|
ANALYZE LOCAL TABLE t;
|
EXPLAIN SELECT DISTINCT a FROM t;
|
Leads to:
11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Debug)
|
Core was generated by `/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
|
Program terminated with signal SIGFPE, Arithmetic exception.
|
#0 0x0000559999752099 in cost_group_min_max (out_records=<synthetic pointer>,
|
read_cost=<synthetic pointer>, have_max=false, have_min=false,
|
quick_prefix_records=0, index_tree=0x0, range_tree=0x0, group_key_parts=1,
|
used_key_parts=1, index_info=0x14d104024a50, table=0x14d10401ea88)
|
at /test/11.0_dbg/sql/opt_range.cc:15275
|
15275 INDEX_BLOCK_FILL_FACTOR_MUL) / file->stats.block_size + 1;
|
[Current thread is 1 (Thread 0x14d158966640 (LWP 2308294))]
|
(gdb) bt
|
#0 0x0000559999752099 in cost_group_min_max (out_records=<synthetic pointer>, read_cost=<synthetic pointer>, have_max=false, have_min=false, quick_prefix_records=0, index_tree=0x0, range_tree=0x0, group_key_parts=1, used_key_parts=1, index_info=0x14d104024a50, table=0x14d10401ea88) at /test/11.0_dbg/sql/opt_range.cc:15275
|
#1 get_best_group_min_max (param=param@entry=0x14d158963c40, tree=tree@entry=0x0, read_time=<optimized out>) at /test/11.0_dbg/sql/opt_range.cc:14540
|
#2 0x000055999975484f in SQL_SELECT::test_quick_select (this=this@entry=0x14d1040164e0, thd=thd@entry=0x14d104000d58, keys_to_use=<optimized out>, prev_tables=prev_tables@entry=0, limit=limit@entry=18446744073709551615, force_quick_range=force_quick_range@entry=false, ordered_output=<optimized out>, remove_false_parts_of_where=<optimized out>, only_single_index_range_scan=<optimized out>) at /test/11.0_dbg/sql/opt_range.cc:3072
|
#3 0x00005599998c9b4f in get_quick_record_count (limit=18446744073709551615, keys=0x14d104015950, table=0x14d10401ea88, select=0x14d1040164e0, thd=0x14d104000d58) at /test/11.0_dbg/sql/sql_select.cc:5190
|
#4 make_join_statistics (join=join@entry=0x14d104014f50, tables_list=@0x14d1040133f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14d104015718, last = 0x14d104015718, elements = 1}, <No data fields>}, keyuse_array=keyuse_array@entry=0x14d1040152b8) at /test/11.0_dbg/sql/sql_select.cc:5947
|
#5 0x00005599998d14b9 in JOIN::optimize_inner (this=this@entry=0x14d104014f50) at /test/11.0_dbg/sql/sql_select.cc:2569
|
#6 0x00005599998d19bc in JOIN::optimize (this=this@entry=0x14d104014f50) at /test/11.0_dbg/sql/sql_select.cc:1897
|
#7 0x00005599998d1ac5 in mysql_select (thd=thd@entry=0x14d104000d58, tables=0x14d104013800, fields=@0x14d104013498: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14d1040137b8, last = 0x14d1040137b8, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525829, result=0x14d1040148b0, unit=0x14d104004fa0, select_lex=0x14d1040131e0) at /test/11.0_dbg/sql/sql_select.cc:5132
|
#8 0x00005599998d2526 in mysql_explain_union (thd=thd@entry=0x14d104000d58, unit=unit@entry=0x14d104004fa0, result=result@entry=0x14d1040148b0) at /test/11.0_dbg/sql/sql_select.cc:29596
|
#9 0x0000559999837bd7 in execute_sqlcom_select (thd=thd@entry=0x14d104000d58, all_tables=0x14d104013800) at /test/11.0_dbg/sql/sql_parse.cc:6205
|
#10 0x00005599998434af in mysql_execute_command (thd=thd@entry=0x14d104000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.0_dbg/sql/sql_parse.cc:3949
|
#11 0x000055999984a7cf in mysql_parse (thd=thd@entry=0x14d104000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d1589652c0) at /test/11.0_dbg/sql/sql_parse.cc:8002
|
#12 0x000055999984c963 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d104000d58, packet=packet@entry=0x14d10400ae19 "", packet_length=packet_length@entry=32, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_class.h:242
|
#13 0x000055999984e7bc in do_command (thd=0x14d104000d58, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_parse.cc:1407
|
#14 0x000055999999f6e2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55999cb199f8, put_in_cache=put_in_cache@entry=true) at /test/11.0_dbg/sql/sql_connect.cc:1416
|
#15 0x000055999999f941 in handle_one_connection (arg=0x55999cb199f8) at /test/11.0_dbg/sql/sql_connect.cc:1318
|
#16 0x000014d172461b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#17 0x000014d1724f3a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
15273 /* Calculate the number of blocks we will touch for the table or range scan */
|
15274 num_blocks= (records * key_length / INDEX_BLOCK_FILL_FACTOR_DIV *
|
15275 INDEX_BLOCK_FILL_FACTOR_MUL) / file->stats.block_size + 1;
|
(gdb) p file->stats.block_size
|
$2 = 0
|
Bug confirmed present in:
MariaDB: 11.0.1 (dbg), 11.0.1 (opt)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.38 (dbg), 10.3.38 (opt), 10.4.29 (dbg), 10.4.29 (opt), 10.5.20 (dbg), 10.5.20 (opt), 10.6.13 (dbg), 10.6.13 (opt), 10.7.8 (dbg), 10.7.8 (opt), 10.8.8 (dbg), 10.8.8 (opt), 10.9.6 (dbg), 10.9.6 (opt), 10.10.4 (dbg), 10.10.4 (opt), 10.11.2 (dbg), 10.11.2 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)
{"report":{"fcp":701.7000000476837,"ttfb":159,"pageVisibility":"visible","entityId":119895,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"f7c9be90-5e84-45f8-9d28-e38573269e98","navigationType":0,"readyForUser":773,"redirectCount":0,"resourceLoadedEnd":525.8999999761581,"resourceLoadedStart":164.20000004768372,"resourceTiming":[{"duration":6.199999928474426,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":164.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":164.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":170.39999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":6.800000071525574,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":164.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":164.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":171.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":78.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":164.60000002384186,"connectEnd":164.60000002384186,"connectStart":164.60000002384186,"domainLookupEnd":164.60000002384186,"domainLookupStart":164.60000002384186,"fetchStart":164.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":174.10000002384186,"responseEnd":242.70000004768372,"responseStart":196.39999997615814,"secureConnectionStart":164.60000002384186},{"duration":128.19999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":164.70000004768372,"connectEnd":164.70000004768372,"connectStart":164.70000004768372,"domainLookupEnd":164.70000004768372,"domainLookupStart":164.70000004768372,"fetchStart":164.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":174.89999997615814,"responseEnd":292.89999997615814,"responseStart":201.29999995231628,"secureConnectionStart":164.70000004768372},{"duration":31.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":164.79999995231628,"connectEnd":164.79999995231628,"connectStart":164.79999995231628,"domainLookupEnd":164.79999995231628,"domainLookupStart":164.79999995231628,"fetchStart":164.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":176,"responseEnd":196.29999995231628,"responseStart":195.70000004768372,"secureConnectionStart":164.79999995231628},{"duration":46.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":164.89999997615814,"connectEnd":164.89999997615814,"connectStart":164.89999997615814,"domainLookupEnd":164.89999997615814,"domainLookupStart":164.89999997615814,"fetchStart":164.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":177.39999997615814,"responseEnd":211,"responseStart":210.29999995231628,"secureConnectionStart":164.89999997615814},{"duration":56.700000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":165,"connectEnd":165,"connectStart":165,"domainLookupEnd":165,"domainLookupStart":165,"fetchStart":165,"redirectEnd":0,"redirectStart":0,"requestStart":179.20000004768372,"responseEnd":221.70000004768372,"responseStart":221.29999995231628,"secureConnectionStart":165},{"duration":12.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":165.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":165.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":177.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":55.199999928474426,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":165.20000004768372,"connectEnd":165.20000004768372,"connectStart":165.20000004768372,"domainLookupEnd":165.20000004768372,"domainLookupStart":165.20000004768372,"fetchStart":165.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":181.20000004768372,"responseEnd":220.39999997615814,"responseStart":219.70000004768372,"secureConnectionStart":165.20000004768372},{"duration":14.400000095367432,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":165.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":165.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":179.70000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":55.700000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":165.39999997615814,"connectEnd":165.39999997615814,"connectStart":165.39999997615814,"domainLookupEnd":165.39999997615814,"domainLookupStart":165.39999997615814,"fetchStart":165.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":182.20000004768372,"responseEnd":221.10000002384186,"responseStart":220.5,"secureConnectionStart":165.39999997615814},{"duration":345.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":180.20000004768372,"connectEnd":180.20000004768372,"connectStart":180.20000004768372,"domainLookupEnd":180.20000004768372,"domainLookupStart":180.20000004768372,"fetchStart":180.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":202.60000002384186,"responseEnd":525.6000000238419,"responseStart":519.6000000238419,"secureConnectionStart":180.20000004768372},{"duration":339.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":186,"connectEnd":186,"connectStart":186,"domainLookupEnd":186,"domainLookupStart":186,"fetchStart":186,"redirectEnd":0,"redirectStart":0,"requestStart":212.20000004768372,"responseEnd":525.8999999761581,"responseStart":520.2999999523163,"secureConnectionStart":186},{"duration":200.69999992847443,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":461.7000000476837,"connectEnd":461.7000000476837,"connectStart":461.7000000476837,"domainLookupEnd":461.7000000476837,"domainLookupStart":461.7000000476837,"fetchStart":461.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":626.3999999761581,"responseEnd":662.3999999761581,"responseStart":661.5,"secureConnectionStart":461.7000000476837},{"duration":149.29999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":678.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":678.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":827.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":169.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":701.2999999523163,"connectEnd":701.2999999523163,"connectStart":701.2999999523163,"domainLookupEnd":701.2999999523163,"domainLookupStart":701.2999999523163,"fetchStart":701.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":838.7999999523163,"responseEnd":870.5,"responseStart":869.7999999523163,"secureConnectionStart":701.2999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":27,"responseStart":159,"responseEnd":186,"domLoading":163,"domInteractive":838,"domContentLoadedEventStart":838,"domContentLoadedEventEnd":884,"domComplete":1155,"loadEventStart":1155,"loadEventEnd":1156,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":812.1000000238419},{"name":"bigPipe.sidebar-id.end","time":813.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.start","time":813.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":815.1000000238419},{"name":"activityTabFullyLoaded","time":902}],"measures":[],"correlationId":"84c9396cf288b3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":74,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
First failing commit
commit b66cdbd1eaeed7e96317a03a190c496fd062ec71
Author: Monty <monty@mariadb.org>
Date: Thu Aug 11 13:05:23 2022 +0300