~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/binlog_index.test

  • Committer: Brian Aker
  • Date: 2009-01-23 02:15:04 UTC
  • mfrom: (798.2.32 drizzle)
  • Revision ID: brian@tangent.org-20090123021504-2j99e6hxab1ew601
Merge for replication removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# testing of purging of binary log files bug#18199/Bug#18453
3
 
#
4
 
source include/have_log_bin.inc;
5
 
 
6
 
#
7
 
# testing purge binary logs TO
8
 
#
9
 
 
10
 
flush logs;
11
 
flush logs;
12
 
flush logs;
13
 
 
14
 
source include/show_binary_logs.inc;
15
 
 
16
 
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001;
17
 
 
18
 
# there must be a warning with file names
19
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
20
 
purge binary logs TO 'master-bin.000004';
21
 
 
22
 
--echo *** must show a list starting from the 'TO' argument of PURGE ***
23
 
source include/show_binary_logs.inc;
24
 
 
25
 
#
26
 
# testing purge binary logs BEFORE
27
 
#
28
 
 
29
 
reset master;
30
 
 
31
 
flush logs;
32
 
flush logs;
33
 
flush logs;
34
 
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001;
35
 
 
36
 
--echo *** must be a warning master-bin.000001 was not found ***
37
 
let $date=`select NOW()  +  INTERVAL 1 MINUTE`;
38
 
--disable_query_log
39
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
40
 
eval purge binary logs BEFORE '$date';
41
 
--enable_query_log
42
 
 
43
 
--echo *** must show one record, of the active binlog, left in the index file after PURGE ***
44
 
source include/show_binary_logs.inc;
45
 
 
46
 
#
47
 
# testing a fatal error
48
 
# Turning a binlog file into a directory must be a portable setup
49
 
50
 
 
51
 
reset master;
52
 
 
53
 
flush logs;
54
 
flush logs;
55
 
flush logs;
56
 
 
57
 
remove_file $MYSQLTEST_VARDIR/log/master-bin.000001;
58
 
mkdir $MYSQLTEST_VARDIR/log/master-bin.000001;
59
 
 
60
 
--error ER_BINLOG_PURGE_FATAL_ERR
61
 
purge binary logs TO 'master-bin.000002';
62
 
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
63
 
show warnings;
64
 
rmdir $MYSQLTEST_VARDIR/log/master-bin.000001;
65
 
--disable_warnings
66
 
reset master;
67
 
--enable_warnings
68
 
--echo End of tests