mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -3122,6 +3122,10 @@ private:
|
||||
*/
|
||||
Handler_share **ha_share;
|
||||
|
||||
/** Stores next_insert_id for handling duplicate key errors. */
|
||||
ulonglong m_prev_insert_id;
|
||||
|
||||
|
||||
public:
|
||||
handler(handlerton *ht_arg, TABLE_SHARE *share_arg)
|
||||
:table_share(share_arg), table(0),
|
||||
@ -3146,7 +3150,7 @@ public:
|
||||
auto_inc_intervals_count(0),
|
||||
m_psi(NULL), set_top_table_fields(FALSE), top_table(0),
|
||||
top_table_field(0), top_table_fields(0),
|
||||
m_lock_type(F_UNLCK), ha_share(NULL)
|
||||
m_lock_type(F_UNLCK), ha_share(NULL), m_prev_insert_id(0)
|
||||
{
|
||||
DBUG_PRINT("info",
|
||||
("handler created F_UNLCK %d F_RDLCK %d F_WRLCK %d",
|
||||
@ -3809,7 +3813,7 @@ public:
|
||||
DBUG_PRINT("info",("auto_increment: next value %lu", (ulong)id));
|
||||
next_insert_id= id;
|
||||
}
|
||||
void restore_auto_increment(ulonglong prev_insert_id)
|
||||
virtual void restore_auto_increment(ulonglong prev_insert_id)
|
||||
{
|
||||
/*
|
||||
Insertion of a row failed, re-use the lastly generated auto_increment
|
||||
@ -3825,6 +3829,16 @@ public:
|
||||
insert_id_for_cur_row;
|
||||
}
|
||||
|
||||
/** Store and restore next_insert_id over duplicate key errors. */
|
||||
virtual void store_auto_increment()
|
||||
{
|
||||
m_prev_insert_id= next_insert_id;
|
||||
}
|
||||
virtual void restore_auto_increment()
|
||||
{
|
||||
restore_auto_increment(m_prev_insert_id);
|
||||
}
|
||||
|
||||
virtual void update_create_info(HA_CREATE_INFO *create_info) {}
|
||||
int check_old_types();
|
||||
virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT* check_opt)
|
||||
|
Reference in New Issue
Block a user