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
47ec22d8
Commit
47ec22d8
authored
Mar 12, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for replication of INSERT | REPLACE | CREATE ... SELECT
parent
061e673c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
sql/sql_parse.cc
sql/sql_parse.cc
+3
-0
sql/sql_select.cc
sql/sql_select.cc
+5
-8
No files found.
sql/sql_parse.cc
View file @
47ec22d8
...
@@ -1595,6 +1595,7 @@ mysql_execute_command(void)
...
@@ -1595,6 +1595,7 @@ mysql_execute_command(void)
for
(
table
=
tables
->
next
;
table
;
table
=
table
->
next
)
for
(
table
=
tables
->
next
;
table
;
table
=
table
->
next
)
table
->
lock_type
=
lex
->
lock_option
;
table
->
lock_type
=
lex
->
lock_option
;
}
}
select_lex
->
options
|=
SELECT_NO_UNLOCK
;
thd
->
offset_limit
=
select_lex
->
offset_limit
;
thd
->
offset_limit
=
select_lex
->
offset_limit
;
thd
->
select_limit
=
select_lex
->
select_limit
+
select_lex
->
offset_limit
;
thd
->
select_limit
=
select_lex
->
select_limit
+
select_lex
->
offset_limit
;
if
(
thd
->
select_limit
<
select_lex
->
select_limit
)
if
(
thd
->
select_limit
<
select_lex
->
select_limit
)
...
@@ -1922,6 +1923,8 @@ mysql_execute_command(void)
...
@@ -1922,6 +1923,8 @@ mysql_execute_command(void)
if
((
res
=
check_table_access
(
thd
,
SELECT_ACL
,
save_next
)))
if
((
res
=
check_table_access
(
thd
,
SELECT_ACL
,
save_next
)))
goto
error
;
goto
error
;
}
}
/* Don't unlock tables until command is written to binary log */
select_lex
->
options
|=
SELECT_NO_UNLOCK
;
select_result
*
result
;
select_result
*
result
;
thd
->
offset_limit
=
select_lex
->
offset_limit
;
thd
->
offset_limit
=
select_lex
->
offset_limit
;
...
...
sql/sql_select.cc
View file @
47ec22d8
...
@@ -4469,16 +4469,13 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
...
@@ -4469,16 +4469,13 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error
=
0
;
error
=
0
;
if
(
!
table
)
// If sending data to client
if
(
!
table
)
// If sending data to client
{
{
//note that the call below may trigger binlog writing for some commands...
if
(
join
->
result
->
send_eof
())
error
=
1
;
// Don't send error
/*
/*
...which must be done before unlocking the read tables (otherwise
The following will unlock all cursors if the command wasn't an
another thread may, quickly between unlock and binlog-write,
update command
update the read table and write to the binlog, which will
result in badly ordered binlog events (and replication breaks).
*/
*/
join_free
(
join
);
// Unlock all cursors
join_free
(
join
);
if
(
join
->
result
->
send_eof
())
error
=
1
;
// Don't send error
}
}
DBUG_PRINT
(
"info"
,(
"%ld records output"
,
join
->
send_records
));
DBUG_PRINT
(
"info"
,(
"%ld records output"
,
join
->
send_records
));
}
}
...
...
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