--source include/have_innodb.inc
|
|
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a)) ENGINE=InnoDB;
|
ALTER TABLE t1 ADD FOREIGN KEY (b) REFERENCES t1 (a) ON UPDATE CASCADE;
|
LOCK TABLE t1 WRITE;
|
TRUNCATE TABLE t1;
|
ALTER TABLE t1 ADD c INT;
|
|
# Cleanup
|
UNLOCK TABLES;
|
DROP TABLE t1;
|
10.2 51b7438d debug and non-debug alike
|
mysqltest: At line 7: query 'ALTER TABLE t1 ADD c INT' failed: 1932: Table 'test.t1' doesn't exist in engine
|
2021-01-06 1:44:39 140509058860800 [Warning] InnoDB: Table test/t1 contains 2 user defined columns in InnoDB, but 3 columns in MariaDB. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
|
10.5 20727387 non-debug
|
mysqltest: At line 7: query 'ALTER TABLE t1 ADD c INT' failed: 1194: Table 't1' is marked as crashed and should be repaired
|
2021-01-06 1:45:53 4 [Warning] InnoDB: Table test/t1 contains 2 user defined columns in InnoDB, but 3 columns in MariaDB. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
|
2021-01-06 1:45:53 4 [ERROR] mariadbd: Table 't1' is marked as crashed and should be repaired
|
10.5 20727387 debug
|
2021-01-06 1:46:48 4 [Warning] InnoDB: Table test/t1 contains 2 user defined columns in InnoDB, but 3 columns in MariaDB. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
|
2021-01-06 1:46:48 4 [ERROR] mariadbd: Table 't1' is marked as crashed and should be repaired
|
mariadbd: /data/src/10.5/sql/sql_base.cc:2375: int Locked_tables_list::unlock_locked_tables(THD*): Assertion `thd->transaction->stmt.is_empty()' failed.
|
210106 1:46:48 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fe54d198f36 in __GI___assert_fail (assertion=0x56169620e3c0 "thd->transaction->stmt.is_empty()", file=0x56169620d7c0 "/data/src/10.5/sql/sql_base.cc", line=2375, function=0x56169620e388 "int Locked_tables_list::unlock_locked_tables(THD*)") at assert.c:101
|
#8 0x00005616953ab046 in Locked_tables_list::unlock_locked_tables (this=0x7fe510004d90, thd=0x7fe510000db8) at /data/src/10.5/sql/sql_base.cc:2375
|
#9 0x00005616953ab4b6 in Locked_tables_list::unlink_all_closed_tables (this=0x7fe510004d90, thd=0x7fe510000db8, lock=0x0, reopen_count=0) at /data/src/10.5/sql/sql_base.cc:2557
|
#10 0x00005616953aba61 in Locked_tables_list::reopen_tables (this=0x7fe510004d90, thd=0x7fe510000db8, need_reopen=false) at /data/src/10.5/sql/sql_base.cc:2654
|
#11 0x0000561695561cfc in mysql_alter_table (thd=0x7fe510000db8, new_db=0x7fe510005800, new_name=0x7fe510005c00, create_info=0x7fe548142420, table_list=0x7fe510014010, alter_info=0x7fe548142350, order_num=0, order=0x0, ignore=false, if_exists=false) at /data/src/10.5/sql/sql_table.cc:11044
|
#12 0x0000561695608adc in Sql_cmd_alter_table::execute (this=0x7fe5100147f8, thd=0x7fe510000db8) at /data/src/10.5/sql/sql_alter.cc:539
|
#13 0x000056169545f9cc in mysql_execute_command (thd=0x7fe510000db8) at /data/src/10.5/sql/sql_parse.cc:6006
|
#14 0x0000561695465d88 in mysql_parse (thd=0x7fe510000db8, rawbuf=0x7fe510013f30 "ALTER TABLE t1 ADD c INT", length=24, parser_state=0x7fe548143510, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8042
|
#15 0x0000561695451d6b in dispatch_command (command=COM_QUERY, thd=0x7fe510000db8, packet=0x7fe5100090a9 "ALTER TABLE t1 ADD c INT", packet_length=24, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1872
|
#16 0x000056169545055f in do_command (thd=0x7fe510000db8) at /data/src/10.5/sql/sql_parse.cc:1353
|
#17 0x00005616955fde9f in do_handle_one_connection (connect=0x5616984b58a8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1410
|
#18 0x00005616955fdc02 in handle_one_connection (arg=0x5616984cf308) at /data/src/10.5/sql/sql_connect.cc:1312
|
#19 0x0000561695b5c74d in pfs_spawn_thread (arg=0x5616984b54e8) at /data/src/10.5/storage/perfschema/pfs.cc:2201
|
#20 0x00007fe54d6b0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#21 0x00007fe54d284293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Reproducible on 10.2-10.6 with slight differences as described above.
Not reproducible on 10.1.
Not reproducible on MySQL 5.7 or 8.0.
{"report":{"fcp":2466.800000190735,"ttfb":427,"pageVisibility":"visible","entityId":95638,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"68ae2da9-0fee-441f-8cca-fd8c3a7006e5","navigationType":0,"readyForUser":2530.6000003814697,"redirectCount":0,"resourceLoadedEnd":1648.1000003814697,"resourceLoadedStart":452.7000002861023,"resourceTiming":[{"duration":524.0999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":452.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":452.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":976.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":530.3000001907349,"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":453,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":453,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":983.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":905.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":454.2000002861023,"connectEnd":454.2000002861023,"connectStart":454.2000002861023,"domainLookupEnd":454.2000002861023,"domainLookupStart":454.2000002861023,"fetchStart":454.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1024.4000000953674,"responseEnd":1359.4000000953674,"responseStart":1075.2000002861023,"secureConnectionStart":454.2000002861023},{"duration":1193.7000002861023,"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":454.40000009536743,"connectEnd":454.40000009536743,"connectStart":454.40000009536743,"domainLookupEnd":454.40000009536743,"domainLookupStart":454.40000009536743,"fetchStart":454.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1024.9000000953674,"responseEnd":1648.1000003814697,"responseStart":1134.7000002861023,"secureConnectionStart":454.40000009536743},{"duration":685,"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":454.7000002861023,"connectEnd":454.7000002861023,"connectStart":454.7000002861023,"domainLookupEnd":454.7000002861023,"domainLookupStart":454.7000002861023,"fetchStart":454.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1025.7000002861023,"responseEnd":1139.7000002861023,"responseStart":1138.4000000953674,"secureConnectionStart":454.7000002861023},{"duration":635,"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":454.80000019073486,"connectEnd":454.80000019073486,"connectStart":454.80000019073486,"domainLookupEnd":454.80000019073486,"domainLookupStart":454.80000019073486,"fetchStart":454.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":1025.8000001907349,"responseEnd":1089.8000001907349,"responseStart":1079,"secureConnectionStart":454.80000019073486},{"duration":635.5999999046326,"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":455.2000002861023,"connectEnd":455.2000002861023,"connectStart":455.2000002861023,"domainLookupEnd":455.2000002861023,"domainLookupStart":455.2000002861023,"fetchStart":455.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1025.9000000953674,"responseEnd":1090.8000001907349,"responseStart":1079.9000000953674,"secureConnectionStart":455.2000002861023},{"duration":548.5,"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":455.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":455.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1003.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":636,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":455.5,"connectEnd":455.5,"connectStart":455.5,"domainLookupEnd":455.5,"domainLookupStart":455.5,"fetchStart":455.5,"redirectEnd":0,"redirectStart":0,"requestStart":1026.4000000953674,"responseEnd":1091.5,"responseStart":1081.7000002861023,"secureConnectionStart":455.5},{"duration":548.5999999046326,"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":455.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":455.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1004.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":637.7000002861023,"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":455.90000009536743,"connectEnd":455.90000009536743,"connectStart":455.90000009536743,"domainLookupEnd":455.90000009536743,"domainLookupStart":455.90000009536743,"fetchStart":455.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1027,"responseEnd":1093.6000003814697,"responseStart":1084.9000000953674,"secureConnectionStart":455.90000009536743},{"duration":1135.7999997138977,"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":456.7000002861023,"connectEnd":456.7000002861023,"connectStart":456.7000002861023,"domainLookupEnd":456.7000002861023,"domainLookupStart":456.7000002861023,"fetchStart":456.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1379.6000003814697,"responseEnd":1592.5,"responseStart":1555.7000002861023,"secureConnectionStart":456.7000002861023},{"duration":1189.3000001907349,"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":456.90000009536743,"connectEnd":456.90000009536743,"connectStart":456.90000009536743,"domainLookupEnd":456.90000009536743,"domainLookupStart":456.90000009536743,"fetchStart":456.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1592.1000003814697,"responseEnd":1646.2000002861023,"responseStart":1637.4000000953674,"secureConnectionStart":456.90000009536743},{"duration":683.4000000953674,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1563.8000001907349,"connectEnd":1563.8000001907349,"connectStart":1563.8000001907349,"domainLookupEnd":1563.8000001907349,"domainLookupStart":1563.8000001907349,"fetchStart":1563.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":2206.800000190735,"responseEnd":2247.2000002861023,"responseStart":2246.5,"secureConnectionStart":1563.8000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":156,"responseStart":427,"responseEnd":437,"domLoading":449,"domInteractive":2585,"domContentLoadedEventStart":2585,"domContentLoadedEventEnd":2647,"domComplete":4010,"loadEventStart":4010,"loadEventEnd":4010,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2557.5},{"name":"bigPipe.sidebar-id.end","time":2558.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":2558.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":2562.6000003814697},{"name":"activityTabFullyLoaded","time":2663}],"measures":[],"correlationId":"1a187700735353","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":180,"dbReadsTimeInMs":22,"dbConnsTimeInMs":32,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For an extra note, this
InnoDB: Table test/t1 contains 2 user defined columns in InnoDB, but 3 columns in MariaDB. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
should probably be an ERROR and not a warning. Also, the page at the provided link doesn't offer any advice for resolving this issue.