TiDB 的日期比较和 MySQL 不兼容
source link: https://blog.est.im/2021/stdout-011
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
TiDB 的日期比较和 MySQL 不兼容
Posted 2021-09-07 | stdout
MySQL的
> select VERSION()
+-----------+
| VERSION() |
+-----------+
| 8.0.15-6 |
+-----------+
> select NOW() > '';
+------------+
| NOW() > '' |
+------------+
| 1 |
+------------+
> show warnings;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1292 | Truncated incorrect datetime value: '' |
+---------+------+----------------------------------------+
TiDB:
> select VERSION()
+--------------------+
| VERSION() |
+--------------------+
| 5.7.25-TiDB-v5.1.0 |
+--------------------+
1 row in set
> select NOW() > '';
+------------+
| NOW() > '' |
+------------+
| <null> |
+------------+
> show warnings;
+---------+------+------------------------------+
| Level | Code | Message |
+---------+------+------------------------------+
| Warning | 1292 | Incorrect datetime value: '' |
+---------+------+------------------------------+
1 row in set
记录一下 相关 issue
btw 顺便吐槽一下,
json_extract('{"a": null}', '$.a')
返回的值是 CAST('null' AS JSON)
注意区分 json_extract('{"a": null}', '$.b') IS NULL
Recommend
-
76
-
45
问与答 - @find456789 - 我有一个树莓派用来当作主机,偶尔跑一点小脚本, 小程序但是发现很多软件不兼容比如,我在上面安装了 python3.6. 结果 由于树莓派默认没有 openssl,导致我
-
15
1. Date.compareTo() java.util.Date 提供了在Java中比较两个日期的经典方法compareTo()。 如果两个日期相等,则返回值为0。 如果Date在date参数之后,则返回值大于0。
-
11
昆仑万维是全球领先、业内前沿的综合性互联网集团,业务涵盖昆仑游戏(GameArk)、信息资讯(Opera)等多个业务板块。其中,昆仑游戏(GameArk)凭借研发及运营的核心优势,面向全球进行游戏的研发、发行与运营,形成多样性的产品矩阵。截止 2020...
-
3
mysql按照日期分组排序(date_format) 作者: dreamfly 分类: mysql 发布时间: 2019-03-21 17:38 今天在做项目的时候,遇到了这样的一个问题。需要开发一个...
-
7
clickhouse,tidb,mysql 读取速度对比«海底苍鹰(tank)博客 clickhouse,tidb,mysql,这三个数据库都是现在在用的。准备了一些测试数据,测试一下读取数据的速度。 一,硬件说明 1,mysql环境,普通的台机,没...
-
4
V2EX › MySQL mysql 数据库存日期一般用什么类型? U...
-
4
日期和时间函数主要用来处理日期和时间值,一般的日期函数除了使用date类型的参数外,也可以使用datetime或者timestamp类型的参数,但会忽略这些值的时间部分。
-
5
mysql如何判断某些日期不合法 精选 原创 在系统集成或从其它表里面转存时间字段,用字符串存储时间字段时,可能有一些不合法数据...
-
3
是时候了!MySQL 5.7 的下一站,不如试试 TiDB?-品玩
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK