1 Star 0 Fork 58

wang_yue111/mysql

forked from src-openEuler/mysql 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mysql-main-cast.patch 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
wangxiao65 提交于 2021-03-12 14:23 +08:00 . upgrade mysql to 8.0.23, fix cves
commit 68730acd9ae7ae8b2fcd25b5ccd18d47038d00b9
Author: Catalin Besleaga <catalin.besleaga@oracle.com>
Date: Mon Jan 4 14:32:05 2021 +0100
WL#14015: Follow-up: fixed unstable test
Change-Id: I11f352168902c6689981131cfda3a87ba924941c
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index af82329a9c5..4d81ef111cb 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -1747,6 +1747,7 @@ CAST("2020extra" AS YEAR)
2020
Warnings:
Warning 1292 Truncated incorrect YEAR value: '2020extra'
+SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00');
SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR);
CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR)
2010
@@ -1764,6 +1765,7 @@ CAST(TIME'08:09:10' AS YEAR)
SELECT CAST(TIME'00:00:00' AS YEAR);
CAST(TIME'00:00:00' AS YEAR)
2020
+SET timestamp = DEFAULT;
SELECT CAST(ST_PointFromText('POINT(10 10)') AS YEAR);
ERROR HY000: Incorrect arguments to cast_as_year
CREATE TABLE t AS SELECT CAST("2010" AS YEAR);
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index 1a1f512fca7..a74d79ad91f 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -799,6 +799,7 @@ SELECT CAST("extra" AS YEAR);
SELECT CAST("22extra" AS YEAR);
SELECT CAST("2020extra" AS YEAR);
+SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00');
#date[time] values
SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR);
SET SQL_MODE = "";
@@ -807,6 +808,7 @@ SET SQL_MODE = default;
SELECT CAST(TIMESTAMP'2010-01-01 08:09:10' AS YEAR);
SELECT CAST(TIME'08:09:10' AS YEAR);
SELECT CAST(TIME'00:00:00' AS YEAR);
+SET timestamp = DEFAULT;
#geometry values
--error ER_WRONG_ARGUMENTS
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_yue111/mysql.git
git@gitee.com:wang_yue111/mysql.git
wang_yue111
mysql
mysql
master

搜索帮助