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
ebec4035
Commit
ebec4035
authored
Jul 27, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B30036-5.1-opt
parents
c7150fd8
30408a12
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
6 deletions
+37
-6
mysql-test/extra/rpl_tests/rpl_insert_delayed.test
mysql-test/extra/rpl_tests/rpl_insert_delayed.test
+30
-0
sql/sql_insert.cc
sql/sql_insert.cc
+6
-3
sql/sql_select.cc
sql/sql_select.cc
+0
-1
sql/table.cc
sql/table.cc
+1
-2
No files found.
mysql-test/extra/rpl_tests/rpl_insert_delayed.test
View file @
ebec4035
...
...
@@ -84,3 +84,33 @@ USE test;
DROP
SCHEMA
mysqlslap
;
sync_slave_with_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
);
flush
table
t1
;
# to wait for INSERT DELAYED to be done
#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 @
ebec4035
...
...
@@ -549,6 +549,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
int
error
,
res
;
bool
transactional_table
,
joins_freed
=
FALSE
;
bool
changed
;
bool
was_insert_delayed
=
(
table_list
->
lock_type
==
TL_WRITE_DELAYED
);
uint
value_count
;
ulong
counter
=
1
;
ulonglong
id
;
...
...
@@ -832,13 +833,15 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
}
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.
For the transactional algorithm to work the invalidation must be
before binlog writing and ha_autocommit_or_rollback
*/
if
(
changed
)
query_cache_invalidate3
(
thd
,
table_list
,
1
);
if
(
error
<=
0
||
!
transactional_table
)
{
...
...
@@ -880,7 +883,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
error
=
1
;
}
}
if
(
!
transactional_table
)
if
(
!
transactional_table
&&
changed
)
thd
->
no_trans_update
.
all
=
TRUE
;
}
}
...
...
sql/sql_select.cc
View file @
ebec4035
...
...
@@ -12313,7 +12313,6 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
*/
if
(
!
on_primary_key
&&
(
table
->
file
->
ha_table_flags
()
&
HA_PRIMARY_KEY_IN_READ_INDEX
)
&&
ha_legacy_type
(
table
->
s
->
db_type
())
==
DB_TYPE_INNODB
&&
table
->
s
->
primary_key
!=
MAX_KEY
)
{
on_primary_key
=
TRUE
;
...
...
sql/table.cc
View file @
ebec4035
...
...
@@ -1351,8 +1351,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
if
(
ha_option
&
HA_PRIMARY_KEY_IN_READ_INDEX
)
{
field
->
part_of_key
=
share
->
keys_in_use
;
if
(
ha_legacy_type
(
share
->
db_type
())
==
DB_TYPE_INNODB
&&
field
->
part_of_sortkey
.
is_set
(
key
))
if
(
field
->
part_of_sortkey
.
is_set
(
key
))
field
->
part_of_sortkey
=
share
->
keys_in_use
;
}
}
...
...
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