Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8e5e0afa
Commit
8e5e0afa
authored
Jan 18, 2006
by
jmiller@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated test cases for testing Cluster Replication using the rpl* test cases
parent
4d885f5c
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
203 additions
and
144 deletions
+203
-144
mysql-test/include/not_ndb_table.inc
mysql-test/include/not_ndb_table.inc
+10
-0
mysql-test/r/not_ndb_table.require
mysql-test/r/not_ndb_table.require
+2
-0
mysql-test/r/rpl000005.result
mysql-test/r/rpl000005.result
+2
-2
mysql-test/r/rpl_000015.result
mysql-test/r/rpl_000015.result
+2
-2
mysql-test/r/rpl_bit.result
mysql-test/r/rpl_bit.result
+24
-24
mysql-test/r/rpl_loaddata2.result
mysql-test/r/rpl_loaddata2.result
+20
-20
mysql-test/r/rpl_loadfile.result
mysql-test/r/rpl_loadfile.result
+2
-9
mysql-test/r/rpl_log_pos.result
mysql-test/r/rpl_log_pos.result
+1
-1
mysql-test/r/rpl_row_USER.result
mysql-test/r/rpl_row_USER.result
+2
-2
mysql-test/r/rpl_timezone.result
mysql-test/r/rpl_timezone.result
+13
-13
mysql-test/r/rpl_user_variables.result
mysql-test/r/rpl_user_variables.result
+32
-32
mysql-test/t/rpl000005.test
mysql-test/t/rpl000005.test
+7
-2
mysql-test/t/rpl_000015.test
mysql-test/t/rpl_000015.test
+8
-2
mysql-test/t/rpl_bit.test
mysql-test/t/rpl_bit.test
+10
-6
mysql-test/t/rpl_foreign_key_innodb.test
mysql-test/t/rpl_foreign_key_innodb.test
+5
-0
mysql-test/t/rpl_loaddata2.test
mysql-test/t/rpl_loaddata2.test
+8
-2
mysql-test/t/rpl_loadfile.test
mysql-test/t/rpl_loadfile.test
+7
-7
mysql-test/t/rpl_log_pos.test
mysql-test/t/rpl_log_pos.test
+7
-1
mysql-test/t/rpl_optimize.test
mysql-test/t/rpl_optimize.test
+7
-1
mysql-test/t/rpl_row_USER.test
mysql-test/t/rpl_row_USER.test
+6
-2
mysql-test/t/rpl_timezone.test
mysql-test/t/rpl_timezone.test
+19
-14
mysql-test/t/rpl_user_variables.test
mysql-test/t/rpl_user_variables.test
+9
-2
No files found.
mysql-test/include/not_ndb_table.inc
0 → 100644
View file @
8e5e0afa
#######################
# Author: JBM
# Date: 2006-01-17
# Purpose: To skip a test when default-storage-engine=ndb
#######################
--
require
r
/
not_ndb_table
.
require
disable_query_log
;
show
variables
like
"table_type"
;
enable_query_log
;
mysql-test/r/not_ndb_table.require
0 → 100644
View file @
8e5e0afa
Variable_name Value
table_type MyISAM
mysql-test/r/rpl000005.result
View file @
8e5e0afa
...
...
@@ -12,12 +12,12 @@ 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
;
SELECT * FROM t1 ORDER BY id
;
name age id
Andy 31 00000001
Jacob 2 00000002
Caleb 1 00000003
select * from t1
;
SELECT * FROM t1 ORDER BY id
;
name age id
Andy 31 00000001
Jacob 2 00000002
...
...
mysql-test/r/rpl_000015.result
View file @
8e5e0afa
...
...
@@ -21,12 +21,12 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
n
10
45
90
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
n
10
45
...
...
mysql-test/r/rpl_bit.result
View file @
8e5e0afa
...
...
@@ -65,36 +65,36 @@ oSupp sSuppD GSuppDf VNotSupp x034
5 5 3 2 1
5 5 3 2 1
5 5 3 2 1
SELECT hex(bit1)
from test.
t1;
SELECT hex(bit1)
FROM test.t1 ORDER BY bi
t1;
hex(bit1)
3F
3F
0
2A
0
0
0
0
SELECT hex(bit2) from test.t1;
hex(bit2)
3E
0
2A
3F
3F
SELECT hex(bit2) from test.t1 ORDER BY bit2;
hex(bit2)
0
1
1
1
1
SELECT hex(bit3) from test.t1;
2A
3E
3F
SELECT hex(bit3) from test.t1 ORDER BY bit3;
hex(bit3)
35
24
15
0
1
1
1
1
15
24
35
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1;
oSupp sSuppD GSuppDf VNotSupp x034
5 5 3 2 1
...
...
@@ -105,34 +105,34 @@ oSupp sSuppD GSuppDf VNotSupp x034
5 5 3 2 1
5 5 3 2 1
5 5 3 2 1
SELECT hex(bit1)
from test.
t1;
SELECT hex(bit1)
FROM test.t1 ORDER BY bi
t1;
hex(bit1)
3F
3F
0
2A
0
0
0
0
SELECT hex(bit2) from test.t1;
hex(bit2)
3E
0
2A
3F
3F
SELECT hex(bit2) from test.t1 ORDER BY bit2;
hex(bit2)
0
1
1
1
1
SELECT hex(bit3) from test.t1;
2A
3E
3F
SELECT hex(bit3) from test.t1 ORDER BY bit3;
hex(bit3)
35
24
15
0
1
1
1
1
15
24
35
DROP TABLE IF EXISTS test.t1;
mysql-test/r/rpl_loaddata2.result
View file @
8e5e0afa
...
...
@@ -6,27 +6,27 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (word CHAR(20) NOT NULL);
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY word
;
word
Aarhus
Aaron
Ababa
aback
abaft
abandon
abandoned
abandoning
abandonment
abandons
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
...
...
@@ -78,27 +78,27 @@ Aberdeen
Abernathy
aberrant
aberration
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY word
;
word
Aarhus
Aaron
Ababa
aback
abaft
abandon
abandoned
abandoning
abandonment
abandons
Aarhus
Aaron
Aaron
Ababa
Ababa
aback
aback
abaft
abaft
abandon
abandon
abandoned
abandoned
abandoning
abandoning
abandonment
abandonment
abandons
abandons
abase
abased
...
...
mysql-test/r/rpl_loadfile.result
View file @
8e5e0afa
...
...
@@ -15,7 +15,7 @@ INSERT INTO test.t1 VALUES(2,'test');
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2;
end|
CALL test.p1();
SELECT * FROM test.t1;
SELECT * FROM test.t1
ORDER BY blob_column
;
a blob_column
1 abase
abased
...
...
@@ -119,14 +119,7 @@ Abernathy
aberrant
aberration
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
`blob_column` longblob,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM test.t1;
SELECT * FROM test.t1 ORDER BY blob_column;
a blob_column
1 abase
abased
...
...
mysql-test/r/rpl_log_pos.result
View file @
8e5e0afa
...
...
@@ -38,7 +38,7 @@ insert into t1 values (1),(2),(3);
stop slave;
change master to master_log_pos=102;
start slave;
select * from t1;
select * from t1
ORDER BY n
;
n
1
2
...
...
mysql-test/r/rpl_row_USER.result
View file @
8e5e0afa
...
...
@@ -19,13 +19,13 @@ INSERT INTO mysqltest1.t1 VALUES(3,USER());
INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER());
end|
CALL mysqltest1.p1();
SELECT * FROM mysqltest1.t1;
SELECT * FROM mysqltest1.t1
ORDER BY a
;
a users
1 tester@localhost
2 @localhost
3 tester@localhost
4 @localhost
SELECT * FROM mysqltest1.t1;
SELECT * FROM mysqltest1.t1
ORDER BY a
;
a users
1 tester@localhost
2 @localhost
...
...
mysql-test/r/rpl_timezone.result
View file @
8e5e0afa
...
...
@@ -15,13 +15,13 @@ select @@time_zone;
Europe/Moscow
insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL);
insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
2005-01-01 00:00:00 1
2005-06-11 09:39:02 2
2004-01-01 00:00:00 3
2004-06-11 09:39:02 4
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
2005-01-01 06:00:00 1
2005-06-11 14:39:02 2
...
...
@@ -30,12 +30,12 @@ t n
delete from t1;
set time_zone='Europe/Moscow';
insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
2004-01-01 00:00:00 5
2004-06-11 09:39:02 6
set time_zone='Europe/Moscow';
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
2004-01-01 00:00:00 5
2004-06-11 09:39:02 6
...
...
@@ -47,12 +47,12 @@ Warning 1265 Data truncated for column 't' at row 1
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1265 Data truncated for column 't' at row 2
Warning 1261 Row 2 doesn't contain data for all columns
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
0000-00-00 00:00:00 7
0000-00-00 00:00:00 8
set time_zone='UTC';
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
0000-00-00 00:00:00 7
0000-00-00 00:00:00 8
...
...
@@ -62,18 +62,18 @@ delete from t1;
insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
set time_zone='MET';
insert into t2 (select * from t1);
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
t n
2003-12-31 22:00:00 9
2004-06-11 07:39:02 10
select * from t2
;
SELECT * FROM t2 ORDER BY n
;
t n
2003-12-31 22:00:00 9
2004-06-11 07:39:02 10
delete from t2;
set timestamp=1000072000;
insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL);
select * from t2
;
SELECT * FROM t2 ORDER BY n
;
t n
2001-09-09 23:46:40 11
2001-09-09 12
...
...
@@ -81,11 +81,11 @@ t n
delete from t2;
insert into t2 values (from_unixtime(1000000000),NULL),
(unix_timestamp('2001-09-09 03:46:40'),NULL);
select * from t2
;
SELECT * FROM t2 ORDER BY n
;
t n
2001-09-09 03:46:40 14
1000000000 15
select * from t2
;
SELECT * FROM t2 ORDER BY n
;
t n
2001-09-09 03:46:40 14
1000000000 15
...
...
@@ -94,11 +94,11 @@ delete from t2;
set time_zone='UTC';
insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL);
insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL);
select * from t2
;
SELECT * FROM t2 ORDER BY n
;
t n
2003-12-31 23:00:00 16
2005-01-01 08:00:00 17
select * from t2
;
SELECT * FROM t2 ORDER BY n
;
t n
2003-12-31 23:00:00 16
2005-01-01 08:00:00 17
...
...
mysql-test/r/rpl_user_variables.result
View file @
8e5e0afa
...
...
@@ -24,59 +24,59 @@ insert into t1 values (@a),(@a);
select * from t1 where n = '<nonexistant>';
n
insert into t1 values (@a),(@a),(@a*5);
select * from t1
;
SELECT * FROM t1 ORDER BY n
;
n
12345678901234
-12345678901234
0
-1
12.5
-12.5
This is a test
abc'def
abc\def
abc'def
NULL
NULL
NULL
NULL
NULL
-1
-12.5
-12345678901234
0
0
1
12.5
12345678901234
2
5
5
5
abc
abc'def
abc'def
abcn1
abcn1n2
5
5
abc\def
This is a test
SELECT * FROM t1 ORDER BY n;
n
NULL
NULL
NULL
select * from t1;
n
12345678901234
-12345678901234
0
-1
12.5
-12.5
This is a test
abc'def
abc\def
abc'def
NULL
NULL
-1
-12.5
-12345678901234
0
0
1
12.5
12345678901234
2
5
5
5
abc
abc'def
abc'def
abcn1
abcn1n2
5
5
NULL
NULL
NULL
abc\def
This is a test
drop table t1;
stop slave;
mysql-test/t/rpl000005.test
View file @
8e5e0afa
####################
# Change Author: JBM
# Change Date: 2006-01-17
# Change: Added order by in select
####################
source
include
/
master
-
slave
.
inc
;
#
...
...
@@ -10,11 +15,11 @@ 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
;
SELECT
*
FROM
t1
ORDER
BY
id
;
save_master_pos
;
connection
slave
;
sync_with_master
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
id
;
connection
master
;
drop
table
t1
;
save_master_pos
;
...
...
mysql-test/t/rpl_000015.test
View file @
8e5e0afa
#####################
# Change Author: JBM
# Change Date: 2006-01-17
# Change: added order by in select
#####################
connect
(
master
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
connect
(
slave
,
localhost
,
root
,,
test
,
$SLAVE_MYPORT
,
slave
.
sock
);
connection
master
;
...
...
@@ -34,8 +40,8 @@ create table t1 (n int, PRIMARY KEY(n));
insert
into
t1
values
(
10
),(
45
),(
90
);
sync_slave_with_master
;
connection
slave
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
connection
master
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
drop
table
t1
;
sync_slave_with_master
;
mysql-test/t/rpl_bit.test
View file @
8e5e0afa
...
...
@@ -4,6 +4,10 @@
#############################################################################
# Test: To test the replication of the bit field #
#############################################################################
# Change Author: JBM
# Change Date: 2006-01-16
# Change: Added Order by for NDB
##########
--
source
include
/
master
-
slave
.
inc
...
...
@@ -71,17 +75,17 @@ UNLOCK TABLES;
SELECT
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
FROM
test
.
t1
;
SELECT
hex
(
bit1
)
from
test
.
t1
;
SELECT
hex
(
bit2
)
from
test
.
t1
;
SELECT
hex
(
bit3
)
from
test
.
t1
;
SELECT
hex
(
bit1
)
FROM
test
.
t1
ORDER
BY
bi
t1
;
SELECT
hex
(
bit2
)
from
test
.
t1
ORDER
BY
bit2
;
SELECT
hex
(
bit3
)
from
test
.
t1
ORDER
BY
bit3
;
save_master_pos
;
connection
slave
;
sync_with_master
;
SELECT
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
FROM
test
.
t1
;
SELECT
hex
(
bit1
)
from
test
.
t1
;
SELECT
hex
(
bit2
)
from
test
.
t1
;
SELECT
hex
(
bit3
)
from
test
.
t1
;
SELECT
hex
(
bit1
)
FROM
test
.
t1
ORDER
BY
bi
t1
;
SELECT
hex
(
bit2
)
from
test
.
t1
ORDER
BY
bit2
;
SELECT
hex
(
bit3
)
from
test
.
t1
ORDER
BY
bit3
;
connection
master
;
DROP
TABLE
IF
EXISTS
test
.
t1
;
...
...
mysql-test/t/rpl_foreign_key_innodb.test
View file @
8e5e0afa
###################################
# Wrapper for rpl_foreign_key.test#
###################################
# Change Author: JBM
# Change Date: 2006-01-17
# Change: FK not supported, skip test when NDB is forced
####################################
--
source
include
/
not_ndb_table
.
inc
--
source
include
/
have_innodb
.
inc
let
$engine_type
=
INNODB
;
--
source
extra
/
rpl_tests
/
rpl_foreign_key
.
test
mysql-test/t/rpl_loaddata2.test
View file @
8e5e0afa
...
...
@@ -2,7 +2,13 @@
CREATE
TABLE
t1
(
word
CHAR
(
20
)
NOT
NULL
);
LOAD
DATA
INFILE
'../../std_data/words.dat'
INTO
TABLE
t1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
word
;
sync_slave_with_master
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
word
;
##########
# Change Author: JBM
# Change Date: 2006-01-16
# Change: Added Order by for NDB
##########
mysql-test/t/rpl_loadfile.test
View file @
8e5e0afa
...
...
@@ -4,6 +4,10 @@
#############################################################################
# TEST: To test the LOAD_FILE() in rbr #
#############################################################################
# Change Author: JBM
# Change Date: 2006-01-16
# Change: Added Order by for NDB
##########
# Includes
--
source
include
/
master
-
slave
.
inc
...
...
@@ -30,18 +34,14 @@ end|
delimiter
;
|
CALL
test
.
p1
();
SELECT
*
FROM
test
.
t1
;
SELECT
*
FROM
test
.
t1
ORDER
BY
blob_column
;
save_master_pos
;
sync_slave_with_master
;
connection
slave
;
SHOW
CREATE
TABLE
test
.
t1
;
SELECT
*
FROM
test
.
t1
;
SELECT
*
FROM
test
.
t1
ORDER
BY
blob_column
;
connection
master
;
# Lets cleanup
#show binlog events;
connection
master
;
DROP
PROCEDURE
IF
EXISTS
test
.
p1
;
DROP
TABLE
test
.
t1
;
# End of 5.0 test case
mysql-test/t/rpl_log_pos.test
View file @
8e5e0afa
##########
# Change Author: JBM
# Change Date: 2006-01-16
# Change: Added Order by for NDB
##########
#
# Testing of setting slave to wrong log position with master_log_pos
#
...
...
@@ -46,7 +52,7 @@ stop slave;
change
master
to
master_log_pos
=
102
;
start
slave
;
sync_with_master
;
select
*
from
t1
;
select
*
from
t1
ORDER
BY
n
;
connection
master
;
drop
table
t1
;
sync_slave_with_master
;
...
...
mysql-test/t/rpl_optimize.test
View file @
8e5e0afa
# Test for BUG#1858 "OPTIMIZE TABLE done by a client
# thread stops the slave SQL thread".
# You can replace OPTIMIZE by REPAIR.
#####################################
# Change Author: JBM
# Change Date: 2006-01-17
# Change: Skip test when default table = ndb
#####################################
source
include
/
master
-
slave
.
inc
;
--
source
include
/
not_ndb_table
.
inc
--
source
include
/
master
-
slave
.
inc
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
int
,
key
(
b
));
INSERT
INTO
t1
(
a
)
VALUES
(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
),(
10
);
...
...
mysql-test/t/rpl_row_USER.test
View file @
8e5e0afa
...
...
@@ -4,6 +4,10 @@
#############################################################################
# TEST: To test the UUID() in rbr #
#############################################################################
# Change Author: JBM
# Change Date: 2006-01-16
# Change: Added Order by for NDB
##########
# Includes
--
source
include
/
have_binlog_format_row
.
inc
...
...
@@ -37,9 +41,9 @@ delimiter ;|
CALL
mysqltest1
.
p1
();
connection
master
;
SELECT
*
FROM
mysqltest1
.
t1
;
SELECT
*
FROM
mysqltest1
.
t1
ORDER
BY
a
;
sync_slave_with_master
;
SELECT
*
FROM
mysqltest1
.
t1
;
SELECT
*
FROM
mysqltest1
.
t1
ORDER
BY
a
;
connection
master
;
# Lets cleanup
...
...
mysql-test/t/rpl_timezone.test
View file @
8e5e0afa
#######################################
# Change Author: JBM
# Change Date: 2006-01-17
# Change: Added order by
#######################################
# Test of replication of time zones.
######################################
# There is currently some bug possibly in prepared statements (this
# test fails with --ps-protocol): sys_var_thd_time_zone::value_ptr()
# is called only at prepare time, not at execution time. So,
...
...
@@ -32,10 +37,10 @@ select @@time_zone;
#select @@time_zone;
insert
into
t1
values
(
'20050101000000'
,
NULL
),
(
'20050611093902'
,
NULL
);
insert
into
t1
values
(
'20040101000000'
,
NULL
),
(
'20040611093902'
,
NULL
);
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
sync_slave_with_master
;
#set time_zone='UTC';
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
# Let us check also that setting of time_zone back to default also works
# well
...
...
@@ -43,10 +48,10 @@ connection master;
delete
from
t1
;
set
time_zone
=
'Europe/Moscow'
;
insert
into
t1
values
(
'20040101000000'
,
NULL
),
(
'20040611093902'
,
NULL
);
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
sync_slave_with_master
;
set
time_zone
=
'Europe/Moscow'
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
connection
master
;
# Change Author: JBM
# Change Date: 2005-12-22
...
...
@@ -60,10 +65,10 @@ connection master;
delete
from
t1
;
set
time_zone
=
'UTC'
;
load
data
infile
'../../std_data/rpl_timezone2.dat'
into
table
t1
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
sync_slave_with_master
;
set
time_zone
=
'UTC'
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
set
time_zone
=
'Europe/Moscow'
;
# Put back values of before the LOAD
...
...
@@ -79,9 +84,9 @@ insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
#
set
time_zone
=
'MET'
;
insert
into
t2
(
select
*
from
t1
);
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
sync_slave_with_master
;
select
*
from
t2
;
SELECT
*
FROM
t2
ORDER
BY
n
;
#
# Now let us check how well we replicate various CURRENT_* functions
...
...
@@ -91,7 +96,7 @@ delete from t2;
set
timestamp
=
1000072000
;
insert
into
t2
values
(
current_timestamp
,
NULL
),
(
current_date
,
NULL
),
(
current_time
,
NULL
);
sync_slave_with_master
;
select
*
from
t2
;
SELECT
*
FROM
t2
ORDER
BY
n
;
#
# At last let us check replication of FROM_UNIXTIME/UNIX_TIMESTAMP functions.
...
...
@@ -100,10 +105,10 @@ connection master;
delete
from
t2
;
insert
into
t2
values
(
from_unixtime
(
1000000000
),
NULL
),
(
unix_timestamp
(
'2001-09-09 03:46:40'
),
NULL
);
select
*
from
t2
;
SELECT
*
FROM
t2
ORDER
BY
n
;
sync_slave_with_master
;
# We should get same result on slave as on master
select
*
from
t2
;
SELECT
*
FROM
t2
ORDER
BY
n
;
#
# Let us check that we are allowing to set global time_zone with
...
...
@@ -119,9 +124,9 @@ delete from t2;
set
time_zone
=
'UTC'
;
insert
into
t2
values
(
convert_tz
(
'2004-01-01 00:00:00'
,
'MET'
,
@@
time_zone
),
NULL
);
insert
into
t2
values
(
convert_tz
(
'2005-01-01 00:00:00'
,
'MET'
,
'Japan'
),
NULL
);
select
*
from
t2
;
SELECT
*
FROM
t2
ORDER
BY
n
;
sync_slave_with_master
;
select
*
from
t2
;
SELECT
*
FROM
t2
ORDER
BY
n
;
# Clean up
connection
master
;
...
...
mysql-test/t/rpl_user_variables.test
View file @
8e5e0afa
###################################
# Change Author: JBM
# Change Date: 2006-01-17
# Change: Added order by
###################################
#
# Test of replicating user variables
#
###################################
--
source
include
/
master
-
slave
.
inc
# Disable PS as the log positions differs
--
disable_ps_protocol
...
...
@@ -44,9 +51,9 @@ insert into t1 values (@a),(@a);
select
*
from
t1
where
n
=
'<nonexistant>'
;
connection
master1
;
# see if variable is reset in binlog when thread changes
insert
into
t1
values
(
@
a
),(
@
a
),(
@
a
*
5
);
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
sync_slave_with_master
;
select
*
from
t1
;
SELECT
*
FROM
t1
ORDER
BY
n
;
connection
master
;
drop
table
t1
;
sync_slave_with_master
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment