Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.0.1 , 5.5.30 , 5.1.67 , 5.2.14 , 5.3.12
Component/s:
None
CREATE TABLE t1 (a INT , b INT ) ENGINE=MyISAM;
INSERT t1 VALUES (3,2004),(2,2006),(1,2007),(3,2008),(2,2005),(2,2001);
SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b;
mysqld: ma_blockrec.c:701: check_directory: Assertion `empty_size == empty_size_on_page' failed.
mysqld got signal 6 ;
#7 0x00007f5cfcba5192 in __GI___assert_fail (assertion=0xd8b680 "empty_size == empty_size_on_page", file=0xd8b5b6 "ma_blockrec.c", line=701, function=0xd8d720 "check_directory") at assert.c:103
#8 0x00000000009ea8da in check_directory (buff=0x7f5cf054d038 "", block_size=8192, min_row_length=0, real_empty_size=73376) at ma_blockrec.c:701
#9 0x00000000009f3349 in delete_dir_entry (buff=0x7f5cf054d038 "", block_size=8192, record_number=3, empty_space_res=0x7f5cefd4943c) at ma_blockrec.c:4099
#10 0x00000000009f3557 in delete_head_or_tail (info=0x7f5ce003a438, page=1, record_number=3, head=1 '\001', from_update=0 '\000') at ma_blockrec.c:4161
#11 0x00000000009f3a8c in _ma_delete_block_record (info=0x7f5ce003a438, record=0x7f5ce001b248 "\376\376\326\a") at ma_blockrec.c:4280
#12 0x0000000000961d41 in maria_delete (info=0x7f5ce003a438, record=0x7f5ce001b248 "\376\376\326\a") at ma_delete.c:109
#13 0x000000000094025b in ha_maria::delete_row (this=0x7f5ce001b0b8, buf=0x7f5ce001b248 "\376\376\326\a") at ha_maria.cc:2125
#14 0x00000000007ce044 in handler::ha_delete_row (this=0x7f5ce001b0b8, buf=0x7f5ce001b248 "\376\376\326\a") at handler.cc:4829
#15 0x000000000071eb81 in remove_dup_with_compare (thd=0x3a98c98, table=0x7f5ce0032d60, first_field=0x7f5ce00339d0, offset=6, having=0x0) at sql_select.cc:14645
#16 0x000000000071e897 in remove_duplicates (join=0x7f5ce0030d70, entry=0x7f5ce0032d60, fields=..., having=0x0) at sql_select.cc:14575
#17 0x00000000006feafa in JOIN::exec (this=0x7f5ce0030d70) at sql_select.cc:2158
#18 0x00000000006fffe7 in mysql_select (thd=0x3a98c98, rref_pointer_array=0x3a9b030, tables=0x7f5ce001cd60, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f5ce001d1a0, having=0x0, proc_param=0x0, select_options=2147764737, result=0x7f5ce001d270, unit=0x3a9aa30, select_lex=0x3a9ae58) at sql_select.cc:2576
#19 0x00000000006f7e69 in handle_select (thd=0x3a98c98, lex=0x3a9a990, result=0x7f5ce001d270, setup_tables_done_option=0) at sql_select.cc:280
#20 0x0000000000695116 in execute_sqlcom_select (thd=0x3a98c98, all_tables=0x7f5ce001cd60) at sql_parse.cc:5247
#21 0x000000000068bf90 in mysql_execute_command (thd=0x3a98c98) at sql_parse.cc:2386
#22 0x00000000006978f9 in mysql_parse (thd=0x3a98c98, rawbuf=0x7f5ce001c690 "SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b", length=50, found_semicolon=0x7f5cefd4a900) at sql_parse.cc:6222
#23 0x0000000000689729 in dispatch_command (command=COM_QUERY, thd=0x3a98c98, packet=0x3b05969 "SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b", packet_length=50) at sql_parse.cc:1294
#24 0x0000000000688624 in do_command (thd=0x3a98c98) at sql_parse.cc:906
#25 0x00000000006855bb in handle_one_connection (arg=0x3a98c98) at sql_connect.cc:1238
#26 0x00007f5cfcf3ce9a in start_thread (arg=0x7f5cefd4b700) at pthread_create.c:308
#27 0x00007f5cfcc69cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
revision-id: holyfoot@askmonty.org-20130310190805-3jncxhq14nr7vw66
revno: 3188
branch-nick: 5.1
Built with BUILD/compile-pentium-debug-max-no-ndb
Also reproducible on current 5.2, 5.3, 5.5, 10.0 trees.
With a slightly different dataset, there is no assertion failure, but ER_NOT_KEYFILE is produced instead:
CREATE TABLE t1 (a INT , b INT ) ENGINE=MyISAM;
INSERT t1 VALUES (3,1),(2,2),(1,3),(3,4),(2,5),(2,6);
SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b;
Result:
MariaDB [test]> SELECT DISTINCT GROUP_CONCAT(a) FROM t1 GROUP BY b;
ERROR 1034 (HY000): Incorrect key file for table '/home/elenst/bzr/5.1/data/tmp/#sql_1245_0' ; try to repair it
Yet another test case, now without GROUP_CONCAT:
CREATE TABLE t1 (a INT , b VARCHAR (1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (7, 'q' ),(2, NULL ),(7, 'g' ),(6, 'x' );
SELECT DISTINCT MAX ( a ) FROM t1 GROUP BY b ORDER BY DES_DECRYPT( b );
Result:
query 'SELECT DISTINCT MAX( a ) FROM t1 GROUP BY b ORDER BY DES_DECRYPT( b )' failed: 1034: Incorrect key file for table '5.3/mysql-test/var/tmp/mysqld.1/#sql_5791_0'; try to repair it
{"report":{"fcp":764.5,"ttfb":222,"pageVisibility":"visible","entityId":23302,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"67d4a237-fa5a-45fe-b9d2-308524fca899","navigationType":0,"readyForUser":888.3000001907349,"redirectCount":0,"resourceLoadedEnd":735.9000000953674,"resourceLoadedStart":228.20000004768372,"resourceTiming":[{"duration":41.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":228.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":228.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":269.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":41.60000014305115,"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":228.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":228.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":270.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":102,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":228.60000014305115,"connectEnd":228.60000014305115,"connectStart":228.60000014305115,"domainLookupEnd":228.60000014305115,"domainLookupStart":228.60000014305115,"fetchStart":228.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":228.60000014305115,"responseEnd":330.60000014305115,"responseStart":330.60000014305115,"secureConnectionStart":228.60000014305115},{"duration":181.89999985694885,"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":228.80000019073486,"connectEnd":228.80000019073486,"connectStart":228.80000019073486,"domainLookupEnd":228.80000019073486,"domainLookupStart":228.80000019073486,"fetchStart":228.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":228.80000019073486,"responseEnd":410.7000000476837,"responseStart":410.7000000476837,"secureConnectionStart":228.80000019073486},{"duration":178.09999990463257,"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":228.80000019073486,"connectEnd":228.80000019073486,"connectStart":228.80000019073486,"domainLookupEnd":228.80000019073486,"domainLookupStart":228.80000019073486,"fetchStart":228.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":228.80000019073486,"responseEnd":406.90000009536743,"responseStart":406.90000009536743,"secureConnectionStart":228.80000019073486},{"duration":182.29999995231628,"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":228.90000009536743,"connectEnd":228.90000009536743,"connectStart":228.90000009536743,"domainLookupEnd":228.90000009536743,"domainLookupStart":228.90000009536743,"fetchStart":228.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":228.90000009536743,"responseEnd":411.2000000476837,"responseStart":411.2000000476837,"secureConnectionStart":228.90000009536743},{"duration":182.80000019073486,"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":229,"connectEnd":229,"connectStart":229,"domainLookupEnd":229,"domainLookupStart":229,"fetchStart":229,"redirectEnd":0,"redirectStart":0,"requestStart":229,"responseEnd":411.80000019073486,"responseStart":411.80000019073486,"secureConnectionStart":229},{"duration":183.20000004768372,"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":229.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":412.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":183.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":229.20000004768372,"connectEnd":229.20000004768372,"connectStart":229.20000004768372,"domainLookupEnd":229.20000004768372,"domainLookupStart":229.20000004768372,"fetchStart":229.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":229.20000004768372,"responseEnd":412.40000009536743,"responseStart":412.40000009536743,"secureConnectionStart":229.20000004768372},{"duration":183.59999990463257,"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":229.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":413,"responseStart":0,"secureConnectionStart":0},{"duration":183.70000004768372,"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":229.5,"connectEnd":229.5,"connectStart":229.5,"domainLookupEnd":229.5,"domainLookupStart":229.5,"fetchStart":229.5,"redirectEnd":0,"redirectStart":0,"requestStart":229.5,"responseEnd":413.2000000476837,"responseStart":413.2000000476837,"secureConnectionStart":229.5},{"duration":493.80000019073486,"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":230,"connectEnd":230,"connectStart":230,"domainLookupEnd":230,"domainLookupStart":230,"fetchStart":230,"redirectEnd":0,"redirectStart":0,"requestStart":230,"responseEnd":723.8000001907349,"responseStart":723.8000001907349,"secureConnectionStart":230},{"duration":505.7999999523163,"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":230.10000014305115,"connectEnd":230.10000014305115,"connectStart":230.10000014305115,"domainLookupEnd":230.10000014305115,"domainLookupStart":230.10000014305115,"fetchStart":230.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":230.10000014305115,"responseEnd":735.9000000953674,"responseStart":735.9000000953674,"secureConnectionStart":230.10000014305115},{"duration":178.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":550.8000001907349,"connectEnd":550.8000001907349,"connectStart":550.8000001907349,"domainLookupEnd":550.8000001907349,"domainLookupStart":550.8000001907349,"fetchStart":550.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":550.8000001907349,"responseEnd":729.4000000953674,"responseStart":729.4000000953674,"secureConnectionStart":550.8000001907349},{"duration":2.9000000953674316,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":741.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":741.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":744.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":155.89999985694885,"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":812.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":812.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":968.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":155.20000004768372,"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":813.6000001430511,"connectEnd":813.6000001430511,"connectStart":813.6000001430511,"domainLookupEnd":813.6000001430511,"domainLookupStart":813.6000001430511,"fetchStart":813.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":813.6000001430511,"responseEnd":968.8000001907349,"responseStart":968.8000001907349,"secureConnectionStart":813.6000001430511},{"duration":162.79999995231628,"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":814.1000001430511,"connectEnd":814.1000001430511,"connectStart":814.1000001430511,"domainLookupEnd":814.1000001430511,"domainLookupStart":814.1000001430511,"fetchStart":814.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":814.1000001430511,"responseEnd":976.9000000953674,"responseStart":976.9000000953674,"secureConnectionStart":814.1000001430511}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":83,"responseStart":222,"responseEnd":225,"domLoading":226,"domInteractive":950,"domContentLoadedEventStart":950,"domContentLoadedEventEnd":987,"domComplete":2030,"loadEventStart":2030,"loadEventEnd":2032,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":930.7000000476837},{"name":"bigPipe.sidebar-id.end","time":931.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":931.6000001430511},{"name":"bigPipe.activity-panel-pipe-id.end","time":934.2000000476837},{"name":"activityTabFullyLoaded","time":997.6000001430511}],"measures":[],"correlationId":"7db2ef37ecea9b","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":76,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}