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
eea3e3d6
Commit
eea3e3d6
authored
18 years ago
by
mats@romeo.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b17620-mysql-5.1-new-rpl
parents
85548a8d
6ba388d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
0 deletions
+86
-0
mysql-test/r/rpl_row_basic_11bugs.result
mysql-test/r/rpl_row_basic_11bugs.result
+40
-0
mysql-test/t/rpl_row_basic_11bugs.test
mysql-test/t/rpl_row_basic_11bugs.test
+40
-0
sql/log_event.cc
sql/log_event.cc
+6
-0
No files found.
mysql-test/r/rpl_row_basic_11bugs.result
View file @
eea3e3d6
...
@@ -60,3 +60,43 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
...
@@ -60,3 +60,43 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
master-bin.000001 227 Write_rows 1 266 table_id: # flags: STMT_END_F
master-bin.000001 227 Write_rows 1 266 table_id: # flags: STMT_END_F
DROP TABLE t1;
================ Test for BUG#17620 ================
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;
**** On Slave ****
SET GLOBAL QUERY_CACHE_SIZE=0;
**** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
**** On Slave ****
SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024;
**** On Master ****
INSERT INTO t1 VALUES (4),(5),(6);
**** On Slave ****
SELECT * FROM t1;
a
1
2
3
4
5
6
**** On Master ****
INSERT INTO t1 VALUES (7),(8),(9);
**** On Slave ****
SELECT * FROM t1;
a
1
2
3
4
5
6
7
8
9
DROP TABLE t1;
This diff is collapsed.
Click to expand it.
mysql-test/t/rpl_row_basic_11bugs.test
View file @
eea3e3d6
...
@@ -54,3 +54,43 @@ UPDATE t1 SET a=99 WHERE a = 0;
...
@@ -54,3 +54,43 @@ UPDATE t1 SET a=99 WHERE a = 0;
--
replace_result
$SERVER_VERSION
SERVER_VERSION
--
replace_result
$SERVER_VERSION
SERVER_VERSION
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/
SHOW
BINLOG
EVENTS
;
SHOW
BINLOG
EVENTS
;
DROP
TABLE
t1
;
# BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on
# slave
--
echo
================
Test
for
BUG
#17620 ================
--
disable_query_log
--
source
include
/
master
-
slave
-
reset
.
inc
--
enable_query_log
--
echo
****
On
Slave
****
connection
slave
;
SET
GLOBAL
QUERY_CACHE_SIZE
=
0
;
--
echo
****
On
Master
****
connection
master
;
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),(
2
),(
3
);
--
echo
****
On
Slave
****
sync_slave_with_master
;
SET
GLOBAL
QUERY_CACHE_SIZE
=
16
*
1024
*
1024
;
--
echo
****
On
Master
****
connection
master
;
INSERT
INTO
t1
VALUES
(
4
),(
5
),(
6
);
--
echo
****
On
Slave
****
sync_slave_with_master
;
SELECT
*
FROM
t1
;
--
echo
****
On
Master
****
connection
master
;
INSERT
INTO
t1
VALUES
(
7
),(
8
),(
9
);
--
echo
****
On
Slave
****
sync_slave_with_master
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
This diff is collapsed.
Click to expand it.
sql/log_event.cc
View file @
eea3e3d6
...
@@ -5502,6 +5502,9 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
...
@@ -5502,6 +5502,9 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
/*
/*
When the open and locking succeeded, we add all the tables to
When the open and locking succeeded, we add all the tables to
the table map and remove them from tables to lock.
the table map and remove them from tables to lock.
We also invalidate the query cache for all the tables, since
they will now be changed.
*/
*/
TABLE_LIST
*
ptr
;
TABLE_LIST
*
ptr
;
...
@@ -5510,6 +5513,9 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
...
@@ -5510,6 +5513,9 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
rli
->
m_table_map
.
set_table
(
ptr
->
table_id
,
ptr
->
table
);
rli
->
m_table_map
.
set_table
(
ptr
->
table_id
,
ptr
->
table
);
rli
->
touching_table
(
ptr
->
db
,
ptr
->
table_name
,
ptr
->
table_id
);
rli
->
touching_table
(
ptr
->
db
,
ptr
->
table_name
,
ptr
->
table_id
);
}
}
#ifdef HAVE_QUERY_CACHE
query_cache
.
invalidate_locked_for_write
(
rli
->
tables_to_lock
);
#endif
rli
->
clear_tables_to_lock
();
rli
->
clear_tables_to_lock
();
}
}
...
...
This diff is collapsed.
Click to expand it.
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