~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/binlog/r/binlog_delete_and_flush_index.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
RESET MASTER;
 
2
CREATE TABLE t1 (a int);
 
3
### assertion: index file contains regular entries
 
4
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
 
5
SELECT @index;
 
6
@index
 
7
master-bin.000001
 
8
 
 
9
### assertion: show original binlogs
 
10
show binary logs;
 
11
Log_name        File_size
 
12
master-bin.000001       #
 
13
### assertion: binlog contents from regular entries
 
14
show binlog events from <binlog_start>;
 
15
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
16
master-bin.000001       #       Query   #       #       use `test`; CREATE TABLE t1 (a int)
 
17
FLUSH LOGS;
 
18
### assertion: index file contains renamed binlog and the new one
 
19
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
 
20
SELECT @index;
 
21
@index
 
22
master-bin-b34582.000001
 
23
master-bin.000002
 
24
 
 
25
### assertion: original binlog content still exists, despite we
 
26
###            renamed and changed the index file 
 
27
show binlog events from <binlog_start>;
 
28
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
29
master-bin-b34582.000001        #       Query   #       #       use `test`; CREATE TABLE t1 (a int)
 
30
### assertion: user changed binlog index shows correct entries
 
31
show binary logs;
 
32
Log_name        File_size
 
33
master-bin-b34582.000001        #
 
34
master-bin.000002       #
 
35
DROP TABLE t1;
 
36
### assertion: purging binlogs up to binlog created after instrumenting index file should work
 
37
PURGE BINARY LOGS TO 'master-bin.000002';
 
38
### assertion: show binary logs should only contain latest binlog
 
39
show binary logs;
 
40
Log_name        File_size
 
41
master-bin.000002       #
 
42
### assertion: assert that binlog files were indeed purged (using file_exists calls)
 
43
### assertion: assert that not purged binlog file exists
 
44
### assertion: show index file contents and these should match show binary logs issued above
 
45
SET @index=LOAD_FILE('MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index');
 
46
SELECT @index;
 
47
@index
 
48
master-bin.000002
 
49
 
 
50
RESET MASTER;