Commit 453eea9b authored by unknown's avatar unknown

Implemented requested changes by Lars and did some general test cleanup. Lots more togo


mysql-test/t/rpl_relay_space_myisam.test:
  Added Comment
mysql-test/t/rpl_ndb_relay_space.test:
  Added more comments
BitKeeper/deleted/.del-rpl_relay_space_ndb.result~4d6013c0afef9b5e:
  Delete: mysql-test/r/rpl_relay_space_ndb.result
mysql-test/t/rpl_relay_space_innodb.test:
  Added Comment
BitKeeper/deleted/.del-rpl000006.test~6da9f1808deb79c7:
  Delete: mysql-test/t/rpl000006.test
BitKeeper/deleted/.del-rpl000004.test~61532b03f9ad2734:
  Delete: mysql-test/t/rpl000004.test
BitKeeper/deleted/.del-rpl000004.result~a3147834a662043a:
  Delete: mysql-test/r/rpl000004.result
mysql-test/t/rpl_mixed_ddl_dml.test:
  Rename: mysql-test/t/rpl000002.test -> mysql-test/t/rpl_mixed_ddl_dml.test
mysql-test/r/rpl_mixed_ddl_dml.result:
  Rename: mysql-test/r/rpl000002.result -> mysql-test/r/rpl_mixed_ddl_dml.result
mysql-test/t/rpl_ignore_table_update.test:
  Rename: mysql-test/t/rpl000008.test -> mysql-test/t/rpl_ignore_table_update.test
mysql-test/t/rpl_ignore_table_update-slave.opt:
  Rename: mysql-test/t/rpl000008-slave.opt -> mysql-test/t/rpl_ignore_table_update-slave.opt
mysql-test/r/rpl_ignore_table_update.result:
  Rename: mysql-test/r/rpl000008.result -> mysql-test/r/rpl_ignore_table_update.result
mysql-test/t/rpl_load_table_from_master.test:
  Fixing test since test where combined
mysql-test/r/rpl_load_table_from_master.result:
  Updated results file
BitKeeper/deleted/.del-rpl000004.a.result~3415f066cb91c460:
  Delete: mysql-test/r/rpl000004.a.result
BitKeeper/deleted/.del-rpl000004.b.result~352b35351551485:
  Delete: mysql-test/r/rpl000004.b.result
mysql-test/t/disabled.def:
  added rpl_ndb_relay_space Results are not deterministic
mysql-test/t/rpl_load_from_master.test:
  Rename: mysql-test/t/rpl000009.test -> mysql-test/t/rpl_load_from_master.test
mysql-test/t/rpl_load_from_master-slave.opt:
  Rename: mysql-test/t/rpl000009-slave.opt -> mysql-test/t/rpl_load_from_master-slave.opt
mysql-test/r/rpl_load_from_master.result:
  Rename: mysql-test/r/rpl000009.result -> mysql-test/r/rpl_load_from_master.result
mysql-test/t/rpl_temp_table.test:
  Rename: mysql-test/t/rpl_000012.test -> mysql-test/t/rpl_temp_table.test
mysql-test/r/rpl_temp_table.result:
  Rename: mysql-test/r/rpl_000012.result -> mysql-test/r/rpl_temp_table.result
parent 9c5dbcc8
Table Op Msg_type Msg_text
test.t1 check status OK
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set SQL_LOG_BIN=0,timestamp=200006;
create table t1(t timestamp not null,a char(1))ENGINE=MyISAM;
insert into t1 ( a) values ('F');
select unix_timestamp(t) from t1;
unix_timestamp(t)
200006
load table t1 from master;
select unix_timestamp(t) from t1;
unix_timestamp(t)
200006
set SQL_LOG_BIN=1,timestamp=default;
drop table t1;
set SQL_LOG_BIN=0;
CREATE TABLE t1 (
a int not null
) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
INSERT INTO t1 VALUES (1);
load table t1 from master;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
drop table t1;
......@@ -13,11 +13,11 @@ drop database if exists mysqltest3;
create database mysqltest2;
create database mysqltest;
create database mysqltest2;
create table mysqltest2.foo (n int);
create table mysqltest2.foo (n int)ENGINE=MyISAM;
insert into mysqltest2.foo values(4);
create table mysqltest2.foo (n int);
create table mysqltest2.foo (n int)ENGINE=MyISAM;
insert into mysqltest2.foo values(5);
create table mysqltest.bar (m int);
create table mysqltest.bar (m int)ENGINE=MyISAM;
insert into mysqltest.bar values(15);
select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar;
n m
......@@ -55,17 +55,17 @@ cluster_replication
mysql
test
create database mysqltest2;
create table mysqltest2.t1(n int, s char(20));
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest2.t1 values (1, 'original foo.t1');
create table mysqltest2.t3(n int, s char(20));
create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest2.t3 values (1, 'original foo.t3');
create database mysqltest3;
create table mysqltest3.t1(n int, s char(20));
create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest3.t1 values (1, 'original foo2.t1');
create database mysqltest;
create table mysqltest.t1(n int, s char(20));
create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest.t1 values (1, 'original bar.t1');
create table mysqltest.t3(n int, s char(20));
create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest.t3 values (1, 'original bar.t3');
load data from master;
show databases;
......
......@@ -4,6 +4,27 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET SQL_LOG_BIN=0,timestamp=200006;
CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM;
INSERT INTO t1 ( a) VALUE ('F');
select unix_timestamp(t) from t1;
unix_timestamp(t)
200006
load table t1 from master;
select unix_timestamp(t) from t1;
unix_timestamp(t)
200006
set SQL_LOG_BIN=1,timestamp=default;
drop table t1;
set SQL_LOG_BIN=0;
CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
INSERT INTO t1 VALUES (1);
load table t1 from master;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
drop table t1;
set SQL_LOG_BIN=0;
create table t1 (word char(20) not null, index(word))ENGINE=MyISAM;
load data infile '../../std_data/words.dat' into table t1;
......
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SHOW VARIABLES LIKE 'relay_log_space_limit';
Variable_name Value
relay_log_space_limit 0
CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM;
INSERT INTO t1 SET name='Andy', age=31;
INSERT t1 SET name='Jacob', age=2;
INSERT into t1 SET name='Caleb', age=1;
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY;
SELECT * FROM t1 ORDER BY id;
name age id
Andy 31 00000001
Jacob 2 00000002
Caleb 1 00000003
SELECT * FROM t1 ORDER BY id;
name age id
Andy 31 00000001
Jacob 2 00000002
Caleb 1 00000003
drop table t1;
......@@ -32,6 +32,7 @@ system_mysql_db : Needs fixing
system_mysql_db_fix : Needs fixing
#ndb_alter_table_row : sometimes wrong error 1015!=1046
ndb_gis : garbled msgs from corrupt THD*
rpl_ndb_auto_inc.test : MySQL Bugs:17086
rpl_ndb_auto_inc : MySQL Bugs:17086
rpl_ndb_relay_space : Results are not deterministic
# vim: set filetype=conf:
######################################
# Change Author: JBM
# Change Date: 2006-02-02
# Change: Added ENGINE=MyISAM
# Reason: LOAD FROM MASTER is only supported from
# MyISAM, therefore there is no reason for this test
# To use anyother Engine
######################################
source include/master-slave.inc;
set SQL_LOG_BIN=0;
create table t1 (word char(20) not null, index(word))ENGINE=MyISAM;
load data infile '../../std_data/words.dat' into table t1;
create table t2 (word char(20) not null)ENGINE=MyISAM;
load data infile '../../std_data/words.dat' into table t2;
create table t3 (word char(20) not null primary key)ENGINE=MyISAM;
connection slave;
load table t1 from master;
load table t2 from master;
load table t3 from master;
check table t1;
select count(*) from t2;
select count(*) from t3;
connection master;
set SQL_LOG_BIN=1;
drop table if exists t1,t2,t3;
save_master_pos;
connection slave;
sync_with_master;
create table t1(n int);
drop table t1;
# End of 4.1 tests
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl000006.test
......@@ -4,10 +4,7 @@
# Change Author: JBM
# Change Date: 2006-02-02
# Change: Added ENGINE=MyISAM
# Reason: NDB engine does not support sql_log_bin and the test is testing
# Different replication features. It is better that the test not be
# skipped due to NDB being default engine so that NDB will be used for
# Some of the testing when default is set to NDB
# Reason: LOAD from master is only supported by MyISAM
#################################################################
source include/master-slave.inc;
......@@ -28,12 +25,12 @@ save_master_pos;
connection slave;
sync_with_master;
create database mysqltest2;
create table mysqltest2.foo (n int);
create table mysqltest2.foo (n int)ENGINE=MyISAM;
insert into mysqltest2.foo values(4);
connection master;
create table mysqltest2.foo (n int);
create table mysqltest2.foo (n int)ENGINE=MyISAM;
insert into mysqltest2.foo values(5);
create table mysqltest.bar (m int);
create table mysqltest.bar (m int)ENGINE=MyISAM;
insert into mysqltest.bar values(15);
save_master_pos;
connection slave;
......@@ -78,21 +75,21 @@ show databases;
# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM
# MASTER will neither touch database mysqltest nor mysqltest3
create database mysqltest2;
create table mysqltest2.t1(n int, s char(20));
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest2.t1 values (1, 'original foo.t1');
create table mysqltest2.t3(n int, s char(20));
create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest2.t3 values (1, 'original foo.t3');
create database mysqltest3;
create table mysqltest3.t1(n int, s char(20));
create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest3.t1 values (1, 'original foo2.t1');
# Create mysqltest, and mysqltest.t1, to check that it gets replaced,
# and mysqltest.t3 to check that it is not touched (there is no
# mysqltest.t3 on master)
create database mysqltest;
create table mysqltest.t1(n int, s char(20));
create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest.t1 values (1, 'original bar.t1');
create table mysqltest.t3(n int, s char(20));
create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM;
insert into mysqltest.t3 values (1, 'original bar.t3');
load data from master;
......
......@@ -6,15 +6,28 @@
# run test case for other engines, in addition test will
# fail if other engines are set as default engine
###########################################################
# Change Author: JBM
# Change Date: 2006-2-3
# Change: removed ENGINE=$engine_type for first create table
# and renamed test file to rpl_load_table_from_master.test.
# In addition added test requirements.
# Reason: Request from review.
############################################################
# REQUIREMENT TEST 1:
# LOAD TABLE FROM MASTER must work with a forced timestamp.
#
# REQUIREMENTi TEST 2:
#LOAD TABLE FROM MASTER must work with table checksum
############################################################
#
# Test forced timestamp
#
-- source include/master-slave.inc
# Don't log table creating to the slave as we want to test LOAD TABLE
set SQL_LOG_BIN=0,timestamp=200006;
eval create table t1(t timestamp not null,a char(1))ENGINE=$engine_type;
insert into t1 ( a) values ('F');
SET SQL_LOG_BIN=0,timestamp=200006;
eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM;
INSERT INTO t1 ( a) VALUE ('F');
select unix_timestamp(t) from t1;
connection slave;
load table t1 from master;
......@@ -36,9 +49,7 @@ connection master;
# Don't log table creating to the slave as we want to test LOAD TABLE
set SQL_LOG_BIN=0;
eval CREATE TABLE t1 (
a int not null
) ENGINE=$engine_type MAX_ROWS=4000 CHECKSUM=1;
eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
INSERT INTO t1 VALUES (1);
save_master_pos;
connection slave;
......@@ -52,4 +63,31 @@ save_master_pos;
connection slave;
sync_with_master;
connection master;
set SQL_LOG_BIN=0;
create table t1 (word char(20) not null, index(word))ENGINE=MyISAM;
load data infile '../../std_data/words.dat' into table t1;
create table t2 (word char(20) not null)ENGINE=MyISAM;
load data infile '../../std_data/words.dat' into table t2;
create table t3 (word char(20) not null primary key)ENGINE=MyISAM;
connection slave;
load table t1 from master;
load table t2 from master;
load table t3 from master;
check table t1;
select count(*) from t2;
select count(*) from t3;
connection master;
set SQL_LOG_BIN=1;
drop table if exists t1,t2,t3;
save_master_pos;
connection slave;
sync_with_master;
create table t1(n int);
drop table t1;
# End of 4.1 tests
##################################
# Wrapper rpl_sv_relay_space.test#
##################################
###################################
# Wrapper rpl_sv_relay_space.test #
# This test has to be wrapped as #
# It tests ndb, innodb and MyISAM.#
# By Wrapping we are saving some #
# space and making the test more #
# Maintainable by only having one #
# test file and reusing the code #
# In Addition, INNODB has to have #
# Option files during this test #
# to force innodb on the slave #
# else the test will fail #
###################################
#Change Author: JBM #
#Change Date: 2006-02-03 #
#Change: Added Comments #
###################################
--source include/have_ndb.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_sv_relay_space.test
......
##################################
# Wrapper rpl_sv_relay_space.test#
##################################
###################################
# Wrapper rpl_sv_relay_space.test #
# This test has to be wrapped as #
# It tests ndb, innodb and MyISAM.#
# By Wrapping we are saving some #
# space and making the test more #
# Maintainable by only having one #
# test file and reusing the code #
# In Addition, INNODB has to have #
# Option files during this test #
# to force innodb on the slave #
# else the test will fail #
###################################
#Change Author: JBM #
#Change Date: 2006-02-03 #
#Change: Added Comments #
###################################
-- source include/have_innodb.inc
let $engine_type=InnoDB;
-- source extra/rpl_tests/rpl_sv_relay_space.test
......
##################################
# Wrapper rpl_sv_relay_space.test#
##################################
###################################
# Wrapper rpl_sv_relay_space.test #
# This test has to be wrapped as #
# It tests ndb, innodb and MyISAM.#
# By Wrapping we are saving some #
# space and making the test more #
# Maintainable by only having one #
# test file and reusing the code #
# In Addition, INNODB has to have #
# Option files during this test #
# to force innodb on the slave #
# else the test will fail #
###################################
#Change Author: JBM #
#Change Date: 2006-02-03 #
#Change: Added Comments #
###################################
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_sv_relay_space.test
# drop table t1 t2 t3 are included int master-slave.inc
# Like rpl000013, meaningful only in statement-based:
# meaningful only in statement-based:
-- source include/have_binlog_format_statement.inc
# Should work on both stm and row
-- source include/master-slave.inc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment