1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2019-04-27 20:41:31 +03:00
39 changed files with 547 additions and 78 deletions

View File

@ -2841,8 +2841,7 @@ int handler::ha_rnd_pos(uchar *buf, uchar *pos)
DBUG_ENTER("handler::ha_rnd_pos");
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type != F_UNLCK);
/* TODO: Find out how to solve ha_rnd_pos when finding duplicate update. */
/* DBUG_ASSERT(inited == RND); */
DBUG_ASSERT(inited == RND);
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, MAX_KEY, 0,
{ result= rnd_pos(buf, pos); })
@ -3521,6 +3520,10 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong nr;
int error;
MY_BITMAP *old_read_set;
bool rnd_inited= (inited == RND);
if (rnd_inited && ha_rnd_end())
return;
old_read_set= table->prepare_for_keyread(table->s->next_number_index);
@ -3530,6 +3533,10 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
DBUG_ASSERT(0);
(void) extra(HA_EXTRA_NO_KEYREAD);
*first_value= ULONGLONG_MAX;
if (rnd_inited && ha_rnd_init_with_error(0))
{
//TODO: it would be nice to return here an error
}
return;
}
@ -3576,6 +3583,10 @@ void handler::get_auto_increment(ulonglong offset, ulonglong increment,
ha_index_end();
table->restore_column_maps_after_keyread(old_read_set);
*first_value= nr;
if (rnd_inited && ha_rnd_init_with_error(0))
{
//TODO: it would be nice to return here an error
}
return;
}