mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-16 16:23:30 +00:00
PT-2378 - extended FP precision in pt-table-sync
pt-table-sync now uses up to 17 decimal digits when writing floating point numbers in the generated SQL statements. This is necessary to prevent unintended data changes.
This commit is contained in:
15
t/pt-table-sync/samples/pt-2378.sql
Normal file
15
t/pt-table-sync/samples/pt-2378.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
DROP DATABASE IF EXISTS test;
|
||||
CREATE DATABASE test;
|
||||
USE test;
|
||||
|
||||
CREATE TABLE `test_table` (
|
||||
`id` BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
`value1` DOUBLE NOT NULL,
|
||||
`value2` DOUBLE NOT NULL,
|
||||
`some_string` VARCHAR(32) NOT NULL
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO `test_table`
|
||||
(`value1`, `value2`, `some_string`)
|
||||
VALUES
|
||||
(315.2599999999994, 2.6919444444444447, 'a');
|
Reference in New Issue
Block a user