PT-2375 - fixed pt-table-sync for tables with generated columns

Previously, pt-table-sync generated DML statements that included
the generated columns of a table, which is however rejected by
the database and not necessary for the required sync statements.
This commit is contained in:
Henning Poettker
2024-11-14 23:51:40 +01:00
parent b6dff19d97
commit 5f14441d19
5 changed files with 181 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE `test_table` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`value` INT NOT NULL,
`derived_value` INT AS (2*`value`)
) ENGINE=InnoDB;
INSERT INTO `test_table` (`value`) VALUES (24);
INSERT INTO `test_table` (`value`) VALUES (42);