summaryrefslogtreecommitdiff
path: root/include/mysql/service_wsrep.h
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-03-03 16:40:16 +0100
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-03-04 15:41:57 +0100
commit151ed4bce4f39f21bf7c36afff74e6ddecc071b4 (patch)
treeb28b5cdfb809b23cb39d71e679d9689287586820 /include/mysql/service_wsrep.h
parent80ac9ec1cc10d56b048272642653d5d301394779 (diff)
downloadmariadb-git-bb-10.6-MDEV-24853.tar.gz
MDEV-24853: Duplicate key generated during cluster configuration changebb-10.6-MDEV-24853
Incorrect processing of an auto-incrementing field in the WSREP-related code during applying transactions results in a duplicate key being created. This is due to the fact that at the beginning of the write_row() and update_row() functions, the values of the auto-increment parameters are used, which are read from the parameters of the current thread, but further along the code other values are used, which are read from global variables (when applying a transaction). This can happen when the cluster configuration has changed while applying a transaction (for example in the high_priority_service mode for Galera 4). Further during IST processing duplicating key is detected, and processing of the DB_DUPLICATE_KEY return code (inside innodb, in the write_row() handler) results in a call to the wsrep_thd_self_abort() function.
Diffstat (limited to 'include/mysql/service_wsrep.h')
-rw-r--r--include/mysql/service_wsrep.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h
index e12529bc7a4..0831326a36e 100644
--- a/include/mysql/service_wsrep.h
+++ b/include/mysql/service_wsrep.h
@@ -62,7 +62,6 @@ extern struct wsrep_service_st {
int (*wsrep_thd_retry_counter_func)(const MYSQL_THD thd);
bool (*wsrep_thd_ignore_table_func)(MYSQL_THD thd);
long long (*wsrep_thd_trx_seqno_func)(const MYSQL_THD thd);
- void (*wsrep_thd_auto_increment_variables_func)(THD *thd, unsigned long long *offset, unsigned long long *increment);
my_bool (*wsrep_thd_is_aborting_func)(const MYSQL_THD thd);
void (*wsrep_set_data_home_dir_func)(const char *data_dir);
my_bool (*wsrep_thd_is_BF_func)(const MYSQL_THD thd, my_bool sync);
@@ -115,7 +114,6 @@ extern struct wsrep_service_st {
#define wsrep_thd_retry_counter(T) wsrep_service->wsrep_thd_retry_counter_func(T)
#define wsrep_thd_ignore_table(T) wsrep_service->wsrep_thd_ignore_table_func(T)
#define wsrep_thd_trx_seqno(T) wsrep_service->wsrep_thd_trx_seqno_func(T)
-#define wsrep_thd_auto_increment_variables(T,O,I) wsrep_service->wsrep_thd_auto_increment_variables_func(T,O,I)
#define wsrep_set_data_home_dir(A) wsrep_service->wsrep_set_data_home_dir_func(A)
#define wsrep_thd_is_BF(T,S) wsrep_service->wsrep_thd_is_BF_func(T,S)
#define wsrep_thd_is_aborting(T) wsrep_service->wsrep_thd_is_aborting_func(T)
@@ -158,7 +156,6 @@ extern "C" long long wsrep_xid_seqno(const struct xid_t* xid);
const unsigned char* wsrep_xid_uuid(const struct xid_t* xid);
extern "C" long long wsrep_thd_trx_seqno(const MYSQL_THD thd);
my_bool get_wsrep_recovery();
-void wsrep_thd_auto_increment_variables(THD *thd, unsigned long long *offset, unsigned long long *increment);
bool wsrep_thd_ignore_table(MYSQL_THD thd);
void wsrep_set_data_home_dir(const char *data_dir);