diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-09-15 00:29:56 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-09-18 10:12:23 +0200 |
commit | fb2035a1a37bb3dfe8311e0bb2b9d474837c035c (patch) | |
tree | 6c04aa9400ab51881d03f73a1706e1609525db5d /mysql-test/r/func_math.result | |
parent | 16b1cb650283593f565c53226f7481cacde17a30 (diff) | |
download | mariadb-git-fb2035a1a37bb3dfe8311e0bb2b9d474837c035c.tar.gz |
MDEV-13673 Bad result in view
When printing an expression, like a/(b*c), we need to print parentheses,
even though / and * have the same precedence. Basically, we should
always treat the second argument as having one level higher precedence
than it normally is.
Diffstat (limited to 'mysql-test/r/func_math.result')
-rw-r--r-- | mysql-test/r/func_math.result | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 8ca10203add..ff2e929cffc 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -838,3 +838,8 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1); select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678'); CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678') NULL 0 3259397556 2501908538 763378421 939184570 +explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select 3 - 2 + 1 AS `(3-2)+1`,3 / 2 * 1 AS `(3/2)*1`,3 - (2 + 1) AS `3-(2+1)`,3 / (2 * 1) AS `3/(2*1)` |