summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2005-05-27 14:48:33 +0200
committerunknown <pem@mysql.comhem.se>2005-05-27 14:48:33 +0200
commitd5f4c14b6e1ba0c0639e513d50eace20d6f8c15d (patch)
tree4f0fa14278a1bdda3b8609fe4a8534d4f0f9dc5b /mysql-test/r
parent03787cce758d1b6a368f7953b374d1483955e181 (diff)
downloadmariadb-git-d5f4c14b6e1ba0c0639e513d50eace20d6f8c15d.tar.gz
Fixed BUG#9559: Functions: Numeric Operations using -ve value gives incorrect
results. Actually a problem when converting decimal to int for user variables. mysql-test/r/sp.result: New test case for BUG#9559. mysql-test/t/sp.test: New test case for BUG#9559. sql/item_func.cc: Don't set the unsigned flag when converting decimal user var to int.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/sp.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index c1164380f09..da54c100178 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -3098,4 +3098,15 @@ call bug5963_2(1)|
call bug5963_2(1)|
drop procedure bug5963_2|
drop table t3|
+drop function if exists bug9559|
+create function bug9559()
+returns int
+begin
+set @y = -6/2;
+return @y;
+end|
+select bug9559()|
+bug9559()
+-3
+drop function bug9559|
drop table t1,t2;