[MDEV-8569] build_table_filename() doesn't support temporary tables Created: 2015-08-05  Updated: 2016-07-20  Resolved: 2016-07-18

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Data Definition - Temporary
Affects Version/s: 10.0
Fix Version/s: 10.0.27

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None

Sprint: 10.0.25, 10.0.26

 Description   

build_table_filename() doesn't support temporary tables. Indeed, it always builds the path as datadir/db_name/table_name, while temporary tables are in the tmpdir. This shows up in various DDL statements that use temporary tables:

create temporary table t1 (a int);
rename table t1 to t2;

This fails. Or

create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb;
--error 1005
alter table t1 add foreign key(b) references t1(a);
drop table t1;
--source include/restart_mysqld.inc

This test case succeeds but leaves an orphant temporary frm in the tmpdir (and it causes a warning on restart).

Note: when this is fixed, please uncomment the corresponding test in innodb-fk-warnings.test



 Comments   
Comment by Alexey Botchkov [ 2016-07-12 ]

Fixing patch:
http://lists.askmonty.org/pipermail/commits/2016-July/009541.html

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