NOTES:
- The test case is for reproducing purposes only, don't put it into the regression suite!
- The test case has a loop of 100 attempts. It appears to be enough for me, usually it fails within first 50, but it can vary on different machines and builds. Increase it if it's not enough. It can also be done via usual --repeat, but it will be slower.
- The test case has a little bit of everything – sequences, backup locks, etc., so it's not applicable to previous versions, thus it hasn't been checked on versions other than 10.4, and I'm not sure to which component it really belongs.
- I've added to the test case some protection against other sporadic failures. Timeouts are probably expected, but also DROP SEQUENCE and CREATE SEQUENCE sometimes fail due to "sequence doesn't exist" and "sequence already exists". It's probably a problem in itself.
- Even now, the test case sometimes fails with
connect con1,localhost,root,,test;
|
CREATE SEQUENCE IF NOT EXISTS s ENGINE=InnoDB;
|
bug.2965a 'innodb' [ fail ]
|
Test ended at 2019-06-23 19:11:29
|
|
CURRENT_TEST: bug.2965a
|
mysqltest: At line 47: query 'CREATE SEQUENCE IF NOT EXISTS s ENGINE=InnoDB' failed: 1813: Tablespace for table '`test`.`s`' exists. Please DISCARD the tablespace before IMPORT
|
I don't want to complicate the test case further by hiding it, besides, something is definitely wrong when it happens, so it requires attention as well. I'm not sure whether it is related to the main complaint in this report or not.
- Might be related to
MDEV-19555, but I couldn't make this one fail on CHECK, so I'm filing it separately.
--source include/have_innodb.inc
|
|
--let $run= 100
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
|
CREATE TABLE t3 (c INT) ENGINE=InnoDB;
|
CREATE TABLE t4 (d INT) ENGINE=InnoDB;
|
CREATE TABLE t5 (e INT) ENGINE=InnoDB;
|
|
while ($run)
|
{
|
--echo #
|
--echo # $run rounds left
|
--connection default
|
BEGIN;
|
SELECT * FROM t4;
|
|
--connect (con1,localhost,root,,test)
|
CREATE SEQUENCE IF NOT EXISTS s ENGINE=InnoDB;
|
--connection default
|
--error ER_BAD_FIELD_ERROR
|
UPDATE t2 SET x = 0;
|
--connection default
|
--send
|
SELECT * FROM information_schema.tables;
|
--connection con1
|
SET lock_wait_timeout= 1;
|
--send
|
LOCK TABLE t3 READ, t5 WRITE, t2 READ;
|
--connect (con2,localhost,root,,test)
|
SET lock_wait_timeout= 1;
|
BACKUP STAGE START;
|
--error 0,ER_LOCK_WAIT_TIMEOUT
|
BACKUP STAGE BLOCK_COMMIT;
|
|
# Cleanup
|
--disconnect con2
|
--connection default
|
--reap
|
DROP SEQUENCE IF EXISTS s;
|
--connection con1
|
--error 0,ER_LOCK_WAIT_TIMEOUT
|
--reap
|
--disconnect con1
|
--dec $run
|
}
|
--connection default
|
DROP TABLE IF EXISTS t1, t3, t2, t4, t5;
|
a82e42fd
|
mysqld: /data/src/10.4/sql/sql_error.h:1036: uint Diagnostics_area::sql_errno() const: Assertion `m_status == DA_ERROR' failed.
|
190623 19:12:25 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f22d8caff12 in __GI___assert_fail (assertion=0x55d4bd81ac94 "m_status == DA_ERROR", file=0x55d4bd81ac00 "/data/src/10.4/sql/sql_error.h", line=1036, function=0x55d4bd81b7c0 <Diagnostics_area::sql_errno() const::__PRETTY_FUNCTION__> "uint Diagnostics_area::sql_errno() const") at assert.c:101
|
#8 0x000055d4bcb2c4e4 in Diagnostics_area::sql_errno (this=0x7f22880064b8) at /data/src/10.4/sql/sql_error.h:1036
|
#9 0x000055d4bcf8389a in ha_rollback_trans (thd=0x7f2288000b00, all=true) at /data/src/10.4/sql/handler.cc:1919
|
#10 0x000055d4bcdcfc3b in trans_rollback_implicit (thd=0x7f2288000b00) at /data/src/10.4/sql/transaction.cc:387
|
#11 0x000055d4bcc4f13d in mysql_execute_command (thd=0x7f2288000b00) at /data/src/10.4/sql/sql_parse.cc:6169
|
#12 0x000055d4bcc53cdb in mysql_parse (thd=0x7f2288000b00, rawbuf=0x7f2288013108 "SELECT * FROM information_schema.tables", length=39, parser_state=0x7f22ce070180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7892
|
#13 0x000055d4bcc3ff85 in dispatch_command (command=COM_QUERY, thd=0x7f2288000b00, packet=0x7f2288137ba1 "0\001Y\247", packet_length=39, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1827
|
#14 0x000055d4bcc3e743 in do_command (thd=0x7f2288000b00) at /data/src/10.4/sql/sql_parse.cc:1360
|
#15 0x000055d4bcdb7993 in do_handle_one_connection (connect=0x55d4bfc6fdd0) at /data/src/10.4/sql/sql_connect.cc:1403
|
#16 0x000055d4bcdb76f7 in handle_one_connection (arg=0x55d4bfc6fdd0) at /data/src/10.4/sql/sql_connect.cc:1306
|
#17 0x000055d4bd6e2e49 in pfs_spawn_thread (arg=0x55d4bfbee760) at /data/src/10.4/storage/perfschema/pfs.cc:1862
|
#18 0x00007f22da8244a4 in start_thread (arg=0x7f22ce071700) at pthread_create.c:456
|
#19 0x00007f22d8d6cd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
No obvious effect on a non-debug build, but there is no guarantee at all, given how non-deterministic the test is.
{"report":{"fcp":1070.8999999761581,"ttfb":344.89999997615814,"pageVisibility":"visible","entityId":76978,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"11c1a433-3677-4bde-9531-ae37288bd3e2","navigationType":0,"readyForUser":1171.5,"redirectCount":0,"resourceLoadedEnd":1262.8999999761581,"resourceLoadedStart":351.30000001192093,"resourceTiming":[{"duration":246.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":351.30000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":351.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":597.8000000119209,"responseStart":0,"secureConnectionStart":0},{"duration":246.5,"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":351.5999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":351.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":598.0999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":255.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":351.80000001192093,"connectEnd":351.80000001192093,"connectStart":351.80000001192093,"domainLookupEnd":351.80000001192093,"domainLookupStart":351.80000001192093,"fetchStart":351.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":351.80000001192093,"responseEnd":607.1999999880791,"responseStart":607.1999999880791,"secureConnectionStart":351.80000001192093},{"duration":303.0999999642372,"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":352,"connectEnd":352,"connectStart":352,"domainLookupEnd":352,"domainLookupStart":352,"fetchStart":352,"redirectEnd":0,"redirectStart":0,"requestStart":352,"responseEnd":655.0999999642372,"responseStart":655.0999999642372,"secureConnectionStart":352},{"duration":307.60000002384186,"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":352.19999998807907,"connectEnd":352.19999998807907,"connectStart":352.19999998807907,"domainLookupEnd":352.19999998807907,"domainLookupStart":352.19999998807907,"fetchStart":352.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":352.19999998807907,"responseEnd":659.8000000119209,"responseStart":659.8000000119209,"secureConnectionStart":352.19999998807907},{"duration":308.5999999642372,"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":352.30000001192093,"connectEnd":352.30000001192093,"connectStart":352.30000001192093,"domainLookupEnd":352.30000001192093,"domainLookupStart":352.30000001192093,"fetchStart":352.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":352.30000001192093,"responseEnd":660.8999999761581,"responseStart":660.8999999761581,"secureConnectionStart":352.30000001192093},{"duration":308.7000000476837,"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":352.5999999642372,"connectEnd":352.5999999642372,"connectStart":352.5999999642372,"domainLookupEnd":352.5999999642372,"domainLookupStart":352.5999999642372,"fetchStart":352.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":352.5999999642372,"responseEnd":661.3000000119209,"responseStart":661.3000000119209,"secureConnectionStart":352.5999999642372},{"duration":401.2999999523163,"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":352.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":352.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":754.0999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":308.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":352.89999997615814,"connectEnd":352.89999997615814,"connectStart":352.89999997615814,"domainLookupEnd":352.89999997615814,"domainLookupStart":352.89999997615814,"fetchStart":352.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":352.89999997615814,"responseEnd":661.6999999880791,"responseStart":661.6999999880791,"secureConnectionStart":352.89999997615814},{"duration":401,"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":353.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":353.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":754.0999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":309.0999999642372,"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":353.30000001192093,"connectEnd":353.30000001192093,"connectStart":353.30000001192093,"domainLookupEnd":353.30000001192093,"domainLookupStart":353.30000001192093,"fetchStart":353.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":353.30000001192093,"responseEnd":662.3999999761581,"responseStart":662.3999999761581,"secureConnectionStart":353.30000001192093},{"duration":816.0999999642372,"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":354.30000001192093,"connectEnd":354.30000001192093,"connectStart":354.30000001192093,"domainLookupEnd":354.30000001192093,"domainLookupStart":354.30000001192093,"fetchStart":354.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":354.30000001192093,"responseEnd":1170.3999999761581,"responseStart":1170.3999999761581,"secureConnectionStart":354.30000001192093},{"duration":908.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":354.39999997615814,"connectEnd":354.39999997615814,"connectStart":354.39999997615814,"domainLookupEnd":354.39999997615814,"domainLookupStart":354.39999997615814,"fetchStart":354.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":354.39999997615814,"responseEnd":1262.8999999761581,"responseStart":1262.8999999761581,"secureConnectionStart":354.39999997615814},{"duration":407.69999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":768.6999999880791,"connectEnd":768.6999999880791,"connectStart":768.6999999880791,"domainLookupEnd":768.6999999880791,"domainLookupStart":768.6999999880791,"fetchStart":768.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":768.6999999880791,"responseEnd":1176.3999999761581,"responseStart":1176.3999999761581,"secureConnectionStart":768.6999999880791},{"duration":218.10000002384186,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1064.5999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1064.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1282.699999988079,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":162,"responseStart":345,"responseEnd":347,"domLoading":348,"domInteractive":1304,"domContentLoadedEventStart":1304,"domContentLoadedEventEnd":1353,"domComplete":1622,"loadEventStart":1622,"loadEventEnd":1623,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1264.8999999761581},{"name":"bigPipe.sidebar-id.end","time":1265.800000011921},{"name":"bigPipe.activity-panel-pipe-id.start","time":1265.800000011921},{"name":"bigPipe.activity-panel-pipe-id.end","time":1268.0999999642372},{"name":"activityTabFullyLoaded","time":1367.0999999642372}],"measures":[],"correlationId":"d81e5012679fb0","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":16,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
An alternative test case which doesn't involve backup locks, but involves XA instead. It makes it applicable to 10.3 as well, and it fails there (run with --repeat=N if it doesn't fail right away).
--source include/have_innodb.inc
--source include/restart_mysqld.inc
--connect (con1,localhost,root,,test)
--connection default
--send
--connection con1
UNLOCK TABLES;
--disconnect con1
--connection default
--reap
# Cleanup
10.3 1656ea28
mysqld: /data/src/10.3/sql/sql_error.h:1005: uint Diagnostics_area::sql_errno() const: Assertion `m_status == DA_ERROR' failed.
200726 15:53:31 [ERROR] mysqld got signal 6 ;
Query (0x7f6660014918): SELECT * FROM mysql.db JOIN INFORMATION_SCHEMA.TABLES ON (VERSION = 0)
Connection ID (thread ID): 8
Status: NOT_KILLED
#7 0x00007f66b256cf12 in __GI___assert_fail (assertion=0x55870e7186f4 "m_status == DA_ERROR", file=0x55870e7186a8 "/data/src/10.3/sql/sql_error.h", line=1005, function=0x55870e7195c0 <Diagnostics_area::sql_errno() const::__PRETTY_FUNCTION__> "uint Diagnostics_area::sql_errno() const") at assert.c:101
#8 0x000055870d9c927a in Diagnostics_area::sql_errno (this=0x7f6660006088) at /data/src/10.3/sql/sql_error.h:1005
#9 0x000055870ddfadf1 in ha_rollback_trans (thd=0x7f6660000af0, all=true) at /data/src/10.3/sql/handler.cc:1773
#10 0x000055870dc639aa in trans_rollback_implicit (thd=0x7f6660000af0) at /data/src/10.3/sql/transaction.cc:454
#11 0x000055870dae4f68 in mysql_execute_command (thd=0x7f6660000af0) at /data/src/10.3/sql/sql_parse.cc:6131
#12 0x000055870dae9f61 in mysql_parse (thd=0x7f6660000af0, rawbuf=0x7f6660014918 "SELECT * FROM mysql.db JOIN INFORMATION_SCHEMA.TABLES ON (VERSION = 0)", length=70, parser_state=0x7f66ac16a5e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7810
#13 0x000055870dad67a8 in dispatch_command (command=COM_QUERY, thd=0x7f6660000af0, packet=0x7f6660008c71 "", packet_length=70, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1848
#14 0x000055870dad50c0 in do_command (thd=0x7f6660000af0) at /data/src/10.3/sql/sql_parse.cc:1393
#15 0x000055870dc4e693 in do_handle_one_connection (connect=0x5587111d4f60) at /data/src/10.3/sql/sql_connect.cc:1403
#16 0x000055870dc4e3f5 in handle_one_connection (arg=0x5587111d4f60) at /data/src/10.3/sql/sql_connect.cc:1308
#17 0x000055870e6062f2 in pfs_spawn_thread (arg=0x5587111effc0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
#18 0x00007f66b44f54a4 in start_thread (arg=0x7f66ac16b700) at pthread_create.c:456
#19 0x00007f66b2629d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97