summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-02-22 12:12:49 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-02-22 12:12:49 +0200
commit92f79a22e63a3fef71106c64dfd8559ee9bdda4a (patch)
tree5d83cdcf964805192546fd8bfdef999f5444e58d /sql/item_func.cc
parent120480d15b764d03d5d36fb68735a1975ceb3454 (diff)
parenta112a80b4762dbb80b25ae0e8bcd93893eacec5f (diff)
downloadmariadb-git-92f79a22e63a3fef71106c64dfd8559ee9bdda4a.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index ed49733d15d..92f6255d958 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2009, 2021, MariaDB
+ Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1156,14 +1156,10 @@ longlong Item_func_plus::int_op()
}
}
-#ifndef WITH_UBSAN
- res= val0 + val1;
-#else
if (res_unsigned)
res= (longlong) ((ulonglong) val0 + (ulonglong) val1);
else
- res= val0+val1;
-#endif /* WITH_UBSAN */
+ res= val0 + val1;
return check_integer_overflow(res, res_unsigned);
@@ -1326,14 +1322,10 @@ longlong Item_func_minus::int_op()
goto err;
}
}
-#ifndef WITH_UBSAN
- res= val0 - val1;
-#else
if (res_unsigned)
res= (longlong) ((ulonglong) val0 - (ulonglong) val1);
else
res= val0 - val1;
-#endif /* WITH_UBSAN */
return check_integer_overflow(res, res_unsigned);