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
9bc5e926
Commit
9bc5e926
authored
Jul 26, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B29571-5.0-opt
parents
bb22e366
02fe5e27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
3 deletions
+55
-3
mysql-test/r/rpl_insert_delayed.result
mysql-test/r/rpl_insert_delayed.result
+20
-0
mysql-test/t/rpl_insert_delayed.test
mysql-test/t/rpl_insert_delayed.test
+29
-0
sql/sql_insert.cc
sql/sql_insert.cc
+6
-3
No files found.
mysql-test/r/rpl_insert_delayed.result
View file @
9bc5e926
...
@@ -29,3 +29,23 @@ id name
...
@@ -29,3 +29,23 @@ id name
10 my name
10 my name
20 is Bond
20 is Bond
drop table t1;
drop table t1;
CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
show binlog events limit 11,100;
Log_name Pos Event_type Server_id End_log_pos Info
x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
On slave
show binlog events limit 12,100;
Log_name Pos Event_type Server_id End_log_pos Info
x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
drop table t1;
End of 5.0 tests
mysql-test/t/rpl_insert_delayed.test
View file @
9bc5e926
...
@@ -65,3 +65,32 @@ connection master;
...
@@ -65,3 +65,32 @@ connection master;
drop
table
t1
;
drop
table
t1
;
sync_slave_with_master
;
sync_slave_with_master
;
connection
master
;
connection
master
;
#
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
# on the slave
#
CREATE
TABLE
t1
(
a
int
,
UNIQUE
(
a
));
INSERT
DELAYED
IGNORE
INTO
t1
VALUES
(
1
);
INSERT
DELAYED
IGNORE
INTO
t1
VALUES
(
1
);
#must show two INSERT DELAYED
--
replace_column
1
x
2
x
3
x
4
x
5
x
show
binlog
events
limit
11
,
100
;
select
*
from
t1
;
sync_slave_with_master
;
echo
On
slave
;
#must show two INSERT DELAYED
--
replace_column
1
x
2
x
3
x
4
x
5
x
show
binlog
events
limit
12
,
100
;
select
*
from
t1
;
# clean up
connection
master
;
drop
table
t1
;
sync_slave_with_master
;
connection
master
;
--
echo
End
of
5.0
tests
sql/sql_insert.cc
View file @
9bc5e926
...
@@ -560,6 +560,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
...
@@ -560,6 +560,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
int
error
,
res
;
int
error
,
res
;
bool
transactional_table
,
joins_freed
=
FALSE
;
bool
transactional_table
,
joins_freed
=
FALSE
;
bool
changed
;
bool
changed
;
bool
was_insert_delayed
=
(
table_list
->
lock_type
==
TL_WRITE_DELAYED
);
uint
value_count
;
uint
value_count
;
ulong
counter
=
1
;
ulong
counter
=
1
;
ulonglong
id
;
ulonglong
id
;
...
@@ -859,14 +860,16 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
...
@@ -859,14 +860,16 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
transactional_table
=
table
->
file
->
has_transactions
();
transactional_table
=
table
->
file
->
has_transactions
();
if
((
changed
=
(
info
.
copied
||
info
.
deleted
||
info
.
updated
)))
if
((
changed
=
(
info
.
copied
||
info
.
deleted
||
info
.
updated
))
||
was_insert_delayed
)
{
{
/*
/*
Invalidate the table in the query cache if something changed.
Invalidate the table in the query cache if something changed.
For the transactional algorithm to work the invalidation must be
For the transactional algorithm to work the invalidation must be
before binlog writing and ha_autocommit_or_rollback
before binlog writing and ha_autocommit_or_rollback
*/
*/
query_cache_invalidate3
(
thd
,
table_list
,
1
);
if
(
changed
)
query_cache_invalidate3
(
thd
,
table_list
,
1
);
if
(
error
<=
0
||
!
transactional_table
)
if
(
error
<=
0
||
!
transactional_table
)
{
{
if
(
mysql_bin_log
.
is_open
())
if
(
mysql_bin_log
.
is_open
())
...
@@ -904,7 +907,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
...
@@ -904,7 +907,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
transactional_table
)
if
(
mysql_bin_log
.
write
(
&
qinfo
)
&&
transactional_table
)
error
=
1
;
error
=
1
;
}
}
if
(
!
transactional_table
)
if
(
!
transactional_table
&&
changed
)
thd
->
no_trans_update
.
all
=
TRUE
;
thd
->
no_trans_update
.
all
=
TRUE
;
}
}
}
}
...
...
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