Problem found during RQG testing.
CREATE TABLE IF NOT EXISTS t4 (
|
col1 INT,
|
col2 INT,
|
col_int INTEGER,
|
col_string VARCHAR(19),
|
col_varchar VARCHAR(500),
|
col_text TEXT,
|
col_int_g INTEGER GENERATED ALWAYS AS (col_int) PERSISTENT,
|
col_string_g VARCHAR(13) GENERATED ALWAYS AS (SUBSTR(col_string,4,13)) PERSISTENT,
|
col_text_g TEXT GENERATED ALWAYS AS (SUBSTR(col_text,1,499)) PERSISTENT)
|
ENGINE = InnoDB ROW_FORMAT = Redundant;
|
# The assert disappears if using "ENGINE = InnoDB" and not "ROW_FORMAT = Redundant".
|
ALTER TABLE t4 ADD PRIMARY KEY (col_text(9));
|
ALTER TABLE t4 DROP PRIMARY KEY;
|
ALTER TABLE t4 CHANGE COLUMN col_text col_text TEXT;
|
INSERT INTO t4 (col1) VALUES (NULL);
|
ALTER TABLE t4 MODIFY COLUMN col1 INT AFTER col_int;
|
ALTER TABLE t4 ADD COLUMN col_text_g_copy TEXT
|
GENERATED ALWAYS AS (SUBSTR(col_text,1,499)) VIRTUAL AFTER col1;
|
ALTER TABLE t4 DROP COLUMN col_text_g;
|
ERROR HY000: Lost connection to MySQL server during query
|
DROP TABLE t4;
|
...
|
Version: '10.4.3-MariaDB-debug-log' ...
|
mysqld: storage/innobase/btr/btr0btr.cc:1936: void btr_set_instant(buf_block_t*, const dict_index_t&, mtr_t*): Assertion `supremum[7] == index.n_core_null_bytes' failed.
|
190219 16:49:46 [ERROR] mysqld got signal 6 ;
|
...
|
Query (0x7f9b080145a0): ALTER TABLE t4 DROP COLUMN col_text_g
|
Connection ID (thread ID): 9
|
Status: NOT_KILLED
|
...
|
#3 <signal handler called>
|
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
|
#5 0x00007f9b649fff5d in __GI_abort () at abort.c:90
|
#6 0x00007f9b649f5f17 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x558ed002f598 "supremum[7] == index.n_core_null_bytes", file=file@entry=0x558ed002e660 "storage/innobase/btr/btr0btr.cc", line=line@entry=1936, function=function@entry=0x558ed0033060 <btr_set_instant(buf_block_t*, dict_index_t const&, mtr_t*)::__PRETTY_FUNCTION__> "void btr_set_instant(buf_block_t*, const dict_index_t&, mtr_t*)") at assert.c:92
|
#7 0x00007f9b649f5fc2 in __GI___assert_fail (assertion=0x558ed002f598 "supremum[7] == index.n_core_null_bytes", file=0x558ed002e660 "storage/innobase/btr/btr0btr.cc", line=1936, function=0x558ed0033060 <btr_set_instant(buf_block_t*, dict_index_t const&, mtr_t*)::__PRETTY_FUNCTION__> "void btr_set_instant(buf_block_t*, const dict_index_t&, mtr_t*)") at assert.c:101
|
#8 0x0000558ecf8fcab8 in btr_set_instant (root=0x7f9b5dfe1e70, index=..., mtr=0x7f9b5dd17090) at storage/innobase/btr/btr0btr.cc:1936
|
#9 0x0000558ecf700013 in innobase_instant_try (ha_alter_info=0x7f9b5dd18a90, ctx=0x7f9b08016928, altered_table=0x7f9b08071b58, table=0x7f9b08043f68, trx=0x7f9b5e803268) at storage/innobase/handler/handler0alter.cc:5699
|
#10 0x0000558ecf71c2de in commit_try_norebuild (ha_alter_info=0x7f9b5dd18a90, ctx=0x7f9b08016928, altered_table=0x7f9b08071b58, old_table=0x7f9b08043f68, trx=0x7f9b5e803268, table_name=0x7f9b08071945 "t4") at storage/innobase/handler/handler0alter.cc:10129
|
#11 0x0000558ecf70e395 in ha_innobase::commit_inplace_alter_table (this=0x7f9b080e5e40, altered_table=0x7f9b08071b58, ha_alter_info=0x7f9b5dd18a90, commit=true) at storage/innobase/handler/handler0alter.cc:10794
|
#12 0x0000558ecf4a0c23 in handler::ha_commit_inplace_alter_table (this=0x7f9b080e5e40, altered_table=0x7f9b08071b58, ha_alter_info=0x7f9b5dd18a90, commit=true) at sql/handler.cc:4673
|
#13 0x0000558ecf23b8be in mysql_inplace_alter_table (thd=0x7f9b08000ce8, table_list=0x7f9b08014698, table=0x7f9b08043f68, altered_table=0x7f9b08071b58, ha_alter_info=0x7f9b5dd18a90, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7f9b5dd18cc0, alter_ctx=0x7f9b5dd19270) at sql/sql_table.cc:7602
|
#14 0x0000558ecf2416f1 in mysql_alter_table (thd=0x7f9b08000ce8, new_db=0x7f9b080053f8, new_name=0x7f9b080057f8, create_info=0x7f9b5dd19e60, table_list=0x7f9b08014698, alter_info=0x7f9b5dd19da0, order_num=0, order=0x0, ignore=false) at sql/sql_table.cc:9700
|
#15 0x0000558ecf2ccb9f in Sql_cmd_alter_table::execute (this=0x7f9b08014d00, thd=0x7f9b08000ce8) at sql/sql_alter.cc:493
|
#16 0x0000558ecf16329f in mysql_execute_command (thd=0x7f9b08000ce8) at sql/sql_parse.cc:6330
|
#17 0x0000558ecf1686f2 in mysql_parse (thd=0x7f9b08000ce8, rawbuf=0x7f9b080145a0 "ALTER TABLE t4 DROP COLUMN col_text_g", length=37, parser_state=0x7f9b5dd1b1e0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8141
|
#18 0x0000558ecf153b02 in dispatch_command (command=COM_QUERY, thd=0x7f9b08000ce8, packet=0x7f9b0800a009 "ALTER TABLE t4 DROP COLUMN col_text_g", packet_length=37, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1819
|
#19 0x0000558ecf15234a in do_command (thd=0x7f9b08000ce8) at sql/sql_parse.cc:1357
|
#20 0x0000558ecf2c6add in do_handle_one_connection (connect=0x558ed1a73be8) at sql/sql_connect.cc:1399
|
#21 0x0000558ecf2c6841 in handle_one_connection (arg=0x558ed1a73be8) at sql/sql_connect.cc:1302
|
#22 0x0000558ecfbf8c54 in pfs_spawn_thread (arg=0x558ed1aba1d8) at storage/perfschema/pfs.cc:1862
|
#23 0x00007f9b658a57fc in start_thread (arg=0x7f9b5dd1c700) at pthread_create.c:465
|
#24 0x00007f9b64adbb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
10.4 commit abd3c202f6227a46f50c0d93cb621c9ed1e499c0 2019-02-19
|
The problem was not repeatable on
|
- 10.3 commit e8b6c15010e6fffe17e27c165b8c60b51a8f66a7 2019-02-13
|
- 10.2 commit af6fdc13072cc310cf17fd3b28c749515d9c563c 2019-02-19
|
{"report":{"fcp":881.4000000059605,"ttfb":286.2000000178814,"pageVisibility":"visible","entityId":72707,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6682cf43-f17d-47c4-9e84-ca5c468a1b66","navigationType":0,"readyForUser":970.2000000178814,"redirectCount":0,"resourceLoadedEnd":838.5,"resourceLoadedStart":293,"resourceTiming":[{"duration":29.599999994039536,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":293,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":293,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.59999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":29.599999994039536,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":293.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":293.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.90000000596046,"responseStart":0,"secureConnectionStart":0},{"duration":90.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":293.40000000596046,"connectEnd":293.40000000596046,"connectStart":293.40000000596046,"domainLookupEnd":293.40000000596046,"domainLookupStart":293.40000000596046,"fetchStart":293.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":293.40000000596046,"responseEnd":383.90000000596046,"responseStart":383.90000000596046,"secureConnectionStart":293.40000000596046},{"duration":164.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":293.59999999403954,"connectEnd":293.59999999403954,"connectStart":293.59999999403954,"domainLookupEnd":293.59999999403954,"domainLookupStart":293.59999999403954,"fetchStart":293.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":293.59999999403954,"responseEnd":458,"responseStart":458,"secureConnectionStart":293.59999999403954},{"duration":168.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":293.80000001192093,"connectEnd":293.80000001192093,"connectStart":293.80000001192093,"domainLookupEnd":293.80000001192093,"domainLookupStart":293.80000001192093,"fetchStart":293.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":293.80000001192093,"responseEnd":461.90000000596046,"responseStart":461.90000000596046,"secureConnectionStart":293.80000001192093},{"duration":168.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":294,"connectEnd":294,"connectStart":294,"domainLookupEnd":294,"domainLookupStart":294,"fetchStart":294,"redirectEnd":0,"redirectStart":0,"requestStart":294,"responseEnd":462.40000000596046,"responseStart":462.40000000596046,"secureConnectionStart":294},{"duration":168.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":294.2000000178814,"connectEnd":294.2000000178814,"connectStart":294.2000000178814,"domainLookupEnd":294.2000000178814,"domainLookupStart":294.2000000178814,"fetchStart":294.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":294.2000000178814,"responseEnd":462.80000001192093,"responseStart":462.80000001192093,"secureConnectionStart":294.2000000178814},{"duration":229.90000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":294.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":294.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":524.2000000178814,"responseStart":0,"secureConnectionStart":0},{"duration":168.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":294.5,"connectEnd":294.5,"connectStart":294.5,"domainLookupEnd":294.5,"domainLookupStart":294.5,"fetchStart":294.5,"redirectEnd":0,"redirectStart":0,"requestStart":294.5,"responseEnd":463.30000001192093,"responseStart":463.30000001192093,"secureConnectionStart":294.5},{"duration":229.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":294.7000000178814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":294.7000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":524.2000000178814,"responseStart":0,"secureConnectionStart":0},{"duration":169,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":294.80000001192093,"connectEnd":294.80000001192093,"connectStart":294.80000001192093,"domainLookupEnd":294.80000001192093,"domainLookupStart":294.80000001192093,"fetchStart":294.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":294.80000001192093,"responseEnd":463.80000001192093,"responseStart":463.80000001192093,"secureConnectionStart":294.80000001192093},{"duration":429.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":295.90000000596046,"connectEnd":295.90000000596046,"connectStart":295.90000000596046,"domainLookupEnd":295.90000000596046,"domainLookupStart":295.90000000596046,"fetchStart":295.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":295.90000000596046,"responseEnd":725.4000000059605,"responseStart":725.4000000059605,"secureConnectionStart":295.90000000596046},{"duration":522.2000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":296,"connectEnd":296,"connectStart":296,"domainLookupEnd":296,"domainLookupStart":296,"fetchStart":296,"redirectEnd":0,"redirectStart":0,"requestStart":296,"responseEnd":818.2000000178814,"responseStart":818.2000000178814,"secureConnectionStart":296},{"duration":191.09999999403954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":535.4000000059605,"connectEnd":535.4000000059605,"connectStart":535.4000000059605,"domainLookupEnd":535.4000000059605,"domainLookupStart":535.4000000059605,"fetchStart":535.4000000059605,"redirectEnd":0,"redirectStart":0,"requestStart":535.4000000059605,"responseEnd":726.5,"responseStart":726.5,"secureConnectionStart":535.4000000059605},{"duration":51.29999998211861,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":787.2000000178814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":787.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":838.5,"responseStart":0,"secureConnectionStart":0},{"duration":256,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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":788.2000000178814,"connectEnd":788.2000000178814,"connectStart":788.2000000178814,"domainLookupEnd":788.2000000178814,"domainLookupStart":788.2000000178814,"fetchStart":788.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":788.2000000178814,"responseEnd":1044.2000000178814,"responseStart":1044.2000000178814,"secureConnectionStart":788.2000000178814},{"duration":261,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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":788.5,"connectEnd":788.5,"connectStart":788.5,"domainLookupEnd":788.5,"domainLookupStart":788.5,"fetchStart":788.5,"redirectEnd":0,"redirectStart":0,"requestStart":788.5,"responseEnd":1049.5,"responseStart":1049.5,"secureConnectionStart":788.5},{"duration":218,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":873.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":873.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1091.5,"responseStart":0,"secureConnectionStart":0},{"duration":191.59999999403954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":894.2000000178814,"connectEnd":894.2000000178814,"connectStart":894.2000000178814,"domainLookupEnd":894.2000000178814,"domainLookupStart":894.2000000178814,"fetchStart":894.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":894.2000000178814,"responseEnd":1085.800000011921,"responseStart":1085.800000011921,"secureConnectionStart":894.2000000178814}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":60,"responseStart":287,"responseEnd":289,"domLoading":290,"domInteractive":1034,"domContentLoadedEventStart":1034,"domContentLoadedEventEnd":1084,"domComplete":1185,"loadEventStart":1185,"loadEventEnd":1186,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1010},{"name":"bigPipe.sidebar-id.end","time":1010.5999999940395},{"name":"bigPipe.activity-panel-pipe-id.start","time":1010.8000000119209},{"name":"bigPipe.activity-panel-pipe-id.end","time":1012.5},{"name":"activityTabFullyLoaded","time":1102.7000000178814}],"measures":[],"correlationId":"2e82c31f8f0df8","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":156,"dbReadsTimeInMs":17,"dbConnsTimeInMs":28,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This looks like a regression from the first part of
MDEV-15563that implemented instant NOT NULL removal for ROW_FORMAT=REDUNDANT. A similar bug was fixed inMDEV-18048.The failing assertion is bogus for ROW_FORMAT=REDUNDANT tables. The dict_index_t::n_core_null_bytes and dict_index_t::n_nullable do not matter for ROW_FORMAT=REDUNDANT, because in this format there is no separate null flag bitmap in the record header, and the null flags are instead embedded in the end-of-field pointers.