Files
percona-toolkit/t/pt-table-sync/samples/pt-2375.sql
Henning Poettker 5f14441d19 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.
2024-11-14 23:51:40 +01:00

13 lines
305 B
SQL

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);