Commit f2b5f1fd authored by Sergei Golubchik's avatar Sergei Golubchik

tokudb: auto-increment not on the first keypart

parent 36a22c14
......@@ -3341,7 +3341,8 @@ void ha_tokudb::start_bulk_insert(ha_rows rows) {
if (share->try_table_lock) {
if (get_prelock_empty(thd) && may_table_be_empty(transaction)) {
if (using_ignore || is_insert_ignore(thd) || thd->lex->duplicates != DUP_ERROR) {
if (using_ignore || is_insert_ignore(thd) || thd->lex->duplicates != DUP_ERROR
|| table->s->next_number_key_offset) {
acquire_table_lock(transaction, lock_write);
}
else {
......@@ -7589,6 +7590,12 @@ void ha_tokudb::get_auto_increment(ulonglong offset, ulonglong increment, ulongl
ulonglong nr;
bool over;
if (table->s->next_number_key_offset)
{
handler::get_auto_increment(offset, increment, nb_desired_values, first_value, nb_reserved_values);
DBUG_VOID_RETURN;
}
pthread_mutex_lock(&share->mutex);
if (share->auto_inc_create_value > share->last_auto_increment) {
......
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