diff options
author | svoj@april.(none) <> | 2007-08-02 19:08:39 +0500 |
---|---|---|
committer | svoj@april.(none) <> | 2007-08-02 19:08:39 +0500 |
commit | 0f9cae4843ba21ad40cf65af1e3c66bde483283c (patch) | |
tree | 660e5eecb7f66d01c55dd998a98a446258563025 /sql | |
parent | 92d10ed41ba9c99fb5a673270ac898513889b6d6 (diff) | |
parent | 2c539642c0fa0d1fbe438229c445bcb9ee9417a9 (diff) | |
download | mariadb-git-0f9cae4843ba21ad40cf65af1e3c66bde483283c.tar.gz |
Merge mysql.com:/home/svoj/devel/mysql/BUG29152/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/BUG29152/mysql-5.1-engines
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_insert.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b747c706f75..be97ec909f7 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -426,7 +426,6 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, client connection and the delayed thread. */ if (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE) || - thd->slave_thread || thd->variables.max_insert_delayed_threads == 0 || thd->prelocked_mode || thd->lex->uses_stored_routines()) @@ -434,6 +433,14 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, *lock_type= TL_WRITE; return; } + if (thd->slave_thread) + { + /* Try concurrent insert */ + *lock_type= (duplic == DUP_UPDATE || duplic == DUP_REPLACE) ? + TL_WRITE : TL_WRITE_CONCURRENT_INSERT; + return; + } + bool log_on= (thd->options & OPTION_BIN_LOG || ! (thd->security_ctx->master_access & SUPER_ACL)); if (global_system_variables.binlog_format == BINLOG_FORMAT_STMT && |