1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers

restore correct unsigned-unsigned logic

followup for 031f11717d
This commit is contained in:
Sergei Golubchik
2024-12-15 20:14:16 +01:00
parent 680d461b5d
commit 828b928fce
3 changed files with 24 additions and 10 deletions

View File

@@ -4,10 +4,6 @@
--source include/default_charset.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
select floor(5.5),floor(-5.5);
explain extended select floor(5.5),floor(-5.5);
select ceiling(5.5),ceiling(-5.5);
@@ -1941,7 +1937,13 @@ SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) AS c1;
SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
--echo #
--echo # MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers
--echo #
set sql_mode=no_unsigned_subtraction;
select cast(0 as unsigned) - 1;
select 2-cast(3 as unsigned);
select cast(1 as unsigned) - cast(2 as unsigned);
set sql_mode=default;
--echo #
--echo # End of 10.5 tests
--echo #