Revert "catalog: render µs in SQL methods" partially and add new datetime(N) sqlvar type
Changing 'datetime' to render µs can break existing code if the column has lower precision. For example: > insert into t values('2015-05-26 12:18:37'); select * from t where x='2015-05-26 12:18:37'; Query OK, 1 row affected (0.00 sec) +---------------------+ | x | +---------------------+ | 2015-05-26 12:18:37 | +---------------------+ 1 row in set (0.00 sec) > insert into t values('2015-05-26 12:18:37.2'); select * from t where x='2015-05-26 12:18:37.2'; Query OK, 1 row affected (0.00 sec) Empty set (0.00 sec) Another example is when searching for stricly older documents than another one. The latter could be wrongly included in the results. Commit e0388ecc ("catalog: render µs in SQL methods") was also incomplete: there's still no µs support in ZSQLCatalog.
Showing
Please register or sign in to comment