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

@@ -1,4 +1,3 @@
drop table if exists t1;
select floor(5.5),floor(-5.5);
floor(5.5) floor(-5.5)
5 -6
@@ -3632,5 +3631,17 @@ SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+
c1
NULL
#
# End of 10.5 tests
# MDEV-35651 NO_UNSIGNED_SUBTRACTION does not work for multiple unsigned integers
#
set sql_mode=no_unsigned_subtraction;
select cast(0 as unsigned) - 1;
cast(0 as unsigned) - 1
-1
select 2-cast(3 as unsigned);
2-cast(3 as unsigned)
-1
select cast(1 as unsigned) - cast(2 as unsigned);
cast(1 as unsigned) - cast(2 as unsigned)
-1
set sql_mode=default;
# End of 10.5 tests