1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Item::print(): remove redundant parentheses

by introducing new Item::precedence() method and using it
to decide whether parentheses are required
This commit is contained in:
Sergei Golubchik
2016-11-27 19:50:10 +01:00
parent 1db438c833
commit 180065ebb0
188 changed files with 2684 additions and 2553 deletions

View File

@ -21556,7 +21556,7 @@ CREATE OR REPLACE VIEW test1.v27 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v26 tab2;
SHOW CREATE VIEW test1.v27;
View Create View character_set_client collation_connection
v27 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci
v27 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
f1 f2
@ -21572,7 +21572,7 @@ CREATE VIEW test1.v28 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v27 tab2;
SHOW CREATE VIEW test1.v28;
View Create View character_set_client collation_connection
v28 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`)))) latin1 latin1_swedish_ci
v28 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(`tab1`.`f1` = `tab2`.`f1` and `tab1`.`f2` = `tab2`.`f2`)) latin1 latin1_swedish_ci
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v28;
f1 f2