Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
N/A
Stack trace from bb-10.1-jan-encryption commit 549ed8c69b29050135bcdd045870dccd56b46d3b
#3 <signal handler called>
#4 0x00007f85f461d492 in page_cur_is_after_last (cur=0x7f85f3bcf978) at storage/xtradb/include/page0cur.ic:152
#5 0x00007f85f461d57c in page_cur_move_to_next (cur=0x7f85f3bcf978) at storage/xtradb/include/page0cur.ic:196
#6 0x00007f85f4621a6f in row_merge_read_clustered_index (trx=0x7f85db99a678, table=0x7f85db8f8070, old_table=0x7f85db981378, new_table=0x7f85db9815f8, online=true, index=0x7f85db81f070, fts_sort_idx=0x0, psort_info=0x0, files=0x7f85db860b78, key_numbers=0x7f85db81f078, n_index=1, add_cols=0x0, col_map=0x7f85db81f0c0, add_autoinc=18446744073709551615, sequence=..., block=0x7f85e98ff000 <Address 0x7f85e98ff000 out of bounds>, pct_cost=50) at storage/xtradb/row/row0merge.cc:1436
#7 0x00007f85f4626ef7 in row_merge_build_indexes (trx=0x7f85db99a678, old_table=0x7f85db981378, new_table=0x7f85db9815f8, online=true, indexes=0x7f85db81f070, key_numbers=0x7f85db81f078, n_indexes=1, table=0x7f85db8f8070, add_cols=0x0, col_map=0x7f85db81f0c0, add_autoinc=18446744073709551615, sequence=...) at storage/xtradb/row/row0merge.cc:3772
#8 0x00007f85f454a8be in ha_innobase::inplace_alter_table (this=0x7f85db87d088, altered_table=0x7f85db8f8070, ha_alter_info=0x7f85f3bd0630) at storage/xtradb/handler/handler0alter.cc:4076
#9 0x00007f85f41fb981 in handler::ha_inplace_alter_table (this=0x7f85db87d088, altered_table=0x7f85db8f8070, ha_alter_info=0x7f85f3bd0630) at sql/handler.h:3671
#10 0x00007f85f41f39eb in mysql_inplace_alter_table (thd=0x7f85e54dc070, table_list=0x7f85db8e4170, table=0x7f85db89ea70, altered_table=0x7f85db8f8070, ha_alter_info=0x7f85f3bd0630, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f85f3bd06a0, alter_ctx=0x7f85f3bd1230) at sql/sql_table.cc:7058
#11 0x00007f85f41f83ab in mysql_alter_table (thd=0x7f85e54dc070, new_db=0x7f85db8e4750 "test", new_name=0x0, create_info=0x7f85f3bd1e20, table_list=0x7f85db8e4170, alter_info=0x7f85f3bd1d90, order_num=0, order=0x0, ignore=false) at sql/sql_table.cc:8864
#12 0x00007f85f4268995 in Sql_cmd_alter_table::execute (this=0x7f85db8e4760, thd=0x7f85e54dc070) at sql/sql_alter.cc:325
#13 0x00007f85f413ddcb in mysql_execute_command (thd=0x7f85e54dc070) at sql/sql_parse.cc:5607
#14 0x00007f85f41420df in mysql_parse (thd=0x7f85e54dc070, rawbuf=0x7f85db8e4088 "alter table t1 engine=InnoDB", length=28, parser_state=0x7f85f3bd31a0) at sql/sql_parse.cc:7208
#15 0x00007f85f4130e63 in dispatch_command (command=COM_QUERY, thd=0x7f85e54dc070, packet=0x7f85eb3f5071 "alter table t1 engine=InnoDB", packet_length=28) at sql/sql_parse.cc:1475
#16 0x00007f85f412fb89 in do_command (thd=0x7f85e54dc070) at sql/sql_parse.cc:1097
#17 0x00007f85f4263ed1 in do_handle_one_connection (thd_arg=0x7f85e54dc070) at sql/sql_connect.cc:1350
#18 0x00007f85f4263c22 in handle_one_connection (arg=0x7f85e54dc070) at sql/sql_connect.cc:1262
#19 0x00007f85f4829fe7 in pfs_spawn_thread (arg=0x7f85e54d4d70) at storage/perfschema/pfs.cc:1860
#20 0x00007f85f3814b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#21 0x00007f85f16a095d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
Test flow
- start server with encryption and valid keys 1 and 4;
- create innodb table with key 4, insert some data;
- restart server with the same key 1 and different key 4;
- try to select from the table (error);
- try to discard tablespace (error);
- try to alter the table (ALTER TABLE .. ENGINE=InnoDB)
=> crash
Test case
--source include/have_innodb.inc
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--write_file $MYSQLTEST_VARDIR/keys1.txt
1;770A8A65DA156D24EE2A093277530142
4;770A8A65DA156D24EE2A093277530143
EOF
--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--write_file $MYSQLTEST_VARDIR/keys2.txt
1;770A8A65DA156D24EE2A093277530142
4;770A8A65DA156D24EE2A093277530144
EOF
--exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--error 0,ER_NO_SUCH_TABLE_IN_ENGINE
select * from t1;
--error 0,ER_NO_SUCH_TABLE_IN_ENGINE
alter table t1 discard tablespace;
alter table t1 engine=InnoDB;
Note: innodb_stats_persistent is important for the test flow, so it's reset to the default ON (normally MTR turns it off). An issue with its unexpected importance will be filed separately.
Transition
Time In Source Status
Execution Times
Open
In Progress
3h 2m
1
In Progress
Closed
19h 15m
1
{"report":{"fcp":1122.7000000476837,"ttfb":263.2000000476837,"pageVisibility":"visible","entityId":52957,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a0537b84-1f2e-4219-87af-018a63af68d4","navigationType":0,"readyForUser":1273,"redirectCount":0,"resourceLoadedEnd":1318.1000000238419,"resourceLoadedStart":270.7999999523163,"resourceTiming":[{"duration":121.30000007152557,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":270.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":392.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":122,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":271,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":271,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":393,"responseStart":0,"secureConnectionStart":0},{"duration":188.69999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":271.2000000476837,"connectEnd":271.2000000476837,"connectStart":271.2000000476837,"domainLookupEnd":271.2000000476837,"domainLookupStart":271.2000000476837,"fetchStart":271.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":271.2000000476837,"responseEnd":459.89999997615814,"responseStart":459.89999997615814,"secureConnectionStart":271.2000000476837},{"duration":500.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":271.5,"connectEnd":271.5,"connectStart":271.5,"domainLookupEnd":271.5,"domainLookupStart":271.5,"fetchStart":271.5,"redirectEnd":0,"redirectStart":0,"requestStart":271.5,"responseEnd":771.8999999761581,"responseStart":771.7999999523163,"secureConnectionStart":271.5},{"duration":504.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":271.60000002384186,"connectEnd":271.60000002384186,"connectStart":271.60000002384186,"domainLookupEnd":271.60000002384186,"domainLookupStart":271.60000002384186,"fetchStart":271.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":271.60000002384186,"responseEnd":775.8999999761581,"responseStart":775.7999999523163,"secureConnectionStart":271.60000002384186},{"duration":503.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":272.89999997615814,"connectEnd":272.89999997615814,"connectStart":272.89999997615814,"domainLookupEnd":272.89999997615814,"domainLookupStart":272.89999997615814,"fetchStart":272.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":272.89999997615814,"responseEnd":776.2999999523163,"responseStart":776.2999999523163,"secureConnectionStart":272.89999997615814},{"duration":503.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":273.2000000476837,"connectEnd":273.2000000476837,"connectStart":273.2000000476837,"domainLookupEnd":273.2000000476837,"domainLookupStart":273.2000000476837,"fetchStart":273.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":273.2000000476837,"responseEnd":776.7000000476837,"responseStart":776.7000000476837,"secureConnectionStart":273.2000000476837},{"duration":512.3000000715256,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":273.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":273.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":785.6000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":503.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":273.5,"connectEnd":273.5,"connectStart":273.5,"domainLookupEnd":273.5,"domainLookupStart":273.5,"fetchStart":273.5,"redirectEnd":0,"redirectStart":0,"requestStart":273.5,"responseEnd":777.1000000238419,"responseStart":777.1000000238419,"secureConnectionStart":273.5},{"duration":512.1000000238419,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":273.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":273.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":785.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":503.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":273.7000000476837,"connectEnd":273.7000000476837,"connectStart":273.7000000476837,"domainLookupEnd":273.7000000476837,"domainLookupStart":273.7000000476837,"fetchStart":273.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":273.7000000476837,"responseEnd":777.6000000238419,"responseStart":777.6000000238419,"secureConnectionStart":273.7000000476837},{"duration":836.6000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":274.60000002384186,"connectEnd":274.60000002384186,"connectStart":274.60000002384186,"domainLookupEnd":274.60000002384186,"domainLookupStart":274.60000002384186,"fetchStart":274.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":274.60000002384186,"responseEnd":1111.2000000476837,"responseStart":1111.2000000476837,"secureConnectionStart":274.60000002384186},{"duration":903.1999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":274.60000002384186,"connectEnd":274.60000002384186,"connectStart":274.60000002384186,"domainLookupEnd":274.60000002384186,"domainLookupStart":274.60000002384186,"fetchStart":274.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":274.60000002384186,"responseEnd":1177.7999999523163,"responseStart":1177.7999999523163,"secureConnectionStart":274.60000002384186},{"duration":498.2000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":612.5,"connectEnd":612.5,"connectStart":612.5,"domainLookupEnd":612.5,"domainLookupStart":612.5,"fetchStart":612.5,"redirectEnd":0,"redirectStart":0,"requestStart":612.5,"responseEnd":1110.7000000476837,"responseStart":1110.7000000476837,"secureConnectionStart":612.5},{"duration":210.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1325.5,"responseStart":0,"secureConnectionStart":0},{"duration":180.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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&whisper-enabled=true","startTime":1137.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1137.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1317.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":180.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/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&whisper-enabled=true","startTime":1138,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1138,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1318.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":104.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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&whisper-enabled=true","startTime":1138.8999999761581,"connectEnd":1138.8999999761581,"connectStart":1138.8999999761581,"domainLookupEnd":1138.8999999761581,"domainLookupStart":1138.8999999761581,"fetchStart":1138.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1138.8999999761581,"responseEnd":1243.3999999761581,"responseStart":1243.3999999761581,"secureConnectionStart":1138.8999999761581},{"duration":110.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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&whisper-enabled=true","startTime":1139.5,"connectEnd":1139.5,"connectStart":1139.5,"domainLookupEnd":1139.5,"domainLookupStart":1139.5,"fetchStart":1139.5,"redirectEnd":0,"redirectStart":0,"requestStart":1139.5,"responseEnd":1250.3999999761581,"responseStart":1250.3999999761581,"secureConnectionStart":1139.5},{"duration":112.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/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&whisper-enabled=true","startTime":1140,"connectEnd":1140,"connectStart":1140,"domainLookupEnd":1140,"domainLookupStart":1140,"fetchStart":1140,"redirectEnd":0,"redirectStart":0,"requestStart":1140,"responseEnd":1252.2999999523163,"responseStart":1252.2999999523163,"secureConnectionStart":1140}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":84,"responseStart":263,"responseEnd":264,"domLoading":267,"domInteractive":1374,"domContentLoadedEventStart":1374,"domContentLoadedEventEnd":1424,"domComplete":1625,"loadEventStart":1625,"loadEventEnd":1627,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1336.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1337.1000000238419},{"name":"bigPipe.activity-panel-pipe-id.start","time":1337.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1338.2000000476837},{"name":"activityTabFullyLoaded","time":1442.7999999523163}],"measures":[],"correlationId":"814bf025b00eca","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":17,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}