mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-9516 type error when setting session variable
Allowing assigning of DECIMAL(N,0) values to INT-alike system variables.
This commit is contained in:
@@ -203,6 +203,20 @@ SELECT session.wait_timeout;
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT wait_timeout = @@session.wait_timeout;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-9516 type error when setting session variable
|
||||
--echo #
|
||||
|
||||
SET SESSION wait_timeout= 28000;
|
||||
SET SESSION wait_timeout= GREATEST(28000, @@wait_timeout);
|
||||
SET SESSION wait_timeout= COALESCE(28000, @@wait_timeout);
|
||||
SET SESSION wait_timeout= IFNULL(28000, @@wait_timeout);
|
||||
SET SESSION wait_timeout= CASE WHEN TRUE THEN 28000 ELSE @@wait_timeout END;
|
||||
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET SESSION wait_timeout= 28000.0;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET SESSION wait_timeout= 28000.1;
|
||||
|
||||
####################################
|
||||
# Restore initial value #
|
||||
|
Reference in New Issue
Block a user