readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.54k stars 125 forks source link

MySQL DATETIME with microseconds precision, not displaying #1318

Closed altmannmarcelo closed 4 months ago

altmannmarcelo commented 4 months ago

Description

If you have a field with DATETIME(6) and the value inserted is 000000 we do not display it.

create table t (dt datetime(6));
insert into t values ('2000-01-01 00:00:00.000001'),  ('2000-01-02 00:00:00.000000');
CREATE CACHE FROM SELECT * FROM t;
mysql> SELECT * FROM t;
+----------------------------+
| dt                         |
+----------------------------+
| 2000-01-01 00:00:00.000001 |
| 2000-01-02 00:00:00        |
+----------------------------+
2 rows in set (0,00 sec)

Change in user-visible behavior

Requires documentation change