Broken Table Proto file will not rename in alter table

Bug #315268 reported by Brian Aker
4
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Jay Pipes

Bug Description

For test case index_merge_myisam

We get the following error:

=======================================================
DEFAULT STORAGE ENGINE: innodb
TEST RESULT TIME (ms)
-------------------------------------------------------

broken.index_merge_myisam [ fail ]

drizzletest: In included file "./include/index_merge1.inc": At line 187: query 'alter table t2 add index i1_3(key1, key3)' failed: 7: Error on rename of './test/t2.tabledefinition' to './test/#sql2-201-1.tabledefinition' (errno: 2)

The result from queries just before the failure was:
< snip >
((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 0,4 NULL 1024 Using sort_union(i3,i5); Using where
select * from t0 where key1 < 5 or key8 < 4 order by key1;
key1 key2 key3 key4 key5 key6 key7 key8
1 1 1 1 1 1 1 1023
2 2 2 2 2 2 2 1022
3 3 3 3 3 3 3 1021
4 4 4 4 4 4 4 1020
1021 1021 1021 1021 1021 1021 1021 3
1022 1022 1022 1022 1022 1022 1022 2
1023 1023 1023 1023 1023 1023 1023 1
1024 1024 1024 1024 1024 1024 1024 0
explain
select * from t0 where key1 < 5 or key8 < 4 order by key1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 index_merge i1,i8 i1,i8 4,4 NULL 9 Using sort_union(i1,i8); Using where; Using filesort
create table t2 like t0;
insert into t2 select * from t0;
alter table t2 add index i1_3(key1, key3);

Look at the comment in the index_merge_myisam file with this bug number.
#--source include/index_merge1.inc

Revision history for this message
Padraig O'Sullivan (posulliv) wrote :

Confirmed on trunk:

TEST RESULT TIME (ms)
-------------------------------------------------------

main.index_merge_myisam [ fail ]

drizzletest: In included file "./include/index_merge1.inc": At line 187: query 'alter table t2 add index i1_3(key1, key3)' failed: 7: Error on rename of './test/t2.dfe' to './test/#sql2-6731-1.dfe' (errno: 2)

The result from queries just before the failure was:
< snip >
((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 0,4 NULL 1024 Using sort_union(i3,i5); Using where
select * from t0 where key1 < 5 or key8 < 4 order by key1;
key1 key2 key3 key4 key5 key6 key7 key8
1 1 1 1 1 1 1 1023
2 2 2 2 2 2 2 1022
3 3 3 3 3 3 3 1021
4 4 4 4 4 4 4 1020
1021 1021 1021 1021 1021 1021 1021 3
1022 1022 1022 1022 1022 1022 1022 2
1023 1023 1023 1023 1023 1023 1023 1
1024 1024 1024 1024 1024 1024 1024 0
explain
select * from t0 where key1 < 5 or key8 < 4 order by key1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 index_merge i1,i8 i1,i8 4,4 NULL 9 Using sort_union(i1,i8); Using where; Using filesort
create table t2 like t0;
insert into t2 select * from t0;
alter table t2 add index i1_3(key1, key3);

Changed in drizzle:
status: New → Confirmed
Changed in drizzle:
milestone: none → aloha
importance: Undecided → Medium
Revision history for this message
Joe Daly (skinny.moey) wrote :

This failure looks like it may have been fixed at some point, as it does not look platform independant. Running

test-run.pl index_merge_myisam

and uncommenting --source include/index_merge1.inc in index_merge_myisam.test now produces a error creating a table at a latter point in the test bug 377917. I also manually ran through the original failure and the select worked fine.

main.index_merge_myisam [ fail ]

drizzletest: In included file "./include/index_merge1.inc": At line 419: query 'CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`filler` char(200) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '(11) DEFAULT NULL,
`filler` char(200) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KE' at line 2

Revision history for this message
Stewart Smith (stewart) wrote :

not convinced this is really a bug. errno 2 will be ENOENT - which implies all sorts of weirdness.

There were bugs, but I think they've all long since been fixed. The test should be fixed though, which is fine to happen in bug 377917

Changed in drizzle:
status: Confirmed → Incomplete
Revision history for this message
Jay Pipes (jaypipes) wrote :

This was fixed some time ago...

Changed in drizzle:
status: Incomplete → Fix Released
Changed in drizzle:
assignee: nobody → Jay Pipes (jaypipes)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.