Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.7(EOL)
Description
Whilst the --as-of option for mysqldump works correctly for dates, it does not work correctly for hour/minute precision.
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING; |
SET TIMESTAMP=UNIX_TIMESTAMP('1990-01-01 00:00'); |
INSERT t1 (a) VALUES (1),(2),(3); |
SET TIMESTAMP=UNIX_TIMESTAMP('1990-01-01 01:00'); |
DELETE FROM t1 WHERE a=1; |
When dumped with:
./bin/mysqldump -uroot -S./socket.sock --compact --as-of="1990-01-01 00:01" test t1
|
./bin/mysqldump -uroot -S./socket.sock --compact --as-of="1990-01-01 01:01" test t1
|
Will produce identical results - the 1 value will be missing.
Similarly,
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING; |
SET TIMESTAMP=UNIX_TIMESTAMP('1990-01-01 00:00'); |
INSERT t1 (a) VALUES (1),(2),(3); |
SET TIMESTAMP=UNIX_TIMESTAMP('1990-01-02 01:00'); |
DELETE FROM t1 WHERE a=1; |
When dumped with:
./bin/mysqldump -uroot -S./socket.sock --compact --as-of="1990-01-01 00:01" test t1
|
./bin/mysqldump -uroot -S./socket.sock --compact --as-of="1990-01-02 00:01" test t1
|
Will produce different results - the 1 value will be missing in the second dump.
There is no reference to "day" only in the manual though MDEV-16355 has a comment which refers to "to a specified date".
Proposed fix: either the manual needs to be updated to clarify the limitation, or the feature fixed to correctly process timestamp comparison.