1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge mysql.com:/home/svoj/devel/mysql/BUG29152/mysql-5.0-engines

into  mysql.com:/home/svoj/devel/mysql/BUG29152/mysql-5.1-engines


sql/sql_insert.cc:
  Auto merged
This commit is contained in:
unknown
2007-08-02 19:08:39 +05:00

View File

@@ -426,7 +426,6 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type,
client connection and the delayed thread. client connection and the delayed thread.
*/ */
if (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE) || if (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE) ||
thd->slave_thread ||
thd->variables.max_insert_delayed_threads == 0 || thd->variables.max_insert_delayed_threads == 0 ||
thd->prelocked_mode || thd->prelocked_mode ||
thd->lex->uses_stored_routines()) thd->lex->uses_stored_routines())
@@ -434,6 +433,14 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type,
*lock_type= TL_WRITE; *lock_type= TL_WRITE;
return; 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 || bool log_on= (thd->options & OPTION_BIN_LOG ||
! (thd->security_ctx->master_access & SUPER_ACL)); ! (thd->security_ctx->master_access & SUPER_ACL));
if (global_system_variables.binlog_format == BINLOG_FORMAT_STMT && if (global_system_variables.binlog_format == BINLOG_FORMAT_STMT &&