mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
[t:3406], fix issue on main line
git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@30362 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
f055b22339
commit
2af613ff76
1 changed files with 4 additions and 2 deletions
|
@ -3639,6 +3639,8 @@ void ha_tokudb::set_main_dict_put_flags(
|
|||
)
|
||||
{
|
||||
u_int32_t old_prelock_flags = (*put_flags)&(DB_PRELOCKED_FILE_READ);
|
||||
uint curr_num_DBs = table->s->keys + test(hidden_primary_key);
|
||||
bool in_hot_index = share->num_DBs > curr_num_DBs;
|
||||
//
|
||||
// optimization for "REPLACE INTO..." (and "INSERT IGNORE") command
|
||||
// if the command is "REPLACE INTO" and the only table
|
||||
|
@ -3661,13 +3663,13 @@ void ha_tokudb::set_main_dict_put_flags(
|
|||
*put_flags = DB_YESOVERWRITE|old_prelock_flags;
|
||||
}
|
||||
else if (do_ignore_flag_optimization(thd,table,share->replace_into_fast) &&
|
||||
is_replace_into(thd)
|
||||
is_replace_into(thd) && !in_hot_index
|
||||
)
|
||||
{
|
||||
*put_flags = DB_YESOVERWRITE|old_prelock_flags;
|
||||
}
|
||||
else if (do_ignore_flag_optimization(thd,table,share->replace_into_fast) &&
|
||||
is_insert_ignore(thd) && no_overwrite_no_error_allowed
|
||||
is_insert_ignore(thd) && no_overwrite_no_error_allowed && !in_hot_index
|
||||
)
|
||||
{
|
||||
*put_flags = DB_NOOVERWRITE_NO_ERROR|old_prelock_flags;
|
||||
|
|
Loading…
Add table
Reference in a new issue