to issue<44184376>:fix udf argument issue

This commit is contained in:
hanr881
2023-08-11 07:42:30 +00:00
committed by ob-robot
parent d23b1c10fc
commit e88540ebc8
4 changed files with 18 additions and 32 deletions

View File

@ -1155,24 +1155,15 @@ CREATE FUNCTION f1(arg TINYINT UNSIGNED) RETURNS TINYINT
BEGIN
RETURN arg;
END|
SELECT f1(-2500);
+-----------+
| f1(-2500) |
+-----------+
| 0 |
+-----------+
ERROR 22003: Out of range value for column
## SET @@sql_mode = 'traditional';
SET @@sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
## --error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(-2500);
+-----------+
| f1(-2500) |
+-----------+
| 0 |
+-----------+
ERROR 22003: Out of range value for column
DROP FUNCTION f1;
@ -1183,11 +1174,7 @@ END|
## --error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(-2500);
+-----------+
| f1(-2500) |
+-----------+
| 0 |
+-----------+
ERROR 22003: Out of range value for column
## SET @@sql_mode = 'ansi';
set @@sql_mode = "PIPES_AS_CONCAT,ONLY_FULL_GROUP_BY";
@ -1208,22 +1195,14 @@ BEGIN
END|
SELECT f1(8388699);
+-------------+
| f1(8388699) |
+-------------+
| 8388607 |
+-------------+
ERROR 22003: Out of range value for column
## SET @@sql_mode = 'traditional';
SET @@sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
## --error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(8388699);
+-------------+
| f1(8388699) |
+-------------+
| 8388607 |
+-------------+
ERROR 22003: Out of range value for column
DROP FUNCTION f1;
@ -1234,11 +1213,7 @@ END|
## --error ER_WARN_DATA_OUT_OF_RANGE
SELECT f1(8388699);
+-------------+
| f1(8388699) |
+-------------+
| 8388607 |
+-------------+
ERROR 22003: Out of range value for column
## SET @@sql_mode = 'ansi';
set @@sql_mode = "PIPES_AS_CONCAT,ONLY_FULL_GROUP_BY";