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
1b8165b0
Commit
1b8165b0
authored
Jul 04, 2007
by
tsmith@sita.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into sita.local:/Users/tsmith/m/bk/maint/51
parents
14aa601d
3bcf0039
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
mysql-test/suite/rpl/r/rpl_misc_functions.result
mysql-test/suite/rpl/r/rpl_misc_functions.result
+9
-8
mysql-test/suite/rpl/t/rpl_misc_functions.test
mysql-test/suite/rpl/t/rpl_misc_functions.test
+11
-10
No files found.
mysql-test/suite/rpl/r/rpl_misc_functions.result
View file @
1b8165b0
...
@@ -20,11 +20,12 @@ select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t
...
@@ -20,11 +20,12 @@ select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t
id i r1 r2 p id i r1 r2 p
id i r1 r2 p id i r1 r2 p
drop table t1;
drop table t1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (col_a double default NULL);
CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
col_a DOUBLE DEFAULT NULL);
CREATE PROCEDURE test_replication_sp1()
CREATE PROCEDURE test_replication_sp1()
BEGIN
BEGIN
INSERT INTO t1 VALUES (rand()), (rand());
INSERT INTO t1
(col_a)
VALUES (rand()), (rand());
INSERT INTO t1 VALUES (rand());
INSERT INTO t1
(col_a)
VALUES (rand());
END|
END|
CREATE PROCEDURE test_replication_sp2()
CREATE PROCEDURE test_replication_sp2()
BEGIN
BEGIN
...
@@ -37,14 +38,14 @@ RETURN (rand() + rand());
...
@@ -37,14 +38,14 @@ RETURN (rand() + rand());
END|
END|
CALL test_replication_sp1();
CALL test_replication_sp1();
CALL test_replication_sp2();
CALL test_replication_sp2();
INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1
(col_a)
VALUES (test_replication_sf());
INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1
(col_a)
VALUES (test_replication_sf());
INSERT INTO t1 VALUES (test_replication_sf());
INSERT INTO t1
(col_a)
VALUES (test_replication_sf());
select * from t1 into outfile "../tmp/t1_slave.txt";
select * from t1 into outfile "../tmp/t1_slave.txt";
create temporary table t1_slave select * from t1 where 1=0;
create temporary table t1_slave select * from t1 where 1=0;
load data infile '../tmp/t1_slave.txt' into table t1_slave;
load data infile '../tmp/t1_slave.txt' into table t1_slave;
select count(*) into @aux from t1
, t1_slave
select count(*) into @aux from t1
join t1_slave using (id)
where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ;
where ABS(t1.col_a - t1_slave.col_a) < 0.000
000
1 ;
SELECT @aux;
SELECT @aux;
@aux
@aux
12
12
...
...
mysql-test/suite/rpl/t/rpl_misc_functions.test
View file @
1b8165b0
...
@@ -43,15 +43,16 @@ drop table t1;
...
@@ -43,15 +43,16 @@ drop table t1;
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
--
enable_warnings
CREATE
TABLE
t1
(
col_a
double
default
NULL
);
CREATE
TABLE
t1
(
id
INT
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
,
col_a
DOUBLE
DEFAULT
NULL
);
DELIMITER
|
;
DELIMITER
|
;
# Use a SP that calls rand() multiple times
# Use a SP that calls rand() multiple times
CREATE
PROCEDURE
test_replication_sp1
()
CREATE
PROCEDURE
test_replication_sp1
()
BEGIN
BEGIN
INSERT
INTO
t1
VALUES
(
rand
()),
(
rand
());
INSERT
INTO
t1
(
col_a
)
VALUES
(
rand
()),
(
rand
());
INSERT
INTO
t1
VALUES
(
rand
());
INSERT
INTO
t1
(
col_a
)
VALUES
(
rand
());
END
|
END
|
# Use a SP that calls another SP to call rand() multiple times
# Use a SP that calls another SP to call rand() multiple times
...
@@ -73,9 +74,9 @@ DELIMITER ;|
...
@@ -73,9 +74,9 @@ DELIMITER ;|
# the master to those on the slave.
# the master to those on the slave.
CALL
test_replication_sp1
();
CALL
test_replication_sp1
();
CALL
test_replication_sp2
();
CALL
test_replication_sp2
();
INSERT
INTO
t1
VALUES
(
test_replication_sf
());
INSERT
INTO
t1
(
col_a
)
VALUES
(
test_replication_sf
());
INSERT
INTO
t1
VALUES
(
test_replication_sf
());
INSERT
INTO
t1
(
col_a
)
VALUES
(
test_replication_sf
());
INSERT
INTO
t1
VALUES
(
test_replication_sf
());
INSERT
INTO
t1
(
col_a
)
VALUES
(
test_replication_sf
());
--
sync_slave_with_master
--
sync_slave_with_master
...
@@ -90,14 +91,14 @@ load data infile '../tmp/t1_slave.txt' into table t1_slave;
...
@@ -90,14 +91,14 @@ load data infile '../tmp/t1_slave.txt' into table t1_slave;
# Compare master and slave temp table, use subtraction
# Compare master and slave temp table, use subtraction
# for floating point comparison of "double"
# for floating point comparison of "double"
select
count
(
*
)
into
@
aux
from
t1
,
t1_slave
select
count
(
*
)
into
@
aux
from
t1
join
t1_slave
using
(
id
)
where
ABS
(
t1
.
col_a
-
t1_slave
.
col_a
)
<
0.0001
;
where
ABS
(
t1
.
col_a
-
t1_slave
.
col_a
)
<
0.000
000
1
;
SELECT
@
aux
;
SELECT
@
aux
;
if
(
`SELECT @aux <> 12 OR @aux IS NULL`
)
if
(
`SELECT @aux <> 12 OR @aux IS NULL`
)
{
{
--
echo
# ERROR: We expected to get count(*) = 12.
--
echo
# ERROR: We expected to get count(*) = 12.
SELECT
col_a
FROM
t1
;
SELECT
id
,
col_a
FROM
t1
;
SELECT
col_a
FROM
t1_slave
;
SELECT
id
,
col_a
FROM
t1_slave
;
--
echo
# abort
--
echo
# abort
exit
;
exit
;
}
}
...
...
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