2
# misc binlogging tests that do not require a slave running
5
-- source include/have_log_bin.inc
6
-- source include/not_embedded.inc
7
-- source include/have_innodb.inc
8
-- source include/have_debug.inc
11
drop table if exists t1, t2;
15
create table t1 (a int) engine=innodb;
16
create table t2 (a int) engine=innodb;
23
# first COMMIT must be Query_log_event, second - Xid_log_event
24
source include/show_binlog_events.inc;
28
# binlog rotation after one big transaction
33
create table t1 (n int) engine=innodb;
38
eval insert into t1 values($1 + 4);
44
--replace_column 2 # 5 #
45
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
46
show binlog events in 'master-bin.000001' from 107;
47
--replace_column 2 # 5 #
48
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
49
show binlog events in 'master-bin.000002' from 107;
53
# Bug#22540 - Incorrect value in column End_log_pos of
54
# SHOW BINLOG EVENTS using InnoDB
57
# the following tests will show that certain queries now return
58
# absolute offsets (from binlog start, rather than relative to
59
# the beginning of the current transaction). under what
60
# conditions it should be allowed / is sensible to put the
61
# slider into the middle of a transaction is not our concern
62
# here; we just guarantee that if and when it's done, the
63
# user has valid offsets to use. if the setter function still
64
# wants to throw a "positioning into middle of transaction"
65
# warning, that's its prerogative and handled elsewhere.
67
set @ac = @@autocommit;
69
# first show this to work for SHOW BINLOG EVENTS
73
create table t1(n int) engine=innodb;
75
insert into t1 values (1);
76
insert into t1 values (2);
77
insert into t1 values (3);
80
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
81
show binlog events from 0;
83
# now show that nothing breaks if we need to read from the cache more
84
# than once, resulting in split event-headers
86
set @bcs = @@binlog_cache_size;
87
set global binlog_cache_size=4096;
90
create table t1 (a int) engine=innodb;
97
eval insert into t1 values( $1 );
103
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
104
show binlog events from 0;
108
set global binlog_cache_size=@bcs;
109
set session autocommit = @ac;
112
# Bug#33798: prepared statements improperly handle large unsigned ints
115
drop table if exists t1;
118
create table t1 (a bigint unsigned, b bigint(20) unsigned);
119
prepare stmt from "insert into t1 values (?,?)";
120
set @a= 9999999999999999;
121
set @b= 14632475938453979136;
122
execute stmt using @a, @b;
123
deallocate prepare stmt;
125
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
126
show binlog events from 0;
128
--echo End of 5.0 tests
130
# Test of a too big SET INSERT_ID: see if the truncated value goes
131
# into binlog (right), or the too big value (wrong); we look at the
132
# binlog further down with SHOW BINLOG EVENTS.
134
create table t1 (id tinyint auto_increment primary key);
136
insert into t1 values(null);
141
create table t1 (a int);
142
create table if not exists t2 select * from t1;
145
create temporary table tt1 (a int);
146
create table if not exists t3 like tt1;
148
# BUG#25091 (A DELETE statement to mysql database is not logged with
149
# ROW mode format): Checking that some basic operations on tables in
150
# the mysql database is replicated even when the current database is
155
INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test');
156
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
157
DELETE FROM user WHERE host='localhost' AND user='@#@';
161
source include/show_binlog_events.inc;
162
drop table t1,t2,t3,tt1;
164
-- source extra/binlog_tests/binlog_insert_delayed.test
166
#Bug #26079 max_binlog_size + innodb = not make new binlog and hang server
167
# server should not hang, binlog must rotate in the end
170
drop table if exists t3;
172
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
177
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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