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":950.4000000357628,"ttfb":258.60000002384186,"pageVisibility":"visible","entityId":72707,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"203b6321-9d64-4e86-996e-74809c26442b","navigationType":0,"readyForUser":1087,"redirectCount":0,"resourceLoadedEnd":665,"resourceLoadedStart":267.80000001192093,"resourceTiming":[{"duration":34.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":267.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":302.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":34.90000003576279,"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":268,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":302.9000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":285.5999999642372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":268.2000000476837,"connectEnd":268.2000000476837,"connectStart":268.2000000476837,"domainLookupEnd":268.2000000476837,"domainLookupStart":268.2000000476837,"fetchStart":268.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":307.7000000476837,"responseEnd":553.8000000119209,"responseStart":334.7000000476837,"secureConnectionStart":268.2000000476837},{"duration":396.5999999642372,"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":268.4000000357628,"connectEnd":268.4000000357628,"connectStart":268.4000000357628,"domainLookupEnd":268.4000000357628,"domainLookupStart":268.4000000357628,"fetchStart":268.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":310.10000002384186,"responseEnd":665,"responseStart":343.5,"secureConnectionStart":268.4000000357628},{"duration":81.89999997615814,"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":268.60000002384186,"connectEnd":268.60000002384186,"connectStart":268.60000002384186,"domainLookupEnd":268.60000002384186,"domainLookupStart":268.60000002384186,"fetchStart":268.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":310.60000002384186,"responseEnd":350.5,"responseStart":345,"secureConnectionStart":268.60000002384186},{"duration":87.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":268.80000001192093,"connectEnd":268.80000001192093,"connectStart":268.80000001192093,"domainLookupEnd":268.80000001192093,"domainLookupStart":268.80000001192093,"fetchStart":268.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":310.7000000476837,"responseEnd":355.9000000357628,"responseStart":345.7000000476837,"secureConnectionStart":268.80000001192093},{"duration":87.10000002384186,"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":269,"connectEnd":269,"connectStart":269,"domainLookupEnd":269,"domainLookupStart":269,"fetchStart":269,"redirectEnd":0,"redirectStart":0,"requestStart":311.4000000357628,"responseEnd":356.10000002384186,"responseStart":351,"secureConnectionStart":269},{"duration":40.30000001192093,"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":269.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":309.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":86.90000003576279,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":269.5,"connectEnd":269.5,"connectStart":269.5,"domainLookupEnd":269.5,"domainLookupStart":269.5,"fetchStart":269.5,"redirectEnd":0,"redirectStart":0,"requestStart":315.9000000357628,"responseEnd":356.4000000357628,"responseStart":352.2000000476837,"secureConnectionStart":269.5},{"duration":40.80000001192093,"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":269.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":310.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":96.5,"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":269.7000000476837,"connectEnd":269.7000000476837,"connectStart":269.7000000476837,"domainLookupEnd":269.7000000476837,"domainLookupStart":269.7000000476837,"fetchStart":269.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":316.5,"responseEnd":366.2000000476837,"responseStart":353.4000000357628,"secureConnectionStart":269.7000000476837},{"duration":386.60000002384186,"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":273.60000002384186,"connectEnd":273.60000002384186,"connectStart":273.60000002384186,"domainLookupEnd":273.60000002384186,"domainLookupStart":273.60000002384186,"fetchStart":273.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":355.7000000476837,"responseEnd":660.2000000476837,"responseStart":649.6000000238419,"secureConnectionStart":273.60000002384186},{"duration":387.80000001192093,"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":274.10000002384186,"connectEnd":274.10000002384186,"connectStart":274.10000002384186,"domainLookupEnd":274.10000002384186,"domainLookupStart":274.10000002384186,"fetchStart":274.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":386.80000001192093,"responseEnd":661.9000000357628,"responseStart":655.1000000238419,"secureConnectionStart":274.10000002384186},{"duration":118.60000002384186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":703.5,"connectEnd":703.5,"connectStart":703.5,"domainLookupEnd":703.5,"domainLookupStart":703.5,"fetchStart":703.5,"redirectEnd":0,"redirectStart":0,"requestStart":783.4000000357628,"responseEnd":822.1000000238419,"responseStart":816.7000000476837,"secureConnectionStart":703.5},{"duration":188.60000002384186,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":943.3000000119209,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":943.3000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1131.9000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":154.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":950.2000000476837,"connectEnd":950.2000000476837,"connectStart":950.2000000476837,"domainLookupEnd":950.2000000476837,"domainLookupStart":950.2000000476837,"fetchStart":950.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1068.6000000238419,"responseEnd":1104.5,"responseStart":1102.4000000357628,"secureConnectionStart":950.2000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":71,"responseStart":259,"responseEnd":271,"domLoading":263,"domInteractive":1166,"domContentLoadedEventStart":1166,"domContentLoadedEventEnd":1213,"domComplete":1427,"loadEventStart":1427,"loadEventEnd":1428,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1134.300000011921},{"name":"bigPipe.sidebar-id.end","time":1135},{"name":"bigPipe.activity-panel-pipe-id.start","time":1135.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1137.1000000238419},{"name":"activityTabFullyLoaded","time":1231.5}],"measures":[],"correlationId":"349149fb0207b","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"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.