[MDEV-15285] innodb.innodb-alter-tempfile failed in buildbot, table already exists Created: 2018-02-11  Updated: 2019-09-30  Resolved: 2019-09-30

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.2
Fix Version/s: 10.2.23

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None


 Description   

http://buildbot.askmonty.org/buildbot/builders/bld-starfs-debug/builds/785/steps/test_1/logs/stdio

innodb.innodb-alter-tempfile '4k,innodb' w2 [ fail ]
        Test ended at 2018-02-11 13:04:52
 
CURRENT_TEST: innodb.innodb-alter-tempfile
mysqltest: At line 52: query 'ALTER TABLE t1 ADD PRIMARY KEY (f2, f1)' failed: 1050: Table 'test/#sql-ib19-2734628116' already exists
 
The result from queries just before the failure was:
< snip >
# temporary tablename.
# Crash the server in ha_innobase::commit_inplace_alter_table()
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
SET debug='d,innodb_alter_commit_crash_before_commit';
Warnings:
Warning	1287	'@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
# Write file to make mysql-test-run.pl expect crash
# Execute the statement that causes the crash
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
ERROR HY000: Lost connection to MySQL server during query
# Startup the server after the crash
# Read and remember the temporary table name
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) NOT NULL,
  `f2` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
# Consecutive Alter table does not create same temporary file name
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);



 Comments   
Comment by Marko Mäkelä [ 2019-09-30 ]

Ever since the MDEV-18836 fix, collisions with #sql-ib file names should not be possible in MariaDB Server 10.2 if the default setting innodb_safe_truncate=ON is being used.

Generated at Thu Feb 08 08:20:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.