1
0
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:
Alexander Barkov
2016-03-22 00:09:04 +04:00
parent e8af217e16
commit 537fc572d4
6 changed files with 35 additions and 5 deletions

View File

@@ -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 #