~vadim-tk/percona-server/percona-galera-5.1.57-0.8.1

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb_plugin/t/innodb_bug60049.test

  • Committer: root
  • Date: 2011-07-28 00:14:23 UTC
  • Revision ID: root@r815.office.percona.com-20110728001423-6pw0v4b7r0dkbsr4
Ported to Galera 0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Bug #60049 Verify that purge leaves no garbage in unique secondary indexes
 
2
# This test requires a fresh server start-up and a slow shutdown.
 
3
# This was a suspected bug (not a bug).
 
4
 
 
5
-- source include/not_embedded.inc
 
6
-- source include/have_innodb_plugin.inc
 
7
 
 
8
CREATE TABLE t(a INT)ENGINE=InnoDB;
 
9
RENAME TABLE t TO u;
 
10
DROP TABLE u;
 
11
SELECT @@innodb_fast_shutdown;
 
12
let $MYSQLD_DATADIR=`select @@datadir`;
 
13
 
 
14
# Shut down the server
 
15
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
16
-- shutdown_server 30
 
17
-- source include/wait_until_disconnected.inc
 
18
 
 
19
# Check the tail of ID_IND (SYS_TABLES.ID)
 
20
let IBDATA1=$MYSQLD_DATADIR/ibdata1;
 
21
perl;
 
22
my $file = $ENV{'IBDATA1'};
 
23
open(FILE, "<$file") || die "Unable to open $file";
 
24
# Read DICT_HDR_TABLE_IDS, the root page number of ID_IND (SYS_TABLES.ID).
 
25
seek(FILE, 7*16384+38+36, 0) || die "Unable to seek $file";
 
26
die unless read(FILE, $_, 4) == 4;
 
27
my $sys_tables_id_root = unpack("N", $_);
 
28
print "Last record of ID_IND root page ($sys_tables_id_root):\n";
 
29
# This should be the last record in ID_IND. Dump it in hexadecimal.
 
30
seek(FILE, $sys_tables_id_root*16384 + 152, 0) || die "Unable to seek $file";
 
31
read(FILE, $_, 32) || die "Unable to read $file";
 
32
close(FILE);
 
33
print unpack("H*", $_), "\n";
 
34
EOF
 
35
 
 
36
# Restart the server.
 
37
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
38
-- enable_reconnect
 
39
-- source include/wait_until_connected_again.inc