Is mariaDB INSERT … ON DUPLICATE KEY UPDATE
safe to use with Galera replication?
I have found that it is not safe with Row based replications + master master Why mysql INSERT ... ON DUPLICATE KEY UPDATE can break RBR replication on a master / master configuration
But I cannot find how this relates to Galera replication.
Can Galera cluster be configured, so this operation will always work, or can I use somethig else than INSERT … ON DUPLICATE KEY UPDATE
?
My use case is as given below:
INSERT into logData (logKey, month_of_year)
values(:logKey,:month_of_year) ON DUPLICATE KEY UPDATE
counter=counter+1
my logData table is created as follows:
CREATE TABLE `logData ` (
`logKey` VARCHAR(20) NOT NULL,
`month_of_year` DATE NOT NULL,
`counter` INT(11) NOT NULL DEFAULT '1',
`latest_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`logKey`, `month_of_year`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;