--source include/have_innodb.inc
|
|
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
|
SELECT ( SELECT DISTINCT GROUP_CONCAT(SLEEP(0)) FROM t1 GROUP BY i );
|
SELECT i FROM t1 ORDER BY i LIMIT 1;
|
10.1ea0ae42d83
|
mysqld: /data/src/10.1/sql/filesort_utils.cc:110: uchar** Filesort_buffer::alloc_sort_buffer(uint, uint): Assertion `num_records == m_idx_array.size()' failed.
|
161027 18:14:48 [ERROR] mysqld got signal 6 ;
|
|
#6 0x00007f2cdb1c8266 in __assert_fail_base (fmt=0x7f2cdb301238 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f2cde3e0b48 "num_records == m_idx_array.size()", file=file@entry=0x7f2cde3e0ae0 "/data/src/10.1/sql/filesort_utils.cc", line=line@entry=110, function=function@entry=0x7f2cde3e0ba0 <Filesort_buffer::alloc_sort_buffer(unsigned int, unsigned int)::__PRETTY_FUNCTION__> "uchar** Filesort_buffer::alloc_sort_buffer(uint, uint)") at assert.c:92
|
#7 0x00007f2cdb1c8312 in __GI___assert_fail (assertion=0x7f2cde3e0b48 "num_records == m_idx_array.size()", file=0x7f2cde3e0ae0 "/data/src/10.1/sql/filesort_utils.cc", line=110, function=0x7f2cde3e0ba0 <Filesort_buffer::alloc_sort_buffer(unsigned int, unsigned int)::__PRETTY_FUNCTION__> "uchar** Filesort_buffer::alloc_sort_buffer(uint, uint)") at assert.c:101
|
#8 0x00007f2cdddb1a6c in Filesort_buffer::alloc_sort_buffer (this=0x7f2cde8d1e40, num_records=2, record_length=10) at /data/src/10.1/sql/filesort_utils.cc:110
|
#9 0x00007f2cddc071c0 in Filesort_info::alloc_sort_buffer (this=0x7f2cde8d1e40, num_records=2, record_length=10) at /data/src/10.1/sql/table.h:354
|
#10 0x00007f2cddc05002 in check_if_pq_applicable (param=0x7f2cde8d1eb0, filesort_info=0x7f2cde8d1e40, table=0x7f2cc5881c70, num_rows=1129, memory_available=262144) at /data/src/10.1/sql/filesort.cc:1346
|
#11 0x00007f2cddc01ff9 in filesort (thd=0x7f2cd1bb2070, table=0x7f2cc5881c70, sortorder=0x7f2cc58fccc0, s_length=1, select=0x7f2cc58fc008, max_rows=1, sort_positions=false, examined_rows=0x7f2cde8d22b0, found_rows=0x7f2cde8d22b8, tracker=0x7f2cc58fcd00) at /data/src/10.1/sql/filesort.cc:224
|
#12 0x00007f2cdda4207a in create_sort_index (thd=0x7f2cd1bb2070, join=0x7f2cc58faac0, order=0x7f2cc58fa988, filesort_limit=1, select_limit=1, is_order_by=true) at /data/src/10.1/sql/sql_select.cc:21486
|
#13 0x00007f2cdda14beb in JOIN::exec_inner (this=0x7f2cc58faac0) at /data/src/10.1/sql/sql_select.cc:3185
|
#14 0x00007f2cdda120ad in JOIN::exec (this=0x7f2cc58faac0) at /data/src/10.1/sql/sql_select.cc:2505
|
#15 0x00007f2cdda1561b in mysql_select (thd=0x7f2cd1bb2070, rref_pointer_array=0x7f2cd1bb6430, tables=0x7f2cc58fa288, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x7f2cc58fa988, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f2cc58faaa0, unit=0x7f2cd1bb5ab8, select_lex=0x7f2cd1bb61b8) at /data/src/10.1/sql/sql_select.cc:3438
|
#16 0x00007f2cdda0b10c in handle_select (thd=0x7f2cd1bb2070, lex=0x7f2cd1bb59f0, result=0x7f2cc58faaa0, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:384
|
#17 0x00007f2cdd9db309 in execute_sqlcom_select (thd=0x7f2cd1bb2070, all_tables=0x7f2cc58fa288) at /data/src/10.1/sql/sql_parse.cc:5895
|
#18 0x00007f2cdd9d1216 in mysql_execute_command (thd=0x7f2cd1bb2070) at /data/src/10.1/sql/sql_parse.cc:2961
|
#19 0x00007f2cdd9dea62 in mysql_parse (thd=0x7f2cd1bb2070, rawbuf=0x7f2cc58fa088 "SELECT i FROM t1 ORDER BY i LIMIT 1", length=35, parser_state=0x7f2cde8d35e0) at /data/src/10.1/sql/sql_parse.cc:7318
|
#20 0x00007f2cdd9cd46b in dispatch_command (command=COM_QUERY, thd=0x7f2cd1bb2070, packet=0x7f2cd3a9b071 "SELECT i FROM t1 ORDER BY i LIMIT 1", packet_length=35) at /data/src/10.1/sql/sql_parse.cc:1487
|
#21 0x00007f2cdd9cc1a2 in do_command (thd=0x7f2cd1bb2070) at /data/src/10.1/sql/sql_parse.cc:1108
|
#22 0x00007f2cddb0207d in do_handle_one_connection (thd_arg=0x7f2cd1bb2070) at /data/src/10.1/sql/sql_connect.cc:1350
|
#23 0x00007f2cddb01de1 in handle_one_connection (arg=0x7f2cd1bb2070) at /data/src/10.1/sql/sql_connect.cc:1262
|
#24 0x00007f2cddde4aba in pfs_spawn_thread (arg=0x7f2cd3ab8bf0) at /data/src/10.1/storage/perfschema/pfs.cc:1860
|
#25 0x00007f2cdd0ca0a4 in start_thread (arg=0x7f2cde8d4b00) at pthread_create.c:309
|
#26 0x00007f2cdb28287d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|
Reproducible on 10.0, 10.1.
Not reproducible on 5.5 and current 10.2 (0c15d1a6ff).
{"report":{"fcp":910.8999999761581,"ttfb":232.89999997615814,"pageVisibility":"visible","entityId":58711,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"514cb560-b8c3-4d10-8bc0-d243958d0a70","navigationType":0,"readyForUser":989.5,"redirectCount":0,"resourceLoadedEnd":917.5,"resourceLoadedStart":238.20000004768372,"resourceTiming":[{"duration":164.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":238.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":402.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":164.5,"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":238.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":402.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":173.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":238.5,"connectEnd":238.5,"connectStart":238.5,"domainLookupEnd":238.5,"domainLookupStart":238.5,"fetchStart":238.5,"redirectEnd":0,"redirectStart":0,"requestStart":238.5,"responseEnd":411.7000000476837,"responseStart":411.7000000476837,"secureConnectionStart":238.5},{"duration":206.89999997615814,"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":238.80000007152557,"connectEnd":238.80000007152557,"connectStart":238.80000007152557,"domainLookupEnd":238.80000007152557,"domainLookupStart":238.80000007152557,"fetchStart":238.80000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":238.80000007152557,"responseEnd":445.7000000476837,"responseStart":445.7000000476837,"secureConnectionStart":238.80000007152557},{"duration":210.60000002384186,"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":239,"connectEnd":239,"connectStart":239,"domainLookupEnd":239,"domainLookupStart":239,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":239,"responseEnd":449.60000002384186,"responseStart":449.60000002384186,"secureConnectionStart":239},{"duration":210.89999997615814,"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":239.20000004768372,"connectEnd":239.20000004768372,"connectStart":239.20000004768372,"domainLookupEnd":239.20000004768372,"domainLookupStart":239.20000004768372,"fetchStart":239.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":239.20000004768372,"responseEnd":450.10000002384186,"responseStart":450.10000002384186,"secureConnectionStart":239.20000004768372},{"duration":211,"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":239.39999997615814,"connectEnd":239.39999997615814,"connectStart":239.39999997615814,"domainLookupEnd":239.39999997615814,"domainLookupStart":239.39999997615814,"fetchStart":239.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":239.39999997615814,"responseEnd":450.39999997615814,"responseStart":450.39999997615814,"secureConnectionStart":239.39999997615814},{"duration":315.39999997615814,"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":239.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":554.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":211.19999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":239.70000004768372,"connectEnd":239.70000004768372,"connectStart":239.70000004768372,"domainLookupEnd":239.70000004768372,"domainLookupStart":239.70000004768372,"fetchStart":239.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":239.70000004768372,"responseEnd":450.89999997615814,"responseStart":450.89999997615814,"secureConnectionStart":239.70000004768372},{"duration":315.10000002384186,"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":239.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":555,"responseStart":0,"secureConnectionStart":0},{"duration":211.39999997615814,"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":240,"connectEnd":240,"connectStart":240,"domainLookupEnd":240,"domainLookupStart":240,"fetchStart":240,"redirectEnd":0,"redirectStart":0,"requestStart":240,"responseEnd":451.39999997615814,"responseStart":451.39999997615814,"secureConnectionStart":240},{"duration":362.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":245.20000004768372,"connectEnd":245.20000004768372,"connectStart":245.20000004768372,"domainLookupEnd":245.20000004768372,"domainLookupStart":245.20000004768372,"fetchStart":245.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":245.20000004768372,"responseEnd":607.6000000238419,"responseStart":607.6000000238419,"secureConnectionStart":245.20000004768372},{"duration":403.5,"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":246.80000007152557,"connectEnd":246.80000007152557,"connectStart":246.80000007152557,"domainLookupEnd":246.80000007152557,"domainLookupStart":246.80000007152557,"fetchStart":246.80000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":246.80000007152557,"responseEnd":650.3000000715256,"responseStart":650.3000000715256,"secureConnectionStart":246.80000007152557},{"duration":67,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":582.6000000238419,"connectEnd":582.6000000238419,"connectStart":582.6000000238419,"domainLookupEnd":582.6000000238419,"domainLookupStart":582.6000000238419,"fetchStart":582.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":582.6000000238419,"responseEnd":649.6000000238419,"responseStart":649.6000000238419,"secureConnectionStart":582.6000000238419},{"duration":91.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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","startTime":825.8000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":825.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":917.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":91.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":826.3999999761581,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":826.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":917.5,"responseStart":0,"secureConnectionStart":0},{"duration":274.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":827.2000000476837,"connectEnd":827.2000000476837,"connectStart":827.2000000476837,"domainLookupEnd":827.2000000476837,"domainLookupStart":827.2000000476837,"fetchStart":827.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":827.2000000476837,"responseEnd":1102.1000000238419,"responseStart":1102.1000000238419,"secureConnectionStart":827.2000000476837},{"duration":280.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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","startTime":827.6000000238419,"connectEnd":827.6000000238419,"connectStart":827.6000000238419,"domainLookupEnd":827.6000000238419,"domainLookupStart":827.6000000238419,"fetchStart":827.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":827.6000000238419,"responseEnd":1108.5,"responseStart":1108.5,"secureConnectionStart":827.6000000238419},{"duration":282.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/86ee9bbc76cd1bcd8556fcdcf46241c9-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":827.8999999761581,"connectEnd":827.8999999761581,"connectStart":827.8999999761581,"domainLookupEnd":827.8999999761581,"domainLookupStart":827.8999999761581,"fetchStart":827.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":827.8999999761581,"responseEnd":1110,"responseStart":1110,"secureConnectionStart":827.8999999761581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":54,"responseStart":233,"responseEnd":247,"domLoading":237,"domInteractive":1072,"domContentLoadedEventStart":1072,"domContentLoadedEventEnd":1137,"domComplete":1211,"loadEventStart":1212,"loadEventEnd":1212,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1029.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1030.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1030.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":1035.5},{"name":"activityTabFullyLoaded","time":1155.8999999761581}],"measures":[],"correlationId":"8db2dc9e82ba79","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Notes from our discussion with varun:
#4 0x0000555555e04e1e in Filesort_buffer::alloc_sort_buffer (this=0x7ffff7f16e90, num_records=2, record_length=10) at /home/psergey/dev-git/10.1/sql/filesort_utils.cc:110
(gdb) print num_records
$6 = 2
(gdb) p m_idx_array.size()
$8 = 1129
and the number 1129 doesn't make any sense. It looks like the code is using some garbage value left over from the previous query.