mirror of
https://github.com/MariaDB/server.git
synced 2025-02-23 05:43:08 +01:00

Row-injection updates don’t correctly set the historical partition for tables with system versioning and system_time partitions. This results in inconsistencies between the master and slave when replicating transactions that target such tables (i.e. the primary server would correctly distribute archived rows amongst its partitions, whereas the replica would have all archived rows in a single partition). The function partition_info::vers_set_hist_part(THD*) is used to set the partition; however, its initial check for vers_require_hist_part(THD*) returns false, bypassing the rest of the function (which sets up the partition to use). This is because the actual check uses the LEX sql_command (via LEX::vers_history_generating()) to determine if the command is valid to generate history. Row injections don’t have sql_commands though. This patch provides a fix which extends the check in vers_history_generating() to additionally allow row injections to be history generating (via the function LEX::is_stmt_row_injection()). Special thanks to Jan Lindstrom <jan.lindstrom@galeracluster.com> for his work in reproducing the bug, and providing an initial test case. Reviewed By ============ Kristian Nielsen <knielsen@knielsen-hq.org> Aleksey Midenkov <midenok@mariadb.com>
4 lines
55 B
INI
4 lines
55 B
INI
!include ../my.cnf
|
|
|
|
[mysqld]
|
|
default_time_zone="-7:00"
|