Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
11.8.0, 10.5(EOL)
-
None
Description
Currently we are allowing setting an out of range value in a stored routine default parameter. The error is caught when we invoke the routine at the run time. Ideally it should be handled at the creation time itself as it's done for CREATE TABLE.
Repro
------
11.8.0-opt>DELIMITER $$
|
11.8.0-opt>CREATE OR REPLACE PROCEDURE outofrange_test_2(p1 TINYINT UNSIGNED DEFAULT -1)
|
-> BEGIN
|
-> SELECT p1;
|
-> END $$
|
Query OK, 0 rows affected (0.004 sec)
|
 |
11.8.0-opt>DELIMITER ;
|
11.8.0-opt>CALL outofrange_test_2();
|
ERROR 1264 (22003): Out of range value for column 'p1' at row 0
|
11.8.0-opt>
|
Expected behavior:
It should be similar to table creation.
11.8.0-opt>CREATE TABLE t1 (c1 INT UNSIGNED DEFAULT -1);
|
ERROR 1067 (42000): Invalid default value for 'c1'
|
Attachments
Issue Links
- relates to
-
MDEV-35799 Default parameter value type mismatch should be handled at creation time
-
- Closed
-