Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.6
--source include/have_innodb.inc
CREATE TABLE t1 (k INT ) ENGINE=InnoDB;
INSERT INTO t1 (k) VALUES (1);
START TRANSACTION ;
INSERT INTO t1 (k) VALUES (2);
--connect (con1,localhost,root,,test)
SET innodb_lock_wait_timeout= 1;
--error ER_LOCK_WAIT_TIMEOUT
CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE=InnoDB AS SELECT k FROM t1;
# Cleanup
--disconnect con1
--connection default
DROP TABLE t1;
10.6 e5b9dc15
mariadbd: /data/src/10.6/storage/innobase/dict/drop.cc:154: dberr_t trx_t::drop_table(const dict_table_t&): Assertion `!table.n_waiting_or_granted_auto_inc_locks' failed.
210617 0:49:17 [ERROR] mysqld got signal 6 ;
#7 0x00007fa452dd3f36 in __GI___assert_fail (assertion=0x5642bc01ebd0 "!table.n_waiting_or_granted_auto_inc_locks", file=0x5642bc01e8b8 "/data/src/10.6/storage/innobase/dict/drop.cc", line=154, function=0x5642bc01eb48 "dberr_t trx_t::drop_table(const dict_table_t&)") at assert.c:101
#8 0x00005642bb9b3e46 in trx_t::drop_table (this=0x7fa44d2c7290, table=...) at /data/src/10.6/storage/innobase/dict/drop.cc:154
#9 0x00005642bb65855d in ha_innobase::delete_table (this=0x7fa4140195f8, name=0x7fa447fb24f0 "./test/t2") at /data/src/10.6/storage/innobase/handler/ha_innodb.cc:13375
#10 0x00005642bb1c08b6 in hton_drop_table (hton=0x5642bdd3a3f8, path=0x7fa447fb24f0 "./test/t2") at /data/src/10.6/sql/handler.cc:576
#11 0x00005642bb1c6a15 in ha_delete_table (thd=0x7fa414000db8, hton=0x5642bdd3a3f8, path=0x7fa447fb24f0 "./test/t2", db=0x7fa4140142e0, alias=0x7fa4140142f0, generate_warning=false) at /data/src/10.6/sql/handler.cc:3071
#12 0x00005642baf2e69e in quick_rm_table (thd=0x7fa414000db8, base=0x5642bdd3a3f8, db=0x7fa4140142e0, table_name=0x7fa4140142f0, flags=0, table_path=0x0) at /data/src/10.6/sql/sql_table.cc:1921
#13 0x00005642bad8aec9 in drop_open_table (thd=0x7fa414000db8, table=0x7fa414026848, db_name=0x7fa4140142e0, table_name=0x7fa4140142f0) at /data/src/10.6/sql/sql_base.cc:1365
#14 0x00005642badf6b07 in select_create::abort_result_set (this=0x7fa414016458) at /data/src/10.6/sql/sql_insert.cc:5168
#15 0x00005642bae848df in handle_select (thd=0x7fa414000db8, lex=0x7fa414005068, result=0x7fa414016458, setup_tables_done_option=0) at /data/src/10.6/sql/sql_select.cc:562
#16 0x00005642baf4c992 in Sql_cmd_create_table_like::execute (this=0x7fa414014268, thd=0x7fa414000db8) at /data/src/10.6/sql/sql_table.cc:11729
#17 0x00005642bae4457e in mysql_execute_command (thd=0x7fa414000db8) at /data/src/10.6/sql/sql_parse.cc:5983
#18 0x00005642bae4a724 in mysql_parse (thd=0x7fa414000db8, rawbuf=0x7fa414014160 "CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB AS SELECT k FROM t1", length=85, parser_state=0x7fa447fb3480) at /data/src/10.6/sql/sql_parse.cc:8016
#19 0x00005642bae36bae in dispatch_command (command=COM_QUERY, thd=0x7fa414000db8, packet=0x7fa41400b879 "CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB AS SELECT k FROM t1", packet_length=85, blocking=true) at /data/src/10.6/sql/sql_parse.cc:1897
#20 0x00005642bae35553 in do_command (thd=0x7fa414000db8, blocking=true) at /data/src/10.6/sql/sql_parse.cc:1406
#21 0x00005642baff1d65 in do_handle_one_connection (connect=0x5642be291238, put_in_cache=true) at /data/src/10.6/sql/sql_connect.cc:1410
#22 0x00005642baff1ac1 in handle_one_connection (arg=0x5642be291238) at /data/src/10.6/sql/sql_connect.cc:1312
#23 0x00005642bb560fe9 in pfs_spawn_thread (arg=0x5642be2fdf68) at /data/src/10.6/storage/perfschema/pfs.cc:2201
#24 0x00007fa4532eb609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#25 0x00007fa452ebf293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No obvious immediate problem on a non-debug build.
The failure started happening in 10.6 after this commit:
commit 1bd681c8b3c5213ce1f7976940a7dc38b48a0d39
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date: Wed Jun 9 17:02:55 2021 +0300
MDEV-25506 (3 of 3): Do not delete .ibd files before commit
This is a complete rewrite of DROP TABLE, also as part of other DDL,
{"report":{"fcp":754.7999999523163,"ttfb":143.79999995231628,"pageVisibility":"visible","entityId":100574,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"ce7be2e4-9d16-4389-ae14-03d56fc79943","navigationType":0,"readyForUser":834.2999999523163,"redirectCount":0,"resourceLoadedEnd":887.0999999046326,"resourceLoadedStart":150.39999985694885,"resourceTiming":[{"duration":144,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":150.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":294.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":143.90000009536743,"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":150.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":294.5,"responseStart":0,"secureConnectionStart":0},{"duration":154,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":150.79999995231628,"connectEnd":150.79999995231628,"connectStart":150.79999995231628,"domainLookupEnd":150.79999995231628,"domainLookupStart":150.79999995231628,"fetchStart":150.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":150.79999995231628,"responseEnd":304.7999999523163,"responseStart":304.7999999523163,"secureConnectionStart":150.79999995231628},{"duration":242.20000004768372,"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":150.79999995231628,"connectEnd":150.79999995231628,"connectStart":150.79999995231628,"domainLookupEnd":150.79999995231628,"domainLookupStart":150.79999995231628,"fetchStart":150.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":150.79999995231628,"responseEnd":393,"responseStart":393,"secureConnectionStart":150.79999995231628},{"duration":245.70000004768372,"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":151,"connectEnd":151,"connectStart":151,"domainLookupEnd":151,"domainLookupStart":151,"fetchStart":151,"redirectEnd":0,"redirectStart":0,"requestStart":151,"responseEnd":396.7000000476837,"responseStart":396.7000000476837,"secureConnectionStart":151},{"duration":246.09999990463257,"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":151,"connectEnd":151,"connectStart":151,"domainLookupEnd":151,"domainLookupStart":151,"fetchStart":151,"redirectEnd":0,"redirectStart":0,"requestStart":151,"responseEnd":397.09999990463257,"responseStart":397.09999990463257,"secureConnectionStart":151},{"duration":246.60000014305115,"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":151.09999990463257,"connectEnd":151.09999990463257,"connectStart":151.09999990463257,"domainLookupEnd":151.09999990463257,"domainLookupStart":151.09999990463257,"fetchStart":151.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":151.09999990463257,"responseEnd":397.7000000476837,"responseStart":397.7000000476837,"secureConnectionStart":151.09999990463257},{"duration":247.09999990463257,"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":151.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":151.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":247,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":151.29999995231628,"connectEnd":151.29999995231628,"connectStart":151.29999995231628,"domainLookupEnd":151.29999995231628,"domainLookupStart":151.29999995231628,"fetchStart":151.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":151.29999995231628,"responseEnd":398.2999999523163,"responseStart":398.2999999523163,"secureConnectionStart":151.29999995231628},{"duration":247.29999995231628,"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":151.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":151.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":247.29999995231628,"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":151.59999990463257,"connectEnd":151.59999990463257,"connectStart":151.59999990463257,"domainLookupEnd":151.59999990463257,"domainLookupStart":151.59999990463257,"fetchStart":151.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":151.59999990463257,"responseEnd":398.89999985694885,"responseStart":398.89999985694885,"secureConnectionStart":151.59999990463257},{"duration":429.90000009536743,"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":158.29999995231628,"connectEnd":158.29999995231628,"connectStart":158.29999995231628,"domainLookupEnd":158.29999995231628,"domainLookupStart":158.29999995231628,"fetchStart":158.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":158.29999995231628,"responseEnd":588.2000000476837,"responseStart":588.2000000476837,"secureConnectionStart":158.29999995231628},{"duration":545.5,"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":158.5,"connectEnd":158.5,"connectStart":158.5,"domainLookupEnd":158.5,"domainLookupStart":158.5,"fetchStart":158.5,"redirectEnd":0,"redirectStart":0,"requestStart":158.5,"responseEnd":704,"responseStart":704,"secureConnectionStart":158.5},{"duration":129,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":460.59999990463257,"connectEnd":460.59999990463257,"connectStart":460.59999990463257,"domainLookupEnd":460.59999990463257,"domainLookupStart":460.59999990463257,"fetchStart":460.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":460.59999990463257,"responseEnd":589.5999999046326,"responseStart":589.5999999046326,"secureConnectionStart":460.59999990463257},{"duration":225.59999990463257,"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":661.5,"connectEnd":661.5,"connectStart":661.5,"domainLookupEnd":661.5,"domainLookupStart":661.5,"fetchStart":661.5,"redirectEnd":0,"redirectStart":0,"requestStart":661.5,"responseEnd":887.0999999046326,"responseStart":887.0999999046326,"secureConnectionStart":661.5},{"duration":153.60000014305115,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":747.3999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":747.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":901,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":144,"responseEnd":158,"domLoading":147,"domInteractive":889,"domContentLoadedEventStart":889,"domContentLoadedEventEnd":930,"domComplete":1283,"loadEventStart":1283,"loadEventEnd":1283,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":870.7000000476837},{"name":"bigPipe.sidebar-id.end","time":871.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":871.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":872.8999998569489},{"name":"activityTabFullyLoaded","time":944.7999999523163}],"measures":[],"correlationId":"c0765ce8fd7f55","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":75,"dbReadsTimeInMs":18,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}