Skip to content

Dates are replicated incorrectly #50

@Stanpol

Description

@Stanpol

I fully replicate a table with a date column:

mysql> SELECT DISTINCT r.test_date FROM test AS r LIMIT 10;
+------------+
| test_date  |
+------------+
| 2015-05-21 |
| 2015-05-24 |
| 2015-05-25 |
| 2015-05-27 |
| 2015-05-28 |
| 2015-05-31 |
| 2015-06-01 |
| 2015-06-02 |
| 2015-06-04 |
| 2015-06-07 |
+------------+

Same table in clickhouse after replication:

:) select distinct r.test_date from temp as r limit 10

SELECT DISTINCT r.test_date
FROM temp AS r
LIMIT 10

Query id: 001562f9-fcc7-42ec-8404-0dc0cca3a80c

   ┌──test_date─┐
1. │ 1970-01-01 │
   └────────────┘

I'll try to debug more and provide more details.

Original table is created like this:

CREATE TABLE `test` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `test_date` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1566108 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions