diff options
author | df@pippilotta.erinye.com <> | 2007-08-03 16:53:06 +0200 |
---|---|---|
committer | df@pippilotta.erinye.com <> | 2007-08-03 16:53:06 +0200 |
commit | 3d986fde8d352e83a6dac2292e52d1d71ee5e2b5 (patch) | |
tree | 92ff6dd89d85bf85cad369b56193d636a38fe9b7 /sql/sql_insert.cc | |
parent | 5ad3f6083e11e34fc3631bdf8803eb9679416b8c (diff) | |
parent | 5ec766dbe7c64551c26e2e855dc8e6d497fae8e1 (diff) | |
download | mariadb-git-3d986fde8d352e83a6dac2292e52d1d71ee5e2b5.tar.gz |
Merge bk-internal:/home/bk/mysql-5.1-engines
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-marvel-engines
Diffstat (limited to 'sql/sql_insert.cc')
-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 6c6a4721369..18b5ba666a4 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 && |