Skip to content

bug: insert 1969-12-31 return 1970-01-01 when disable chunk rpc and set timezone #1572

@marsishandsome

Description

@marsishandsome
set time_zone = '-7:00';
set tidb_enable_chunk_rpc=0;

DROP TABLE IF EXISTS `test_607371680`;
CREATE TABLE `test_607371680` (
  `col_timestamp0` timestamp not null,
  `col_double0` double not null,
  `col_bit` bit(1),
  `col_boolean` boolean,
  `col_int` int(11),
  `col_bigint` bigint(20),
  `col_decimal` decimal(11),
  `col_double1` double,
  `col_timestamp1` timestamp,
  `col_date` date,
  `col_text` text,
  `col_varchar` varchar(18),
  `col_blob` blob,
  PRIMARY KEY (`col_timestamp0`,`col_double0`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
INSERT INTO `test_607371680` VALUES
('1969-12-31 17:00:01.0',0.01678990821070281,b'0',1,-2147483648,9223372036854775807,-96898994816,0.16388643294238858,'1969-12-31 17:00:01.0','8784-09-02','oIrSHYUzHgjuwC','',X'');
ALTER TABLE `test_607371680` SET TIFLASH REPLICA 1;

set session tidb_isolation_read_engines='tiflash'; select col_timestamp0 from test_607371680 where col_bit < 1;

+---------------------+
| col_timestamp0      |
+---------------------+
| 1970-01-01 17:00:01 |
+---------------------+
1 row in set (0.04 sec)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions