1
###########################################################
3
# Change Date: 2006-2-2
4
# Change: Added ENGINE=$engine_type for first create table
5
# Reason: Only MyISAM supports load from master no need to
6
# run test case for other engines, in addition test will
7
# fail if other engines are set as default engine
8
###########################################################
10
# Change Date: 2006-2-3
11
# Change: removed ENGINE=$engine_type for first create table
12
# and renamed test file to rpl_load_table_from_master.test.
13
# In addition added test requirements.
14
# Reason: Request from review.
15
############################################################
17
# LOAD TABLE FROM MASTER must work with a forced timestamp.
18
############################################################
20
# Test forced timestamp
22
-- source include/master-slave.inc
24
-- echo "******************** Test Requirment 1 *************"
26
# Don't log table creating to the slave as we want to test LOAD TABLE
27
SET SQL_LOG_BIN=0,timestamp=200006;
28
eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM;
29
INSERT INTO t1 ( a) VALUE ('F');
30
select unix_timestamp(t) from t1;
32
load table t1 from master;
33
select unix_timestamp(t) from t1;
35
# Delete the created table on master and slave
37
set SQL_LOG_BIN=1,timestamp=default;
45
# Test copying table with checksum
48
# Don't log table creating to the slave as we want to test LOAD TABLE
51
#######################################################
52
# REQUIREMENTi TEST 2:
53
#LOAD TABLE FROM MASTER must work with table checksum
54
#######################################################
55
-- echo "******************** Test Requirment 2 *************"
57
eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
58
INSERT INTO t1 VALUES (1);
62
load table t1 from master;
73
create table t1 (word char(20) not null, index(word))ENGINE=MyISAM;
74
load data infile '../std_data_ln/words.dat' into table t1;
75
create table t2 (word char(20) not null)ENGINE=MyISAM;
76
load data infile '../std_data_ln/words.dat' into table t2;
77
create table t3 (word char(20) not null primary key)ENGINE=MyISAM;
79
load table t1 from master;
80
load table t2 from master;
81
load table t3 from master;
83
select count(*) from t2;
84
select count(*) from t3;
87
drop table if exists t1,t2,t3;
91
create table t1(n int);