~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/binlog/t/binlog_killed_simulate.test

  • Committer: Package Import Robot
  • Author(s): Dave Chiluk, Eduardo Damato
  • Date: 2014-01-09 09:44:14 UTC
  • mfrom: (18.1.5 precise-security)
  • Revision ID: package-import@ubuntu.com-20140109094414-ght3gi7yvzsyvhm5
Tags: 5.5.34-0ubuntu0.12.04.2
[ Eduardo Damato ]
Fix upstart script to account for datadir disk shortage (LP: #1121874) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
update t1 set a=2 /* will be "killed" after work has been done */;
21
21
 
22
22
# a proof the query is binlogged with no error
23
 
#todo: introduce a suite private macro that provides numeric values
24
 
#      for some constants like the offset of the first real event
25
 
#      that is different between severs versions.
26
23
let $MYSQLD_DATADIR= `select @@datadir`;
27
24
--let $binlog_start_point= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
28
25
--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_start_point $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
48
45
--error ER_QUERY_INTERRUPTED
49
46
load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
50
47
 
51
 
 
52
48
# a proof the query is binlogged with an error
53
49
--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 3)
54
50
--let $binlog_end=       query_get_value(SHOW BINLOG EVENTS, Pos, 4)
55
51
source include/show_binlog_events.inc;
56
52
 
57
 
--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_load_data --stop-position=$binlog_end $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
58
53
 
 
54
--mkdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
 
55
--exec $MYSQL_BINLOG --local-load=$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 --force-if-open --start-position=$binlog_load_data --stop-position=$binlog_end $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
59
56
 
60
57
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
61
58
eval select
68
65
# cleanup for the sub-case
69
66
remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
70
67
 
 
68
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 *
 
69
--rmdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
71
70
 
72
71
drop table t1,t2;
73
72