diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-06-27 15:41:51 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-30 11:43:02 +0200 |
commit | 23d03a1b1e486da353f20964a1b91068bec209c0 (patch) | |
tree | 7fcbd95cf634b24e7f162a9b38559f32e31df6b5 /mysql-test/t/func_math.test | |
parent | 60916a8b9e81b9e9de14fa737848419f45ff899a (diff) | |
download | mariadb-git-23d03a1b1e486da353f20964a1b91068bec209c0.tar.gz |
parse negative numbers into one item
use Item->neg to convert generate negative Item_num's
instead of Item_func_neg(Item_num).
Based on the following commit:
Author: Monty <monty@mariadb.org>
Date: Mon May 30 22:44:00 2016 +0300
Make negative number their own token
The negation (-) operator will call Item->neg() one underlying numeric constants
and remove itself (like the NOT() function does today for other NOT functions.
This simplifies things
- -1 is not anymore an expression but a basic_const_item
- improves optimizer
- DEFAULT -1 doesn't need special handling anymore
- When we add DEFAULT expressions, -1 will be treated exactly like 1
- printing of items doesn't anymore put braces around all negative numbers
Other things fixed:
- Fixed that longlong converted to decimal's has a more appropriate size
- Fixed that "-0.0" read into a decimal is interpreted as 0.0
Diffstat (limited to 'mysql-test/t/func_math.test')
-rw-r--r-- | mysql-test/t/func_math.test | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index b48f4599074..058c6f3b7ca 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -586,5 +586,9 @@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table; --echo # ---echo # End of 10.0 tests +--echo # Start of 10.2 tests --echo # + +--echo # Test zero +select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1); + |