1
# ticket 895 is a query optimization problem with the primary key
3
--source include/have_tokudb.inc
4
SET DEFAULT_STORAGE_ENGINE = 'tokudb';
7
DROP TABLE IF EXISTS foo,bar;
10
let $MYSQLD_DATADIR= `SELECT @@datadir`;
12
create table foo (a int, b int, key(b,a), primary key (a))engine=TokuDB;
13
create table bar (a bigint)engine=TokuDB;
14
alter table foo drop index b;
15
alter table bar add index (a);
17
# Write file to make mysql-test-run.pl expect the "crash", but don't start
18
# it until it's told to
19
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
23
# Send shutdown to the connected server and give
24
# it 10 seconds to die before zapping it
27
remove_file $MYSQLD_DATADIR/test/foo.frm;
28
copy_file $MYSQLD_DATADIR/test/bar.frm $MYSQLD_DATADIR/test/foo.frm;
29
remove_file $MYSQLD_DATADIR/test/bar.frm;
31
# Write file to make mysql-test-run.pl start up the server again
32
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
39
# Call script that will poll the server waiting for it to be back online again
40
--source include/wait_until_connected_again.inc
42
# Turn off reconnect again
45
show create table foo;
46
show create table bar;