mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 00:34:18 +01:00
e8116aebdf
into pilot.(none):/data/msvensson/mysql/bug28369/my51-bug28369 mysql-test/include/master-slave.inc: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/mysqlbinlog-cp932.test: Auto merged mysql-test/t/mysqlbinlog.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/sp_trans.test: Auto merged mysql-test/extra/binlog_tests/blackhole.test: Auto merged mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Auto merged mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Auto merged mysql-test/extra/binlog_tests/drop_temp_table.test: Auto merged mysql-test/extra/binlog_tests/insert_select-binlog.test: Auto merged mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Auto merged BitKeeper/deleted/.del-sp_trans_log.test: Delete: mysql-test/t/sp_trans_log.test BitKeeper/deleted/.del-sp_trans_log.result: Delete: mysql-test/r/sp_trans_log.result BitKeeper/deleted/.del-ctype_cp932_notembedded.result~f8bc6ad0446e82e3: SCCS merged BitKeeper/deleted/.del-ctype_cp932_notembedded.test~3047e508460cef42: SCCS merged mysql-test/extra/binlog_tests/binlog.test: Merge 5.0->5.1 mysql-test/lib/mtr_cases.pl: Merge 5.0->5.1 mysql-test/r/sp_trans.result: Merge 5.0->5.1 mysql-test/t/mysqlbinlog2.test: Merge 5.0->5.1 mysql-test/t/rpl000017.test: Merge 5.0->5.1 mysql-test/t/rpl_000015.test: Merge 5.0->5.1 mysql-test/t/user_var-binlog.test: Merge 5.0->5.1
102 lines
3.6 KiB
Text
102 lines
3.6 KiB
Text
#
|
|
# misc binlogging tests that do not require a slave running
|
|
#
|
|
|
|
-- source include/not_embedded.inc
|
|
-- source include/have_innodb.inc
|
|
-- source include/have_log_bin.inc
|
|
-- source include/have_debug.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1, t2;
|
|
--enable_warnings
|
|
reset master;
|
|
|
|
create table t1 (a int) engine=innodb;
|
|
create table t2 (a int) engine=innodb;
|
|
begin;
|
|
insert t1 values (5);
|
|
commit;
|
|
begin;
|
|
insert t2 values (5);
|
|
commit;
|
|
# first COMMIT must be Query_log_event, second - Xid_log_event
|
|
source include/show_binlog_events.inc;
|
|
drop table t1,t2;
|
|
|
|
#
|
|
# binlog rotation after one big transaction
|
|
#
|
|
reset master;
|
|
let $1=100;
|
|
|
|
create table t1 (n int) engine=innodb;
|
|
begin;
|
|
--disable_query_log
|
|
while ($1)
|
|
{
|
|
eval insert into t1 values($1 + 4);
|
|
dec $1;
|
|
}
|
|
--enable_query_log
|
|
commit;
|
|
drop table t1;
|
|
--replace_column 2 # 5 #
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
|
show binlog events in 'master-bin.000001' from 106;
|
|
--replace_column 2 # 5 #
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
|
|
show binlog events in 'master-bin.000002' from 106;
|
|
|
|
# Test of a too big SET INSERT_ID: see if the truncated value goes
|
|
# into binlog (right), or the too big value (wrong); we look at the
|
|
# binlog further down with SHOW BINLOG EVENTS.
|
|
reset master;
|
|
create table t1 (id tinyint auto_increment primary key);
|
|
set insert_id=128;
|
|
insert into t1 values(null);
|
|
select * from t1;
|
|
drop table t1;
|
|
|
|
# bug#22027
|
|
create table t1 (a int);
|
|
create table if not exists t2 select * from t1;
|
|
|
|
# bug#22762
|
|
create temporary table tt1 (a int);
|
|
create table if not exists t3 like tt1;
|
|
|
|
# BUG#25091 (A DELETE statement to mysql database is not logged with
|
|
# ROW mode format): Checking that some basic operations on tables in
|
|
# the mysql database is replicated even when the current database is
|
|
# 'mysql'.
|
|
|
|
--disable_warnings
|
|
USE mysql;
|
|
INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test');
|
|
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
|
|
DELETE FROM user WHERE host='localhost' AND user='@#@';
|
|
--enable_warnings
|
|
|
|
use test;
|
|
source include/show_binlog_events.inc;
|
|
drop table t1,t2,t3,tt1;
|
|
|
|
-- source extra/binlog_tests/binlog_insert_delayed.test
|
|
|
|
#Bug #26079 max_binlog_size + innodb = not make new binlog and hang server
|
|
# server should not hang, binlog must rotate in the end
|
|
reset master;
|
|
--disable_warnings
|
|
drop table if exists t3;
|
|
--enable_warnings
|
|
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
|
|
show master status;
|
|
let $it=4;
|
|
while ($it)
|
|
{
|
|
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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