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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
60be6c25
Commit
60be6c25
authored
Feb 13, 2006
by
jmiller@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated test cases
parent
6b45a0b7
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
384 additions
and
100 deletions
+384
-100
mysql-test/extra/rpl_tests/rpl_auto_increment.test
mysql-test/extra/rpl_tests/rpl_auto_increment.test
+9
-0
mysql-test/extra/rpl_tests/rpl_row_blob.test
mysql-test/extra/rpl_tests/rpl_row_blob.test
+6
-1
mysql-test/include/not_ndb_default.inc
mysql-test/include/not_ndb_default.inc
+4
-0
mysql-test/r/rpl_ndb_auto_inc.result
mysql-test/r/rpl_ndb_auto_inc.result
+79
-90
mysql-test/r/rpl_ndb_blob2.result
mysql-test/r/rpl_ndb_blob2.result
+156
-0
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-1
mysql-test/t/rpl_ndb_auto_inc-master.opt
mysql-test/t/rpl_ndb_auto_inc-master.opt
+0
-1
mysql-test/t/rpl_ndb_auto_inc.test
mysql-test/t/rpl_ndb_auto_inc.test
+114
-5
mysql-test/t/rpl_ndb_blob2.test
mysql-test/t/rpl_ndb_blob2.test
+9
-0
mysql-test/t/rpl_optimize.test
mysql-test/t/rpl_optimize.test
+7
-2
No files found.
mysql-test/extra/rpl_tests/rpl_auto_increment.test
View file @
60be6c25
#
#
# Test of auto_increment with offset
# Test of auto_increment with offset
#
#
#####################################
# By: JBM
# Date: 2006-02-10
# Change: NDB does not support auto inc
# in this usage. Currently there is no
# plan to implment. Skipping test when
# NDB is default engine.
#####################################
--
source
include
/
not_ndb_default
.
inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
master
-
slave
.
inc
eval
create
table
t1
(
a
int
not
null
auto_increment
,
b
int
,
primary
key
(
a
))
engine
=
$engine_type2
auto_increment
=
3
;
eval
create
table
t1
(
a
int
not
null
auto_increment
,
b
int
,
primary
key
(
a
))
engine
=
$engine_type2
auto_increment
=
3
;
...
...
mysql-test/extra/rpl_tests/rpl_row_blob.test
View file @
60be6c25
...
@@ -30,7 +30,6 @@ data LONGBLOB, PRIMARY KEY(c1))ENGINE=$engine_type;
...
@@ -30,7 +30,6 @@ data LONGBLOB, PRIMARY KEY(c1))ENGINE=$engine_type;
INSERT
INTO
test
.
t1
VALUES
(
NULL
,
NULL
);
INSERT
INTO
test
.
t1
VALUES
(
NULL
,
NULL
);
INSERT
INTO
test
.
t1
VALUES
(
NULL
,
repeat
(
'a'
,
1
*
1024
));
INSERT
INTO
test
.
t1
VALUES
(
NULL
,
repeat
(
'a'
,
1
*
1024
));
INSERT
INTO
test
.
t1
VALUES
(
NULL
,
repeat
(
'b'
,
16
*
1024
));
INSERT
INTO
test
.
t1
VALUES
(
NULL
,
repeat
(
'b'
,
16
*
1024
));
CHECK
TABLE
test
.
t1
;
--
echo
--
echo
--
echo
****
Data
Insert
Validation
Master
Section
test
.
t1
****
--
echo
****
Data
Insert
Validation
Master
Section
test
.
t1
****
...
@@ -60,6 +59,9 @@ UPDATE t1 set data=repeat('c',17*1024) where c1 = 2;
...
@@ -60,6 +59,9 @@ UPDATE t1 set data=repeat('c',17*1024) where c1 = 2;
--
echo
--
echo
SELECT
LENGTH
(
data
)
FROM
test
.
t1
WHERE
c1
=
1
;
SELECT
LENGTH
(
data
)
FROM
test
.
t1
WHERE
c1
=
1
;
SELECT
LENGTH
(
data
)
FROM
test
.
t1
WHERE
c1
=
2
;
SELECT
LENGTH
(
data
)
FROM
test
.
t1
WHERE
c1
=
2
;
# Sleep is needed for NDB to allow time for
# Injector thread to populate the bin log.
sleep
10
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
...
@@ -155,6 +157,9 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
...
@@ -155,6 +157,9 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM
test
.
t2
WHERE
c1
=
1
;
FROM
test
.
t2
WHERE
c1
=
1
;
SELECT
c1
,
LENGTH
(
c2
),
SUBSTR
(
c2
,
1
+
2
*
900
,
2
),
LENGTH
(
c4
),
SUBSTR
(
c4
,
1
+
3
*
900
,
3
)
SELECT
c1
,
LENGTH
(
c2
),
SUBSTR
(
c2
,
1
+
2
*
900
,
2
),
LENGTH
(
c4
),
SUBSTR
(
c4
,
1
+
3
*
900
,
3
)
FROM
test
.
t2
WHERE
c1
=
2
;
FROM
test
.
t2
WHERE
c1
=
2
;
# Sleep is needed for NDB to allow time for
# Injector thread to populate the bin log.
sleep
15
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
sync_with_master
;
sync_with_master
;
...
...
mysql-test/include/not_ndb_default.inc
0 → 100644
View file @
60be6c25
--
require
r
/
true
.
require
disable_query_log
;
select
convert
(
@@
table_type
using
latin1
)
NOT
IN
(
"ndbcluster"
,
"NDBCLUSTER"
)
as
"TRUE"
;
enable_query_log
;
mysql-test/r/rpl_ndb_auto_inc.result
View file @
60be6c25
...
@@ -4,116 +4,94 @@ reset master;
...
@@ -4,116 +4,94 @@ reset master;
reset slave;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3;
***************** Test 1 ************************
CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3;
insert into t1 values (NULL,1),(NULL,2),(NULL,3);
insert into t1 values (NULL,1),(NULL,2),(NULL,3);
select * from t1;
******* Select from Master *************
select * from t1 ORDER BY a;
a b
a b
12 1
3 1
22 2
4 2
32 3
5 3
select * from t1;
******* Select from Slave *************
select * from t1 ORDER BY a;
a b
a b
12
1
3
1
22
2
4
2
32
3
5
3
drop table t1;
drop table t1;
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=
myisam
;
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=
NDB
;
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
delete from t1 where b=4;
delete from t1 where b=4;
insert into t1 values (NULL,5),(NULL,6);
insert into t1 values (NULL,5),(NULL,6);
select * from t1;
******* Select from Master *************
select * from t1 ORDER BY a;
a b
a b
1 1
1 1
2 2
2 2
3 3
3 3
22 5
5 5
32 6
6 6
select * from t1;
******* Select from Slave *************
select * from t1 ORDER BY a;
a b
a b
1 1
1 1
2 2
2 2
3 3
3 3
22
5
5
5
32
6
6
6
drop table t1;
drop table t1;
set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10;
create table t1 (a int not null auto_increment, primary key (a)) engine=NDB;
show variables like "%auto_inc%";
Variable_name Value
auto_increment_increment 100
auto_increment_offset 10
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert into t1 values (NULL),(5),(NULL);
insert into t1 values (NULL),(5),(NULL);
insert into t1 values (250),(NULL);
insert into t1 values (250),(NULL);
select * from t1;
******* Select from Master *************
a
5
select * from t1 ORDER BY a;
10
110
250
310
insert into t1 values (1000);
set @@insert_id=400;
insert into t1 values(NULL),(NULL);
select * from t1;
a
5
10
110
250
310
400
410
1000
select * from t1;
a
5
10
110
250
310
400
410
1000
drop table t1;
create table t1 (a int not null auto_increment, primary key (a)) engine=innodb;
insert into t1 values (NULL),(5),(NULL);
insert into t1 values (250),(NULL);
select * from t1;
a
a
1
5
5
10
6
110
250
250
310
251
insert into t1 values (1000);
insert into t1 values (1000);
set @@insert_id=400;
set @@insert_id=400;
insert into t1 values(NULL),(NULL);
insert into t1 values(NULL),(NULL);
select * from t1;
******* Select from Master *************
select * from t1 ORDER BY a;
a
a
1
5
5
10
6
110
250
250
310
251
400
400
410
1000
1000
select * from t1;
1001
******* Select from Slave *************
select * from t1 ORDER BY a;
a
a
1
5
5
10
6
110
250
250
310
251
400
400
410
1000
1000
1001
drop table t1;
drop table t1;
set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
create table t1 (a int not null auto_increment, primary key (a)) engine=NDB;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert into t1 values (NULL),(5),(NULL),(NULL);
insert into t1 values (NULL),(5),(NULL),(NULL);
insert into t1 values (500),(NULL),(502),(NULL),(NULL);
insert into t1 values (500),(NULL),(502),(NULL),(600);
select * from t1;
******* Select from Master *************
select * from t1 ORDER BY a;
a
a
1
1
5
5
...
@@ -123,13 +101,15 @@ a
...
@@ -123,13 +101,15 @@ a
501
501
502
502
503
503
504
600
set @@insert_id=600;
set @@insert_id=600;
insert into t1 values(600),(NULL),(NULL);
insert into t1 values(600),(NULL),(NULL);
ERROR 23000:
Duplicate entry '600' for key 1
ERROR 23000:
Can't write; duplicate key in table 't1'
set @@insert_id=600;
set @@insert_id=600;
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
select * from t1;
******* Select from Master *************
select * from t1 ORDER BY a;
a
a
1
1
5
5
...
@@ -139,11 +119,14 @@ a
...
@@ -139,11 +119,14 @@ a
501
501
502
502
503
503
504
600
600
603
604
610
610
611
611
select * from t1;
******* Select from Slave *************
select * from t1 ORDER BY a;
a
a
1
1
5
5
...
@@ -153,33 +136,39 @@ a
...
@@ -153,33 +136,39 @@ a
501
501
502
502
503
503
504
600
600
603
604
610
610
611
611
drop table t1;
drop table t1;
set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1;
create table t1 (a int not null auto_increment, primary key (a)) engine=NDB;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert into t1 values(2),(12),(22),(32),(42);
insert into t1 values(2),(12),(22),(32),(42);
insert into t1 values (NULL),(NULL);
insert into t1 values (NULL),(NULL);
insert into t1 values (3),(NULL),(NULL);
insert into t1 values (3),(NULL),(NULL);
select * from t1;
******* Select from Master *************
select * from t1 ORDER BY a;
a
a
1
1
2
3
3
11
4
21
5
31
******* Select from Slave *************
select * from t1;
** Slave should have 2, 12, 22, 32, 42 **
** Master will have 2 but not 12, 22, 32, 42 **
select * from t1 ORDER BY a;
a
a
1
1
2
2
3
3
11
4
5
12
12
21
22
22
31
32
32
42
42
drop table t1;
drop table t1;
mysql-test/r/rpl_ndb_blob2.result
0 → 100644
View file @
60be6c25
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;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
***** Table Create Section ****
CREATE TABLE test.t1 (c1 int not null auto_increment,
data LONGBLOB, PRIMARY KEY(c1))ENGINE=#;
**** Data Insert Section test.t1 *****
INSERT INTO test.t1 VALUES (NULL, NULL);
INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024));
INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024));
**** Data Insert Validation Master Section test.t1 ****
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1;
LENGTH(data)
NULL
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
LENGTH(data)
1024
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3;
LENGTH(data)
16384
**** Data Insert Validation Slave Section test.t1 ****
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1;
LENGTH(data)
NULL
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
LENGTH(data)
1024
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3;
LENGTH(data)
16384
**** Data Update Section test.t1 ****
UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1;
UPDATE t1 set data=repeat('c',17*1024) where c1 = 2;
**** Data Update Validation Master Section test.t1 ****
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1;
LENGTH(data)
18432
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
LENGTH(data)
17408
**** Data Update Validation Slave Section test.t1 ****
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1;
LENGTH(data)
18432
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
LENGTH(data)
17408
**** End Test Section test.t1 ****
**** Create Table test.t2 ****
CREATE TABLE test.t2 (
c1 INT NOT NULL PRIMARY KEY,
c2 TEXT,
c3 INT,
c4 LONGBLOB,
KEY(c3))ENGINE=#;
*** Setup Values For test.t2 ***
set @x0 = '01234567012345670123456701234567';
set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
set @b1 = 'b1';
set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
set @b1 = concat(@b1,@x0);
set @d1 = 'dd1';
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1);
set @b2 = 'b2';
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @d2 = 'dd2';
set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2);
**** Data Insert Section test.t2 *****
INSERT INTO test.t2 VALUES(1,@b1,111,@d1);
INSERT INTO test.t2 VALUES(2,@b2,222,@d2);
**** Data Insert Validation Master Section test.t2 ****
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=1;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
1 2256 b1 3000 dd1
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
2 20000 b2 30000 dd2
**** Data Insert Validation Slave Section test.t2 ****
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=1;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
1 2256 b1 3000 dd1
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
2 20000 b2 30000 dd2
**** Data Update Section test.t2 ****
UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1;
UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2;
**** Data Update Validation Master Section test.t2 ****
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=1;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
1 20000 b2 30000 dd2
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
2 2256 b1 3000 dd1
**** Data Update Validation Slave Section test.t2 ****
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=1;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
1 20000 b2 30000 dd2
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
2 2256 b1 3000 dd1
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
mysql-test/t/disabled.def
View file @
60be6c25
...
@@ -29,7 +29,6 @@ ndb_autodiscover : Needs to be fixed w.r.t binlog
...
@@ -29,7 +29,6 @@ ndb_autodiscover : Needs to be fixed w.r.t binlog
ndb_autodiscover2 : Needs to be fixed w.r.t binlog
ndb_autodiscover2 : Needs to be fixed w.r.t binlog
ndb_alter_table_row : sometimes wrong error 1015!=1046
ndb_alter_table_row : sometimes wrong error 1015!=1046
ndb_gis : garbled msgs from corrupt THD*
ndb_gis : garbled msgs from corrupt THD*
rpl_ndb_auto_inc : Bug #17086
rpl_ndb_relay_space : Bug #16993
rpl_ndb_relay_space : Bug #16993
ndb_binlog_ddl_multi : Bug #17038
ndb_binlog_ddl_multi : Bug #17038
rpl_ndb_log : Bug #17158
rpl_ndb_log : Bug #17158
...
...
mysql-test/t/rpl_ndb_auto_inc-master.opt
deleted
100644 → 0
View file @
6b45a0b7
--auto-increment-increment=10 --auto-increment-offset=2
mysql-test/t/rpl_ndb_auto_inc.test
View file @
60be6c25
#
# Test of auto_increment in CRBR
#
#####################################
#####################################
# Wrapper for rpl_auto_increment.test#
# By: JBM
# Date: 2006-02-10
# Change: Augmented test to use with cluster
#####################################
#####################################
--
source
include
/
have_innodb
.
inc
--
source
include
/
master
-
slave
.
inc
let
$engine_type
=
NDB
;
let
$engine_type2
=
myisam
;
--
echo
*****************
Test
1
************************
--
source
extra
/
rpl_tests
/
rpl_auto_increment
.
test
--
echo
CREATE
TABLE
t1
(
a
INT
NOT
NULL
auto_increment
,
b
INT
,
PRIMARY
KEY
(
a
))
ENGINE
=
NDB
auto_increment
=
3
;
insert
into
t1
values
(
NULL
,
1
),(
NULL
,
2
),(
NULL
,
3
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
sync_slave_with_master
;
--
echo
*******
Select
from
Slave
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
connection
master
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
auto_increment
,
b
int
,
primary
key
(
a
))
engine
=
NDB
;
insert
into
t1
values
(
1
,
1
),(
NULL
,
2
),(
3
,
3
),(
NULL
,
4
);
delete
from
t1
where
b
=
4
;
insert
into
t1
values
(
NULL
,
5
),(
NULL
,
6
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
sync_slave_with_master
;
--
echo
*******
Select
from
Slave
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
connection
master
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
auto_increment
,
primary
key
(
a
))
engine
=
NDB
;
# Insert with 2 insert statements to get better testing of logging
insert
into
t1
values
(
NULL
),(
5
),(
NULL
);
insert
into
t1
values
(
250
),(
NULL
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
insert
into
t1
values
(
1000
);
set
@@
insert_id
=
400
;
insert
into
t1
values
(
NULL
),(
NULL
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
sync_slave_with_master
;
--
echo
*******
Select
from
Slave
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
connection
master
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
auto_increment
,
primary
key
(
a
))
engine
=
NDB
;
# Insert with 2 insert statements to get better testing of logging
insert
into
t1
values
(
NULL
),(
5
),(
NULL
),(
NULL
);
insert
into
t1
values
(
500
),(
NULL
),(
502
),(
NULL
),(
600
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
set
@@
insert_id
=
600
;
# We expect a duplicate key error that we will ignore below
--
error
1022
insert
into
t1
values
(
600
),(
NULL
),(
NULL
);
set
@@
insert_id
=
600
;
insert
ignore
into
t1
values
(
600
),(
NULL
),(
NULL
),(
610
),(
NULL
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
sync_slave_with_master
;
--
echo
*******
Select
from
Slave
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
connection
master
;
drop
table
t1
;
#
# Test that auto-increment works when slave has rows in the table
#
create
table
t1
(
a
int
not
null
auto_increment
,
primary
key
(
a
))
engine
=
NDB
;
sync_slave_with_master
;
insert
into
t1
values
(
2
),(
12
),(
22
),(
32
),(
42
);
connection
master
;
insert
into
t1
values
(
NULL
),(
NULL
);
insert
into
t1
values
(
3
),(
NULL
),(
NULL
);
--
echo
*******
Select
from
Master
*************
--
echo
select
*
from
t1
ORDER
BY
a
;
sync_slave_with_master
;
--
echo
*******
Select
from
Slave
*************
--
echo
--
echo
**
Slave
should
have
2
,
12
,
22
,
32
,
42
**
--
echo
**
Master
will
have
2
but
not
12
,
22
,
32
,
42
**
--
echo
select
*
from
t1
ORDER
BY
a
;
connection
master
;
drop
table
t1
;
# End cleanup
sync_slave_with_master
;
mysql-test/t/rpl_ndb_blob2.test
0 → 100644
View file @
60be6c25
#################################
# Wrapper for rpl_row_blob.test #
# Using wrapper to share test #
# code between engine tests #
#################################
--
source
include
/
have_ndb
.
inc
let
$engine_type
=
NDBCLUSTER
;
--
source
extra
/
rpl_tests
/
rpl_row_blob
.
test
mysql-test/t/rpl_optimize.test
View file @
60be6c25
...
@@ -3,9 +3,14 @@
...
@@ -3,9 +3,14 @@
# You can replace OPTIMIZE by REPAIR.
# You can replace OPTIMIZE by REPAIR.
#####################################
#####################################
# Change Author: JBM
# Change Author: JBM
# Change Date: 2006-01-17
# Change Date: 2006-02-09
# Change:
# Change: NDB does not and will not support
# OPTIMIZE for memory tables. If and when
# it does support for Disk Data, a new
# version of this test will be need.
# Skipping this test if default engine = ndb
#####################################
#####################################
--
source
include
/
not_ndb_default
.
inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
master
-
slave
.
inc
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
int
,
key
(
b
));
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
int
,
key
(
b
));
...
...
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