Commit d0f1b5f3 authored by mats@mysql.com's avatar mats@mysql.com

Merge mysql.com:/home/bkroot/mysql-4.0

into mysql.com:/home/bk/b7879-mysql-4.0
parents 4decbce5 625f7f0d
...@@ -473,7 +473,10 @@ int mysql_multi_update_lock(THD *thd, ...@@ -473,7 +473,10 @@ int mysql_multi_update_lock(THD *thd,
else else
{ {
DBUG_PRINT("info",("setting table `%s` for read-only", tl->alias)); DBUG_PRINT("info",("setting table `%s` for read-only", tl->alias));
tl->lock_type= TL_READ; // If we are using the binary log, we need TL_READ_NO_INSERT to get
// correct order of statements. Otherwise, we use a TL_READ lock to
// improve performance.
tl->lock_type= using_update_log ? TL_READ_NO_INSERT : TL_READ;
tl->updating= 0; tl->updating= 0;
wants= SELECT_ACL; wants= SELECT_ACL;
} }
......
...@@ -822,7 +822,7 @@ create_select: ...@@ -822,7 +822,7 @@ create_select:
SELECT_SYM SELECT_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ; lex->lock_option= using_update_log ? TL_READ_NO_INSERT : TL_READ;
if (lex->sql_command == SQLCOM_INSERT) if (lex->sql_command == SQLCOM_INSERT)
lex->sql_command= SQLCOM_INSERT_SELECT; lex->sql_command= SQLCOM_INSERT_SELECT;
else if (lex->sql_command == SQLCOM_REPLACE) else if (lex->sql_command == SQLCOM_REPLACE)
...@@ -1532,7 +1532,7 @@ select_part2: ...@@ -1532,7 +1532,7 @@ select_part2:
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->lock_option=TL_READ; lex->lock_option=TL_READ;
mysql_init_select(lex); mysql_init_select(lex);
} }
select_options select_item_list select_into select_lock_type; select_options select_item_list select_into select_lock_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment