summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-28 10:01:50 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-28 10:01:50 +0200
commita8de8f261d1b7621b8e16396e87dfaac14891162 (patch)
tree9b8ec45858c2757305e0bdecf237fcb59251020c /mysql-test
parente183aec1d75ea7b424ebe237e6b1643961903f2d (diff)
parent42e1815ad850384fad292534665ff61b78dd96f6 (diff)
downloadmariadb-git-a8de8f261d1b7621b8e16396e87dfaac14891162.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/case.result6
-rw-r--r--mysql-test/main/derived_cond_pushdown.result16
-rw-r--r--mysql-test/main/func_json.result5
-rw-r--r--mysql-test/main/func_json.test1
-rw-r--r--mysql-test/main/func_math.result5
-rw-r--r--mysql-test/main/func_math.test5
-rw-r--r--mysql-test/main/func_test.result19
-rw-r--r--mysql-test/main/func_test.test17
-rw-r--r--mysql-test/main/grant5.result32
-rw-r--r--mysql-test/main/grant5.test18
-rw-r--r--mysql-test/main/parser.result19
-rw-r--r--mysql-test/main/parser.test16
-rw-r--r--mysql-test/main/parser_precedence.result748
-rw-r--r--mysql-test/main/parser_precedence.test335
-rw-r--r--mysql-test/main/precedence.result8019
-rw-r--r--mysql-test/main/precedence.test4788
-rw-r--r--mysql-test/main/precedence_bugs.result60
-rw-r--r--mysql-test/main/precedence_bugs.test41
-rw-r--r--mysql-test/main/view.result11
-rw-r--r--mysql-test/main/view.test11
-rw-r--r--mysql-test/suite/encryption/r/tempfiles_encrypted.result3951
-rw-r--r--mysql-test/suite/encryption/t/tempfiles_encrypted.opt1
-rw-r--r--mysql-test/suite/encryption/t/tempfiles_encrypted.test31
-rw-r--r--mysql-test/suite/galera/r/MDEV-22707.result26
-rw-r--r--mysql-test/suite/galera/t/MDEV-22707.test51
-rw-r--r--mysql-test/suite/innodb/include/wait_all_purged.inc24
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns.result50
-rw-r--r--mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt7
-rw-r--r--mysql-test/suite/mariabackup/ddl_incremental_encrypted.result26
-rw-r--r--mysql-test/suite/mariabackup/ddl_incremental_encrypted.test66
-rw-r--r--mysql-test/suite/mariabackup/mlog_index_load.result1
-rw-r--r--mysql-test/suite/mariabackup/mlog_index_load.test1
-rw-r--r--mysql-test/suite/roles/set_default_role_clear.result1
-rw-r--r--mysql-test/suite/roles/set_default_role_for.result2
-rw-r--r--mysql-test/suite/roles/set_default_role_invalid.result3
-rw-r--r--mysql-test/suite/roles/set_default_role_new_connection.result2
-rw-r--r--mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result16
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result2
-rw-r--r--mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test2
41 files changed, 17230 insertions, 1209 deletions
diff --git a/mysql-test/main/case.result b/mysql-test/main/case.result
index 926ac000eb0..f4f02703c5e 100644
--- a/mysql-test/main/case.result
+++ b/mysql-test/main/case.result
@@ -517,12 +517,12 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='a' AND CASE 'a' WHEN 'a' THEN a ELSE
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
-Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 'a' and (case 'a' when 'a' then `test`.`t1`.`a` else 'a' end) = 'a'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 'a' and case 'a' when 'a' then `test`.`t1`.`a` else 'a' end = 'a'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='a' AND CASE 'a' WHEN 'a' THEN 'a' ELSE a END='a';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
-Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 'a' and (case 'a' when 'a' then 'a' else `test`.`t1`.`a` end) = 'a'
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 'a' and case 'a' when 'a' then 'a' else `test`.`t1`.`a` end = 'a'
ALTER TABLE t1 MODIFY a VARBINARY(10);
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='a' AND CASE a WHEN 'a' THEN 'a' ELSE 'a' END='a';
id select_type table type possible_keys key key_len ref rows filtered Extra
@@ -570,7 +570,7 @@ CASE WHEN a THEN b ELSE 1 END=3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
-Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (case `test`.`t1`.`a` when `test`.`t1`.`b` then 1 end) = 1 and (case when `test`.`t1`.`a` then `test`.`t1`.`b` else 1 end) = 3
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where case `test`.`t1`.`a` when `test`.`t1`.`b` then 1 end = 1 and case when `test`.`t1`.`a` then `test`.`t1`.`b` else 1 end = 3
DROP TABLE t1;
#
# End of 10.3 test
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index 542397755dc..7de4253593f 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -10068,11 +10068,11 @@ EXPLAIN
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "case when (tab2.max_a = 1 or tab2.max_a = 2) then 1 else 0 end = 1",
+ "attached_condition": "case when tab2.max_a = 1 or tab2.max_a = 2 then 1 else 0 end = 1",
"materialized": {
"query_block": {
"select_id": 3,
- "having_condition": "case when (max_a = 1 or max_a = 2) then 1 else 0 end = 1",
+ "having_condition": "case when max_a = 1 or max_a = 2 then 1 else 0 end = 1",
"filesort": {
"sort_key": "t1.b",
"temporary_table": {
@@ -10117,11 +10117,11 @@ EXPLAIN
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "case when (tab2.max_a = 1 or tab2.max_a > 2 and tab2.max_a < 4) then 1 else 0 end = 1",
+ "attached_condition": "case when tab2.max_a = 1 or tab2.max_a > 2 and tab2.max_a < 4 then 1 else 0 end = 1",
"materialized": {
"query_block": {
"select_id": 3,
- "having_condition": "case when (max_a = 1 or max_a > 2 and max_a < 4) then 1 else 0 end = 1",
+ "having_condition": "case when max_a = 1 or max_a > 2 and max_a < 4 then 1 else 0 end = 1",
"filesort": {
"sort_key": "t1.b",
"temporary_table": {
@@ -10166,11 +10166,11 @@ EXPLAIN
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "case when (tab2.max_a > 1 and (tab2.max_a = 2 or tab2.max_a > 2)) then 1 else 0 end = 1",
+ "attached_condition": "case when tab2.max_a > 1 and (tab2.max_a = 2 or tab2.max_a > 2) then 1 else 0 end = 1",
"materialized": {
"query_block": {
"select_id": 3,
- "having_condition": "case when (max_a > 1 and (max_a = 2 or max_a > 2)) then 1 else 0 end = 1",
+ "having_condition": "case when max_a > 1 and (max_a = 2 or max_a > 2) then 1 else 0 end = 1",
"filesort": {
"sort_key": "t1.b",
"temporary_table": {
@@ -10215,7 +10215,7 @@ EXPLAIN
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "case when (tab2.b = 2 or tab2.b = 4) then 1 else 0 end = 1",
+ "attached_condition": "case when tab2.b = 2 or tab2.b = 4 then 1 else 0 end = 1",
"materialized": {
"query_block": {
"select_id": 3,
@@ -10227,7 +10227,7 @@ EXPLAIN
"access_type": "ALL",
"rows": 3,
"filtered": 100,
- "attached_condition": "case when (t1.b = 2 or t1.b = 4) then 1 else 0 end = 1"
+ "attached_condition": "case when t1.b = 2 or t1.b = 4 then 1 else 0 end = 1"
}
}
}
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index 969a79f00b3..94c3a0d6c0c 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -898,6 +898,11 @@ NULL
SELECT JSON_MERGE_PATCH(NULL, '[1,2,3]');
JSON_MERGE_PATCH(NULL, '[1,2,3]')
[1, 2, 3]
+SELECT JSON_MERGE_PATCH(NULL, 'a');
+JSON_MERGE_PATCH(NULL, 'a')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 2 to function 'json_merge_patch' at position 1
SELECT JSON_MERGE_PATCH('{"a":"b"}', NULL, '[1,2,3]', '{"c":null,"d":"e"}');
JSON_MERGE_PATCH('{"a":"b"}', NULL, '[1,2,3]', '{"c":null,"d":"e"}')
{"d": "e"}
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index e03e304a0da..a246113d210 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -528,6 +528,7 @@ DROP TABLE merge_t;
SELECT JSON_MERGE_PATCH('{"a":"b"}', NULL, '{"c":"d"}');
SELECT JSON_MERGE_PATCH(NULL, '[1,2,3]');
+SELECT JSON_MERGE_PATCH(NULL, 'a');
SELECT JSON_MERGE_PATCH('{"a":"b"}', NULL, '[1,2,3]', '{"c":null,"d":"e"}');
--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index bf8e25b4ee1..92b56cb4de4 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -1766,11 +1766,6 @@ 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(REPEAT('ABCDEfghij', 20)), CRC32(REPEAT('0123456789', 200));
CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678') CRC32(REPEAT('ABCDEfghij', 20)) CRC32(REPEAT('0123456789', 200))
NULL 0 3259397556 2501908538 763378421 939184570 3823776386 1428305034
-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)`
#
# Start of 10.3 tests
#
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index f169ae0c326..70adff02a22 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -793,11 +793,6 @@ 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(REPEAT('ABCDEfghij', 20)), CRC32(REPEAT('0123456789', 200));
-#
-# MDEV-13673 Bad result in view
-#
-explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
-
--echo #
--echo # Start of 10.3 tests
--echo #
diff --git a/mysql-test/main/func_test.result b/mysql-test/main/func_test.result
index 4243ed9cfb0..04aee8b5522 100644
--- a/mysql-test/main/func_test.result
+++ b/mysql-test/main/func_test.result
@@ -89,15 +89,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select -1 AS `- a` from dual
drop table t1;
-select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
-5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
-0 1
-select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
-1 and 2 between 2 and 10 2 between 2 and 10 and 1
-1 1
-select 1 and 0 or 2, 2 or 1 and 0;
-1 and 0 or 2 2 or 1 and 0
-1 1
select _koi8r'a' = _koi8r'A';
_koi8r'a' = _koi8r'A'
1
@@ -273,16 +264,6 @@ NULL
select mod(NULL, 2.0) as 'NULL';
NULL
NULL
-create table t1 (a int, b int);
-insert into t1 values (1,2), (2,3), (3,4), (4,5);
-select * from t1 where a not between 1 and 2;
-a b
-3 4
-4 5
-select * from t1 where a not between 1 and 2 and b not between 3 and 4;
-a b
-4 5
-drop table t1;
SELECT GREATEST(1,NULL) FROM DUAL;
GREATEST(1,NULL)
NULL
diff --git a/mysql-test/main/func_test.test b/mysql-test/main/func_test.test
index d1c0702da80..570fd0ae87a 100644
--- a/mysql-test/main/func_test.test
+++ b/mysql-test/main/func_test.test
@@ -36,14 +36,6 @@ explain extended select - a from t1;
drop table t1;
#
-# Wrong usage of functions
-#
-
-select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
-select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
-select 1 and 0 or 2, 2 or 1 and 0;
-
-#
# Coercibility
#
select _koi8r'a' = _koi8r'A';
@@ -142,15 +134,6 @@ select mod(NULL, 2.0) as 'NULL';
#
-# Bug#6726: NOT BETWEEN parse failure
-#
-create table t1 (a int, b int);
-insert into t1 values (1,2), (2,3), (3,4), (4,5);
-select * from t1 where a not between 1 and 2;
-select * from t1 where a not between 1 and 2 and b not between 3 and 4;
-drop table t1;
-
-#
# Test for bug #12791: one of the arguments of LEAST/GREATEST is NULL
#
diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result
index 8fec77cdba4..abf17d736a7 100644
--- a/mysql-test/main/grant5.result
+++ b/mysql-test/main/grant5.result
@@ -38,6 +38,38 @@ connection default;
disconnect u1;
drop user u1@localhost;
drop database mysqltest1;
+CREATE ROLE test_role;
+CREATE USER test_user;
+GRANT test_role TO test_user;
+SET DEFAULT ROLE test_role FOR test_user;
+SHOW GRANTS FOR test_user;
+Grants for test_user@%
+GRANT `test_role` TO `test_user`@`%`
+GRANT USAGE ON *.* TO `test_user`@`%`
+SET DEFAULT ROLE test_role FOR 'test_user'@'%'
+SET DEFAULT ROLE NONE for test_user;
+SHOW GRANTS FOR test_user;
+Grants for test_user@%
+GRANT `test_role` TO `test_user`@`%`
+GRANT USAGE ON *.* TO `test_user`@`%`
+SET ROLE test_role;
+SET DEFAULT ROLE test_role;
+SHOW GRANTS;
+Grants for root@localhost
+GRANT `test_role` TO `root`@`localhost` WITH ADMIN OPTION
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+GRANT USAGE ON *.* TO `test_role`
+SET DEFAULT ROLE test_role FOR 'root'@'localhost'
+SET DEFAULT ROLE NONE;
+SHOW GRANTS;
+Grants for root@localhost
+GRANT `test_role` TO `root`@`localhost` WITH ADMIN OPTION
+GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
+GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
+GRANT USAGE ON *.* TO `test_role`
+DROP USER test_user;
+DROP ROLE test_role;
#
# MDEV-20076: SHOW GRANTS does not quote role names properly
#
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index 9d882ee40a9..703d87f08cc 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -52,6 +52,24 @@ drop user u1@localhost;
drop database mysqltest1;
#
+# MDEV-22313: Neither SHOW CREATE USER nor SHOW GRANTS prints a user's default role
+#
+CREATE ROLE test_role;
+CREATE USER test_user;
+GRANT test_role TO test_user;
+SET DEFAULT ROLE test_role FOR test_user;
+SHOW GRANTS FOR test_user;
+SET DEFAULT ROLE NONE for test_user;
+SHOW GRANTS FOR test_user;
+SET ROLE test_role;
+SET DEFAULT ROLE test_role;
+SHOW GRANTS;
+SET DEFAULT ROLE NONE;
+SHOW GRANTS;
+DROP USER test_user;
+DROP ROLE test_role;
+
+#
# End of 10.1 tests
#
diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result
index f66fa7c457f..1c58c7379e4 100644
--- a/mysql-test/main/parser.result
+++ b/mysql-test/main/parser.result
@@ -1314,6 +1314,23 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+create or replace view v1 as select 1 between (2 between 3 and 4) and 5;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 between 2 between 3 and 4 and 5 AS `1 between (2 between 3 and 4) and 5`
+create or replace view v1 as select 1 between (2 in (3,4)) and 5;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 between 2 in (3,4) and 5 AS `1 between (2 in (3,4)) and 5`
+create or replace view v1 as select 1 between (2 like 3) and 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 between 2 like 3 and 4 AS `1 between (2 like 3) and 4`
+create or replace view v1 as select 1 not between (2 like 3) and 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 not between 2 like 3 and 4 AS `1 not between (2 like 3) and 4`
+drop view v1;
#
# MDEV-10343 Providing compatibility for basic SQL data types
#
@@ -1767,4 +1784,4 @@ EXECUTE IMMEDIATE 'if(`systeminfo /FO LIST';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`systeminfo /FO LIST' at line 1
EXECUTE IMMEDIATE 'if(`systeminfo';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`systeminfo' at line 1
-End of 10.3 tests
+# End of 10.3 tests
diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test
index 5a2d0294171..9fb68b92b8f 100644
--- a/mysql-test/main/parser.test
+++ b/mysql-test/main/parser.test
@@ -1343,6 +1343,20 @@ create table t1 ( id serial );
show create table t1;
drop table t1;
+#
+# BETWEEN syntax
+#
+create or replace view v1 as select 1 between (2 between 3 and 4) and 5;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+create or replace view v1 as select 1 between (2 in (3,4)) and 5;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+create or replace view v1 as select 1 between (2 like 3) and 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+create or replace view v1 as select 1 not between (2 like 3) and 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+drop view v1;
+
--echo #
--echo # MDEV-10343 Providing compatibility for basic SQL data types
--echo #
@@ -1547,4 +1561,4 @@ EXECUTE IMMEDIATE 'if(`systeminfo /FO LIST';
--error ER_PARSE_ERROR
EXECUTE IMMEDIATE 'if(`systeminfo';
---echo End of 10.3 tests
+--echo # End of 10.3 tests
diff --git a/mysql-test/main/parser_precedence.result b/mysql-test/main/parser_precedence.result
deleted file mode 100644
index f23295bd61b..00000000000
--- a/mysql-test/main/parser_precedence.result
+++ /dev/null
@@ -1,748 +0,0 @@
-drop table if exists t1_30237_bool;
-set sql_mode=NO_UNSIGNED_SUBTRACTION;
-create table t1_30237_bool(A boolean, B boolean, C boolean);
-insert into t1_30237_bool values
-(FALSE, FALSE, FALSE),
-(FALSE, FALSE, NULL),
-(FALSE, FALSE, TRUE),
-(FALSE, NULL, FALSE),
-(FALSE, NULL, NULL),
-(FALSE, NULL, TRUE),
-(FALSE, TRUE, FALSE),
-(FALSE, TRUE, NULL),
-(FALSE, TRUE, TRUE),
-(NULL, FALSE, FALSE),
-(NULL, FALSE, NULL),
-(NULL, FALSE, TRUE),
-(NULL, NULL, FALSE),
-(NULL, NULL, NULL),
-(NULL, NULL, TRUE),
-(NULL, TRUE, FALSE),
-(NULL, TRUE, NULL),
-(NULL, TRUE, TRUE),
-(TRUE, FALSE, FALSE),
-(TRUE, FALSE, NULL),
-(TRUE, FALSE, TRUE),
-(TRUE, NULL, FALSE),
-(TRUE, NULL, NULL),
-(TRUE, NULL, TRUE),
-(TRUE, TRUE, FALSE),
-(TRUE, TRUE, NULL),
-(TRUE, TRUE, TRUE) ;
-Testing OR, XOR, AND
-select A, B, A OR B, A XOR B, A AND B
-from t1_30237_bool where C is null order by A, B;
-A B A OR B A XOR B A AND B
-NULL NULL NULL NULL NULL
-NULL 0 NULL NULL 0
-NULL 1 1 NULL NULL
-0 NULL NULL NULL 0
-0 0 0 0 0
-0 1 1 1 0
-1 NULL 1 NULL NULL
-1 0 1 1 0
-1 1 1 0 1
-Testing that OR is associative
-select A, B, C, (A OR B) OR C, A OR (B OR C), A OR B OR C
-from t1_30237_bool order by A, B, C;
-A B C (A OR B) OR C A OR (B OR C) A OR B OR C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 NULL NULL NULL
-NULL NULL 1 1 1 1
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 NULL NULL NULL
-NULL 0 1 1 1 1
-NULL 1 NULL 1 1 1
-NULL 1 0 1 1 1
-NULL 1 1 1 1 1
-0 NULL NULL NULL NULL NULL
-0 NULL 0 NULL NULL NULL
-0 NULL 1 1 1 1
-0 0 NULL NULL NULL NULL
-0 0 0 0 0 0
-0 0 1 1 1 1
-0 1 NULL 1 1 1
-0 1 0 1 1 1
-0 1 1 1 1 1
-1 NULL NULL 1 1 1
-1 NULL 0 1 1 1
-1 NULL 1 1 1 1
-1 0 NULL 1 1 1
-1 0 0 1 1 1
-1 0 1 1 1 1
-1 1 NULL 1 1 1
-1 1 0 1 1 1
-1 1 1 1 1 1
-select count(*) from t1_30237_bool
-where ((A OR B) OR C) != (A OR (B OR C));
-count(*)
-0
-Testing that XOR is associative
-select A, B, C, (A XOR B) XOR C, A XOR (B XOR C), A XOR B XOR C
-from t1_30237_bool order by A, B, C;
-A B C (A XOR B) XOR C A XOR (B XOR C) A XOR B XOR C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 NULL NULL NULL
-NULL NULL 1 NULL NULL NULL
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 NULL NULL NULL
-NULL 0 1 NULL NULL NULL
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 NULL NULL NULL
-NULL 1 1 NULL NULL NULL
-0 NULL NULL NULL NULL NULL
-0 NULL 0 NULL NULL NULL
-0 NULL 1 NULL NULL NULL
-0 0 NULL NULL NULL NULL
-0 0 0 0 0 0
-0 0 1 1 1 1
-0 1 NULL NULL NULL NULL
-0 1 0 1 1 1
-0 1 1 0 0 0
-1 NULL NULL NULL NULL NULL
-1 NULL 0 NULL NULL NULL
-1 NULL 1 NULL NULL NULL
-1 0 NULL NULL NULL NULL
-1 0 0 1 1 1
-1 0 1 0 0 0
-1 1 NULL NULL NULL NULL
-1 1 0 0 0 0
-1 1 1 1 1 1
-select count(*) from t1_30237_bool
-where ((A XOR B) XOR C) != (A XOR (B XOR C));
-count(*)
-0
-Testing that AND is associative
-select A, B, C, (A AND B) AND C, A AND (B AND C), A AND B AND C
-from t1_30237_bool order by A, B, C;
-A B C (A AND B) AND C A AND (B AND C) A AND B AND C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 0 0 0
-NULL NULL 1 NULL NULL NULL
-NULL 0 NULL 0 0 0
-NULL 0 0 0 0 0
-NULL 0 1 0 0 0
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 0 0 0
-NULL 1 1 NULL NULL NULL
-0 NULL NULL 0 0 0
-0 NULL 0 0 0 0
-0 NULL 1 0 0 0
-0 0 NULL 0 0 0
-0 0 0 0 0 0
-0 0 1 0 0 0
-0 1 NULL 0 0 0
-0 1 0 0 0 0
-0 1 1 0 0 0
-1 NULL NULL NULL NULL NULL
-1 NULL 0 0 0 0
-1 NULL 1 NULL NULL NULL
-1 0 NULL 0 0 0
-1 0 0 0 0 0
-1 0 1 0 0 0
-1 1 NULL NULL NULL NULL
-1 1 0 0 0 0
-1 1 1 1 1 1
-select count(*) from t1_30237_bool
-where ((A AND B) AND C) != (A AND (B AND C));
-count(*)
-0
-Testing that AND has precedence over OR
-select A, B, C, (A OR B) AND C, A OR (B AND C), A OR B AND C
-from t1_30237_bool order by A, B, C;
-A B C (A OR B) AND C A OR (B AND C) A OR B AND C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 0 NULL NULL
-NULL NULL 1 NULL NULL NULL
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 0 NULL NULL
-NULL 0 1 NULL NULL NULL
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 0 NULL NULL
-NULL 1 1 1 1 1
-0 NULL NULL NULL NULL NULL
-0 NULL 0 0 0 0
-0 NULL 1 NULL NULL NULL
-0 0 NULL 0 0 0
-0 0 0 0 0 0
-0 0 1 0 0 0
-0 1 NULL NULL NULL NULL
-0 1 0 0 0 0
-0 1 1 1 1 1
-1 NULL NULL NULL 1 1
-1 NULL 0 0 1 1
-1 NULL 1 1 1 1
-1 0 NULL NULL 1 1
-1 0 0 0 1 1
-1 0 1 1 1 1
-1 1 NULL NULL 1 1
-1 1 0 0 1 1
-1 1 1 1 1 1
-select count(*) from t1_30237_bool
-where (A OR (B AND C)) != (A OR B AND C);
-count(*)
-0
-select A, B, C, (A AND B) OR C, A AND (B OR C), A AND B OR C
-from t1_30237_bool order by A, B, C;
-A B C (A AND B) OR C A AND (B OR C) A AND B OR C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 NULL NULL NULL
-NULL NULL 1 1 NULL 1
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 0 0 0
-NULL 0 1 1 NULL 1
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 NULL NULL NULL
-NULL 1 1 1 NULL 1
-0 NULL NULL NULL 0 NULL
-0 NULL 0 0 0 0
-0 NULL 1 1 0 1
-0 0 NULL NULL 0 NULL
-0 0 0 0 0 0
-0 0 1 1 0 1
-0 1 NULL NULL 0 NULL
-0 1 0 0 0 0
-0 1 1 1 0 1
-1 NULL NULL NULL NULL NULL
-1 NULL 0 NULL NULL NULL
-1 NULL 1 1 1 1
-1 0 NULL NULL NULL NULL
-1 0 0 0 0 0
-1 0 1 1 1 1
-1 1 NULL 1 1 1
-1 1 0 1 1 1
-1 1 1 1 1 1
-select count(*) from t1_30237_bool
-where ((A AND B) OR C) != (A AND B OR C);
-count(*)
-0
-Testing that AND has precedence over XOR
-select A, B, C, (A XOR B) AND C, A XOR (B AND C), A XOR B AND C
-from t1_30237_bool order by A, B, C;
-A B C (A XOR B) AND C A XOR (B AND C) A XOR B AND C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 0 NULL NULL
-NULL NULL 1 NULL NULL NULL
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 0 NULL NULL
-NULL 0 1 NULL NULL NULL
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 0 NULL NULL
-NULL 1 1 NULL NULL NULL
-0 NULL NULL NULL NULL NULL
-0 NULL 0 0 0 0
-0 NULL 1 NULL NULL NULL
-0 0 NULL 0 0 0
-0 0 0 0 0 0
-0 0 1 0 0 0
-0 1 NULL NULL NULL NULL
-0 1 0 0 0 0
-0 1 1 1 1 1
-1 NULL NULL NULL NULL NULL
-1 NULL 0 0 1 1
-1 NULL 1 NULL NULL NULL
-1 0 NULL NULL 1 1
-1 0 0 0 1 1
-1 0 1 1 1 1
-1 1 NULL 0 NULL NULL
-1 1 0 0 1 1
-1 1 1 0 0 0
-select count(*) from t1_30237_bool
-where (A XOR (B AND C)) != (A XOR B AND C);
-count(*)
-0
-select A, B, C, (A AND B) XOR C, A AND (B XOR C), A AND B XOR C
-from t1_30237_bool order by A, B, C;
-A B C (A AND B) XOR C A AND (B XOR C) A AND B XOR C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 NULL NULL NULL
-NULL NULL 1 NULL NULL NULL
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 0 0 0
-NULL 0 1 1 NULL 1
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 NULL NULL NULL
-NULL 1 1 NULL 0 NULL
-0 NULL NULL NULL 0 NULL
-0 NULL 0 0 0 0
-0 NULL 1 1 0 1
-0 0 NULL NULL 0 NULL
-0 0 0 0 0 0
-0 0 1 1 0 1
-0 1 NULL NULL 0 NULL
-0 1 0 0 0 0
-0 1 1 1 0 1
-1 NULL NULL NULL NULL NULL
-1 NULL 0 NULL NULL NULL
-1 NULL 1 NULL NULL NULL
-1 0 NULL NULL NULL NULL
-1 0 0 0 0 0
-1 0 1 1 1 1
-1 1 NULL NULL NULL NULL
-1 1 0 1 1 1
-1 1 1 0 0 0
-select count(*) from t1_30237_bool
-where ((A AND B) XOR C) != (A AND B XOR C);
-count(*)
-0
-Testing that XOR has precedence over OR
-select A, B, C, (A XOR B) OR C, A XOR (B OR C), A XOR B OR C
-from t1_30237_bool order by A, B, C;
-A B C (A XOR B) OR C A XOR (B OR C) A XOR B OR C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 NULL NULL NULL
-NULL NULL 1 1 NULL 1
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 NULL NULL NULL
-NULL 0 1 1 NULL 1
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 NULL NULL NULL
-NULL 1 1 1 NULL 1
-0 NULL NULL NULL NULL NULL
-0 NULL 0 NULL NULL NULL
-0 NULL 1 1 1 1
-0 0 NULL NULL NULL NULL
-0 0 0 0 0 0
-0 0 1 1 1 1
-0 1 NULL 1 1 1
-0 1 0 1 1 1
-0 1 1 1 1 1
-1 NULL NULL NULL NULL NULL
-1 NULL 0 NULL NULL NULL
-1 NULL 1 1 0 1
-1 0 NULL 1 NULL 1
-1 0 0 1 1 1
-1 0 1 1 0 1
-1 1 NULL NULL 0 NULL
-1 1 0 0 0 0
-1 1 1 1 0 1
-select count(*) from t1_30237_bool
-where ((A XOR B) OR C) != (A XOR B OR C);
-count(*)
-0
-select A, B, C, (A OR B) XOR C, A OR (B XOR C), A OR B XOR C
-from t1_30237_bool order by A, B, C;
-A B C (A OR B) XOR C A OR (B XOR C) A OR B XOR C
-NULL NULL NULL NULL NULL NULL
-NULL NULL 0 NULL NULL NULL
-NULL NULL 1 NULL NULL NULL
-NULL 0 NULL NULL NULL NULL
-NULL 0 0 NULL NULL NULL
-NULL 0 1 NULL 1 1
-NULL 1 NULL NULL NULL NULL
-NULL 1 0 1 1 1
-NULL 1 1 0 NULL NULL
-0 NULL NULL NULL NULL NULL
-0 NULL 0 NULL NULL NULL
-0 NULL 1 NULL NULL NULL
-0 0 NULL NULL NULL NULL
-0 0 0 0 0 0
-0 0 1 1 1 1
-0 1 NULL NULL NULL NULL
-0 1 0 1 1 1
-0 1 1 0 0 0
-1 NULL NULL NULL 1 1
-1 NULL 0 1 1 1
-1 NULL 1 0 1 1
-1 0 NULL NULL 1 1
-1 0 0 1 1 1
-1 0 1 0 1 1
-1 1 NULL NULL 1 1
-1 1 0 1 1 1
-1 1 1 0 1 1
-select count(*) from t1_30237_bool
-where (A OR (B XOR C)) != (A OR B XOR C);
-count(*)
-0
-drop table t1_30237_bool;
-Testing that NOT has precedence over OR
-select (NOT FALSE) OR TRUE, NOT (FALSE OR TRUE), NOT FALSE OR TRUE;
-(NOT FALSE) OR TRUE NOT (FALSE OR TRUE) NOT FALSE OR TRUE
-1 0 1
-Testing that NOT has precedence over XOR
-select (NOT FALSE) XOR FALSE, NOT (FALSE XOR FALSE), NOT FALSE XOR FALSE;
-(NOT FALSE) XOR FALSE NOT (FALSE XOR FALSE) NOT FALSE XOR FALSE
-1 1 1
-Testing that NOT has precedence over AND
-select (NOT FALSE) AND FALSE, NOT (FALSE AND FALSE), NOT FALSE AND FALSE;
-(NOT FALSE) AND FALSE NOT (FALSE AND FALSE) NOT FALSE AND FALSE
-0 1 0
-Testing that NOT is associative
-select NOT NOT TRUE, NOT NOT NOT FALSE;
-NOT NOT TRUE NOT NOT NOT FALSE
-1 1
-Testing that IS has precedence over NOT
-select (NOT NULL) IS TRUE, NOT (NULL IS TRUE), NOT NULL IS TRUE;
-(NOT NULL) IS TRUE NOT (NULL IS TRUE) NOT NULL IS TRUE
-0 1 1
-select (NOT NULL) IS NOT TRUE, NOT (NULL IS NOT TRUE), NOT NULL IS NOT TRUE;
-(NOT NULL) IS NOT TRUE NOT (NULL IS NOT TRUE) NOT NULL IS NOT TRUE
-1 0 0
-select (NOT NULL) IS FALSE, NOT (NULL IS FALSE), NOT NULL IS FALSE;
-(NOT NULL) IS FALSE NOT (NULL IS FALSE) NOT NULL IS FALSE
-0 1 1
-select (NOT NULL) IS NOT FALSE, NOT (NULL IS NOT FALSE), NOT NULL IS NOT FALSE;
-(NOT NULL) IS NOT FALSE NOT (NULL IS NOT FALSE) NOT NULL IS NOT FALSE
-1 0 0
-select (NOT TRUE) IS UNKNOWN, NOT (TRUE IS UNKNOWN), NOT TRUE IS UNKNOWN;
-(NOT TRUE) IS UNKNOWN NOT (TRUE IS UNKNOWN) NOT TRUE IS UNKNOWN
-0 1 1
-select (NOT TRUE) IS NOT UNKNOWN, NOT (TRUE IS NOT UNKNOWN), NOT TRUE IS NOT UNKNOWN;
-(NOT TRUE) IS NOT UNKNOWN NOT (TRUE IS NOT UNKNOWN) NOT TRUE IS NOT UNKNOWN
-1 0 0
-select (NOT TRUE) IS NULL, NOT (TRUE IS NULL), NOT TRUE IS NULL;
-(NOT TRUE) IS NULL NOT (TRUE IS NULL) NOT TRUE IS NULL
-0 1 1
-select (NOT TRUE) IS NOT NULL, NOT (TRUE IS NOT NULL), NOT TRUE IS NOT NULL;
-(NOT TRUE) IS NOT NULL NOT (TRUE IS NOT NULL) NOT TRUE IS NOT NULL
-1 0 0
-Testing that IS [NOT] TRUE/FALSE/UNKNOWN predicates are not associative
-select TRUE IS TRUE IS TRUE IS TRUE;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS TRUE IS TRUE' at line 1
-select FALSE IS NOT TRUE IS NOT TRUE IS NOT TRUE;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NOT TRUE IS NOT TRUE' at line 1
-select NULL IS FALSE IS FALSE IS FALSE;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS FALSE IS FALSE' at line 1
-select TRUE IS NOT FALSE IS NOT FALSE IS NOT FALSE;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NOT FALSE IS NOT FALSE' at line 1
-select FALSE IS UNKNOWN IS UNKNOWN IS UNKNOWN;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS UNKNOWN IS UNKNOWN' at line 1
-select TRUE IS NOT UNKNOWN IS NOT UNKNOWN IS NOT UNKNOWN;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NOT UNKNOWN IS NOT UNKNOWN' at line 1
-Testing that IS [NOT] NULL predicates are associative
-select FALSE IS NULL IS NULL IS NULL;
-FALSE IS NULL IS NULL IS NULL
-0
-select TRUE IS NOT NULL IS NOT NULL IS NOT NULL;
-TRUE IS NOT NULL IS NOT NULL IS NOT NULL
-1
-Testing that comparison operators are left associative
-select 1 <=> 2 <=> 2, (1 <=> 2) <=> 2, 1 <=> (2 <=> 2);
-1 <=> 2 <=> 2 (1 <=> 2) <=> 2 1 <=> (2 <=> 2)
-0 0 1
-select 1 = 2 = 2, (1 = 2) = 2, 1 = (2 = 2);
-1 = 2 = 2 (1 = 2) = 2 1 = (2 = 2)
-0 0 1
-select 1 != 2 != 3, (1 != 2) != 3, 1 != (2 != 3);
-1 != 2 != 3 (1 != 2) != 3 1 != (2 != 3)
-1 1 0
-select 1 <> 2 <> 3, (1 <> 2) <> 3, 1 <> (2 <> 3);
-1 <> 2 <> 3 (1 <> 2) <> 3 1 <> (2 <> 3)
-1 1 0
-select 1 < 2 < 3, (1 < 2) < 3, 1 < (2 < 3);
-1 < 2 < 3 (1 < 2) < 3 1 < (2 < 3)
-1 1 0
-select 3 <= 2 <= 1, (3 <= 2) <= 1, 3 <= (2 <= 1);
-3 <= 2 <= 1 (3 <= 2) <= 1 3 <= (2 <= 1)
-1 1 0
-select 1 > 2 > 3, (1 > 2) > 3, 1 > (2 > 3);
-1 > 2 > 3 (1 > 2) > 3 1 > (2 > 3)
-0 0 1
-select 1 >= 2 >= 3, (1 >= 2) >= 3, 1 >= (2 >= 3);
-1 >= 2 >= 3 (1 >= 2) >= 3 1 >= (2 >= 3)
-0 0 1
-Testing that | is associative
-select 0xF0 | 0x0F | 0x55, (0xF0 | 0x0F) | 0x55, 0xF0 | (0x0F | 0x55);
-0xF0 | 0x0F | 0x55 (0xF0 | 0x0F) | 0x55 0xF0 | (0x0F | 0x55)
-255 255 255
-Testing that & is associative
-select 0xF5 & 0x5F & 0x55, (0xF5 & 0x5F) & 0x55, 0xF5 & (0x5F & 0x55);
-0xF5 & 0x5F & 0x55 (0xF5 & 0x5F) & 0x55 0xF5 & (0x5F & 0x55)
-85 85 85
-Testing that << is left associative
-select 4 << 3 << 2, (4 << 3) << 2, 4 << (3 << 2);
-4 << 3 << 2 (4 << 3) << 2 4 << (3 << 2)
-128 128 16384
-Testing that >> is left associative
-select 256 >> 3 >> 2, (256 >> 3) >> 2, 256 >> (3 >> 2);
-256 >> 3 >> 2 (256 >> 3) >> 2 256 >> (3 >> 2)
-8 8 256
-Testing that & has precedence over |
-select 0xF0 & 0x0F | 0x55, (0xF0 & 0x0F) | 0x55, 0xF0 & (0x0F | 0x55);
-0xF0 & 0x0F | 0x55 (0xF0 & 0x0F) | 0x55 0xF0 & (0x0F | 0x55)
-85 85 80
-select 0x55 | 0xF0 & 0x0F, (0x55 | 0xF0) & 0x0F, 0x55 | (0xF0 & 0x0F);
-0x55 | 0xF0 & 0x0F (0x55 | 0xF0) & 0x0F 0x55 | (0xF0 & 0x0F)
-85 5 85
-Testing that << has precedence over |
-select 0x0F << 4 | 0x0F, (0x0F << 4) | 0x0F, 0x0F << (4 | 0x0F);
-0x0F << 4 | 0x0F (0x0F << 4) | 0x0F 0x0F << (4 | 0x0F)
-255 255 491520
-select 0x0F | 0x0F << 4, (0x0F | 0x0F) << 4, 0x0F | (0x0F << 4);
-0x0F | 0x0F << 4 (0x0F | 0x0F) << 4 0x0F | (0x0F << 4)
-255 240 255
-Testing that >> has precedence over |
-select 0xF0 >> 4 | 0xFF, (0xF0 >> 4) | 0xFF, 0xF0 >> (4 | 0xFF);
-0xF0 >> 4 | 0xFF (0xF0 >> 4) | 0xFF 0xF0 >> (4 | 0xFF)
-255 255 0
-select 0xFF | 0xF0 >> 4, (0xFF | 0xF0) >> 4, 0xFF | (0xF0 >> 4);
-0xFF | 0xF0 >> 4 (0xFF | 0xF0) >> 4 0xFF | (0xF0 >> 4)
-255 15 255
-Testing that << has precedence over &
-select 0x0F << 4 & 0xF0, (0x0F << 4) & 0xF0, 0x0F << (4 & 0xF0);
-0x0F << 4 & 0xF0 (0x0F << 4) & 0xF0 0x0F << (4 & 0xF0)
-240 240 15
-select 0xF0 & 0x0F << 4, (0xF0 & 0x0F) << 4, 0xF0 & (0x0F << 4);
-0xF0 & 0x0F << 4 (0xF0 & 0x0F) << 4 0xF0 & (0x0F << 4)
-240 0 240
-Testing that >> has precedence over &
-select 0xF0 >> 4 & 0x55, (0xF0 >> 4) & 0x55, 0xF0 >> (4 & 0x55);
-0xF0 >> 4 & 0x55 (0xF0 >> 4) & 0x55 0xF0 >> (4 & 0x55)
-5 5 15
-select 0x0F & 0xF0 >> 4, (0x0F & 0xF0) >> 4, 0x0F & (0xF0 >> 4);
-0x0F & 0xF0 >> 4 (0x0F & 0xF0) >> 4 0x0F & (0xF0 >> 4)
-15 0 15
-Testing that >> and << have the same precedence
-select 0xFF >> 4 << 2, (0xFF >> 4) << 2, 0xFF >> (4 << 2);
-0xFF >> 4 << 2 (0xFF >> 4) << 2 0xFF >> (4 << 2)
-60 60 0
-select 0x0F << 4 >> 2, (0x0F << 4) >> 2, 0x0F << (4 >> 2);
-0x0F << 4 >> 2 (0x0F << 4) >> 2 0x0F << (4 >> 2)
-60 60 30
-Testing that binary + is associative
-select 1 + 2 + 3, (1 + 2) + 3, 1 + (2 + 3);
-1 + 2 + 3 (1 + 2) + 3 1 + (2 + 3)
-6 6 6
-Testing that binary - is left associative
-select 1 - 2 - 3, (1 - 2) - 3, 1 - (2 - 3);
-1 - 2 - 3 (1 - 2) - 3 1 - (2 - 3)
--4 -4 2
-Testing that binary + and binary - have the same precedence
-select 1 + 2 - 3, (1 + 2) - 3, 1 + (2 - 3);
-1 + 2 - 3 (1 + 2) - 3 1 + (2 - 3)
-0 0 0
-select 1 - 2 + 3, (1 - 2) + 3, 1 - (2 + 3);
-1 - 2 + 3 (1 - 2) + 3 1 - (2 + 3)
-2 2 -4
-Testing that binary + has precedence over |
-select 0xF0 + 0x0F | 0x55, (0xF0 + 0x0F) | 0x55, 0xF0 + (0x0F | 0x55);
-0xF0 + 0x0F | 0x55 (0xF0 + 0x0F) | 0x55 0xF0 + (0x0F | 0x55)
-255 255 335
-select 0x55 | 0xF0 + 0x0F, (0x55 | 0xF0) + 0x0F, 0x55 | (0xF0 + 0x0F);
-0x55 | 0xF0 + 0x0F (0x55 | 0xF0) + 0x0F 0x55 | (0xF0 + 0x0F)
-255 260 255
-Testing that binary + has precedence over &
-select 0xF0 + 0x0F & 0x55, (0xF0 + 0x0F) & 0x55, 0xF0 + (0x0F & 0x55);
-0xF0 + 0x0F & 0x55 (0xF0 + 0x0F) & 0x55 0xF0 + (0x0F & 0x55)
-85 85 245
-select 0x55 & 0xF0 + 0x0F, (0x55 & 0xF0) + 0x0F, 0x55 & (0xF0 + 0x0F);
-0x55 & 0xF0 + 0x0F (0x55 & 0xF0) + 0x0F 0x55 & (0xF0 + 0x0F)
-85 95 85
-Testing that binary + has precedence over <<
-select 2 + 3 << 4, (2 + 3) << 4, 2 + (3 << 4);
-2 + 3 << 4 (2 + 3) << 4 2 + (3 << 4)
-80 80 50
-select 3 << 4 + 2, (3 << 4) + 2, 3 << (4 + 2);
-3 << 4 + 2 (3 << 4) + 2 3 << (4 + 2)
-192 50 192
-Testing that binary + has precedence over >>
-select 4 + 3 >> 2, (4 + 3) >> 2, 4 + (3 >> 2);
-4 + 3 >> 2 (4 + 3) >> 2 4 + (3 >> 2)
-1 1 4
-select 3 >> 2 + 1, (3 >> 2) + 1, 3 >> (2 + 1);
-3 >> 2 + 1 (3 >> 2) + 1 3 >> (2 + 1)
-0 1 0
-Testing that binary - has precedence over |
-select 0xFF - 0x0F | 0x55, (0xFF - 0x0F) | 0x55, 0xFF - (0x0F | 0x55);
-0xFF - 0x0F | 0x55 (0xFF - 0x0F) | 0x55 0xFF - (0x0F | 0x55)
-245 245 160
-select 0x55 | 0xFF - 0xF0, (0x55 | 0xFF) - 0xF0, 0x55 | (0xFF - 0xF0);
-0x55 | 0xFF - 0xF0 (0x55 | 0xFF) - 0xF0 0x55 | (0xFF - 0xF0)
-95 15 95
-Testing that binary - has precedence over &
-select 0xFF - 0xF0 & 0x55, (0xFF - 0xF0) & 0x55, 0xFF - (0xF0 & 0x55);
-0xFF - 0xF0 & 0x55 (0xFF - 0xF0) & 0x55 0xFF - (0xF0 & 0x55)
-5 5 175
-select 0x55 & 0xFF - 0xF0, (0x55 & 0xFF) - 0xF0, 0x55 & (0xFF - 0xF0);
-0x55 & 0xFF - 0xF0 (0x55 & 0xFF) - 0xF0 0x55 & (0xFF - 0xF0)
-5 -155 5
-Testing that binary - has precedence over <<
-select 16 - 3 << 2, (16 - 3) << 2, 16 - (3 << 2);
-16 - 3 << 2 (16 - 3) << 2 16 - (3 << 2)
-52 52 4
-select 4 << 3 - 2, (4 << 3) - 2, 4 << (3 - 2);
-4 << 3 - 2 (4 << 3) - 2 4 << (3 - 2)
-8 30 8
-Testing that binary - has precedence over >>
-select 16 - 3 >> 2, (16 - 3) >> 2, 16 - (3 >> 2);
-16 - 3 >> 2 (16 - 3) >> 2 16 - (3 >> 2)
-3 3 16
-select 16 >> 3 - 2, (16 >> 3) - 2, 16 >> (3 - 2);
-16 >> 3 - 2 (16 >> 3) - 2 16 >> (3 - 2)
-8 0 8
-Testing that * is associative
-select 2 * 3 * 4, (2 * 3) * 4, 2 * (3 * 4);
-2 * 3 * 4 (2 * 3) * 4 2 * (3 * 4)
-24 24 24
-Testing that * has precedence over |
-select 2 * 0x40 | 0x0F, (2 * 0x40) | 0x0F, 2 * (0x40 | 0x0F);
-2 * 0x40 | 0x0F (2 * 0x40) | 0x0F 2 * (0x40 | 0x0F)
-143 143 158
-select 0x0F | 2 * 0x40, (0x0F | 2) * 0x40, 0x0F | (2 * 0x40);
-0x0F | 2 * 0x40 (0x0F | 2) * 0x40 0x0F | (2 * 0x40)
-143 960 143
-Testing that * has precedence over &
-select 2 * 0x40 & 0x55, (2 * 0x40) & 0x55, 2 * (0x40 & 0x55);
-2 * 0x40 & 0x55 (2 * 0x40) & 0x55 2 * (0x40 & 0x55)
-0 0 128
-select 0xF0 & 2 * 0x40, (0xF0 & 2) * 0x40, 0xF0 & (2 * 0x40);
-0xF0 & 2 * 0x40 (0xF0 & 2) * 0x40 0xF0 & (2 * 0x40)
-128 0 128
-Testing that * has precedence over <<
-select 5 * 3 << 4, (5 * 3) << 4, 5 * (3 << 4);
-5 * 3 << 4 (5 * 3) << 4 5 * (3 << 4)
-240 240 240
-select 2 << 3 * 4, (2 << 3) * 4, 2 << (3 * 4);
-2 << 3 * 4 (2 << 3) * 4 2 << (3 * 4)
-8192 64 8192
-Testing that * has precedence over >>
-select 3 * 4 >> 2, (3 * 4) >> 2, 3 * (4 >> 2);
-3 * 4 >> 2 (3 * 4) >> 2 3 * (4 >> 2)
-3 3 3
-select 4 >> 2 * 3, (4 >> 2) * 3, 4 >> (2 * 3);
-4 >> 2 * 3 (4 >> 2) * 3 4 >> (2 * 3)
-0 3 0
-Testing that * has precedence over binary +
-select 2 * 3 + 4, (2 * 3) + 4, 2 * (3 + 4);
-2 * 3 + 4 (2 * 3) + 4 2 * (3 + 4)
-10 10 14
-select 2 + 3 * 4, (2 + 3) * 4, 2 + (3 * 4);
-2 + 3 * 4 (2 + 3) * 4 2 + (3 * 4)
-14 20 14
-Testing that * has precedence over binary -
-select 4 * 3 - 2, (4 * 3) - 2, 4 * (3 - 2);
-4 * 3 - 2 (4 * 3) - 2 4 * (3 - 2)
-10 10 4
-select 4 - 3 * 2, (4 - 3) * 2, 4 - (3 * 2);
-4 - 3 * 2 (4 - 3) * 2 4 - (3 * 2)
--2 2 -2
-Testing that / is left associative
-select 15 / 5 / 3, (15 / 5) / 3, 15 / (5 / 3);
-15 / 5 / 3 (15 / 5) / 3 15 / (5 / 3)
-1.00000000 1.00000000 8.9998
-Testing that / has precedence over |
-select 105 / 5 | 2, (105 / 5) | 2, 105 / (5 | 2);
-105 / 5 | 2 (105 / 5) | 2 105 / (5 | 2)
-23 23 15.0000
-select 105 | 2 / 5, (105 | 2) / 5, 105 | (2 / 5);
-105 | 2 / 5 (105 | 2) / 5 105 | (2 / 5)
-105 21.4000 105
-Testing that / has precedence over &
-select 105 / 5 & 0x0F, (105 / 5) & 0x0F, 105 / (5 & 0x0F);
-105 / 5 & 0x0F (105 / 5) & 0x0F 105 / (5 & 0x0F)
-5 5 21.0000
-select 0x0F & 105 / 5, (0x0F & 105) / 5, 0x0F & (105 / 5);
-0x0F & 105 / 5 (0x0F & 105) / 5 0x0F & (105 / 5)
-5 1.8000 5
-Testing that / has precedence over <<
-select 0x80 / 4 << 2, (0x80 / 4) << 2, 0x80 / (4 << 2);
-0x80 / 4 << 2 (0x80 / 4) << 2 0x80 / (4 << 2)
-128 128 8.0000
-select 0x80 << 4 / 2, (0x80 << 4) / 2, 0x80 << (4 / 2);
-0x80 << 4 / 2 (0x80 << 4) / 2 0x80 << (4 / 2)
-512 1024.0000 512
-Testing that / has precedence over >>
-select 0x80 / 4 >> 2, (0x80 / 4) >> 2, 0x80 / (4 >> 2);
-0x80 / 4 >> 2 (0x80 / 4) >> 2 0x80 / (4 >> 2)
-8 8 128.0000
-select 0x80 >> 4 / 2, (0x80 >> 4) / 2, 0x80 >> (4 / 2);
-0x80 >> 4 / 2 (0x80 >> 4) / 2 0x80 >> (4 / 2)
-32 4.0000 32
-Testing that / has precedence over binary +
-select 0x80 / 2 + 2, (0x80 / 2) + 2, 0x80 / (2 + 2);
-0x80 / 2 + 2 (0x80 / 2) + 2 0x80 / (2 + 2)
-66.0000 66.0000 32.0000
-select 0x80 + 2 / 2, (0x80 + 2) / 2, 0x80 + (2 / 2);
-0x80 + 2 / 2 (0x80 + 2) / 2 0x80 + (2 / 2)
-129.0000 65.0000 129.0000
-Testing that / has precedence over binary -
-select 0x80 / 4 - 2, (0x80 / 4) - 2, 0x80 / (4 - 2);
-0x80 / 4 - 2 (0x80 / 4) - 2 0x80 / (4 - 2)
-30.0000 30.0000 64.0000
-select 0x80 - 4 / 2, (0x80 - 4) / 2, 0x80 - (4 / 2);
-0x80 - 4 / 2 (0x80 - 4) / 2 0x80 - (4 / 2)
-126.0000 62.0000 126.0000
-Testing that ^ is associative
-select 0xFF ^ 0xF0 ^ 0x0F, (0xFF ^ 0xF0) ^ 0x0F, 0xFF ^ (0xF0 ^ 0x0F);
-0xFF ^ 0xF0 ^ 0x0F (0xFF ^ 0xF0) ^ 0x0F 0xFF ^ (0xF0 ^ 0x0F)
-0 0 0
-select 0xFF ^ 0xF0 ^ 0x55, (0xFF ^ 0xF0) ^ 0x55, 0xFF ^ (0xF0 ^ 0x55);
-0xFF ^ 0xF0 ^ 0x55 (0xFF ^ 0xF0) ^ 0x55 0xFF ^ (0xF0 ^ 0x55)
-90 90 90
-Testing that ^ has precedence over |
-select 0xFF ^ 0xF0 | 0x0F, (0xFF ^ 0xF0) | 0x0F, 0xFF ^ (0xF0 | 0x0F);
-0xFF ^ 0xF0 | 0x0F (0xFF ^ 0xF0) | 0x0F 0xFF ^ (0xF0 | 0x0F)
-15 15 0
-select 0xF0 | 0xFF ^ 0xF0, (0xF0 | 0xFF) ^ 0xF0, 0xF0 | (0xFF ^ 0xF0);
-0xF0 | 0xFF ^ 0xF0 (0xF0 | 0xFF) ^ 0xF0 0xF0 | (0xFF ^ 0xF0)
-255 15 255
-Testing that ^ has precedence over &
-select 0xFF ^ 0xF0 & 0x0F, (0xFF ^ 0xF0) & 0x0F, 0xFF ^ (0xF0 & 0x0F);
-0xFF ^ 0xF0 & 0x0F (0xFF ^ 0xF0) & 0x0F 0xFF ^ (0xF0 & 0x0F)
-15 15 255
-select 0x0F & 0xFF ^ 0xF0, (0x0F & 0xFF) ^ 0xF0, 0x0F & (0xFF ^ 0xF0);
-0x0F & 0xFF ^ 0xF0 (0x0F & 0xFF) ^ 0xF0 0x0F & (0xFF ^ 0xF0)
-15 255 15
-Testing that ^ has precedence over <<
-select 0xFF ^ 0xF0 << 2, (0xFF ^ 0xF0) << 2, 0xFF ^ (0xF0 << 2);
-0xFF ^ 0xF0 << 2 (0xFF ^ 0xF0) << 2 0xFF ^ (0xF0 << 2)
-60 60 831
-select 0x0F << 2 ^ 0xFF, (0x0F << 2) ^ 0xFF, 0x0F << (2 ^ 0xFF);
-0x0F << 2 ^ 0xFF (0x0F << 2) ^ 0xFF 0x0F << (2 ^ 0xFF)
-0 195 0
-Testing that ^ has precedence over >>
-select 0xFF ^ 0xF0 >> 2, (0xFF ^ 0xF0) >> 2, 0xFF ^ (0xF0 >> 2);
-0xFF ^ 0xF0 >> 2 (0xFF ^ 0xF0) >> 2 0xFF ^ (0xF0 >> 2)
-3 3 195
-select 0xFF >> 2 ^ 0xF0, (0xFF >> 2) ^ 0xF0, 0xFF >> (2 ^ 0xF0);
-0xFF >> 2 ^ 0xF0 (0xFF >> 2) ^ 0xF0 0xFF >> (2 ^ 0xF0)
-0 207 0
-Testing that ^ has precedence over binary +
-select 0xFF ^ 0xF0 + 0x0F, (0xFF ^ 0xF0) + 0x0F, 0xFF ^ (0xF0 + 0x0F);
-0xFF ^ 0xF0 + 0x0F (0xFF ^ 0xF0) + 0x0F 0xFF ^ (0xF0 + 0x0F)
-30 30 0
-select 0x0F + 0xFF ^ 0xF0, (0x0F + 0xFF) ^ 0xF0, 0x0F + (0xFF ^ 0xF0);
-0x0F + 0xFF ^ 0xF0 (0x0F + 0xFF) ^ 0xF0 0x0F + (0xFF ^ 0xF0)
-30 510 30
-Testing that ^ has precedence over binary -
-select 0xFF ^ 0xF0 - 1, (0xFF ^ 0xF0) - 1, 0xFF ^ (0xF0 - 1);
-0xFF ^ 0xF0 - 1 (0xFF ^ 0xF0) - 1 0xFF ^ (0xF0 - 1)
-14 14 16
-select 0x55 - 0x0F ^ 0x55, (0x55 - 0x0F) ^ 0x55, 0x55 - (0x0F ^ 0x55);
-0x55 - 0x0F ^ 0x55 (0x55 - 0x0F) ^ 0x55 0x55 - (0x0F ^ 0x55)
--5 19 -5
-Testing that ^ has precedence over *
-select 0xFF ^ 0xF0 * 2, (0xFF ^ 0xF0) * 2, 0xFF ^ (0xF0 * 2);
-0xFF ^ 0xF0 * 2 (0xFF ^ 0xF0) * 2 0xFF ^ (0xF0 * 2)
-30 30 287
-select 2 * 0xFF ^ 0xF0, (2 * 0xFF) ^ 0xF0, 2 * (0xFF ^ 0xF0);
-2 * 0xFF ^ 0xF0 (2 * 0xFF) ^ 0xF0 2 * (0xFF ^ 0xF0)
-30 270 30
-Testing that ^ has precedence over /
-select 0xFF ^ 0xF0 / 2, (0xFF ^ 0xF0) / 2, 0xFF ^ (0xF0 / 2);
-0xFF ^ 0xF0 / 2 (0xFF ^ 0xF0) / 2 0xFF ^ (0xF0 / 2)
-7.5000 7.5000 135
-select 0xF2 / 2 ^ 0xF0, (0xF2 / 2) ^ 0xF0, 0xF2 / (2 ^ 0xF0);
-0xF2 / 2 ^ 0xF0 (0xF2 / 2) ^ 0xF0 0xF2 / (2 ^ 0xF0)
-1.0000 137 1.0000
-Testing that ^ has precedence over %
-select 0xFF ^ 0xF0 % 0x20, (0xFF ^ 0xF0) % 0x20, 0xFF ^ (0xF0 % 0x20);
-0xFF ^ 0xF0 % 0x20 (0xFF ^ 0xF0) % 0x20 0xFF ^ (0xF0 % 0x20)
-15 15 239
-select 0xFF % 0x20 ^ 0xF0, (0xFF % 0x20) ^ 0xF0, 0xFF % (0x20 ^ 0xF0);
-0xFF % 0x20 ^ 0xF0 (0xFF % 0x20) ^ 0xF0 0xFF % (0x20 ^ 0xF0)
-47 239 47
-Testing that ^ has precedence over DIV
-select 0xFF ^ 0xF0 DIV 2, (0xFF ^ 0xF0) DIV 2, 0xFF ^ (0xF0 DIV 2);
-0xFF ^ 0xF0 DIV 2 (0xFF ^ 0xF0) DIV 2 0xFF ^ (0xF0 DIV 2)
-7 7 135
-select 0xF2 DIV 2 ^ 0xF0, (0xF2 DIV 2) ^ 0xF0, 0xF2 DIV (2 ^ 0xF0);
-0xF2 DIV 2 ^ 0xF0 (0xF2 DIV 2) ^ 0xF0 0xF2 DIV (2 ^ 0xF0)
-1 137 1
-Testing that ^ has precedence over MOD
-select 0xFF ^ 0xF0 MOD 0x20, (0xFF ^ 0xF0) MOD 0x20, 0xFF ^ (0xF0 MOD 0x20);
-0xFF ^ 0xF0 MOD 0x20 (0xFF ^ 0xF0) MOD 0x20 0xFF ^ (0xF0 MOD 0x20)
-15 15 239
-select 0xFF MOD 0x20 ^ 0xF0, (0xFF MOD 0x20) ^ 0xF0, 0xFF MOD (0x20 ^ 0xF0);
-0xFF MOD 0x20 ^ 0xF0 (0xFF MOD 0x20) ^ 0xF0 0xFF MOD (0x20 ^ 0xF0)
-47 239 47
diff --git a/mysql-test/main/parser_precedence.test b/mysql-test/main/parser_precedence.test
deleted file mode 100644
index 7b69bc9c6da..00000000000
--- a/mysql-test/main/parser_precedence.test
+++ /dev/null
@@ -1,335 +0,0 @@
-
---disable_warnings
-drop table if exists t1_30237_bool;
---enable_warnings
-
-set sql_mode=NO_UNSIGNED_SUBTRACTION;
-
-create table t1_30237_bool(A boolean, B boolean, C boolean);
-
-insert into t1_30237_bool values
-(FALSE, FALSE, FALSE),
-(FALSE, FALSE, NULL),
-(FALSE, FALSE, TRUE),
-(FALSE, NULL, FALSE),
-(FALSE, NULL, NULL),
-(FALSE, NULL, TRUE),
-(FALSE, TRUE, FALSE),
-(FALSE, TRUE, NULL),
-(FALSE, TRUE, TRUE),
-(NULL, FALSE, FALSE),
-(NULL, FALSE, NULL),
-(NULL, FALSE, TRUE),
-(NULL, NULL, FALSE),
-(NULL, NULL, NULL),
-(NULL, NULL, TRUE),
-(NULL, TRUE, FALSE),
-(NULL, TRUE, NULL),
-(NULL, TRUE, TRUE),
-(TRUE, FALSE, FALSE),
-(TRUE, FALSE, NULL),
-(TRUE, FALSE, TRUE),
-(TRUE, NULL, FALSE),
-(TRUE, NULL, NULL),
-(TRUE, NULL, TRUE),
-(TRUE, TRUE, FALSE),
-(TRUE, TRUE, NULL),
-(TRUE, TRUE, TRUE) ;
-
---echo Testing OR, XOR, AND
-select A, B, A OR B, A XOR B, A AND B
- from t1_30237_bool where C is null order by A, B;
-
---echo Testing that OR is associative
-select A, B, C, (A OR B) OR C, A OR (B OR C), A OR B OR C
- from t1_30237_bool order by A, B, C;
-
-select count(*) from t1_30237_bool
- where ((A OR B) OR C) != (A OR (B OR C));
-
---echo Testing that XOR is associative
-select A, B, C, (A XOR B) XOR C, A XOR (B XOR C), A XOR B XOR C
- from t1_30237_bool order by A, B, C;
-
-select count(*) from t1_30237_bool
- where ((A XOR B) XOR C) != (A XOR (B XOR C));
-
---echo Testing that AND is associative
-select A, B, C, (A AND B) AND C, A AND (B AND C), A AND B AND C
- from t1_30237_bool order by A, B, C;
-
-select count(*) from t1_30237_bool
- where ((A AND B) AND C) != (A AND (B AND C));
-
---echo Testing that AND has precedence over OR
-select A, B, C, (A OR B) AND C, A OR (B AND C), A OR B AND C
- from t1_30237_bool order by A, B, C;
-select count(*) from t1_30237_bool
- where (A OR (B AND C)) != (A OR B AND C);
-select A, B, C, (A AND B) OR C, A AND (B OR C), A AND B OR C
- from t1_30237_bool order by A, B, C;
-select count(*) from t1_30237_bool
- where ((A AND B) OR C) != (A AND B OR C);
-
---echo Testing that AND has precedence over XOR
-select A, B, C, (A XOR B) AND C, A XOR (B AND C), A XOR B AND C
- from t1_30237_bool order by A, B, C;
-select count(*) from t1_30237_bool
- where (A XOR (B AND C)) != (A XOR B AND C);
-select A, B, C, (A AND B) XOR C, A AND (B XOR C), A AND B XOR C
- from t1_30237_bool order by A, B, C;
-select count(*) from t1_30237_bool
- where ((A AND B) XOR C) != (A AND B XOR C);
-
---echo Testing that XOR has precedence over OR
-select A, B, C, (A XOR B) OR C, A XOR (B OR C), A XOR B OR C
- from t1_30237_bool order by A, B, C;
-select count(*) from t1_30237_bool
- where ((A XOR B) OR C) != (A XOR B OR C);
-select A, B, C, (A OR B) XOR C, A OR (B XOR C), A OR B XOR C
- from t1_30237_bool order by A, B, C;
-select count(*) from t1_30237_bool
- where (A OR (B XOR C)) != (A OR B XOR C);
-
-drop table t1_30237_bool;
-
---echo Testing that NOT has precedence over OR
-select (NOT FALSE) OR TRUE, NOT (FALSE OR TRUE), NOT FALSE OR TRUE;
-
---echo Testing that NOT has precedence over XOR
-select (NOT FALSE) XOR FALSE, NOT (FALSE XOR FALSE), NOT FALSE XOR FALSE;
-
---echo Testing that NOT has precedence over AND
-select (NOT FALSE) AND FALSE, NOT (FALSE AND FALSE), NOT FALSE AND FALSE;
-
---echo Testing that NOT is associative
-select NOT NOT TRUE, NOT NOT NOT FALSE;
-
---echo Testing that IS has precedence over NOT
-select (NOT NULL) IS TRUE, NOT (NULL IS TRUE), NOT NULL IS TRUE;
-select (NOT NULL) IS NOT TRUE, NOT (NULL IS NOT TRUE), NOT NULL IS NOT TRUE;
-select (NOT NULL) IS FALSE, NOT (NULL IS FALSE), NOT NULL IS FALSE;
-select (NOT NULL) IS NOT FALSE, NOT (NULL IS NOT FALSE), NOT NULL IS NOT FALSE;
-select (NOT TRUE) IS UNKNOWN, NOT (TRUE IS UNKNOWN), NOT TRUE IS UNKNOWN;
-select (NOT TRUE) IS NOT UNKNOWN, NOT (TRUE IS NOT UNKNOWN), NOT TRUE IS NOT UNKNOWN;
-select (NOT TRUE) IS NULL, NOT (TRUE IS NULL), NOT TRUE IS NULL;
-select (NOT TRUE) IS NOT NULL, NOT (TRUE IS NOT NULL), NOT TRUE IS NOT NULL;
-
---echo Testing that IS [NOT] TRUE/FALSE/UNKNOWN predicates are not associative
-# Documenting existing behavior in 5.0.48
--- error ER_PARSE_ERROR
-select TRUE IS TRUE IS TRUE IS TRUE;
--- error ER_PARSE_ERROR
-select FALSE IS NOT TRUE IS NOT TRUE IS NOT TRUE;
--- error ER_PARSE_ERROR
-select NULL IS FALSE IS FALSE IS FALSE;
--- error ER_PARSE_ERROR
-select TRUE IS NOT FALSE IS NOT FALSE IS NOT FALSE;
--- error ER_PARSE_ERROR
-select FALSE IS UNKNOWN IS UNKNOWN IS UNKNOWN;
--- error ER_PARSE_ERROR
-select TRUE IS NOT UNKNOWN IS NOT UNKNOWN IS NOT UNKNOWN;
-
---echo Testing that IS [NOT] NULL predicates are associative
-# Documenting existing behavior in 5.0.48
-select FALSE IS NULL IS NULL IS NULL;
-select TRUE IS NOT NULL IS NOT NULL IS NOT NULL;
-
---echo Testing that comparison operators are left associative
-select 1 <=> 2 <=> 2, (1 <=> 2) <=> 2, 1 <=> (2 <=> 2);
-select 1 = 2 = 2, (1 = 2) = 2, 1 = (2 = 2);
-select 1 != 2 != 3, (1 != 2) != 3, 1 != (2 != 3);
-select 1 <> 2 <> 3, (1 <> 2) <> 3, 1 <> (2 <> 3);
-select 1 < 2 < 3, (1 < 2) < 3, 1 < (2 < 3);
-select 3 <= 2 <= 1, (3 <= 2) <= 1, 3 <= (2 <= 1);
-select 1 > 2 > 3, (1 > 2) > 3, 1 > (2 > 3);
-select 1 >= 2 >= 3, (1 >= 2) >= 3, 1 >= (2 >= 3);
-
--- echo Testing that | is associative
-select 0xF0 | 0x0F | 0x55, (0xF0 | 0x0F) | 0x55, 0xF0 | (0x0F | 0x55);
-
--- echo Testing that & is associative
-select 0xF5 & 0x5F & 0x55, (0xF5 & 0x5F) & 0x55, 0xF5 & (0x5F & 0x55);
-
--- echo Testing that << is left associative
-select 4 << 3 << 2, (4 << 3) << 2, 4 << (3 << 2);
-
--- echo Testing that >> is left associative
-select 256 >> 3 >> 2, (256 >> 3) >> 2, 256 >> (3 >> 2);
-
---echo Testing that & has precedence over |
-select 0xF0 & 0x0F | 0x55, (0xF0 & 0x0F) | 0x55, 0xF0 & (0x0F | 0x55);
-select 0x55 | 0xF0 & 0x0F, (0x55 | 0xF0) & 0x0F, 0x55 | (0xF0 & 0x0F);
-
---echo Testing that << has precedence over |
-select 0x0F << 4 | 0x0F, (0x0F << 4) | 0x0F, 0x0F << (4 | 0x0F);
-select 0x0F | 0x0F << 4, (0x0F | 0x0F) << 4, 0x0F | (0x0F << 4);
-
---echo Testing that >> has precedence over |
-select 0xF0 >> 4 | 0xFF, (0xF0 >> 4) | 0xFF, 0xF0 >> (4 | 0xFF);
-select 0xFF | 0xF0 >> 4, (0xFF | 0xF0) >> 4, 0xFF | (0xF0 >> 4);
-
---echo Testing that << has precedence over &
-select 0x0F << 4 & 0xF0, (0x0F << 4) & 0xF0, 0x0F << (4 & 0xF0);
-select 0xF0 & 0x0F << 4, (0xF0 & 0x0F) << 4, 0xF0 & (0x0F << 4);
-
---echo Testing that >> has precedence over &
-select 0xF0 >> 4 & 0x55, (0xF0 >> 4) & 0x55, 0xF0 >> (4 & 0x55);
-select 0x0F & 0xF0 >> 4, (0x0F & 0xF0) >> 4, 0x0F & (0xF0 >> 4);
-
---echo Testing that >> and << have the same precedence
-select 0xFF >> 4 << 2, (0xFF >> 4) << 2, 0xFF >> (4 << 2);
-select 0x0F << 4 >> 2, (0x0F << 4) >> 2, 0x0F << (4 >> 2);
-
---echo Testing that binary + is associative
-select 1 + 2 + 3, (1 + 2) + 3, 1 + (2 + 3);
-
---echo Testing that binary - is left associative
-select 1 - 2 - 3, (1 - 2) - 3, 1 - (2 - 3);
-
---echo Testing that binary + and binary - have the same precedence
-# evaluated left to right
-select 1 + 2 - 3, (1 + 2) - 3, 1 + (2 - 3);
-select 1 - 2 + 3, (1 - 2) + 3, 1 - (2 + 3);
-
---echo Testing that binary + has precedence over |
-select 0xF0 + 0x0F | 0x55, (0xF0 + 0x0F) | 0x55, 0xF0 + (0x0F | 0x55);
-select 0x55 | 0xF0 + 0x0F, (0x55 | 0xF0) + 0x0F, 0x55 | (0xF0 + 0x0F);
-
---echo Testing that binary + has precedence over &
-select 0xF0 + 0x0F & 0x55, (0xF0 + 0x0F) & 0x55, 0xF0 + (0x0F & 0x55);
-select 0x55 & 0xF0 + 0x0F, (0x55 & 0xF0) + 0x0F, 0x55 & (0xF0 + 0x0F);
-
---echo Testing that binary + has precedence over <<
-select 2 + 3 << 4, (2 + 3) << 4, 2 + (3 << 4);
-select 3 << 4 + 2, (3 << 4) + 2, 3 << (4 + 2);
-
---echo Testing that binary + has precedence over >>
-select 4 + 3 >> 2, (4 + 3) >> 2, 4 + (3 >> 2);
-select 3 >> 2 + 1, (3 >> 2) + 1, 3 >> (2 + 1);
-
---echo Testing that binary - has precedence over |
-select 0xFF - 0x0F | 0x55, (0xFF - 0x0F) | 0x55, 0xFF - (0x0F | 0x55);
-select 0x55 | 0xFF - 0xF0, (0x55 | 0xFF) - 0xF0, 0x55 | (0xFF - 0xF0);
-
---echo Testing that binary - has precedence over &
-select 0xFF - 0xF0 & 0x55, (0xFF - 0xF0) & 0x55, 0xFF - (0xF0 & 0x55);
-select 0x55 & 0xFF - 0xF0, (0x55 & 0xFF) - 0xF0, 0x55 & (0xFF - 0xF0);
-
---echo Testing that binary - has precedence over <<
-select 16 - 3 << 2, (16 - 3) << 2, 16 - (3 << 2);
-select 4 << 3 - 2, (4 << 3) - 2, 4 << (3 - 2);
-
---echo Testing that binary - has precedence over >>
-select 16 - 3 >> 2, (16 - 3) >> 2, 16 - (3 >> 2);
-select 16 >> 3 - 2, (16 >> 3) - 2, 16 >> (3 - 2);
-
---echo Testing that * is associative
-select 2 * 3 * 4, (2 * 3) * 4, 2 * (3 * 4);
-
---echo Testing that * has precedence over |
-select 2 * 0x40 | 0x0F, (2 * 0x40) | 0x0F, 2 * (0x40 | 0x0F);
-select 0x0F | 2 * 0x40, (0x0F | 2) * 0x40, 0x0F | (2 * 0x40);
-
---echo Testing that * has precedence over &
-select 2 * 0x40 & 0x55, (2 * 0x40) & 0x55, 2 * (0x40 & 0x55);
-select 0xF0 & 2 * 0x40, (0xF0 & 2) * 0x40, 0xF0 & (2 * 0x40);
-
---echo Testing that * has precedence over <<
-# Actually, can't prove it for the first case,
-# since << is a multiplication by a power of 2,
-# and * is associative
-select 5 * 3 << 4, (5 * 3) << 4, 5 * (3 << 4);
-select 2 << 3 * 4, (2 << 3) * 4, 2 << (3 * 4);
-
---echo Testing that * has precedence over >>
-# >> is a multiplication by a (negative) power of 2,
-# see above.
-select 3 * 4 >> 2, (3 * 4) >> 2, 3 * (4 >> 2);
-select 4 >> 2 * 3, (4 >> 2) * 3, 4 >> (2 * 3);
-
---echo Testing that * has precedence over binary +
-select 2 * 3 + 4, (2 * 3) + 4, 2 * (3 + 4);
-select 2 + 3 * 4, (2 + 3) * 4, 2 + (3 * 4);
-
---echo Testing that * has precedence over binary -
-select 4 * 3 - 2, (4 * 3) - 2, 4 * (3 - 2);
-select 4 - 3 * 2, (4 - 3) * 2, 4 - (3 * 2);
-
---echo Testing that / is left associative
-select 15 / 5 / 3, (15 / 5) / 3, 15 / (5 / 3);
-
---echo Testing that / has precedence over |
-select 105 / 5 | 2, (105 / 5) | 2, 105 / (5 | 2);
-select 105 | 2 / 5, (105 | 2) / 5, 105 | (2 / 5);
-
---echo Testing that / has precedence over &
-select 105 / 5 & 0x0F, (105 / 5) & 0x0F, 105 / (5 & 0x0F);
-select 0x0F & 105 / 5, (0x0F & 105) / 5, 0x0F & (105 / 5);
-
---echo Testing that / has precedence over <<
-select 0x80 / 4 << 2, (0x80 / 4) << 2, 0x80 / (4 << 2);
-select 0x80 << 4 / 2, (0x80 << 4) / 2, 0x80 << (4 / 2);
-
---echo Testing that / has precedence over >>
-select 0x80 / 4 >> 2, (0x80 / 4) >> 2, 0x80 / (4 >> 2);
-select 0x80 >> 4 / 2, (0x80 >> 4) / 2, 0x80 >> (4 / 2);
-
---echo Testing that / has precedence over binary +
-select 0x80 / 2 + 2, (0x80 / 2) + 2, 0x80 / (2 + 2);
-select 0x80 + 2 / 2, (0x80 + 2) / 2, 0x80 + (2 / 2);
-
---echo Testing that / has precedence over binary -
-select 0x80 / 4 - 2, (0x80 / 4) - 2, 0x80 / (4 - 2);
-select 0x80 - 4 / 2, (0x80 - 4) / 2, 0x80 - (4 / 2);
-
-# TODO: %, DIV, MOD
-
---echo Testing that ^ is associative
-select 0xFF ^ 0xF0 ^ 0x0F, (0xFF ^ 0xF0) ^ 0x0F, 0xFF ^ (0xF0 ^ 0x0F);
-select 0xFF ^ 0xF0 ^ 0x55, (0xFF ^ 0xF0) ^ 0x55, 0xFF ^ (0xF0 ^ 0x55);
-
---echo Testing that ^ has precedence over |
-select 0xFF ^ 0xF0 | 0x0F, (0xFF ^ 0xF0) | 0x0F, 0xFF ^ (0xF0 | 0x0F);
-select 0xF0 | 0xFF ^ 0xF0, (0xF0 | 0xFF) ^ 0xF0, 0xF0 | (0xFF ^ 0xF0);
-
---echo Testing that ^ has precedence over &
-select 0xFF ^ 0xF0 & 0x0F, (0xFF ^ 0xF0) & 0x0F, 0xFF ^ (0xF0 & 0x0F);
-select 0x0F & 0xFF ^ 0xF0, (0x0F & 0xFF) ^ 0xF0, 0x0F & (0xFF ^ 0xF0);
-
---echo Testing that ^ has precedence over <<
-select 0xFF ^ 0xF0 << 2, (0xFF ^ 0xF0) << 2, 0xFF ^ (0xF0 << 2);
-select 0x0F << 2 ^ 0xFF, (0x0F << 2) ^ 0xFF, 0x0F << (2 ^ 0xFF);
-
---echo Testing that ^ has precedence over >>
-select 0xFF ^ 0xF0 >> 2, (0xFF ^ 0xF0) >> 2, 0xFF ^ (0xF0 >> 2);
-select 0xFF >> 2 ^ 0xF0, (0xFF >> 2) ^ 0xF0, 0xFF >> (2 ^ 0xF0);
-
---echo Testing that ^ has precedence over binary +
-select 0xFF ^ 0xF0 + 0x0F, (0xFF ^ 0xF0) + 0x0F, 0xFF ^ (0xF0 + 0x0F);
-select 0x0F + 0xFF ^ 0xF0, (0x0F + 0xFF) ^ 0xF0, 0x0F + (0xFF ^ 0xF0);
-
---echo Testing that ^ has precedence over binary -
-select 0xFF ^ 0xF0 - 1, (0xFF ^ 0xF0) - 1, 0xFF ^ (0xF0 - 1);
-select 0x55 - 0x0F ^ 0x55, (0x55 - 0x0F) ^ 0x55, 0x55 - (0x0F ^ 0x55);
-
---echo Testing that ^ has precedence over *
-select 0xFF ^ 0xF0 * 2, (0xFF ^ 0xF0) * 2, 0xFF ^ (0xF0 * 2);
-select 2 * 0xFF ^ 0xF0, (2 * 0xFF) ^ 0xF0, 2 * (0xFF ^ 0xF0);
-
---echo Testing that ^ has precedence over /
-select 0xFF ^ 0xF0 / 2, (0xFF ^ 0xF0) / 2, 0xFF ^ (0xF0 / 2);
-select 0xF2 / 2 ^ 0xF0, (0xF2 / 2) ^ 0xF0, 0xF2 / (2 ^ 0xF0);
-
---echo Testing that ^ has precedence over %
-select 0xFF ^ 0xF0 % 0x20, (0xFF ^ 0xF0) % 0x20, 0xFF ^ (0xF0 % 0x20);
-select 0xFF % 0x20 ^ 0xF0, (0xFF % 0x20) ^ 0xF0, 0xFF % (0x20 ^ 0xF0);
-
---echo Testing that ^ has precedence over DIV
-select 0xFF ^ 0xF0 DIV 2, (0xFF ^ 0xF0) DIV 2, 0xFF ^ (0xF0 DIV 2);
-select 0xF2 DIV 2 ^ 0xF0, (0xF2 DIV 2) ^ 0xF0, 0xF2 DIV (2 ^ 0xF0);
-
---echo Testing that ^ has precedence over MOD
-select 0xFF ^ 0xF0 MOD 0x20, (0xFF ^ 0xF0) MOD 0x20, 0xFF ^ (0xF0 MOD 0x20);
-select 0xFF MOD 0x20 ^ 0xF0, (0xFF MOD 0x20) ^ 0xF0, 0xFF MOD (0x20 ^ 0xF0);
-
diff --git a/mysql-test/main/precedence.result b/mysql-test/main/precedence.result
new file mode 100644
index 00000000000..f56f945c3fc
--- /dev/null
+++ b/mysql-test/main/precedence.result
@@ -0,0 +1,8019 @@
+create or replace view v1 as select NOT NULL IS TRUE, NOT (NULL IS TRUE), (NOT NULL) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(NULL is true) AS `NOT NULL IS TRUE`,!(NULL is true) AS `NOT (NULL IS TRUE)`,!NULL is true AS `(NOT NULL) IS TRUE`
+select NOT NULL IS TRUE, NOT (NULL IS TRUE), (NOT NULL) IS TRUE union select * from v1;
+NOT NULL IS TRUE NOT (NULL IS TRUE) (NOT NULL) IS TRUE
+1 1 0
+create or replace view v1 as select ! NULL IS TRUE, ! (NULL IS TRUE), (! NULL) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !NULL is true AS `! NULL IS TRUE`,!(NULL is true) AS `! (NULL IS TRUE)`,!NULL is true AS `(! NULL) IS TRUE`
+select ! NULL IS TRUE, ! (NULL IS TRUE), (! NULL) IS TRUE union select * from v1;
+! NULL IS TRUE ! (NULL IS TRUE) (! NULL) IS TRUE
+0 1 0
+create or replace view v1 as select charset(NOT 2 COLLATE latin1_bin), charset(NOT (2 COLLATE latin1_bin)), charset((NOT 2) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(!2 collate latin1_bin) AS `charset(NOT 2 COLLATE latin1_bin)`,charset(!2 collate latin1_bin) AS `charset(NOT (2 COLLATE latin1_bin))`,charset((!2) collate latin1_bin) AS `charset((NOT 2) COLLATE latin1_bin)`
+select charset(NOT 2 COLLATE latin1_bin), charset(NOT (2 COLLATE latin1_bin)), charset((NOT 2) COLLATE latin1_bin) union select * from v1;
+charset(NOT 2 COLLATE latin1_bin) charset(NOT (2 COLLATE latin1_bin)) charset((NOT 2) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select NOT 2 IN (0,2), NOT (2 IN (0,2)), (NOT 2) IN (0,2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 not in (0,2) AS `NOT 2 IN (0,2)`,2 not in (0,2) AS `NOT (2 IN (0,2))`,!2 in (0,2) AS `(NOT 2) IN (0,2)`
+select NOT 2 IN (0,2), NOT (2 IN (0,2)), (NOT 2) IN (0,2) union select * from v1;
+NOT 2 IN (0,2) NOT (2 IN (0,2)) (NOT 2) IN (0,2)
+0 0 1
+create or replace view v1 as select NOT 2 OR 3, NOT (2 OR 3), (NOT 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 or 3 AS `NOT 2 OR 3`,!2 and !3 AS `NOT (2 OR 3)`,!2 or 3 AS `(NOT 2) OR 3`
+select NOT 2 OR 3, NOT (2 OR 3), (NOT 2) OR 3 union select * from v1;
+NOT 2 OR 3 NOT (2 OR 3) (NOT 2) OR 3
+1 0 1
+create or replace view v1 as select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 or 3 AS `NOT 2 || 3`,!2 and !3 AS `NOT (2 || 3)`,!2 or 3 AS `(NOT 2) || 3`
+select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3 union select * from v1;
+NOT 2 || 3 NOT (2 || 3) (NOT 2) || 3
+1 0 1
+create or replace view v1 as select NOT 2 AND 0, NOT (2 AND 0), (NOT 2) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 and 0 AS `NOT 2 AND 0`,!2 or !0 AS `NOT (2 AND 0)`,!2 and 0 AS `(NOT 2) AND 0`
+select NOT 2 AND 0, NOT (2 AND 0), (NOT 2) AND 0 union select * from v1;
+NOT 2 AND 0 NOT (2 AND 0) (NOT 2) AND 0
+0 1 0
+create or replace view v1 as select NOT 2 && 0, NOT (2 && 0), (NOT 2) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 and 0 AS `NOT 2 && 0`,!2 or !0 AS `NOT (2 && 0)`,!2 and 0 AS `(NOT 2) && 0`
+select NOT 2 && 0, NOT (2 && 0), (NOT 2) && 0 union select * from v1;
+NOT 2 && 0 NOT (2 && 0) (NOT 2) && 0
+0 1 0
+create or replace view v1 as select NOT 2 = 3, NOT (2 = 3), (NOT 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 AS `NOT 2 = 3`,2 <> 3 AS `NOT (2 = 3)`,!2 = 3 AS `(NOT 2) = 3`
+select NOT 2 = 3, NOT (2 = 3), (NOT 2) = 3 union select * from v1;
+NOT 2 = 3 NOT (2 = 3) (NOT 2) = 3
+1 1 0
+create or replace view v1 as select NOT 2 <=> 3, NOT (2 <=> 3), (NOT 2) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 <=> 3) AS `NOT 2 <=> 3`,!(2 <=> 3) AS `NOT (2 <=> 3)`,!2 <=> 3 AS `(NOT 2) <=> 3`
+select NOT 2 <=> 3, NOT (2 <=> 3), (NOT 2) <=> 3 union select * from v1;
+NOT 2 <=> 3 NOT (2 <=> 3) (NOT 2) <=> 3
+1 1 0
+create or replace view v1 as select NOT 2 >= 3, NOT (2 >= 3), (NOT 2) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 AS `NOT 2 >= 3`,2 < 3 AS `NOT (2 >= 3)`,!2 >= 3 AS `(NOT 2) >= 3`
+select NOT 2 >= 3, NOT (2 >= 3), (NOT 2) >= 3 union select * from v1;
+NOT 2 >= 3 NOT (2 >= 3) (NOT 2) >= 3
+1 1 0
+create or replace view v1 as select NOT 2 <= 3, NOT (2 <= 3), (NOT 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 AS `NOT 2 <= 3`,2 > 3 AS `NOT (2 <= 3)`,!2 <= 3 AS `(NOT 2) <= 3`
+select NOT 2 <= 3, NOT (2 <= 3), (NOT 2) <= 3 union select * from v1;
+NOT 2 <= 3 NOT (2 <= 3) (NOT 2) <= 3
+0 0 1
+create or replace view v1 as select NOT 2 < 3, NOT (2 < 3), (NOT 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 AS `NOT 2 < 3`,2 >= 3 AS `NOT (2 < 3)`,!2 < 3 AS `(NOT 2) < 3`
+select NOT 2 < 3, NOT (2 < 3), (NOT 2) < 3 union select * from v1;
+NOT 2 < 3 NOT (2 < 3) (NOT 2) < 3
+0 0 1
+create or replace view v1 as select NOT 2 <> 3, NOT (2 <> 3), (NOT 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 AS `NOT 2 <> 3`,2 = 3 AS `NOT (2 <> 3)`,!2 <> 3 AS `(NOT 2) <> 3`
+select NOT 2 <> 3, NOT (2 <> 3), (NOT 2) <> 3 union select * from v1;
+NOT 2 <> 3 NOT (2 <> 3) (NOT 2) <> 3
+0 0 1
+create or replace view v1 as select NOT 2 > 3, NOT (2 > 3), (NOT 2) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 AS `NOT 2 > 3`,2 <= 3 AS `NOT (2 > 3)`,!2 > 3 AS `(NOT 2) > 3`
+select NOT 2 > 3, NOT (2 > 3), (NOT 2) > 3 union select * from v1;
+NOT 2 > 3 NOT (2 > 3) (NOT 2) > 3
+1 1 0
+create or replace view v1 as select NOT 2 != 3, NOT (2 != 3), (NOT 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 AS `NOT 2 != 3`,2 = 3 AS `NOT (2 != 3)`,!2 <> 3 AS `(NOT 2) != 3`
+select NOT 2 != 3, NOT (2 != 3), (NOT 2) != 3 union select * from v1;
+NOT 2 != 3 NOT (2 != 3) (NOT 2) != 3
+0 0 1
+create or replace view v1 as select NOT 2 LIKE 3, NOT (2 LIKE 3), (NOT 2) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 not like 3 AS `NOT 2 LIKE 3`,2 not like 3 AS `NOT (2 LIKE 3)`,!2 like 3 AS `(NOT 2) LIKE 3`
+select NOT 2 LIKE 3, NOT (2 LIKE 3), (NOT 2) LIKE 3 union select * from v1;
+NOT 2 LIKE 3 NOT (2 LIKE 3) (NOT 2) LIKE 3
+1 1 0
+create or replace view v1 as select NOT 2 REGEXP 3, NOT (2 REGEXP 3), (NOT 2) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 regexp 3) AS `NOT 2 REGEXP 3`,!(2 regexp 3) AS `NOT (2 REGEXP 3)`,!2 regexp 3 AS `(NOT 2) REGEXP 3`
+select NOT 2 REGEXP 3, NOT (2 REGEXP 3), (NOT 2) REGEXP 3 union select * from v1;
+NOT 2 REGEXP 3 NOT (2 REGEXP 3) (NOT 2) REGEXP 3
+1 1 0
+create or replace view v1 as select NOT 2 | 3, NOT (2 | 3), (NOT 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 | 3) AS `NOT 2 | 3`,!(2 | 3) AS `NOT (2 | 3)`,!2 | 3 AS `(NOT 2) | 3`
+select NOT 2 | 3, NOT (2 | 3), (NOT 2) | 3 union select * from v1;
+NOT 2 | 3 NOT (2 | 3) (NOT 2) | 3
+0 0 3
+create or replace view v1 as select NOT 0 & 2, NOT (0 & 2), (NOT 0) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(0 & 2) AS `NOT 0 & 2`,!(0 & 2) AS `NOT (0 & 2)`,!0 & 2 AS `(NOT 0) & 2`
+select NOT 0 & 2, NOT (0 & 2), (NOT 0) & 2 union select * from v1;
+NOT 0 & 2 NOT (0 & 2) (NOT 0) & 2
+1 1 0
+create or replace view v1 as select NOT 0 << 3, NOT (0 << 3), (NOT 0) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(0 << 3) AS `NOT 0 << 3`,!(0 << 3) AS `NOT (0 << 3)`,!0 << 3 AS `(NOT 0) << 3`
+select NOT 0 << 3, NOT (0 << 3), (NOT 0) << 3 union select * from v1;
+NOT 0 << 3 NOT (0 << 3) (NOT 0) << 3
+1 1 8
+create or replace view v1 as select NOT 2 >> 3, NOT (2 >> 3), (NOT 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 >> 3) AS `NOT 2 >> 3`,!(2 >> 3) AS `NOT (2 >> 3)`,!2 >> 3 AS `(NOT 2) >> 3`
+select NOT 2 >> 3, NOT (2 >> 3), (NOT 2) >> 3 union select * from v1;
+NOT 2 >> 3 NOT (2 >> 3) (NOT 2) >> 3
+1 1 0
+create or replace view v1 as select NOT '2000-01-01' +INTERVAL 1 DAY, NOT ('2000-01-01' +INTERVAL 1 DAY), (NOT '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !('2000-01-01' + interval 1 day) AS `NOT '2000-01-01' +INTERVAL 1 DAY`,!('2000-01-01' + interval 1 day) AS `NOT ('2000-01-01' +INTERVAL 1 DAY)`,!'2000-01-01' + interval 1 day AS `(NOT '2000-01-01') +INTERVAL 1 DAY`
+select NOT '2000-01-01' +INTERVAL 1 DAY, NOT ('2000-01-01' +INTERVAL 1 DAY), (NOT '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+NOT '2000-01-01' +INTERVAL 1 DAY NOT ('2000-01-01' +INTERVAL 1 DAY) (NOT '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select NOT 2 + 3, NOT (2 + 3), (NOT 2) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 + 3) AS `NOT 2 + 3`,!(2 + 3) AS `NOT (2 + 3)`,!2 + 3 AS `(NOT 2) + 3`
+select NOT 2 + 3, NOT (2 + 3), (NOT 2) + 3 union select * from v1;
+NOT 2 + 3 NOT (2 + 3) (NOT 2) + 3
+0 0 3
+create or replace view v1 as select NOT 2 - 3, NOT (2 - 3), (NOT 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 - 3) AS `NOT 2 - 3`,!(2 - 3) AS `NOT (2 - 3)`,!2 - 3 AS `(NOT 2) - 3`
+select NOT 2 - 3, NOT (2 - 3), (NOT 2) - 3 union select * from v1;
+NOT 2 - 3 NOT (2 - 3) (NOT 2) - 3
+0 0 -3
+create or replace view v1 as select NOT 0 * 3, NOT (0 * 3), (NOT 0) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(0 * 3) AS `NOT 0 * 3`,!(0 * 3) AS `NOT (0 * 3)`,!0 * 3 AS `(NOT 0) * 3`
+select NOT 0 * 3, NOT (0 * 3), (NOT 0) * 3 union select * from v1;
+NOT 0 * 3 NOT (0 * 3) (NOT 0) * 3
+1 1 3
+create or replace view v1 as select NOT 0 / 3, NOT (0 / 3), (NOT 0) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(0 / 3) AS `NOT 0 / 3`,!(0 / 3) AS `NOT (0 / 3)`,!0 / 3 AS `(NOT 0) / 3`
+select NOT 0 / 3, NOT (0 / 3), (NOT 0) / 3 union select * from v1;
+NOT 0 / 3 NOT (0 / 3) (NOT 0) / 3
+1 1 0.3333
+create or replace view v1 as select NOT 2 DIV 3, NOT (2 DIV 3), (NOT 2) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 DIV 3) AS `NOT 2 DIV 3`,!(2 DIV 3) AS `NOT (2 DIV 3)`,!2 DIV 3 AS `(NOT 2) DIV 3`
+select NOT 2 DIV 3, NOT (2 DIV 3), (NOT 2) DIV 3 union select * from v1;
+NOT 2 DIV 3 NOT (2 DIV 3) (NOT 2) DIV 3
+1 1 0
+create or replace view v1 as select NOT 6 MOD 3, NOT (6 MOD 3), (NOT 6) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(6 MOD 3) AS `NOT 6 MOD 3`,!(6 MOD 3) AS `NOT (6 MOD 3)`,!6 MOD 3 AS `(NOT 6) MOD 3`
+select NOT 6 MOD 3, NOT (6 MOD 3), (NOT 6) MOD 3 union select * from v1;
+NOT 6 MOD 3 NOT (6 MOD 3) (NOT 6) MOD 3
+1 1 0
+create or replace view v1 as select NOT 6 % 3, NOT (6 % 3), (NOT 6) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(6 MOD 3) AS `NOT 6 % 3`,!(6 MOD 3) AS `NOT (6 % 3)`,!6 MOD 3 AS `(NOT 6) % 3`
+select NOT 6 % 3, NOT (6 % 3), (NOT 6) % 3 union select * from v1;
+NOT 6 % 3 NOT (6 % 3) (NOT 6) % 3
+1 1 0
+create or replace view v1 as select NOT 2 ^ 3, NOT (2 ^ 3), (NOT 2) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 ^ 3) AS `NOT 2 ^ 3`,!(2 ^ 3) AS `NOT (2 ^ 3)`,!2 ^ 3 AS `(NOT 2) ^ 3`
+select NOT 2 ^ 3, NOT (2 ^ 3), (NOT 2) ^ 3 union select * from v1;
+NOT 2 ^ 3 NOT (2 ^ 3) (NOT 2) ^ 3
+0 0 3
+create or replace view v1 as select NOT 2 BETWEEN 3 AND 4, NOT (2 BETWEEN 3 AND 4), (NOT 2) BETWEEN 3 AND 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 not between 3 and 4 AS `NOT 2 BETWEEN 3 AND 4`,2 not between 3 and 4 AS `NOT (2 BETWEEN 3 AND 4)`,!2 between 3 and 4 AS `(NOT 2) BETWEEN 3 AND 4`
+select NOT 2 BETWEEN 3 AND 4, NOT (2 BETWEEN 3 AND 4), (NOT 2) BETWEEN 3 AND 4 union select * from v1;
+NOT 2 BETWEEN 3 AND 4 NOT (2 BETWEEN 3 AND 4) (NOT 2) BETWEEN 3 AND 4
+1 1 0
+create or replace view v1 as select - 2 IS TRUE, - (2 IS TRUE), (- 2) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 is true AS `- 2 IS TRUE`,-(2 is true) AS `- (2 IS TRUE)`,-2 is true AS `(- 2) IS TRUE`
+select - 2 IS TRUE, - (2 IS TRUE), (- 2) IS TRUE union select * from v1;
+- 2 IS TRUE - (2 IS TRUE) (- 2) IS TRUE
+1 -1 1
+create or replace view v1 as select charset(- "2" COLLATE latin1_bin), charset(- ("2" COLLATE latin1_bin)), charset((- "2") COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(-'2' collate latin1_bin) AS `charset(- "2" COLLATE latin1_bin)`,charset(-'2' collate latin1_bin) AS `charset(- ("2" COLLATE latin1_bin))`,charset((-'2') collate latin1_bin) AS `charset((- "2") COLLATE latin1_bin)`
+select charset(- "2" COLLATE latin1_bin), charset(- ("2" COLLATE latin1_bin)), charset((- "2") COLLATE latin1_bin) union select * from v1;
+charset(- "2" COLLATE latin1_bin) charset(- ("2" COLLATE latin1_bin)) charset((- "2") COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select - 2 IN (2,1), - (2 IN (2,1)), (- 2) IN (2,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 in (2,1) AS `- 2 IN (2,1)`,-(2 in (2,1)) AS `- (2 IN (2,1))`,-2 in (2,1) AS `(- 2) IN (2,1)`
+select - 2 IN (2,1), - (2 IN (2,1)), (- 2) IN (2,1) union select * from v1;
+- 2 IN (2,1) - (2 IN (2,1)) (- 2) IN (2,1)
+0 -1 0
+create or replace view v1 as select - 2 OR 3, - (2 OR 3), (- 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 or 3 AS `- 2 OR 3`,-(2 or 3) AS `- (2 OR 3)`,-2 or 3 AS `(- 2) OR 3`
+select - 2 OR 3, - (2 OR 3), (- 2) OR 3 union select * from v1;
+- 2 OR 3 - (2 OR 3) (- 2) OR 3
+1 -1 1
+create or replace view v1 as select - 2 || 3, - (2 || 3), (- 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 or 3 AS `- 2 || 3`,-(2 or 3) AS `- (2 || 3)`,-2 or 3 AS `(- 2) || 3`
+select - 2 || 3, - (2 || 3), (- 2) || 3 union select * from v1;
+- 2 || 3 - (2 || 3) (- 2) || 3
+1 -1 1
+create or replace view v1 as select - 0 XOR 3, - (0 XOR 3), (- 0) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 xor 3 AS `- 0 XOR 3`,-(0 xor 3) AS `- (0 XOR 3)`,0 xor 3 AS `(- 0) XOR 3`
+select - 0 XOR 3, - (0 XOR 3), (- 0) XOR 3 union select * from v1;
+- 0 XOR 3 - (0 XOR 3) (- 0) XOR 3
+1 -1 1
+create or replace view v1 as select - 2 AND 3, - (2 AND 3), (- 2) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 and 3 AS `- 2 AND 3`,-(2 and 3) AS `- (2 AND 3)`,-2 and 3 AS `(- 2) AND 3`
+select - 2 AND 3, - (2 AND 3), (- 2) AND 3 union select * from v1;
+- 2 AND 3 - (2 AND 3) (- 2) AND 3
+1 -1 1
+create or replace view v1 as select - 2 && 3, - (2 && 3), (- 2) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 and 3 AS `- 2 && 3`,-(2 and 3) AS `- (2 && 3)`,-2 and 3 AS `(- 2) && 3`
+select - 2 && 3, - (2 && 3), (- 2) && 3 union select * from v1;
+- 2 && 3 - (2 && 3) (- 2) && 3
+1 -1 1
+create or replace view v1 as select - 2 = 2, - (2 = 2), (- 2) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 = 2 AS `- 2 = 2`,-(2 = 2) AS `- (2 = 2)`,-2 = 2 AS `(- 2) = 2`
+select - 2 = 2, - (2 = 2), (- 2) = 2 union select * from v1;
+- 2 = 2 - (2 = 2) (- 2) = 2
+0 -1 0
+create or replace view v1 as select - 2 <=> 2, - (2 <=> 2), (- 2) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 <=> 2 AS `- 2 <=> 2`,-(2 <=> 2) AS `- (2 <=> 2)`,-2 <=> 2 AS `(- 2) <=> 2`
+select - 2 <=> 2, - (2 <=> 2), (- 2) <=> 2 union select * from v1;
+- 2 <=> 2 - (2 <=> 2) (- 2) <=> 2
+0 -1 0
+create or replace view v1 as select - 2 >= 1, - (2 >= 1), (- 2) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 >= 1 AS `- 2 >= 1`,-(2 >= 1) AS `- (2 >= 1)`,-2 >= 1 AS `(- 2) >= 1`
+select - 2 >= 1, - (2 >= 1), (- 2) >= 1 union select * from v1;
+- 2 >= 1 - (2 >= 1) (- 2) >= 1
+0 -1 0
+create or replace view v1 as select - 2 <= 3, - (2 <= 3), (- 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 <= 3 AS `- 2 <= 3`,-(2 <= 3) AS `- (2 <= 3)`,-2 <= 3 AS `(- 2) <= 3`
+select - 2 <= 3, - (2 <= 3), (- 2) <= 3 union select * from v1;
+- 2 <= 3 - (2 <= 3) (- 2) <= 3
+1 -1 1
+create or replace view v1 as select - 2 < 3, - (2 < 3), (- 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 < 3 AS `- 2 < 3`,-(2 < 3) AS `- (2 < 3)`,-2 < 3 AS `(- 2) < 3`
+select - 2 < 3, - (2 < 3), (- 2) < 3 union select * from v1;
+- 2 < 3 - (2 < 3) (- 2) < 3
+1 -1 1
+create or replace view v1 as select - 2 <> 3, - (2 <> 3), (- 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 <> 3 AS `- 2 <> 3`,-(2 <> 3) AS `- (2 <> 3)`,-2 <> 3 AS `(- 2) <> 3`
+select - 2 <> 3, - (2 <> 3), (- 2) <> 3 union select * from v1;
+- 2 <> 3 - (2 <> 3) (- 2) <> 3
+1 -1 1
+create or replace view v1 as select - 2 > 1, - (2 > 1), (- 2) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 > 1 AS `- 2 > 1`,-(2 > 1) AS `- (2 > 1)`,-2 > 1 AS `(- 2) > 1`
+select - 2 > 1, - (2 > 1), (- 2) > 1 union select * from v1;
+- 2 > 1 - (2 > 1) (- 2) > 1
+0 -1 0
+create or replace view v1 as select - 2 != 3, - (2 != 3), (- 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 <> 3 AS `- 2 != 3`,-(2 <> 3) AS `- (2 != 3)`,-2 <> 3 AS `(- 2) != 3`
+select - 2 != 3, - (2 != 3), (- 2) != 3 union select * from v1;
+- 2 != 3 - (2 != 3) (- 2) != 3
+1 -1 1
+create or replace view v1 as select - 2 LIKE 2, - (2 LIKE 2), (- 2) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 like 2 AS `- 2 LIKE 2`,-(2 like 2) AS `- (2 LIKE 2)`,-2 like 2 AS `(- 2) LIKE 2`
+select - 2 LIKE 2, - (2 LIKE 2), (- 2) LIKE 2 union select * from v1;
+- 2 LIKE 2 - (2 LIKE 2) (- 2) LIKE 2
+0 -1 0
+create or replace view v1 as select - 2 REGEXP 2, - (2 REGEXP 2), (- 2) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 regexp 2 AS `- 2 REGEXP 2`,-(2 regexp 2) AS `- (2 REGEXP 2)`,-2 regexp 2 AS `(- 2) REGEXP 2`
+select - 2 REGEXP 2, - (2 REGEXP 2), (- 2) REGEXP 2 union select * from v1;
+- 2 REGEXP 2 - (2 REGEXP 2) (- 2) REGEXP 2
+1 -1 1
+create or replace view v1 as select - 2 | 3, - (2 | 3), (- 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 | 3 AS `- 2 | 3`,-(2 | 3) AS `- (2 | 3)`,-2 | 3 AS `(- 2) | 3`
+select - 2 | 3, - (2 | 3), (- 2) | 3 union select * from v1;
+- 2 | 3 - (2 | 3) (- 2) | 3
+18446744073709551615 -3 18446744073709551615
+create or replace view v1 as select - 2 & 3, - (2 & 3), (- 2) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 & 3 AS `- 2 & 3`,-(2 & 3) AS `- (2 & 3)`,-2 & 3 AS `(- 2) & 3`
+select - 2 & 3, - (2 & 3), (- 2) & 3 union select * from v1;
+- 2 & 3 - (2 & 3) (- 2) & 3
+2 -2 2
+create or replace view v1 as select - 2 << 3, - (2 << 3), (- 2) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 << 3 AS `- 2 << 3`,-(2 << 3) AS `- (2 << 3)`,-2 << 3 AS `(- 2) << 3`
+select - 2 << 3, - (2 << 3), (- 2) << 3 union select * from v1;
+- 2 << 3 - (2 << 3) (- 2) << 3
+18446744073709551600 -16 18446744073709551600
+create or replace view v1 as select - 2 >> 3, - (2 >> 3), (- 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 >> 3 AS `- 2 >> 3`,-(2 >> 3) AS `- (2 >> 3)`,-2 >> 3 AS `(- 2) >> 3`
+select - 2 >> 3, - (2 >> 3), (- 2) >> 3 union select * from v1;
+- 2 >> 3 - (2 >> 3) (- 2) >> 3
+2305843009213693951 0 2305843009213693951
+create or replace view v1 as select - '2000-01-01' +INTERVAL 1 DAY, - ('2000-01-01' +INTERVAL 1 DAY), (- '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -'2000-01-01' + interval 1 day AS `- '2000-01-01' +INTERVAL 1 DAY`,-('2000-01-01' + interval 1 day) AS `- ('2000-01-01' +INTERVAL 1 DAY)`,-'2000-01-01' + interval 1 day AS `(- '2000-01-01') +INTERVAL 1 DAY`
+select - '2000-01-01' +INTERVAL 1 DAY, - ('2000-01-01' +INTERVAL 1 DAY), (- '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+- '2000-01-01' +INTERVAL 1 DAY - ('2000-01-01' +INTERVAL 1 DAY) (- '2000-01-01') +INTERVAL 1 DAY
+NULL -20000102 NULL
+create or replace view v1 as select - 2 + 3, - (2 + 3), (- 2) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 + 3 AS `- 2 + 3`,-(2 + 3) AS `- (2 + 3)`,-2 + 3 AS `(- 2) + 3`
+select - 2 + 3, - (2 + 3), (- 2) + 3 union select * from v1;
+- 2 + 3 - (2 + 3) (- 2) + 3
+1 -5 1
+create or replace view v1 as select - 2 - 3, - (2 - 3), (- 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 - 3 AS `- 2 - 3`,-(2 - 3) AS `- (2 - 3)`,-2 - 3 AS `(- 2) - 3`
+select - 2 - 3, - (2 - 3), (- 2) - 3 union select * from v1;
+- 2 - 3 - (2 - 3) (- 2) - 3
+-5 1 -5
+create or replace view v1 as select - 2 ^ 3, - (2 ^ 3), (- 2) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 ^ 3 AS `- 2 ^ 3`,-(2 ^ 3) AS `- (2 ^ 3)`,-2 ^ 3 AS `(- 2) ^ 3`
+select - 2 ^ 3, - (2 ^ 3), (- 2) ^ 3 union select * from v1;
+- 2 ^ 3 - (2 ^ 3) (- 2) ^ 3
+18446744073709551613 -1 18446744073709551613
+create or replace view v1 as select - 2 BETWEEN 1 AND 3, - (2 BETWEEN 1 AND 3), (- 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 between 1 and 3 AS `- 2 BETWEEN 1 AND 3`,-(2 between 1 and 3) AS `- (2 BETWEEN 1 AND 3)`,-2 between 1 and 3 AS `(- 2) BETWEEN 1 AND 3`
+select - 2 BETWEEN 1 AND 3, - (2 BETWEEN 1 AND 3), (- 2) BETWEEN 1 AND 3 union select * from v1;
+- 2 BETWEEN 1 AND 3 - (2 BETWEEN 1 AND 3) (- 2) BETWEEN 1 AND 3
+0 -1 0
+create or replace view v1 as select ~ 2 IS TRUE, ~ (2 IS TRUE), (~ 2) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 is true AS `~ 2 IS TRUE`,~(2 is true) AS `~ (2 IS TRUE)`,~2 is true AS `(~ 2) IS TRUE`
+select ~ 2 IS TRUE, ~ (2 IS TRUE), (~ 2) IS TRUE union select * from v1;
+~ 2 IS TRUE ~ (2 IS TRUE) (~ 2) IS TRUE
+1 18446744073709551614 1
+create or replace view v1 as select charset(~ 2 COLLATE latin1_bin), charset(~ (2 COLLATE latin1_bin)), charset((~ 2) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(~2 collate latin1_bin) AS `charset(~ 2 COLLATE latin1_bin)`,charset(~2 collate latin1_bin) AS `charset(~ (2 COLLATE latin1_bin))`,charset((~2) collate latin1_bin) AS `charset((~ 2) COLLATE latin1_bin)`
+select charset(~ 2 COLLATE latin1_bin), charset(~ (2 COLLATE latin1_bin)), charset((~ 2) COLLATE latin1_bin) union select * from v1;
+charset(~ 2 COLLATE latin1_bin) charset(~ (2 COLLATE latin1_bin)) charset((~ 2) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select ~ 2 IN (0,1), ~ (2 IN (0,1)), (~ 2) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 in (0,1) AS `~ 2 IN (0,1)`,~(2 in (0,1)) AS `~ (2 IN (0,1))`,~2 in (0,1) AS `(~ 2) IN (0,1)`
+select ~ 2 IN (0,1), ~ (2 IN (0,1)), (~ 2) IN (0,1) union select * from v1;
+~ 2 IN (0,1) ~ (2 IN (0,1)) (~ 2) IN (0,1)
+0 18446744073709551615 0
+create or replace view v1 as select ~ 2 OR 3, ~ (2 OR 3), (~ 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 or 3 AS `~ 2 OR 3`,~(2 or 3) AS `~ (2 OR 3)`,~2 or 3 AS `(~ 2) OR 3`
+select ~ 2 OR 3, ~ (2 OR 3), (~ 2) OR 3 union select * from v1;
+~ 2 OR 3 ~ (2 OR 3) (~ 2) OR 3
+1 18446744073709551614 1
+create or replace view v1 as select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 or 3 AS `~ 2 || 3`,~(2 or 3) AS `~ (2 || 3)`,~2 or 3 AS `(~ 2) || 3`
+select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3 union select * from v1;
+~ 2 || 3 ~ (2 || 3) (~ 2) || 3
+1 18446744073709551614 1
+create or replace view v1 as select ~ 2 XOR 3, ~ (2 XOR 3), (~ 2) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 xor 3 AS `~ 2 XOR 3`,~(2 xor 3) AS `~ (2 XOR 3)`,~2 xor 3 AS `(~ 2) XOR 3`
+select ~ 2 XOR 3, ~ (2 XOR 3), (~ 2) XOR 3 union select * from v1;
+~ 2 XOR 3 ~ (2 XOR 3) (~ 2) XOR 3
+0 18446744073709551615 0
+create or replace view v1 as select ~ 2 AND 3, ~ (2 AND 3), (~ 2) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 and 3 AS `~ 2 AND 3`,~(2 and 3) AS `~ (2 AND 3)`,~2 and 3 AS `(~ 2) AND 3`
+select ~ 2 AND 3, ~ (2 AND 3), (~ 2) AND 3 union select * from v1;
+~ 2 AND 3 ~ (2 AND 3) (~ 2) AND 3
+1 18446744073709551614 1
+create or replace view v1 as select ~ 2 && 3, ~ (2 && 3), (~ 2) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 and 3 AS `~ 2 && 3`,~(2 and 3) AS `~ (2 && 3)`,~2 and 3 AS `(~ 2) && 3`
+select ~ 2 && 3, ~ (2 && 3), (~ 2) && 3 union select * from v1;
+~ 2 && 3 ~ (2 && 3) (~ 2) && 3
+1 18446744073709551614 1
+create or replace view v1 as select ~ 2 = 3, ~ (2 = 3), (~ 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 = 3 AS `~ 2 = 3`,~(2 = 3) AS `~ (2 = 3)`,~2 = 3 AS `(~ 2) = 3`
+select ~ 2 = 3, ~ (2 = 3), (~ 2) = 3 union select * from v1;
+~ 2 = 3 ~ (2 = 3) (~ 2) = 3
+0 18446744073709551615 0
+create or replace view v1 as select ~ 2 <=> 3, ~ (2 <=> 3), (~ 2) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 <=> 3 AS `~ 2 <=> 3`,~(2 <=> 3) AS `~ (2 <=> 3)`,~2 <=> 3 AS `(~ 2) <=> 3`
+select ~ 2 <=> 3, ~ (2 <=> 3), (~ 2) <=> 3 union select * from v1;
+~ 2 <=> 3 ~ (2 <=> 3) (~ 2) <=> 3
+0 18446744073709551615 0
+create or replace view v1 as select ~ 2 >= 3, ~ (2 >= 3), (~ 2) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 >= 3 AS `~ 2 >= 3`,~(2 >= 3) AS `~ (2 >= 3)`,~2 >= 3 AS `(~ 2) >= 3`
+select ~ 2 >= 3, ~ (2 >= 3), (~ 2) >= 3 union select * from v1;
+~ 2 >= 3 ~ (2 >= 3) (~ 2) >= 3
+1 18446744073709551615 1
+create or replace view v1 as select ~ 2 <= 3, ~ (2 <= 3), (~ 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 <= 3 AS `~ 2 <= 3`,~(2 <= 3) AS `~ (2 <= 3)`,~2 <= 3 AS `(~ 2) <= 3`
+select ~ 2 <= 3, ~ (2 <= 3), (~ 2) <= 3 union select * from v1;
+~ 2 <= 3 ~ (2 <= 3) (~ 2) <= 3
+0 18446744073709551614 0
+create or replace view v1 as select ~ 2 < 3, ~ (2 < 3), (~ 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 < 3 AS `~ 2 < 3`,~(2 < 3) AS `~ (2 < 3)`,~2 < 3 AS `(~ 2) < 3`
+select ~ 2 < 3, ~ (2 < 3), (~ 2) < 3 union select * from v1;
+~ 2 < 3 ~ (2 < 3) (~ 2) < 3
+0 18446744073709551614 0
+create or replace view v1 as select ~ 2 <> 3, ~ (2 <> 3), (~ 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 <> 3 AS `~ 2 <> 3`,~(2 <> 3) AS `~ (2 <> 3)`,~2 <> 3 AS `(~ 2) <> 3`
+select ~ 2 <> 3, ~ (2 <> 3), (~ 2) <> 3 union select * from v1;
+~ 2 <> 3 ~ (2 <> 3) (~ 2) <> 3
+1 18446744073709551614 1
+create or replace view v1 as select ~ 2 > 3, ~ (2 > 3), (~ 2) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 > 3 AS `~ 2 > 3`,~(2 > 3) AS `~ (2 > 3)`,~2 > 3 AS `(~ 2) > 3`
+select ~ 2 > 3, ~ (2 > 3), (~ 2) > 3 union select * from v1;
+~ 2 > 3 ~ (2 > 3) (~ 2) > 3
+1 18446744073709551615 1
+create or replace view v1 as select ~ 2 != 3, ~ (2 != 3), (~ 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 <> 3 AS `~ 2 != 3`,~(2 <> 3) AS `~ (2 != 3)`,~2 <> 3 AS `(~ 2) != 3`
+select ~ 2 != 3, ~ (2 != 3), (~ 2) != 3 union select * from v1;
+~ 2 != 3 ~ (2 != 3) (~ 2) != 3
+1 18446744073709551614 1
+create or replace view v1 as select ~ 2 LIKE 3, ~ (2 LIKE 3), (~ 2) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 like 3 AS `~ 2 LIKE 3`,~(2 like 3) AS `~ (2 LIKE 3)`,~2 like 3 AS `(~ 2) LIKE 3`
+select ~ 2 LIKE 3, ~ (2 LIKE 3), (~ 2) LIKE 3 union select * from v1;
+~ 2 LIKE 3 ~ (2 LIKE 3) (~ 2) LIKE 3
+0 18446744073709551615 0
+create or replace view v1 as select ~ 2 REGEXP 3, ~ (2 REGEXP 3), (~ 2) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 regexp 3 AS `~ 2 REGEXP 3`,~(2 regexp 3) AS `~ (2 REGEXP 3)`,~2 regexp 3 AS `(~ 2) REGEXP 3`
+select ~ 2 REGEXP 3, ~ (2 REGEXP 3), (~ 2) REGEXP 3 union select * from v1;
+~ 2 REGEXP 3 ~ (2 REGEXP 3) (~ 2) REGEXP 3
+1 18446744073709551615 1
+create or replace view v1 as select ~ 2 | 3, ~ (2 | 3), (~ 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 | 3 AS `~ 2 | 3`,~(2 | 3) AS `~ (2 | 3)`,~2 | 3 AS `(~ 2) | 3`
+select ~ 2 | 3, ~ (2 | 3), (~ 2) | 3 union select * from v1;
+~ 2 | 3 ~ (2 | 3) (~ 2) | 3
+18446744073709551615 18446744073709551612 18446744073709551615
+create or replace view v1 as select ~ 2 & 3, ~ (2 & 3), (~ 2) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 & 3 AS `~ 2 & 3`,~(2 & 3) AS `~ (2 & 3)`,~2 & 3 AS `(~ 2) & 3`
+select ~ 2 & 3, ~ (2 & 3), (~ 2) & 3 union select * from v1;
+~ 2 & 3 ~ (2 & 3) (~ 2) & 3
+1 18446744073709551613 1
+create or replace view v1 as select ~ 2 << 3, ~ (2 << 3), (~ 2) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 << 3 AS `~ 2 << 3`,~(2 << 3) AS `~ (2 << 3)`,~2 << 3 AS `(~ 2) << 3`
+select ~ 2 << 3, ~ (2 << 3), (~ 2) << 3 union select * from v1;
+~ 2 << 3 ~ (2 << 3) (~ 2) << 3
+18446744073709551592 18446744073709551599 18446744073709551592
+create or replace view v1 as select ~ 2 >> 3, ~ (2 >> 3), (~ 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 >> 3 AS `~ 2 >> 3`,~(2 >> 3) AS `~ (2 >> 3)`,~2 >> 3 AS `(~ 2) >> 3`
+select ~ 2 >> 3, ~ (2 >> 3), (~ 2) >> 3 union select * from v1;
+~ 2 >> 3 ~ (2 >> 3) (~ 2) >> 3
+2305843009213693951 18446744073709551615 2305843009213693951
+create or replace view v1 as select ~ '2000-01-01' +INTERVAL 1 DAY, ~ ('2000-01-01' +INTERVAL 1 DAY), (~ '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~'2000-01-01' + interval 1 day AS `~ '2000-01-01' +INTERVAL 1 DAY`,~('2000-01-01' + interval 1 day) AS `~ ('2000-01-01' +INTERVAL 1 DAY)`,~'2000-01-01' + interval 1 day AS `(~ '2000-01-01') +INTERVAL 1 DAY`
+select ~ '2000-01-01' +INTERVAL 1 DAY, ~ ('2000-01-01' +INTERVAL 1 DAY), (~ '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+~ '2000-01-01' +INTERVAL 1 DAY ~ ('2000-01-01' +INTERVAL 1 DAY) (~ '2000-01-01') +INTERVAL 1 DAY
+NULL 18446744073689551513 NULL
+create or replace view v1 as select ~ 10000 + 3, ~ (10000 + 3), (~ 10000) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~10000 + 3 AS `~ 10000 + 3`,~(10000 + 3) AS `~ (10000 + 3)`,~10000 + 3 AS `(~ 10000) + 3`
+select ~ 10000 + 3, ~ (10000 + 3), (~ 10000) + 3 union select * from v1;
+~ 10000 + 3 ~ (10000 + 3) (~ 10000) + 3
+18446744073709541618 18446744073709541612 18446744073709541618
+create or replace view v1 as select ~ 2 - 3, ~ (2 - 3), (~ 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 - 3 AS `~ 2 - 3`,~(2 - 3) AS `~ (2 - 3)`,~2 - 3 AS `(~ 2) - 3`
+select ~ 2 - 3, ~ (2 - 3), (~ 2) - 3 union select * from v1;
+~ 2 - 3 ~ (2 - 3) (~ 2) - 3
+18446744073709551610 0 18446744073709551610
+create or replace view v1 as select ~ 10000000000000000000 * 2, ~ (100 * 2), (~ 10000000000000000000) * 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~10000000000000000000 * 2 AS `~ 10000000000000000000 * 2`,~(100 * 2) AS `~ (100 * 2)`,~10000000000000000000 * 2 AS `(~ 10000000000000000000) * 2`
+select ~ 10000000000000000000 * 2, ~ (100 * 2), (~ 10000000000000000000) * 2 union select * from v1;
+~ 10000000000000000000 * 2 ~ (100 * 2) (~ 10000000000000000000) * 2
+16893488147419103230 18446744073709551415 16893488147419103230
+create or replace view v1 as select ~ 2 / 3, ~ (2 / 3), (~ 2) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 / 3 AS `~ 2 / 3`,~(2 / 3) AS `~ (2 / 3)`,~2 / 3 AS `(~ 2) / 3`
+select ~ 2 / 3, ~ (2 / 3), (~ 2) / 3 union select * from v1;
+~ 2 / 3 ~ (2 / 3) (~ 2) / 3
+6148914691236517204.3333 18446744073709551614 6148914691236517204.3333
+create or replace view v1 as select ~ 2 DIV 3, ~ (2 DIV 3), (~ 2) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 DIV 3 AS `~ 2 DIV 3`,~(2 DIV 3) AS `~ (2 DIV 3)`,~2 DIV 3 AS `(~ 2) DIV 3`
+select ~ 2 DIV 3, ~ (2 DIV 3), (~ 2) DIV 3 union select * from v1;
+~ 2 DIV 3 ~ (2 DIV 3) (~ 2) DIV 3
+6148914691236517204 18446744073709551615 6148914691236517204
+create or replace view v1 as select ~ 2 MOD 3, ~ (2 MOD 3), (~ 2) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 MOD 3 AS `~ 2 MOD 3`,~(2 MOD 3) AS `~ (2 MOD 3)`,~2 MOD 3 AS `(~ 2) MOD 3`
+select ~ 2 MOD 3, ~ (2 MOD 3), (~ 2) MOD 3 union select * from v1;
+~ 2 MOD 3 ~ (2 MOD 3) (~ 2) MOD 3
+1 18446744073709551613 1
+create or replace view v1 as select ~ 2 % 3, ~ (2 % 3), (~ 2) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 MOD 3 AS `~ 2 % 3`,~(2 MOD 3) AS `~ (2 % 3)`,~2 MOD 3 AS `(~ 2) % 3`
+select ~ 2 % 3, ~ (2 % 3), (~ 2) % 3 union select * from v1;
+~ 2 % 3 ~ (2 % 3) (~ 2) % 3
+1 18446744073709551613 1
+create or replace view v1 as select ~ 2 BETWEEN 1 AND 3, ~ (2 BETWEEN 1 AND 3), (~ 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 between 1 and 3 AS `~ 2 BETWEEN 1 AND 3`,~(2 between 1 and 3) AS `~ (2 BETWEEN 1 AND 3)`,~2 between 1 and 3 AS `(~ 2) BETWEEN 1 AND 3`
+select ~ 2 BETWEEN 1 AND 3, ~ (2 BETWEEN 1 AND 3), (~ 2) BETWEEN 1 AND 3 union select * from v1;
+~ 2 BETWEEN 1 AND 3 ~ (2 BETWEEN 1 AND 3) (~ 2) BETWEEN 1 AND 3
+0 18446744073709551614 0
+create or replace view v1 as select charset(! 2 COLLATE latin1_bin), charset(! (2 COLLATE latin1_bin)), charset((! 2) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(!2 collate latin1_bin) AS `charset(! 2 COLLATE latin1_bin)`,charset(!2 collate latin1_bin) AS `charset(! (2 COLLATE latin1_bin))`,charset((!2) collate latin1_bin) AS `charset((! 2) COLLATE latin1_bin)`
+select charset(! 2 COLLATE latin1_bin), charset(! (2 COLLATE latin1_bin)), charset((! 2) COLLATE latin1_bin) union select * from v1;
+charset(! 2 COLLATE latin1_bin) charset(! (2 COLLATE latin1_bin)) charset((! 2) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select ! 2 IN (0,2), ! (2 IN (0,2)), (! 2) IN (0,2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 in (0,2) AS `! 2 IN (0,2)`,2 not in (0,2) AS `! (2 IN (0,2))`,!2 in (0,2) AS `(! 2) IN (0,2)`
+select ! 2 IN (0,2), ! (2 IN (0,2)), (! 2) IN (0,2) union select * from v1;
+! 2 IN (0,2) ! (2 IN (0,2)) (! 2) IN (0,2)
+1 0 1
+create or replace view v1 as select ! 2 OR 3, ! (2 OR 3), (! 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 or 3 AS `! 2 OR 3`,!2 and !3 AS `! (2 OR 3)`,!2 or 3 AS `(! 2) OR 3`
+select ! 2 OR 3, ! (2 OR 3), (! 2) OR 3 union select * from v1;
+! 2 OR 3 ! (2 OR 3) (! 2) OR 3
+1 0 1
+create or replace view v1 as select ! 2 || 3, ! (2 || 3), (! 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 or 3 AS `! 2 || 3`,!2 and !3 AS `! (2 || 3)`,!2 or 3 AS `(! 2) || 3`
+select ! 2 || 3, ! (2 || 3), (! 2) || 3 union select * from v1;
+! 2 || 3 ! (2 || 3) (! 2) || 3
+1 0 1
+create or replace view v1 as select ! 2 AND 0, ! (2 AND 0), (! 2) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 and 0 AS `! 2 AND 0`,!2 or !0 AS `! (2 AND 0)`,!2 and 0 AS `(! 2) AND 0`
+select ! 2 AND 0, ! (2 AND 0), (! 2) AND 0 union select * from v1;
+! 2 AND 0 ! (2 AND 0) (! 2) AND 0
+0 1 0
+create or replace view v1 as select ! 2 && 0, ! (2 && 0), (! 2) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 and 0 AS `! 2 && 0`,!2 or !0 AS `! (2 && 0)`,!2 and 0 AS `(! 2) && 0`
+select ! 2 && 0, ! (2 && 0), (! 2) && 0 union select * from v1;
+! 2 && 0 ! (2 && 0) (! 2) && 0
+0 1 0
+create or replace view v1 as select ! 2 = 3, ! (2 = 3), (! 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 = 3 AS `! 2 = 3`,2 <> 3 AS `! (2 = 3)`,!2 = 3 AS `(! 2) = 3`
+select ! 2 = 3, ! (2 = 3), (! 2) = 3 union select * from v1;
+! 2 = 3 ! (2 = 3) (! 2) = 3
+0 1 0
+create or replace view v1 as select ! 2 <=> 3, ! (2 <=> 3), (! 2) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 <=> 3 AS `! 2 <=> 3`,!(2 <=> 3) AS `! (2 <=> 3)`,!2 <=> 3 AS `(! 2) <=> 3`
+select ! 2 <=> 3, ! (2 <=> 3), (! 2) <=> 3 union select * from v1;
+! 2 <=> 3 ! (2 <=> 3) (! 2) <=> 3
+0 1 0
+create or replace view v1 as select ! 2 >= 3, ! (2 >= 3), (! 2) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 >= 3 AS `! 2 >= 3`,2 < 3 AS `! (2 >= 3)`,!2 >= 3 AS `(! 2) >= 3`
+select ! 2 >= 3, ! (2 >= 3), (! 2) >= 3 union select * from v1;
+! 2 >= 3 ! (2 >= 3) (! 2) >= 3
+0 1 0
+create or replace view v1 as select ! 2 <= 3, ! (2 <= 3), (! 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 <= 3 AS `! 2 <= 3`,2 > 3 AS `! (2 <= 3)`,!2 <= 3 AS `(! 2) <= 3`
+select ! 2 <= 3, ! (2 <= 3), (! 2) <= 3 union select * from v1;
+! 2 <= 3 ! (2 <= 3) (! 2) <= 3
+1 0 1
+create or replace view v1 as select ! 2 < 3, ! (2 < 3), (! 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 < 3 AS `! 2 < 3`,2 >= 3 AS `! (2 < 3)`,!2 < 3 AS `(! 2) < 3`
+select ! 2 < 3, ! (2 < 3), (! 2) < 3 union select * from v1;
+! 2 < 3 ! (2 < 3) (! 2) < 3
+1 0 1
+create or replace view v1 as select ! 2 <> 3, ! (2 <> 3), (! 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 <> 3 AS `! 2 <> 3`,2 = 3 AS `! (2 <> 3)`,!2 <> 3 AS `(! 2) <> 3`
+select ! 2 <> 3, ! (2 <> 3), (! 2) <> 3 union select * from v1;
+! 2 <> 3 ! (2 <> 3) (! 2) <> 3
+1 0 1
+create or replace view v1 as select ! 2 > 3, ! (2 > 3), (! 2) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 > 3 AS `! 2 > 3`,2 <= 3 AS `! (2 > 3)`,!2 > 3 AS `(! 2) > 3`
+select ! 2 > 3, ! (2 > 3), (! 2) > 3 union select * from v1;
+! 2 > 3 ! (2 > 3) (! 2) > 3
+0 1 0
+create or replace view v1 as select ! 2 != 3, ! (2 != 3), (! 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 <> 3 AS `! 2 != 3`,2 = 3 AS `! (2 != 3)`,!2 <> 3 AS `(! 2) != 3`
+select ! 2 != 3, ! (2 != 3), (! 2) != 3 union select * from v1;
+! 2 != 3 ! (2 != 3) (! 2) != 3
+1 0 1
+create or replace view v1 as select ! 2 LIKE 3, ! (2 LIKE 3), (! 2) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 like 3 AS `! 2 LIKE 3`,2 not like 3 AS `! (2 LIKE 3)`,!2 like 3 AS `(! 2) LIKE 3`
+select ! 2 LIKE 3, ! (2 LIKE 3), (! 2) LIKE 3 union select * from v1;
+! 2 LIKE 3 ! (2 LIKE 3) (! 2) LIKE 3
+0 1 0
+create or replace view v1 as select ! 2 REGEXP 3, ! (2 REGEXP 3), (! 2) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 regexp 3 AS `! 2 REGEXP 3`,!(2 regexp 3) AS `! (2 REGEXP 3)`,!2 regexp 3 AS `(! 2) REGEXP 3`
+select ! 2 REGEXP 3, ! (2 REGEXP 3), (! 2) REGEXP 3 union select * from v1;
+! 2 REGEXP 3 ! (2 REGEXP 3) (! 2) REGEXP 3
+0 1 0
+create or replace view v1 as select ! 2 | 3, ! (2 | 3), (! 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 | 3 AS `! 2 | 3`,!(2 | 3) AS `! (2 | 3)`,!2 | 3 AS `(! 2) | 3`
+select ! 2 | 3, ! (2 | 3), (! 2) | 3 union select * from v1;
+! 2 | 3 ! (2 | 3) (! 2) | 3
+3 0 3
+create or replace view v1 as select ! 2 & 0, ! (2 & 0), (! 2) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 & 0 AS `! 2 & 0`,!(2 & 0) AS `! (2 & 0)`,!2 & 0 AS `(! 2) & 0`
+select ! 2 & 0, ! (2 & 0), (! 2) & 0 union select * from v1;
+! 2 & 0 ! (2 & 0) (! 2) & 0
+0 1 0
+create or replace view v1 as select ! 0 << 3, ! (0 << 3), (! 0) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !0 << 3 AS `! 0 << 3`,!(0 << 3) AS `! (0 << 3)`,!0 << 3 AS `(! 0) << 3`
+select ! 0 << 3, ! (0 << 3), (! 0) << 3 union select * from v1;
+! 0 << 3 ! (0 << 3) (! 0) << 3
+8 1 8
+create or replace view v1 as select ! 2 >> 3, ! (2 >> 3), (! 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 >> 3 AS `! 2 >> 3`,!(2 >> 3) AS `! (2 >> 3)`,!2 >> 3 AS `(! 2) >> 3`
+select ! 2 >> 3, ! (2 >> 3), (! 2) >> 3 union select * from v1;
+! 2 >> 3 ! (2 >> 3) (! 2) >> 3
+0 1 0
+create or replace view v1 as select ! '2000-01-01' +INTERVAL 1 DAY, ! ('2000-01-01' +INTERVAL 1 DAY), (! '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !'2000-01-01' + interval 1 day AS `! '2000-01-01' +INTERVAL 1 DAY`,!('2000-01-01' + interval 1 day) AS `! ('2000-01-01' +INTERVAL 1 DAY)`,!'2000-01-01' + interval 1 day AS `(! '2000-01-01') +INTERVAL 1 DAY`
+select ! '2000-01-01' +INTERVAL 1 DAY, ! ('2000-01-01' +INTERVAL 1 DAY), (! '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+! '2000-01-01' +INTERVAL 1 DAY ! ('2000-01-01' +INTERVAL 1 DAY) (! '2000-01-01') +INTERVAL 1 DAY
+NULL 0 NULL
+create or replace view v1 as select ! 2 + 3, ! (2 + 3), (! 2) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 + 3 AS `! 2 + 3`,!(2 + 3) AS `! (2 + 3)`,!2 + 3 AS `(! 2) + 3`
+select ! 2 + 3, ! (2 + 3), (! 2) + 3 union select * from v1;
+! 2 + 3 ! (2 + 3) (! 2) + 3
+3 0 3
+create or replace view v1 as select ! 2 - 3, ! (2 - 3), (! 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 - 3 AS `! 2 - 3`,!(2 - 3) AS `! (2 - 3)`,!2 - 3 AS `(! 2) - 3`
+select ! 2 - 3, ! (2 - 3), (! 2) - 3 union select * from v1;
+! 2 - 3 ! (2 - 3) (! 2) - 3
+-3 0 -3
+create or replace view v1 as select ! 0 * 3, ! (0 * 3), (! 0) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !0 * 3 AS `! 0 * 3`,!(0 * 3) AS `! (0 * 3)`,!0 * 3 AS `(! 0) * 3`
+select ! 0 * 3, ! (0 * 3), (! 0) * 3 union select * from v1;
+! 0 * 3 ! (0 * 3) (! 0) * 3
+3 1 3
+create or replace view v1 as select ! 0 / 3, ! (0 / 3), (! 0) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !0 / 3 AS `! 0 / 3`,!(0 / 3) AS `! (0 / 3)`,!0 / 3 AS `(! 0) / 3`
+select ! 0 / 3, ! (0 / 3), (! 0) / 3 union select * from v1;
+! 0 / 3 ! (0 / 3) (! 0) / 3
+0.3333 1 0.3333
+create or replace view v1 as select ! 2 DIV 3, ! (2 DIV 3), (! 2) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 DIV 3 AS `! 2 DIV 3`,!(2 DIV 3) AS `! (2 DIV 3)`,!2 DIV 3 AS `(! 2) DIV 3`
+select ! 2 DIV 3, ! (2 DIV 3), (! 2) DIV 3 union select * from v1;
+! 2 DIV 3 ! (2 DIV 3) (! 2) DIV 3
+0 1 0
+create or replace view v1 as select ! 6 MOD 3, ! (6 MOD 3), (! 6) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !6 MOD 3 AS `! 6 MOD 3`,!(6 MOD 3) AS `! (6 MOD 3)`,!6 MOD 3 AS `(! 6) MOD 3`
+select ! 6 MOD 3, ! (6 MOD 3), (! 6) MOD 3 union select * from v1;
+! 6 MOD 3 ! (6 MOD 3) (! 6) MOD 3
+0 1 0
+create or replace view v1 as select ! 6 % 3, ! (6 % 3), (! 6) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !6 MOD 3 AS `! 6 % 3`,!(6 MOD 3) AS `! (6 % 3)`,!6 MOD 3 AS `(! 6) % 3`
+select ! 6 % 3, ! (6 % 3), (! 6) % 3 union select * from v1;
+! 6 % 3 ! (6 % 3) (! 6) % 3
+0 1 0
+create or replace view v1 as select ! 2 ^ 3, ! (2 ^ 3), (! 2) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 ^ 3 AS `! 2 ^ 3`,!(2 ^ 3) AS `! (2 ^ 3)`,!2 ^ 3 AS `(! 2) ^ 3`
+select ! 2 ^ 3, ! (2 ^ 3), (! 2) ^ 3 union select * from v1;
+! 2 ^ 3 ! (2 ^ 3) (! 2) ^ 3
+3 0 3
+create or replace view v1 as select ! 2 BETWEEN 3 AND 4, ! (2 BETWEEN 3 AND 4), (! 2) BETWEEN 3 AND 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 between 3 and 4 AS `! 2 BETWEEN 3 AND 4`,2 not between 3 and 4 AS `! (2 BETWEEN 3 AND 4)`,!2 between 3 and 4 AS `(! 2) BETWEEN 3 AND 4`
+select ! 2 BETWEEN 3 AND 4, ! (2 BETWEEN 3 AND 4), (! 2) BETWEEN 3 AND 4 union select * from v1;
+! 2 BETWEEN 3 AND 4 ! (2 BETWEEN 3 AND 4) (! 2) BETWEEN 3 AND 4
+0 1 0
+create or replace view v1 as select CHARSET(BINARY '2' COLLATE latin1_bin), CHARSET(BINARY ('2' COLLATE latin1_bin)), 'error'/*CHARSET((BINARY '2') COLLATE latin1_bin)*/;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(cast('2' collate latin1_bin as char charset binary)) AS `CHARSET(BINARY '2' COLLATE latin1_bin)`,charset(cast('2' collate latin1_bin as char charset binary)) AS `CHARSET(BINARY ('2' COLLATE latin1_bin))`,'error' AS `error`
+select CHARSET(BINARY '2' COLLATE latin1_bin), CHARSET(BINARY ('2' COLLATE latin1_bin)), 'error'/*CHARSET((BINARY '2') COLLATE latin1_bin)*/ union select * from v1;
+CHARSET(BINARY '2' COLLATE latin1_bin) CHARSET(BINARY ('2' COLLATE latin1_bin)) error
+binary binary error
+create or replace view v1 as select BINARY 'c' IN ('C','X'), BINARY ('c' IN ('C','X')), (BINARY 'c') IN ('C','X');
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) in ('C','X') AS `BINARY 'c' IN ('C','X')`,cast('c' in ('C','X') as char charset binary) AS `BINARY ('c' IN ('C','X'))`,cast('c' as char charset binary) in ('C','X') AS `(BINARY 'c') IN ('C','X')`
+select BINARY 'c' IN ('C','X'), BINARY ('c' IN ('C','X')), (BINARY 'c') IN ('C','X') union select * from v1;
+BINARY 'c' IN ('C','X') BINARY ('c' IN ('C','X')) (BINARY 'c') IN ('C','X')
+0 1 0
+create or replace view v1 as select BINARY 'c' = 'C', BINARY ('c' = 'C'), (BINARY 'c') = 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) = 'C' AS `BINARY 'c' = 'C'`,cast('c' = 'C' as char charset binary) AS `BINARY ('c' = 'C')`,cast('c' as char charset binary) = 'C' AS `(BINARY 'c') = 'C'`
+select BINARY 'c' = 'C', BINARY ('c' = 'C'), (BINARY 'c') = 'C' union select * from v1;
+BINARY 'c' = 'C' BINARY ('c' = 'C') (BINARY 'c') = 'C'
+0 1 0
+create or replace view v1 as select BINARY 'c' <=> 'C', BINARY ('c' <=> 'C'), (BINARY 'c') <=> 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) <=> 'C' AS `BINARY 'c' <=> 'C'`,cast('c' <=> 'C' as char charset binary) AS `BINARY ('c' <=> 'C')`,cast('c' as char charset binary) <=> 'C' AS `(BINARY 'c') <=> 'C'`
+select BINARY 'c' <=> 'C', BINARY ('c' <=> 'C'), (BINARY 'c') <=> 'C' union select * from v1;
+BINARY 'c' <=> 'C' BINARY ('c' <=> 'C') (BINARY 'c') <=> 'C'
+0 1 0
+create or replace view v1 as select BINARY 'c' >= 'D', BINARY ('c' >= 'D'), (BINARY 'c') >= 'D';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) >= 'D' AS `BINARY 'c' >= 'D'`,cast('c' >= 'D' as char charset binary) AS `BINARY ('c' >= 'D')`,cast('c' as char charset binary) >= 'D' AS `(BINARY 'c') >= 'D'`
+select BINARY 'c' >= 'D', BINARY ('c' >= 'D'), (BINARY 'c') >= 'D' union select * from v1;
+BINARY 'c' >= 'D' BINARY ('c' >= 'D') (BINARY 'c') >= 'D'
+1 0 1
+create or replace view v1 as select BINARY 'c' <= 'C', BINARY ('c' <= 'C'), (BINARY 'c') <= 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) <= 'C' AS `BINARY 'c' <= 'C'`,cast('c' <= 'C' as char charset binary) AS `BINARY ('c' <= 'C')`,cast('c' as char charset binary) <= 'C' AS `(BINARY 'c') <= 'C'`
+select BINARY 'c' <= 'C', BINARY ('c' <= 'C'), (BINARY 'c') <= 'C' union select * from v1;
+BINARY 'c' <= 'C' BINARY ('c' <= 'C') (BINARY 'c') <= 'C'
+0 1 0
+create or replace view v1 as select BINARY 'c' < 'D', BINARY ('c' < 'D'), (BINARY 'c') < 'D';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) < 'D' AS `BINARY 'c' < 'D'`,cast('c' < 'D' as char charset binary) AS `BINARY ('c' < 'D')`,cast('c' as char charset binary) < 'D' AS `(BINARY 'c') < 'D'`
+select BINARY 'c' < 'D', BINARY ('c' < 'D'), (BINARY 'c') < 'D' union select * from v1;
+BINARY 'c' < 'D' BINARY ('c' < 'D') (BINARY 'c') < 'D'
+0 1 0
+create or replace view v1 as select BINARY 'c' <> 'C', BINARY ('c' <> 'C'), (BINARY 'c') <> 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) <> 'C' AS `BINARY 'c' <> 'C'`,cast('c' <> 'C' as char charset binary) AS `BINARY ('c' <> 'C')`,cast('c' as char charset binary) <> 'C' AS `(BINARY 'c') <> 'C'`
+select BINARY 'c' <> 'C', BINARY ('c' <> 'C'), (BINARY 'c') <> 'C' union select * from v1;
+BINARY 'c' <> 'C' BINARY ('c' <> 'C') (BINARY 'c') <> 'C'
+1 0 1
+create or replace view v1 as select BINARY 'c' > 'C', BINARY ('c' > 'C'), (BINARY 'c') > 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) > 'C' AS `BINARY 'c' > 'C'`,cast('c' > 'C' as char charset binary) AS `BINARY ('c' > 'C')`,cast('c' as char charset binary) > 'C' AS `(BINARY 'c') > 'C'`
+select BINARY 'c' > 'C', BINARY ('c' > 'C'), (BINARY 'c') > 'C' union select * from v1;
+BINARY 'c' > 'C' BINARY ('c' > 'C') (BINARY 'c') > 'C'
+1 0 1
+create or replace view v1 as select BINARY 'c' != 'C', BINARY ('c' != 'C'), (BINARY 'c') != 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) <> 'C' AS `BINARY 'c' != 'C'`,cast('c' <> 'C' as char charset binary) AS `BINARY ('c' != 'C')`,cast('c' as char charset binary) <> 'C' AS `(BINARY 'c') != 'C'`
+select BINARY 'c' != 'C', BINARY ('c' != 'C'), (BINARY 'c') != 'C' union select * from v1;
+BINARY 'c' != 'C' BINARY ('c' != 'C') (BINARY 'c') != 'C'
+1 0 1
+create or replace view v1 as select BINARY 'c' LIKE 'C', BINARY ('c' LIKE 'C'), (BINARY 'c') LIKE 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) like 'C' AS `BINARY 'c' LIKE 'C'`,cast('c' like 'C' as char charset binary) AS `BINARY ('c' LIKE 'C')`,cast('c' as char charset binary) like 'C' AS `(BINARY 'c') LIKE 'C'`
+select BINARY 'c' LIKE 'C', BINARY ('c' LIKE 'C'), (BINARY 'c') LIKE 'C' union select * from v1;
+BINARY 'c' LIKE 'C' BINARY ('c' LIKE 'C') (BINARY 'c') LIKE 'C'
+0 1 0
+create or replace view v1 as select BINARY 'c' REGEXP 'C', BINARY ('c' REGEXP 'C'), (BINARY 'c') REGEXP 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) regexp 'C' AS `BINARY 'c' REGEXP 'C'`,cast('c' regexp 'C' as char charset binary) AS `BINARY ('c' REGEXP 'C')`,cast('c' as char charset binary) regexp 'C' AS `(BINARY 'c') REGEXP 'C'`
+select BINARY 'c' REGEXP 'C', BINARY ('c' REGEXP 'C'), (BINARY 'c') REGEXP 'C' union select * from v1;
+BINARY 'c' REGEXP 'C' BINARY ('c' REGEXP 'C') (BINARY 'c') REGEXP 'C'
+0 1 0
+create or replace view v1 as select BINARY 'c' BETWEEN 'A' AND 'D', BINARY ('c' BETWEEN 'A' AND 'D'), (BINARY 'c') BETWEEN 'A' AND 'D';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) between 'A' and 'D' AS `BINARY 'c' BETWEEN 'A' AND 'D'`,cast('c' between 'A' and 'D' as char charset binary) AS `BINARY ('c' BETWEEN 'A' AND 'D')`,cast('c' as char charset binary) between 'A' and 'D' AS `(BINARY 'c') BETWEEN 'A' AND 'D'`
+select BINARY 'c' BETWEEN 'A' AND 'D', BINARY ('c' BETWEEN 'A' AND 'D'), (BINARY 'c') BETWEEN 'A' AND 'D' union select * from v1;
+BINARY 'c' BETWEEN 'A' AND 'D' BINARY ('c' BETWEEN 'A' AND 'D') (BINARY 'c') BETWEEN 'A' AND 'D'
+0 1 0
+create or replace view v1 as select 2 OR 3 IS FALSE, 2 OR (3 IS FALSE), (2 OR 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 is false AS `2 OR 3 IS FALSE`,2 or 3 is false AS `2 OR (3 IS FALSE)`,(2 or 3) is false AS `(2 OR 3) IS FALSE`
+select 2 OR 3 IS FALSE, 2 OR (3 IS FALSE), (2 OR 3) IS FALSE union select * from v1;
+2 OR 3 IS FALSE 2 OR (3 IS FALSE) (2 OR 3) IS FALSE
+1 1 0
+create or replace view v1 as select charset(2 OR 3 COLLATE latin1_bin), charset(2 OR (3 COLLATE latin1_bin)), charset((2 OR 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 or 3 collate latin1_bin) AS `charset(2 OR 3 COLLATE latin1_bin)`,charset(2 or 3 collate latin1_bin) AS `charset(2 OR (3 COLLATE latin1_bin))`,charset((2 or 3) collate latin1_bin) AS `charset((2 OR 3) COLLATE latin1_bin)`
+select charset(2 OR 3 COLLATE latin1_bin), charset(2 OR (3 COLLATE latin1_bin)), charset((2 OR 3) COLLATE latin1_bin) union select * from v1;
+charset(2 OR 3 COLLATE latin1_bin) charset(2 OR (3 COLLATE latin1_bin)) charset((2 OR 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 0 OR 3 IN (3,10), 0 OR (3 IN (3,10)), (0 OR 3) IN (3,10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 in (3,10) AS `0 OR 3 IN (3,10)`,0 or 3 in (3,10) AS `0 OR (3 IN (3,10))`,(0 or 3) in (3,10) AS `(0 OR 3) IN (3,10)`
+select 0 OR 3 IN (3,10), 0 OR (3 IN (3,10)), (0 OR 3) IN (3,10) union select * from v1;
+0 OR 3 IN (3,10) 0 OR (3 IN (3,10)) (0 OR 3) IN (3,10)
+1 1 0
+create or replace view v1 as select 1 OR 0 XOR 1, 1 OR (0 XOR 1), (1 OR 0) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 or 0 xor 1 AS `1 OR 0 XOR 1`,1 or 0 xor 1 AS `1 OR (0 XOR 1)`,(1 or 0) xor 1 AS `(1 OR 0) XOR 1`
+select 1 OR 0 XOR 1, 1 OR (0 XOR 1), (1 OR 0) XOR 1 union select * from v1;
+1 OR 0 XOR 1 1 OR (0 XOR 1) (1 OR 0) XOR 1
+1 1 0
+create or replace view v1 as select 1 OR 1 AND 0, 1 OR (1 AND 0), (1 OR 1) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 or 1 and 0 AS `1 OR 1 AND 0`,1 or 1 and 0 AS `1 OR (1 AND 0)`,(1 or 1) and 0 AS `(1 OR 1) AND 0`
+select 1 OR 1 AND 0, 1 OR (1 AND 0), (1 OR 1) AND 0 union select * from v1;
+1 OR 1 AND 0 1 OR (1 AND 0) (1 OR 1) AND 0
+1 1 0
+create or replace view v1 as select 1 OR 1 && 0, 1 OR (1 && 0), (1 OR 1) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 or 1 and 0 AS `1 OR 1 && 0`,1 or 1 and 0 AS `1 OR (1 && 0)`,(1 or 1) and 0 AS `(1 OR 1) && 0`
+select 1 OR 1 && 0, 1 OR (1 && 0), (1 OR 1) && 0 union select * from v1;
+1 OR 1 && 0 1 OR (1 && 0) (1 OR 1) && 0
+1 1 0
+create or replace view v1 as select 2 OR 3 = 3, 2 OR (3 = 3), (2 OR 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 = 3 AS `2 OR 3 = 3`,2 or 3 = 3 AS `2 OR (3 = 3)`,(2 or 3) = 3 AS `(2 OR 3) = 3`
+select 2 OR 3 = 3, 2 OR (3 = 3), (2 OR 3) = 3 union select * from v1;
+2 OR 3 = 3 2 OR (3 = 3) (2 OR 3) = 3
+1 1 0
+create or replace view v1 as select 2 OR 3 <=> 3, 2 OR (3 <=> 3), (2 OR 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 <=> 3 AS `2 OR 3 <=> 3`,2 or 3 <=> 3 AS `2 OR (3 <=> 3)`,(2 or 3) <=> 3 AS `(2 OR 3) <=> 3`
+select 2 OR 3 <=> 3, 2 OR (3 <=> 3), (2 OR 3) <=> 3 union select * from v1;
+2 OR 3 <=> 3 2 OR (3 <=> 3) (2 OR 3) <=> 3
+1 1 0
+create or replace view v1 as select 2 OR 3 >= 3, 2 OR (3 >= 3), (2 OR 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 >= 3 AS `2 OR 3 >= 3`,2 or 3 >= 3 AS `2 OR (3 >= 3)`,(2 or 3) >= 3 AS `(2 OR 3) >= 3`
+select 2 OR 3 >= 3, 2 OR (3 >= 3), (2 OR 3) >= 3 union select * from v1;
+2 OR 3 >= 3 2 OR (3 >= 3) (2 OR 3) >= 3
+1 1 0
+create or replace view v1 as select 2 OR 3 <= 0, 2 OR (3 <= 0), (2 OR 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 <= 0 AS `2 OR 3 <= 0`,2 or 3 <= 0 AS `2 OR (3 <= 0)`,(2 or 3) <= 0 AS `(2 OR 3) <= 0`
+select 2 OR 3 <= 0, 2 OR (3 <= 0), (2 OR 3) <= 0 union select * from v1;
+2 OR 3 <= 0 2 OR (3 <= 0) (2 OR 3) <= 0
+1 1 0
+create or replace view v1 as select 2 OR 3 < 0, 2 OR (3 < 0), (2 OR 3) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 < 0 AS `2 OR 3 < 0`,2 or 3 < 0 AS `2 OR (3 < 0)`,(2 or 3) < 0 AS `(2 OR 3) < 0`
+select 2 OR 3 < 0, 2 OR (3 < 0), (2 OR 3) < 0 union select * from v1;
+2 OR 3 < 0 2 OR (3 < 0) (2 OR 3) < 0
+1 1 0
+create or replace view v1 as select 0 OR 3 <> 3, 0 OR (3 <> 3), (0 OR 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 <> 3 AS `0 OR 3 <> 3`,0 or 3 <> 3 AS `0 OR (3 <> 3)`,(0 or 3) <> 3 AS `(0 OR 3) <> 3`
+select 0 OR 3 <> 3, 0 OR (3 <> 3), (0 OR 3) <> 3 union select * from v1;
+0 OR 3 <> 3 0 OR (3 <> 3) (0 OR 3) <> 3
+0 0 1
+create or replace view v1 as select 2 OR 3 > 3, 2 OR (3 > 3), (2 OR 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 > 3 AS `2 OR 3 > 3`,2 or 3 > 3 AS `2 OR (3 > 3)`,(2 or 3) > 3 AS `(2 OR 3) > 3`
+select 2 OR 3 > 3, 2 OR (3 > 3), (2 OR 3) > 3 union select * from v1;
+2 OR 3 > 3 2 OR (3 > 3) (2 OR 3) > 3
+1 1 0
+create or replace view v1 as select 0 OR 3 != 3, 0 OR (3 != 3), (0 OR 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 <> 3 AS `0 OR 3 != 3`,0 or 3 <> 3 AS `0 OR (3 != 3)`,(0 or 3) <> 3 AS `(0 OR 3) != 3`
+select 0 OR 3 != 3, 0 OR (3 != 3), (0 OR 3) != 3 union select * from v1;
+0 OR 3 != 3 0 OR (3 != 3) (0 OR 3) != 3
+0 0 1
+create or replace view v1 as select 2 OR 3 LIKE 3, 2 OR (3 LIKE 3), (2 OR 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 like 3 AS `2 OR 3 LIKE 3`,2 or 3 like 3 AS `2 OR (3 LIKE 3)`,(2 or 3) like 3 AS `(2 OR 3) LIKE 3`
+select 2 OR 3 LIKE 3, 2 OR (3 LIKE 3), (2 OR 3) LIKE 3 union select * from v1;
+2 OR 3 LIKE 3 2 OR (3 LIKE 3) (2 OR 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 OR 3 REGEXP 3, 2 OR (3 REGEXP 3), (2 OR 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 regexp 3 AS `2 OR 3 REGEXP 3`,2 or 3 regexp 3 AS `2 OR (3 REGEXP 3)`,(2 or 3) regexp 3 AS `(2 OR 3) REGEXP 3`
+select 2 OR 3 REGEXP 3, 2 OR (3 REGEXP 3), (2 OR 3) REGEXP 3 union select * from v1;
+2 OR 3 REGEXP 3 2 OR (3 REGEXP 3) (2 OR 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 OR 3 | 3, 2 OR (3 | 3), (2 OR 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 | 3 AS `2 OR 3 | 3`,2 or 3 | 3 AS `2 OR (3 | 3)`,(2 or 3) | 3 AS `(2 OR 3) | 3`
+select 2 OR 3 | 3, 2 OR (3 | 3), (2 OR 3) | 3 union select * from v1;
+2 OR 3 | 3 2 OR (3 | 3) (2 OR 3) | 3
+1 1 3
+create or replace view v1 as select 0 OR 2 & 2, 0 OR (2 & 2), (0 OR 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 2 & 2 AS `0 OR 2 & 2`,0 or 2 & 2 AS `0 OR (2 & 2)`,(0 or 2) & 2 AS `(0 OR 2) & 2`
+select 0 OR 2 & 2, 0 OR (2 & 2), (0 OR 2) & 2 union select * from v1;
+0 OR 2 & 2 0 OR (2 & 2) (0 OR 2) & 2
+1 1 0
+create or replace view v1 as select 2 OR 3 << 3, 2 OR (3 << 3), (2 OR 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 << 3 AS `2 OR 3 << 3`,2 or 3 << 3 AS `2 OR (3 << 3)`,(2 or 3) << 3 AS `(2 OR 3) << 3`
+select 2 OR 3 << 3, 2 OR (3 << 3), (2 OR 3) << 3 union select * from v1;
+2 OR 3 << 3 2 OR (3 << 3) (2 OR 3) << 3
+1 1 8
+create or replace view v1 as select 2 OR 3 >> 3, 2 OR (3 >> 3), (2 OR 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 >> 3 AS `2 OR 3 >> 3`,2 or 3 >> 3 AS `2 OR (3 >> 3)`,(2 or 3) >> 3 AS `(2 OR 3) >> 3`
+select 2 OR 3 >> 3, 2 OR (3 >> 3), (2 OR 3) >> 3 union select * from v1;
+2 OR 3 >> 3 2 OR (3 >> 3) (2 OR 3) >> 3
+1 1 0
+create or replace view v1 as select 2 OR '2000-01-01' +INTERVAL 1 DAY, 2 OR ('2000-01-01' +INTERVAL 1 DAY), (2 OR '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or '2000-01-01' + interval 1 day AS `2 OR '2000-01-01' +INTERVAL 1 DAY`,2 or '2000-01-01' + interval 1 day AS `2 OR ('2000-01-01' +INTERVAL 1 DAY)`,(2 or '2000-01-01') + interval 1 day AS `(2 OR '2000-01-01') +INTERVAL 1 DAY`
+select 2 OR '2000-01-01' +INTERVAL 1 DAY, 2 OR ('2000-01-01' +INTERVAL 1 DAY), (2 OR '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 OR '2000-01-01' +INTERVAL 1 DAY 2 OR ('2000-01-01' +INTERVAL 1 DAY) (2 OR '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 OR 3 + 3, 2 OR (3 + 3), (2 OR 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 + 3 AS `2 OR 3 + 3`,2 or 3 + 3 AS `2 OR (3 + 3)`,(2 or 3) + 3 AS `(2 OR 3) + 3`
+select 2 OR 3 + 3, 2 OR (3 + 3), (2 OR 3) + 3 union select * from v1;
+2 OR 3 + 3 2 OR (3 + 3) (2 OR 3) + 3
+1 1 4
+create or replace view v1 as select 2 OR 3 - 3, 2 OR (3 - 3), (2 OR 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 - 3 AS `2 OR 3 - 3`,2 or 3 - 3 AS `2 OR (3 - 3)`,(2 or 3) - 3 AS `(2 OR 3) - 3`
+select 2 OR 3 - 3, 2 OR (3 - 3), (2 OR 3) - 3 union select * from v1;
+2 OR 3 - 3 2 OR (3 - 3) (2 OR 3) - 3
+1 1 -2
+create or replace view v1 as select 2 OR 3 * 3, 2 OR (3 * 3), (2 OR 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 * 3 AS `2 OR 3 * 3`,2 or 3 * 3 AS `2 OR (3 * 3)`,(2 or 3) * 3 AS `(2 OR 3) * 3`
+select 2 OR 3 * 3, 2 OR (3 * 3), (2 OR 3) * 3 union select * from v1;
+2 OR 3 * 3 2 OR (3 * 3) (2 OR 3) * 3
+1 1 3
+create or replace view v1 as select 2 OR 3 / 3, 2 OR (3 / 3), (2 OR 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 / 3 AS `2 OR 3 / 3`,2 or 3 / 3 AS `2 OR (3 / 3)`,(2 or 3) / 3 AS `(2 OR 3) / 3`
+select 2 OR 3 / 3, 2 OR (3 / 3), (2 OR 3) / 3 union select * from v1;
+2 OR 3 / 3 2 OR (3 / 3) (2 OR 3) / 3
+1 1 0.3333
+create or replace view v1 as select 2 OR 3 DIV 3, 2 OR (3 DIV 3), (2 OR 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 DIV 3 AS `2 OR 3 DIV 3`,2 or 3 DIV 3 AS `2 OR (3 DIV 3)`,(2 or 3) DIV 3 AS `(2 OR 3) DIV 3`
+select 2 OR 3 DIV 3, 2 OR (3 DIV 3), (2 OR 3) DIV 3 union select * from v1;
+2 OR 3 DIV 3 2 OR (3 DIV 3) (2 OR 3) DIV 3
+1 1 0
+create or replace view v1 as select 0 OR 3 MOD 3, 0 OR (3 MOD 3), (0 OR 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 MOD 3 AS `0 OR 3 MOD 3`,0 or 3 MOD 3 AS `0 OR (3 MOD 3)`,(0 or 3) MOD 3 AS `(0 OR 3) MOD 3`
+select 0 OR 3 MOD 3, 0 OR (3 MOD 3), (0 OR 3) MOD 3 union select * from v1;
+0 OR 3 MOD 3 0 OR (3 MOD 3) (0 OR 3) MOD 3
+0 0 1
+create or replace view v1 as select 0 OR 3 % 3, 0 OR (3 % 3), (0 OR 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 MOD 3 AS `0 OR 3 % 3`,0 or 3 MOD 3 AS `0 OR (3 % 3)`,(0 or 3) MOD 3 AS `(0 OR 3) % 3`
+select 0 OR 3 % 3, 0 OR (3 % 3), (0 OR 3) % 3 union select * from v1;
+0 OR 3 % 3 0 OR (3 % 3) (0 OR 3) % 3
+0 0 1
+create or replace view v1 as select 2 OR 3 ^ 3, 2 OR (3 ^ 3), (2 OR 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 ^ 3 AS `2 OR 3 ^ 3`,2 or 3 ^ 3 AS `2 OR (3 ^ 3)`,(2 or 3) ^ 3 AS `(2 OR 3) ^ 3`
+select 2 OR 3 ^ 3, 2 OR (3 ^ 3), (2 OR 3) ^ 3 union select * from v1;
+2 OR 3 ^ 3 2 OR (3 ^ 3) (2 OR 3) ^ 3
+1 1 2
+create or replace view v1 as select 2 OR 3 BETWEEN 2 AND 3, 2 OR (3 BETWEEN 2 AND 3), (2 OR 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 between 2 and 3 AS `2 OR 3 BETWEEN 2 AND 3`,2 or 3 between 2 and 3 AS `2 OR (3 BETWEEN 2 AND 3)`,(2 or 3) between 2 and 3 AS `(2 OR 3) BETWEEN 2 AND 3`
+select 2 OR 3 BETWEEN 2 AND 3, 2 OR (3 BETWEEN 2 AND 3), (2 OR 3) BETWEEN 2 AND 3 union select * from v1;
+2 OR 3 BETWEEN 2 AND 3 2 OR (3 BETWEEN 2 AND 3) (2 OR 3) BETWEEN 2 AND 3
+1 1 0
+create or replace view v1 as select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 is false AS `2 || 3 IS FALSE`,2 or 3 is false AS `2 || (3 IS FALSE)`,(2 or 3) is false AS `(2 || 3) IS FALSE`
+select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE union select * from v1;
+2 || 3 IS FALSE 2 || (3 IS FALSE) (2 || 3) IS FALSE
+1 1 0
+create or replace view v1 as select charset(2 || 3 COLLATE latin1_bin), charset(2 || (3 COLLATE latin1_bin)), charset((2 || 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 or 3 collate latin1_bin) AS `charset(2 || 3 COLLATE latin1_bin)`,charset(2 or 3 collate latin1_bin) AS `charset(2 || (3 COLLATE latin1_bin))`,charset((2 or 3) collate latin1_bin) AS `charset((2 || 3) COLLATE latin1_bin)`
+select charset(2 || 3 COLLATE latin1_bin), charset(2 || (3 COLLATE latin1_bin)), charset((2 || 3) COLLATE latin1_bin) union select * from v1;
+charset(2 || 3 COLLATE latin1_bin) charset(2 || (3 COLLATE latin1_bin)) charset((2 || 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 in (3,10) AS `0 || 3 IN (3,10)`,0 or 3 in (3,10) AS `0 || (3 IN (3,10))`,(0 or 3) in (3,10) AS `(0 || 3) IN (3,10)`
+select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10) union select * from v1;
+0 || 3 IN (3,10) 0 || (3 IN (3,10)) (0 || 3) IN (3,10)
+1 1 0
+create or replace view v1 as select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 or 0 xor 1 AS `1 || 0 XOR 1`,1 or 0 xor 1 AS `1 || (0 XOR 1)`,(1 or 0) xor 1 AS `(1 || 0) XOR 1`
+select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1 union select * from v1;
+1 || 0 XOR 1 1 || (0 XOR 1) (1 || 0) XOR 1
+1 1 0
+create or replace view v1 as select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 or 1 and 0 AS `1 || 1 AND 0`,1 or 1 and 0 AS `1 || (1 AND 0)`,(1 or 1) and 0 AS `(1 || 1) AND 0`
+select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0 union select * from v1;
+1 || 1 AND 0 1 || (1 AND 0) (1 || 1) AND 0
+1 1 0
+create or replace view v1 as select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 or 1 and 0 AS `1 || 1 && 0`,1 or 1 and 0 AS `1 || (1 && 0)`,(1 or 1) and 0 AS `(1 || 1) && 0`
+select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0 union select * from v1;
+1 || 1 && 0 1 || (1 && 0) (1 || 1) && 0
+1 1 0
+create or replace view v1 as select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 = 3 AS `2 || 3 = 3`,2 or 3 = 3 AS `2 || (3 = 3)`,(2 or 3) = 3 AS `(2 || 3) = 3`
+select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3 union select * from v1;
+2 || 3 = 3 2 || (3 = 3) (2 || 3) = 3
+1 1 0
+create or replace view v1 as select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 <=> 3 AS `2 || 3 <=> 3`,2 or 3 <=> 3 AS `2 || (3 <=> 3)`,(2 or 3) <=> 3 AS `(2 || 3) <=> 3`
+select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3 union select * from v1;
+2 || 3 <=> 3 2 || (3 <=> 3) (2 || 3) <=> 3
+1 1 0
+create or replace view v1 as select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 >= 3 AS `2 || 3 >= 3`,2 or 3 >= 3 AS `2 || (3 >= 3)`,(2 or 3) >= 3 AS `(2 || 3) >= 3`
+select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3 union select * from v1;
+2 || 3 >= 3 2 || (3 >= 3) (2 || 3) >= 3
+1 1 0
+create or replace view v1 as select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 <= 0 AS `2 || 3 <= 0`,2 or 3 <= 0 AS `2 || (3 <= 0)`,(2 or 3) <= 0 AS `(2 || 3) <= 0`
+select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0 union select * from v1;
+2 || 3 <= 0 2 || (3 <= 0) (2 || 3) <= 0
+1 1 0
+create or replace view v1 as select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 < 0 AS `2 || 3 < 0`,2 or 3 < 0 AS `2 || (3 < 0)`,(2 or 3) < 0 AS `(2 || 3) < 0`
+select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0 union select * from v1;
+2 || 3 < 0 2 || (3 < 0) (2 || 3) < 0
+1 1 0
+create or replace view v1 as select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 <> 3 AS `0 || 3 <> 3`,0 or 3 <> 3 AS `0 || (3 <> 3)`,(0 or 3) <> 3 AS `(0 || 3) <> 3`
+select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3 union select * from v1;
+0 || 3 <> 3 0 || (3 <> 3) (0 || 3) <> 3
+0 0 1
+create or replace view v1 as select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 > 3 AS `2 || 3 > 3`,2 or 3 > 3 AS `2 || (3 > 3)`,(2 or 3) > 3 AS `(2 || 3) > 3`
+select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3 union select * from v1;
+2 || 3 > 3 2 || (3 > 3) (2 || 3) > 3
+1 1 0
+create or replace view v1 as select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 <> 3 AS `0 || 3 != 3`,0 or 3 <> 3 AS `0 || (3 != 3)`,(0 or 3) <> 3 AS `(0 || 3) != 3`
+select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3 union select * from v1;
+0 || 3 != 3 0 || (3 != 3) (0 || 3) != 3
+0 0 1
+create or replace view v1 as select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 like 3 AS `2 || 3 LIKE 3`,2 or 3 like 3 AS `2 || (3 LIKE 3)`,(2 or 3) like 3 AS `(2 || 3) LIKE 3`
+select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3 union select * from v1;
+2 || 3 LIKE 3 2 || (3 LIKE 3) (2 || 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 regexp 3 AS `2 || 3 REGEXP 3`,2 or 3 regexp 3 AS `2 || (3 REGEXP 3)`,(2 or 3) regexp 3 AS `(2 || 3) REGEXP 3`
+select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3 union select * from v1;
+2 || 3 REGEXP 3 2 || (3 REGEXP 3) (2 || 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 || 3 | 3, 2 || (3 | 3), (2 || 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 | 3 AS `2 || 3 | 3`,2 or 3 | 3 AS `2 || (3 | 3)`,(2 or 3) | 3 AS `(2 || 3) | 3`
+select 2 || 3 | 3, 2 || (3 | 3), (2 || 3) | 3 union select * from v1;
+2 || 3 | 3 2 || (3 | 3) (2 || 3) | 3
+1 1 3
+create or replace view v1 as select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 2 & 2 AS `0 || 2 & 2`,0 or 2 & 2 AS `0 || (2 & 2)`,(0 or 2) & 2 AS `(0 || 2) & 2`
+select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2 union select * from v1;
+0 || 2 & 2 0 || (2 & 2) (0 || 2) & 2
+1 1 0
+create or replace view v1 as select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 << 3 AS `2 || 3 << 3`,2 or 3 << 3 AS `2 || (3 << 3)`,(2 or 3) << 3 AS `(2 || 3) << 3`
+select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3 union select * from v1;
+2 || 3 << 3 2 || (3 << 3) (2 || 3) << 3
+1 1 8
+create or replace view v1 as select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 >> 3 AS `2 || 3 >> 3`,2 or 3 >> 3 AS `2 || (3 >> 3)`,(2 or 3) >> 3 AS `(2 || 3) >> 3`
+select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3 union select * from v1;
+2 || 3 >> 3 2 || (3 >> 3) (2 || 3) >> 3
+1 1 0
+create or replace view v1 as select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or '2000-01-01' + interval 1 day AS `2 || '2000-01-01' +INTERVAL 1 DAY`,2 or '2000-01-01' + interval 1 day AS `2 || ('2000-01-01' +INTERVAL 1 DAY)`,(2 or '2000-01-01') + interval 1 day AS `(2 || '2000-01-01') +INTERVAL 1 DAY`
+select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 || '2000-01-01' +INTERVAL 1 DAY 2 || ('2000-01-01' +INTERVAL 1 DAY) (2 || '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 || 3 + 3, 2 || (3 + 3), (2 || 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 + 3 AS `2 || 3 + 3`,2 or 3 + 3 AS `2 || (3 + 3)`,(2 or 3) + 3 AS `(2 || 3) + 3`
+select 2 || 3 + 3, 2 || (3 + 3), (2 || 3) + 3 union select * from v1;
+2 || 3 + 3 2 || (3 + 3) (2 || 3) + 3
+1 1 4
+create or replace view v1 as select 2 || 3 - 3, 2 || (3 - 3), (2 || 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 - 3 AS `2 || 3 - 3`,2 or 3 - 3 AS `2 || (3 - 3)`,(2 or 3) - 3 AS `(2 || 3) - 3`
+select 2 || 3 - 3, 2 || (3 - 3), (2 || 3) - 3 union select * from v1;
+2 || 3 - 3 2 || (3 - 3) (2 || 3) - 3
+1 1 -2
+create or replace view v1 as select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 * 3 AS `2 || 3 * 3`,2 or 3 * 3 AS `2 || (3 * 3)`,(2 or 3) * 3 AS `(2 || 3) * 3`
+select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3 union select * from v1;
+2 || 3 * 3 2 || (3 * 3) (2 || 3) * 3
+1 1 3
+create or replace view v1 as select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 / 3 AS `2 || 3 / 3`,2 or 3 / 3 AS `2 || (3 / 3)`,(2 or 3) / 3 AS `(2 || 3) / 3`
+select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3 union select * from v1;
+2 || 3 / 3 2 || (3 / 3) (2 || 3) / 3
+1 1 0.3333
+create or replace view v1 as select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 DIV 3 AS `2 || 3 DIV 3`,2 or 3 DIV 3 AS `2 || (3 DIV 3)`,(2 or 3) DIV 3 AS `(2 || 3) DIV 3`
+select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3 union select * from v1;
+2 || 3 DIV 3 2 || (3 DIV 3) (2 || 3) DIV 3
+1 1 0
+create or replace view v1 as select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 MOD 3 AS `0 || 3 MOD 3`,0 or 3 MOD 3 AS `0 || (3 MOD 3)`,(0 or 3) MOD 3 AS `(0 || 3) MOD 3`
+select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3 union select * from v1;
+0 || 3 MOD 3 0 || (3 MOD 3) (0 || 3) MOD 3
+0 0 1
+create or replace view v1 as select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 MOD 3 AS `0 || 3 % 3`,0 or 3 MOD 3 AS `0 || (3 % 3)`,(0 or 3) MOD 3 AS `(0 || 3) % 3`
+select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3 union select * from v1;
+0 || 3 % 3 0 || (3 % 3) (0 || 3) % 3
+0 0 1
+create or replace view v1 as select 2 || 3 ^ 3, 2 || (3 ^ 3), (2 || 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 ^ 3 AS `2 || 3 ^ 3`,2 or 3 ^ 3 AS `2 || (3 ^ 3)`,(2 or 3) ^ 3 AS `(2 || 3) ^ 3`
+select 2 || 3 ^ 3, 2 || (3 ^ 3), (2 || 3) ^ 3 union select * from v1;
+2 || 3 ^ 3 2 || (3 ^ 3) (2 || 3) ^ 3
+1 1 2
+create or replace view v1 as select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or 3 between 2 and 3 AS `2 || 3 BETWEEN 2 AND 3`,2 or 3 between 2 and 3 AS `2 || (3 BETWEEN 2 AND 3)`,(2 or 3) between 2 and 3 AS `(2 || 3) BETWEEN 2 AND 3`
+select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3 union select * from v1;
+2 || 3 BETWEEN 2 AND 3 2 || (3 BETWEEN 2 AND 3) (2 || 3) BETWEEN 2 AND 3
+1 1 0
+create or replace view v1 as select charset(2 XOR 3 COLLATE latin1_bin), charset(2 XOR (3 COLLATE latin1_bin)), charset((2 XOR 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 xor 3 collate latin1_bin) AS `charset(2 XOR 3 COLLATE latin1_bin)`,charset(2 xor 3 collate latin1_bin) AS `charset(2 XOR (3 COLLATE latin1_bin))`,charset((2 xor 3) collate latin1_bin) AS `charset((2 XOR 3) COLLATE latin1_bin)`
+select charset(2 XOR 3 COLLATE latin1_bin), charset(2 XOR (3 COLLATE latin1_bin)), charset((2 XOR 3) COLLATE latin1_bin) union select * from v1;
+charset(2 XOR 3 COLLATE latin1_bin) charset(2 XOR (3 COLLATE latin1_bin)) charset((2 XOR 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 XOR 3 IN (4,5), 2 XOR (3 IN (4,5)), (2 XOR 3) IN (4,5);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 in (4,5) AS `2 XOR 3 IN (4,5)`,2 xor 3 in (4,5) AS `2 XOR (3 IN (4,5))`,(2 xor 3) in (4,5) AS `(2 XOR 3) IN (4,5)`
+select 2 XOR 3 IN (4,5), 2 XOR (3 IN (4,5)), (2 XOR 3) IN (4,5) union select * from v1;
+2 XOR 3 IN (4,5) 2 XOR (3 IN (4,5)) (2 XOR 3) IN (4,5)
+1 1 0
+create or replace view v1 as select 2 XOR 3 OR 3, 2 XOR (3 OR 3), (2 XOR 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 or 3 AS `2 XOR 3 OR 3`,2 xor (3 or 3) AS `2 XOR (3 OR 3)`,2 xor 3 or 3 AS `(2 XOR 3) OR 3`
+select 2 XOR 3 OR 3, 2 XOR (3 OR 3), (2 XOR 3) OR 3 union select * from v1;
+2 XOR 3 OR 3 2 XOR (3 OR 3) (2 XOR 3) OR 3
+1 0 1
+create or replace view v1 as select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 or 3 AS `2 XOR 3 || 3`,2 xor (3 or 3) AS `2 XOR (3 || 3)`,2 xor 3 or 3 AS `(2 XOR 3) || 3`
+select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3 union select * from v1;
+2 XOR 3 || 3 2 XOR (3 || 3) (2 XOR 3) || 3
+1 0 1
+create or replace view v1 as select 2 XOR 0 AND 0, 2 XOR (0 AND 0), (2 XOR 0) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 0 and 0 AS `2 XOR 0 AND 0`,2 xor 0 and 0 AS `2 XOR (0 AND 0)`,(2 xor 0) and 0 AS `(2 XOR 0) AND 0`
+select 2 XOR 0 AND 0, 2 XOR (0 AND 0), (2 XOR 0) AND 0 union select * from v1;
+2 XOR 0 AND 0 2 XOR (0 AND 0) (2 XOR 0) AND 0
+1 1 0
+create or replace view v1 as select 2 XOR 0 && 0, 2 XOR (0 && 0), (2 XOR 0) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 0 and 0 AS `2 XOR 0 && 0`,2 xor 0 and 0 AS `2 XOR (0 && 0)`,(2 xor 0) and 0 AS `(2 XOR 0) && 0`
+select 2 XOR 0 && 0, 2 XOR (0 && 0), (2 XOR 0) && 0 union select * from v1;
+2 XOR 0 && 0 2 XOR (0 && 0) (2 XOR 0) && 0
+1 1 0
+create or replace view v1 as select 2 XOR 2 = 3, 2 XOR (2 = 3), (2 XOR 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 2 = 3 AS `2 XOR 2 = 3`,2 xor 2 = 3 AS `2 XOR (2 = 3)`,(2 xor 2) = 3 AS `(2 XOR 2) = 3`
+select 2 XOR 2 = 3, 2 XOR (2 = 3), (2 XOR 2) = 3 union select * from v1;
+2 XOR 2 = 3 2 XOR (2 = 3) (2 XOR 2) = 3
+1 1 0
+create or replace view v1 as select NULL XOR 3 <=> 3, NULL XOR (3 <=> 3), (NULL XOR 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select NULL xor 3 <=> 3 AS `NULL XOR 3 <=> 3`,NULL xor 3 <=> 3 AS `NULL XOR (3 <=> 3)`,(NULL xor 3) <=> 3 AS `(NULL XOR 3) <=> 3`
+select NULL XOR 3 <=> 3, NULL XOR (3 <=> 3), (NULL XOR 3) <=> 3 union select * from v1;
+NULL XOR 3 <=> 3 NULL XOR (3 <=> 3) (NULL XOR 3) <=> 3
+NULL NULL 0
+create or replace view v1 as select 2 XOR 1 >= 3, 2 XOR (1 >= 3), (2 XOR 1) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 1 >= 3 AS `2 XOR 1 >= 3`,2 xor 1 >= 3 AS `2 XOR (1 >= 3)`,(2 xor 1) >= 3 AS `(2 XOR 1) >= 3`
+select 2 XOR 1 >= 3, 2 XOR (1 >= 3), (2 XOR 1) >= 3 union select * from v1;
+2 XOR 1 >= 3 2 XOR (1 >= 3) (2 XOR 1) >= 3
+1 1 0
+create or replace view v1 as select 2 XOR 3 <= 3, 2 XOR (3 <= 3), (2 XOR 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 <= 3 AS `2 XOR 3 <= 3`,2 xor 3 <= 3 AS `2 XOR (3 <= 3)`,(2 xor 3) <= 3 AS `(2 XOR 3) <= 3`
+select 2 XOR 3 <= 3, 2 XOR (3 <= 3), (2 XOR 3) <= 3 union select * from v1;
+2 XOR 3 <= 3 2 XOR (3 <= 3) (2 XOR 3) <= 3
+0 0 1
+create or replace view v1 as select 2 XOR 1 < 3, 2 XOR (1 < 3), (2 XOR 1) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 1 < 3 AS `2 XOR 1 < 3`,2 xor 1 < 3 AS `2 XOR (1 < 3)`,(2 xor 1) < 3 AS `(2 XOR 1) < 3`
+select 2 XOR 1 < 3, 2 XOR (1 < 3), (2 XOR 1) < 3 union select * from v1;
+2 XOR 1 < 3 2 XOR (1 < 3) (2 XOR 1) < 3
+0 0 1
+create or replace view v1 as select 2 XOR 2 <> 3, 2 XOR (2 <> 3), (2 XOR 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 2 <> 3 AS `2 XOR 2 <> 3`,2 xor 2 <> 3 AS `2 XOR (2 <> 3)`,(2 xor 2) <> 3 AS `(2 XOR 2) <> 3`
+select 2 XOR 2 <> 3, 2 XOR (2 <> 3), (2 XOR 2) <> 3 union select * from v1;
+2 XOR 2 <> 3 2 XOR (2 <> 3) (2 XOR 2) <> 3
+0 0 1
+create or replace view v1 as select 2 XOR 3 > 3, 2 XOR (3 > 3), (2 XOR 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 > 3 AS `2 XOR 3 > 3`,2 xor 3 > 3 AS `2 XOR (3 > 3)`,(2 xor 3) > 3 AS `(2 XOR 3) > 3`
+select 2 XOR 3 > 3, 2 XOR (3 > 3), (2 XOR 3) > 3 union select * from v1;
+2 XOR 3 > 3 2 XOR (3 > 3) (2 XOR 3) > 3
+1 1 0
+create or replace view v1 as select 2 XOR 2 != 3, 2 XOR (2 != 3), (2 XOR 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 2 <> 3 AS `2 XOR 2 != 3`,2 xor 2 <> 3 AS `2 XOR (2 != 3)`,(2 xor 2) <> 3 AS `(2 XOR 2) != 3`
+select 2 XOR 2 != 3, 2 XOR (2 != 3), (2 XOR 2) != 3 union select * from v1;
+2 XOR 2 != 3 2 XOR (2 != 3) (2 XOR 2) != 3
+0 0 1
+create or replace view v1 as select 2 XOR 1 LIKE 3, 2 XOR (1 LIKE 3), (2 XOR 1) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 1 like 3 AS `2 XOR 1 LIKE 3`,2 xor 1 like 3 AS `2 XOR (1 LIKE 3)`,(2 xor 1) like 3 AS `(2 XOR 1) LIKE 3`
+select 2 XOR 1 LIKE 3, 2 XOR (1 LIKE 3), (2 XOR 1) LIKE 3 union select * from v1;
+2 XOR 1 LIKE 3 2 XOR (1 LIKE 3) (2 XOR 1) LIKE 3
+1 1 0
+create or replace view v1 as select 2 XOR 1 REGEXP 3, 2 XOR (1 REGEXP 3), (2 XOR 1) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 1 regexp 3 AS `2 XOR 1 REGEXP 3`,2 xor 1 regexp 3 AS `2 XOR (1 REGEXP 3)`,(2 xor 1) regexp 3 AS `(2 XOR 1) REGEXP 3`
+select 2 XOR 1 REGEXP 3, 2 XOR (1 REGEXP 3), (2 XOR 1) REGEXP 3 union select * from v1;
+2 XOR 1 REGEXP 3 2 XOR (1 REGEXP 3) (2 XOR 1) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 XOR 3 | 3, 2 XOR (3 | 3), (2 XOR 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 | 3 AS `2 XOR 3 | 3`,2 xor 3 | 3 AS `2 XOR (3 | 3)`,(2 xor 3) | 3 AS `(2 XOR 3) | 3`
+select 2 XOR 3 | 3, 2 XOR (3 | 3), (2 XOR 3) | 3 union select * from v1;
+2 XOR 3 | 3 2 XOR (3 | 3) (2 XOR 3) | 3
+0 0 3
+create or replace view v1 as select 2 XOR 0 & 0, 2 XOR (0 & 0), (2 XOR 0) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 0 & 0 AS `2 XOR 0 & 0`,2 xor 0 & 0 AS `2 XOR (0 & 0)`,(2 xor 0) & 0 AS `(2 XOR 0) & 0`
+select 2 XOR 0 & 0, 2 XOR (0 & 0), (2 XOR 0) & 0 union select * from v1;
+2 XOR 0 & 0 2 XOR (0 & 0) (2 XOR 0) & 0
+1 1 0
+create or replace view v1 as select 0 XOR 3 << 3, 0 XOR (3 << 3), (0 XOR 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 xor 3 << 3 AS `0 XOR 3 << 3`,0 xor 3 << 3 AS `0 XOR (3 << 3)`,(0 xor 3) << 3 AS `(0 XOR 3) << 3`
+select 0 XOR 3 << 3, 0 XOR (3 << 3), (0 XOR 3) << 3 union select * from v1;
+0 XOR 3 << 3 0 XOR (3 << 3) (0 XOR 3) << 3
+1 1 8
+create or replace view v1 as select 2 XOR 3 >> 3, 2 XOR (3 >> 3), (2 XOR 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 >> 3 AS `2 XOR 3 >> 3`,2 xor 3 >> 3 AS `2 XOR (3 >> 3)`,(2 xor 3) >> 3 AS `(2 XOR 3) >> 3`
+select 2 XOR 3 >> 3, 2 XOR (3 >> 3), (2 XOR 3) >> 3 union select * from v1;
+2 XOR 3 >> 3 2 XOR (3 >> 3) (2 XOR 3) >> 3
+1 1 0
+create or replace view v1 as select 2 XOR '2000-01-01' +INTERVAL 1 DAY, 2 XOR ('2000-01-01' +INTERVAL 1 DAY), (2 XOR '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor '2000-01-01' + interval 1 day AS `2 XOR '2000-01-01' +INTERVAL 1 DAY`,2 xor '2000-01-01' + interval 1 day AS `2 XOR ('2000-01-01' +INTERVAL 1 DAY)`,(2 xor '2000-01-01') + interval 1 day AS `(2 XOR '2000-01-01') +INTERVAL 1 DAY`
+select 2 XOR '2000-01-01' +INTERVAL 1 DAY, 2 XOR ('2000-01-01' +INTERVAL 1 DAY), (2 XOR '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 XOR '2000-01-01' +INTERVAL 1 DAY 2 XOR ('2000-01-01' +INTERVAL 1 DAY) (2 XOR '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 XOR 3 + 3, 2 XOR (3 + 3), (2 XOR 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 + 3 AS `2 XOR 3 + 3`,2 xor 3 + 3 AS `2 XOR (3 + 3)`,(2 xor 3) + 3 AS `(2 XOR 3) + 3`
+select 2 XOR 3 + 3, 2 XOR (3 + 3), (2 XOR 3) + 3 union select * from v1;
+2 XOR 3 + 3 2 XOR (3 + 3) (2 XOR 3) + 3
+0 0 3
+create or replace view v1 as select 2 XOR 3 - 3, 2 XOR (3 - 3), (2 XOR 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 - 3 AS `2 XOR 3 - 3`,2 xor 3 - 3 AS `2 XOR (3 - 3)`,(2 xor 3) - 3 AS `(2 XOR 3) - 3`
+select 2 XOR 3 - 3, 2 XOR (3 - 3), (2 XOR 3) - 3 union select * from v1;
+2 XOR 3 - 3 2 XOR (3 - 3) (2 XOR 3) - 3
+1 1 -3
+create or replace view v1 as select 0 XOR 3 * 3, 0 XOR (3 * 3), (0 XOR 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 xor 3 * 3 AS `0 XOR 3 * 3`,0 xor 3 * 3 AS `0 XOR (3 * 3)`,(0 xor 3) * 3 AS `(0 XOR 3) * 3`
+select 0 XOR 3 * 3, 0 XOR (3 * 3), (0 XOR 3) * 3 union select * from v1;
+0 XOR 3 * 3 0 XOR (3 * 3) (0 XOR 3) * 3
+1 1 3
+create or replace view v1 as select 0 XOR 3 / 3, 0 XOR (3 / 3), (0 XOR 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 xor 3 / 3 AS `0 XOR 3 / 3`,0 xor 3 / 3 AS `0 XOR (3 / 3)`,(0 xor 3) / 3 AS `(0 XOR 3) / 3`
+select 0 XOR 3 / 3, 0 XOR (3 / 3), (0 XOR 3) / 3 union select * from v1;
+0 XOR 3 / 3 0 XOR (3 / 3) (0 XOR 3) / 3
+1 1 0.3333
+create or replace view v1 as select 0 XOR 3 DIV 3, 0 XOR (3 DIV 3), (0 XOR 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 xor 3 DIV 3 AS `0 XOR 3 DIV 3`,0 xor 3 DIV 3 AS `0 XOR (3 DIV 3)`,(0 xor 3) DIV 3 AS `(0 XOR 3) DIV 3`
+select 0 XOR 3 DIV 3, 0 XOR (3 DIV 3), (0 XOR 3) DIV 3 union select * from v1;
+0 XOR 3 DIV 3 0 XOR (3 DIV 3) (0 XOR 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 XOR 3 MOD 3, 2 XOR (3 MOD 3), (2 XOR 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 MOD 3 AS `2 XOR 3 MOD 3`,2 xor 3 MOD 3 AS `2 XOR (3 MOD 3)`,(2 xor 3) MOD 3 AS `(2 XOR 3) MOD 3`
+select 2 XOR 3 MOD 3, 2 XOR (3 MOD 3), (2 XOR 3) MOD 3 union select * from v1;
+2 XOR 3 MOD 3 2 XOR (3 MOD 3) (2 XOR 3) MOD 3
+1 1 0
+create or replace view v1 as select 2 XOR 3 % 3, 2 XOR (3 % 3), (2 XOR 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 MOD 3 AS `2 XOR 3 % 3`,2 xor 3 MOD 3 AS `2 XOR (3 % 3)`,(2 xor 3) MOD 3 AS `(2 XOR 3) % 3`
+select 2 XOR 3 % 3, 2 XOR (3 % 3), (2 XOR 3) % 3 union select * from v1;
+2 XOR 3 % 3 2 XOR (3 % 3) (2 XOR 3) % 3
+1 1 0
+create or replace view v1 as select 2 XOR 3 ^ 3, 2 XOR (3 ^ 3), (2 XOR 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 ^ 3 AS `2 XOR 3 ^ 3`,2 xor 3 ^ 3 AS `2 XOR (3 ^ 3)`,(2 xor 3) ^ 3 AS `(2 XOR 3) ^ 3`
+select 2 XOR 3 ^ 3, 2 XOR (3 ^ 3), (2 XOR 3) ^ 3 union select * from v1;
+2 XOR 3 ^ 3 2 XOR (3 ^ 3) (2 XOR 3) ^ 3
+1 1 3
+create or replace view v1 as select 2 XOR 3 BETWEEN 0 AND 3, 2 XOR (3 BETWEEN 0 AND 3), (2 XOR 3) BETWEEN 0 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 between 0 and 3 AS `2 XOR 3 BETWEEN 0 AND 3`,2 xor 3 between 0 and 3 AS `2 XOR (3 BETWEEN 0 AND 3)`,(2 xor 3) between 0 and 3 AS `(2 XOR 3) BETWEEN 0 AND 3`
+select 2 XOR 3 BETWEEN 0 AND 3, 2 XOR (3 BETWEEN 0 AND 3), (2 XOR 3) BETWEEN 0 AND 3 union select * from v1;
+2 XOR 3 BETWEEN 0 AND 3 2 XOR (3 BETWEEN 0 AND 3) (2 XOR 3) BETWEEN 0 AND 3
+0 0 1
+create or replace view v1 as select 0 AND 3 IS FALSE, 0 AND (3 IS FALSE), (0 AND 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 is false AS `0 AND 3 IS FALSE`,0 and 3 is false AS `0 AND (3 IS FALSE)`,(0 and 3) is false AS `(0 AND 3) IS FALSE`
+select 0 AND 3 IS FALSE, 0 AND (3 IS FALSE), (0 AND 3) IS FALSE union select * from v1;
+0 AND 3 IS FALSE 0 AND (3 IS FALSE) (0 AND 3) IS FALSE
+0 0 1
+create or replace view v1 as select charset(2 AND 3 COLLATE latin1_bin), charset(2 AND (3 COLLATE latin1_bin)), charset((2 AND 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 and 3 collate latin1_bin) AS `charset(2 AND 3 COLLATE latin1_bin)`,charset(2 and 3 collate latin1_bin) AS `charset(2 AND (3 COLLATE latin1_bin))`,charset((2 and 3) collate latin1_bin) AS `charset((2 AND 3) COLLATE latin1_bin)`
+select charset(2 AND 3 COLLATE latin1_bin), charset(2 AND (3 COLLATE latin1_bin)), charset((2 AND 3) COLLATE latin1_bin) union select * from v1;
+charset(2 AND 3 COLLATE latin1_bin) charset(2 AND (3 COLLATE latin1_bin)) charset((2 AND 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 AND 3 IN (0,1), 2 AND (3 IN (0,1)), (2 AND 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 in (0,1) AS `2 AND 3 IN (0,1)`,2 and 3 in (0,1) AS `2 AND (3 IN (0,1))`,(2 and 3) in (0,1) AS `(2 AND 3) IN (0,1)`
+select 2 AND 3 IN (0,1), 2 AND (3 IN (0,1)), (2 AND 3) IN (0,1) union select * from v1;
+2 AND 3 IN (0,1) 2 AND (3 IN (0,1)) (2 AND 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 0 AND 3 OR 3, 0 AND (3 OR 3), (0 AND 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 or 3 AS `0 AND 3 OR 3`,0 and (3 or 3) AS `0 AND (3 OR 3)`,0 and 3 or 3 AS `(0 AND 3) OR 3`
+select 0 AND 3 OR 3, 0 AND (3 OR 3), (0 AND 3) OR 3 union select * from v1;
+0 AND 3 OR 3 0 AND (3 OR 3) (0 AND 3) OR 3
+1 0 1
+create or replace view v1 as select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 or 3 AS `0 AND 3 || 3`,0 and (3 or 3) AS `0 AND (3 || 3)`,0 and 3 or 3 AS `(0 AND 3) || 3`
+select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3 union select * from v1;
+0 AND 3 || 3 0 AND (3 || 3) (0 AND 3) || 3
+1 0 1
+create or replace view v1 as select 0 AND 3 XOR 3, 0 AND (3 XOR 3), (0 AND 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 xor 3 AS `0 AND 3 XOR 3`,0 and (3 xor 3) AS `0 AND (3 XOR 3)`,0 and 3 xor 3 AS `(0 AND 3) XOR 3`
+select 0 AND 3 XOR 3, 0 AND (3 XOR 3), (0 AND 3) XOR 3 union select * from v1;
+0 AND 3 XOR 3 0 AND (3 XOR 3) (0 AND 3) XOR 3
+1 0 1
+create or replace view v1 as select 2 AND 3 = 3, 2 AND (3 = 3), (2 AND 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 = 3 AS `2 AND 3 = 3`,2 and 3 = 3 AS `2 AND (3 = 3)`,(2 and 3) = 3 AS `(2 AND 3) = 3`
+select 2 AND 3 = 3, 2 AND (3 = 3), (2 AND 3) = 3 union select * from v1;
+2 AND 3 = 3 2 AND (3 = 3) (2 AND 3) = 3
+1 1 0
+create or replace view v1 as select 2 AND 3 <=> 3, 2 AND (3 <=> 3), (2 AND 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 <=> 3 AS `2 AND 3 <=> 3`,2 and 3 <=> 3 AS `2 AND (3 <=> 3)`,(2 and 3) <=> 3 AS `(2 AND 3) <=> 3`
+select 2 AND 3 <=> 3, 2 AND (3 <=> 3), (2 AND 3) <=> 3 union select * from v1;
+2 AND 3 <=> 3 2 AND (3 <=> 3) (2 AND 3) <=> 3
+1 1 0
+create or replace view v1 as select 2 AND 3 >= 3, 2 AND (3 >= 3), (2 AND 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 >= 3 AS `2 AND 3 >= 3`,2 and 3 >= 3 AS `2 AND (3 >= 3)`,(2 and 3) >= 3 AS `(2 AND 3) >= 3`
+select 2 AND 3 >= 3, 2 AND (3 >= 3), (2 AND 3) >= 3 union select * from v1;
+2 AND 3 >= 3 2 AND (3 >= 3) (2 AND 3) >= 3
+1 1 0
+create or replace view v1 as select 2 AND 4 <= 3, 2 AND (4 <= 3), (2 AND 4) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 4 <= 3 AS `2 AND 4 <= 3`,2 and 4 <= 3 AS `2 AND (4 <= 3)`,(2 and 4) <= 3 AS `(2 AND 4) <= 3`
+select 2 AND 4 <= 3, 2 AND (4 <= 3), (2 AND 4) <= 3 union select * from v1;
+2 AND 4 <= 3 2 AND (4 <= 3) (2 AND 4) <= 3
+0 0 1
+create or replace view v1 as select 2 AND 3 < 3, 2 AND (3 < 3), (2 AND 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 < 3 AS `2 AND 3 < 3`,2 and 3 < 3 AS `2 AND (3 < 3)`,(2 and 3) < 3 AS `(2 AND 3) < 3`
+select 2 AND 3 < 3, 2 AND (3 < 3), (2 AND 3) < 3 union select * from v1;
+2 AND 3 < 3 2 AND (3 < 3) (2 AND 3) < 3
+0 0 1
+create or replace view v1 as select 2 AND 3 <> 3, 2 AND (3 <> 3), (2 AND 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 <> 3 AS `2 AND 3 <> 3`,2 and 3 <> 3 AS `2 AND (3 <> 3)`,(2 and 3) <> 3 AS `(2 AND 3) <> 3`
+select 2 AND 3 <> 3, 2 AND (3 <> 3), (2 AND 3) <> 3 union select * from v1;
+2 AND 3 <> 3 2 AND (3 <> 3) (2 AND 3) <> 3
+0 0 1
+create or replace view v1 as select 2 AND 3 > 1, 2 AND (3 > 1), (2 AND 3) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 > 1 AS `2 AND 3 > 1`,2 and 3 > 1 AS `2 AND (3 > 1)`,(2 and 3) > 1 AS `(2 AND 3) > 1`
+select 2 AND 3 > 1, 2 AND (3 > 1), (2 AND 3) > 1 union select * from v1;
+2 AND 3 > 1 2 AND (3 > 1) (2 AND 3) > 1
+1 1 0
+create or replace view v1 as select 2 AND 3 != 3, 2 AND (3 != 3), (2 AND 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 <> 3 AS `2 AND 3 != 3`,2 and 3 <> 3 AS `2 AND (3 != 3)`,(2 and 3) <> 3 AS `(2 AND 3) != 3`
+select 2 AND 3 != 3, 2 AND (3 != 3), (2 AND 3) != 3 union select * from v1;
+2 AND 3 != 3 2 AND (3 != 3) (2 AND 3) != 3
+0 0 1
+create or replace view v1 as select 2 AND 3 LIKE 3, 2 AND (3 LIKE 3), (2 AND 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 like 3 AS `2 AND 3 LIKE 3`,2 and 3 like 3 AS `2 AND (3 LIKE 3)`,(2 and 3) like 3 AS `(2 AND 3) LIKE 3`
+select 2 AND 3 LIKE 3, 2 AND (3 LIKE 3), (2 AND 3) LIKE 3 union select * from v1;
+2 AND 3 LIKE 3 2 AND (3 LIKE 3) (2 AND 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 AND 3 REGEXP 3, 2 AND (3 REGEXP 3), (2 AND 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 regexp 3 AS `2 AND 3 REGEXP 3`,2 and 3 regexp 3 AS `2 AND (3 REGEXP 3)`,(2 and 3) regexp 3 AS `(2 AND 3) REGEXP 3`
+select 2 AND 3 REGEXP 3, 2 AND (3 REGEXP 3), (2 AND 3) REGEXP 3 union select * from v1;
+2 AND 3 REGEXP 3 2 AND (3 REGEXP 3) (2 AND 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 AND 3 | 3, 2 AND (3 | 3), (2 AND 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 | 3 AS `2 AND 3 | 3`,2 and 3 | 3 AS `2 AND (3 | 3)`,(2 and 3) | 3 AS `(2 AND 3) | 3`
+select 2 AND 3 | 3, 2 AND (3 | 3), (2 AND 3) | 3 union select * from v1;
+2 AND 3 | 3 2 AND (3 | 3) (2 AND 3) | 3
+1 1 3
+create or replace view v1 as select 2 AND 2 & 2, 2 AND (2 & 2), (2 AND 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 2 & 2 AS `2 AND 2 & 2`,2 and 2 & 2 AS `2 AND (2 & 2)`,(2 and 2) & 2 AS `(2 AND 2) & 2`
+select 2 AND 2 & 2, 2 AND (2 & 2), (2 AND 2) & 2 union select * from v1;
+2 AND 2 & 2 2 AND (2 & 2) (2 AND 2) & 2
+1 1 0
+create or replace view v1 as select 2 AND 3 << 3, 2 AND (3 << 3), (2 AND 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 << 3 AS `2 AND 3 << 3`,2 and 3 << 3 AS `2 AND (3 << 3)`,(2 and 3) << 3 AS `(2 AND 3) << 3`
+select 2 AND 3 << 3, 2 AND (3 << 3), (2 AND 3) << 3 union select * from v1;
+2 AND 3 << 3 2 AND (3 << 3) (2 AND 3) << 3
+1 1 8
+create or replace view v1 as select 2 AND 3 >> 1, 2 AND (3 >> 1), (2 AND 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 >> 1 AS `2 AND 3 >> 1`,2 and 3 >> 1 AS `2 AND (3 >> 1)`,(2 and 3) >> 1 AS `(2 AND 3) >> 1`
+select 2 AND 3 >> 1, 2 AND (3 >> 1), (2 AND 3) >> 1 union select * from v1;
+2 AND 3 >> 1 2 AND (3 >> 1) (2 AND 3) >> 1
+1 1 0
+create or replace view v1 as select 2 AND '2000-01-01' +INTERVAL 1 DAY, 2 AND ('2000-01-01' +INTERVAL 1 DAY), (2 AND '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and '2000-01-01' + interval 1 day AS `2 AND '2000-01-01' +INTERVAL 1 DAY`,2 and '2000-01-01' + interval 1 day AS `2 AND ('2000-01-01' +INTERVAL 1 DAY)`,(2 and '2000-01-01') + interval 1 day AS `(2 AND '2000-01-01') +INTERVAL 1 DAY`
+select 2 AND '2000-01-01' +INTERVAL 1 DAY, 2 AND ('2000-01-01' +INTERVAL 1 DAY), (2 AND '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 AND '2000-01-01' +INTERVAL 1 DAY 2 AND ('2000-01-01' +INTERVAL 1 DAY) (2 AND '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 AND 3 + 3, 2 AND (3 + 3), (2 AND 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 + 3 AS `2 AND 3 + 3`,2 and 3 + 3 AS `2 AND (3 + 3)`,(2 and 3) + 3 AS `(2 AND 3) + 3`
+select 2 AND 3 + 3, 2 AND (3 + 3), (2 AND 3) + 3 union select * from v1;
+2 AND 3 + 3 2 AND (3 + 3) (2 AND 3) + 3
+1 1 4
+create or replace view v1 as select 2 AND 3 - 3, 2 AND (3 - 3), (2 AND 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 - 3 AS `2 AND 3 - 3`,2 and 3 - 3 AS `2 AND (3 - 3)`,(2 and 3) - 3 AS `(2 AND 3) - 3`
+select 2 AND 3 - 3, 2 AND (3 - 3), (2 AND 3) - 3 union select * from v1;
+2 AND 3 - 3 2 AND (3 - 3) (2 AND 3) - 3
+0 0 -2
+create or replace view v1 as select 2 AND 3 * 3, 2 AND (3 * 3), (2 AND 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 * 3 AS `2 AND 3 * 3`,2 and 3 * 3 AS `2 AND (3 * 3)`,(2 and 3) * 3 AS `(2 AND 3) * 3`
+select 2 AND 3 * 3, 2 AND (3 * 3), (2 AND 3) * 3 union select * from v1;
+2 AND 3 * 3 2 AND (3 * 3) (2 AND 3) * 3
+1 1 3
+create or replace view v1 as select 2 AND 3 / 3, 2 AND (3 / 3), (2 AND 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 / 3 AS `2 AND 3 / 3`,2 and 3 / 3 AS `2 AND (3 / 3)`,(2 and 3) / 3 AS `(2 AND 3) / 3`
+select 2 AND 3 / 3, 2 AND (3 / 3), (2 AND 3) / 3 union select * from v1;
+2 AND 3 / 3 2 AND (3 / 3) (2 AND 3) / 3
+1 1 0.3333
+create or replace view v1 as select 2 AND 3 DIV 3, 2 AND (3 DIV 3), (2 AND 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 DIV 3 AS `2 AND 3 DIV 3`,2 and 3 DIV 3 AS `2 AND (3 DIV 3)`,(2 and 3) DIV 3 AS `(2 AND 3) DIV 3`
+select 2 AND 3 DIV 3, 2 AND (3 DIV 3), (2 AND 3) DIV 3 union select * from v1;
+2 AND 3 DIV 3 2 AND (3 DIV 3) (2 AND 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 AND 3 MOD 3, 2 AND (3 MOD 3), (2 AND 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 MOD 3 AS `2 AND 3 MOD 3`,2 and 3 MOD 3 AS `2 AND (3 MOD 3)`,(2 and 3) MOD 3 AS `(2 AND 3) MOD 3`
+select 2 AND 3 MOD 3, 2 AND (3 MOD 3), (2 AND 3) MOD 3 union select * from v1;
+2 AND 3 MOD 3 2 AND (3 MOD 3) (2 AND 3) MOD 3
+0 0 1
+create or replace view v1 as select 2 AND 3 % 3, 2 AND (3 % 3), (2 AND 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 MOD 3 AS `2 AND 3 % 3`,2 and 3 MOD 3 AS `2 AND (3 % 3)`,(2 and 3) MOD 3 AS `(2 AND 3) % 3`
+select 2 AND 3 % 3, 2 AND (3 % 3), (2 AND 3) % 3 union select * from v1;
+2 AND 3 % 3 2 AND (3 % 3) (2 AND 3) % 3
+0 0 1
+create or replace view v1 as select 2 AND 3 ^ 3, 2 AND (3 ^ 3), (2 AND 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 ^ 3 AS `2 AND 3 ^ 3`,2 and 3 ^ 3 AS `2 AND (3 ^ 3)`,(2 and 3) ^ 3 AS `(2 AND 3) ^ 3`
+select 2 AND 3 ^ 3, 2 AND (3 ^ 3), (2 AND 3) ^ 3 union select * from v1;
+2 AND 3 ^ 3 2 AND (3 ^ 3) (2 AND 3) ^ 3
+0 0 2
+create or replace view v1 as select 2 AND 3 BETWEEN 2 AND 3, 2 AND (3 BETWEEN 2 AND 3), (2 AND 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 between 2 and 3 AS `2 AND 3 BETWEEN 2 AND 3`,2 and 3 between 2 and 3 AS `2 AND (3 BETWEEN 2 AND 3)`,(2 and 3) between 2 and 3 AS `(2 AND 3) BETWEEN 2 AND 3`
+select 2 AND 3 BETWEEN 2 AND 3, 2 AND (3 BETWEEN 2 AND 3), (2 AND 3) BETWEEN 2 AND 3 union select * from v1;
+2 AND 3 BETWEEN 2 AND 3 2 AND (3 BETWEEN 2 AND 3) (2 AND 3) BETWEEN 2 AND 3
+1 1 0
+create or replace view v1 as select 0 && 3 IS FALSE, 0 && (3 IS FALSE), (0 && 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 is false AS `0 && 3 IS FALSE`,0 and 3 is false AS `0 && (3 IS FALSE)`,(0 and 3) is false AS `(0 && 3) IS FALSE`
+select 0 && 3 IS FALSE, 0 && (3 IS FALSE), (0 && 3) IS FALSE union select * from v1;
+0 && 3 IS FALSE 0 && (3 IS FALSE) (0 && 3) IS FALSE
+0 0 1
+create or replace view v1 as select charset(2 && 3 COLLATE latin1_bin), charset(2 && (3 COLLATE latin1_bin)), charset((2 && 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 and 3 collate latin1_bin) AS `charset(2 && 3 COLLATE latin1_bin)`,charset(2 and 3 collate latin1_bin) AS `charset(2 && (3 COLLATE latin1_bin))`,charset((2 and 3) collate latin1_bin) AS `charset((2 && 3) COLLATE latin1_bin)`
+select charset(2 && 3 COLLATE latin1_bin), charset(2 && (3 COLLATE latin1_bin)), charset((2 && 3) COLLATE latin1_bin) union select * from v1;
+charset(2 && 3 COLLATE latin1_bin) charset(2 && (3 COLLATE latin1_bin)) charset((2 && 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 && 3 IN (0,1), 2 && (3 IN (0,1)), (2 && 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 in (0,1) AS `2 && 3 IN (0,1)`,2 and 3 in (0,1) AS `2 && (3 IN (0,1))`,(2 and 3) in (0,1) AS `(2 && 3) IN (0,1)`
+select 2 && 3 IN (0,1), 2 && (3 IN (0,1)), (2 && 3) IN (0,1) union select * from v1;
+2 && 3 IN (0,1) 2 && (3 IN (0,1)) (2 && 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 0 && 3 OR 3, 0 && (3 OR 3), (0 && 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 or 3 AS `0 && 3 OR 3`,0 and (3 or 3) AS `0 && (3 OR 3)`,0 and 3 or 3 AS `(0 && 3) OR 3`
+select 0 && 3 OR 3, 0 && (3 OR 3), (0 && 3) OR 3 union select * from v1;
+0 && 3 OR 3 0 && (3 OR 3) (0 && 3) OR 3
+1 0 1
+create or replace view v1 as select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 or 3 AS `0 && 3 || 3`,0 and (3 or 3) AS `0 && (3 || 3)`,0 and 3 or 3 AS `(0 && 3) || 3`
+select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3 union select * from v1;
+0 && 3 || 3 0 && (3 || 3) (0 && 3) || 3
+1 0 1
+create or replace view v1 as select 0 && 3 XOR 3, 0 && (3 XOR 3), (0 && 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and 3 xor 3 AS `0 && 3 XOR 3`,0 and (3 xor 3) AS `0 && (3 XOR 3)`,0 and 3 xor 3 AS `(0 && 3) XOR 3`
+select 0 && 3 XOR 3, 0 && (3 XOR 3), (0 && 3) XOR 3 union select * from v1;
+0 && 3 XOR 3 0 && (3 XOR 3) (0 && 3) XOR 3
+1 0 1
+create or replace view v1 as select 2 && 3 = 3, 2 && (3 = 3), (2 && 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 = 3 AS `2 && 3 = 3`,2 and 3 = 3 AS `2 && (3 = 3)`,(2 and 3) = 3 AS `(2 && 3) = 3`
+select 2 && 3 = 3, 2 && (3 = 3), (2 && 3) = 3 union select * from v1;
+2 && 3 = 3 2 && (3 = 3) (2 && 3) = 3
+1 1 0
+create or replace view v1 as select 2 && 3 <=> 3, 2 && (3 <=> 3), (2 && 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 <=> 3 AS `2 && 3 <=> 3`,2 and 3 <=> 3 AS `2 && (3 <=> 3)`,(2 and 3) <=> 3 AS `(2 && 3) <=> 3`
+select 2 && 3 <=> 3, 2 && (3 <=> 3), (2 && 3) <=> 3 union select * from v1;
+2 && 3 <=> 3 2 && (3 <=> 3) (2 && 3) <=> 3
+1 1 0
+create or replace view v1 as select 2 && 3 >= 3, 2 && (3 >= 3), (2 && 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 >= 3 AS `2 && 3 >= 3`,2 and 3 >= 3 AS `2 && (3 >= 3)`,(2 and 3) >= 3 AS `(2 && 3) >= 3`
+select 2 && 3 >= 3, 2 && (3 >= 3), (2 && 3) >= 3 union select * from v1;
+2 && 3 >= 3 2 && (3 >= 3) (2 && 3) >= 3
+1 1 0
+create or replace view v1 as select 2 && 4 <= 3, 2 && (4 <= 3), (2 && 4) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 4 <= 3 AS `2 && 4 <= 3`,2 and 4 <= 3 AS `2 && (4 <= 3)`,(2 and 4) <= 3 AS `(2 && 4) <= 3`
+select 2 && 4 <= 3, 2 && (4 <= 3), (2 && 4) <= 3 union select * from v1;
+2 && 4 <= 3 2 && (4 <= 3) (2 && 4) <= 3
+0 0 1
+create or replace view v1 as select 2 && 3 < 3, 2 && (3 < 3), (2 && 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 < 3 AS `2 && 3 < 3`,2 and 3 < 3 AS `2 && (3 < 3)`,(2 and 3) < 3 AS `(2 && 3) < 3`
+select 2 && 3 < 3, 2 && (3 < 3), (2 && 3) < 3 union select * from v1;
+2 && 3 < 3 2 && (3 < 3) (2 && 3) < 3
+0 0 1
+create or replace view v1 as select 2 && 3 <> 3, 2 && (3 <> 3), (2 && 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 <> 3 AS `2 && 3 <> 3`,2 and 3 <> 3 AS `2 && (3 <> 3)`,(2 and 3) <> 3 AS `(2 && 3) <> 3`
+select 2 && 3 <> 3, 2 && (3 <> 3), (2 && 3) <> 3 union select * from v1;
+2 && 3 <> 3 2 && (3 <> 3) (2 && 3) <> 3
+0 0 1
+create or replace view v1 as select 2 && 3 > 1, 2 && (3 > 1), (2 && 3) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 > 1 AS `2 && 3 > 1`,2 and 3 > 1 AS `2 && (3 > 1)`,(2 and 3) > 1 AS `(2 && 3) > 1`
+select 2 && 3 > 1, 2 && (3 > 1), (2 && 3) > 1 union select * from v1;
+2 && 3 > 1 2 && (3 > 1) (2 && 3) > 1
+1 1 0
+create or replace view v1 as select 2 && 3 != 3, 2 && (3 != 3), (2 && 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 <> 3 AS `2 && 3 != 3`,2 and 3 <> 3 AS `2 && (3 != 3)`,(2 and 3) <> 3 AS `(2 && 3) != 3`
+select 2 && 3 != 3, 2 && (3 != 3), (2 && 3) != 3 union select * from v1;
+2 && 3 != 3 2 && (3 != 3) (2 && 3) != 3
+0 0 1
+create or replace view v1 as select 2 && 3 LIKE 3, 2 && (3 LIKE 3), (2 && 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 like 3 AS `2 && 3 LIKE 3`,2 and 3 like 3 AS `2 && (3 LIKE 3)`,(2 and 3) like 3 AS `(2 && 3) LIKE 3`
+select 2 && 3 LIKE 3, 2 && (3 LIKE 3), (2 && 3) LIKE 3 union select * from v1;
+2 && 3 LIKE 3 2 && (3 LIKE 3) (2 && 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 && 3 REGEXP 3, 2 && (3 REGEXP 3), (2 && 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 regexp 3 AS `2 && 3 REGEXP 3`,2 and 3 regexp 3 AS `2 && (3 REGEXP 3)`,(2 and 3) regexp 3 AS `(2 && 3) REGEXP 3`
+select 2 && 3 REGEXP 3, 2 && (3 REGEXP 3), (2 && 3) REGEXP 3 union select * from v1;
+2 && 3 REGEXP 3 2 && (3 REGEXP 3) (2 && 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 && 3 | 3, 2 && (3 | 3), (2 && 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 | 3 AS `2 && 3 | 3`,2 and 3 | 3 AS `2 && (3 | 3)`,(2 and 3) | 3 AS `(2 && 3) | 3`
+select 2 && 3 | 3, 2 && (3 | 3), (2 && 3) | 3 union select * from v1;
+2 && 3 | 3 2 && (3 | 3) (2 && 3) | 3
+1 1 3
+create or replace view v1 as select 2 && 2 & 2, 2 && (2 & 2), (2 && 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 2 & 2 AS `2 && 2 & 2`,2 and 2 & 2 AS `2 && (2 & 2)`,(2 and 2) & 2 AS `(2 && 2) & 2`
+select 2 && 2 & 2, 2 && (2 & 2), (2 && 2) & 2 union select * from v1;
+2 && 2 & 2 2 && (2 & 2) (2 && 2) & 2
+1 1 0
+create or replace view v1 as select 2 && 3 << 3, 2 && (3 << 3), (2 && 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 << 3 AS `2 && 3 << 3`,2 and 3 << 3 AS `2 && (3 << 3)`,(2 and 3) << 3 AS `(2 && 3) << 3`
+select 2 && 3 << 3, 2 && (3 << 3), (2 && 3) << 3 union select * from v1;
+2 && 3 << 3 2 && (3 << 3) (2 && 3) << 3
+1 1 8
+create or replace view v1 as select 2 && 3 >> 1, 2 && (3 >> 1), (2 && 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 >> 1 AS `2 && 3 >> 1`,2 and 3 >> 1 AS `2 && (3 >> 1)`,(2 and 3) >> 1 AS `(2 && 3) >> 1`
+select 2 && 3 >> 1, 2 && (3 >> 1), (2 && 3) >> 1 union select * from v1;
+2 && 3 >> 1 2 && (3 >> 1) (2 && 3) >> 1
+1 1 0
+create or replace view v1 as select 2 && '2000-01-01' +INTERVAL 1 DAY, 2 && ('2000-01-01' +INTERVAL 1 DAY), (2 && '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and '2000-01-01' + interval 1 day AS `2 && '2000-01-01' +INTERVAL 1 DAY`,2 and '2000-01-01' + interval 1 day AS `2 && ('2000-01-01' +INTERVAL 1 DAY)`,(2 and '2000-01-01') + interval 1 day AS `(2 && '2000-01-01') +INTERVAL 1 DAY`
+select 2 && '2000-01-01' +INTERVAL 1 DAY, 2 && ('2000-01-01' +INTERVAL 1 DAY), (2 && '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 && '2000-01-01' +INTERVAL 1 DAY 2 && ('2000-01-01' +INTERVAL 1 DAY) (2 && '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 && 3 + 3, 2 && (3 + 3), (2 && 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 + 3 AS `2 && 3 + 3`,2 and 3 + 3 AS `2 && (3 + 3)`,(2 and 3) + 3 AS `(2 && 3) + 3`
+select 2 && 3 + 3, 2 && (3 + 3), (2 && 3) + 3 union select * from v1;
+2 && 3 + 3 2 && (3 + 3) (2 && 3) + 3
+1 1 4
+create or replace view v1 as select 2 && 3 - 3, 2 && (3 - 3), (2 && 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 - 3 AS `2 && 3 - 3`,2 and 3 - 3 AS `2 && (3 - 3)`,(2 and 3) - 3 AS `(2 && 3) - 3`
+select 2 && 3 - 3, 2 && (3 - 3), (2 && 3) - 3 union select * from v1;
+2 && 3 - 3 2 && (3 - 3) (2 && 3) - 3
+0 0 -2
+create or replace view v1 as select 2 && 3 * 3, 2 && (3 * 3), (2 && 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 * 3 AS `2 && 3 * 3`,2 and 3 * 3 AS `2 && (3 * 3)`,(2 and 3) * 3 AS `(2 && 3) * 3`
+select 2 && 3 * 3, 2 && (3 * 3), (2 && 3) * 3 union select * from v1;
+2 && 3 * 3 2 && (3 * 3) (2 && 3) * 3
+1 1 3
+create or replace view v1 as select 2 && 3 / 3, 2 && (3 / 3), (2 && 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 / 3 AS `2 && 3 / 3`,2 and 3 / 3 AS `2 && (3 / 3)`,(2 and 3) / 3 AS `(2 && 3) / 3`
+select 2 && 3 / 3, 2 && (3 / 3), (2 && 3) / 3 union select * from v1;
+2 && 3 / 3 2 && (3 / 3) (2 && 3) / 3
+1 1 0.3333
+create or replace view v1 as select 2 && 3 DIV 3, 2 && (3 DIV 3), (2 && 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 DIV 3 AS `2 && 3 DIV 3`,2 and 3 DIV 3 AS `2 && (3 DIV 3)`,(2 and 3) DIV 3 AS `(2 && 3) DIV 3`
+select 2 && 3 DIV 3, 2 && (3 DIV 3), (2 && 3) DIV 3 union select * from v1;
+2 && 3 DIV 3 2 && (3 DIV 3) (2 && 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 && 3 MOD 3, 2 && (3 MOD 3), (2 && 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 MOD 3 AS `2 && 3 MOD 3`,2 and 3 MOD 3 AS `2 && (3 MOD 3)`,(2 and 3) MOD 3 AS `(2 && 3) MOD 3`
+select 2 && 3 MOD 3, 2 && (3 MOD 3), (2 && 3) MOD 3 union select * from v1;
+2 && 3 MOD 3 2 && (3 MOD 3) (2 && 3) MOD 3
+0 0 1
+create or replace view v1 as select 2 && 3 % 3, 2 && (3 % 3), (2 && 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 MOD 3 AS `2 && 3 % 3`,2 and 3 MOD 3 AS `2 && (3 % 3)`,(2 and 3) MOD 3 AS `(2 && 3) % 3`
+select 2 && 3 % 3, 2 && (3 % 3), (2 && 3) % 3 union select * from v1;
+2 && 3 % 3 2 && (3 % 3) (2 && 3) % 3
+0 0 1
+create or replace view v1 as select 2 && 3 ^ 3, 2 && (3 ^ 3), (2 && 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 ^ 3 AS `2 && 3 ^ 3`,2 and 3 ^ 3 AS `2 && (3 ^ 3)`,(2 and 3) ^ 3 AS `(2 && 3) ^ 3`
+select 2 && 3 ^ 3, 2 && (3 ^ 3), (2 && 3) ^ 3 union select * from v1;
+2 && 3 ^ 3 2 && (3 ^ 3) (2 && 3) ^ 3
+0 0 2
+create or replace view v1 as select 2 && 3 BETWEEN 2 AND 3, 2 && (3 BETWEEN 2 AND 3), (2 && 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 between 2 and 3 AS `2 && 3 BETWEEN 2 AND 3`,2 and 3 between 2 and 3 AS `2 && (3 BETWEEN 2 AND 3)`,(2 and 3) between 2 and 3 AS `(2 && 3) BETWEEN 2 AND 3`
+select 2 && 3 BETWEEN 2 AND 3, 2 && (3 BETWEEN 2 AND 3), (2 && 3) BETWEEN 2 AND 3 union select * from v1;
+2 && 3 BETWEEN 2 AND 3 2 && (3 BETWEEN 2 AND 3) (2 && 3) BETWEEN 2 AND 3
+1 1 0
+create or replace view v1 as select 2 = 3 IS FALSE, 2 = (3 IS FALSE), (2 = 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 is false AS `2 = 3 IS FALSE`,2 = (3 is false) AS `2 = (3 IS FALSE)`,2 = 3 is false AS `(2 = 3) IS FALSE`
+select 2 = 3 IS FALSE, 2 = (3 IS FALSE), (2 = 3) IS FALSE union select * from v1;
+2 = 3 IS FALSE 2 = (3 IS FALSE) (2 = 3) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 = 3 COLLATE latin1_bin), charset(2 = (3 COLLATE latin1_bin)), charset((2 = 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 = 3 collate latin1_bin) AS `charset(2 = 3 COLLATE latin1_bin)`,charset(2 = 3 collate latin1_bin) AS `charset(2 = (3 COLLATE latin1_bin))`,charset((2 = 3) collate latin1_bin) AS `charset((2 = 3) COLLATE latin1_bin)`
+select charset(2 = 3 COLLATE latin1_bin), charset(2 = (3 COLLATE latin1_bin)), charset((2 = 3) COLLATE latin1_bin) union select * from v1;
+charset(2 = 3 COLLATE latin1_bin) charset(2 = (3 COLLATE latin1_bin)) charset((2 = 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 = 3 IN (0,1), 2 = (3 IN (0,1)), (2 = 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 in (0,1) AS `2 = 3 IN (0,1)`,2 = 3 in (0,1) AS `2 = (3 IN (0,1))`,(2 = 3) in (0,1) AS `(2 = 3) IN (0,1)`
+select 2 = 3 IN (0,1), 2 = (3 IN (0,1)), (2 = 3) IN (0,1) union select * from v1;
+2 = 3 IN (0,1) 2 = (3 IN (0,1)) (2 = 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 2 = 3 OR 3, 2 = (3 OR 3), (2 = 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 or 3 AS `2 = 3 OR 3`,2 = (3 or 3) AS `2 = (3 OR 3)`,2 = 3 or 3 AS `(2 = 3) OR 3`
+select 2 = 3 OR 3, 2 = (3 OR 3), (2 = 3) OR 3 union select * from v1;
+2 = 3 OR 3 2 = (3 OR 3) (2 = 3) OR 3
+1 0 1
+create or replace view v1 as select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 or 3 AS `2 = 3 || 3`,2 = (3 or 3) AS `2 = (3 || 3)`,2 = 3 or 3 AS `(2 = 3) || 3`
+select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3 union select * from v1;
+2 = 3 || 3 2 = (3 || 3) (2 = 3) || 3
+1 0 1
+create or replace view v1 as select 2 = 3 XOR 3, 2 = (3 XOR 3), (2 = 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 xor 3 AS `2 = 3 XOR 3`,2 = (3 xor 3) AS `2 = (3 XOR 3)`,2 = 3 xor 3 AS `(2 = 3) XOR 3`
+select 2 = 3 XOR 3, 2 = (3 XOR 3), (2 = 3) XOR 3 union select * from v1;
+2 = 3 XOR 3 2 = (3 XOR 3) (2 = 3) XOR 3
+1 0 1
+create or replace view v1 as select 2 = 2 AND 2, 2 = (2 AND 2), (2 = 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 2 and 2 AS `2 = 2 AND 2`,2 = (2 and 2) AS `2 = (2 AND 2)`,2 = 2 and 2 AS `(2 = 2) AND 2`
+select 2 = 2 AND 2, 2 = (2 AND 2), (2 = 2) AND 2 union select * from v1;
+2 = 2 AND 2 2 = (2 AND 2) (2 = 2) AND 2
+1 0 1
+create or replace view v1 as select 2 = 2 && 2, 2 = (2 && 2), (2 = 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 2 and 2 AS `2 = 2 && 2`,2 = (2 and 2) AS `2 = (2 && 2)`,2 = 2 and 2 AS `(2 = 2) && 2`
+select 2 = 2 && 2, 2 = (2 && 2), (2 = 2) && 2 union select * from v1;
+2 = 2 && 2 2 = (2 && 2) (2 = 2) && 2
+1 0 1
+create or replace view v1 as select 1 = 3 = 3, 1 = (3 = 3), (1 = 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 = 3 AS `1 = 3 = 3`,1 = (3 = 3) AS `1 = (3 = 3)`,1 = 3 = 3 AS `(1 = 3) = 3`
+select 1 = 3 = 3, 1 = (3 = 3), (1 = 3) = 3 union select * from v1;
+1 = 3 = 3 1 = (3 = 3) (1 = 3) = 3
+0 1 0
+create or replace view v1 as select 1 = 3 <=> 3, 1 = (3 <=> 3), (1 = 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 <=> 3 AS `1 = 3 <=> 3`,1 = (3 <=> 3) AS `1 = (3 <=> 3)`,1 = 3 <=> 3 AS `(1 = 3) <=> 3`
+select 1 = 3 <=> 3, 1 = (3 <=> 3), (1 = 3) <=> 3 union select * from v1;
+1 = 3 <=> 3 1 = (3 <=> 3) (1 = 3) <=> 3
+0 1 0
+create or replace view v1 as select 1 = 3 >= 3, 1 = (3 >= 3), (1 = 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 >= 3 AS `1 = 3 >= 3`,1 = (3 >= 3) AS `1 = (3 >= 3)`,1 = 3 >= 3 AS `(1 = 3) >= 3`
+select 1 = 3 >= 3, 1 = (3 >= 3), (1 = 3) >= 3 union select * from v1;
+1 = 3 >= 3 1 = (3 >= 3) (1 = 3) >= 3
+0 1 0
+create or replace view v1 as select 2 = 3 <= 3, 2 = (3 <= 3), (2 = 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 <= 3 AS `2 = 3 <= 3`,2 = (3 <= 3) AS `2 = (3 <= 3)`,2 = 3 <= 3 AS `(2 = 3) <= 3`
+select 2 = 3 <= 3, 2 = (3 <= 3), (2 = 3) <= 3 union select * from v1;
+2 = 3 <= 3 2 = (3 <= 3) (2 = 3) <= 3
+1 0 1
+create or replace view v1 as select 2 = 3 < 3, 2 = (3 < 3), (2 = 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 < 3 AS `2 = 3 < 3`,2 = (3 < 3) AS `2 = (3 < 3)`,2 = 3 < 3 AS `(2 = 3) < 3`
+select 2 = 3 < 3, 2 = (3 < 3), (2 = 3) < 3 union select * from v1;
+2 = 3 < 3 2 = (3 < 3) (2 = 3) < 3
+1 0 1
+create or replace view v1 as select 2 = 3 <> 3, 2 = (3 <> 3), (2 = 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 <> 3 AS `2 = 3 <> 3`,2 = (3 <> 3) AS `2 = (3 <> 3)`,2 = 3 <> 3 AS `(2 = 3) <> 3`
+select 2 = 3 <> 3, 2 = (3 <> 3), (2 = 3) <> 3 union select * from v1;
+2 = 3 <> 3 2 = (3 <> 3) (2 = 3) <> 3
+1 0 1
+create or replace view v1 as select 0 = 3 > 3, 0 = (3 > 3), (0 = 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 = 3 > 3 AS `0 = 3 > 3`,0 = (3 > 3) AS `0 = (3 > 3)`,0 = 3 > 3 AS `(0 = 3) > 3`
+select 0 = 3 > 3, 0 = (3 > 3), (0 = 3) > 3 union select * from v1;
+0 = 3 > 3 0 = (3 > 3) (0 = 3) > 3
+0 1 0
+create or replace view v1 as select 2 = 3 != 3, 2 = (3 != 3), (2 = 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 <> 3 AS `2 = 3 != 3`,2 = (3 <> 3) AS `2 = (3 != 3)`,2 = 3 <> 3 AS `(2 = 3) != 3`
+select 2 = 3 != 3, 2 = (3 != 3), (2 = 3) != 3 union select * from v1;
+2 = 3 != 3 2 = (3 != 3) (2 = 3) != 3
+1 0 1
+create or replace view v1 as select 1 = 3 LIKE 3, 1 = (3 LIKE 3), (1 = 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 like 3 AS `1 = 3 LIKE 3`,1 = 3 like 3 AS `1 = (3 LIKE 3)`,(1 = 3) like 3 AS `(1 = 3) LIKE 3`
+select 1 = 3 LIKE 3, 1 = (3 LIKE 3), (1 = 3) LIKE 3 union select * from v1;
+1 = 3 LIKE 3 1 = (3 LIKE 3) (1 = 3) LIKE 3
+1 1 0
+create or replace view v1 as select 1 = 3 REGEXP 3, 1 = (3 REGEXP 3), (1 = 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 regexp 3 AS `1 = 3 REGEXP 3`,1 = 3 regexp 3 AS `1 = (3 REGEXP 3)`,(1 = 3) regexp 3 AS `(1 = 3) REGEXP 3`
+select 1 = 3 REGEXP 3, 1 = (3 REGEXP 3), (1 = 3) REGEXP 3 union select * from v1;
+1 = 3 REGEXP 3 1 = (3 REGEXP 3) (1 = 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 = 3 | 3, 2 = (3 | 3), (2 = 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 | 3 AS `2 = 3 | 3`,2 = 3 | 3 AS `2 = (3 | 3)`,(2 = 3) | 3 AS `(2 = 3) | 3`
+select 2 = 3 | 3, 2 = (3 | 3), (2 = 3) | 3 union select * from v1;
+2 = 3 | 3 2 = (3 | 3) (2 = 3) | 3
+0 0 3
+create or replace view v1 as select 2 = 3 & 2, 2 = (3 & 2), (2 = 3) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 & 2 AS `2 = 3 & 2`,2 = 3 & 2 AS `2 = (3 & 2)`,(2 = 3) & 2 AS `(2 = 3) & 2`
+select 2 = 3 & 2, 2 = (3 & 2), (2 = 3) & 2 union select * from v1;
+2 = 3 & 2 2 = (3 & 2) (2 = 3) & 2
+1 1 0
+create or replace view v1 as select 3 = 3 << 3, 3 = (3 << 3), (3 = 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 = 3 << 3 AS `3 = 3 << 3`,3 = 3 << 3 AS `3 = (3 << 3)`,(3 = 3) << 3 AS `(3 = 3) << 3`
+select 3 = 3 << 3, 3 = (3 << 3), (3 = 3) << 3 union select * from v1;
+3 = 3 << 3 3 = (3 << 3) (3 = 3) << 3
+0 0 8
+create or replace view v1 as select 1 = 3 >> 1, 1 = (3 >> 1), (1 = 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 >> 1 AS `1 = 3 >> 1`,1 = 3 >> 1 AS `1 = (3 >> 1)`,(1 = 3) >> 1 AS `(1 = 3) >> 1`
+select 1 = 3 >> 1, 1 = (3 >> 1), (1 = 3) >> 1 union select * from v1;
+1 = 3 >> 1 1 = (3 >> 1) (1 = 3) >> 1
+1 1 0
+create or replace view v1 as select 2 = '2000-01-01' +INTERVAL 1 DAY, 2 = ('2000-01-01' +INTERVAL 1 DAY), (2 = '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = '2000-01-01' + interval 1 day AS `2 = '2000-01-01' +INTERVAL 1 DAY`,2 = '2000-01-01' + interval 1 day AS `2 = ('2000-01-01' +INTERVAL 1 DAY)`,(2 = '2000-01-01') + interval 1 day AS `(2 = '2000-01-01') +INTERVAL 1 DAY`
+select 2 = '2000-01-01' +INTERVAL 1 DAY, 2 = ('2000-01-01' +INTERVAL 1 DAY), (2 = '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 = '2000-01-01' +INTERVAL 1 DAY 2 = ('2000-01-01' +INTERVAL 1 DAY) (2 = '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 = 3 + 3, 2 = (3 + 3), (2 = 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 + 3 AS `2 = 3 + 3`,2 = 3 + 3 AS `2 = (3 + 3)`,(2 = 3) + 3 AS `(2 = 3) + 3`
+select 2 = 3 + 3, 2 = (3 + 3), (2 = 3) + 3 union select * from v1;
+2 = 3 + 3 2 = (3 + 3) (2 = 3) + 3
+0 0 3
+create or replace view v1 as select 2 = 3 - 3, 2 = (3 - 3), (2 = 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 - 3 AS `2 = 3 - 3`,2 = 3 - 3 AS `2 = (3 - 3)`,(2 = 3) - 3 AS `(2 = 3) - 3`
+select 2 = 3 - 3, 2 = (3 - 3), (2 = 3) - 3 union select * from v1;
+2 = 3 - 3 2 = (3 - 3) (2 = 3) - 3
+0 0 -3
+create or replace view v1 as select 3 = 3 * 3, 3 = (3 * 3), (3 = 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 = 3 * 3 AS `3 = 3 * 3`,3 = 3 * 3 AS `3 = (3 * 3)`,(3 = 3) * 3 AS `(3 = 3) * 3`
+select 3 = 3 * 3, 3 = (3 * 3), (3 = 3) * 3 union select * from v1;
+3 = 3 * 3 3 = (3 * 3) (3 = 3) * 3
+0 0 3
+create or replace view v1 as select 3 = 9 / 3, 3 = (9 / 3), (3 = 9) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 = 9 / 3 AS `3 = 9 / 3`,3 = 9 / 3 AS `3 = (9 / 3)`,(3 = 9) / 3 AS `(3 = 9) / 3`
+select 3 = 9 / 3, 3 = (9 / 3), (3 = 9) / 3 union select * from v1;
+3 = 9 / 3 3 = (9 / 3) (3 = 9) / 3
+1 1 0.0000
+create or replace view v1 as select 3 = 9 DIV 3, 3 = (9 DIV 3), (3 = 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 = 9 DIV 3 AS `3 = 9 DIV 3`,3 = 9 DIV 3 AS `3 = (9 DIV 3)`,(3 = 9) DIV 3 AS `(3 = 9) DIV 3`
+select 3 = 9 DIV 3, 3 = (9 DIV 3), (3 = 9) DIV 3 union select * from v1;
+3 = 9 DIV 3 3 = (9 DIV 3) (3 = 9) DIV 3
+1 1 0
+create or replace view v1 as select 3 = 3 MOD 3, 3 = (3 MOD 3), (3 = 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 = 3 MOD 3 AS `3 = 3 MOD 3`,3 = 3 MOD 3 AS `3 = (3 MOD 3)`,(3 = 3) MOD 3 AS `(3 = 3) MOD 3`
+select 3 = 3 MOD 3, 3 = (3 MOD 3), (3 = 3) MOD 3 union select * from v1;
+3 = 3 MOD 3 3 = (3 MOD 3) (3 = 3) MOD 3
+0 0 1
+create or replace view v1 as select 3 = 3 % 3, 3 = (3 % 3), (3 = 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 = 3 MOD 3 AS `3 = 3 % 3`,3 = 3 MOD 3 AS `3 = (3 % 3)`,(3 = 3) MOD 3 AS `(3 = 3) % 3`
+select 3 = 3 % 3, 3 = (3 % 3), (3 = 3) % 3 union select * from v1;
+3 = 3 % 3 3 = (3 % 3) (3 = 3) % 3
+0 0 1
+create or replace view v1 as select 2 = 3 ^ 3, 2 = (3 ^ 3), (2 = 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 ^ 3 AS `2 = 3 ^ 3`,2 = 3 ^ 3 AS `2 = (3 ^ 3)`,(2 = 3) ^ 3 AS `(2 = 3) ^ 3`
+select 2 = 3 ^ 3, 2 = (3 ^ 3), (2 = 3) ^ 3 union select * from v1;
+2 = 3 ^ 3 2 = (3 ^ 3) (2 = 3) ^ 3
+0 0 3
+create or replace view v1 as select 1 = 3 BETWEEN 1 AND 3, 1 = (3 BETWEEN 1 AND 3), (1 = 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 = 3 between 1 and 3 AS `1 = 3 BETWEEN 1 AND 3`,1 = 3 between 1 and 3 AS `1 = (3 BETWEEN 1 AND 3)`,(1 = 3) between 1 and 3 AS `(1 = 3) BETWEEN 1 AND 3`
+select 1 = 3 BETWEEN 1 AND 3, 1 = (3 BETWEEN 1 AND 3), (1 = 3) BETWEEN 1 AND 3 union select * from v1;
+1 = 3 BETWEEN 1 AND 3 1 = (3 BETWEEN 1 AND 3) (1 = 3) BETWEEN 1 AND 3
+1 1 0
+create or replace view v1 as select 2 <=> 3 IS FALSE, 2 <=> (3 IS FALSE), (2 <=> 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 is false AS `2 <=> 3 IS FALSE`,2 <=> (3 is false) AS `2 <=> (3 IS FALSE)`,2 <=> 3 is false AS `(2 <=> 3) IS FALSE`
+select 2 <=> 3 IS FALSE, 2 <=> (3 IS FALSE), (2 <=> 3) IS FALSE union select * from v1;
+2 <=> 3 IS FALSE 2 <=> (3 IS FALSE) (2 <=> 3) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 <=> 3 COLLATE latin1_bin), charset(2 <=> (3 COLLATE latin1_bin)), charset((2 <=> 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 <=> 3 collate latin1_bin) AS `charset(2 <=> 3 COLLATE latin1_bin)`,charset(2 <=> 3 collate latin1_bin) AS `charset(2 <=> (3 COLLATE latin1_bin))`,charset((2 <=> 3) collate latin1_bin) AS `charset((2 <=> 3) COLLATE latin1_bin)`
+select charset(2 <=> 3 COLLATE latin1_bin), charset(2 <=> (3 COLLATE latin1_bin)), charset((2 <=> 3) COLLATE latin1_bin) union select * from v1;
+charset(2 <=> 3 COLLATE latin1_bin) charset(2 <=> (3 COLLATE latin1_bin)) charset((2 <=> 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 <=> 3 IN (0,1), 2 <=> (3 IN (0,1)), (2 <=> 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 in (0,1) AS `2 <=> 3 IN (0,1)`,2 <=> 3 in (0,1) AS `2 <=> (3 IN (0,1))`,(2 <=> 3) in (0,1) AS `(2 <=> 3) IN (0,1)`
+select 2 <=> 3 IN (0,1), 2 <=> (3 IN (0,1)), (2 <=> 3) IN (0,1) union select * from v1;
+2 <=> 3 IN (0,1) 2 <=> (3 IN (0,1)) (2 <=> 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 2 <=> 3 OR 3, 2 <=> (3 OR 3), (2 <=> 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 or 3 AS `2 <=> 3 OR 3`,2 <=> (3 or 3) AS `2 <=> (3 OR 3)`,2 <=> 3 or 3 AS `(2 <=> 3) OR 3`
+select 2 <=> 3 OR 3, 2 <=> (3 OR 3), (2 <=> 3) OR 3 union select * from v1;
+2 <=> 3 OR 3 2 <=> (3 OR 3) (2 <=> 3) OR 3
+1 0 1
+create or replace view v1 as select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 or 3 AS `2 <=> 3 || 3`,2 <=> (3 or 3) AS `2 <=> (3 || 3)`,2 <=> 3 or 3 AS `(2 <=> 3) || 3`
+select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3 union select * from v1;
+2 <=> 3 || 3 2 <=> (3 || 3) (2 <=> 3) || 3
+1 0 1
+create or replace view v1 as select 2 <=> 3 XOR 3, 2 <=> (3 XOR 3), (2 <=> 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 xor 3 AS `2 <=> 3 XOR 3`,2 <=> (3 xor 3) AS `2 <=> (3 XOR 3)`,2 <=> 3 xor 3 AS `(2 <=> 3) XOR 3`
+select 2 <=> 3 XOR 3, 2 <=> (3 XOR 3), (2 <=> 3) XOR 3 union select * from v1;
+2 <=> 3 XOR 3 2 <=> (3 XOR 3) (2 <=> 3) XOR 3
+1 0 1
+create or replace view v1 as select 2 <=> 2 AND 2, 2 <=> (2 AND 2), (2 <=> 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 2 and 2 AS `2 <=> 2 AND 2`,2 <=> (2 and 2) AS `2 <=> (2 AND 2)`,2 <=> 2 and 2 AS `(2 <=> 2) AND 2`
+select 2 <=> 2 AND 2, 2 <=> (2 AND 2), (2 <=> 2) AND 2 union select * from v1;
+2 <=> 2 AND 2 2 <=> (2 AND 2) (2 <=> 2) AND 2
+1 0 1
+create or replace view v1 as select 2 <=> 2 && 2, 2 <=> (2 && 2), (2 <=> 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 2 and 2 AS `2 <=> 2 && 2`,2 <=> (2 and 2) AS `2 <=> (2 && 2)`,2 <=> 2 and 2 AS `(2 <=> 2) && 2`
+select 2 <=> 2 && 2, 2 <=> (2 && 2), (2 <=> 2) && 2 union select * from v1;
+2 <=> 2 && 2 2 <=> (2 && 2) (2 <=> 2) && 2
+1 0 1
+create or replace view v1 as select 1 <=> 3 = 3, 1 <=> (3 = 3), (1 <=> 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 = 3 AS `1 <=> 3 = 3`,1 <=> (3 = 3) AS `1 <=> (3 = 3)`,1 <=> 3 = 3 AS `(1 <=> 3) = 3`
+select 1 <=> 3 = 3, 1 <=> (3 = 3), (1 <=> 3) = 3 union select * from v1;
+1 <=> 3 = 3 1 <=> (3 = 3) (1 <=> 3) = 3
+0 1 0
+create or replace view v1 as select 1 <=> 3 <=> 3, 1 <=> (3 <=> 3), (1 <=> 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 <=> 3 AS `1 <=> 3 <=> 3`,1 <=> (3 <=> 3) AS `1 <=> (3 <=> 3)`,1 <=> 3 <=> 3 AS `(1 <=> 3) <=> 3`
+select 1 <=> 3 <=> 3, 1 <=> (3 <=> 3), (1 <=> 3) <=> 3 union select * from v1;
+1 <=> 3 <=> 3 1 <=> (3 <=> 3) (1 <=> 3) <=> 3
+0 1 0
+create or replace view v1 as select 1 <=> 3 >= 3, 1 <=> (3 >= 3), (1 <=> 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 >= 3 AS `1 <=> 3 >= 3`,1 <=> (3 >= 3) AS `1 <=> (3 >= 3)`,1 <=> 3 >= 3 AS `(1 <=> 3) >= 3`
+select 1 <=> 3 >= 3, 1 <=> (3 >= 3), (1 <=> 3) >= 3 union select * from v1;
+1 <=> 3 >= 3 1 <=> (3 >= 3) (1 <=> 3) >= 3
+0 1 0
+create or replace view v1 as select 2 <=> 3 <= 3, 2 <=> (3 <= 3), (2 <=> 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 <= 3 AS `2 <=> 3 <= 3`,2 <=> (3 <= 3) AS `2 <=> (3 <= 3)`,2 <=> 3 <= 3 AS `(2 <=> 3) <= 3`
+select 2 <=> 3 <= 3, 2 <=> (3 <= 3), (2 <=> 3) <= 3 union select * from v1;
+2 <=> 3 <= 3 2 <=> (3 <= 3) (2 <=> 3) <= 3
+1 0 1
+create or replace view v1 as select 2 <=> 3 < 3, 2 <=> (3 < 3), (2 <=> 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 < 3 AS `2 <=> 3 < 3`,2 <=> (3 < 3) AS `2 <=> (3 < 3)`,2 <=> 3 < 3 AS `(2 <=> 3) < 3`
+select 2 <=> 3 < 3, 2 <=> (3 < 3), (2 <=> 3) < 3 union select * from v1;
+2 <=> 3 < 3 2 <=> (3 < 3) (2 <=> 3) < 3
+1 0 1
+create or replace view v1 as select 2 <=> 3 <> 3, 2 <=> (3 <> 3), (2 <=> 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 <> 3 AS `2 <=> 3 <> 3`,2 <=> (3 <> 3) AS `2 <=> (3 <> 3)`,2 <=> 3 <> 3 AS `(2 <=> 3) <> 3`
+select 2 <=> 3 <> 3, 2 <=> (3 <> 3), (2 <=> 3) <> 3 union select * from v1;
+2 <=> 3 <> 3 2 <=> (3 <> 3) (2 <=> 3) <> 3
+1 0 1
+create or replace view v1 as select 0 <=> 3 > 3, 0 <=> (3 > 3), (0 <=> 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <=> 3 > 3 AS `0 <=> 3 > 3`,0 <=> (3 > 3) AS `0 <=> (3 > 3)`,0 <=> 3 > 3 AS `(0 <=> 3) > 3`
+select 0 <=> 3 > 3, 0 <=> (3 > 3), (0 <=> 3) > 3 union select * from v1;
+0 <=> 3 > 3 0 <=> (3 > 3) (0 <=> 3) > 3
+0 1 0
+create or replace view v1 as select 2 <=> 3 != 3, 2 <=> (3 != 3), (2 <=> 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 <> 3 AS `2 <=> 3 != 3`,2 <=> (3 <> 3) AS `2 <=> (3 != 3)`,2 <=> 3 <> 3 AS `(2 <=> 3) != 3`
+select 2 <=> 3 != 3, 2 <=> (3 != 3), (2 <=> 3) != 3 union select * from v1;
+2 <=> 3 != 3 2 <=> (3 != 3) (2 <=> 3) != 3
+1 0 1
+create or replace view v1 as select 1 <=> 3 LIKE 3, 1 <=> (3 LIKE 3), (1 <=> 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 like 3 AS `1 <=> 3 LIKE 3`,1 <=> 3 like 3 AS `1 <=> (3 LIKE 3)`,(1 <=> 3) like 3 AS `(1 <=> 3) LIKE 3`
+select 1 <=> 3 LIKE 3, 1 <=> (3 LIKE 3), (1 <=> 3) LIKE 3 union select * from v1;
+1 <=> 3 LIKE 3 1 <=> (3 LIKE 3) (1 <=> 3) LIKE 3
+1 1 0
+create or replace view v1 as select 1 <=> 3 REGEXP 3, 1 <=> (3 REGEXP 3), (1 <=> 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 regexp 3 AS `1 <=> 3 REGEXP 3`,1 <=> 3 regexp 3 AS `1 <=> (3 REGEXP 3)`,(1 <=> 3) regexp 3 AS `(1 <=> 3) REGEXP 3`
+select 1 <=> 3 REGEXP 3, 1 <=> (3 REGEXP 3), (1 <=> 3) REGEXP 3 union select * from v1;
+1 <=> 3 REGEXP 3 1 <=> (3 REGEXP 3) (1 <=> 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 <=> 3 | 3, 2 <=> (3 | 3), (2 <=> 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 | 3 AS `2 <=> 3 | 3`,2 <=> 3 | 3 AS `2 <=> (3 | 3)`,(2 <=> 3) | 3 AS `(2 <=> 3) | 3`
+select 2 <=> 3 | 3, 2 <=> (3 | 3), (2 <=> 3) | 3 union select * from v1;
+2 <=> 3 | 3 2 <=> (3 | 3) (2 <=> 3) | 3
+0 0 3
+create or replace view v1 as select 2 <=> 3 & 2, 2 <=> (3 & 2), (2 <=> 3) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 & 2 AS `2 <=> 3 & 2`,2 <=> 3 & 2 AS `2 <=> (3 & 2)`,(2 <=> 3) & 2 AS `(2 <=> 3) & 2`
+select 2 <=> 3 & 2, 2 <=> (3 & 2), (2 <=> 3) & 2 union select * from v1;
+2 <=> 3 & 2 2 <=> (3 & 2) (2 <=> 3) & 2
+1 1 0
+create or replace view v1 as select 3 <=> 3 << 3, 3 <=> (3 << 3), (3 <=> 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <=> 3 << 3 AS `3 <=> 3 << 3`,3 <=> 3 << 3 AS `3 <=> (3 << 3)`,(3 <=> 3) << 3 AS `(3 <=> 3) << 3`
+select 3 <=> 3 << 3, 3 <=> (3 << 3), (3 <=> 3) << 3 union select * from v1;
+3 <=> 3 << 3 3 <=> (3 << 3) (3 <=> 3) << 3
+0 0 8
+create or replace view v1 as select 1 <=> 3 >> 1, 1 <=> (3 >> 1), (1 <=> 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 >> 1 AS `1 <=> 3 >> 1`,1 <=> 3 >> 1 AS `1 <=> (3 >> 1)`,(1 <=> 3) >> 1 AS `(1 <=> 3) >> 1`
+select 1 <=> 3 >> 1, 1 <=> (3 >> 1), (1 <=> 3) >> 1 union select * from v1;
+1 <=> 3 >> 1 1 <=> (3 >> 1) (1 <=> 3) >> 1
+1 1 0
+create or replace view v1 as select 2 <=> '2000-01-01' +INTERVAL 1 DAY, 2 <=> ('2000-01-01' +INTERVAL 1 DAY), (2 <=> '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> '2000-01-01' + interval 1 day AS `2 <=> '2000-01-01' +INTERVAL 1 DAY`,2 <=> '2000-01-01' + interval 1 day AS `2 <=> ('2000-01-01' +INTERVAL 1 DAY)`,(2 <=> '2000-01-01') + interval 1 day AS `(2 <=> '2000-01-01') +INTERVAL 1 DAY`
+select 2 <=> '2000-01-01' +INTERVAL 1 DAY, 2 <=> ('2000-01-01' +INTERVAL 1 DAY), (2 <=> '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 <=> '2000-01-01' +INTERVAL 1 DAY 2 <=> ('2000-01-01' +INTERVAL 1 DAY) (2 <=> '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 <=> 3 + 3, 2 <=> (3 + 3), (2 <=> 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 + 3 AS `2 <=> 3 + 3`,2 <=> 3 + 3 AS `2 <=> (3 + 3)`,(2 <=> 3) + 3 AS `(2 <=> 3) + 3`
+select 2 <=> 3 + 3, 2 <=> (3 + 3), (2 <=> 3) + 3 union select * from v1;
+2 <=> 3 + 3 2 <=> (3 + 3) (2 <=> 3) + 3
+0 0 3
+create or replace view v1 as select 2 <=> 3 - 3, 2 <=> (3 - 3), (2 <=> 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 - 3 AS `2 <=> 3 - 3`,2 <=> 3 - 3 AS `2 <=> (3 - 3)`,(2 <=> 3) - 3 AS `(2 <=> 3) - 3`
+select 2 <=> 3 - 3, 2 <=> (3 - 3), (2 <=> 3) - 3 union select * from v1;
+2 <=> 3 - 3 2 <=> (3 - 3) (2 <=> 3) - 3
+0 0 -3
+create or replace view v1 as select 3 <=> 3 * 3, 3 <=> (3 * 3), (3 <=> 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <=> 3 * 3 AS `3 <=> 3 * 3`,3 <=> 3 * 3 AS `3 <=> (3 * 3)`,(3 <=> 3) * 3 AS `(3 <=> 3) * 3`
+select 3 <=> 3 * 3, 3 <=> (3 * 3), (3 <=> 3) * 3 union select * from v1;
+3 <=> 3 * 3 3 <=> (3 * 3) (3 <=> 3) * 3
+0 0 3
+create or replace view v1 as select 3 <=> 9 / 3, 3 <=> (9 / 3), (3 <=> 9) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <=> 9 / 3 AS `3 <=> 9 / 3`,3 <=> 9 / 3 AS `3 <=> (9 / 3)`,(3 <=> 9) / 3 AS `(3 <=> 9) / 3`
+select 3 <=> 9 / 3, 3 <=> (9 / 3), (3 <=> 9) / 3 union select * from v1;
+3 <=> 9 / 3 3 <=> (9 / 3) (3 <=> 9) / 3
+1 1 0.0000
+create or replace view v1 as select 3 <=> 9 DIV 3, 3 <=> (9 DIV 3), (3 <=> 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <=> 9 DIV 3 AS `3 <=> 9 DIV 3`,3 <=> 9 DIV 3 AS `3 <=> (9 DIV 3)`,(3 <=> 9) DIV 3 AS `(3 <=> 9) DIV 3`
+select 3 <=> 9 DIV 3, 3 <=> (9 DIV 3), (3 <=> 9) DIV 3 union select * from v1;
+3 <=> 9 DIV 3 3 <=> (9 DIV 3) (3 <=> 9) DIV 3
+1 1 0
+create or replace view v1 as select 3 <=> 3 MOD 3, 3 <=> (3 MOD 3), (3 <=> 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <=> 3 MOD 3 AS `3 <=> 3 MOD 3`,3 <=> 3 MOD 3 AS `3 <=> (3 MOD 3)`,(3 <=> 3) MOD 3 AS `(3 <=> 3) MOD 3`
+select 3 <=> 3 MOD 3, 3 <=> (3 MOD 3), (3 <=> 3) MOD 3 union select * from v1;
+3 <=> 3 MOD 3 3 <=> (3 MOD 3) (3 <=> 3) MOD 3
+0 0 1
+create or replace view v1 as select 3 <=> 3 % 3, 3 <=> (3 % 3), (3 <=> 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <=> 3 MOD 3 AS `3 <=> 3 % 3`,3 <=> 3 MOD 3 AS `3 <=> (3 % 3)`,(3 <=> 3) MOD 3 AS `(3 <=> 3) % 3`
+select 3 <=> 3 % 3, 3 <=> (3 % 3), (3 <=> 3) % 3 union select * from v1;
+3 <=> 3 % 3 3 <=> (3 % 3) (3 <=> 3) % 3
+0 0 1
+create or replace view v1 as select 2 <=> 3 ^ 3, 2 <=> (3 ^ 3), (2 <=> 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 ^ 3 AS `2 <=> 3 ^ 3`,2 <=> 3 ^ 3 AS `2 <=> (3 ^ 3)`,(2 <=> 3) ^ 3 AS `(2 <=> 3) ^ 3`
+select 2 <=> 3 ^ 3, 2 <=> (3 ^ 3), (2 <=> 3) ^ 3 union select * from v1;
+2 <=> 3 ^ 3 2 <=> (3 ^ 3) (2 <=> 3) ^ 3
+0 0 3
+create or replace view v1 as select 1 <=> 3 BETWEEN 1 AND 3, 1 <=> (3 BETWEEN 1 AND 3), (1 <=> 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <=> 3 between 1 and 3 AS `1 <=> 3 BETWEEN 1 AND 3`,1 <=> 3 between 1 and 3 AS `1 <=> (3 BETWEEN 1 AND 3)`,(1 <=> 3) between 1 and 3 AS `(1 <=> 3) BETWEEN 1 AND 3`
+select 1 <=> 3 BETWEEN 1 AND 3, 1 <=> (3 BETWEEN 1 AND 3), (1 <=> 3) BETWEEN 1 AND 3 union select * from v1;
+1 <=> 3 BETWEEN 1 AND 3 1 <=> (3 BETWEEN 1 AND 3) (1 <=> 3) BETWEEN 1 AND 3
+1 1 0
+create or replace view v1 as select 4 >= 3 IS FALSE, 4 >= (3 IS FALSE), (4 >= 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 >= 3 is false AS `4 >= 3 IS FALSE`,4 >= (3 is false) AS `4 >= (3 IS FALSE)`,4 >= 3 is false AS `(4 >= 3) IS FALSE`
+select 4 >= 3 IS FALSE, 4 >= (3 IS FALSE), (4 >= 3) IS FALSE union select * from v1;
+4 >= 3 IS FALSE 4 >= (3 IS FALSE) (4 >= 3) IS FALSE
+0 1 0
+create or replace view v1 as select charset(2 >= 3 COLLATE latin1_bin), charset(2 >= (3 COLLATE latin1_bin)), charset((2 >= 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 >= 3 collate latin1_bin) AS `charset(2 >= 3 COLLATE latin1_bin)`,charset(2 >= 3 collate latin1_bin) AS `charset(2 >= (3 COLLATE latin1_bin))`,charset((2 >= 3) collate latin1_bin) AS `charset((2 >= 3) COLLATE latin1_bin)`
+select charset(2 >= 3 COLLATE latin1_bin), charset(2 >= (3 COLLATE latin1_bin)), charset((2 >= 3) COLLATE latin1_bin) union select * from v1;
+charset(2 >= 3 COLLATE latin1_bin) charset(2 >= (3 COLLATE latin1_bin)) charset((2 >= 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 >= 3 IN (1,1), 2 >= (3 IN (1,1)), (2 >= 3) IN (1,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 in (1,1) AS `2 >= 3 IN (1,1)`,2 >= 3 in (1,1) AS `2 >= (3 IN (1,1))`,(2 >= 3) in (1,1) AS `(2 >= 3) IN (1,1)`
+select 2 >= 3 IN (1,1), 2 >= (3 IN (1,1)), (2 >= 3) IN (1,1) union select * from v1;
+2 >= 3 IN (1,1) 2 >= (3 IN (1,1)) (2 >= 3) IN (1,1)
+1 1 0
+create or replace view v1 as select 2 >= 3 OR 0, 2 >= (3 OR 0), (2 >= 3) OR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 or 0 AS `2 >= 3 OR 0`,2 >= (3 or 0) AS `2 >= (3 OR 0)`,2 >= 3 or 0 AS `(2 >= 3) OR 0`
+select 2 >= 3 OR 0, 2 >= (3 OR 0), (2 >= 3) OR 0 union select * from v1;
+2 >= 3 OR 0 2 >= (3 OR 0) (2 >= 3) OR 0
+0 1 0
+create or replace view v1 as select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 or 0 AS `2 >= 3 || 0`,2 >= (3 or 0) AS `2 >= (3 || 0)`,2 >= 3 or 0 AS `(2 >= 3) || 0`
+select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0 union select * from v1;
+2 >= 3 || 0 2 >= (3 || 0) (2 >= 3) || 0
+0 1 0
+create or replace view v1 as select 2 >= 3 XOR 0, 2 >= (3 XOR 0), (2 >= 3) XOR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 xor 0 AS `2 >= 3 XOR 0`,2 >= (3 xor 0) AS `2 >= (3 XOR 0)`,2 >= 3 xor 0 AS `(2 >= 3) XOR 0`
+select 2 >= 3 XOR 0, 2 >= (3 XOR 0), (2 >= 3) XOR 0 union select * from v1;
+2 >= 3 XOR 0 2 >= (3 XOR 0) (2 >= 3) XOR 0
+0 1 0
+create or replace view v1 as select 2 >= 3 AND 3, 2 >= (3 AND 3), (2 >= 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 and 3 AS `2 >= 3 AND 3`,2 >= (3 and 3) AS `2 >= (3 AND 3)`,2 >= 3 and 3 AS `(2 >= 3) AND 3`
+select 2 >= 3 AND 3, 2 >= (3 AND 3), (2 >= 3) AND 3 union select * from v1;
+2 >= 3 AND 3 2 >= (3 AND 3) (2 >= 3) AND 3
+0 1 0
+create or replace view v1 as select 2 >= 3 && 3, 2 >= (3 && 3), (2 >= 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 and 3 AS `2 >= 3 && 3`,2 >= (3 and 3) AS `2 >= (3 && 3)`,2 >= 3 and 3 AS `(2 >= 3) && 3`
+select 2 >= 3 && 3, 2 >= (3 && 3), (2 >= 3) && 3 union select * from v1;
+2 >= 3 && 3 2 >= (3 && 3) (2 >= 3) && 3
+0 1 0
+create or replace view v1 as select 2 >= 3 = 3, 2 >= (3 = 3), (2 >= 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 = 3 AS `2 >= 3 = 3`,2 >= (3 = 3) AS `2 >= (3 = 3)`,2 >= 3 = 3 AS `(2 >= 3) = 3`
+select 2 >= 3 = 3, 2 >= (3 = 3), (2 >= 3) = 3 union select * from v1;
+2 >= 3 = 3 2 >= (3 = 3) (2 >= 3) = 3
+0 1 0
+create or replace view v1 as select 2 >= 3 <=> 3, 2 >= (3 <=> 3), (2 >= 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 <=> 3 AS `2 >= 3 <=> 3`,2 >= (3 <=> 3) AS `2 >= (3 <=> 3)`,2 >= 3 <=> 3 AS `(2 >= 3) <=> 3`
+select 2 >= 3 <=> 3, 2 >= (3 <=> 3), (2 >= 3) <=> 3 union select * from v1;
+2 >= 3 <=> 3 2 >= (3 <=> 3) (2 >= 3) <=> 3
+0 1 0
+create or replace view v1 as select 2 >= 3 >= 3, 2 >= (3 >= 3), (2 >= 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 >= 3 AS `2 >= 3 >= 3`,2 >= (3 >= 3) AS `2 >= (3 >= 3)`,2 >= 3 >= 3 AS `(2 >= 3) >= 3`
+select 2 >= 3 >= 3, 2 >= (3 >= 3), (2 >= 3) >= 3 union select * from v1;
+2 >= 3 >= 3 2 >= (3 >= 3) (2 >= 3) >= 3
+0 1 0
+create or replace view v1 as select 0 >= 3 <= 3, 0 >= (3 <= 3), (0 >= 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 >= 3 <= 3 AS `0 >= 3 <= 3`,0 >= (3 <= 3) AS `0 >= (3 <= 3)`,0 >= 3 <= 3 AS `(0 >= 3) <= 3`
+select 0 >= 3 <= 3, 0 >= (3 <= 3), (0 >= 3) <= 3 union select * from v1;
+0 >= 3 <= 3 0 >= (3 <= 3) (0 >= 3) <= 3
+1 0 1
+create or replace view v1 as select 0 >= 2 < 3, 0 >= (2 < 3), (0 >= 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 >= 2 < 3 AS `0 >= 2 < 3`,0 >= (2 < 3) AS `0 >= (2 < 3)`,0 >= 2 < 3 AS `(0 >= 2) < 3`
+select 0 >= 2 < 3, 0 >= (2 < 3), (0 >= 2) < 3 union select * from v1;
+0 >= 2 < 3 0 >= (2 < 3) (0 >= 2) < 3
+1 0 1
+create or replace view v1 as select 2 >= 3 <> 0, 2 >= (3 <> 0), (2 >= 3) <> 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 <> 0 AS `2 >= 3 <> 0`,2 >= (3 <> 0) AS `2 >= (3 <> 0)`,2 >= 3 <> 0 AS `(2 >= 3) <> 0`
+select 2 >= 3 <> 0, 2 >= (3 <> 0), (2 >= 3) <> 0 union select * from v1;
+2 >= 3 <> 0 2 >= (3 <> 0) (2 >= 3) <> 0
+0 1 0
+create or replace view v1 as select 2 >= 3 > 3, 2 >= (3 > 3), (2 >= 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 > 3 AS `2 >= 3 > 3`,2 >= (3 > 3) AS `2 >= (3 > 3)`,2 >= 3 > 3 AS `(2 >= 3) > 3`
+select 2 >= 3 > 3, 2 >= (3 > 3), (2 >= 3) > 3 union select * from v1;
+2 >= 3 > 3 2 >= (3 > 3) (2 >= 3) > 3
+0 1 0
+create or replace view v1 as select 2 >= 3 != 0, 2 >= (3 != 0), (2 >= 3) != 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 <> 0 AS `2 >= 3 != 0`,2 >= (3 <> 0) AS `2 >= (3 != 0)`,2 >= 3 <> 0 AS `(2 >= 3) != 0`
+select 2 >= 3 != 0, 2 >= (3 != 0), (2 >= 3) != 0 union select * from v1;
+2 >= 3 != 0 2 >= (3 != 0) (2 >= 3) != 0
+0 1 0
+create or replace view v1 as select 2 >= 3 LIKE 3, 2 >= (3 LIKE 3), (2 >= 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 like 3 AS `2 >= 3 LIKE 3`,2 >= 3 like 3 AS `2 >= (3 LIKE 3)`,(2 >= 3) like 3 AS `(2 >= 3) LIKE 3`
+select 2 >= 3 LIKE 3, 2 >= (3 LIKE 3), (2 >= 3) LIKE 3 union select * from v1;
+2 >= 3 LIKE 3 2 >= (3 LIKE 3) (2 >= 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 >= 3 REGEXP 3, 2 >= (3 REGEXP 3), (2 >= 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 regexp 3 AS `2 >= 3 REGEXP 3`,2 >= 3 regexp 3 AS `2 >= (3 REGEXP 3)`,(2 >= 3) regexp 3 AS `(2 >= 3) REGEXP 3`
+select 2 >= 3 REGEXP 3, 2 >= (3 REGEXP 3), (2 >= 3) REGEXP 3 union select * from v1;
+2 >= 3 REGEXP 3 2 >= (3 REGEXP 3) (2 >= 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 >= 3 | 3, 2 >= (3 | 3), (2 >= 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 | 3 AS `2 >= 3 | 3`,2 >= 3 | 3 AS `2 >= (3 | 3)`,(2 >= 3) | 3 AS `(2 >= 3) | 3`
+select 2 >= 3 | 3, 2 >= (3 | 3), (2 >= 3) | 3 union select * from v1;
+2 >= 3 | 3 2 >= (3 | 3) (2 >= 3) | 3
+0 0 3
+create or replace view v1 as select 2 >= 3 & 1, 2 >= (3 & 1), (2 >= 3) & 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 & 1 AS `2 >= 3 & 1`,2 >= 3 & 1 AS `2 >= (3 & 1)`,(2 >= 3) & 1 AS `(2 >= 3) & 1`
+select 2 >= 3 & 1, 2 >= (3 & 1), (2 >= 3) & 1 union select * from v1;
+2 >= 3 & 1 2 >= (3 & 1) (2 >= 3) & 1
+1 1 0
+create or replace view v1 as select 3 >= 3 << 3, 3 >= (3 << 3), (3 >= 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 >= 3 << 3 AS `3 >= 3 << 3`,3 >= 3 << 3 AS `3 >= (3 << 3)`,(3 >= 3) << 3 AS `(3 >= 3) << 3`
+select 3 >= 3 << 3, 3 >= (3 << 3), (3 >= 3) << 3 union select * from v1;
+3 >= 3 << 3 3 >= (3 << 3) (3 >= 3) << 3
+0 0 8
+create or replace view v1 as select 2 >= 3 >> 3, 2 >= (3 >> 3), (2 >= 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 >> 3 AS `2 >= 3 >> 3`,2 >= 3 >> 3 AS `2 >= (3 >> 3)`,(2 >= 3) >> 3 AS `(2 >= 3) >> 3`
+select 2 >= 3 >> 3, 2 >= (3 >> 3), (2 >= 3) >> 3 union select * from v1;
+2 >= 3 >> 3 2 >= (3 >> 3) (2 >= 3) >> 3
+1 1 0
+create or replace view v1 as select 2 >= '2000-01-01' +INTERVAL 1 DAY, 2 >= ('2000-01-01' +INTERVAL 1 DAY), (2 >= '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= '2000-01-01' + interval 1 day AS `2 >= '2000-01-01' +INTERVAL 1 DAY`,2 >= '2000-01-01' + interval 1 day AS `2 >= ('2000-01-01' +INTERVAL 1 DAY)`,(2 >= '2000-01-01') + interval 1 day AS `(2 >= '2000-01-01') +INTERVAL 1 DAY`
+select 2 >= '2000-01-01' +INTERVAL 1 DAY, 2 >= ('2000-01-01' +INTERVAL 1 DAY), (2 >= '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 >= '2000-01-01' +INTERVAL 1 DAY 2 >= ('2000-01-01' +INTERVAL 1 DAY) (2 >= '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 >= 3 + 3, 2 >= (3 + 3), (2 >= 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 + 3 AS `2 >= 3 + 3`,2 >= 3 + 3 AS `2 >= (3 + 3)`,(2 >= 3) + 3 AS `(2 >= 3) + 3`
+select 2 >= 3 + 3, 2 >= (3 + 3), (2 >= 3) + 3 union select * from v1;
+2 >= 3 + 3 2 >= (3 + 3) (2 >= 3) + 3
+0 0 3
+create or replace view v1 as select 2 >= 3 - 3, 2 >= (3 - 3), (2 >= 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 - 3 AS `2 >= 3 - 3`,2 >= 3 - 3 AS `2 >= (3 - 3)`,(2 >= 3) - 3 AS `(2 >= 3) - 3`
+select 2 >= 3 - 3, 2 >= (3 - 3), (2 >= 3) - 3 union select * from v1;
+2 >= 3 - 3 2 >= (3 - 3) (2 >= 3) - 3
+1 1 -3
+create or replace view v1 as select 3 >= 3 * 3, 3 >= (3 * 3), (3 >= 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 >= 3 * 3 AS `3 >= 3 * 3`,3 >= 3 * 3 AS `3 >= (3 * 3)`,(3 >= 3) * 3 AS `(3 >= 3) * 3`
+select 3 >= 3 * 3, 3 >= (3 * 3), (3 >= 3) * 3 union select * from v1;
+3 >= 3 * 3 3 >= (3 * 3) (3 >= 3) * 3
+0 0 3
+create or replace view v1 as select 2 >= 3 / 3, 2 >= (3 / 3), (2 >= 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 / 3 AS `2 >= 3 / 3`,2 >= 3 / 3 AS `2 >= (3 / 3)`,(2 >= 3) / 3 AS `(2 >= 3) / 3`
+select 2 >= 3 / 3, 2 >= (3 / 3), (2 >= 3) / 3 union select * from v1;
+2 >= 3 / 3 2 >= (3 / 3) (2 >= 3) / 3
+1 1 0.0000
+create or replace view v1 as select 2 >= 3 DIV 3, 2 >= (3 DIV 3), (2 >= 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 DIV 3 AS `2 >= 3 DIV 3`,2 >= 3 DIV 3 AS `2 >= (3 DIV 3)`,(2 >= 3) DIV 3 AS `(2 >= 3) DIV 3`
+select 2 >= 3 DIV 3, 2 >= (3 DIV 3), (2 >= 3) DIV 3 union select * from v1;
+2 >= 3 DIV 3 2 >= (3 DIV 3) (2 >= 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 >= 3 MOD 3, 2 >= (3 MOD 3), (2 >= 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 MOD 3 AS `2 >= 3 MOD 3`,2 >= 3 MOD 3 AS `2 >= (3 MOD 3)`,(2 >= 3) MOD 3 AS `(2 >= 3) MOD 3`
+select 2 >= 3 MOD 3, 2 >= (3 MOD 3), (2 >= 3) MOD 3 union select * from v1;
+2 >= 3 MOD 3 2 >= (3 MOD 3) (2 >= 3) MOD 3
+1 1 0
+create or replace view v1 as select 2 >= 3 % 3, 2 >= (3 % 3), (2 >= 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 MOD 3 AS `2 >= 3 % 3`,2 >= 3 MOD 3 AS `2 >= (3 % 3)`,(2 >= 3) MOD 3 AS `(2 >= 3) % 3`
+select 2 >= 3 % 3, 2 >= (3 % 3), (2 >= 3) % 3 union select * from v1;
+2 >= 3 % 3 2 >= (3 % 3) (2 >= 3) % 3
+1 1 0
+create or replace view v1 as select 2 >= 3 ^ 3, 2 >= (3 ^ 3), (2 >= 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 ^ 3 AS `2 >= 3 ^ 3`,2 >= 3 ^ 3 AS `2 >= (3 ^ 3)`,(2 >= 3) ^ 3 AS `(2 >= 3) ^ 3`
+select 2 >= 3 ^ 3, 2 >= (3 ^ 3), (2 >= 3) ^ 3 union select * from v1;
+2 >= 3 ^ 3 2 >= (3 ^ 3) (2 >= 3) ^ 3
+1 1 3
+create or replace view v1 as select 2 >= 3 BETWEEN 1 AND 3, 2 >= (3 BETWEEN 1 AND 3), (2 >= 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 between 1 and 3 AS `2 >= 3 BETWEEN 1 AND 3`,2 >= 3 between 1 and 3 AS `2 >= (3 BETWEEN 1 AND 3)`,(2 >= 3) between 1 and 3 AS `(2 >= 3) BETWEEN 1 AND 3`
+select 2 >= 3 BETWEEN 1 AND 3, 2 >= (3 BETWEEN 1 AND 3), (2 >= 3) BETWEEN 1 AND 3 union select * from v1;
+2 >= 3 BETWEEN 1 AND 3 2 >= (3 BETWEEN 1 AND 3) (2 >= 3) BETWEEN 1 AND 3
+1 1 0
+create or replace view v1 as select 2 <= 1 IS FALSE, 2 <= (1 IS FALSE), (2 <= 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 1 is false AS `2 <= 1 IS FALSE`,2 <= (1 is false) AS `2 <= (1 IS FALSE)`,2 <= 1 is false AS `(2 <= 1) IS FALSE`
+select 2 <= 1 IS FALSE, 2 <= (1 IS FALSE), (2 <= 1) IS FALSE union select * from v1;
+2 <= 1 IS FALSE 2 <= (1 IS FALSE) (2 <= 1) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 <= 3 COLLATE latin1_bin), charset(2 <= (3 COLLATE latin1_bin)), charset((2 <= 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 <= 3 collate latin1_bin) AS `charset(2 <= 3 COLLATE latin1_bin)`,charset(2 <= 3 collate latin1_bin) AS `charset(2 <= (3 COLLATE latin1_bin))`,charset((2 <= 3) collate latin1_bin) AS `charset((2 <= 3) COLLATE latin1_bin)`
+select charset(2 <= 3 COLLATE latin1_bin), charset(2 <= (3 COLLATE latin1_bin)), charset((2 <= 3) COLLATE latin1_bin) union select * from v1;
+charset(2 <= 3 COLLATE latin1_bin) charset(2 <= (3 COLLATE latin1_bin)) charset((2 <= 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 <= 3 IN (0,1), 2 <= (3 IN (0,1)), (2 <= 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 in (0,1) AS `2 <= 3 IN (0,1)`,2 <= 3 in (0,1) AS `2 <= (3 IN (0,1))`,(2 <= 3) in (0,1) AS `(2 <= 3) IN (0,1)`
+select 2 <= 3 IN (0,1), 2 <= (3 IN (0,1)), (2 <= 3) IN (0,1) union select * from v1;
+2 <= 3 IN (0,1) 2 <= (3 IN (0,1)) (2 <= 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 2 <= 3 OR 3, 2 <= (3 OR 3), (2 <= 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 or 3 AS `2 <= 3 OR 3`,2 <= (3 or 3) AS `2 <= (3 OR 3)`,2 <= 3 or 3 AS `(2 <= 3) OR 3`
+select 2 <= 3 OR 3, 2 <= (3 OR 3), (2 <= 3) OR 3 union select * from v1;
+2 <= 3 OR 3 2 <= (3 OR 3) (2 <= 3) OR 3
+1 0 1
+create or replace view v1 as select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 or 3 AS `2 <= 3 || 3`,2 <= (3 or 3) AS `2 <= (3 || 3)`,2 <= 3 or 3 AS `(2 <= 3) || 3`
+select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3 union select * from v1;
+2 <= 3 || 3 2 <= (3 || 3) (2 <= 3) || 3
+1 0 1
+create or replace view v1 as select 2 <= 1 XOR 1, 2 <= (1 XOR 1), (2 <= 1) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 1 xor 1 AS `2 <= 1 XOR 1`,2 <= (1 xor 1) AS `2 <= (1 XOR 1)`,2 <= 1 xor 1 AS `(2 <= 1) XOR 1`
+select 2 <= 1 XOR 1, 2 <= (1 XOR 1), (2 <= 1) XOR 1 union select * from v1;
+2 <= 1 XOR 1 2 <= (1 XOR 1) (2 <= 1) XOR 1
+1 0 1
+create or replace view v1 as select 2 <= 3 AND 3, 2 <= (3 AND 3), (2 <= 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 and 3 AS `2 <= 3 AND 3`,2 <= (3 and 3) AS `2 <= (3 AND 3)`,2 <= 3 and 3 AS `(2 <= 3) AND 3`
+select 2 <= 3 AND 3, 2 <= (3 AND 3), (2 <= 3) AND 3 union select * from v1;
+2 <= 3 AND 3 2 <= (3 AND 3) (2 <= 3) AND 3
+1 0 1
+create or replace view v1 as select 2 <= 3 && 3, 2 <= (3 && 3), (2 <= 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 and 3 AS `2 <= 3 && 3`,2 <= (3 and 3) AS `2 <= (3 && 3)`,2 <= 3 and 3 AS `(2 <= 3) && 3`
+select 2 <= 3 && 3, 2 <= (3 && 3), (2 <= 3) && 3 union select * from v1;
+2 <= 3 && 3 2 <= (3 && 3) (2 <= 3) && 3
+1 0 1
+create or replace view v1 as select 2 <= 0 = 0, 2 <= (0 = 0), (2 <= 0) = 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 0 = 0 AS `2 <= 0 = 0`,2 <= (0 = 0) AS `2 <= (0 = 0)`,2 <= 0 = 0 AS `(2 <= 0) = 0`
+select 2 <= 0 = 0, 2 <= (0 = 0), (2 <= 0) = 0 union select * from v1;
+2 <= 0 = 0 2 <= (0 = 0) (2 <= 0) = 0
+1 0 1
+create or replace view v1 as select 2 <= 0 <=> 0, 2 <= (0 <=> 0), (2 <= 0) <=> 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 0 <=> 0 AS `2 <= 0 <=> 0`,2 <= (0 <=> 0) AS `2 <= (0 <=> 0)`,2 <= 0 <=> 0 AS `(2 <= 0) <=> 0`
+select 2 <= 0 <=> 0, 2 <= (0 <=> 0), (2 <= 0) <=> 0 union select * from v1;
+2 <= 0 <=> 0 2 <= (0 <=> 0) (2 <= 0) <=> 0
+1 0 1
+create or replace view v1 as select 2 <= 0 >= 0, 2 <= (0 >= 0), (2 <= 0) >= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 0 >= 0 AS `2 <= 0 >= 0`,2 <= (0 >= 0) AS `2 <= (0 >= 0)`,2 <= 0 >= 0 AS `(2 <= 0) >= 0`
+select 2 <= 0 >= 0, 2 <= (0 >= 0), (2 <= 0) >= 0 union select * from v1;
+2 <= 0 >= 0 2 <= (0 >= 0) (2 <= 0) >= 0
+1 0 1
+create or replace view v1 as select 2 <= 3 <= 3, 2 <= (3 <= 3), (2 <= 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 <= 3 AS `2 <= 3 <= 3`,2 <= (3 <= 3) AS `2 <= (3 <= 3)`,2 <= 3 <= 3 AS `(2 <= 3) <= 3`
+select 2 <= 3 <= 3, 2 <= (3 <= 3), (2 <= 3) <= 3 union select * from v1;
+2 <= 3 <= 3 2 <= (3 <= 3) (2 <= 3) <= 3
+1 0 1
+create or replace view v1 as select 2 <= 3 < 3, 2 <= (3 < 3), (2 <= 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 < 3 AS `2 <= 3 < 3`,2 <= (3 < 3) AS `2 <= (3 < 3)`,2 <= 3 < 3 AS `(2 <= 3) < 3`
+select 2 <= 3 < 3, 2 <= (3 < 3), (2 <= 3) < 3 union select * from v1;
+2 <= 3 < 3 2 <= (3 < 3) (2 <= 3) < 3
+1 0 1
+create or replace view v1 as select 2 <= 3 <> 3, 2 <= (3 <> 3), (2 <= 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 <> 3 AS `2 <= 3 <> 3`,2 <= (3 <> 3) AS `2 <= (3 <> 3)`,2 <= 3 <> 3 AS `(2 <= 3) <> 3`
+select 2 <= 3 <> 3, 2 <= (3 <> 3), (2 <= 3) <> 3 union select * from v1;
+2 <= 3 <> 3 2 <= (3 <> 3) (2 <= 3) <> 3
+1 0 1
+create or replace view v1 as select 2 <= 3 > 0, 2 <= (3 > 0), (2 <= 3) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 > 0 AS `2 <= 3 > 0`,2 <= (3 > 0) AS `2 <= (3 > 0)`,2 <= 3 > 0 AS `(2 <= 3) > 0`
+select 2 <= 3 > 0, 2 <= (3 > 0), (2 <= 3) > 0 union select * from v1;
+2 <= 3 > 0 2 <= (3 > 0) (2 <= 3) > 0
+1 0 1
+create or replace view v1 as select 2 <= 3 != 3, 2 <= (3 != 3), (2 <= 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 <> 3 AS `2 <= 3 != 3`,2 <= (3 <> 3) AS `2 <= (3 != 3)`,2 <= 3 <> 3 AS `(2 <= 3) != 3`
+select 2 <= 3 != 3, 2 <= (3 != 3), (2 <= 3) != 3 union select * from v1;
+2 <= 3 != 3 2 <= (3 != 3) (2 <= 3) != 3
+1 0 1
+create or replace view v1 as select 2 <= 0 LIKE 0, 2 <= (0 LIKE 0), (2 <= 0) LIKE 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 0 like 0 AS `2 <= 0 LIKE 0`,2 <= 0 like 0 AS `2 <= (0 LIKE 0)`,(2 <= 0) like 0 AS `(2 <= 0) LIKE 0`
+select 2 <= 0 LIKE 0, 2 <= (0 LIKE 0), (2 <= 0) LIKE 0 union select * from v1;
+2 <= 0 LIKE 0 2 <= (0 LIKE 0) (2 <= 0) LIKE 0
+0 0 1
+create or replace view v1 as select 2 <= 0 REGEXP 0, 2 <= (0 REGEXP 0), (2 <= 0) REGEXP 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 0 regexp 0 AS `2 <= 0 REGEXP 0`,2 <= 0 regexp 0 AS `2 <= (0 REGEXP 0)`,(2 <= 0) regexp 0 AS `(2 <= 0) REGEXP 0`
+select 2 <= 0 REGEXP 0, 2 <= (0 REGEXP 0), (2 <= 0) REGEXP 0 union select * from v1;
+2 <= 0 REGEXP 0 2 <= (0 REGEXP 0) (2 <= 0) REGEXP 0
+0 0 1
+create or replace view v1 as select 2 <= 3 | 3, 2 <= (3 | 3), (2 <= 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 | 3 AS `2 <= 3 | 3`,2 <= 3 | 3 AS `2 <= (3 | 3)`,(2 <= 3) | 3 AS `(2 <= 3) | 3`
+select 2 <= 3 | 3, 2 <= (3 | 3), (2 <= 3) | 3 union select * from v1;
+2 <= 3 | 3 2 <= (3 | 3) (2 <= 3) | 3
+1 1 3
+create or replace view v1 as select 2 <= 3 & 2, 2 <= (3 & 2), (2 <= 3) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 & 2 AS `2 <= 3 & 2`,2 <= 3 & 2 AS `2 <= (3 & 2)`,(2 <= 3) & 2 AS `(2 <= 3) & 2`
+select 2 <= 3 & 2, 2 <= (3 & 2), (2 <= 3) & 2 union select * from v1;
+2 <= 3 & 2 2 <= (3 & 2) (2 <= 3) & 2
+1 1 0
+create or replace view v1 as select 2 <= 3 << 3, 2 <= (3 << 3), (2 <= 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 << 3 AS `2 <= 3 << 3`,2 <= 3 << 3 AS `2 <= (3 << 3)`,(2 <= 3) << 3 AS `(2 <= 3) << 3`
+select 2 <= 3 << 3, 2 <= (3 << 3), (2 <= 3) << 3 union select * from v1;
+2 <= 3 << 3 2 <= (3 << 3) (2 <= 3) << 3
+1 1 8
+create or replace view v1 as select 0 <= 3 >> 1, 0 <= (3 >> 1), (0 <= 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <= 3 >> 1 AS `0 <= 3 >> 1`,0 <= 3 >> 1 AS `0 <= (3 >> 1)`,(0 <= 3) >> 1 AS `(0 <= 3) >> 1`
+select 0 <= 3 >> 1, 0 <= (3 >> 1), (0 <= 3) >> 1 union select * from v1;
+0 <= 3 >> 1 0 <= (3 >> 1) (0 <= 3) >> 1
+1 1 0
+create or replace view v1 as select 2 <= '2000-01-01' +INTERVAL 1 DAY, 2 <= ('2000-01-01' +INTERVAL 1 DAY), (2 <= '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= '2000-01-01' + interval 1 day AS `2 <= '2000-01-01' +INTERVAL 1 DAY`,2 <= '2000-01-01' + interval 1 day AS `2 <= ('2000-01-01' +INTERVAL 1 DAY)`,(2 <= '2000-01-01') + interval 1 day AS `(2 <= '2000-01-01') +INTERVAL 1 DAY`
+select 2 <= '2000-01-01' +INTERVAL 1 DAY, 2 <= ('2000-01-01' +INTERVAL 1 DAY), (2 <= '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 <= '2000-01-01' +INTERVAL 1 DAY 2 <= ('2000-01-01' +INTERVAL 1 DAY) (2 <= '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 <= 3 + 3, 2 <= (3 + 3), (2 <= 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 + 3 AS `2 <= 3 + 3`,2 <= 3 + 3 AS `2 <= (3 + 3)`,(2 <= 3) + 3 AS `(2 <= 3) + 3`
+select 2 <= 3 + 3, 2 <= (3 + 3), (2 <= 3) + 3 union select * from v1;
+2 <= 3 + 3 2 <= (3 + 3) (2 <= 3) + 3
+1 1 4
+create or replace view v1 as select 2 <= 3 - 3, 2 <= (3 - 3), (2 <= 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 - 3 AS `2 <= 3 - 3`,2 <= 3 - 3 AS `2 <= (3 - 3)`,(2 <= 3) - 3 AS `(2 <= 3) - 3`
+select 2 <= 3 - 3, 2 <= (3 - 3), (2 <= 3) - 3 union select * from v1;
+2 <= 3 - 3 2 <= (3 - 3) (2 <= 3) - 3
+0 0 -2
+create or replace view v1 as select 2 <= 3 * 3, 2 <= (3 * 3), (2 <= 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 * 3 AS `2 <= 3 * 3`,2 <= 3 * 3 AS `2 <= (3 * 3)`,(2 <= 3) * 3 AS `(2 <= 3) * 3`
+select 2 <= 3 * 3, 2 <= (3 * 3), (2 <= 3) * 3 union select * from v1;
+2 <= 3 * 3 2 <= (3 * 3) (2 <= 3) * 3
+1 1 3
+create or replace view v1 as select 2 <= 3 / 3, 2 <= (3 / 3), (2 <= 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 / 3 AS `2 <= 3 / 3`,2 <= 3 / 3 AS `2 <= (3 / 3)`,(2 <= 3) / 3 AS `(2 <= 3) / 3`
+select 2 <= 3 / 3, 2 <= (3 / 3), (2 <= 3) / 3 union select * from v1;
+2 <= 3 / 3 2 <= (3 / 3) (2 <= 3) / 3
+0 0 0.3333
+create or replace view v1 as select 2 <= 9 DIV 3, 2 <= (9 DIV 3), (2 <= 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 9 DIV 3 AS `2 <= 9 DIV 3`,2 <= 9 DIV 3 AS `2 <= (9 DIV 3)`,(2 <= 9) DIV 3 AS `(2 <= 9) DIV 3`
+select 2 <= 9 DIV 3, 2 <= (9 DIV 3), (2 <= 9) DIV 3 union select * from v1;
+2 <= 9 DIV 3 2 <= (9 DIV 3) (2 <= 9) DIV 3
+1 1 0
+create or replace view v1 as select 2 <= 3 MOD 3, 2 <= (3 MOD 3), (2 <= 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 MOD 3 AS `2 <= 3 MOD 3`,2 <= 3 MOD 3 AS `2 <= (3 MOD 3)`,(2 <= 3) MOD 3 AS `(2 <= 3) MOD 3`
+select 2 <= 3 MOD 3, 2 <= (3 MOD 3), (2 <= 3) MOD 3 union select * from v1;
+2 <= 3 MOD 3 2 <= (3 MOD 3) (2 <= 3) MOD 3
+0 0 1
+create or replace view v1 as select 2 <= 3 % 3, 2 <= (3 % 3), (2 <= 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 MOD 3 AS `2 <= 3 % 3`,2 <= 3 MOD 3 AS `2 <= (3 % 3)`,(2 <= 3) MOD 3 AS `(2 <= 3) % 3`
+select 2 <= 3 % 3, 2 <= (3 % 3), (2 <= 3) % 3 union select * from v1;
+2 <= 3 % 3 2 <= (3 % 3) (2 <= 3) % 3
+0 0 1
+create or replace view v1 as select 2 <= 3 ^ 3, 2 <= (3 ^ 3), (2 <= 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 ^ 3 AS `2 <= 3 ^ 3`,2 <= 3 ^ 3 AS `2 <= (3 ^ 3)`,(2 <= 3) ^ 3 AS `(2 <= 3) ^ 3`
+select 2 <= 3 ^ 3, 2 <= (3 ^ 3), (2 <= 3) ^ 3 union select * from v1;
+2 <= 3 ^ 3 2 <= (3 ^ 3) (2 <= 3) ^ 3
+0 0 2
+create or replace view v1 as select 2 <= 3 BETWEEN 1 AND 3, 2 <= (3 BETWEEN 1 AND 3), (2 <= 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 between 1 and 3 AS `2 <= 3 BETWEEN 1 AND 3`,2 <= 3 between 1 and 3 AS `2 <= (3 BETWEEN 1 AND 3)`,(2 <= 3) between 1 and 3 AS `(2 <= 3) BETWEEN 1 AND 3`
+select 2 <= 3 BETWEEN 1 AND 3, 2 <= (3 BETWEEN 1 AND 3), (2 <= 3) BETWEEN 1 AND 3 union select * from v1;
+2 <= 3 BETWEEN 1 AND 3 2 <= (3 BETWEEN 1 AND 3) (2 <= 3) BETWEEN 1 AND 3
+0 0 1
+create or replace view v1 as select 2 < 1 IS FALSE, 2 < (1 IS FALSE), (2 < 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 1 is false AS `2 < 1 IS FALSE`,2 < (1 is false) AS `2 < (1 IS FALSE)`,2 < 1 is false AS `(2 < 1) IS FALSE`
+select 2 < 1 IS FALSE, 2 < (1 IS FALSE), (2 < 1) IS FALSE union select * from v1;
+2 < 1 IS FALSE 2 < (1 IS FALSE) (2 < 1) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 < 3 COLLATE latin1_bin), charset(2 < (3 COLLATE latin1_bin)), charset((2 < 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 < 3 collate latin1_bin) AS `charset(2 < 3 COLLATE latin1_bin)`,charset(2 < 3 collate latin1_bin) AS `charset(2 < (3 COLLATE latin1_bin))`,charset((2 < 3) collate latin1_bin) AS `charset((2 < 3) COLLATE latin1_bin)`
+select charset(2 < 3 COLLATE latin1_bin), charset(2 < (3 COLLATE latin1_bin)), charset((2 < 3) COLLATE latin1_bin) union select * from v1;
+charset(2 < 3 COLLATE latin1_bin) charset(2 < (3 COLLATE latin1_bin)) charset((2 < 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 < 3 IN (0,1), 2 < (3 IN (0,1)), (2 < 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 in (0,1) AS `2 < 3 IN (0,1)`,2 < 3 in (0,1) AS `2 < (3 IN (0,1))`,(2 < 3) in (0,1) AS `(2 < 3) IN (0,1)`
+select 2 < 3 IN (0,1), 2 < (3 IN (0,1)), (2 < 3) IN (0,1) union select * from v1;
+2 < 3 IN (0,1) 2 < (3 IN (0,1)) (2 < 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 2 < 3 OR 3, 2 < (3 OR 3), (2 < 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 or 3 AS `2 < 3 OR 3`,2 < (3 or 3) AS `2 < (3 OR 3)`,2 < 3 or 3 AS `(2 < 3) OR 3`
+select 2 < 3 OR 3, 2 < (3 OR 3), (2 < 3) OR 3 union select * from v1;
+2 < 3 OR 3 2 < (3 OR 3) (2 < 3) OR 3
+1 0 1
+create or replace view v1 as select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 or 3 AS `2 < 3 || 3`,2 < (3 or 3) AS `2 < (3 || 3)`,2 < 3 or 3 AS `(2 < 3) || 3`
+select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3 union select * from v1;
+2 < 3 || 3 2 < (3 || 3) (2 < 3) || 3
+1 0 1
+create or replace view v1 as select 2 < 3 XOR 0, 2 < (3 XOR 0), (2 < 3) XOR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 xor 0 AS `2 < 3 XOR 0`,2 < (3 xor 0) AS `2 < (3 XOR 0)`,2 < 3 xor 0 AS `(2 < 3) XOR 0`
+select 2 < 3 XOR 0, 2 < (3 XOR 0), (2 < 3) XOR 0 union select * from v1;
+2 < 3 XOR 0 2 < (3 XOR 0) (2 < 3) XOR 0
+1 0 1
+create or replace view v1 as select 2 < 3 AND 3, 2 < (3 AND 3), (2 < 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 and 3 AS `2 < 3 AND 3`,2 < (3 and 3) AS `2 < (3 AND 3)`,2 < 3 and 3 AS `(2 < 3) AND 3`
+select 2 < 3 AND 3, 2 < (3 AND 3), (2 < 3) AND 3 union select * from v1;
+2 < 3 AND 3 2 < (3 AND 3) (2 < 3) AND 3
+1 0 1
+create or replace view v1 as select 2 < 3 && 3, 2 < (3 && 3), (2 < 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 and 3 AS `2 < 3 && 3`,2 < (3 and 3) AS `2 < (3 && 3)`,2 < 3 and 3 AS `(2 < 3) && 3`
+select 2 < 3 && 3, 2 < (3 && 3), (2 < 3) && 3 union select * from v1;
+2 < 3 && 3 2 < (3 && 3) (2 < 3) && 3
+1 0 1
+create or replace view v1 as select 2 < 3 = 1, 2 < (3 = 1), (2 < 3) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 = 1 AS `2 < 3 = 1`,2 < (3 = 1) AS `2 < (3 = 1)`,2 < 3 = 1 AS `(2 < 3) = 1`
+select 2 < 3 = 1, 2 < (3 = 1), (2 < 3) = 1 union select * from v1;
+2 < 3 = 1 2 < (3 = 1) (2 < 3) = 1
+1 0 1
+create or replace view v1 as select 2 < 3 <=> 1, 2 < (3 <=> 1), (2 < 3) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 <=> 1 AS `2 < 3 <=> 1`,2 < (3 <=> 1) AS `2 < (3 <=> 1)`,2 < 3 <=> 1 AS `(2 < 3) <=> 1`
+select 2 < 3 <=> 1, 2 < (3 <=> 1), (2 < 3) <=> 1 union select * from v1;
+2 < 3 <=> 1 2 < (3 <=> 1) (2 < 3) <=> 1
+1 0 1
+create or replace view v1 as select 2 < 3 >= 1, 2 < (3 >= 1), (2 < 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 >= 1 AS `2 < 3 >= 1`,2 < (3 >= 1) AS `2 < (3 >= 1)`,2 < 3 >= 1 AS `(2 < 3) >= 1`
+select 2 < 3 >= 1, 2 < (3 >= 1), (2 < 3) >= 1 union select * from v1;
+2 < 3 >= 1 2 < (3 >= 1) (2 < 3) >= 1
+1 0 1
+create or replace view v1 as select 2 < 3 <= 3, 2 < (3 <= 3), (2 < 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 <= 3 AS `2 < 3 <= 3`,2 < (3 <= 3) AS `2 < (3 <= 3)`,2 < 3 <= 3 AS `(2 < 3) <= 3`
+select 2 < 3 <= 3, 2 < (3 <= 3), (2 < 3) <= 3 union select * from v1;
+2 < 3 <= 3 2 < (3 <= 3) (2 < 3) <= 3
+1 0 1
+create or replace view v1 as select 2 < 3 < 3, 2 < (3 < 3), (2 < 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 < 3 AS `2 < 3 < 3`,2 < (3 < 3) AS `2 < (3 < 3)`,2 < 3 < 3 AS `(2 < 3) < 3`
+select 2 < 3 < 3, 2 < (3 < 3), (2 < 3) < 3 union select * from v1;
+2 < 3 < 3 2 < (3 < 3) (2 < 3) < 3
+1 0 1
+create or replace view v1 as select 2 < 3 <> 3, 2 < (3 <> 3), (2 < 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 <> 3 AS `2 < 3 <> 3`,2 < (3 <> 3) AS `2 < (3 <> 3)`,2 < 3 <> 3 AS `(2 < 3) <> 3`
+select 2 < 3 <> 3, 2 < (3 <> 3), (2 < 3) <> 3 union select * from v1;
+2 < 3 <> 3 2 < (3 <> 3) (2 < 3) <> 3
+1 0 1
+create or replace view v1 as select 2 < 3 > 0, 2 < (3 > 0), (2 < 3) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 > 0 AS `2 < 3 > 0`,2 < (3 > 0) AS `2 < (3 > 0)`,2 < 3 > 0 AS `(2 < 3) > 0`
+select 2 < 3 > 0, 2 < (3 > 0), (2 < 3) > 0 union select * from v1;
+2 < 3 > 0 2 < (3 > 0) (2 < 3) > 0
+1 0 1
+create or replace view v1 as select 2 < 3 != 3, 2 < (3 != 3), (2 < 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 <> 3 AS `2 < 3 != 3`,2 < (3 <> 3) AS `2 < (3 != 3)`,2 < 3 <> 3 AS `(2 < 3) != 3`
+select 2 < 3 != 3, 2 < (3 != 3), (2 < 3) != 3 union select * from v1;
+2 < 3 != 3 2 < (3 != 3) (2 < 3) != 3
+1 0 1
+create or replace view v1 as select 2 < 3 LIKE 1, 2 < (3 LIKE 1), (2 < 3) LIKE 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 like 1 AS `2 < 3 LIKE 1`,2 < 3 like 1 AS `2 < (3 LIKE 1)`,(2 < 3) like 1 AS `(2 < 3) LIKE 1`
+select 2 < 3 LIKE 1, 2 < (3 LIKE 1), (2 < 3) LIKE 1 union select * from v1;
+2 < 3 LIKE 1 2 < (3 LIKE 1) (2 < 3) LIKE 1
+0 0 1
+create or replace view v1 as select 2 < 3 REGEXP 1, 2 < (3 REGEXP 1), (2 < 3) REGEXP 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 regexp 1 AS `2 < 3 REGEXP 1`,2 < 3 regexp 1 AS `2 < (3 REGEXP 1)`,(2 < 3) regexp 1 AS `(2 < 3) REGEXP 1`
+select 2 < 3 REGEXP 1, 2 < (3 REGEXP 1), (2 < 3) REGEXP 1 union select * from v1;
+2 < 3 REGEXP 1 2 < (3 REGEXP 1) (2 < 3) REGEXP 1
+0 0 1
+create or replace view v1 as select 2 < 3 | 3, 2 < (3 | 3), (2 < 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 | 3 AS `2 < 3 | 3`,2 < 3 | 3 AS `2 < (3 | 3)`,(2 < 3) | 3 AS `(2 < 3) | 3`
+select 2 < 3 | 3, 2 < (3 | 3), (2 < 3) | 3 union select * from v1;
+2 < 3 | 3 2 < (3 | 3) (2 < 3) | 3
+1 1 3
+create or replace view v1 as select 2 < 4 & 4, 2 < (4 & 4), (2 < 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 4 & 4 AS `2 < 4 & 4`,2 < 4 & 4 AS `2 < (4 & 4)`,(2 < 4) & 4 AS `(2 < 4) & 4`
+select 2 < 4 & 4, 2 < (4 & 4), (2 < 4) & 4 union select * from v1;
+2 < 4 & 4 2 < (4 & 4) (2 < 4) & 4
+1 1 0
+create or replace view v1 as select 2 < 3 << 3, 2 < (3 << 3), (2 < 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 << 3 AS `2 < 3 << 3`,2 < 3 << 3 AS `2 < (3 << 3)`,(2 < 3) << 3 AS `(2 < 3) << 3`
+select 2 < 3 << 3, 2 < (3 << 3), (2 < 3) << 3 union select * from v1;
+2 < 3 << 3 2 < (3 << 3) (2 < 3) << 3
+1 1 8
+create or replace view v1 as select 0 < 3 >> 1, 0 < (3 >> 1), (0 < 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 < 3 >> 1 AS `0 < 3 >> 1`,0 < 3 >> 1 AS `0 < (3 >> 1)`,(0 < 3) >> 1 AS `(0 < 3) >> 1`
+select 0 < 3 >> 1, 0 < (3 >> 1), (0 < 3) >> 1 union select * from v1;
+0 < 3 >> 1 0 < (3 >> 1) (0 < 3) >> 1
+1 1 0
+create or replace view v1 as select 2 < '2000-01-01' +INTERVAL 1 DAY, 2 < ('2000-01-01' +INTERVAL 1 DAY), (2 < '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < '2000-01-01' + interval 1 day AS `2 < '2000-01-01' +INTERVAL 1 DAY`,2 < '2000-01-01' + interval 1 day AS `2 < ('2000-01-01' +INTERVAL 1 DAY)`,(2 < '2000-01-01') + interval 1 day AS `(2 < '2000-01-01') +INTERVAL 1 DAY`
+select 2 < '2000-01-01' +INTERVAL 1 DAY, 2 < ('2000-01-01' +INTERVAL 1 DAY), (2 < '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 < '2000-01-01' +INTERVAL 1 DAY 2 < ('2000-01-01' +INTERVAL 1 DAY) (2 < '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 < 3 + 3, 2 < (3 + 3), (2 < 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 + 3 AS `2 < 3 + 3`,2 < 3 + 3 AS `2 < (3 + 3)`,(2 < 3) + 3 AS `(2 < 3) + 3`
+select 2 < 3 + 3, 2 < (3 + 3), (2 < 3) + 3 union select * from v1;
+2 < 3 + 3 2 < (3 + 3) (2 < 3) + 3
+1 1 4
+create or replace view v1 as select 2 < 3 - 3, 2 < (3 - 3), (2 < 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 - 3 AS `2 < 3 - 3`,2 < 3 - 3 AS `2 < (3 - 3)`,(2 < 3) - 3 AS `(2 < 3) - 3`
+select 2 < 3 - 3, 2 < (3 - 3), (2 < 3) - 3 union select * from v1;
+2 < 3 - 3 2 < (3 - 3) (2 < 3) - 3
+0 0 -2
+create or replace view v1 as select 2 < 3 * 3, 2 < (3 * 3), (2 < 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 * 3 AS `2 < 3 * 3`,2 < 3 * 3 AS `2 < (3 * 3)`,(2 < 3) * 3 AS `(2 < 3) * 3`
+select 2 < 3 * 3, 2 < (3 * 3), (2 < 3) * 3 union select * from v1;
+2 < 3 * 3 2 < (3 * 3) (2 < 3) * 3
+1 1 3
+create or replace view v1 as select 2 < 3 / 3, 2 < (3 / 3), (2 < 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 / 3 AS `2 < 3 / 3`,2 < 3 / 3 AS `2 < (3 / 3)`,(2 < 3) / 3 AS `(2 < 3) / 3`
+select 2 < 3 / 3, 2 < (3 / 3), (2 < 3) / 3 union select * from v1;
+2 < 3 / 3 2 < (3 / 3) (2 < 3) / 3
+0 0 0.3333
+create or replace view v1 as select 2 < 9 DIV 3, 2 < (9 DIV 3), (2 < 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 9 DIV 3 AS `2 < 9 DIV 3`,2 < 9 DIV 3 AS `2 < (9 DIV 3)`,(2 < 9) DIV 3 AS `(2 < 9) DIV 3`
+select 2 < 9 DIV 3, 2 < (9 DIV 3), (2 < 9) DIV 3 union select * from v1;
+2 < 9 DIV 3 2 < (9 DIV 3) (2 < 9) DIV 3
+1 1 0
+create or replace view v1 as select 2 < 3 MOD 3, 2 < (3 MOD 3), (2 < 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 MOD 3 AS `2 < 3 MOD 3`,2 < 3 MOD 3 AS `2 < (3 MOD 3)`,(2 < 3) MOD 3 AS `(2 < 3) MOD 3`
+select 2 < 3 MOD 3, 2 < (3 MOD 3), (2 < 3) MOD 3 union select * from v1;
+2 < 3 MOD 3 2 < (3 MOD 3) (2 < 3) MOD 3
+0 0 1
+create or replace view v1 as select 2 < 3 % 3, 2 < (3 % 3), (2 < 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 MOD 3 AS `2 < 3 % 3`,2 < 3 MOD 3 AS `2 < (3 % 3)`,(2 < 3) MOD 3 AS `(2 < 3) % 3`
+select 2 < 3 % 3, 2 < (3 % 3), (2 < 3) % 3 union select * from v1;
+2 < 3 % 3 2 < (3 % 3) (2 < 3) % 3
+0 0 1
+create or replace view v1 as select 2 < 3 ^ 3, 2 < (3 ^ 3), (2 < 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 ^ 3 AS `2 < 3 ^ 3`,2 < 3 ^ 3 AS `2 < (3 ^ 3)`,(2 < 3) ^ 3 AS `(2 < 3) ^ 3`
+select 2 < 3 ^ 3, 2 < (3 ^ 3), (2 < 3) ^ 3 union select * from v1;
+2 < 3 ^ 3 2 < (3 ^ 3) (2 < 3) ^ 3
+0 0 2
+create or replace view v1 as select 2 < 3 BETWEEN 1 AND 3, 2 < (3 BETWEEN 1 AND 3), (2 < 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 between 1 and 3 AS `2 < 3 BETWEEN 1 AND 3`,2 < 3 between 1 and 3 AS `2 < (3 BETWEEN 1 AND 3)`,(2 < 3) between 1 and 3 AS `(2 < 3) BETWEEN 1 AND 3`
+select 2 < 3 BETWEEN 1 AND 3, 2 < (3 BETWEEN 1 AND 3), (2 < 3) BETWEEN 1 AND 3 union select * from v1;
+2 < 3 BETWEEN 1 AND 3 2 < (3 BETWEEN 1 AND 3) (2 < 3) BETWEEN 1 AND 3
+0 0 1
+create or replace view v1 as select 2 <> 3 IS FALSE, 2 <> (3 IS FALSE), (2 <> 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 is false AS `2 <> 3 IS FALSE`,2 <> (3 is false) AS `2 <> (3 IS FALSE)`,2 <> 3 is false AS `(2 <> 3) IS FALSE`
+select 2 <> 3 IS FALSE, 2 <> (3 IS FALSE), (2 <> 3) IS FALSE union select * from v1;
+2 <> 3 IS FALSE 2 <> (3 IS FALSE) (2 <> 3) IS FALSE
+0 1 0
+create or replace view v1 as select charset(2 <> 3 COLLATE latin1_bin), charset(2 <> (3 COLLATE latin1_bin)), charset((2 <> 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 <> 3 collate latin1_bin) AS `charset(2 <> 3 COLLATE latin1_bin)`,charset(2 <> 3 collate latin1_bin) AS `charset(2 <> (3 COLLATE latin1_bin))`,charset((2 <> 3) collate latin1_bin) AS `charset((2 <> 3) COLLATE latin1_bin)`
+select charset(2 <> 3 COLLATE latin1_bin), charset(2 <> (3 COLLATE latin1_bin)), charset((2 <> 3) COLLATE latin1_bin) union select * from v1;
+charset(2 <> 3 COLLATE latin1_bin) charset(2 <> (3 COLLATE latin1_bin)) charset((2 <> 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 <> 3 IN (0,0), 2 <> (3 IN (0,0)), (2 <> 3) IN (0,0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 in (0,0) AS `2 <> 3 IN (0,0)`,2 <> 3 in (0,0) AS `2 <> (3 IN (0,0))`,(2 <> 3) in (0,0) AS `(2 <> 3) IN (0,0)`
+select 2 <> 3 IN (0,0), 2 <> (3 IN (0,0)), (2 <> 3) IN (0,0) union select * from v1;
+2 <> 3 IN (0,0) 2 <> (3 IN (0,0)) (2 <> 3) IN (0,0)
+1 1 0
+create or replace view v1 as select 1 <> 3 OR 3, 1 <> (3 OR 3), (1 <> 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 3 or 3 AS `1 <> 3 OR 3`,1 <> (3 or 3) AS `1 <> (3 OR 3)`,1 <> 3 or 3 AS `(1 <> 3) OR 3`
+select 1 <> 3 OR 3, 1 <> (3 OR 3), (1 <> 3) OR 3 union select * from v1;
+1 <> 3 OR 3 1 <> (3 OR 3) (1 <> 3) OR 3
+1 0 1
+create or replace view v1 as select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 3 or 3 AS `1 <> 3 || 3`,1 <> (3 or 3) AS `1 <> (3 || 3)`,1 <> 3 or 3 AS `(1 <> 3) || 3`
+select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3 union select * from v1;
+1 <> 3 || 3 1 <> (3 || 3) (1 <> 3) || 3
+1 0 1
+create or replace view v1 as select 2 <> 3 XOR 3, 2 <> (3 XOR 3), (2 <> 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 xor 3 AS `2 <> 3 XOR 3`,2 <> (3 xor 3) AS `2 <> (3 XOR 3)`,2 <> 3 xor 3 AS `(2 <> 3) XOR 3`
+select 2 <> 3 XOR 3, 2 <> (3 XOR 3), (2 <> 3) XOR 3 union select * from v1;
+2 <> 3 XOR 3 2 <> (3 XOR 3) (2 <> 3) XOR 3
+0 1 0
+create or replace view v1 as select 3 <> 3 AND 3, 3 <> (3 AND 3), (3 <> 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 and 3 AS `3 <> 3 AND 3`,3 <> (3 and 3) AS `3 <> (3 AND 3)`,3 <> 3 and 3 AS `(3 <> 3) AND 3`
+select 3 <> 3 AND 3, 3 <> (3 AND 3), (3 <> 3) AND 3 union select * from v1;
+3 <> 3 AND 3 3 <> (3 AND 3) (3 <> 3) AND 3
+0 1 0
+create or replace view v1 as select 3 <> 3 && 3, 3 <> (3 && 3), (3 <> 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 and 3 AS `3 <> 3 && 3`,3 <> (3 and 3) AS `3 <> (3 && 3)`,3 <> 3 and 3 AS `(3 <> 3) && 3`
+select 3 <> 3 && 3, 3 <> (3 && 3), (3 <> 3) && 3 union select * from v1;
+3 <> 3 && 3 3 <> (3 && 3) (3 <> 3) && 3
+0 1 0
+create or replace view v1 as select 2 <> 3 = 3, 2 <> (3 = 3), (2 <> 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 = 3 AS `2 <> 3 = 3`,2 <> (3 = 3) AS `2 <> (3 = 3)`,2 <> 3 = 3 AS `(2 <> 3) = 3`
+select 2 <> 3 = 3, 2 <> (3 = 3), (2 <> 3) = 3 union select * from v1;
+2 <> 3 = 3 2 <> (3 = 3) (2 <> 3) = 3
+0 1 0
+create or replace view v1 as select 2 <> 3 <=> 3, 2 <> (3 <=> 3), (2 <> 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 <=> 3 AS `2 <> 3 <=> 3`,2 <> (3 <=> 3) AS `2 <> (3 <=> 3)`,2 <> 3 <=> 3 AS `(2 <> 3) <=> 3`
+select 2 <> 3 <=> 3, 2 <> (3 <=> 3), (2 <> 3) <=> 3 union select * from v1;
+2 <> 3 <=> 3 2 <> (3 <=> 3) (2 <> 3) <=> 3
+0 1 0
+create or replace view v1 as select 2 <> 3 >= 3, 2 <> (3 >= 3), (2 <> 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 >= 3 AS `2 <> 3 >= 3`,2 <> (3 >= 3) AS `2 <> (3 >= 3)`,2 <> 3 >= 3 AS `(2 <> 3) >= 3`
+select 2 <> 3 >= 3, 2 <> (3 >= 3), (2 <> 3) >= 3 union select * from v1;
+2 <> 3 >= 3 2 <> (3 >= 3) (2 <> 3) >= 3
+0 1 0
+create or replace view v1 as select 1 <> 3 <= 3, 1 <> (3 <= 3), (1 <> 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 3 <= 3 AS `1 <> 3 <= 3`,1 <> (3 <= 3) AS `1 <> (3 <= 3)`,1 <> 3 <= 3 AS `(1 <> 3) <= 3`
+select 1 <> 3 <= 3, 1 <> (3 <= 3), (1 <> 3) <= 3 union select * from v1;
+1 <> 3 <= 3 1 <> (3 <= 3) (1 <> 3) <= 3
+1 0 1
+create or replace view v1 as select 0 <> 3 < 3, 0 <> (3 < 3), (0 <> 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <> 3 < 3 AS `0 <> 3 < 3`,0 <> (3 < 3) AS `0 <> (3 < 3)`,0 <> 3 < 3 AS `(0 <> 3) < 3`
+select 0 <> 3 < 3, 0 <> (3 < 3), (0 <> 3) < 3 union select * from v1;
+0 <> 3 < 3 0 <> (3 < 3) (0 <> 3) < 3
+1 0 1
+create or replace view v1 as select 0 <> 3 <> 3, 0 <> (3 <> 3), (0 <> 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <> 3 <> 3 AS `0 <> 3 <> 3`,0 <> (3 <> 3) AS `0 <> (3 <> 3)`,0 <> 3 <> 3 AS `(0 <> 3) <> 3`
+select 0 <> 3 <> 3, 0 <> (3 <> 3), (0 <> 3) <> 3 union select * from v1;
+0 <> 3 <> 3 0 <> (3 <> 3) (0 <> 3) <> 3
+1 0 1
+create or replace view v1 as select 2 <> 3 > 3, 2 <> (3 > 3), (2 <> 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 > 3 AS `2 <> 3 > 3`,2 <> (3 > 3) AS `2 <> (3 > 3)`,2 <> 3 > 3 AS `(2 <> 3) > 3`
+select 2 <> 3 > 3, 2 <> (3 > 3), (2 <> 3) > 3 union select * from v1;
+2 <> 3 > 3 2 <> (3 > 3) (2 <> 3) > 3
+0 1 0
+create or replace view v1 as select 0 <> 3 != 3, 0 <> (3 != 3), (0 <> 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <> 3 <> 3 AS `0 <> 3 != 3`,0 <> (3 <> 3) AS `0 <> (3 != 3)`,0 <> 3 <> 3 AS `(0 <> 3) != 3`
+select 0 <> 3 != 3, 0 <> (3 != 3), (0 <> 3) != 3 union select * from v1;
+0 <> 3 != 3 0 <> (3 != 3) (0 <> 3) != 3
+1 0 1
+create or replace view v1 as select 2 <> 3 LIKE 3, 2 <> (3 LIKE 3), (2 <> 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 like 3 AS `2 <> 3 LIKE 3`,2 <> 3 like 3 AS `2 <> (3 LIKE 3)`,(2 <> 3) like 3 AS `(2 <> 3) LIKE 3`
+select 2 <> 3 LIKE 3, 2 <> (3 LIKE 3), (2 <> 3) LIKE 3 union select * from v1;
+2 <> 3 LIKE 3 2 <> (3 LIKE 3) (2 <> 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 <> 3 REGEXP 3, 2 <> (3 REGEXP 3), (2 <> 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 regexp 3 AS `2 <> 3 REGEXP 3`,2 <> 3 regexp 3 AS `2 <> (3 REGEXP 3)`,(2 <> 3) regexp 3 AS `(2 <> 3) REGEXP 3`
+select 2 <> 3 REGEXP 3, 2 <> (3 REGEXP 3), (2 <> 3) REGEXP 3 union select * from v1;
+2 <> 3 REGEXP 3 2 <> (3 REGEXP 3) (2 <> 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 <> 3 | 3, 2 <> (3 | 3), (2 <> 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 | 3 AS `2 <> 3 | 3`,2 <> 3 | 3 AS `2 <> (3 | 3)`,(2 <> 3) | 3 AS `(2 <> 3) | 3`
+select 2 <> 3 | 3, 2 <> (3 | 3), (2 <> 3) | 3 union select * from v1;
+2 <> 3 | 3 2 <> (3 | 3) (2 <> 3) | 3
+1 1 3
+create or replace view v1 as select 2 <> 4 & 4, 2 <> (4 & 4), (2 <> 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 4 & 4 AS `2 <> 4 & 4`,2 <> 4 & 4 AS `2 <> (4 & 4)`,(2 <> 4) & 4 AS `(2 <> 4) & 4`
+select 2 <> 4 & 4, 2 <> (4 & 4), (2 <> 4) & 4 union select * from v1;
+2 <> 4 & 4 2 <> (4 & 4) (2 <> 4) & 4
+1 1 0
+create or replace view v1 as select 2 <> 3 << 3, 2 <> (3 << 3), (2 <> 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 << 3 AS `2 <> 3 << 3`,2 <> 3 << 3 AS `2 <> (3 << 3)`,(2 <> 3) << 3 AS `(2 <> 3) << 3`
+select 2 <> 3 << 3, 2 <> (3 << 3), (2 <> 3) << 3 union select * from v1;
+2 <> 3 << 3 2 <> (3 << 3) (2 <> 3) << 3
+1 1 8
+create or replace view v1 as select 2 <> 3 >> 3, 2 <> (3 >> 3), (2 <> 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 >> 3 AS `2 <> 3 >> 3`,2 <> 3 >> 3 AS `2 <> (3 >> 3)`,(2 <> 3) >> 3 AS `(2 <> 3) >> 3`
+select 2 <> 3 >> 3, 2 <> (3 >> 3), (2 <> 3) >> 3 union select * from v1;
+2 <> 3 >> 3 2 <> (3 >> 3) (2 <> 3) >> 3
+1 1 0
+create or replace view v1 as select 2 <> '2000-01-01' +INTERVAL 1 DAY, 2 <> ('2000-01-01' +INTERVAL 1 DAY), (2 <> '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> '2000-01-01' + interval 1 day AS `2 <> '2000-01-01' +INTERVAL 1 DAY`,2 <> '2000-01-01' + interval 1 day AS `2 <> ('2000-01-01' +INTERVAL 1 DAY)`,(2 <> '2000-01-01') + interval 1 day AS `(2 <> '2000-01-01') +INTERVAL 1 DAY`
+select 2 <> '2000-01-01' +INTERVAL 1 DAY, 2 <> ('2000-01-01' +INTERVAL 1 DAY), (2 <> '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 <> '2000-01-01' +INTERVAL 1 DAY 2 <> ('2000-01-01' +INTERVAL 1 DAY) (2 <> '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 <> 3 + 3, 2 <> (3 + 3), (2 <> 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 + 3 AS `2 <> 3 + 3`,2 <> 3 + 3 AS `2 <> (3 + 3)`,(2 <> 3) + 3 AS `(2 <> 3) + 3`
+select 2 <> 3 + 3, 2 <> (3 + 3), (2 <> 3) + 3 union select * from v1;
+2 <> 3 + 3 2 <> (3 + 3) (2 <> 3) + 3
+1 1 4
+create or replace view v1 as select 2 <> 3 - 3, 2 <> (3 - 3), (2 <> 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 - 3 AS `2 <> 3 - 3`,2 <> 3 - 3 AS `2 <> (3 - 3)`,(2 <> 3) - 3 AS `(2 <> 3) - 3`
+select 2 <> 3 - 3, 2 <> (3 - 3), (2 <> 3) - 3 union select * from v1;
+2 <> 3 - 3 2 <> (3 - 3) (2 <> 3) - 3
+1 1 -2
+create or replace view v1 as select 2 <> 3 * 3, 2 <> (3 * 3), (2 <> 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 * 3 AS `2 <> 3 * 3`,2 <> 3 * 3 AS `2 <> (3 * 3)`,(2 <> 3) * 3 AS `(2 <> 3) * 3`
+select 2 <> 3 * 3, 2 <> (3 * 3), (2 <> 3) * 3 union select * from v1;
+2 <> 3 * 3 2 <> (3 * 3) (2 <> 3) * 3
+1 1 3
+create or replace view v1 as select 2 <> 3 / 3, 2 <> (3 / 3), (2 <> 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 / 3 AS `2 <> 3 / 3`,2 <> 3 / 3 AS `2 <> (3 / 3)`,(2 <> 3) / 3 AS `(2 <> 3) / 3`
+select 2 <> 3 / 3, 2 <> (3 / 3), (2 <> 3) / 3 union select * from v1;
+2 <> 3 / 3 2 <> (3 / 3) (2 <> 3) / 3
+1 1 0.3333
+create or replace view v1 as select 2 <> 3 DIV 3, 2 <> (3 DIV 3), (2 <> 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 DIV 3 AS `2 <> 3 DIV 3`,2 <> 3 DIV 3 AS `2 <> (3 DIV 3)`,(2 <> 3) DIV 3 AS `(2 <> 3) DIV 3`
+select 2 <> 3 DIV 3, 2 <> (3 DIV 3), (2 <> 3) DIV 3 union select * from v1;
+2 <> 3 DIV 3 2 <> (3 DIV 3) (2 <> 3) DIV 3
+1 1 0
+create or replace view v1 as select 3 <> 3 MOD 3, 3 <> (3 MOD 3), (3 <> 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 MOD 3 AS `3 <> 3 MOD 3`,3 <> 3 MOD 3 AS `3 <> (3 MOD 3)`,(3 <> 3) MOD 3 AS `(3 <> 3) MOD 3`
+select 3 <> 3 MOD 3, 3 <> (3 MOD 3), (3 <> 3) MOD 3 union select * from v1;
+3 <> 3 MOD 3 3 <> (3 MOD 3) (3 <> 3) MOD 3
+1 1 0
+create or replace view v1 as select 3 <> 3 % 3, 3 <> (3 % 3), (3 <> 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 MOD 3 AS `3 <> 3 % 3`,3 <> 3 MOD 3 AS `3 <> (3 % 3)`,(3 <> 3) MOD 3 AS `(3 <> 3) % 3`
+select 3 <> 3 % 3, 3 <> (3 % 3), (3 <> 3) % 3 union select * from v1;
+3 <> 3 % 3 3 <> (3 % 3) (3 <> 3) % 3
+1 1 0
+create or replace view v1 as select 2 <> 3 ^ 3, 2 <> (3 ^ 3), (2 <> 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 ^ 3 AS `2 <> 3 ^ 3`,2 <> 3 ^ 3 AS `2 <> (3 ^ 3)`,(2 <> 3) ^ 3 AS `(2 <> 3) ^ 3`
+select 2 <> 3 ^ 3, 2 <> (3 ^ 3), (2 <> 3) ^ 3 union select * from v1;
+2 <> 3 ^ 3 2 <> (3 ^ 3) (2 <> 3) ^ 3
+1 1 2
+create or replace view v1 as select 2 <> 3 BETWEEN 2 AND 3, 2 <> (3 BETWEEN 2 AND 3), (2 <> 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 between 2 and 3 AS `2 <> 3 BETWEEN 2 AND 3`,2 <> 3 between 2 and 3 AS `2 <> (3 BETWEEN 2 AND 3)`,(2 <> 3) between 2 and 3 AS `(2 <> 3) BETWEEN 2 AND 3`
+select 2 <> 3 BETWEEN 2 AND 3, 2 <> (3 BETWEEN 2 AND 3), (2 <> 3) BETWEEN 2 AND 3 union select * from v1;
+2 <> 3 BETWEEN 2 AND 3 2 <> (3 BETWEEN 2 AND 3) (2 <> 3) BETWEEN 2 AND 3
+1 1 0
+create or replace view v1 as select 2 > 0 IS FALSE, 2 > (0 IS FALSE), (2 > 0) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 0 is false AS `2 > 0 IS FALSE`,2 > (0 is false) AS `2 > (0 IS FALSE)`,2 > 0 is false AS `(2 > 0) IS FALSE`
+select 2 > 0 IS FALSE, 2 > (0 IS FALSE), (2 > 0) IS FALSE union select * from v1;
+2 > 0 IS FALSE 2 > (0 IS FALSE) (2 > 0) IS FALSE
+0 1 0
+create or replace view v1 as select charset(2 > 3 COLLATE latin1_bin), charset(2 > (3 COLLATE latin1_bin)), charset((2 > 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 > 3 collate latin1_bin) AS `charset(2 > 3 COLLATE latin1_bin)`,charset(2 > 3 collate latin1_bin) AS `charset(2 > (3 COLLATE latin1_bin))`,charset((2 > 3) collate latin1_bin) AS `charset((2 > 3) COLLATE latin1_bin)`
+select charset(2 > 3 COLLATE latin1_bin), charset(2 > (3 COLLATE latin1_bin)), charset((2 > 3) COLLATE latin1_bin) union select * from v1;
+charset(2 > 3 COLLATE latin1_bin) charset(2 > (3 COLLATE latin1_bin)) charset((2 > 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 > 3 IN (1,1), 2 > (3 IN (1,1)), (2 > 3) IN (1,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 in (1,1) AS `2 > 3 IN (1,1)`,2 > 3 in (1,1) AS `2 > (3 IN (1,1))`,(2 > 3) in (1,1) AS `(2 > 3) IN (1,1)`
+select 2 > 3 IN (1,1), 2 > (3 IN (1,1)), (2 > 3) IN (1,1) union select * from v1;
+2 > 3 IN (1,1) 2 > (3 IN (1,1)) (2 > 3) IN (1,1)
+1 1 0
+create or replace view v1 as select 0 > 3 OR 3, 0 > (3 OR 3), (0 > 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 > 3 or 3 AS `0 > 3 OR 3`,0 > (3 or 3) AS `0 > (3 OR 3)`,0 > 3 or 3 AS `(0 > 3) OR 3`
+select 0 > 3 OR 3, 0 > (3 OR 3), (0 > 3) OR 3 union select * from v1;
+0 > 3 OR 3 0 > (3 OR 3) (0 > 3) OR 3
+1 0 1
+create or replace view v1 as select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 > 3 or 3 AS `0 > 3 || 3`,0 > (3 or 3) AS `0 > (3 || 3)`,0 > 3 or 3 AS `(0 > 3) || 3`
+select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3 union select * from v1;
+0 > 3 || 3 0 > (3 || 3) (0 > 3) || 3
+1 0 1
+create or replace view v1 as select 4 > 3 XOR 3, 4 > (3 XOR 3), (4 > 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 > 3 xor 3 AS `4 > 3 XOR 3`,4 > (3 xor 3) AS `4 > (3 XOR 3)`,4 > 3 xor 3 AS `(4 > 3) XOR 3`
+select 4 > 3 XOR 3, 4 > (3 XOR 3), (4 > 3) XOR 3 union select * from v1;
+4 > 3 XOR 3 4 > (3 XOR 3) (4 > 3) XOR 3
+0 1 0
+create or replace view v1 as select 2 > 3 AND 3, 2 > (3 AND 3), (2 > 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 and 3 AS `2 > 3 AND 3`,2 > (3 and 3) AS `2 > (3 AND 3)`,2 > 3 and 3 AS `(2 > 3) AND 3`
+select 2 > 3 AND 3, 2 > (3 AND 3), (2 > 3) AND 3 union select * from v1;
+2 > 3 AND 3 2 > (3 AND 3) (2 > 3) AND 3
+0 1 0
+create or replace view v1 as select 2 > 3 && 3, 2 > (3 && 3), (2 > 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 and 3 AS `2 > 3 && 3`,2 > (3 and 3) AS `2 > (3 && 3)`,2 > 3 and 3 AS `(2 > 3) && 3`
+select 2 > 3 && 3, 2 > (3 && 3), (2 > 3) && 3 union select * from v1;
+2 > 3 && 3 2 > (3 && 3) (2 > 3) && 3
+0 1 0
+create or replace view v1 as select 2 > 3 = 3, 2 > (3 = 3), (2 > 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 = 3 AS `2 > 3 = 3`,2 > (3 = 3) AS `2 > (3 = 3)`,2 > 3 = 3 AS `(2 > 3) = 3`
+select 2 > 3 = 3, 2 > (3 = 3), (2 > 3) = 3 union select * from v1;
+2 > 3 = 3 2 > (3 = 3) (2 > 3) = 3
+0 1 0
+create or replace view v1 as select 2 > 3 <=> 3, 2 > (3 <=> 3), (2 > 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 <=> 3 AS `2 > 3 <=> 3`,2 > (3 <=> 3) AS `2 > (3 <=> 3)`,2 > 3 <=> 3 AS `(2 > 3) <=> 3`
+select 2 > 3 <=> 3, 2 > (3 <=> 3), (2 > 3) <=> 3 union select * from v1;
+2 > 3 <=> 3 2 > (3 <=> 3) (2 > 3) <=> 3
+0 1 0
+create or replace view v1 as select 2 > 3 >= 3, 2 > (3 >= 3), (2 > 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 >= 3 AS `2 > 3 >= 3`,2 > (3 >= 3) AS `2 > (3 >= 3)`,2 > 3 >= 3 AS `(2 > 3) >= 3`
+select 2 > 3 >= 3, 2 > (3 >= 3), (2 > 3) >= 3 union select * from v1;
+2 > 3 >= 3 2 > (3 >= 3) (2 > 3) >= 3
+0 1 0
+create or replace view v1 as select 2 > 0 <= 0, 2 > (0 <= 0), (2 > 0) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 0 <= 0 AS `2 > 0 <= 0`,2 > (0 <= 0) AS `2 > (0 <= 0)`,2 > 0 <= 0 AS `(2 > 0) <= 0`
+select 2 > 0 <= 0, 2 > (0 <= 0), (2 > 0) <= 0 union select * from v1;
+2 > 0 <= 0 2 > (0 <= 0) (2 > 0) <= 0
+0 1 0
+create or replace view v1 as select 2 > 0 < 0, 2 > (0 < 0), (2 > 0) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 0 < 0 AS `2 > 0 < 0`,2 > (0 < 0) AS `2 > (0 < 0)`,2 > 0 < 0 AS `(2 > 0) < 0`
+select 2 > 0 < 0, 2 > (0 < 0), (2 > 0) < 0 union select * from v1;
+2 > 0 < 0 2 > (0 < 0) (2 > 0) < 0
+0 1 0
+create or replace view v1 as select 2 > 1 <> 1, 2 > (1 <> 1), (2 > 1) <> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 1 <> 1 AS `2 > 1 <> 1`,2 > (1 <> 1) AS `2 > (1 <> 1)`,2 > 1 <> 1 AS `(2 > 1) <> 1`
+select 2 > 1 <> 1, 2 > (1 <> 1), (2 > 1) <> 1 union select * from v1;
+2 > 1 <> 1 2 > (1 <> 1) (2 > 1) <> 1
+0 1 0
+create or replace view v1 as select 2 > 3 > 3, 2 > (3 > 3), (2 > 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 > 3 AS `2 > 3 > 3`,2 > (3 > 3) AS `2 > (3 > 3)`,2 > 3 > 3 AS `(2 > 3) > 3`
+select 2 > 3 > 3, 2 > (3 > 3), (2 > 3) > 3 union select * from v1;
+2 > 3 > 3 2 > (3 > 3) (2 > 3) > 3
+0 1 0
+create or replace view v1 as select 2 > 1 != 1, 2 > (1 != 1), (2 > 1) != 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 1 <> 1 AS `2 > 1 != 1`,2 > (1 <> 1) AS `2 > (1 != 1)`,2 > 1 <> 1 AS `(2 > 1) != 1`
+select 2 > 1 != 1, 2 > (1 != 1), (2 > 1) != 1 union select * from v1;
+2 > 1 != 1 2 > (1 != 1) (2 > 1) != 1
+0 1 0
+create or replace view v1 as select 2 > 3 LIKE 3, 2 > (3 LIKE 3), (2 > 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 like 3 AS `2 > 3 LIKE 3`,2 > 3 like 3 AS `2 > (3 LIKE 3)`,(2 > 3) like 3 AS `(2 > 3) LIKE 3`
+select 2 > 3 LIKE 3, 2 > (3 LIKE 3), (2 > 3) LIKE 3 union select * from v1;
+2 > 3 LIKE 3 2 > (3 LIKE 3) (2 > 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 > 3 REGEXP 3, 2 > (3 REGEXP 3), (2 > 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 regexp 3 AS `2 > 3 REGEXP 3`,2 > 3 regexp 3 AS `2 > (3 REGEXP 3)`,(2 > 3) regexp 3 AS `(2 > 3) REGEXP 3`
+select 2 > 3 REGEXP 3, 2 > (3 REGEXP 3), (2 > 3) REGEXP 3 union select * from v1;
+2 > 3 REGEXP 3 2 > (3 REGEXP 3) (2 > 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 > 3 | 3, 2 > (3 | 3), (2 > 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 | 3 AS `2 > 3 | 3`,2 > 3 | 3 AS `2 > (3 | 3)`,(2 > 3) | 3 AS `(2 > 3) | 3`
+select 2 > 3 | 3, 2 > (3 | 3), (2 > 3) | 3 union select * from v1;
+2 > 3 | 3 2 > (3 | 3) (2 > 3) | 3
+0 0 3
+create or replace view v1 as select 4 > 2 & 2, 4 > (2 & 2), (4 > 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 > 2 & 2 AS `4 > 2 & 2`,4 > 2 & 2 AS `4 > (2 & 2)`,(4 > 2) & 2 AS `(4 > 2) & 2`
+select 4 > 2 & 2, 4 > (2 & 2), (4 > 2) & 2 union select * from v1;
+4 > 2 & 2 4 > (2 & 2) (4 > 2) & 2
+1 1 0
+create or replace view v1 as select 4 > 3 << 3, 4 > (3 << 3), (4 > 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 > 3 << 3 AS `4 > 3 << 3`,4 > 3 << 3 AS `4 > (3 << 3)`,(4 > 3) << 3 AS `(4 > 3) << 3`
+select 4 > 3 << 3, 4 > (3 << 3), (4 > 3) << 3 union select * from v1;
+4 > 3 << 3 4 > (3 << 3) (4 > 3) << 3
+0 0 8
+create or replace view v1 as select 2 > 3 >> 3, 2 > (3 >> 3), (2 > 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 >> 3 AS `2 > 3 >> 3`,2 > 3 >> 3 AS `2 > (3 >> 3)`,(2 > 3) >> 3 AS `(2 > 3) >> 3`
+select 2 > 3 >> 3, 2 > (3 >> 3), (2 > 3) >> 3 union select * from v1;
+2 > 3 >> 3 2 > (3 >> 3) (2 > 3) >> 3
+1 1 0
+create or replace view v1 as select 2 > '2000-01-01' +INTERVAL 1 DAY, 2 > ('2000-01-01' +INTERVAL 1 DAY), (2 > '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > '2000-01-01' + interval 1 day AS `2 > '2000-01-01' +INTERVAL 1 DAY`,2 > '2000-01-01' + interval 1 day AS `2 > ('2000-01-01' +INTERVAL 1 DAY)`,(2 > '2000-01-01') + interval 1 day AS `(2 > '2000-01-01') +INTERVAL 1 DAY`
+select 2 > '2000-01-01' +INTERVAL 1 DAY, 2 > ('2000-01-01' +INTERVAL 1 DAY), (2 > '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 > '2000-01-01' +INTERVAL 1 DAY 2 > ('2000-01-01' +INTERVAL 1 DAY) (2 > '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 > 3 + 3, 2 > (3 + 3), (2 > 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 + 3 AS `2 > 3 + 3`,2 > 3 + 3 AS `2 > (3 + 3)`,(2 > 3) + 3 AS `(2 > 3) + 3`
+select 2 > 3 + 3, 2 > (3 + 3), (2 > 3) + 3 union select * from v1;
+2 > 3 + 3 2 > (3 + 3) (2 > 3) + 3
+0 0 3
+create or replace view v1 as select 2 > 3 - 3, 2 > (3 - 3), (2 > 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 - 3 AS `2 > 3 - 3`,2 > 3 - 3 AS `2 > (3 - 3)`,(2 > 3) - 3 AS `(2 > 3) - 3`
+select 2 > 3 - 3, 2 > (3 - 3), (2 > 3) - 3 union select * from v1;
+2 > 3 - 3 2 > (3 - 3) (2 > 3) - 3
+1 1 -3
+create or replace view v1 as select 4 > 3 * 3, 4 > (3 * 3), (4 > 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 > 3 * 3 AS `4 > 3 * 3`,4 > 3 * 3 AS `4 > (3 * 3)`,(4 > 3) * 3 AS `(4 > 3) * 3`
+select 4 > 3 * 3, 4 > (3 * 3), (4 > 3) * 3 union select * from v1;
+4 > 3 * 3 4 > (3 * 3) (4 > 3) * 3
+0 0 3
+create or replace view v1 as select 2 > 3 / 3, 2 > (3 / 3), (2 > 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 / 3 AS `2 > 3 / 3`,2 > 3 / 3 AS `2 > (3 / 3)`,(2 > 3) / 3 AS `(2 > 3) / 3`
+select 2 > 3 / 3, 2 > (3 / 3), (2 > 3) / 3 union select * from v1;
+2 > 3 / 3 2 > (3 / 3) (2 > 3) / 3
+1 1 0.0000
+create or replace view v1 as select 2 > 3 DIV 3, 2 > (3 DIV 3), (2 > 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 DIV 3 AS `2 > 3 DIV 3`,2 > 3 DIV 3 AS `2 > (3 DIV 3)`,(2 > 3) DIV 3 AS `(2 > 3) DIV 3`
+select 2 > 3 DIV 3, 2 > (3 DIV 3), (2 > 3) DIV 3 union select * from v1;
+2 > 3 DIV 3 2 > (3 DIV 3) (2 > 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 > 3 MOD 3, 2 > (3 MOD 3), (2 > 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 MOD 3 AS `2 > 3 MOD 3`,2 > 3 MOD 3 AS `2 > (3 MOD 3)`,(2 > 3) MOD 3 AS `(2 > 3) MOD 3`
+select 2 > 3 MOD 3, 2 > (3 MOD 3), (2 > 3) MOD 3 union select * from v1;
+2 > 3 MOD 3 2 > (3 MOD 3) (2 > 3) MOD 3
+1 1 0
+create or replace view v1 as select 2 > 3 % 3, 2 > (3 % 3), (2 > 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 MOD 3 AS `2 > 3 % 3`,2 > 3 MOD 3 AS `2 > (3 % 3)`,(2 > 3) MOD 3 AS `(2 > 3) % 3`
+select 2 > 3 % 3, 2 > (3 % 3), (2 > 3) % 3 union select * from v1;
+2 > 3 % 3 2 > (3 % 3) (2 > 3) % 3
+1 1 0
+create or replace view v1 as select 2 > 3 ^ 3, 2 > (3 ^ 3), (2 > 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 ^ 3 AS `2 > 3 ^ 3`,2 > 3 ^ 3 AS `2 > (3 ^ 3)`,(2 > 3) ^ 3 AS `(2 > 3) ^ 3`
+select 2 > 3 ^ 3, 2 > (3 ^ 3), (2 > 3) ^ 3 union select * from v1;
+2 > 3 ^ 3 2 > (3 ^ 3) (2 > 3) ^ 3
+1 1 3
+create or replace view v1 as select 2 > 3 BETWEEN 1 AND 3, 2 > (3 BETWEEN 1 AND 3), (2 > 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 between 1 and 3 AS `2 > 3 BETWEEN 1 AND 3`,2 > 3 between 1 and 3 AS `2 > (3 BETWEEN 1 AND 3)`,(2 > 3) between 1 and 3 AS `(2 > 3) BETWEEN 1 AND 3`
+select 2 > 3 BETWEEN 1 AND 3, 2 > (3 BETWEEN 1 AND 3), (2 > 3) BETWEEN 1 AND 3 union select * from v1;
+2 > 3 BETWEEN 1 AND 3 2 > (3 BETWEEN 1 AND 3) (2 > 3) BETWEEN 1 AND 3
+1 1 0
+create or replace view v1 as select 2 != 3 IS FALSE, 2 != (3 IS FALSE), (2 != 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 is false AS `2 != 3 IS FALSE`,2 <> (3 is false) AS `2 != (3 IS FALSE)`,2 <> 3 is false AS `(2 != 3) IS FALSE`
+select 2 != 3 IS FALSE, 2 != (3 IS FALSE), (2 != 3) IS FALSE union select * from v1;
+2 != 3 IS FALSE 2 != (3 IS FALSE) (2 != 3) IS FALSE
+0 1 0
+create or replace view v1 as select charset(2 != 3 COLLATE latin1_bin), charset(2 != (3 COLLATE latin1_bin)), charset((2 != 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 <> 3 collate latin1_bin) AS `charset(2 != 3 COLLATE latin1_bin)`,charset(2 <> 3 collate latin1_bin) AS `charset(2 != (3 COLLATE latin1_bin))`,charset((2 <> 3) collate latin1_bin) AS `charset((2 != 3) COLLATE latin1_bin)`
+select charset(2 != 3 COLLATE latin1_bin), charset(2 != (3 COLLATE latin1_bin)), charset((2 != 3) COLLATE latin1_bin) union select * from v1;
+charset(2 != 3 COLLATE latin1_bin) charset(2 != (3 COLLATE latin1_bin)) charset((2 != 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 != 3 IN (0,0), 2 != (3 IN (0,0)), (2 != 3) IN (0,0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 in (0,0) AS `2 != 3 IN (0,0)`,2 <> 3 in (0,0) AS `2 != (3 IN (0,0))`,(2 <> 3) in (0,0) AS `(2 != 3) IN (0,0)`
+select 2 != 3 IN (0,0), 2 != (3 IN (0,0)), (2 != 3) IN (0,0) union select * from v1;
+2 != 3 IN (0,0) 2 != (3 IN (0,0)) (2 != 3) IN (0,0)
+1 1 0
+create or replace view v1 as select 1 != 3 OR 3, 1 != (3 OR 3), (1 != 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 3 or 3 AS `1 != 3 OR 3`,1 <> (3 or 3) AS `1 != (3 OR 3)`,1 <> 3 or 3 AS `(1 != 3) OR 3`
+select 1 != 3 OR 3, 1 != (3 OR 3), (1 != 3) OR 3 union select * from v1;
+1 != 3 OR 3 1 != (3 OR 3) (1 != 3) OR 3
+1 0 1
+create or replace view v1 as select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 3 or 3 AS `1 != 3 || 3`,1 <> (3 or 3) AS `1 != (3 || 3)`,1 <> 3 or 3 AS `(1 != 3) || 3`
+select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3 union select * from v1;
+1 != 3 || 3 1 != (3 || 3) (1 != 3) || 3
+1 0 1
+create or replace view v1 as select 2 != 3 XOR 3, 2 != (3 XOR 3), (2 != 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 xor 3 AS `2 != 3 XOR 3`,2 <> (3 xor 3) AS `2 != (3 XOR 3)`,2 <> 3 xor 3 AS `(2 != 3) XOR 3`
+select 2 != 3 XOR 3, 2 != (3 XOR 3), (2 != 3) XOR 3 union select * from v1;
+2 != 3 XOR 3 2 != (3 XOR 3) (2 != 3) XOR 3
+0 1 0
+create or replace view v1 as select 3 != 3 AND 3, 3 != (3 AND 3), (3 != 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 and 3 AS `3 != 3 AND 3`,3 <> (3 and 3) AS `3 != (3 AND 3)`,3 <> 3 and 3 AS `(3 != 3) AND 3`
+select 3 != 3 AND 3, 3 != (3 AND 3), (3 != 3) AND 3 union select * from v1;
+3 != 3 AND 3 3 != (3 AND 3) (3 != 3) AND 3
+0 1 0
+create or replace view v1 as select 3 != 3 && 3, 3 != (3 && 3), (3 != 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 and 3 AS `3 != 3 && 3`,3 <> (3 and 3) AS `3 != (3 && 3)`,3 <> 3 and 3 AS `(3 != 3) && 3`
+select 3 != 3 && 3, 3 != (3 && 3), (3 != 3) && 3 union select * from v1;
+3 != 3 && 3 3 != (3 && 3) (3 != 3) && 3
+0 1 0
+create or replace view v1 as select 2 != 3 = 3, 2 != (3 = 3), (2 != 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 = 3 AS `2 != 3 = 3`,2 <> (3 = 3) AS `2 != (3 = 3)`,2 <> 3 = 3 AS `(2 != 3) = 3`
+select 2 != 3 = 3, 2 != (3 = 3), (2 != 3) = 3 union select * from v1;
+2 != 3 = 3 2 != (3 = 3) (2 != 3) = 3
+0 1 0
+create or replace view v1 as select 2 != 3 <=> 3, 2 != (3 <=> 3), (2 != 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 <=> 3 AS `2 != 3 <=> 3`,2 <> (3 <=> 3) AS `2 != (3 <=> 3)`,2 <> 3 <=> 3 AS `(2 != 3) <=> 3`
+select 2 != 3 <=> 3, 2 != (3 <=> 3), (2 != 3) <=> 3 union select * from v1;
+2 != 3 <=> 3 2 != (3 <=> 3) (2 != 3) <=> 3
+0 1 0
+create or replace view v1 as select 2 != 3 >= 3, 2 != (3 >= 3), (2 != 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 >= 3 AS `2 != 3 >= 3`,2 <> (3 >= 3) AS `2 != (3 >= 3)`,2 <> 3 >= 3 AS `(2 != 3) >= 3`
+select 2 != 3 >= 3, 2 != (3 >= 3), (2 != 3) >= 3 union select * from v1;
+2 != 3 >= 3 2 != (3 >= 3) (2 != 3) >= 3
+0 1 0
+create or replace view v1 as select 1 != 3 <= 3, 1 != (3 <= 3), (1 != 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 3 <= 3 AS `1 != 3 <= 3`,1 <> (3 <= 3) AS `1 != (3 <= 3)`,1 <> 3 <= 3 AS `(1 != 3) <= 3`
+select 1 != 3 <= 3, 1 != (3 <= 3), (1 != 3) <= 3 union select * from v1;
+1 != 3 <= 3 1 != (3 <= 3) (1 != 3) <= 3
+1 0 1
+create or replace view v1 as select 0 != 3 < 3, 0 != (3 < 3), (0 != 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <> 3 < 3 AS `0 != 3 < 3`,0 <> (3 < 3) AS `0 != (3 < 3)`,0 <> 3 < 3 AS `(0 != 3) < 3`
+select 0 != 3 < 3, 0 != (3 < 3), (0 != 3) < 3 union select * from v1;
+0 != 3 < 3 0 != (3 < 3) (0 != 3) < 3
+1 0 1
+create or replace view v1 as select 0 != 3 <> 3, 0 != (3 <> 3), (0 != 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <> 3 <> 3 AS `0 != 3 <> 3`,0 <> (3 <> 3) AS `0 != (3 <> 3)`,0 <> 3 <> 3 AS `(0 != 3) <> 3`
+select 0 != 3 <> 3, 0 != (3 <> 3), (0 != 3) <> 3 union select * from v1;
+0 != 3 <> 3 0 != (3 <> 3) (0 != 3) <> 3
+1 0 1
+create or replace view v1 as select 2 != 3 > 3, 2 != (3 > 3), (2 != 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 > 3 AS `2 != 3 > 3`,2 <> (3 > 3) AS `2 != (3 > 3)`,2 <> 3 > 3 AS `(2 != 3) > 3`
+select 2 != 3 > 3, 2 != (3 > 3), (2 != 3) > 3 union select * from v1;
+2 != 3 > 3 2 != (3 > 3) (2 != 3) > 3
+0 1 0
+create or replace view v1 as select 0 != 3 != 3, 0 != (3 != 3), (0 != 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 <> 3 <> 3 AS `0 != 3 != 3`,0 <> (3 <> 3) AS `0 != (3 != 3)`,0 <> 3 <> 3 AS `(0 != 3) != 3`
+select 0 != 3 != 3, 0 != (3 != 3), (0 != 3) != 3 union select * from v1;
+0 != 3 != 3 0 != (3 != 3) (0 != 3) != 3
+1 0 1
+create or replace view v1 as select 2 != 3 LIKE 3, 2 != (3 LIKE 3), (2 != 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 like 3 AS `2 != 3 LIKE 3`,2 <> 3 like 3 AS `2 != (3 LIKE 3)`,(2 <> 3) like 3 AS `(2 != 3) LIKE 3`
+select 2 != 3 LIKE 3, 2 != (3 LIKE 3), (2 != 3) LIKE 3 union select * from v1;
+2 != 3 LIKE 3 2 != (3 LIKE 3) (2 != 3) LIKE 3
+1 1 0
+create or replace view v1 as select 2 != 3 REGEXP 3, 2 != (3 REGEXP 3), (2 != 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 regexp 3 AS `2 != 3 REGEXP 3`,2 <> 3 regexp 3 AS `2 != (3 REGEXP 3)`,(2 <> 3) regexp 3 AS `(2 != 3) REGEXP 3`
+select 2 != 3 REGEXP 3, 2 != (3 REGEXP 3), (2 != 3) REGEXP 3 union select * from v1;
+2 != 3 REGEXP 3 2 != (3 REGEXP 3) (2 != 3) REGEXP 3
+1 1 0
+create or replace view v1 as select 2 != 3 | 3, 2 != (3 | 3), (2 != 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 | 3 AS `2 != 3 | 3`,2 <> 3 | 3 AS `2 != (3 | 3)`,(2 <> 3) | 3 AS `(2 != 3) | 3`
+select 2 != 3 | 3, 2 != (3 | 3), (2 != 3) | 3 union select * from v1;
+2 != 3 | 3 2 != (3 | 3) (2 != 3) | 3
+1 1 3
+create or replace view v1 as select 2 != 4 & 4, 2 != (4 & 4), (2 != 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 4 & 4 AS `2 != 4 & 4`,2 <> 4 & 4 AS `2 != (4 & 4)`,(2 <> 4) & 4 AS `(2 != 4) & 4`
+select 2 != 4 & 4, 2 != (4 & 4), (2 != 4) & 4 union select * from v1;
+2 != 4 & 4 2 != (4 & 4) (2 != 4) & 4
+1 1 0
+create or replace view v1 as select 2 != 3 << 3, 2 != (3 << 3), (2 != 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 << 3 AS `2 != 3 << 3`,2 <> 3 << 3 AS `2 != (3 << 3)`,(2 <> 3) << 3 AS `(2 != 3) << 3`
+select 2 != 3 << 3, 2 != (3 << 3), (2 != 3) << 3 union select * from v1;
+2 != 3 << 3 2 != (3 << 3) (2 != 3) << 3
+1 1 8
+create or replace view v1 as select 2 != 3 >> 3, 2 != (3 >> 3), (2 != 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 >> 3 AS `2 != 3 >> 3`,2 <> 3 >> 3 AS `2 != (3 >> 3)`,(2 <> 3) >> 3 AS `(2 != 3) >> 3`
+select 2 != 3 >> 3, 2 != (3 >> 3), (2 != 3) >> 3 union select * from v1;
+2 != 3 >> 3 2 != (3 >> 3) (2 != 3) >> 3
+1 1 0
+create or replace view v1 as select 2 != '2000-01-01' +INTERVAL 1 DAY, 2 != ('2000-01-01' +INTERVAL 1 DAY), (2 != '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> '2000-01-01' + interval 1 day AS `2 != '2000-01-01' +INTERVAL 1 DAY`,2 <> '2000-01-01' + interval 1 day AS `2 != ('2000-01-01' +INTERVAL 1 DAY)`,(2 <> '2000-01-01') + interval 1 day AS `(2 != '2000-01-01') +INTERVAL 1 DAY`
+select 2 != '2000-01-01' +INTERVAL 1 DAY, 2 != ('2000-01-01' +INTERVAL 1 DAY), (2 != '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 != '2000-01-01' +INTERVAL 1 DAY 2 != ('2000-01-01' +INTERVAL 1 DAY) (2 != '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 != 3 + 3, 2 != (3 + 3), (2 != 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 + 3 AS `2 != 3 + 3`,2 <> 3 + 3 AS `2 != (3 + 3)`,(2 <> 3) + 3 AS `(2 != 3) + 3`
+select 2 != 3 + 3, 2 != (3 + 3), (2 != 3) + 3 union select * from v1;
+2 != 3 + 3 2 != (3 + 3) (2 != 3) + 3
+1 1 4
+create or replace view v1 as select 2 != 3 - 3, 2 != (3 - 3), (2 != 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 - 3 AS `2 != 3 - 3`,2 <> 3 - 3 AS `2 != (3 - 3)`,(2 <> 3) - 3 AS `(2 != 3) - 3`
+select 2 != 3 - 3, 2 != (3 - 3), (2 != 3) - 3 union select * from v1;
+2 != 3 - 3 2 != (3 - 3) (2 != 3) - 3
+1 1 -2
+create or replace view v1 as select 2 != 3 * 3, 2 != (3 * 3), (2 != 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 * 3 AS `2 != 3 * 3`,2 <> 3 * 3 AS `2 != (3 * 3)`,(2 <> 3) * 3 AS `(2 != 3) * 3`
+select 2 != 3 * 3, 2 != (3 * 3), (2 != 3) * 3 union select * from v1;
+2 != 3 * 3 2 != (3 * 3) (2 != 3) * 3
+1 1 3
+create or replace view v1 as select 2 != 3 / 3, 2 != (3 / 3), (2 != 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 / 3 AS `2 != 3 / 3`,2 <> 3 / 3 AS `2 != (3 / 3)`,(2 <> 3) / 3 AS `(2 != 3) / 3`
+select 2 != 3 / 3, 2 != (3 / 3), (2 != 3) / 3 union select * from v1;
+2 != 3 / 3 2 != (3 / 3) (2 != 3) / 3
+1 1 0.3333
+create or replace view v1 as select 2 != 3 DIV 3, 2 != (3 DIV 3), (2 != 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 DIV 3 AS `2 != 3 DIV 3`,2 <> 3 DIV 3 AS `2 != (3 DIV 3)`,(2 <> 3) DIV 3 AS `(2 != 3) DIV 3`
+select 2 != 3 DIV 3, 2 != (3 DIV 3), (2 != 3) DIV 3 union select * from v1;
+2 != 3 DIV 3 2 != (3 DIV 3) (2 != 3) DIV 3
+1 1 0
+create or replace view v1 as select 3 != 3 MOD 3, 3 != (3 MOD 3), (3 != 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 MOD 3 AS `3 != 3 MOD 3`,3 <> 3 MOD 3 AS `3 != (3 MOD 3)`,(3 <> 3) MOD 3 AS `(3 != 3) MOD 3`
+select 3 != 3 MOD 3, 3 != (3 MOD 3), (3 != 3) MOD 3 union select * from v1;
+3 != 3 MOD 3 3 != (3 MOD 3) (3 != 3) MOD 3
+1 1 0
+create or replace view v1 as select 3 != 3 % 3, 3 != (3 % 3), (3 != 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 <> 3 MOD 3 AS `3 != 3 % 3`,3 <> 3 MOD 3 AS `3 != (3 % 3)`,(3 <> 3) MOD 3 AS `(3 != 3) % 3`
+select 3 != 3 % 3, 3 != (3 % 3), (3 != 3) % 3 union select * from v1;
+3 != 3 % 3 3 != (3 % 3) (3 != 3) % 3
+1 1 0
+create or replace view v1 as select 2 != 3 ^ 3, 2 != (3 ^ 3), (2 != 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 ^ 3 AS `2 != 3 ^ 3`,2 <> 3 ^ 3 AS `2 != (3 ^ 3)`,(2 <> 3) ^ 3 AS `(2 != 3) ^ 3`
+select 2 != 3 ^ 3, 2 != (3 ^ 3), (2 != 3) ^ 3 union select * from v1;
+2 != 3 ^ 3 2 != (3 ^ 3) (2 != 3) ^ 3
+1 1 2
+create or replace view v1 as select 2 != 3 BETWEEN 2 AND 3, 2 != (3 BETWEEN 2 AND 3), (2 != 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 between 2 and 3 AS `2 != 3 BETWEEN 2 AND 3`,2 <> 3 between 2 and 3 AS `2 != (3 BETWEEN 2 AND 3)`,(2 <> 3) between 2 and 3 AS `(2 != 3) BETWEEN 2 AND 3`
+select 2 != 3 BETWEEN 2 AND 3, 2 != (3 BETWEEN 2 AND 3), (2 != 3) BETWEEN 2 AND 3 union select * from v1;
+2 != 3 BETWEEN 2 AND 3 2 != (3 BETWEEN 2 AND 3) (2 != 3) BETWEEN 2 AND 3
+1 1 0
+create or replace view v1 as select 2 LIKE 3 IS FALSE, 2 LIKE (3 IS FALSE), (2 LIKE 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 is false AS `2 LIKE 3 IS FALSE`,2 like (3 is false) AS `2 LIKE (3 IS FALSE)`,2 like 3 is false AS `(2 LIKE 3) IS FALSE`
+select 2 LIKE 3 IS FALSE, 2 LIKE (3 IS FALSE), (2 LIKE 3) IS FALSE union select * from v1;
+2 LIKE 3 IS FALSE 2 LIKE (3 IS FALSE) (2 LIKE 3) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 LIKE 3 COLLATE latin1_bin), charset(2 LIKE (3 COLLATE latin1_bin)), charset((2 LIKE 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 like 3 collate latin1_bin) AS `charset(2 LIKE 3 COLLATE latin1_bin)`,charset(2 like 3 collate latin1_bin) AS `charset(2 LIKE (3 COLLATE latin1_bin))`,charset((2 like 3) collate latin1_bin) AS `charset((2 LIKE 3) COLLATE latin1_bin)`
+select charset(2 LIKE 3 COLLATE latin1_bin), charset(2 LIKE (3 COLLATE latin1_bin)), charset((2 LIKE 3) COLLATE latin1_bin) union select * from v1;
+charset(2 LIKE 3 COLLATE latin1_bin) charset(2 LIKE (3 COLLATE latin1_bin)) charset((2 LIKE 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 LIKE 3 IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 in (0,1) AS `2 LIKE 3 IN (0,1)`,2 like (3 in (0,1)) AS `2 LIKE (3 IN (0,1))`,2 like 3 in (0,1) AS `(2 LIKE 3) IN (0,1)`
+select 2 LIKE 3 IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1) union select * from v1;
+2 LIKE 3 IN (0,1) 2 LIKE (3 IN (0,1)) (2 LIKE 3) IN (0,1)
+1 0 1
+create or replace view v1 as select 2 LIKE 3 OR 3, 2 LIKE (3 OR 3), (2 LIKE 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 or 3 AS `2 LIKE 3 OR 3`,2 like (3 or 3) AS `2 LIKE (3 OR 3)`,2 like 3 or 3 AS `(2 LIKE 3) OR 3`
+select 2 LIKE 3 OR 3, 2 LIKE (3 OR 3), (2 LIKE 3) OR 3 union select * from v1;
+2 LIKE 3 OR 3 2 LIKE (3 OR 3) (2 LIKE 3) OR 3
+1 0 1
+create or replace view v1 as select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 or 3 AS `2 LIKE 3 || 3`,2 like (3 or 3) AS `2 LIKE (3 || 3)`,2 like 3 or 3 AS `(2 LIKE 3) || 3`
+select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3 union select * from v1;
+2 LIKE 3 || 3 2 LIKE (3 || 3) (2 LIKE 3) || 3
+1 0 1
+create or replace view v1 as select 2 LIKE 3 XOR 3, 2 LIKE (3 XOR 3), (2 LIKE 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 xor 3 AS `2 LIKE 3 XOR 3`,2 like (3 xor 3) AS `2 LIKE (3 XOR 3)`,2 like 3 xor 3 AS `(2 LIKE 3) XOR 3`
+select 2 LIKE 3 XOR 3, 2 LIKE (3 XOR 3), (2 LIKE 3) XOR 3 union select * from v1;
+2 LIKE 3 XOR 3 2 LIKE (3 XOR 3) (2 LIKE 3) XOR 3
+1 0 1
+create or replace view v1 as select 2 LIKE 2 AND 2, 2 LIKE (2 AND 2), (2 LIKE 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 and 2 AS `2 LIKE 2 AND 2`,2 like (2 and 2) AS `2 LIKE (2 AND 2)`,2 like 2 and 2 AS `(2 LIKE 2) AND 2`
+select 2 LIKE 2 AND 2, 2 LIKE (2 AND 2), (2 LIKE 2) AND 2 union select * from v1;
+2 LIKE 2 AND 2 2 LIKE (2 AND 2) (2 LIKE 2) AND 2
+1 0 1
+create or replace view v1 as select 2 LIKE 2 && 2, 2 LIKE (2 && 2), (2 LIKE 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 and 2 AS `2 LIKE 2 && 2`,2 like (2 and 2) AS `2 LIKE (2 && 2)`,2 like 2 and 2 AS `(2 LIKE 2) && 2`
+select 2 LIKE 2 && 2, 2 LIKE (2 && 2), (2 LIKE 2) && 2 union select * from v1;
+2 LIKE 2 && 2 2 LIKE (2 && 2) (2 LIKE 2) && 2
+1 0 1
+create or replace view v1 as select 2 LIKE 2 = 1, 2 LIKE (2 = 1), (2 LIKE 2) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 = 1 AS `2 LIKE 2 = 1`,2 like (2 = 1) AS `2 LIKE (2 = 1)`,2 like 2 = 1 AS `(2 LIKE 2) = 1`
+select 2 LIKE 2 = 1, 2 LIKE (2 = 1), (2 LIKE 2) = 1 union select * from v1;
+2 LIKE 2 = 1 2 LIKE (2 = 1) (2 LIKE 2) = 1
+1 0 1
+create or replace view v1 as select 2 LIKE 2 <=> 1, 2 LIKE (2 <=> 1), (2 LIKE 2) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 <=> 1 AS `2 LIKE 2 <=> 1`,2 like (2 <=> 1) AS `2 LIKE (2 <=> 1)`,2 like 2 <=> 1 AS `(2 LIKE 2) <=> 1`
+select 2 LIKE 2 <=> 1, 2 LIKE (2 <=> 1), (2 LIKE 2) <=> 1 union select * from v1;
+2 LIKE 2 <=> 1 2 LIKE (2 <=> 1) (2 LIKE 2) <=> 1
+1 0 1
+create or replace view v1 as select 2 LIKE 2 >= 1, 2 LIKE (2 >= 1), (2 LIKE 2) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 >= 1 AS `2 LIKE 2 >= 1`,2 like (2 >= 1) AS `2 LIKE (2 >= 1)`,2 like 2 >= 1 AS `(2 LIKE 2) >= 1`
+select 2 LIKE 2 >= 1, 2 LIKE (2 >= 1), (2 LIKE 2) >= 1 union select * from v1;
+2 LIKE 2 >= 1 2 LIKE (2 >= 1) (2 LIKE 2) >= 1
+1 0 1
+create or replace view v1 as select 2 LIKE 3 <= 3, 2 LIKE (3 <= 3), (2 LIKE 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 <= 3 AS `2 LIKE 3 <= 3`,2 like (3 <= 3) AS `2 LIKE (3 <= 3)`,2 like 3 <= 3 AS `(2 LIKE 3) <= 3`
+select 2 LIKE 3 <= 3, 2 LIKE (3 <= 3), (2 LIKE 3) <= 3 union select * from v1;
+2 LIKE 3 <= 3 2 LIKE (3 <= 3) (2 LIKE 3) <= 3
+1 0 1
+create or replace view v1 as select 2 LIKE 3 < 3, 2 LIKE (3 < 3), (2 LIKE 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 < 3 AS `2 LIKE 3 < 3`,2 like (3 < 3) AS `2 LIKE (3 < 3)`,2 like 3 < 3 AS `(2 LIKE 3) < 3`
+select 2 LIKE 3 < 3, 2 LIKE (3 < 3), (2 LIKE 3) < 3 union select * from v1;
+2 LIKE 3 < 3 2 LIKE (3 < 3) (2 LIKE 3) < 3
+1 0 1
+create or replace view v1 as select 2 LIKE 3 <> 3, 2 LIKE (3 <> 3), (2 LIKE 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 <> 3 AS `2 LIKE 3 <> 3`,2 like (3 <> 3) AS `2 LIKE (3 <> 3)`,2 like 3 <> 3 AS `(2 LIKE 3) <> 3`
+select 2 LIKE 3 <> 3, 2 LIKE (3 <> 3), (2 LIKE 3) <> 3 union select * from v1;
+2 LIKE 3 <> 3 2 LIKE (3 <> 3) (2 LIKE 3) <> 3
+1 0 1
+create or replace view v1 as select 2 LIKE 2 > 0, 2 LIKE (2 > 0), (2 LIKE 2) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 > 0 AS `2 LIKE 2 > 0`,2 like (2 > 0) AS `2 LIKE (2 > 0)`,2 like 2 > 0 AS `(2 LIKE 2) > 0`
+select 2 LIKE 2 > 0, 2 LIKE (2 > 0), (2 LIKE 2) > 0 union select * from v1;
+2 LIKE 2 > 0 2 LIKE (2 > 0) (2 LIKE 2) > 0
+1 0 1
+create or replace view v1 as select 2 LIKE 3 != 3, 2 LIKE (3 != 3), (2 LIKE 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 <> 3 AS `2 LIKE 3 != 3`,2 like (3 <> 3) AS `2 LIKE (3 != 3)`,2 like 3 <> 3 AS `(2 LIKE 3) != 3`
+select 2 LIKE 3 != 3, 2 LIKE (3 != 3), (2 LIKE 3) != 3 union select * from v1;
+2 LIKE 3 != 3 2 LIKE (3 != 3) (2 LIKE 3) != 3
+1 0 1
+create or replace view v1 as select 2 LIKE 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 like 1 AS `2 LIKE 2 LIKE 1`,2 like (2 like 1) AS `2 LIKE (2 LIKE 1)`,2 like 2 like 1 AS `(2 LIKE 2) LIKE 1`
+select 2 LIKE 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1 union select * from v1;
+2 LIKE 2 LIKE 1 2 LIKE (2 LIKE 1) (2 LIKE 2) LIKE 1
+1 0 1
+create or replace view v1 as select 2 LIKE 2 REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 regexp 1 AS `2 LIKE 2 REGEXP 1`,2 like (2 regexp 1) AS `2 LIKE (2 REGEXP 1)`,2 like 2 regexp 1 AS `(2 LIKE 2) REGEXP 1`
+select 2 LIKE 2 REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1 union select * from v1;
+2 LIKE 2 REGEXP 1 2 LIKE (2 REGEXP 1) (2 LIKE 2) REGEXP 1
+1 0 1
+create or replace view v1 as select 2 LIKE 3 | 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 | 3 AS `2 LIKE 3 | 3`,2 like 3 | 3 AS `2 LIKE (3 | 3)`,(2 like 3) | 3 AS `(2 LIKE 3) | 3`
+select 2 LIKE 3 | 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3 union select * from v1;
+2 LIKE 3 | 3 2 LIKE (3 | 3) (2 LIKE 3) | 3
+0 0 3
+create or replace view v1 as select 2 LIKE 2 & 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 & 2 AS `2 LIKE 2 & 2`,2 like 2 & 2 AS `2 LIKE (2 & 2)`,(2 like 2) & 2 AS `(2 LIKE 2) & 2`
+select 2 LIKE 2 & 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2 union select * from v1;
+2 LIKE 2 & 2 2 LIKE (2 & 2) (2 LIKE 2) & 2
+1 1 0
+create or replace view v1 as select 2 LIKE 2 << 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 << 2 AS `2 LIKE 2 << 2`,2 like 2 << 2 AS `2 LIKE (2 << 2)`,(2 like 2) << 2 AS `(2 LIKE 2) << 2`
+select 2 LIKE 2 << 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2 union select * from v1;
+2 LIKE 2 << 2 2 LIKE (2 << 2) (2 LIKE 2) << 2
+0 0 4
+create or replace view v1 as select 2 LIKE 4 >> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 4 >> 1 AS `2 LIKE 4 >> 1`,2 like 4 >> 1 AS `2 LIKE (4 >> 1)`,(2 like 4) >> 1 AS `(2 LIKE 4) >> 1`
+select 2 LIKE 4 >> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1 union select * from v1;
+2 LIKE 4 >> 1 2 LIKE (4 >> 1) (2 LIKE 4) >> 1
+1 1 0
+create or replace view v1 as select 2 LIKE '2000-01-01' +INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like '2000-01-01' + interval 1 day AS `2 LIKE '2000-01-01' +INTERVAL 1 DAY`,2 like '2000-01-01' + interval 1 day AS `2 LIKE ('2000-01-01' +INTERVAL 1 DAY)`,(2 like '2000-01-01') + interval 1 day AS `(2 LIKE '2000-01-01') +INTERVAL 1 DAY`
+select 2 LIKE '2000-01-01' +INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 LIKE '2000-01-01' +INTERVAL 1 DAY 2 LIKE ('2000-01-01' +INTERVAL 1 DAY) (2 LIKE '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 LIKE 3 + 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 + 3 AS `2 LIKE 3 + 3`,2 like 3 + 3 AS `2 LIKE (3 + 3)`,(2 like 3) + 3 AS `(2 LIKE 3) + 3`
+select 2 LIKE 3 + 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3 union select * from v1;
+2 LIKE 3 + 3 2 LIKE (3 + 3) (2 LIKE 3) + 3
+0 0 3
+create or replace view v1 as select 2 LIKE 3 - 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 - 3 AS `2 LIKE 3 - 3`,2 like 3 - 3 AS `2 LIKE (3 - 3)`,(2 like 3) - 3 AS `(2 LIKE 3) - 3`
+select 2 LIKE 3 - 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3 union select * from v1;
+2 LIKE 3 - 3 2 LIKE (3 - 3) (2 LIKE 3) - 3
+0 0 -3
+create or replace view v1 as select 2 LIKE 2 * 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 * 2 AS `2 LIKE 2 * 2`,2 like 2 * 2 AS `2 LIKE (2 * 2)`,(2 like 2) * 2 AS `(2 LIKE 2) * 2`
+select 2 LIKE 2 * 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2 union select * from v1;
+2 LIKE 2 * 2 2 LIKE (2 * 2) (2 LIKE 2) * 2
+0 0 2
+create or replace view v1 as select 2 LIKE 2 / 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 / 2 AS `2 LIKE 2 / 2`,2 like 2 / 2 AS `2 LIKE (2 / 2)`,(2 like 2) / 2 AS `(2 LIKE 2) / 2`
+select 2 LIKE 2 / 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2 union select * from v1;
+2 LIKE 2 / 2 2 LIKE (2 / 2) (2 LIKE 2) / 2
+0 0 0.5000
+create or replace view v1 as select 2 LIKE 4 DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 4 DIV 2 AS `2 LIKE 4 DIV 2`,2 like 4 DIV 2 AS `2 LIKE (4 DIV 2)`,(2 like 4) DIV 2 AS `(2 LIKE 4) DIV 2`
+select 2 LIKE 4 DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2 union select * from v1;
+2 LIKE 4 DIV 2 2 LIKE (4 DIV 2) (2 LIKE 4) DIV 2
+1 1 0
+create or replace view v1 as select 2 LIKE 2 MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 MOD 2 AS `2 LIKE 2 MOD 2`,2 like 2 MOD 2 AS `2 LIKE (2 MOD 2)`,(2 like 2) MOD 2 AS `(2 LIKE 2) MOD 2`
+select 2 LIKE 2 MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2 union select * from v1;
+2 LIKE 2 MOD 2 2 LIKE (2 MOD 2) (2 LIKE 2) MOD 2
+0 0 1
+create or replace view v1 as select 2 LIKE 2 % 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 MOD 2 AS `2 LIKE 2 % 2`,2 like 2 MOD 2 AS `2 LIKE (2 % 2)`,(2 like 2) MOD 2 AS `(2 LIKE 2) % 2`
+select 2 LIKE 2 % 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2 union select * from v1;
+2 LIKE 2 % 2 2 LIKE (2 % 2) (2 LIKE 2) % 2
+0 0 1
+create or replace view v1 as select 2 LIKE 3 ^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 ^ 3 AS `2 LIKE 3 ^ 3`,2 like 3 ^ 3 AS `2 LIKE (3 ^ 3)`,(2 like 3) ^ 3 AS `(2 LIKE 3) ^ 3`
+select 2 LIKE 3 ^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3 union select * from v1;
+2 LIKE 3 ^ 3 2 LIKE (3 ^ 3) (2 LIKE 3) ^ 3
+0 0 3
+create or replace view v1 as select 2 LIKE 2 BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 between 1 and 3 AS `2 LIKE 2 BETWEEN 1 AND 3`,2 like (2 between 1 and 3) AS `2 LIKE (2 BETWEEN 1 AND 3)`,2 like 2 between 1 and 3 AS `(2 LIKE 2) BETWEEN 1 AND 3`
+select 2 LIKE 2 BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3 union select * from v1;
+2 LIKE 2 BETWEEN 1 AND 3 2 LIKE (2 BETWEEN 1 AND 3) (2 LIKE 2) BETWEEN 1 AND 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 IS FALSE, 2 REGEXP (3 IS FALSE), (2 REGEXP 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 is false AS `2 REGEXP 3 IS FALSE`,2 regexp (3 is false) AS `2 REGEXP (3 IS FALSE)`,2 regexp 3 is false AS `(2 REGEXP 3) IS FALSE`
+select 2 REGEXP 3 IS FALSE, 2 REGEXP (3 IS FALSE), (2 REGEXP 3) IS FALSE union select * from v1;
+2 REGEXP 3 IS FALSE 2 REGEXP (3 IS FALSE) (2 REGEXP 3) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 REGEXP 3 COLLATE latin1_bin), charset(2 REGEXP (3 COLLATE latin1_bin)), charset((2 REGEXP 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 regexp 3 collate latin1_bin) AS `charset(2 REGEXP 3 COLLATE latin1_bin)`,charset(2 regexp 3 collate latin1_bin) AS `charset(2 REGEXP (3 COLLATE latin1_bin))`,charset((2 regexp 3) collate latin1_bin) AS `charset((2 REGEXP 3) COLLATE latin1_bin)`
+select charset(2 REGEXP 3 COLLATE latin1_bin), charset(2 REGEXP (3 COLLATE latin1_bin)), charset((2 REGEXP 3) COLLATE latin1_bin) union select * from v1;
+charset(2 REGEXP 3 COLLATE latin1_bin) charset(2 REGEXP (3 COLLATE latin1_bin)) charset((2 REGEXP 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 REGEXP 3 IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 in (0,1) AS `2 REGEXP 3 IN (0,1)`,2 regexp (3 in (0,1)) AS `2 REGEXP (3 IN (0,1))`,2 regexp 3 in (0,1) AS `(2 REGEXP 3) IN (0,1)`
+select 2 REGEXP 3 IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1) union select * from v1;
+2 REGEXP 3 IN (0,1) 2 REGEXP (3 IN (0,1)) (2 REGEXP 3) IN (0,1)
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 OR 3, 2 REGEXP (3 OR 3), (2 REGEXP 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 or 3 AS `2 REGEXP 3 OR 3`,2 regexp (3 or 3) AS `2 REGEXP (3 OR 3)`,2 regexp 3 or 3 AS `(2 REGEXP 3) OR 3`
+select 2 REGEXP 3 OR 3, 2 REGEXP (3 OR 3), (2 REGEXP 3) OR 3 union select * from v1;
+2 REGEXP 3 OR 3 2 REGEXP (3 OR 3) (2 REGEXP 3) OR 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 or 3 AS `2 REGEXP 3 || 3`,2 regexp (3 or 3) AS `2 REGEXP (3 || 3)`,2 regexp 3 or 3 AS `(2 REGEXP 3) || 3`
+select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3 union select * from v1;
+2 REGEXP 3 || 3 2 REGEXP (3 || 3) (2 REGEXP 3) || 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 XOR 3, 2 REGEXP (3 XOR 3), (2 REGEXP 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 xor 3 AS `2 REGEXP 3 XOR 3`,2 regexp (3 xor 3) AS `2 REGEXP (3 XOR 3)`,2 regexp 3 xor 3 AS `(2 REGEXP 3) XOR 3`
+select 2 REGEXP 3 XOR 3, 2 REGEXP (3 XOR 3), (2 REGEXP 3) XOR 3 union select * from v1;
+2 REGEXP 3 XOR 3 2 REGEXP (3 XOR 3) (2 REGEXP 3) XOR 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 2 AND 2, 2 REGEXP (2 AND 2), (2 REGEXP 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 and 2 AS `2 REGEXP 2 AND 2`,2 regexp (2 and 2) AS `2 REGEXP (2 AND 2)`,2 regexp 2 and 2 AS `(2 REGEXP 2) AND 2`
+select 2 REGEXP 2 AND 2, 2 REGEXP (2 AND 2), (2 REGEXP 2) AND 2 union select * from v1;
+2 REGEXP 2 AND 2 2 REGEXP (2 AND 2) (2 REGEXP 2) AND 2
+1 0 1
+create or replace view v1 as select 2 REGEXP 2 && 2, 2 REGEXP (2 && 2), (2 REGEXP 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 and 2 AS `2 REGEXP 2 && 2`,2 regexp (2 and 2) AS `2 REGEXP (2 && 2)`,2 regexp 2 and 2 AS `(2 REGEXP 2) && 2`
+select 2 REGEXP 2 && 2, 2 REGEXP (2 && 2), (2 REGEXP 2) && 2 union select * from v1;
+2 REGEXP 2 && 2 2 REGEXP (2 && 2) (2 REGEXP 2) && 2
+1 0 1
+create or replace view v1 as select 2 REGEXP 2 = 1, 2 REGEXP (2 = 1), (2 REGEXP 2) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 = 1 AS `2 REGEXP 2 = 1`,2 regexp (2 = 1) AS `2 REGEXP (2 = 1)`,2 regexp 2 = 1 AS `(2 REGEXP 2) = 1`
+select 2 REGEXP 2 = 1, 2 REGEXP (2 = 1), (2 REGEXP 2) = 1 union select * from v1;
+2 REGEXP 2 = 1 2 REGEXP (2 = 1) (2 REGEXP 2) = 1
+1 0 1
+create or replace view v1 as select 2 REGEXP 2 <=> 1, 2 REGEXP (2 <=> 1), (2 REGEXP 2) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 <=> 1 AS `2 REGEXP 2 <=> 1`,2 regexp (2 <=> 1) AS `2 REGEXP (2 <=> 1)`,2 regexp 2 <=> 1 AS `(2 REGEXP 2) <=> 1`
+select 2 REGEXP 2 <=> 1, 2 REGEXP (2 <=> 1), (2 REGEXP 2) <=> 1 union select * from v1;
+2 REGEXP 2 <=> 1 2 REGEXP (2 <=> 1) (2 REGEXP 2) <=> 1
+1 0 1
+create or replace view v1 as select 2 REGEXP 2 >= 1, 2 REGEXP (2 >= 1), (2 REGEXP 2) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 >= 1 AS `2 REGEXP 2 >= 1`,2 regexp (2 >= 1) AS `2 REGEXP (2 >= 1)`,2 regexp 2 >= 1 AS `(2 REGEXP 2) >= 1`
+select 2 REGEXP 2 >= 1, 2 REGEXP (2 >= 1), (2 REGEXP 2) >= 1 union select * from v1;
+2 REGEXP 2 >= 1 2 REGEXP (2 >= 1) (2 REGEXP 2) >= 1
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 <= 3, 2 REGEXP (3 <= 3), (2 REGEXP 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 <= 3 AS `2 REGEXP 3 <= 3`,2 regexp (3 <= 3) AS `2 REGEXP (3 <= 3)`,2 regexp 3 <= 3 AS `(2 REGEXP 3) <= 3`
+select 2 REGEXP 3 <= 3, 2 REGEXP (3 <= 3), (2 REGEXP 3) <= 3 union select * from v1;
+2 REGEXP 3 <= 3 2 REGEXP (3 <= 3) (2 REGEXP 3) <= 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 < 3, 2 REGEXP (3 < 3), (2 REGEXP 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 < 3 AS `2 REGEXP 3 < 3`,2 regexp (3 < 3) AS `2 REGEXP (3 < 3)`,2 regexp 3 < 3 AS `(2 REGEXP 3) < 3`
+select 2 REGEXP 3 < 3, 2 REGEXP (3 < 3), (2 REGEXP 3) < 3 union select * from v1;
+2 REGEXP 3 < 3 2 REGEXP (3 < 3) (2 REGEXP 3) < 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 <> 3, 2 REGEXP (3 <> 3), (2 REGEXP 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 <> 3 AS `2 REGEXP 3 <> 3`,2 regexp (3 <> 3) AS `2 REGEXP (3 <> 3)`,2 regexp 3 <> 3 AS `(2 REGEXP 3) <> 3`
+select 2 REGEXP 3 <> 3, 2 REGEXP (3 <> 3), (2 REGEXP 3) <> 3 union select * from v1;
+2 REGEXP 3 <> 3 2 REGEXP (3 <> 3) (2 REGEXP 3) <> 3
+1 0 1
+create or replace view v1 as select 2 REGEXP 2 > 0, 2 REGEXP (2 > 0), (2 REGEXP 2) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 > 0 AS `2 REGEXP 2 > 0`,2 regexp (2 > 0) AS `2 REGEXP (2 > 0)`,2 regexp 2 > 0 AS `(2 REGEXP 2) > 0`
+select 2 REGEXP 2 > 0, 2 REGEXP (2 > 0), (2 REGEXP 2) > 0 union select * from v1;
+2 REGEXP 2 > 0 2 REGEXP (2 > 0) (2 REGEXP 2) > 0
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 != 3, 2 REGEXP (3 != 3), (2 REGEXP 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 <> 3 AS `2 REGEXP 3 != 3`,2 regexp (3 <> 3) AS `2 REGEXP (3 != 3)`,2 regexp 3 <> 3 AS `(2 REGEXP 3) != 3`
+select 2 REGEXP 3 != 3, 2 REGEXP (3 != 3), (2 REGEXP 3) != 3 union select * from v1;
+2 REGEXP 3 != 3 2 REGEXP (3 != 3) (2 REGEXP 3) != 3
+1 0 1
+create or replace view v1 as select 1 REGEXP 3 LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 regexp 3 like 3 AS `1 REGEXP 3 LIKE 3`,1 regexp (3 like 3) AS `1 REGEXP (3 LIKE 3)`,1 regexp 3 like 3 AS `(1 REGEXP 3) LIKE 3`
+select 1 REGEXP 3 LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3 union select * from v1;
+1 REGEXP 3 LIKE 3 1 REGEXP (3 LIKE 3) (1 REGEXP 3) LIKE 3
+0 1 0
+create or replace view v1 as select 1 REGEXP 3 REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 regexp 3 regexp 3 AS `1 REGEXP 3 REGEXP 3`,1 regexp (3 regexp 3) AS `1 REGEXP (3 REGEXP 3)`,1 regexp 3 regexp 3 AS `(1 REGEXP 3) REGEXP 3`
+select 1 REGEXP 3 REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3 union select * from v1;
+1 REGEXP 3 REGEXP 3 1 REGEXP (3 REGEXP 3) (1 REGEXP 3) REGEXP 3
+0 1 0
+create or replace view v1 as select 2 REGEXP 3 | 3, 2 REGEXP (3 | 3), (2 REGEXP 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 | 3 AS `2 REGEXP 3 | 3`,2 regexp 3 | 3 AS `2 REGEXP (3 | 3)`,(2 regexp 3) | 3 AS `(2 REGEXP 3) | 3`
+select 2 REGEXP 3 | 3, 2 REGEXP (3 | 3), (2 REGEXP 3) | 3 union select * from v1;
+2 REGEXP 3 | 3 2 REGEXP (3 | 3) (2 REGEXP 3) | 3
+0 0 3
+create or replace view v1 as select 2 REGEXP 2 & 2, 2 REGEXP (2 & 2), (2 REGEXP 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 & 2 AS `2 REGEXP 2 & 2`,2 regexp 2 & 2 AS `2 REGEXP (2 & 2)`,(2 regexp 2) & 2 AS `(2 REGEXP 2) & 2`
+select 2 REGEXP 2 & 2, 2 REGEXP (2 & 2), (2 REGEXP 2) & 2 union select * from v1;
+2 REGEXP 2 & 2 2 REGEXP (2 & 2) (2 REGEXP 2) & 2
+1 1 0
+create or replace view v1 as select 2 REGEXP 2 << 2, 2 REGEXP (2 << 2), (2 REGEXP 2) << 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 << 2 AS `2 REGEXP 2 << 2`,2 regexp 2 << 2 AS `2 REGEXP (2 << 2)`,(2 regexp 2) << 2 AS `(2 REGEXP 2) << 2`
+select 2 REGEXP 2 << 2, 2 REGEXP (2 << 2), (2 REGEXP 2) << 2 union select * from v1;
+2 REGEXP 2 << 2 2 REGEXP (2 << 2) (2 REGEXP 2) << 2
+0 0 4
+create or replace view v1 as select 2 REGEXP 4 >> 1, 2 REGEXP (4 >> 1), (2 REGEXP 4) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 4 >> 1 AS `2 REGEXP 4 >> 1`,2 regexp 4 >> 1 AS `2 REGEXP (4 >> 1)`,(2 regexp 4) >> 1 AS `(2 REGEXP 4) >> 1`
+select 2 REGEXP 4 >> 1, 2 REGEXP (4 >> 1), (2 REGEXP 4) >> 1 union select * from v1;
+2 REGEXP 4 >> 1 2 REGEXP (4 >> 1) (2 REGEXP 4) >> 1
+1 1 0
+create or replace view v1 as select 2 REGEXP '2000-01-01' +INTERVAL 1 DAY, 2 REGEXP ('2000-01-01' +INTERVAL 1 DAY), (2 REGEXP '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp '2000-01-01' + interval 1 day AS `2 REGEXP '2000-01-01' +INTERVAL 1 DAY`,2 regexp '2000-01-01' + interval 1 day AS `2 REGEXP ('2000-01-01' +INTERVAL 1 DAY)`,(2 regexp '2000-01-01') + interval 1 day AS `(2 REGEXP '2000-01-01') +INTERVAL 1 DAY`
+select 2 REGEXP '2000-01-01' +INTERVAL 1 DAY, 2 REGEXP ('2000-01-01' +INTERVAL 1 DAY), (2 REGEXP '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 REGEXP '2000-01-01' +INTERVAL 1 DAY 2 REGEXP ('2000-01-01' +INTERVAL 1 DAY) (2 REGEXP '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 REGEXP 3 + 3, 2 REGEXP (3 + 3), (2 REGEXP 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 + 3 AS `2 REGEXP 3 + 3`,2 regexp 3 + 3 AS `2 REGEXP (3 + 3)`,(2 regexp 3) + 3 AS `(2 REGEXP 3) + 3`
+select 2 REGEXP 3 + 3, 2 REGEXP (3 + 3), (2 REGEXP 3) + 3 union select * from v1;
+2 REGEXP 3 + 3 2 REGEXP (3 + 3) (2 REGEXP 3) + 3
+0 0 3
+create or replace view v1 as select 2 REGEXP 3 - 3, 2 REGEXP (3 - 3), (2 REGEXP 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 - 3 AS `2 REGEXP 3 - 3`,2 regexp 3 - 3 AS `2 REGEXP (3 - 3)`,(2 regexp 3) - 3 AS `(2 REGEXP 3) - 3`
+select 2 REGEXP 3 - 3, 2 REGEXP (3 - 3), (2 REGEXP 3) - 3 union select * from v1;
+2 REGEXP 3 - 3 2 REGEXP (3 - 3) (2 REGEXP 3) - 3
+0 0 -3
+create or replace view v1 as select 2 REGEXP 2 * 2, 2 REGEXP (2 * 2), (2 REGEXP 2) * 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 * 2 AS `2 REGEXP 2 * 2`,2 regexp 2 * 2 AS `2 REGEXP (2 * 2)`,(2 regexp 2) * 2 AS `(2 REGEXP 2) * 2`
+select 2 REGEXP 2 * 2, 2 REGEXP (2 * 2), (2 REGEXP 2) * 2 union select * from v1;
+2 REGEXP 2 * 2 2 REGEXP (2 * 2) (2 REGEXP 2) * 2
+0 0 2
+create or replace view v1 as select 2 REGEXP 2 / 2, 2 REGEXP (2 / 2), (2 REGEXP 2) / 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 / 2 AS `2 REGEXP 2 / 2`,2 regexp 2 / 2 AS `2 REGEXP (2 / 2)`,(2 regexp 2) / 2 AS `(2 REGEXP 2) / 2`
+select 2 REGEXP 2 / 2, 2 REGEXP (2 / 2), (2 REGEXP 2) / 2 union select * from v1;
+2 REGEXP 2 / 2 2 REGEXP (2 / 2) (2 REGEXP 2) / 2
+0 0 0.5000
+create or replace view v1 as select 2 REGEXP 4 DIV 2, 2 REGEXP (4 DIV 2), (2 REGEXP 4) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 4 DIV 2 AS `2 REGEXP 4 DIV 2`,2 regexp 4 DIV 2 AS `2 REGEXP (4 DIV 2)`,(2 regexp 4) DIV 2 AS `(2 REGEXP 4) DIV 2`
+select 2 REGEXP 4 DIV 2, 2 REGEXP (4 DIV 2), (2 REGEXP 4) DIV 2 union select * from v1;
+2 REGEXP 4 DIV 2 2 REGEXP (4 DIV 2) (2 REGEXP 4) DIV 2
+1 1 0
+create or replace view v1 as select 2 REGEXP 2 MOD 2, 2 REGEXP (2 MOD 2), (2 REGEXP 2) MOD 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 MOD 2 AS `2 REGEXP 2 MOD 2`,2 regexp 2 MOD 2 AS `2 REGEXP (2 MOD 2)`,(2 regexp 2) MOD 2 AS `(2 REGEXP 2) MOD 2`
+select 2 REGEXP 2 MOD 2, 2 REGEXP (2 MOD 2), (2 REGEXP 2) MOD 2 union select * from v1;
+2 REGEXP 2 MOD 2 2 REGEXP (2 MOD 2) (2 REGEXP 2) MOD 2
+0 0 1
+create or replace view v1 as select 2 REGEXP 2 % 2, 2 REGEXP (2 % 2), (2 REGEXP 2) % 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 MOD 2 AS `2 REGEXP 2 % 2`,2 regexp 2 MOD 2 AS `2 REGEXP (2 % 2)`,(2 regexp 2) MOD 2 AS `(2 REGEXP 2) % 2`
+select 2 REGEXP 2 % 2, 2 REGEXP (2 % 2), (2 REGEXP 2) % 2 union select * from v1;
+2 REGEXP 2 % 2 2 REGEXP (2 % 2) (2 REGEXP 2) % 2
+0 0 1
+create or replace view v1 as select 2 REGEXP 3 ^ 3, 2 REGEXP (3 ^ 3), (2 REGEXP 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 ^ 3 AS `2 REGEXP 3 ^ 3`,2 regexp 3 ^ 3 AS `2 REGEXP (3 ^ 3)`,(2 regexp 3) ^ 3 AS `(2 REGEXP 3) ^ 3`
+select 2 REGEXP 3 ^ 3, 2 REGEXP (3 ^ 3), (2 REGEXP 3) ^ 3 union select * from v1;
+2 REGEXP 3 ^ 3 2 REGEXP (3 ^ 3) (2 REGEXP 3) ^ 3
+0 0 3
+create or replace view v1 as select 2 REGEXP 2 BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 2 between 1 and 3 AS `2 REGEXP 2 BETWEEN 1 AND 3`,2 regexp (2 between 1 and 3) AS `2 REGEXP (2 BETWEEN 1 AND 3)`,2 regexp 2 between 1 and 3 AS `(2 REGEXP 2) BETWEEN 1 AND 3`
+select 2 REGEXP 2 BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3 union select * from v1;
+2 REGEXP 2 BETWEEN 1 AND 3 2 REGEXP (2 BETWEEN 1 AND 3) (2 REGEXP 2) BETWEEN 1 AND 3
+1 0 1
+create or replace view v1 as select 2 | 3 IS FALSE, 2 | (3 IS FALSE), (2 | 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 is false AS `2 | 3 IS FALSE`,2 | (3 is false) AS `2 | (3 IS FALSE)`,2 | 3 is false AS `(2 | 3) IS FALSE`
+select 2 | 3 IS FALSE, 2 | (3 IS FALSE), (2 | 3) IS FALSE union select * from v1;
+2 | 3 IS FALSE 2 | (3 IS FALSE) (2 | 3) IS FALSE
+0 2 0
+create or replace view v1 as select charset(2 | 3 COLLATE latin1_bin), charset(2 | (3 COLLATE latin1_bin)), charset((2 | 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 | 3 collate latin1_bin) AS `charset(2 | 3 COLLATE latin1_bin)`,charset(2 | 3 collate latin1_bin) AS `charset(2 | (3 COLLATE latin1_bin))`,charset((2 | 3) collate latin1_bin) AS `charset((2 | 3) COLLATE latin1_bin)`
+select charset(2 | 3 COLLATE latin1_bin), charset(2 | (3 COLLATE latin1_bin)), charset((2 | 3) COLLATE latin1_bin) union select * from v1;
+charset(2 | 3 COLLATE latin1_bin) charset(2 | (3 COLLATE latin1_bin)) charset((2 | 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 | 3 IN (0,1), 2 | (3 IN (0,1)), (2 | 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 in (0,1) AS `2 | 3 IN (0,1)`,2 | (3 in (0,1)) AS `2 | (3 IN (0,1))`,2 | 3 in (0,1) AS `(2 | 3) IN (0,1)`
+select 2 | 3 IN (0,1), 2 | (3 IN (0,1)), (2 | 3) IN (0,1) union select * from v1;
+2 | 3 IN (0,1) 2 | (3 IN (0,1)) (2 | 3) IN (0,1)
+0 2 0
+create or replace view v1 as select 2 | 3 OR 3, 2 | (3 OR 3), (2 | 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 or 3 AS `2 | 3 OR 3`,2 | (3 or 3) AS `2 | (3 OR 3)`,2 | 3 or 3 AS `(2 | 3) OR 3`
+select 2 | 3 OR 3, 2 | (3 OR 3), (2 | 3) OR 3 union select * from v1;
+2 | 3 OR 3 2 | (3 OR 3) (2 | 3) OR 3
+1 3 1
+create or replace view v1 as select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 or 3 AS `2 | 3 || 3`,2 | (3 or 3) AS `2 | (3 || 3)`,2 | 3 or 3 AS `(2 | 3) || 3`
+select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3 union select * from v1;
+2 | 3 || 3 2 | (3 || 3) (2 | 3) || 3
+1 3 1
+create or replace view v1 as select 2 | 3 XOR 3, 2 | (3 XOR 3), (2 | 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 xor 3 AS `2 | 3 XOR 3`,2 | (3 xor 3) AS `2 | (3 XOR 3)`,2 | 3 xor 3 AS `(2 | 3) XOR 3`
+select 2 | 3 XOR 3, 2 | (3 XOR 3), (2 | 3) XOR 3 union select * from v1;
+2 | 3 XOR 3 2 | (3 XOR 3) (2 | 3) XOR 3
+0 2 0
+create or replace view v1 as select 2 | 3 AND 3, 2 | (3 AND 3), (2 | 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 and 3 AS `2 | 3 AND 3`,2 | (3 and 3) AS `2 | (3 AND 3)`,2 | 3 and 3 AS `(2 | 3) AND 3`
+select 2 | 3 AND 3, 2 | (3 AND 3), (2 | 3) AND 3 union select * from v1;
+2 | 3 AND 3 2 | (3 AND 3) (2 | 3) AND 3
+1 3 1
+create or replace view v1 as select 2 | 3 && 3, 2 | (3 && 3), (2 | 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 and 3 AS `2 | 3 && 3`,2 | (3 and 3) AS `2 | (3 && 3)`,2 | 3 and 3 AS `(2 | 3) && 3`
+select 2 | 3 && 3, 2 | (3 && 3), (2 | 3) && 3 union select * from v1;
+2 | 3 && 3 2 | (3 && 3) (2 | 3) && 3
+1 3 1
+create or replace view v1 as select 2 | 3 = 3, 2 | (3 = 3), (2 | 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 = 3 AS `2 | 3 = 3`,2 | (3 = 3) AS `2 | (3 = 3)`,2 | 3 = 3 AS `(2 | 3) = 3`
+select 2 | 3 = 3, 2 | (3 = 3), (2 | 3) = 3 union select * from v1;
+2 | 3 = 3 2 | (3 = 3) (2 | 3) = 3
+1 3 1
+create or replace view v1 as select 2 | 3 <=> 3, 2 | (3 <=> 3), (2 | 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 <=> 3 AS `2 | 3 <=> 3`,2 | (3 <=> 3) AS `2 | (3 <=> 3)`,2 | 3 <=> 3 AS `(2 | 3) <=> 3`
+select 2 | 3 <=> 3, 2 | (3 <=> 3), (2 | 3) <=> 3 union select * from v1;
+2 | 3 <=> 3 2 | (3 <=> 3) (2 | 3) <=> 3
+1 3 1
+create or replace view v1 as select 2 | 3 >= 3, 2 | (3 >= 3), (2 | 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 >= 3 AS `2 | 3 >= 3`,2 | (3 >= 3) AS `2 | (3 >= 3)`,2 | 3 >= 3 AS `(2 | 3) >= 3`
+select 2 | 3 >= 3, 2 | (3 >= 3), (2 | 3) >= 3 union select * from v1;
+2 | 3 >= 3 2 | (3 >= 3) (2 | 3) >= 3
+1 3 1
+create or replace view v1 as select 2 | 3 <= 3, 2 | (3 <= 3), (2 | 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 <= 3 AS `2 | 3 <= 3`,2 | (3 <= 3) AS `2 | (3 <= 3)`,2 | 3 <= 3 AS `(2 | 3) <= 3`
+select 2 | 3 <= 3, 2 | (3 <= 3), (2 | 3) <= 3 union select * from v1;
+2 | 3 <= 3 2 | (3 <= 3) (2 | 3) <= 3
+1 3 1
+create or replace view v1 as select 2 | 3 < 3, 2 | (3 < 3), (2 | 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 < 3 AS `2 | 3 < 3`,2 | (3 < 3) AS `2 | (3 < 3)`,2 | 3 < 3 AS `(2 | 3) < 3`
+select 2 | 3 < 3, 2 | (3 < 3), (2 | 3) < 3 union select * from v1;
+2 | 3 < 3 2 | (3 < 3) (2 | 3) < 3
+0 2 0
+create or replace view v1 as select 2 | 3 <> 3, 2 | (3 <> 3), (2 | 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 <> 3 AS `2 | 3 <> 3`,2 | (3 <> 3) AS `2 | (3 <> 3)`,2 | 3 <> 3 AS `(2 | 3) <> 3`
+select 2 | 3 <> 3, 2 | (3 <> 3), (2 | 3) <> 3 union select * from v1;
+2 | 3 <> 3 2 | (3 <> 3) (2 | 3) <> 3
+0 2 0
+create or replace view v1 as select 2 | 3 > 3, 2 | (3 > 3), (2 | 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 > 3 AS `2 | 3 > 3`,2 | (3 > 3) AS `2 | (3 > 3)`,2 | 3 > 3 AS `(2 | 3) > 3`
+select 2 | 3 > 3, 2 | (3 > 3), (2 | 3) > 3 union select * from v1;
+2 | 3 > 3 2 | (3 > 3) (2 | 3) > 3
+0 2 0
+create or replace view v1 as select 2 | 3 != 3, 2 | (3 != 3), (2 | 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 <> 3 AS `2 | 3 != 3`,2 | (3 <> 3) AS `2 | (3 != 3)`,2 | 3 <> 3 AS `(2 | 3) != 3`
+select 2 | 3 != 3, 2 | (3 != 3), (2 | 3) != 3 union select * from v1;
+2 | 3 != 3 2 | (3 != 3) (2 | 3) != 3
+0 2 0
+create or replace view v1 as select 2 | 3 LIKE 3, 2 | (3 LIKE 3), (2 | 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 like 3 AS `2 | 3 LIKE 3`,2 | (3 like 3) AS `2 | (3 LIKE 3)`,2 | 3 like 3 AS `(2 | 3) LIKE 3`
+select 2 | 3 LIKE 3, 2 | (3 LIKE 3), (2 | 3) LIKE 3 union select * from v1;
+2 | 3 LIKE 3 2 | (3 LIKE 3) (2 | 3) LIKE 3
+1 3 1
+create or replace view v1 as select 2 | 3 REGEXP 3, 2 | (3 REGEXP 3), (2 | 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 regexp 3 AS `2 | 3 REGEXP 3`,2 | (3 regexp 3) AS `2 | (3 REGEXP 3)`,2 | 3 regexp 3 AS `(2 | 3) REGEXP 3`
+select 2 | 3 REGEXP 3, 2 | (3 REGEXP 3), (2 | 3) REGEXP 3 union select * from v1;
+2 | 3 REGEXP 3 2 | (3 REGEXP 3) (2 | 3) REGEXP 3
+1 3 1
+create or replace view v1 as select 2 | 0 & 0, 2 | (0 & 0), (2 | 0) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 0 & 0 AS `2 | 0 & 0`,2 | 0 & 0 AS `2 | (0 & 0)`,(2 | 0) & 0 AS `(2 | 0) & 0`
+select 2 | 0 & 0, 2 | (0 & 0), (2 | 0) & 0 union select * from v1;
+2 | 0 & 0 2 | (0 & 0) (2 | 0) & 0
+2 2 0
+create or replace view v1 as select 2 | 3 << 3, 2 | (3 << 3), (2 | 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 << 3 AS `2 | 3 << 3`,2 | 3 << 3 AS `2 | (3 << 3)`,(2 | 3) << 3 AS `(2 | 3) << 3`
+select 2 | 3 << 3, 2 | (3 << 3), (2 | 3) << 3 union select * from v1;
+2 | 3 << 3 2 | (3 << 3) (2 | 3) << 3
+26 26 24
+create or replace view v1 as select 2 | 3 >> 3, 2 | (3 >> 3), (2 | 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 >> 3 AS `2 | 3 >> 3`,2 | 3 >> 3 AS `2 | (3 >> 3)`,(2 | 3) >> 3 AS `(2 | 3) >> 3`
+select 2 | 3 >> 3, 2 | (3 >> 3), (2 | 3) >> 3 union select * from v1;
+2 | 3 >> 3 2 | (3 >> 3) (2 | 3) >> 3
+2 2 0
+create or replace view v1 as select 2 | '2000-01-01' +INTERVAL 1 DAY, 2 | ('2000-01-01' +INTERVAL 1 DAY), (2 | '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | '2000-01-01' + interval 1 day AS `2 | '2000-01-01' +INTERVAL 1 DAY`,2 | '2000-01-01' + interval 1 day AS `2 | ('2000-01-01' +INTERVAL 1 DAY)`,(2 | '2000-01-01') + interval 1 day AS `(2 | '2000-01-01') +INTERVAL 1 DAY`
+select 2 | '2000-01-01' +INTERVAL 1 DAY, 2 | ('2000-01-01' +INTERVAL 1 DAY), (2 | '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 | '2000-01-01' +INTERVAL 1 DAY 2 | ('2000-01-01' +INTERVAL 1 DAY) (2 | '2000-01-01') +INTERVAL 1 DAY
+20000102 20000102 NULL
+create or replace view v1 as select 2 | 1 + 1, 2 | (1 + 1), (2 | 1) + 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 1 + 1 AS `2 | 1 + 1`,2 | 1 + 1 AS `2 | (1 + 1)`,(2 | 1) + 1 AS `(2 | 1) + 1`
+select 2 | 1 + 1, 2 | (1 + 1), (2 | 1) + 1 union select * from v1;
+2 | 1 + 1 2 | (1 + 1) (2 | 1) + 1
+2 2 4
+create or replace view v1 as select 2 | 3 - 3, 2 | (3 - 3), (2 | 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 - 3 AS `2 | 3 - 3`,2 | 3 - 3 AS `2 | (3 - 3)`,(2 | 3) - 3 AS `(2 | 3) - 3`
+select 2 | 3 - 3, 2 | (3 - 3), (2 | 3) - 3 union select * from v1;
+2 | 3 - 3 2 | (3 - 3) (2 | 3) - 3
+2 2 0
+create or replace view v1 as select 2 | 3 * 3, 2 | (3 * 3), (2 | 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 * 3 AS `2 | 3 * 3`,2 | 3 * 3 AS `2 | (3 * 3)`,(2 | 3) * 3 AS `(2 | 3) * 3`
+select 2 | 3 * 3, 2 | (3 * 3), (2 | 3) * 3 union select * from v1;
+2 | 3 * 3 2 | (3 * 3) (2 | 3) * 3
+11 11 9
+create or replace view v1 as select 2 | 3 / 3, 2 | (3 / 3), (2 | 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 / 3 AS `2 | 3 / 3`,2 | 3 / 3 AS `2 | (3 / 3)`,(2 | 3) / 3 AS `(2 | 3) / 3`
+select 2 | 3 / 3, 2 | (3 / 3), (2 | 3) / 3 union select * from v1;
+2 | 3 / 3 2 | (3 / 3) (2 | 3) / 3
+3 3 1.0000
+create or replace view v1 as select 2 | 3 DIV 3, 2 | (3 DIV 3), (2 | 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 DIV 3 AS `2 | 3 DIV 3`,2 | 3 DIV 3 AS `2 | (3 DIV 3)`,(2 | 3) DIV 3 AS `(2 | 3) DIV 3`
+select 2 | 3 DIV 3, 2 | (3 DIV 3), (2 | 3) DIV 3 union select * from v1;
+2 | 3 DIV 3 2 | (3 DIV 3) (2 | 3) DIV 3
+3 3 1
+create or replace view v1 as select 2 | 3 MOD 3, 2 | (3 MOD 3), (2 | 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 MOD 3 AS `2 | 3 MOD 3`,2 | 3 MOD 3 AS `2 | (3 MOD 3)`,(2 | 3) MOD 3 AS `(2 | 3) MOD 3`
+select 2 | 3 MOD 3, 2 | (3 MOD 3), (2 | 3) MOD 3 union select * from v1;
+2 | 3 MOD 3 2 | (3 MOD 3) (2 | 3) MOD 3
+2 2 0
+create or replace view v1 as select 2 | 3 % 3, 2 | (3 % 3), (2 | 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 MOD 3 AS `2 | 3 % 3`,2 | 3 MOD 3 AS `2 | (3 % 3)`,(2 | 3) MOD 3 AS `(2 | 3) % 3`
+select 2 | 3 % 3, 2 | (3 % 3), (2 | 3) % 3 union select * from v1;
+2 | 3 % 3 2 | (3 % 3) (2 | 3) % 3
+2 2 0
+create or replace view v1 as select 2 | 3 ^ 3, 2 | (3 ^ 3), (2 | 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 ^ 3 AS `2 | 3 ^ 3`,2 | 3 ^ 3 AS `2 | (3 ^ 3)`,(2 | 3) ^ 3 AS `(2 | 3) ^ 3`
+select 2 | 3 ^ 3, 2 | (3 ^ 3), (2 | 3) ^ 3 union select * from v1;
+2 | 3 ^ 3 2 | (3 ^ 3) (2 | 3) ^ 3
+2 2 0
+create or replace view v1 as select 2 | 3 BETWEEN 1 AND 3, 2 | (3 BETWEEN 1 AND 3), (2 | 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 between 1 and 3 AS `2 | 3 BETWEEN 1 AND 3`,2 | (3 between 1 and 3) AS `2 | (3 BETWEEN 1 AND 3)`,2 | 3 between 1 and 3 AS `(2 | 3) BETWEEN 1 AND 3`
+select 2 | 3 BETWEEN 1 AND 3, 2 | (3 BETWEEN 1 AND 3), (2 | 3) BETWEEN 1 AND 3 union select * from v1;
+2 | 3 BETWEEN 1 AND 3 2 | (3 BETWEEN 1 AND 3) (2 | 3) BETWEEN 1 AND 3
+1 3 1
+create or replace view v1 as select 2 & 1 IS FALSE, 2 & (1 IS FALSE), (2 & 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 1 is false AS `2 & 1 IS FALSE`,2 & (1 is false) AS `2 & (1 IS FALSE)`,2 & 1 is false AS `(2 & 1) IS FALSE`
+select 2 & 1 IS FALSE, 2 & (1 IS FALSE), (2 & 1) IS FALSE union select * from v1;
+2 & 1 IS FALSE 2 & (1 IS FALSE) (2 & 1) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 & 3 COLLATE latin1_bin), charset(2 & (3 COLLATE latin1_bin)), charset((2 & 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 & 3 collate latin1_bin) AS `charset(2 & 3 COLLATE latin1_bin)`,charset(2 & 3 collate latin1_bin) AS `charset(2 & (3 COLLATE latin1_bin))`,charset((2 & 3) collate latin1_bin) AS `charset((2 & 3) COLLATE latin1_bin)`
+select charset(2 & 3 COLLATE latin1_bin), charset(2 & (3 COLLATE latin1_bin)), charset((2 & 3) COLLATE latin1_bin) union select * from v1;
+charset(2 & 3 COLLATE latin1_bin) charset(2 & (3 COLLATE latin1_bin)) charset((2 & 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 & 4 IN (0,1), 2 & (4 IN (0,1)), (2 & 4) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 4 in (0,1) AS `2 & 4 IN (0,1)`,2 & (4 in (0,1)) AS `2 & (4 IN (0,1))`,2 & 4 in (0,1) AS `(2 & 4) IN (0,1)`
+select 2 & 4 IN (0,1), 2 & (4 IN (0,1)), (2 & 4) IN (0,1) union select * from v1;
+2 & 4 IN (0,1) 2 & (4 IN (0,1)) (2 & 4) IN (0,1)
+1 0 1
+create or replace view v1 as select 2 & 3 OR 3, 2 & (3 OR 3), (2 & 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 or 3 AS `2 & 3 OR 3`,2 & (3 or 3) AS `2 & (3 OR 3)`,2 & 3 or 3 AS `(2 & 3) OR 3`
+select 2 & 3 OR 3, 2 & (3 OR 3), (2 & 3) OR 3 union select * from v1;
+2 & 3 OR 3 2 & (3 OR 3) (2 & 3) OR 3
+1 0 1
+create or replace view v1 as select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 or 3 AS `2 & 3 || 3`,2 & (3 or 3) AS `2 & (3 || 3)`,2 & 3 or 3 AS `(2 & 3) || 3`
+select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3 union select * from v1;
+2 & 3 || 3 2 & (3 || 3) (2 & 3) || 3
+1 0 1
+create or replace view v1 as select 2 & 1 XOR 1, 2 & (1 XOR 1), (2 & 1) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 1 xor 1 AS `2 & 1 XOR 1`,2 & (1 xor 1) AS `2 & (1 XOR 1)`,2 & 1 xor 1 AS `(2 & 1) XOR 1`
+select 2 & 1 XOR 1, 2 & (1 XOR 1), (2 & 1) XOR 1 union select * from v1;
+2 & 1 XOR 1 2 & (1 XOR 1) (2 & 1) XOR 1
+1 0 1
+create or replace view v1 as select 2 & 3 AND 3, 2 & (3 AND 3), (2 & 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 and 3 AS `2 & 3 AND 3`,2 & (3 and 3) AS `2 & (3 AND 3)`,2 & 3 and 3 AS `(2 & 3) AND 3`
+select 2 & 3 AND 3, 2 & (3 AND 3), (2 & 3) AND 3 union select * from v1;
+2 & 3 AND 3 2 & (3 AND 3) (2 & 3) AND 3
+1 0 1
+create or replace view v1 as select 2 & 3 && 3, 2 & (3 && 3), (2 & 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 and 3 AS `2 & 3 && 3`,2 & (3 and 3) AS `2 & (3 && 3)`,2 & 3 and 3 AS `(2 & 3) && 3`
+select 2 & 3 && 3, 2 & (3 && 3), (2 & 3) && 3 union select * from v1;
+2 & 3 && 3 2 & (3 && 3) (2 & 3) && 3
+1 0 1
+create or replace view v1 as select 2 & 3 = 2, 2 & (3 = 2), (2 & 3) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 = 2 AS `2 & 3 = 2`,2 & (3 = 2) AS `2 & (3 = 2)`,2 & 3 = 2 AS `(2 & 3) = 2`
+select 2 & 3 = 2, 2 & (3 = 2), (2 & 3) = 2 union select * from v1;
+2 & 3 = 2 2 & (3 = 2) (2 & 3) = 2
+1 0 1
+create or replace view v1 as select 2 & 3 <=> 2, 2 & (3 <=> 2), (2 & 3) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 <=> 2 AS `2 & 3 <=> 2`,2 & (3 <=> 2) AS `2 & (3 <=> 2)`,2 & 3 <=> 2 AS `(2 & 3) <=> 2`
+select 2 & 3 <=> 2, 2 & (3 <=> 2), (2 & 3) <=> 2 union select * from v1;
+2 & 3 <=> 2 2 & (3 <=> 2) (2 & 3) <=> 2
+1 0 1
+create or replace view v1 as select 2 & 3 >= 2, 2 & (3 >= 2), (2 & 3) >= 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 >= 2 AS `2 & 3 >= 2`,2 & (3 >= 2) AS `2 & (3 >= 2)`,2 & 3 >= 2 AS `(2 & 3) >= 2`
+select 2 & 3 >= 2, 2 & (3 >= 2), (2 & 3) >= 2 union select * from v1;
+2 & 3 >= 2 2 & (3 >= 2) (2 & 3) >= 2
+1 0 1
+create or replace view v1 as select 2 & 3 <= 3, 2 & (3 <= 3), (2 & 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 <= 3 AS `2 & 3 <= 3`,2 & (3 <= 3) AS `2 & (3 <= 3)`,2 & 3 <= 3 AS `(2 & 3) <= 3`
+select 2 & 3 <= 3, 2 & (3 <= 3), (2 & 3) <= 3 union select * from v1;
+2 & 3 <= 3 2 & (3 <= 3) (2 & 3) <= 3
+1 0 1
+create or replace view v1 as select 2 & 3 < 3, 2 & (3 < 3), (2 & 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 < 3 AS `2 & 3 < 3`,2 & (3 < 3) AS `2 & (3 < 3)`,2 & 3 < 3 AS `(2 & 3) < 3`
+select 2 & 3 < 3, 2 & (3 < 3), (2 & 3) < 3 union select * from v1;
+2 & 3 < 3 2 & (3 < 3) (2 & 3) < 3
+1 0 1
+create or replace view v1 as select 2 & 3 <> 3, 2 & (3 <> 3), (2 & 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 <> 3 AS `2 & 3 <> 3`,2 & (3 <> 3) AS `2 & (3 <> 3)`,2 & 3 <> 3 AS `(2 & 3) <> 3`
+select 2 & 3 <> 3, 2 & (3 <> 3), (2 & 3) <> 3 union select * from v1;
+2 & 3 <> 3 2 & (3 <> 3) (2 & 3) <> 3
+1 0 1
+create or replace view v1 as select 2 & 3 > 1, 2 & (3 > 1), (2 & 3) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 > 1 AS `2 & 3 > 1`,2 & (3 > 1) AS `2 & (3 > 1)`,2 & 3 > 1 AS `(2 & 3) > 1`
+select 2 & 3 > 1, 2 & (3 > 1), (2 & 3) > 1 union select * from v1;
+2 & 3 > 1 2 & (3 > 1) (2 & 3) > 1
+1 0 1
+create or replace view v1 as select 2 & 3 != 3, 2 & (3 != 3), (2 & 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 <> 3 AS `2 & 3 != 3`,2 & (3 <> 3) AS `2 & (3 != 3)`,2 & 3 <> 3 AS `(2 & 3) != 3`
+select 2 & 3 != 3, 2 & (3 != 3), (2 & 3) != 3 union select * from v1;
+2 & 3 != 3 2 & (3 != 3) (2 & 3) != 3
+1 0 1
+create or replace view v1 as select 2 & 3 LIKE 2, 2 & (3 LIKE 2), (2 & 3) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 like 2 AS `2 & 3 LIKE 2`,2 & (3 like 2) AS `2 & (3 LIKE 2)`,2 & 3 like 2 AS `(2 & 3) LIKE 2`
+select 2 & 3 LIKE 2, 2 & (3 LIKE 2), (2 & 3) LIKE 2 union select * from v1;
+2 & 3 LIKE 2 2 & (3 LIKE 2) (2 & 3) LIKE 2
+1 0 1
+create or replace view v1 as select 2 & 3 REGEXP 2, 2 & (3 REGEXP 2), (2 & 3) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 regexp 2 AS `2 & 3 REGEXP 2`,2 & (3 regexp 2) AS `2 & (3 REGEXP 2)`,2 & 3 regexp 2 AS `(2 & 3) REGEXP 2`
+select 2 & 3 REGEXP 2, 2 & (3 REGEXP 2), (2 & 3) REGEXP 2 union select * from v1;
+2 & 3 REGEXP 2 2 & (3 REGEXP 2) (2 & 3) REGEXP 2
+1 0 1
+create or replace view v1 as select 2 & 3 | 3, 2 & (3 | 3), (2 & 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 | 3 AS `2 & 3 | 3`,2 & (3 | 3) AS `2 & (3 | 3)`,2 & 3 | 3 AS `(2 & 3) | 3`
+select 2 & 3 | 3, 2 & (3 | 3), (2 & 3) | 3 union select * from v1;
+2 & 3 | 3 2 & (3 | 3) (2 & 3) | 3
+3 2 3
+create or replace view v1 as select 2 & 3 << 3, 2 & (3 << 3), (2 & 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 << 3 AS `2 & 3 << 3`,2 & 3 << 3 AS `2 & (3 << 3)`,(2 & 3) << 3 AS `(2 & 3) << 3`
+select 2 & 3 << 3, 2 & (3 << 3), (2 & 3) << 3 union select * from v1;
+2 & 3 << 3 2 & (3 << 3) (2 & 3) << 3
+0 0 16
+create or replace view v1 as select 2 & 3 >> 1, 2 & (3 >> 1), (2 & 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 >> 1 AS `2 & 3 >> 1`,2 & 3 >> 1 AS `2 & (3 >> 1)`,(2 & 3) >> 1 AS `(2 & 3) >> 1`
+select 2 & 3 >> 1, 2 & (3 >> 1), (2 & 3) >> 1 union select * from v1;
+2 & 3 >> 1 2 & (3 >> 1) (2 & 3) >> 1
+0 0 1
+create or replace view v1 as select 2 & '2000-01-01' +INTERVAL 1 DAY, 2 & ('2000-01-01' +INTERVAL 1 DAY), (2 & '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & '2000-01-01' + interval 1 day AS `2 & '2000-01-01' +INTERVAL 1 DAY`,2 & '2000-01-01' + interval 1 day AS `2 & ('2000-01-01' +INTERVAL 1 DAY)`,(2 & '2000-01-01') + interval 1 day AS `(2 & '2000-01-01') +INTERVAL 1 DAY`
+select 2 & '2000-01-01' +INTERVAL 1 DAY, 2 & ('2000-01-01' +INTERVAL 1 DAY), (2 & '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 & '2000-01-01' +INTERVAL 1 DAY 2 & ('2000-01-01' +INTERVAL 1 DAY) (2 & '2000-01-01') +INTERVAL 1 DAY
+2 2 NULL
+create or replace view v1 as select 2 & 3 + 3, 2 & (3 + 3), (2 & 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 + 3 AS `2 & 3 + 3`,2 & 3 + 3 AS `2 & (3 + 3)`,(2 & 3) + 3 AS `(2 & 3) + 3`
+select 2 & 3 + 3, 2 & (3 + 3), (2 & 3) + 3 union select * from v1;
+2 & 3 + 3 2 & (3 + 3) (2 & 3) + 3
+2 2 5
+create or replace view v1 as select 6 & 4 - 3, 6 & (4 - 3), (6 & 4) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 6 & 4 - 3 AS `6 & 4 - 3`,6 & 4 - 3 AS `6 & (4 - 3)`,(6 & 4) - 3 AS `(6 & 4) - 3`
+select 6 & 4 - 3, 6 & (4 - 3), (6 & 4) - 3 union select * from v1;
+6 & 4 - 3 6 & (4 - 3) (6 & 4) - 3
+0 0 1
+create or replace view v1 as select 2 & 3 * 3, 2 & (3 * 3), (2 & 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 * 3 AS `2 & 3 * 3`,2 & 3 * 3 AS `2 & (3 * 3)`,(2 & 3) * 3 AS `(2 & 3) * 3`
+select 2 & 3 * 3, 2 & (3 * 3), (2 & 3) * 3 union select * from v1;
+2 & 3 * 3 2 & (3 * 3) (2 & 3) * 3
+0 0 6
+create or replace view v1 as select 2 & 3 / 3, 2 & (3 / 3), (2 & 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 / 3 AS `2 & 3 / 3`,2 & 3 / 3 AS `2 & (3 / 3)`,(2 & 3) / 3 AS `(2 & 3) / 3`
+select 2 & 3 / 3, 2 & (3 / 3), (2 & 3) / 3 union select * from v1;
+2 & 3 / 3 2 & (3 / 3) (2 & 3) / 3
+0 0 0.6667
+create or replace view v1 as select 2 & 3 DIV 2, 2 & (3 DIV 2), (2 & 3) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 DIV 2 AS `2 & 3 DIV 2`,2 & 3 DIV 2 AS `2 & (3 DIV 2)`,(2 & 3) DIV 2 AS `(2 & 3) DIV 2`
+select 2 & 3 DIV 2, 2 & (3 DIV 2), (2 & 3) DIV 2 union select * from v1;
+2 & 3 DIV 2 2 & (3 DIV 2) (2 & 3) DIV 2
+0 0 1
+create or replace view v1 as select 2 & 3 MOD 3, 2 & (3 MOD 3), (2 & 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 MOD 3 AS `2 & 3 MOD 3`,2 & 3 MOD 3 AS `2 & (3 MOD 3)`,(2 & 3) MOD 3 AS `(2 & 3) MOD 3`
+select 2 & 3 MOD 3, 2 & (3 MOD 3), (2 & 3) MOD 3 union select * from v1;
+2 & 3 MOD 3 2 & (3 MOD 3) (2 & 3) MOD 3
+0 0 2
+create or replace view v1 as select 2 & 3 % 3, 2 & (3 % 3), (2 & 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 MOD 3 AS `2 & 3 % 3`,2 & 3 MOD 3 AS `2 & (3 % 3)`,(2 & 3) MOD 3 AS `(2 & 3) % 3`
+select 2 & 3 % 3, 2 & (3 % 3), (2 & 3) % 3 union select * from v1;
+2 & 3 % 3 2 & (3 % 3) (2 & 3) % 3
+0 0 2
+create or replace view v1 as select 2 & 3 ^ 3, 2 & (3 ^ 3), (2 & 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 ^ 3 AS `2 & 3 ^ 3`,2 & 3 ^ 3 AS `2 & (3 ^ 3)`,(2 & 3) ^ 3 AS `(2 & 3) ^ 3`
+select 2 & 3 ^ 3, 2 & (3 ^ 3), (2 & 3) ^ 3 union select * from v1;
+2 & 3 ^ 3 2 & (3 ^ 3) (2 & 3) ^ 3
+0 0 1
+create or replace view v1 as select 2 & 3 BETWEEN 1 AND 3, 2 & (3 BETWEEN 1 AND 3), (2 & 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 3 between 1 and 3 AS `2 & 3 BETWEEN 1 AND 3`,2 & (3 between 1 and 3) AS `2 & (3 BETWEEN 1 AND 3)`,2 & 3 between 1 and 3 AS `(2 & 3) BETWEEN 1 AND 3`
+select 2 & 3 BETWEEN 1 AND 3, 2 & (3 BETWEEN 1 AND 3), (2 & 3) BETWEEN 1 AND 3 union select * from v1;
+2 & 3 BETWEEN 1 AND 3 2 & (3 BETWEEN 1 AND 3) (2 & 3) BETWEEN 1 AND 3
+1 0 1
+create or replace view v1 as select 2 << 3 IS FALSE, 2 << (3 IS FALSE), (2 << 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 is false AS `2 << 3 IS FALSE`,2 << (3 is false) AS `2 << (3 IS FALSE)`,2 << 3 is false AS `(2 << 3) IS FALSE`
+select 2 << 3 IS FALSE, 2 << (3 IS FALSE), (2 << 3) IS FALSE union select * from v1;
+2 << 3 IS FALSE 2 << (3 IS FALSE) (2 << 3) IS FALSE
+0 2 0
+create or replace view v1 as select charset(2 << 3 COLLATE latin1_bin), charset(2 << (3 COLLATE latin1_bin)), charset((2 << 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 << 3 collate latin1_bin) AS `charset(2 << 3 COLLATE latin1_bin)`,charset(2 << 3 collate latin1_bin) AS `charset(2 << (3 COLLATE latin1_bin))`,charset((2 << 3) collate latin1_bin) AS `charset((2 << 3) COLLATE latin1_bin)`
+select charset(2 << 3 COLLATE latin1_bin), charset(2 << (3 COLLATE latin1_bin)), charset((2 << 3) COLLATE latin1_bin) union select * from v1;
+charset(2 << 3 COLLATE latin1_bin) charset(2 << (3 COLLATE latin1_bin)) charset((2 << 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 << 3 IN (0,1), 2 << (3 IN (0,1)), (2 << 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 in (0,1) AS `2 << 3 IN (0,1)`,2 << (3 in (0,1)) AS `2 << (3 IN (0,1))`,2 << 3 in (0,1) AS `(2 << 3) IN (0,1)`
+select 2 << 3 IN (0,1), 2 << (3 IN (0,1)), (2 << 3) IN (0,1) union select * from v1;
+2 << 3 IN (0,1) 2 << (3 IN (0,1)) (2 << 3) IN (0,1)
+0 2 0
+create or replace view v1 as select 2 << 3 OR 3, 2 << (3 OR 3), (2 << 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 or 3 AS `2 << 3 OR 3`,2 << (3 or 3) AS `2 << (3 OR 3)`,2 << 3 or 3 AS `(2 << 3) OR 3`
+select 2 << 3 OR 3, 2 << (3 OR 3), (2 << 3) OR 3 union select * from v1;
+2 << 3 OR 3 2 << (3 OR 3) (2 << 3) OR 3
+1 4 1
+create or replace view v1 as select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 or 3 AS `2 << 3 || 3`,2 << (3 or 3) AS `2 << (3 || 3)`,2 << 3 or 3 AS `(2 << 3) || 3`
+select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3 union select * from v1;
+2 << 3 || 3 2 << (3 || 3) (2 << 3) || 3
+1 4 1
+create or replace view v1 as select 2 << 3 XOR 3, 2 << (3 XOR 3), (2 << 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 xor 3 AS `2 << 3 XOR 3`,2 << (3 xor 3) AS `2 << (3 XOR 3)`,2 << 3 xor 3 AS `(2 << 3) XOR 3`
+select 2 << 3 XOR 3, 2 << (3 XOR 3), (2 << 3) XOR 3 union select * from v1;
+2 << 3 XOR 3 2 << (3 XOR 3) (2 << 3) XOR 3
+0 2 0
+create or replace view v1 as select 2 << 3 AND 3, 2 << (3 AND 3), (2 << 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 and 3 AS `2 << 3 AND 3`,2 << (3 and 3) AS `2 << (3 AND 3)`,2 << 3 and 3 AS `(2 << 3) AND 3`
+select 2 << 3 AND 3, 2 << (3 AND 3), (2 << 3) AND 3 union select * from v1;
+2 << 3 AND 3 2 << (3 AND 3) (2 << 3) AND 3
+1 4 1
+create or replace view v1 as select 2 << 3 && 3, 2 << (3 && 3), (2 << 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 and 3 AS `2 << 3 && 3`,2 << (3 and 3) AS `2 << (3 && 3)`,2 << 3 and 3 AS `(2 << 3) && 3`
+select 2 << 3 && 3, 2 << (3 && 3), (2 << 3) && 3 union select * from v1;
+2 << 3 && 3 2 << (3 && 3) (2 << 3) && 3
+1 4 1
+create or replace view v1 as select 2 << 3 = 3, 2 << (3 = 3), (2 << 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 = 3 AS `2 << 3 = 3`,2 << (3 = 3) AS `2 << (3 = 3)`,2 << 3 = 3 AS `(2 << 3) = 3`
+select 2 << 3 = 3, 2 << (3 = 3), (2 << 3) = 3 union select * from v1;
+2 << 3 = 3 2 << (3 = 3) (2 << 3) = 3
+0 4 0
+create or replace view v1 as select 2 << 3 <=> 3, 2 << (3 <=> 3), (2 << 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 <=> 3 AS `2 << 3 <=> 3`,2 << (3 <=> 3) AS `2 << (3 <=> 3)`,2 << 3 <=> 3 AS `(2 << 3) <=> 3`
+select 2 << 3 <=> 3, 2 << (3 <=> 3), (2 << 3) <=> 3 union select * from v1;
+2 << 3 <=> 3 2 << (3 <=> 3) (2 << 3) <=> 3
+0 4 0
+create or replace view v1 as select 2 << 3 >= 3, 2 << (3 >= 3), (2 << 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 >= 3 AS `2 << 3 >= 3`,2 << (3 >= 3) AS `2 << (3 >= 3)`,2 << 3 >= 3 AS `(2 << 3) >= 3`
+select 2 << 3 >= 3, 2 << (3 >= 3), (2 << 3) >= 3 union select * from v1;
+2 << 3 >= 3 2 << (3 >= 3) (2 << 3) >= 3
+1 4 1
+create or replace view v1 as select 2 << 3 <= 3, 2 << (3 <= 3), (2 << 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 <= 3 AS `2 << 3 <= 3`,2 << (3 <= 3) AS `2 << (3 <= 3)`,2 << 3 <= 3 AS `(2 << 3) <= 3`
+select 2 << 3 <= 3, 2 << (3 <= 3), (2 << 3) <= 3 union select * from v1;
+2 << 3 <= 3 2 << (3 <= 3) (2 << 3) <= 3
+0 4 0
+create or replace view v1 as select 2 << 3 < 3, 2 << (3 < 3), (2 << 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 < 3 AS `2 << 3 < 3`,2 << (3 < 3) AS `2 << (3 < 3)`,2 << 3 < 3 AS `(2 << 3) < 3`
+select 2 << 3 < 3, 2 << (3 < 3), (2 << 3) < 3 union select * from v1;
+2 << 3 < 3 2 << (3 < 3) (2 << 3) < 3
+0 2 0
+create or replace view v1 as select 2 << 3 <> 3, 2 << (3 <> 3), (2 << 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 <> 3 AS `2 << 3 <> 3`,2 << (3 <> 3) AS `2 << (3 <> 3)`,2 << 3 <> 3 AS `(2 << 3) <> 3`
+select 2 << 3 <> 3, 2 << (3 <> 3), (2 << 3) <> 3 union select * from v1;
+2 << 3 <> 3 2 << (3 <> 3) (2 << 3) <> 3
+1 2 1
+create or replace view v1 as select 2 << 3 > 3, 2 << (3 > 3), (2 << 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 > 3 AS `2 << 3 > 3`,2 << (3 > 3) AS `2 << (3 > 3)`,2 << 3 > 3 AS `(2 << 3) > 3`
+select 2 << 3 > 3, 2 << (3 > 3), (2 << 3) > 3 union select * from v1;
+2 << 3 > 3 2 << (3 > 3) (2 << 3) > 3
+1 2 1
+create or replace view v1 as select 2 << 3 != 3, 2 << (3 != 3), (2 << 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 <> 3 AS `2 << 3 != 3`,2 << (3 <> 3) AS `2 << (3 != 3)`,2 << 3 <> 3 AS `(2 << 3) != 3`
+select 2 << 3 != 3, 2 << (3 != 3), (2 << 3) != 3 union select * from v1;
+2 << 3 != 3 2 << (3 != 3) (2 << 3) != 3
+1 2 1
+create or replace view v1 as select 2 << 3 LIKE 3, 2 << (3 LIKE 3), (2 << 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 like 3 AS `2 << 3 LIKE 3`,2 << (3 like 3) AS `2 << (3 LIKE 3)`,2 << 3 like 3 AS `(2 << 3) LIKE 3`
+select 2 << 3 LIKE 3, 2 << (3 LIKE 3), (2 << 3) LIKE 3 union select * from v1;
+2 << 3 LIKE 3 2 << (3 LIKE 3) (2 << 3) LIKE 3
+0 4 0
+create or replace view v1 as select 2 << 3 REGEXP 3, 2 << (3 REGEXP 3), (2 << 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 regexp 3 AS `2 << 3 REGEXP 3`,2 << (3 regexp 3) AS `2 << (3 REGEXP 3)`,2 << 3 regexp 3 AS `(2 << 3) REGEXP 3`
+select 2 << 3 REGEXP 3, 2 << (3 REGEXP 3), (2 << 3) REGEXP 3 union select * from v1;
+2 << 3 REGEXP 3 2 << (3 REGEXP 3) (2 << 3) REGEXP 3
+0 4 0
+create or replace view v1 as select 2 << 3 | 3, 2 << (3 | 3), (2 << 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 | 3 AS `2 << 3 | 3`,2 << (3 | 3) AS `2 << (3 | 3)`,2 << 3 | 3 AS `(2 << 3) | 3`
+select 2 << 3 | 3, 2 << (3 | 3), (2 << 3) | 3 union select * from v1;
+2 << 3 | 3 2 << (3 | 3) (2 << 3) | 3
+19 16 19
+create or replace view v1 as select 2 << 3 & 3, 2 << (3 & 3), (2 << 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 & 3 AS `2 << 3 & 3`,2 << (3 & 3) AS `2 << (3 & 3)`,2 << 3 & 3 AS `(2 << 3) & 3`
+select 2 << 3 & 3, 2 << (3 & 3), (2 << 3) & 3 union select * from v1;
+2 << 3 & 3 2 << (3 & 3) (2 << 3) & 3
+0 16 0
+create or replace view v1 as select 2 << 3 << 3, 2 << (3 << 3), (2 << 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 << 3 AS `2 << 3 << 3`,2 << (3 << 3) AS `2 << (3 << 3)`,2 << 3 << 3 AS `(2 << 3) << 3`
+select 2 << 3 << 3, 2 << (3 << 3), (2 << 3) << 3 union select * from v1;
+2 << 3 << 3 2 << (3 << 3) (2 << 3) << 3
+128 33554432 128
+create or replace view v1 as select 2 << 2 >> 3, 2 << (2 >> 3), (2 << 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 2 >> 3 AS `2 << 2 >> 3`,2 << (2 >> 3) AS `2 << (2 >> 3)`,2 << 2 >> 3 AS `(2 << 2) >> 3`
+select 2 << 2 >> 3, 2 << (2 >> 3), (2 << 2) >> 3 union select * from v1;
+2 << 2 >> 3 2 << (2 >> 3) (2 << 2) >> 3
+1 2 1
+create or replace view v1 as select 2 << '2000-01-01' +INTERVAL 1 DAY, 2 << ('2000-01-01' +INTERVAL 1 DAY), (2 << '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << '2000-01-01' + interval 1 day AS `2 << '2000-01-01' +INTERVAL 1 DAY`,2 << '2000-01-01' + interval 1 day AS `2 << ('2000-01-01' +INTERVAL 1 DAY)`,(2 << '2000-01-01') + interval 1 day AS `(2 << '2000-01-01') +INTERVAL 1 DAY`
+select 2 << '2000-01-01' +INTERVAL 1 DAY, 2 << ('2000-01-01' +INTERVAL 1 DAY), (2 << '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 << '2000-01-01' +INTERVAL 1 DAY 2 << ('2000-01-01' +INTERVAL 1 DAY) (2 << '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 << 3 + 3, 2 << (3 + 3), (2 << 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 + 3 AS `2 << 3 + 3`,2 << 3 + 3 AS `2 << (3 + 3)`,(2 << 3) + 3 AS `(2 << 3) + 3`
+select 2 << 3 + 3, 2 << (3 + 3), (2 << 3) + 3 union select * from v1;
+2 << 3 + 3 2 << (3 + 3) (2 << 3) + 3
+128 128 19
+create or replace view v1 as select 2 << 3 - 3, 2 << (3 - 3), (2 << 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 - 3 AS `2 << 3 - 3`,2 << 3 - 3 AS `2 << (3 - 3)`,(2 << 3) - 3 AS `(2 << 3) - 3`
+select 2 << 3 - 3, 2 << (3 - 3), (2 << 3) - 3 union select * from v1;
+2 << 3 - 3 2 << (3 - 3) (2 << 3) - 3
+2 2 13
+create or replace view v1 as select 2 << 3 * 3, 2 << (3 * 3), (2 << 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 * 3 AS `2 << 3 * 3`,2 << 3 * 3 AS `2 << (3 * 3)`,(2 << 3) * 3 AS `(2 << 3) * 3`
+select 2 << 3 * 3, 2 << (3 * 3), (2 << 3) * 3 union select * from v1;
+2 << 3 * 3 2 << (3 * 3) (2 << 3) * 3
+1024 1024 48
+create or replace view v1 as select 2 << 3 / 3, 2 << (3 / 3), (2 << 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 / 3 AS `2 << 3 / 3`,2 << 3 / 3 AS `2 << (3 / 3)`,(2 << 3) / 3 AS `(2 << 3) / 3`
+select 2 << 3 / 3, 2 << (3 / 3), (2 << 3) / 3 union select * from v1;
+2 << 3 / 3 2 << (3 / 3) (2 << 3) / 3
+4 4 5.3333
+create or replace view v1 as select 2 << 3 DIV 3, 2 << (3 DIV 3), (2 << 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 DIV 3 AS `2 << 3 DIV 3`,2 << 3 DIV 3 AS `2 << (3 DIV 3)`,(2 << 3) DIV 3 AS `(2 << 3) DIV 3`
+select 2 << 3 DIV 3, 2 << (3 DIV 3), (2 << 3) DIV 3 union select * from v1;
+2 << 3 DIV 3 2 << (3 DIV 3) (2 << 3) DIV 3
+4 4 5
+create or replace view v1 as select 2 << 3 MOD 3, 2 << (3 MOD 3), (2 << 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 MOD 3 AS `2 << 3 MOD 3`,2 << 3 MOD 3 AS `2 << (3 MOD 3)`,(2 << 3) MOD 3 AS `(2 << 3) MOD 3`
+select 2 << 3 MOD 3, 2 << (3 MOD 3), (2 << 3) MOD 3 union select * from v1;
+2 << 3 MOD 3 2 << (3 MOD 3) (2 << 3) MOD 3
+2 2 1
+create or replace view v1 as select 2 << 3 % 3, 2 << (3 % 3), (2 << 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 MOD 3 AS `2 << 3 % 3`,2 << 3 MOD 3 AS `2 << (3 % 3)`,(2 << 3) MOD 3 AS `(2 << 3) % 3`
+select 2 << 3 % 3, 2 << (3 % 3), (2 << 3) % 3 union select * from v1;
+2 << 3 % 3 2 << (3 % 3) (2 << 3) % 3
+2 2 1
+create or replace view v1 as select 2 << 3 ^ 3, 2 << (3 ^ 3), (2 << 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 ^ 3 AS `2 << 3 ^ 3`,2 << 3 ^ 3 AS `2 << (3 ^ 3)`,(2 << 3) ^ 3 AS `(2 << 3) ^ 3`
+select 2 << 3 ^ 3, 2 << (3 ^ 3), (2 << 3) ^ 3 union select * from v1;
+2 << 3 ^ 3 2 << (3 ^ 3) (2 << 3) ^ 3
+2 2 19
+create or replace view v1 as select 2 << 3 BETWEEN 1 AND 3, 2 << (3 BETWEEN 1 AND 3), (2 << 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 between 1 and 3 AS `2 << 3 BETWEEN 1 AND 3`,2 << (3 between 1 and 3) AS `2 << (3 BETWEEN 1 AND 3)`,2 << 3 between 1 and 3 AS `(2 << 3) BETWEEN 1 AND 3`
+select 2 << 3 BETWEEN 1 AND 3, 2 << (3 BETWEEN 1 AND 3), (2 << 3) BETWEEN 1 AND 3 union select * from v1;
+2 << 3 BETWEEN 1 AND 3 2 << (3 BETWEEN 1 AND 3) (2 << 3) BETWEEN 1 AND 3
+0 4 0
+create or replace view v1 as select 2 >> 3 IS FALSE, 2 >> (3 IS FALSE), (2 >> 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 is false AS `2 >> 3 IS FALSE`,2 >> (3 is false) AS `2 >> (3 IS FALSE)`,2 >> 3 is false AS `(2 >> 3) IS FALSE`
+select 2 >> 3 IS FALSE, 2 >> (3 IS FALSE), (2 >> 3) IS FALSE union select * from v1;
+2 >> 3 IS FALSE 2 >> (3 IS FALSE) (2 >> 3) IS FALSE
+1 2 1
+create or replace view v1 as select charset(2 >> 3 COLLATE latin1_bin), charset(2 >> (3 COLLATE latin1_bin)), charset((2 >> 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 >> 3 collate latin1_bin) AS `charset(2 >> 3 COLLATE latin1_bin)`,charset(2 >> 3 collate latin1_bin) AS `charset(2 >> (3 COLLATE latin1_bin))`,charset((2 >> 3) collate latin1_bin) AS `charset((2 >> 3) COLLATE latin1_bin)`
+select charset(2 >> 3 COLLATE latin1_bin), charset(2 >> (3 COLLATE latin1_bin)), charset((2 >> 3) COLLATE latin1_bin) union select * from v1;
+charset(2 >> 3 COLLATE latin1_bin) charset(2 >> (3 COLLATE latin1_bin)) charset((2 >> 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 >> 3 IN (0,1), 2 >> (3 IN (0,1)), (2 >> 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 in (0,1) AS `2 >> 3 IN (0,1)`,2 >> (3 in (0,1)) AS `2 >> (3 IN (0,1))`,2 >> 3 in (0,1) AS `(2 >> 3) IN (0,1)`
+select 2 >> 3 IN (0,1), 2 >> (3 IN (0,1)), (2 >> 3) IN (0,1) union select * from v1;
+2 >> 3 IN (0,1) 2 >> (3 IN (0,1)) (2 >> 3) IN (0,1)
+1 2 1
+create or replace view v1 as select 2 >> 3 OR 0, 2 >> (3 OR 0), (2 >> 3) OR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 or 0 AS `2 >> 3 OR 0`,2 >> (3 or 0) AS `2 >> (3 OR 0)`,2 >> 3 or 0 AS `(2 >> 3) OR 0`
+select 2 >> 3 OR 0, 2 >> (3 OR 0), (2 >> 3) OR 0 union select * from v1;
+2 >> 3 OR 0 2 >> (3 OR 0) (2 >> 3) OR 0
+0 1 0
+create or replace view v1 as select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 or 0 AS `2 >> 3 || 0`,2 >> (3 or 0) AS `2 >> (3 || 0)`,2 >> 3 or 0 AS `(2 >> 3) || 0`
+select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0 union select * from v1;
+2 >> 3 || 0 2 >> (3 || 0) (2 >> 3) || 0
+0 1 0
+create or replace view v1 as select 2 >> 3 XOR 3, 2 >> (3 XOR 3), (2 >> 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 xor 3 AS `2 >> 3 XOR 3`,2 >> (3 xor 3) AS `2 >> (3 XOR 3)`,2 >> 3 xor 3 AS `(2 >> 3) XOR 3`
+select 2 >> 3 XOR 3, 2 >> (3 XOR 3), (2 >> 3) XOR 3 union select * from v1;
+2 >> 3 XOR 3 2 >> (3 XOR 3) (2 >> 3) XOR 3
+1 2 1
+create or replace view v1 as select 2 >> 3 AND 3, 2 >> (3 AND 3), (2 >> 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 and 3 AS `2 >> 3 AND 3`,2 >> (3 and 3) AS `2 >> (3 AND 3)`,2 >> 3 and 3 AS `(2 >> 3) AND 3`
+select 2 >> 3 AND 3, 2 >> (3 AND 3), (2 >> 3) AND 3 union select * from v1;
+2 >> 3 AND 3 2 >> (3 AND 3) (2 >> 3) AND 3
+0 1 0
+create or replace view v1 as select 2 >> 3 && 3, 2 >> (3 && 3), (2 >> 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 and 3 AS `2 >> 3 && 3`,2 >> (3 and 3) AS `2 >> (3 && 3)`,2 >> 3 and 3 AS `(2 >> 3) && 3`
+select 2 >> 3 && 3, 2 >> (3 && 3), (2 >> 3) && 3 union select * from v1;
+2 >> 3 && 3 2 >> (3 && 3) (2 >> 3) && 3
+0 1 0
+create or replace view v1 as select 2 >> 3 = 3, 2 >> (3 = 3), (2 >> 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 = 3 AS `2 >> 3 = 3`,2 >> (3 = 3) AS `2 >> (3 = 3)`,2 >> 3 = 3 AS `(2 >> 3) = 3`
+select 2 >> 3 = 3, 2 >> (3 = 3), (2 >> 3) = 3 union select * from v1;
+2 >> 3 = 3 2 >> (3 = 3) (2 >> 3) = 3
+0 1 0
+create or replace view v1 as select 2 >> 3 <=> 3, 2 >> (3 <=> 3), (2 >> 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 <=> 3 AS `2 >> 3 <=> 3`,2 >> (3 <=> 3) AS `2 >> (3 <=> 3)`,2 >> 3 <=> 3 AS `(2 >> 3) <=> 3`
+select 2 >> 3 <=> 3, 2 >> (3 <=> 3), (2 >> 3) <=> 3 union select * from v1;
+2 >> 3 <=> 3 2 >> (3 <=> 3) (2 >> 3) <=> 3
+0 1 0
+create or replace view v1 as select 2 >> 3 >= 3, 2 >> (3 >= 3), (2 >> 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 >= 3 AS `2 >> 3 >= 3`,2 >> (3 >= 3) AS `2 >> (3 >= 3)`,2 >> 3 >= 3 AS `(2 >> 3) >= 3`
+select 2 >> 3 >= 3, 2 >> (3 >= 3), (2 >> 3) >= 3 union select * from v1;
+2 >> 3 >= 3 2 >> (3 >= 3) (2 >> 3) >= 3
+0 1 0
+create or replace view v1 as select 2 >> 3 <= 0, 2 >> (3 <= 0), (2 >> 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 <= 0 AS `2 >> 3 <= 0`,2 >> (3 <= 0) AS `2 >> (3 <= 0)`,2 >> 3 <= 0 AS `(2 >> 3) <= 0`
+select 2 >> 3 <= 0, 2 >> (3 <= 0), (2 >> 3) <= 0 union select * from v1;
+2 >> 3 <= 0 2 >> (3 <= 0) (2 >> 3) <= 0
+1 2 1
+create or replace view v1 as select 2 >> 3 < 3, 2 >> (3 < 3), (2 >> 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 < 3 AS `2 >> 3 < 3`,2 >> (3 < 3) AS `2 >> (3 < 3)`,2 >> 3 < 3 AS `(2 >> 3) < 3`
+select 2 >> 3 < 3, 2 >> (3 < 3), (2 >> 3) < 3 union select * from v1;
+2 >> 3 < 3 2 >> (3 < 3) (2 >> 3) < 3
+1 2 1
+create or replace view v1 as select 2 >> 3 <> 3, 2 >> (3 <> 3), (2 >> 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 <> 3 AS `2 >> 3 <> 3`,2 >> (3 <> 3) AS `2 >> (3 <> 3)`,2 >> 3 <> 3 AS `(2 >> 3) <> 3`
+select 2 >> 3 <> 3, 2 >> (3 <> 3), (2 >> 3) <> 3 union select * from v1;
+2 >> 3 <> 3 2 >> (3 <> 3) (2 >> 3) <> 3
+1 2 1
+create or replace view v1 as select 2 >> 3 > 3, 2 >> (3 > 3), (2 >> 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 > 3 AS `2 >> 3 > 3`,2 >> (3 > 3) AS `2 >> (3 > 3)`,2 >> 3 > 3 AS `(2 >> 3) > 3`
+select 2 >> 3 > 3, 2 >> (3 > 3), (2 >> 3) > 3 union select * from v1;
+2 >> 3 > 3 2 >> (3 > 3) (2 >> 3) > 3
+0 2 0
+create or replace view v1 as select 2 >> 3 != 3, 2 >> (3 != 3), (2 >> 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 <> 3 AS `2 >> 3 != 3`,2 >> (3 <> 3) AS `2 >> (3 != 3)`,2 >> 3 <> 3 AS `(2 >> 3) != 3`
+select 2 >> 3 != 3, 2 >> (3 != 3), (2 >> 3) != 3 union select * from v1;
+2 >> 3 != 3 2 >> (3 != 3) (2 >> 3) != 3
+1 2 1
+create or replace view v1 as select 2 >> 3 LIKE 3, 2 >> (3 LIKE 3), (2 >> 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 like 3 AS `2 >> 3 LIKE 3`,2 >> (3 like 3) AS `2 >> (3 LIKE 3)`,2 >> 3 like 3 AS `(2 >> 3) LIKE 3`
+select 2 >> 3 LIKE 3, 2 >> (3 LIKE 3), (2 >> 3) LIKE 3 union select * from v1;
+2 >> 3 LIKE 3 2 >> (3 LIKE 3) (2 >> 3) LIKE 3
+0 1 0
+create or replace view v1 as select 2 >> 3 REGEXP 3, 2 >> (3 REGEXP 3), (2 >> 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 regexp 3 AS `2 >> 3 REGEXP 3`,2 >> (3 regexp 3) AS `2 >> (3 REGEXP 3)`,2 >> 3 regexp 3 AS `(2 >> 3) REGEXP 3`
+select 2 >> 3 REGEXP 3, 2 >> (3 REGEXP 3), (2 >> 3) REGEXP 3 union select * from v1;
+2 >> 3 REGEXP 3 2 >> (3 REGEXP 3) (2 >> 3) REGEXP 3
+0 1 0
+create or replace view v1 as select 2 >> 3 | 3, 2 >> (3 | 3), (2 >> 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 | 3 AS `2 >> 3 | 3`,2 >> (3 | 3) AS `2 >> (3 | 3)`,2 >> 3 | 3 AS `(2 >> 3) | 3`
+select 2 >> 3 | 3, 2 >> (3 | 3), (2 >> 3) | 3 union select * from v1;
+2 >> 3 | 3 2 >> (3 | 3) (2 >> 3) | 3
+3 0 3
+create or replace view v1 as select 2 >> 3 & 1, 2 >> (3 & 1), (2 >> 3) & 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 & 1 AS `2 >> 3 & 1`,2 >> (3 & 1) AS `2 >> (3 & 1)`,2 >> 3 & 1 AS `(2 >> 3) & 1`
+select 2 >> 3 & 1, 2 >> (3 & 1), (2 >> 3) & 1 union select * from v1;
+2 >> 3 & 1 2 >> (3 & 1) (2 >> 3) & 1
+0 1 0
+create or replace view v1 as select 2 >> 1 << 3, 2 >> (1 << 3), (2 >> 1) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 1 << 3 AS `2 >> 1 << 3`,2 >> (1 << 3) AS `2 >> (1 << 3)`,2 >> 1 << 3 AS `(2 >> 1) << 3`
+select 2 >> 1 << 3, 2 >> (1 << 3), (2 >> 1) << 3 union select * from v1;
+2 >> 1 << 3 2 >> (1 << 3) (2 >> 1) << 3
+8 0 8
+create or replace view v1 as select 2 >> 3 >> 3, 2 >> (3 >> 3), (2 >> 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 >> 3 AS `2 >> 3 >> 3`,2 >> (3 >> 3) AS `2 >> (3 >> 3)`,2 >> 3 >> 3 AS `(2 >> 3) >> 3`
+select 2 >> 3 >> 3, 2 >> (3 >> 3), (2 >> 3) >> 3 union select * from v1;
+2 >> 3 >> 3 2 >> (3 >> 3) (2 >> 3) >> 3
+0 2 0
+create or replace view v1 as select 2 >> '2000-01-01' +INTERVAL 1 DAY, 2 >> ('2000-01-01' +INTERVAL 1 DAY), (2 >> '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> '2000-01-01' + interval 1 day AS `2 >> '2000-01-01' +INTERVAL 1 DAY`,2 >> '2000-01-01' + interval 1 day AS `2 >> ('2000-01-01' +INTERVAL 1 DAY)`,(2 >> '2000-01-01') + interval 1 day AS `(2 >> '2000-01-01') +INTERVAL 1 DAY`
+select 2 >> '2000-01-01' +INTERVAL 1 DAY, 2 >> ('2000-01-01' +INTERVAL 1 DAY), (2 >> '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 >> '2000-01-01' +INTERVAL 1 DAY 2 >> ('2000-01-01' +INTERVAL 1 DAY) (2 >> '2000-01-01') +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 >> 3 + 3, 2 >> (3 + 3), (2 >> 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 + 3 AS `2 >> 3 + 3`,2 >> 3 + 3 AS `2 >> (3 + 3)`,(2 >> 3) + 3 AS `(2 >> 3) + 3`
+select 2 >> 3 + 3, 2 >> (3 + 3), (2 >> 3) + 3 union select * from v1;
+2 >> 3 + 3 2 >> (3 + 3) (2 >> 3) + 3
+0 0 3
+create or replace view v1 as select 2 >> 1 - 1, 2 >> (1 - 1), (2 >> 1) - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 1 - 1 AS `2 >> 1 - 1`,2 >> 1 - 1 AS `2 >> (1 - 1)`,(2 >> 1) - 1 AS `(2 >> 1) - 1`
+select 2 >> 1 - 1, 2 >> (1 - 1), (2 >> 1) - 1 union select * from v1;
+2 >> 1 - 1 2 >> (1 - 1) (2 >> 1) - 1
+2 2 0
+create or replace view v1 as select 2 >> 1 * 3, 2 >> (1 * 3), (2 >> 1) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 1 * 3 AS `2 >> 1 * 3`,2 >> 1 * 3 AS `2 >> (1 * 3)`,(2 >> 1) * 3 AS `(2 >> 1) * 3`
+select 2 >> 1 * 3, 2 >> (1 * 3), (2 >> 1) * 3 union select * from v1;
+2 >> 1 * 3 2 >> (1 * 3) (2 >> 1) * 3
+0 0 3
+create or replace view v1 as select 2 >> 3 / 3, 2 >> (3 / 3), (2 >> 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 / 3 AS `2 >> 3 / 3`,2 >> 3 / 3 AS `2 >> (3 / 3)`,(2 >> 3) / 3 AS `(2 >> 3) / 3`
+select 2 >> 3 / 3, 2 >> (3 / 3), (2 >> 3) / 3 union select * from v1;
+2 >> 3 / 3 2 >> (3 / 3) (2 >> 3) / 3
+1 1 0.0000
+create or replace view v1 as select 2 >> 3 DIV 3, 2 >> (3 DIV 3), (2 >> 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 DIV 3 AS `2 >> 3 DIV 3`,2 >> 3 DIV 3 AS `2 >> (3 DIV 3)`,(2 >> 3) DIV 3 AS `(2 >> 3) DIV 3`
+select 2 >> 3 DIV 3, 2 >> (3 DIV 3), (2 >> 3) DIV 3 union select * from v1;
+2 >> 3 DIV 3 2 >> (3 DIV 3) (2 >> 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 >> 3 MOD 3, 2 >> (3 MOD 3), (2 >> 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 MOD 3 AS `2 >> 3 MOD 3`,2 >> 3 MOD 3 AS `2 >> (3 MOD 3)`,(2 >> 3) MOD 3 AS `(2 >> 3) MOD 3`
+select 2 >> 3 MOD 3, 2 >> (3 MOD 3), (2 >> 3) MOD 3 union select * from v1;
+2 >> 3 MOD 3 2 >> (3 MOD 3) (2 >> 3) MOD 3
+2 2 0
+create or replace view v1 as select 2 >> 3 % 3, 2 >> (3 % 3), (2 >> 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 MOD 3 AS `2 >> 3 % 3`,2 >> 3 MOD 3 AS `2 >> (3 % 3)`,(2 >> 3) MOD 3 AS `(2 >> 3) % 3`
+select 2 >> 3 % 3, 2 >> (3 % 3), (2 >> 3) % 3 union select * from v1;
+2 >> 3 % 3 2 >> (3 % 3) (2 >> 3) % 3
+2 2 0
+create or replace view v1 as select 2 >> 3 ^ 3, 2 >> (3 ^ 3), (2 >> 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 ^ 3 AS `2 >> 3 ^ 3`,2 >> 3 ^ 3 AS `2 >> (3 ^ 3)`,(2 >> 3) ^ 3 AS `(2 >> 3) ^ 3`
+select 2 >> 3 ^ 3, 2 >> (3 ^ 3), (2 >> 3) ^ 3 union select * from v1;
+2 >> 3 ^ 3 2 >> (3 ^ 3) (2 >> 3) ^ 3
+2 2 3
+create or replace view v1 as select 2 >> 3 BETWEEN 1 AND 3, 2 >> (3 BETWEEN 1 AND 3), (2 >> 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 between 1 and 3 AS `2 >> 3 BETWEEN 1 AND 3`,2 >> (3 between 1 and 3) AS `2 >> (3 BETWEEN 1 AND 3)`,2 >> 3 between 1 and 3 AS `(2 >> 3) BETWEEN 1 AND 3`
+select 2 >> 3 BETWEEN 1 AND 3, 2 >> (3 BETWEEN 1 AND 3), (2 >> 3) BETWEEN 1 AND 3 union select * from v1;
+2 >> 3 BETWEEN 1 AND 3 2 >> (3 BETWEEN 1 AND 3) (2 >> 3) BETWEEN 1 AND 3
+0 1 0
+create or replace view v1 as select 2 + 3 IS FALSE, 2 + (3 IS FALSE), (2 + 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 is false AS `2 + 3 IS FALSE`,2 + (3 is false) AS `2 + (3 IS FALSE)`,2 + 3 is false AS `(2 + 3) IS FALSE`
+select 2 + 3 IS FALSE, 2 + (3 IS FALSE), (2 + 3) IS FALSE union select * from v1;
+2 + 3 IS FALSE 2 + (3 IS FALSE) (2 + 3) IS FALSE
+0 2 0
+create or replace view v1 as select charset(2 + 3 COLLATE latin1_bin), charset(2 + (3 COLLATE latin1_bin)), charset((2 + 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 + 3 collate latin1_bin) AS `charset(2 + 3 COLLATE latin1_bin)`,charset(2 + 3 collate latin1_bin) AS `charset(2 + (3 COLLATE latin1_bin))`,charset((2 + 3) collate latin1_bin) AS `charset((2 + 3) COLLATE latin1_bin)`
+select charset(2 + 3 COLLATE latin1_bin), charset(2 + (3 COLLATE latin1_bin)), charset((2 + 3) COLLATE latin1_bin) union select * from v1;
+charset(2 + 3 COLLATE latin1_bin) charset(2 + (3 COLLATE latin1_bin)) charset((2 + 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 + 3 IN (0,1), 2 + (3 IN (0,1)), (2 + 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 in (0,1) AS `2 + 3 IN (0,1)`,2 + (3 in (0,1)) AS `2 + (3 IN (0,1))`,2 + 3 in (0,1) AS `(2 + 3) IN (0,1)`
+select 2 + 3 IN (0,1), 2 + (3 IN (0,1)), (2 + 3) IN (0,1) union select * from v1;
+2 + 3 IN (0,1) 2 + (3 IN (0,1)) (2 + 3) IN (0,1)
+0 2 0
+create or replace view v1 as select 2 + 3 OR 3, 2 + (3 OR 3), (2 + 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 or 3 AS `2 + 3 OR 3`,2 + (3 or 3) AS `2 + (3 OR 3)`,2 + 3 or 3 AS `(2 + 3) OR 3`
+select 2 + 3 OR 3, 2 + (3 OR 3), (2 + 3) OR 3 union select * from v1;
+2 + 3 OR 3 2 + (3 OR 3) (2 + 3) OR 3
+1 3 1
+create or replace view v1 as select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 or 3 AS `2 + 3 || 3`,2 + (3 or 3) AS `2 + (3 || 3)`,2 + 3 or 3 AS `(2 + 3) || 3`
+select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3 union select * from v1;
+2 + 3 || 3 2 + (3 || 3) (2 + 3) || 3
+1 3 1
+create or replace view v1 as select 2 + 3 XOR 3, 2 + (3 XOR 3), (2 + 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 xor 3 AS `2 + 3 XOR 3`,2 + (3 xor 3) AS `2 + (3 XOR 3)`,2 + 3 xor 3 AS `(2 + 3) XOR 3`
+select 2 + 3 XOR 3, 2 + (3 XOR 3), (2 + 3) XOR 3 union select * from v1;
+2 + 3 XOR 3 2 + (3 XOR 3) (2 + 3) XOR 3
+0 2 0
+create or replace view v1 as select 2 + 3 AND 3, 2 + (3 AND 3), (2 + 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 and 3 AS `2 + 3 AND 3`,2 + (3 and 3) AS `2 + (3 AND 3)`,2 + 3 and 3 AS `(2 + 3) AND 3`
+select 2 + 3 AND 3, 2 + (3 AND 3), (2 + 3) AND 3 union select * from v1;
+2 + 3 AND 3 2 + (3 AND 3) (2 + 3) AND 3
+1 3 1
+create or replace view v1 as select 2 + 3 && 3, 2 + (3 && 3), (2 + 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 and 3 AS `2 + 3 && 3`,2 + (3 and 3) AS `2 + (3 && 3)`,2 + 3 and 3 AS `(2 + 3) && 3`
+select 2 + 3 && 3, 2 + (3 && 3), (2 + 3) && 3 union select * from v1;
+2 + 3 && 3 2 + (3 && 3) (2 + 3) && 3
+1 3 1
+create or replace view v1 as select 2 + 3 = 3, 2 + (3 = 3), (2 + 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 = 3 AS `2 + 3 = 3`,2 + (3 = 3) AS `2 + (3 = 3)`,2 + 3 = 3 AS `(2 + 3) = 3`
+select 2 + 3 = 3, 2 + (3 = 3), (2 + 3) = 3 union select * from v1;
+2 + 3 = 3 2 + (3 = 3) (2 + 3) = 3
+0 3 0
+create or replace view v1 as select 2 + 3 <=> 3, 2 + (3 <=> 3), (2 + 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 <=> 3 AS `2 + 3 <=> 3`,2 + (3 <=> 3) AS `2 + (3 <=> 3)`,2 + 3 <=> 3 AS `(2 + 3) <=> 3`
+select 2 + 3 <=> 3, 2 + (3 <=> 3), (2 + 3) <=> 3 union select * from v1;
+2 + 3 <=> 3 2 + (3 <=> 3) (2 + 3) <=> 3
+0 3 0
+create or replace view v1 as select 2 + 3 >= 3, 2 + (3 >= 3), (2 + 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 >= 3 AS `2 + 3 >= 3`,2 + (3 >= 3) AS `2 + (3 >= 3)`,2 + 3 >= 3 AS `(2 + 3) >= 3`
+select 2 + 3 >= 3, 2 + (3 >= 3), (2 + 3) >= 3 union select * from v1;
+2 + 3 >= 3 2 + (3 >= 3) (2 + 3) >= 3
+1 3 1
+create or replace view v1 as select 2 + 3 <= 3, 2 + (3 <= 3), (2 + 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 <= 3 AS `2 + 3 <= 3`,2 + (3 <= 3) AS `2 + (3 <= 3)`,2 + 3 <= 3 AS `(2 + 3) <= 3`
+select 2 + 3 <= 3, 2 + (3 <= 3), (2 + 3) <= 3 union select * from v1;
+2 + 3 <= 3 2 + (3 <= 3) (2 + 3) <= 3
+0 3 0
+create or replace view v1 as select 2 + 3 < 3, 2 + (3 < 3), (2 + 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 < 3 AS `2 + 3 < 3`,2 + (3 < 3) AS `2 + (3 < 3)`,2 + 3 < 3 AS `(2 + 3) < 3`
+select 2 + 3 < 3, 2 + (3 < 3), (2 + 3) < 3 union select * from v1;
+2 + 3 < 3 2 + (3 < 3) (2 + 3) < 3
+0 2 0
+create or replace view v1 as select 2 + 3 <> 3, 2 + (3 <> 3), (2 + 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 <> 3 AS `2 + 3 <> 3`,2 + (3 <> 3) AS `2 + (3 <> 3)`,2 + 3 <> 3 AS `(2 + 3) <> 3`
+select 2 + 3 <> 3, 2 + (3 <> 3), (2 + 3) <> 3 union select * from v1;
+2 + 3 <> 3 2 + (3 <> 3) (2 + 3) <> 3
+1 2 1
+create or replace view v1 as select 2 + 3 > 3, 2 + (3 > 3), (2 + 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 > 3 AS `2 + 3 > 3`,2 + (3 > 3) AS `2 + (3 > 3)`,2 + 3 > 3 AS `(2 + 3) > 3`
+select 2 + 3 > 3, 2 + (3 > 3), (2 + 3) > 3 union select * from v1;
+2 + 3 > 3 2 + (3 > 3) (2 + 3) > 3
+1 2 1
+create or replace view v1 as select 2 + 3 != 3, 2 + (3 != 3), (2 + 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 <> 3 AS `2 + 3 != 3`,2 + (3 <> 3) AS `2 + (3 != 3)`,2 + 3 <> 3 AS `(2 + 3) != 3`
+select 2 + 3 != 3, 2 + (3 != 3), (2 + 3) != 3 union select * from v1;
+2 + 3 != 3 2 + (3 != 3) (2 + 3) != 3
+1 2 1
+create or replace view v1 as select 2 + 3 LIKE 3, 2 + (3 LIKE 3), (2 + 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 like 3 AS `2 + 3 LIKE 3`,2 + (3 like 3) AS `2 + (3 LIKE 3)`,2 + 3 like 3 AS `(2 + 3) LIKE 3`
+select 2 + 3 LIKE 3, 2 + (3 LIKE 3), (2 + 3) LIKE 3 union select * from v1;
+2 + 3 LIKE 3 2 + (3 LIKE 3) (2 + 3) LIKE 3
+0 3 0
+create or replace view v1 as select 2 + 3 REGEXP 3, 2 + (3 REGEXP 3), (2 + 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 regexp 3 AS `2 + 3 REGEXP 3`,2 + (3 regexp 3) AS `2 + (3 REGEXP 3)`,2 + 3 regexp 3 AS `(2 + 3) REGEXP 3`
+select 2 + 3 REGEXP 3, 2 + (3 REGEXP 3), (2 + 3) REGEXP 3 union select * from v1;
+2 + 3 REGEXP 3 2 + (3 REGEXP 3) (2 + 3) REGEXP 3
+0 3 0
+create or replace view v1 as select 2 + 3 | 3, 2 + (3 | 3), (2 + 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 | 3 AS `2 + 3 | 3`,2 + (3 | 3) AS `2 + (3 | 3)`,2 + 3 | 3 AS `(2 + 3) | 3`
+select 2 + 3 | 3, 2 + (3 | 3), (2 + 3) | 3 union select * from v1;
+2 + 3 | 3 2 + (3 | 3) (2 + 3) | 3
+7 5 7
+create or replace view v1 as select 2 + 3 & 3, 2 + (3 & 3), (2 + 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 & 3 AS `2 + 3 & 3`,2 + (3 & 3) AS `2 + (3 & 3)`,2 + 3 & 3 AS `(2 + 3) & 3`
+select 2 + 3 & 3, 2 + (3 & 3), (2 + 3) & 3 union select * from v1;
+2 + 3 & 3 2 + (3 & 3) (2 + 3) & 3
+1 5 1
+create or replace view v1 as select 2 + 3 << 3, 2 + (3 << 3), (2 + 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 << 3 AS `2 + 3 << 3`,2 + (3 << 3) AS `2 + (3 << 3)`,2 + 3 << 3 AS `(2 + 3) << 3`
+select 2 + 3 << 3, 2 + (3 << 3), (2 + 3) << 3 union select * from v1;
+2 + 3 << 3 2 + (3 << 3) (2 + 3) << 3
+40 26 40
+create or replace view v1 as select 2 + 3 >> 3, 2 + (3 >> 3), (2 + 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 >> 3 AS `2 + 3 >> 3`,2 + (3 >> 3) AS `2 + (3 >> 3)`,2 + 3 >> 3 AS `(2 + 3) >> 3`
+select 2 + 3 >> 3, 2 + (3 >> 3), (2 + 3) >> 3 union select * from v1;
+2 + 3 >> 3 2 + (3 >> 3) (2 + 3) >> 3
+0 2 0
+create or replace view v1 as select 2 + '2000-01-01' +INTERVAL 1 DAY, 2 + ('2000-01-01' +INTERVAL 1 DAY), (2 + '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + '2000-01-01' + interval 1 day AS `2 + '2000-01-01' +INTERVAL 1 DAY`,2 + ('2000-01-01' + interval 1 day) AS `2 + ('2000-01-01' +INTERVAL 1 DAY)`,2 + '2000-01-01' + interval 1 day AS `(2 + '2000-01-01') +INTERVAL 1 DAY`
+select 2 + '2000-01-01' +INTERVAL 1 DAY, 2 + ('2000-01-01' +INTERVAL 1 DAY), (2 + '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 + '2000-01-01' +INTERVAL 1 DAY 2 + ('2000-01-01' +INTERVAL 1 DAY) (2 + '2000-01-01') +INTERVAL 1 DAY
+NULL 20000104 NULL
+create or replace view v1 as select 2 + 3 * 3, 2 + (3 * 3), (2 + 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 * 3 AS `2 + 3 * 3`,2 + 3 * 3 AS `2 + (3 * 3)`,(2 + 3) * 3 AS `(2 + 3) * 3`
+select 2 + 3 * 3, 2 + (3 * 3), (2 + 3) * 3 union select * from v1;
+2 + 3 * 3 2 + (3 * 3) (2 + 3) * 3
+11 11 15
+create or replace view v1 as select 2 + 3 / 3, 2 + (3 / 3), (2 + 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 / 3 AS `2 + 3 / 3`,2 + 3 / 3 AS `2 + (3 / 3)`,(2 + 3) / 3 AS `(2 + 3) / 3`
+select 2 + 3 / 3, 2 + (3 / 3), (2 + 3) / 3 union select * from v1;
+2 + 3 / 3 2 + (3 / 3) (2 + 3) / 3
+3.0000 3.0000 1.6667
+create or replace view v1 as select 2 + 3 DIV 3, 2 + (3 DIV 3), (2 + 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 DIV 3 AS `2 + 3 DIV 3`,2 + 3 DIV 3 AS `2 + (3 DIV 3)`,(2 + 3) DIV 3 AS `(2 + 3) DIV 3`
+select 2 + 3 DIV 3, 2 + (3 DIV 3), (2 + 3) DIV 3 union select * from v1;
+2 + 3 DIV 3 2 + (3 DIV 3) (2 + 3) DIV 3
+3 3 1
+create or replace view v1 as select 2 + 1 MOD 3, 2 + (1 MOD 3), (2 + 1) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 1 MOD 3 AS `2 + 1 MOD 3`,2 + 1 MOD 3 AS `2 + (1 MOD 3)`,(2 + 1) MOD 3 AS `(2 + 1) MOD 3`
+select 2 + 1 MOD 3, 2 + (1 MOD 3), (2 + 1) MOD 3 union select * from v1;
+2 + 1 MOD 3 2 + (1 MOD 3) (2 + 1) MOD 3
+3 3 0
+create or replace view v1 as select 2 + 1 % 3, 2 + (1 % 3), (2 + 1) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 1 MOD 3 AS `2 + 1 % 3`,2 + 1 MOD 3 AS `2 + (1 % 3)`,(2 + 1) MOD 3 AS `(2 + 1) % 3`
+select 2 + 1 % 3, 2 + (1 % 3), (2 + 1) % 3 union select * from v1;
+2 + 1 % 3 2 + (1 % 3) (2 + 1) % 3
+3 3 0
+create or replace view v1 as select 2 + 3 ^ 3, 2 + (3 ^ 3), (2 + 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 ^ 3 AS `2 + 3 ^ 3`,2 + 3 ^ 3 AS `2 + (3 ^ 3)`,(2 + 3) ^ 3 AS `(2 + 3) ^ 3`
+select 2 + 3 ^ 3, 2 + (3 ^ 3), (2 + 3) ^ 3 union select * from v1;
+2 + 3 ^ 3 2 + (3 ^ 3) (2 + 3) ^ 3
+2 2 6
+create or replace view v1 as select 2 + 3 BETWEEN 1 AND 3, 2 + (3 BETWEEN 1 AND 3), (2 + 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 between 1 and 3 AS `2 + 3 BETWEEN 1 AND 3`,2 + (3 between 1 and 3) AS `2 + (3 BETWEEN 1 AND 3)`,2 + 3 between 1 and 3 AS `(2 + 3) BETWEEN 1 AND 3`
+select 2 + 3 BETWEEN 1 AND 3, 2 + (3 BETWEEN 1 AND 3), (2 + 3) BETWEEN 1 AND 3 union select * from v1;
+2 + 3 BETWEEN 1 AND 3 2 + (3 BETWEEN 1 AND 3) (2 + 3) BETWEEN 1 AND 3
+0 3 0
+create or replace view v1 as select 2 - 3 IS FALSE, 2 - (3 IS FALSE), (2 - 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 is false AS `2 - 3 IS FALSE`,2 - (3 is false) AS `2 - (3 IS FALSE)`,2 - 3 is false AS `(2 - 3) IS FALSE`
+select 2 - 3 IS FALSE, 2 - (3 IS FALSE), (2 - 3) IS FALSE union select * from v1;
+2 - 3 IS FALSE 2 - (3 IS FALSE) (2 - 3) IS FALSE
+0 2 0
+create or replace view v1 as select charset(2 - 3 COLLATE latin1_bin), charset(2 - (3 COLLATE latin1_bin)), charset((2 - 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 - 3 collate latin1_bin) AS `charset(2 - 3 COLLATE latin1_bin)`,charset(2 - 3 collate latin1_bin) AS `charset(2 - (3 COLLATE latin1_bin))`,charset((2 - 3) collate latin1_bin) AS `charset((2 - 3) COLLATE latin1_bin)`
+select charset(2 - 3 COLLATE latin1_bin), charset(2 - (3 COLLATE latin1_bin)), charset((2 - 3) COLLATE latin1_bin) union select * from v1;
+charset(2 - 3 COLLATE latin1_bin) charset(2 - (3 COLLATE latin1_bin)) charset((2 - 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 - 3 IN (0,1), 2 - (3 IN (0,1)), (2 - 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 in (0,1) AS `2 - 3 IN (0,1)`,2 - (3 in (0,1)) AS `2 - (3 IN (0,1))`,2 - 3 in (0,1) AS `(2 - 3) IN (0,1)`
+select 2 - 3 IN (0,1), 2 - (3 IN (0,1)), (2 - 3) IN (0,1) union select * from v1;
+2 - 3 IN (0,1) 2 - (3 IN (0,1)) (2 - 3) IN (0,1)
+0 2 0
+create or replace view v1 as select 2 - 2 OR 0, 2 - (2 OR 0), (2 - 2) OR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 2 or 0 AS `2 - 2 OR 0`,2 - (2 or 0) AS `2 - (2 OR 0)`,2 - 2 or 0 AS `(2 - 2) OR 0`
+select 2 - 2 OR 0, 2 - (2 OR 0), (2 - 2) OR 0 union select * from v1;
+2 - 2 OR 0 2 - (2 OR 0) (2 - 2) OR 0
+0 1 0
+create or replace view v1 as select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 2 or 0 AS `2 - 2 || 0`,2 - (2 or 0) AS `2 - (2 || 0)`,2 - 2 or 0 AS `(2 - 2) || 0`
+select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0 union select * from v1;
+2 - 2 || 0 2 - (2 || 0) (2 - 2) || 0
+0 1 0
+create or replace view v1 as select 2 - 3 XOR 3, 2 - (3 XOR 3), (2 - 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 xor 3 AS `2 - 3 XOR 3`,2 - (3 xor 3) AS `2 - (3 XOR 3)`,2 - 3 xor 3 AS `(2 - 3) XOR 3`
+select 2 - 3 XOR 3, 2 - (3 XOR 3), (2 - 3) XOR 3 union select * from v1;
+2 - 3 XOR 3 2 - (3 XOR 3) (2 - 3) XOR 3
+0 2 0
+create or replace view v1 as select 2 - 2 AND 2, 2 - (2 AND 2), (2 - 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 2 and 2 AS `2 - 2 AND 2`,2 - (2 and 2) AS `2 - (2 AND 2)`,2 - 2 and 2 AS `(2 - 2) AND 2`
+select 2 - 2 AND 2, 2 - (2 AND 2), (2 - 2) AND 2 union select * from v1;
+2 - 2 AND 2 2 - (2 AND 2) (2 - 2) AND 2
+0 1 0
+create or replace view v1 as select 2 - 2 && 2, 2 - (2 && 2), (2 - 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 2 and 2 AS `2 - 2 && 2`,2 - (2 and 2) AS `2 - (2 && 2)`,2 - 2 and 2 AS `(2 - 2) && 2`
+select 2 - 2 && 2, 2 - (2 && 2), (2 - 2) && 2 union select * from v1;
+2 - 2 && 2 2 - (2 && 2) (2 - 2) && 2
+0 1 0
+create or replace view v1 as select 2 - 3 = 3, 2 - (3 = 3), (2 - 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 = 3 AS `2 - 3 = 3`,2 - (3 = 3) AS `2 - (3 = 3)`,2 - 3 = 3 AS `(2 - 3) = 3`
+select 2 - 3 = 3, 2 - (3 = 3), (2 - 3) = 3 union select * from v1;
+2 - 3 = 3 2 - (3 = 3) (2 - 3) = 3
+0 1 0
+create or replace view v1 as select 2 - 3 <=> 3, 2 - (3 <=> 3), (2 - 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 <=> 3 AS `2 - 3 <=> 3`,2 - (3 <=> 3) AS `2 - (3 <=> 3)`,2 - 3 <=> 3 AS `(2 - 3) <=> 3`
+select 2 - 3 <=> 3, 2 - (3 <=> 3), (2 - 3) <=> 3 union select * from v1;
+2 - 3 <=> 3 2 - (3 <=> 3) (2 - 3) <=> 3
+0 1 0
+create or replace view v1 as select 2 - 3 >= 3, 2 - (3 >= 3), (2 - 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 >= 3 AS `2 - 3 >= 3`,2 - (3 >= 3) AS `2 - (3 >= 3)`,2 - 3 >= 3 AS `(2 - 3) >= 3`
+select 2 - 3 >= 3, 2 - (3 >= 3), (2 - 3) >= 3 union select * from v1;
+2 - 3 >= 3 2 - (3 >= 3) (2 - 3) >= 3
+0 1 0
+create or replace view v1 as select 2 - 3 <= 2, 2 - (3 <= 2), (2 - 3) <= 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 <= 2 AS `2 - 3 <= 2`,2 - (3 <= 2) AS `2 - (3 <= 2)`,2 - 3 <= 2 AS `(2 - 3) <= 2`
+select 2 - 3 <= 2, 2 - (3 <= 2), (2 - 3) <= 2 union select * from v1;
+2 - 3 <= 2 2 - (3 <= 2) (2 - 3) <= 2
+1 2 1
+create or replace view v1 as select 2 - 3 < 3, 2 - (3 < 3), (2 - 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 < 3 AS `2 - 3 < 3`,2 - (3 < 3) AS `2 - (3 < 3)`,2 - 3 < 3 AS `(2 - 3) < 3`
+select 2 - 3 < 3, 2 - (3 < 3), (2 - 3) < 3 union select * from v1;
+2 - 3 < 3 2 - (3 < 3) (2 - 3) < 3
+1 2 1
+create or replace view v1 as select 2 - 3 <> 3, 2 - (3 <> 3), (2 - 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 <> 3 AS `2 - 3 <> 3`,2 - (3 <> 3) AS `2 - (3 <> 3)`,2 - 3 <> 3 AS `(2 - 3) <> 3`
+select 2 - 3 <> 3, 2 - (3 <> 3), (2 - 3) <> 3 union select * from v1;
+2 - 3 <> 3 2 - (3 <> 3) (2 - 3) <> 3
+1 2 1
+create or replace view v1 as select 2 - 3 > 3, 2 - (3 > 3), (2 - 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 > 3 AS `2 - 3 > 3`,2 - (3 > 3) AS `2 - (3 > 3)`,2 - 3 > 3 AS `(2 - 3) > 3`
+select 2 - 3 > 3, 2 - (3 > 3), (2 - 3) > 3 union select * from v1;
+2 - 3 > 3 2 - (3 > 3) (2 - 3) > 3
+0 2 0
+create or replace view v1 as select 2 - 3 != 3, 2 - (3 != 3), (2 - 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 <> 3 AS `2 - 3 != 3`,2 - (3 <> 3) AS `2 - (3 != 3)`,2 - 3 <> 3 AS `(2 - 3) != 3`
+select 2 - 3 != 3, 2 - (3 != 3), (2 - 3) != 3 union select * from v1;
+2 - 3 != 3 2 - (3 != 3) (2 - 3) != 3
+1 2 1
+create or replace view v1 as select 2 - 3 LIKE 3, 2 - (3 LIKE 3), (2 - 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 like 3 AS `2 - 3 LIKE 3`,2 - (3 like 3) AS `2 - (3 LIKE 3)`,2 - 3 like 3 AS `(2 - 3) LIKE 3`
+select 2 - 3 LIKE 3, 2 - (3 LIKE 3), (2 - 3) LIKE 3 union select * from v1;
+2 - 3 LIKE 3 2 - (3 LIKE 3) (2 - 3) LIKE 3
+0 1 0
+create or replace view v1 as select 2 - 3 REGEXP 3, 2 - (3 REGEXP 3), (2 - 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 regexp 3 AS `2 - 3 REGEXP 3`,2 - (3 regexp 3) AS `2 - (3 REGEXP 3)`,2 - 3 regexp 3 AS `(2 - 3) REGEXP 3`
+select 2 - 3 REGEXP 3, 2 - (3 REGEXP 3), (2 - 3) REGEXP 3 union select * from v1;
+2 - 3 REGEXP 3 2 - (3 REGEXP 3) (2 - 3) REGEXP 3
+0 1 0
+create or replace view v1 as select 2 - 0 | 1, 2 - (0 | 1), (2 - 0) | 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 0 | 1 AS `2 - 0 | 1`,2 - (0 | 1) AS `2 - (0 | 1)`,2 - 0 | 1 AS `(2 - 0) | 1`
+select 2 - 0 | 1, 2 - (0 | 1), (2 - 0) | 1 union select * from v1;
+2 - 0 | 1 2 - (0 | 1) (2 - 0) | 1
+3 1 3
+create or replace view v1 as select 2 - 1 & 2, 2 - (1 & 2), (2 - 1) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 1 & 2 AS `2 - 1 & 2`,2 - (1 & 2) AS `2 - (1 & 2)`,2 - 1 & 2 AS `(2 - 1) & 2`
+select 2 - 1 & 2, 2 - (1 & 2), (2 - 1) & 2 union select * from v1;
+2 - 1 & 2 2 - (1 & 2) (2 - 1) & 2
+0 2 0
+create or replace view v1 as select 2 - 1 << 1, 2 - (1 << 1), (2 - 1) << 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 1 << 1 AS `2 - 1 << 1`,2 - (1 << 1) AS `2 - (1 << 1)`,2 - 1 << 1 AS `(2 - 1) << 1`
+select 2 - 1 << 1, 2 - (1 << 1), (2 - 1) << 1 union select * from v1;
+2 - 1 << 1 2 - (1 << 1) (2 - 1) << 1
+2 0 2
+create or replace view v1 as select 2 - 3 >> 3, 2 - (3 >> 3), (2 - 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 >> 3 AS `2 - 3 >> 3`,2 - (3 >> 3) AS `2 - (3 >> 3)`,2 - 3 >> 3 AS `(2 - 3) >> 3`
+select 2 - 3 >> 3, 2 - (3 >> 3), (2 - 3) >> 3 union select * from v1;
+2 - 3 >> 3 2 - (3 >> 3) (2 - 3) >> 3
+2305843009213693951 2 2305843009213693951
+create or replace view v1 as select 2 - '2000-01-01' +INTERVAL 1 DAY, 2 - ('2000-01-01' +INTERVAL 1 DAY), (2 - '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - '2000-01-01' + interval 1 day AS `2 - '2000-01-01' +INTERVAL 1 DAY`,2 - ('2000-01-01' + interval 1 day) AS `2 - ('2000-01-01' +INTERVAL 1 DAY)`,2 - '2000-01-01' + interval 1 day AS `(2 - '2000-01-01') +INTERVAL 1 DAY`
+select 2 - '2000-01-01' +INTERVAL 1 DAY, 2 - ('2000-01-01' +INTERVAL 1 DAY), (2 - '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 - '2000-01-01' +INTERVAL 1 DAY 2 - ('2000-01-01' +INTERVAL 1 DAY) (2 - '2000-01-01') +INTERVAL 1 DAY
+NULL -20000100 NULL
+create or replace view v1 as select 2 - 3 + 3, 2 - (3 + 3), (2 - 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 + 3 AS `2 - 3 + 3`,2 - (3 + 3) AS `2 - (3 + 3)`,2 - 3 + 3 AS `(2 - 3) + 3`
+select 2 - 3 + 3, 2 - (3 + 3), (2 - 3) + 3 union select * from v1;
+2 - 3 + 3 2 - (3 + 3) (2 - 3) + 3
+2 -4 2
+create or replace view v1 as select 2 - 3 - 3, 2 - (3 - 3), (2 - 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 - 3 AS `2 - 3 - 3`,2 - (3 - 3) AS `2 - (3 - 3)`,2 - 3 - 3 AS `(2 - 3) - 3`
+select 2 - 3 - 3, 2 - (3 - 3), (2 - 3) - 3 union select * from v1;
+2 - 3 - 3 2 - (3 - 3) (2 - 3) - 3
+-4 2 -4
+create or replace view v1 as select 2 - 3 * 3, 2 - (3 * 3), (2 - 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 * 3 AS `2 - 3 * 3`,2 - 3 * 3 AS `2 - (3 * 3)`,(2 - 3) * 3 AS `(2 - 3) * 3`
+select 2 - 3 * 3, 2 - (3 * 3), (2 - 3) * 3 union select * from v1;
+2 - 3 * 3 2 - (3 * 3) (2 - 3) * 3
+-7 -7 -3
+create or replace view v1 as select 2 - 3 / 3, 2 - (3 / 3), (2 - 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 / 3 AS `2 - 3 / 3`,2 - 3 / 3 AS `2 - (3 / 3)`,(2 - 3) / 3 AS `(2 - 3) / 3`
+select 2 - 3 / 3, 2 - (3 / 3), (2 - 3) / 3 union select * from v1;
+2 - 3 / 3 2 - (3 / 3) (2 - 3) / 3
+1.0000 1.0000 -0.3333
+create or replace view v1 as select 2 - 3 DIV 3, 2 - (3 DIV 3), (2 - 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 DIV 3 AS `2 - 3 DIV 3`,2 - 3 DIV 3 AS `2 - (3 DIV 3)`,(2 - 3) DIV 3 AS `(2 - 3) DIV 3`
+select 2 - 3 DIV 3, 2 - (3 DIV 3), (2 - 3) DIV 3 union select * from v1;
+2 - 3 DIV 3 2 - (3 DIV 3) (2 - 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 - 3 MOD 3, 2 - (3 MOD 3), (2 - 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 MOD 3 AS `2 - 3 MOD 3`,2 - 3 MOD 3 AS `2 - (3 MOD 3)`,(2 - 3) MOD 3 AS `(2 - 3) MOD 3`
+select 2 - 3 MOD 3, 2 - (3 MOD 3), (2 - 3) MOD 3 union select * from v1;
+2 - 3 MOD 3 2 - (3 MOD 3) (2 - 3) MOD 3
+2 2 -1
+create or replace view v1 as select 2 - 3 % 3, 2 - (3 % 3), (2 - 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 MOD 3 AS `2 - 3 % 3`,2 - 3 MOD 3 AS `2 - (3 % 3)`,(2 - 3) MOD 3 AS `(2 - 3) % 3`
+select 2 - 3 % 3, 2 - (3 % 3), (2 - 3) % 3 union select * from v1;
+2 - 3 % 3 2 - (3 % 3) (2 - 3) % 3
+2 2 -1
+create or replace view v1 as select 2 - 3 ^ 3, 2 - (3 ^ 3), (2 - 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 ^ 3 AS `2 - 3 ^ 3`,2 - 3 ^ 3 AS `2 - (3 ^ 3)`,(2 - 3) ^ 3 AS `(2 - 3) ^ 3`
+select 2 - 3 ^ 3, 2 - (3 ^ 3), (2 - 3) ^ 3 union select * from v1;
+2 - 3 ^ 3 2 - (3 ^ 3) (2 - 3) ^ 3
+2 2 18446744073709551612
+create or replace view v1 as select 2 - 3 BETWEEN 1 AND 3, 2 - (3 BETWEEN 1 AND 3), (2 - 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 between 1 and 3 AS `2 - 3 BETWEEN 1 AND 3`,2 - (3 between 1 and 3) AS `2 - (3 BETWEEN 1 AND 3)`,2 - 3 between 1 and 3 AS `(2 - 3) BETWEEN 1 AND 3`
+select 2 - 3 BETWEEN 1 AND 3, 2 - (3 BETWEEN 1 AND 3), (2 - 3) BETWEEN 1 AND 3 union select * from v1;
+2 - 3 BETWEEN 1 AND 3 2 - (3 BETWEEN 1 AND 3) (2 - 3) BETWEEN 1 AND 3
+0 1 0
+create or replace view v1 as select 2 * 0 IS FALSE, 2 * (0 IS FALSE), (2 * 0) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 0 is false AS `2 * 0 IS FALSE`,2 * (0 is false) AS `2 * (0 IS FALSE)`,2 * 0 is false AS `(2 * 0) IS FALSE`
+select 2 * 0 IS FALSE, 2 * (0 IS FALSE), (2 * 0) IS FALSE union select * from v1;
+2 * 0 IS FALSE 2 * (0 IS FALSE) (2 * 0) IS FALSE
+1 2 1
+create or replace view v1 as select charset(2 * 3 COLLATE latin1_bin), charset(2 * (3 COLLATE latin1_bin)), charset((2 * 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 * 3 collate latin1_bin) AS `charset(2 * 3 COLLATE latin1_bin)`,charset(2 * 3 collate latin1_bin) AS `charset(2 * (3 COLLATE latin1_bin))`,charset((2 * 3) collate latin1_bin) AS `charset((2 * 3) COLLATE latin1_bin)`
+select charset(2 * 3 COLLATE latin1_bin), charset(2 * (3 COLLATE latin1_bin)), charset((2 * 3) COLLATE latin1_bin) union select * from v1;
+charset(2 * 3 COLLATE latin1_bin) charset(2 * (3 COLLATE latin1_bin)) charset((2 * 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 * 0 IN (0,1), 2 * (0 IN (0,1)), (2 * 0) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 0 in (0,1) AS `2 * 0 IN (0,1)`,2 * (0 in (0,1)) AS `2 * (0 IN (0,1))`,2 * 0 in (0,1) AS `(2 * 0) IN (0,1)`
+select 2 * 0 IN (0,1), 2 * (0 IN (0,1)), (2 * 0) IN (0,1) union select * from v1;
+2 * 0 IN (0,1) 2 * (0 IN (0,1)) (2 * 0) IN (0,1)
+1 2 1
+create or replace view v1 as select 2 * 3 OR 3, 2 * (3 OR 3), (2 * 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 or 3 AS `2 * 3 OR 3`,2 * (3 or 3) AS `2 * (3 OR 3)`,2 * 3 or 3 AS `(2 * 3) OR 3`
+select 2 * 3 OR 3, 2 * (3 OR 3), (2 * 3) OR 3 union select * from v1;
+2 * 3 OR 3 2 * (3 OR 3) (2 * 3) OR 3
+1 2 1
+create or replace view v1 as select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 or 3 AS `2 * 3 || 3`,2 * (3 or 3) AS `2 * (3 || 3)`,2 * 3 or 3 AS `(2 * 3) || 3`
+select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3 union select * from v1;
+2 * 3 || 3 2 * (3 || 3) (2 * 3) || 3
+1 2 1
+create or replace view v1 as select 2 * 3 XOR 0, 2 * (3 XOR 0), (2 * 3) XOR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 xor 0 AS `2 * 3 XOR 0`,2 * (3 xor 0) AS `2 * (3 XOR 0)`,2 * 3 xor 0 AS `(2 * 3) XOR 0`
+select 2 * 3 XOR 0, 2 * (3 XOR 0), (2 * 3) XOR 0 union select * from v1;
+2 * 3 XOR 0 2 * (3 XOR 0) (2 * 3) XOR 0
+1 2 1
+create or replace view v1 as select 2 * 3 AND 3, 2 * (3 AND 3), (2 * 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 and 3 AS `2 * 3 AND 3`,2 * (3 and 3) AS `2 * (3 AND 3)`,2 * 3 and 3 AS `(2 * 3) AND 3`
+select 2 * 3 AND 3, 2 * (3 AND 3), (2 * 3) AND 3 union select * from v1;
+2 * 3 AND 3 2 * (3 AND 3) (2 * 3) AND 3
+1 2 1
+create or replace view v1 as select 2 * 3 && 3, 2 * (3 && 3), (2 * 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 and 3 AS `2 * 3 && 3`,2 * (3 and 3) AS `2 * (3 && 3)`,2 * 3 and 3 AS `(2 * 3) && 3`
+select 2 * 3 && 3, 2 * (3 && 3), (2 * 3) && 3 union select * from v1;
+2 * 3 && 3 2 * (3 && 3) (2 * 3) && 3
+1 2 1
+create or replace view v1 as select 2 * 3 = 3, 2 * (3 = 3), (2 * 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 = 3 AS `2 * 3 = 3`,2 * (3 = 3) AS `2 * (3 = 3)`,2 * 3 = 3 AS `(2 * 3) = 3`
+select 2 * 3 = 3, 2 * (3 = 3), (2 * 3) = 3 union select * from v1;
+2 * 3 = 3 2 * (3 = 3) (2 * 3) = 3
+0 2 0
+create or replace view v1 as select 2 * 3 <=> 3, 2 * (3 <=> 3), (2 * 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 <=> 3 AS `2 * 3 <=> 3`,2 * (3 <=> 3) AS `2 * (3 <=> 3)`,2 * 3 <=> 3 AS `(2 * 3) <=> 3`
+select 2 * 3 <=> 3, 2 * (3 <=> 3), (2 * 3) <=> 3 union select * from v1;
+2 * 3 <=> 3 2 * (3 <=> 3) (2 * 3) <=> 3
+0 2 0
+create or replace view v1 as select 2 * 3 >= 3, 2 * (3 >= 3), (2 * 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 >= 3 AS `2 * 3 >= 3`,2 * (3 >= 3) AS `2 * (3 >= 3)`,2 * 3 >= 3 AS `(2 * 3) >= 3`
+select 2 * 3 >= 3, 2 * (3 >= 3), (2 * 3) >= 3 union select * from v1;
+2 * 3 >= 3 2 * (3 >= 3) (2 * 3) >= 3
+1 2 1
+create or replace view v1 as select 2 * 3 <= 3, 2 * (3 <= 3), (2 * 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 <= 3 AS `2 * 3 <= 3`,2 * (3 <= 3) AS `2 * (3 <= 3)`,2 * 3 <= 3 AS `(2 * 3) <= 3`
+select 2 * 3 <= 3, 2 * (3 <= 3), (2 * 3) <= 3 union select * from v1;
+2 * 3 <= 3 2 * (3 <= 3) (2 * 3) <= 3
+0 2 0
+create or replace view v1 as select 2 * 0 < 3, 2 * (0 < 3), (2 * 0) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 0 < 3 AS `2 * 0 < 3`,2 * (0 < 3) AS `2 * (0 < 3)`,2 * 0 < 3 AS `(2 * 0) < 3`
+select 2 * 0 < 3, 2 * (0 < 3), (2 * 0) < 3 union select * from v1;
+2 * 0 < 3 2 * (0 < 3) (2 * 0) < 3
+1 2 1
+create or replace view v1 as select 2 * 3 <> 3, 2 * (3 <> 3), (2 * 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 <> 3 AS `2 * 3 <> 3`,2 * (3 <> 3) AS `2 * (3 <> 3)`,2 * 3 <> 3 AS `(2 * 3) <> 3`
+select 2 * 3 <> 3, 2 * (3 <> 3), (2 * 3) <> 3 union select * from v1;
+2 * 3 <> 3 2 * (3 <> 3) (2 * 3) <> 3
+1 0 1
+create or replace view v1 as select 2 * 3 > 3, 2 * (3 > 3), (2 * 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 > 3 AS `2 * 3 > 3`,2 * (3 > 3) AS `2 * (3 > 3)`,2 * 3 > 3 AS `(2 * 3) > 3`
+select 2 * 3 > 3, 2 * (3 > 3), (2 * 3) > 3 union select * from v1;
+2 * 3 > 3 2 * (3 > 3) (2 * 3) > 3
+1 0 1
+create or replace view v1 as select 2 * 3 != 3, 2 * (3 != 3), (2 * 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 <> 3 AS `2 * 3 != 3`,2 * (3 <> 3) AS `2 * (3 != 3)`,2 * 3 <> 3 AS `(2 * 3) != 3`
+select 2 * 3 != 3, 2 * (3 != 3), (2 * 3) != 3 union select * from v1;
+2 * 3 != 3 2 * (3 != 3) (2 * 3) != 3
+1 0 1
+create or replace view v1 as select 2 * 3 LIKE 3, 2 * (3 LIKE 3), (2 * 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 like 3 AS `2 * 3 LIKE 3`,2 * (3 like 3) AS `2 * (3 LIKE 3)`,2 * 3 like 3 AS `(2 * 3) LIKE 3`
+select 2 * 3 LIKE 3, 2 * (3 LIKE 3), (2 * 3) LIKE 3 union select * from v1;
+2 * 3 LIKE 3 2 * (3 LIKE 3) (2 * 3) LIKE 3
+0 2 0
+create or replace view v1 as select 2 * 3 REGEXP 3, 2 * (3 REGEXP 3), (2 * 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 regexp 3 AS `2 * 3 REGEXP 3`,2 * (3 regexp 3) AS `2 * (3 REGEXP 3)`,2 * 3 regexp 3 AS `(2 * 3) REGEXP 3`
+select 2 * 3 REGEXP 3, 2 * (3 REGEXP 3), (2 * 3) REGEXP 3 union select * from v1;
+2 * 3 REGEXP 3 2 * (3 REGEXP 3) (2 * 3) REGEXP 3
+0 2 0
+create or replace view v1 as select 2 * 3 | 3, 2 * (3 | 3), (2 * 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 | 3 AS `2 * 3 | 3`,2 * (3 | 3) AS `2 * (3 | 3)`,2 * 3 | 3 AS `(2 * 3) | 3`
+select 2 * 3 | 3, 2 * (3 | 3), (2 * 3) | 3 union select * from v1;
+2 * 3 | 3 2 * (3 | 3) (2 * 3) | 3
+7 6 7
+create or replace view v1 as select 2 * 3 & 3, 2 * (3 & 3), (2 * 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 & 3 AS `2 * 3 & 3`,2 * (3 & 3) AS `2 * (3 & 3)`,2 * 3 & 3 AS `(2 * 3) & 3`
+select 2 * 3 & 3, 2 * (3 & 3), (2 * 3) & 3 union select * from v1;
+2 * 3 & 3 2 * (3 & 3) (2 * 3) & 3
+2 6 2
+create or replace view v1 as select 2 * 3 >> 2, 2 * (3 >> 2), (2 * 3) >> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 >> 2 AS `2 * 3 >> 2`,2 * (3 >> 2) AS `2 * (3 >> 2)`,2 * 3 >> 2 AS `(2 * 3) >> 2`
+select 2 * 3 >> 2, 2 * (3 >> 2), (2 * 3) >> 2 union select * from v1;
+2 * 3 >> 2 2 * (3 >> 2) (2 * 3) >> 2
+1 0 1
+create or replace view v1 as select 2 * '2000-01-01' +INTERVAL 1 DAY, 2 * ('2000-01-01' +INTERVAL 1 DAY), (2 * '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * '2000-01-01' + interval 1 day AS `2 * '2000-01-01' +INTERVAL 1 DAY`,2 * ('2000-01-01' + interval 1 day) AS `2 * ('2000-01-01' +INTERVAL 1 DAY)`,2 * '2000-01-01' + interval 1 day AS `(2 * '2000-01-01') +INTERVAL 1 DAY`
+select 2 * '2000-01-01' +INTERVAL 1 DAY, 2 * ('2000-01-01' +INTERVAL 1 DAY), (2 * '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 * '2000-01-01' +INTERVAL 1 DAY 2 * ('2000-01-01' +INTERVAL 1 DAY) (2 * '2000-01-01') +INTERVAL 1 DAY
+NULL 40000204 NULL
+create or replace view v1 as select 2 * 3 + 3, 2 * (3 + 3), (2 * 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 + 3 AS `2 * 3 + 3`,2 * (3 + 3) AS `2 * (3 + 3)`,2 * 3 + 3 AS `(2 * 3) + 3`
+select 2 * 3 + 3, 2 * (3 + 3), (2 * 3) + 3 union select * from v1;
+2 * 3 + 3 2 * (3 + 3) (2 * 3) + 3
+9 12 9
+create or replace view v1 as select 2 * 3 - 3, 2 * (3 - 3), (2 * 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 - 3 AS `2 * 3 - 3`,2 * (3 - 3) AS `2 * (3 - 3)`,2 * 3 - 3 AS `(2 * 3) - 3`
+select 2 * 3 - 3, 2 * (3 - 3), (2 * 3) - 3 union select * from v1;
+2 * 3 - 3 2 * (3 - 3) (2 * 3) - 3
+3 0 3
+create or replace view v1 as select 2 * 3 DIV 2, 2 * (3 DIV 2), (2 * 3) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 DIV 2 AS `2 * 3 DIV 2`,2 * (3 DIV 2) AS `2 * (3 DIV 2)`,2 * 3 DIV 2 AS `(2 * 3) DIV 2`
+select 2 * 3 DIV 2, 2 * (3 DIV 2), (2 * 3) DIV 2 union select * from v1;
+2 * 3 DIV 2 2 * (3 DIV 2) (2 * 3) DIV 2
+3 2 3
+create or replace view v1 as select 2 * 3 MOD 2, 2 * (3 MOD 2), (2 * 3) MOD 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 MOD 2 AS `2 * 3 MOD 2`,2 * (3 MOD 2) AS `2 * (3 MOD 2)`,2 * 3 MOD 2 AS `(2 * 3) MOD 2`
+select 2 * 3 MOD 2, 2 * (3 MOD 2), (2 * 3) MOD 2 union select * from v1;
+2 * 3 MOD 2 2 * (3 MOD 2) (2 * 3) MOD 2
+0 2 0
+create or replace view v1 as select 2 * 3 % 2, 2 * (3 % 2), (2 * 3) % 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 MOD 2 AS `2 * 3 % 2`,2 * (3 MOD 2) AS `2 * (3 % 2)`,2 * 3 MOD 2 AS `(2 * 3) % 2`
+select 2 * 3 % 2, 2 * (3 % 2), (2 * 3) % 2 union select * from v1;
+2 * 3 % 2 2 * (3 % 2) (2 * 3) % 2
+0 2 0
+create or replace view v1 as select 2 * 3 ^ 3, 2 * (3 ^ 3), (2 * 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 ^ 3 AS `2 * 3 ^ 3`,2 * 3 ^ 3 AS `2 * (3 ^ 3)`,(2 * 3) ^ 3 AS `(2 * 3) ^ 3`
+select 2 * 3 ^ 3, 2 * (3 ^ 3), (2 * 3) ^ 3 union select * from v1;
+2 * 3 ^ 3 2 * (3 ^ 3) (2 * 3) ^ 3
+0 0 5
+create or replace view v1 as select 2 * 3 BETWEEN 1 AND 3, 2 * (3 BETWEEN 1 AND 3), (2 * 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 3 between 1 and 3 AS `2 * 3 BETWEEN 1 AND 3`,2 * (3 between 1 and 3) AS `2 * (3 BETWEEN 1 AND 3)`,2 * 3 between 1 and 3 AS `(2 * 3) BETWEEN 1 AND 3`
+select 2 * 3 BETWEEN 1 AND 3, 2 * (3 BETWEEN 1 AND 3), (2 * 3) BETWEEN 1 AND 3 union select * from v1;
+2 * 3 BETWEEN 1 AND 3 2 * (3 BETWEEN 1 AND 3) (2 * 3) BETWEEN 1 AND 3
+0 2 0
+create or replace view v1 as select 2 / 3 IS FALSE, 2 / (3 IS FALSE), (2 / 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 is false AS `2 / 3 IS FALSE`,2 / (3 is false) AS `2 / (3 IS FALSE)`,2 / 3 is false AS `(2 / 3) IS FALSE`
+select 2 / 3 IS FALSE, 2 / (3 IS FALSE), (2 / 3) IS FALSE union select * from v1;
+2 / 3 IS FALSE 2 / (3 IS FALSE) (2 / 3) IS FALSE
+0 NULL 0
+create or replace view v1 as select charset(2 / 3 COLLATE latin1_bin), charset(2 / (3 COLLATE latin1_bin)), charset((2 / 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 / 3 collate latin1_bin) AS `charset(2 / 3 COLLATE latin1_bin)`,charset(2 / 3 collate latin1_bin) AS `charset(2 / (3 COLLATE latin1_bin))`,charset((2 / 3) collate latin1_bin) AS `charset((2 / 3) COLLATE latin1_bin)`
+select charset(2 / 3 COLLATE latin1_bin), charset(2 / (3 COLLATE latin1_bin)), charset((2 / 3) COLLATE latin1_bin) union select * from v1;
+charset(2 / 3 COLLATE latin1_bin) charset(2 / (3 COLLATE latin1_bin)) charset((2 / 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 / 3 IN (0,1), 2 / (3 IN (0,1)), (2 / 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 in (0,1) AS `2 / 3 IN (0,1)`,2 / (3 in (0,1)) AS `2 / (3 IN (0,1))`,2 / 3 in (0,1) AS `(2 / 3) IN (0,1)`
+select 2 / 3 IN (0,1), 2 / (3 IN (0,1)), (2 / 3) IN (0,1) union select * from v1;
+2 / 3 IN (0,1) 2 / (3 IN (0,1)) (2 / 3) IN (0,1)
+0 NULL 0
+create or replace view v1 as select 2 / 3 OR 3, 2 / (3 OR 3), (2 / 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 or 3 AS `2 / 3 OR 3`,2 / (3 or 3) AS `2 / (3 OR 3)`,2 / 3 or 3 AS `(2 / 3) OR 3`
+select 2 / 3 OR 3, 2 / (3 OR 3), (2 / 3) OR 3 union select * from v1;
+2 / 3 OR 3 2 / (3 OR 3) (2 / 3) OR 3
+1 2.0000 1
+create or replace view v1 as select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 or 3 AS `2 / 3 || 3`,2 / (3 or 3) AS `2 / (3 || 3)`,2 / 3 or 3 AS `(2 / 3) || 3`
+select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3 union select * from v1;
+2 / 3 || 3 2 / (3 || 3) (2 / 3) || 3
+1 2.0000 1
+create or replace view v1 as select 2 / 3 XOR 3, 2 / (3 XOR 3), (2 / 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 xor 3 AS `2 / 3 XOR 3`,2 / (3 xor 3) AS `2 / (3 XOR 3)`,2 / 3 xor 3 AS `(2 / 3) XOR 3`
+select 2 / 3 XOR 3, 2 / (3 XOR 3), (2 / 3) XOR 3 union select * from v1;
+2 / 3 XOR 3 2 / (3 XOR 3) (2 / 3) XOR 3
+0 NULL 0
+create or replace view v1 as select 2 / 3 AND 3, 2 / (3 AND 3), (2 / 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 and 3 AS `2 / 3 AND 3`,2 / (3 and 3) AS `2 / (3 AND 3)`,2 / 3 and 3 AS `(2 / 3) AND 3`
+select 2 / 3 AND 3, 2 / (3 AND 3), (2 / 3) AND 3 union select * from v1;
+2 / 3 AND 3 2 / (3 AND 3) (2 / 3) AND 3
+1 2.0000 1
+create or replace view v1 as select 2 / 3 && 3, 2 / (3 && 3), (2 / 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 and 3 AS `2 / 3 && 3`,2 / (3 and 3) AS `2 / (3 && 3)`,2 / 3 and 3 AS `(2 / 3) && 3`
+select 2 / 3 && 3, 2 / (3 && 3), (2 / 3) && 3 union select * from v1;
+2 / 3 && 3 2 / (3 && 3) (2 / 3) && 3
+1 2.0000 1
+create or replace view v1 as select 2 / 3 = 3, 2 / (3 = 3), (2 / 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 = 3 AS `2 / 3 = 3`,2 / (3 = 3) AS `2 / (3 = 3)`,2 / 3 = 3 AS `(2 / 3) = 3`
+select 2 / 3 = 3, 2 / (3 = 3), (2 / 3) = 3 union select * from v1;
+2 / 3 = 3 2 / (3 = 3) (2 / 3) = 3
+0 2.0000 0
+create or replace view v1 as select 2 / 3 <=> 3, 2 / (3 <=> 3), (2 / 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 <=> 3 AS `2 / 3 <=> 3`,2 / (3 <=> 3) AS `2 / (3 <=> 3)`,2 / 3 <=> 3 AS `(2 / 3) <=> 3`
+select 2 / 3 <=> 3, 2 / (3 <=> 3), (2 / 3) <=> 3 union select * from v1;
+2 / 3 <=> 3 2 / (3 <=> 3) (2 / 3) <=> 3
+0 2.0000 0
+create or replace view v1 as select 2 / 3 >= 3, 2 / (3 >= 3), (2 / 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 >= 3 AS `2 / 3 >= 3`,2 / (3 >= 3) AS `2 / (3 >= 3)`,2 / 3 >= 3 AS `(2 / 3) >= 3`
+select 2 / 3 >= 3, 2 / (3 >= 3), (2 / 3) >= 3 union select * from v1;
+2 / 3 >= 3 2 / (3 >= 3) (2 / 3) >= 3
+0 2.0000 0
+create or replace view v1 as select 2 / 3 <= 3, 2 / (3 <= 3), (2 / 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 <= 3 AS `2 / 3 <= 3`,2 / (3 <= 3) AS `2 / (3 <= 3)`,2 / 3 <= 3 AS `(2 / 3) <= 3`
+select 2 / 3 <= 3, 2 / (3 <= 3), (2 / 3) <= 3 union select * from v1;
+2 / 3 <= 3 2 / (3 <= 3) (2 / 3) <= 3
+1 2.0000 1
+create or replace view v1 as select 2 / 3 < 3, 2 / (3 < 3), (2 / 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 < 3 AS `2 / 3 < 3`,2 / (3 < 3) AS `2 / (3 < 3)`,2 / 3 < 3 AS `(2 / 3) < 3`
+select 2 / 3 < 3, 2 / (3 < 3), (2 / 3) < 3 union select * from v1;
+2 / 3 < 3 2 / (3 < 3) (2 / 3) < 3
+1 NULL 1
+create or replace view v1 as select 2 / 3 <> 3, 2 / (3 <> 3), (2 / 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 <> 3 AS `2 / 3 <> 3`,2 / (3 <> 3) AS `2 / (3 <> 3)`,2 / 3 <> 3 AS `(2 / 3) <> 3`
+select 2 / 3 <> 3, 2 / (3 <> 3), (2 / 3) <> 3 union select * from v1;
+2 / 3 <> 3 2 / (3 <> 3) (2 / 3) <> 3
+1 NULL 1
+create or replace view v1 as select 2 / 3 > 3, 2 / (3 > 3), (2 / 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 > 3 AS `2 / 3 > 3`,2 / (3 > 3) AS `2 / (3 > 3)`,2 / 3 > 3 AS `(2 / 3) > 3`
+select 2 / 3 > 3, 2 / (3 > 3), (2 / 3) > 3 union select * from v1;
+2 / 3 > 3 2 / (3 > 3) (2 / 3) > 3
+0 NULL 0
+create or replace view v1 as select 2 / 3 != 3, 2 / (3 != 3), (2 / 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 <> 3 AS `2 / 3 != 3`,2 / (3 <> 3) AS `2 / (3 != 3)`,2 / 3 <> 3 AS `(2 / 3) != 3`
+select 2 / 3 != 3, 2 / (3 != 3), (2 / 3) != 3 union select * from v1;
+2 / 3 != 3 2 / (3 != 3) (2 / 3) != 3
+1 NULL 1
+create or replace view v1 as select 2 / 3 LIKE 3, 2 / (3 LIKE 3), (2 / 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 like 3 AS `2 / 3 LIKE 3`,2 / (3 like 3) AS `2 / (3 LIKE 3)`,2 / 3 like 3 AS `(2 / 3) LIKE 3`
+select 2 / 3 LIKE 3, 2 / (3 LIKE 3), (2 / 3) LIKE 3 union select * from v1;
+2 / 3 LIKE 3 2 / (3 LIKE 3) (2 / 3) LIKE 3
+0 2.0000 0
+create or replace view v1 as select 2 / 3 REGEXP 3, 2 / (3 REGEXP 3), (2 / 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 regexp 3 AS `2 / 3 REGEXP 3`,2 / (3 regexp 3) AS `2 / (3 REGEXP 3)`,2 / 3 regexp 3 AS `(2 / 3) REGEXP 3`
+select 2 / 3 REGEXP 3, 2 / (3 REGEXP 3), (2 / 3) REGEXP 3 union select * from v1;
+2 / 3 REGEXP 3 2 / (3 REGEXP 3) (2 / 3) REGEXP 3
+0 2.0000 0
+create or replace view v1 as select 2 / 3 | 3, 2 / (3 | 3), (2 / 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 | 3 AS `2 / 3 | 3`,2 / (3 | 3) AS `2 / (3 | 3)`,2 / 3 | 3 AS `(2 / 3) | 3`
+select 2 / 3 | 3, 2 / (3 | 3), (2 / 3) | 3 union select * from v1;
+2 / 3 | 3 2 / (3 | 3) (2 / 3) | 3
+3 0.6667 3
+create or replace view v1 as select 2 / 3 & 3, 2 / (3 & 3), (2 / 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 & 3 AS `2 / 3 & 3`,2 / (3 & 3) AS `2 / (3 & 3)`,2 / 3 & 3 AS `(2 / 3) & 3`
+select 2 / 3 & 3, 2 / (3 & 3), (2 / 3) & 3 union select * from v1;
+2 / 3 & 3 2 / (3 & 3) (2 / 3) & 3
+1 0.6667 1
+create or replace view v1 as select 2 / 3 << 3, 2 / (3 << 3), (2 / 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 << 3 AS `2 / 3 << 3`,2 / (3 << 3) AS `2 / (3 << 3)`,2 / 3 << 3 AS `(2 / 3) << 3`
+select 2 / 3 << 3, 2 / (3 << 3), (2 / 3) << 3 union select * from v1;
+2 / 3 << 3 2 / (3 << 3) (2 / 3) << 3
+8 0.0833 8
+create or replace view v1 as select 2 / 3 >> 3, 2 / (3 >> 3), (2 / 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 >> 3 AS `2 / 3 >> 3`,2 / (3 >> 3) AS `2 / (3 >> 3)`,2 / 3 >> 3 AS `(2 / 3) >> 3`
+select 2 / 3 >> 3, 2 / (3 >> 3), (2 / 3) >> 3 union select * from v1;
+2 / 3 >> 3 2 / (3 >> 3) (2 / 3) >> 3
+0 NULL 0
+create or replace view v1 as select 2 / '2000-01-01' +INTERVAL 1 DAY, 2 / ('2000-01-01' +INTERVAL 1 DAY), (2 / '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / '2000-01-01' + interval 1 day AS `2 / '2000-01-01' +INTERVAL 1 DAY`,2 / ('2000-01-01' + interval 1 day) AS `2 / ('2000-01-01' +INTERVAL 1 DAY)`,2 / '2000-01-01' + interval 1 day AS `(2 / '2000-01-01') +INTERVAL 1 DAY`
+select 2 / '2000-01-01' +INTERVAL 1 DAY, 2 / ('2000-01-01' +INTERVAL 1 DAY), (2 / '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 / '2000-01-01' +INTERVAL 1 DAY 2 / ('2000-01-01' +INTERVAL 1 DAY) (2 / '2000-01-01') +INTERVAL 1 DAY
+NULL 0.0000 NULL
+create or replace view v1 as select 2 / 3 + 3, 2 / (3 + 3), (2 / 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 + 3 AS `2 / 3 + 3`,2 / (3 + 3) AS `2 / (3 + 3)`,2 / 3 + 3 AS `(2 / 3) + 3`
+select 2 / 3 + 3, 2 / (3 + 3), (2 / 3) + 3 union select * from v1;
+2 / 3 + 3 2 / (3 + 3) (2 / 3) + 3
+3.6667 0.3333 3.6667
+create or replace view v1 as select 2 / 3 - 3, 2 / (3 - 3), (2 / 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 - 3 AS `2 / 3 - 3`,2 / (3 - 3) AS `2 / (3 - 3)`,2 / 3 - 3 AS `(2 / 3) - 3`
+select 2 / 3 - 3, 2 / (3 - 3), (2 / 3) - 3 union select * from v1;
+2 / 3 - 3 2 / (3 - 3) (2 / 3) - 3
+-2.3333 NULL -2.3333
+create or replace view v1 as select 2 / 3 * 3, 2 / (3 * 3), (2 / 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 * 3 AS `2 / 3 * 3`,2 / (3 * 3) AS `2 / (3 * 3)`,2 / 3 * 3 AS `(2 / 3) * 3`
+select 2 / 3 * 3, 2 / (3 * 3), (2 / 3) * 3 union select * from v1;
+2 / 3 * 3 2 / (3 * 3) (2 / 3) * 3
+2.0001 0.2222 2.0001
+create or replace view v1 as select 2 / 3 / 3, 2 / (3 / 3), (2 / 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 / 3 AS `2 / 3 / 3`,2 / (3 / 3) AS `2 / (3 / 3)`,2 / 3 / 3 AS `(2 / 3) / 3`
+select 2 / 3 / 3, 2 / (3 / 3), (2 / 3) / 3 union select * from v1;
+2 / 3 / 3 2 / (3 / 3) (2 / 3) / 3
+0.22223333 2.0000 0.22223333
+create or replace view v1 as select 2 / 3 DIV 3, 2 / (3 DIV 3), (2 / 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 DIV 3 AS `2 / 3 DIV 3`,2 / (3 DIV 3) AS `2 / (3 DIV 3)`,2 / 3 DIV 3 AS `(2 / 3) DIV 3`
+select 2 / 3 DIV 3, 2 / (3 DIV 3), (2 / 3) DIV 3 union select * from v1;
+2 / 3 DIV 3 2 / (3 DIV 3) (2 / 3) DIV 3
+0 2.0000 0
+create or replace view v1 as select 2 / 3 MOD 3, 2 / (3 MOD 3), (2 / 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 MOD 3 AS `2 / 3 MOD 3`,2 / (3 MOD 3) AS `2 / (3 MOD 3)`,2 / 3 MOD 3 AS `(2 / 3) MOD 3`
+select 2 / 3 MOD 3, 2 / (3 MOD 3), (2 / 3) MOD 3 union select * from v1;
+2 / 3 MOD 3 2 / (3 MOD 3) (2 / 3) MOD 3
+0.6667 NULL 0.6667
+create or replace view v1 as select 2 / 3 % 3, 2 / (3 % 3), (2 / 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 MOD 3 AS `2 / 3 % 3`,2 / (3 MOD 3) AS `2 / (3 % 3)`,2 / 3 MOD 3 AS `(2 / 3) % 3`
+select 2 / 3 % 3, 2 / (3 % 3), (2 / 3) % 3 union select * from v1;
+2 / 3 % 3 2 / (3 % 3) (2 / 3) % 3
+0.6667 NULL 0.6667
+create or replace view v1 as select 2 / 3 ^ 3, 2 / (3 ^ 3), (2 / 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 ^ 3 AS `2 / 3 ^ 3`,2 / 3 ^ 3 AS `2 / (3 ^ 3)`,(2 / 3) ^ 3 AS `(2 / 3) ^ 3`
+select 2 / 3 ^ 3, 2 / (3 ^ 3), (2 / 3) ^ 3 union select * from v1;
+2 / 3 ^ 3 2 / (3 ^ 3) (2 / 3) ^ 3
+NULL NULL 2
+create or replace view v1 as select 2 / 3 BETWEEN 1 AND 3, 2 / (3 BETWEEN 1 AND 3), (2 / 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 between 1 and 3 AS `2 / 3 BETWEEN 1 AND 3`,2 / (3 between 1 and 3) AS `2 / (3 BETWEEN 1 AND 3)`,2 / 3 between 1 and 3 AS `(2 / 3) BETWEEN 1 AND 3`
+select 2 / 3 BETWEEN 1 AND 3, 2 / (3 BETWEEN 1 AND 3), (2 / 3) BETWEEN 1 AND 3 union select * from v1;
+2 / 3 BETWEEN 1 AND 3 2 / (3 BETWEEN 1 AND 3) (2 / 3) BETWEEN 1 AND 3
+0 2.0000 0
+create or replace view v1 as select 2 DIV 3 IS FALSE, 2 DIV (3 IS FALSE), (2 DIV 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 is false AS `2 DIV 3 IS FALSE`,2 DIV (3 is false) AS `2 DIV (3 IS FALSE)`,2 DIV 3 is false AS `(2 DIV 3) IS FALSE`
+select 2 DIV 3 IS FALSE, 2 DIV (3 IS FALSE), (2 DIV 3) IS FALSE union select * from v1;
+2 DIV 3 IS FALSE 2 DIV (3 IS FALSE) (2 DIV 3) IS FALSE
+1 NULL 1
+create or replace view v1 as select charset(2 DIV 3 COLLATE latin1_bin), charset(2 DIV (3 COLLATE latin1_bin)), charset((2 DIV 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 DIV 3 collate latin1_bin) AS `charset(2 DIV 3 COLLATE latin1_bin)`,charset(2 DIV 3 collate latin1_bin) AS `charset(2 DIV (3 COLLATE latin1_bin))`,charset((2 DIV 3) collate latin1_bin) AS `charset((2 DIV 3) COLLATE latin1_bin)`
+select charset(2 DIV 3 COLLATE latin1_bin), charset(2 DIV (3 COLLATE latin1_bin)), charset((2 DIV 3) COLLATE latin1_bin) union select * from v1;
+charset(2 DIV 3 COLLATE latin1_bin) charset(2 DIV (3 COLLATE latin1_bin)) charset((2 DIV 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 DIV 3 IN (0,1), 2 DIV (3 IN (0,1)), (2 DIV 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 in (0,1) AS `2 DIV 3 IN (0,1)`,2 DIV (3 in (0,1)) AS `2 DIV (3 IN (0,1))`,2 DIV 3 in (0,1) AS `(2 DIV 3) IN (0,1)`
+select 2 DIV 3 IN (0,1), 2 DIV (3 IN (0,1)), (2 DIV 3) IN (0,1) union select * from v1;
+2 DIV 3 IN (0,1) 2 DIV (3 IN (0,1)) (2 DIV 3) IN (0,1)
+1 NULL 1
+create or replace view v1 as select 2 DIV 3 OR 3, 2 DIV (3 OR 3), (2 DIV 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 or 3 AS `2 DIV 3 OR 3`,2 DIV (3 or 3) AS `2 DIV (3 OR 3)`,2 DIV 3 or 3 AS `(2 DIV 3) OR 3`
+select 2 DIV 3 OR 3, 2 DIV (3 OR 3), (2 DIV 3) OR 3 union select * from v1;
+2 DIV 3 OR 3 2 DIV (3 OR 3) (2 DIV 3) OR 3
+1 2 1
+create or replace view v1 as select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 or 3 AS `2 DIV 3 || 3`,2 DIV (3 or 3) AS `2 DIV (3 || 3)`,2 DIV 3 or 3 AS `(2 DIV 3) || 3`
+select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3 union select * from v1;
+2 DIV 3 || 3 2 DIV (3 || 3) (2 DIV 3) || 3
+1 2 1
+create or replace view v1 as select 2 DIV 3 XOR 3, 2 DIV (3 XOR 3), (2 DIV 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 xor 3 AS `2 DIV 3 XOR 3`,2 DIV (3 xor 3) AS `2 DIV (3 XOR 3)`,2 DIV 3 xor 3 AS `(2 DIV 3) XOR 3`
+select 2 DIV 3 XOR 3, 2 DIV (3 XOR 3), (2 DIV 3) XOR 3 union select * from v1;
+2 DIV 3 XOR 3 2 DIV (3 XOR 3) (2 DIV 3) XOR 3
+1 NULL 1
+create or replace view v1 as select 2 DIV 3 AND 3, 2 DIV (3 AND 3), (2 DIV 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 and 3 AS `2 DIV 3 AND 3`,2 DIV (3 and 3) AS `2 DIV (3 AND 3)`,2 DIV 3 and 3 AS `(2 DIV 3) AND 3`
+select 2 DIV 3 AND 3, 2 DIV (3 AND 3), (2 DIV 3) AND 3 union select * from v1;
+2 DIV 3 AND 3 2 DIV (3 AND 3) (2 DIV 3) AND 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 && 3, 2 DIV (3 && 3), (2 DIV 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 and 3 AS `2 DIV 3 && 3`,2 DIV (3 and 3) AS `2 DIV (3 && 3)`,2 DIV 3 and 3 AS `(2 DIV 3) && 3`
+select 2 DIV 3 && 3, 2 DIV (3 && 3), (2 DIV 3) && 3 union select * from v1;
+2 DIV 3 && 3 2 DIV (3 && 3) (2 DIV 3) && 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 = 3, 2 DIV (3 = 3), (2 DIV 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 = 3 AS `2 DIV 3 = 3`,2 DIV (3 = 3) AS `2 DIV (3 = 3)`,2 DIV 3 = 3 AS `(2 DIV 3) = 3`
+select 2 DIV 3 = 3, 2 DIV (3 = 3), (2 DIV 3) = 3 union select * from v1;
+2 DIV 3 = 3 2 DIV (3 = 3) (2 DIV 3) = 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 <=> 3, 2 DIV (3 <=> 3), (2 DIV 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 <=> 3 AS `2 DIV 3 <=> 3`,2 DIV (3 <=> 3) AS `2 DIV (3 <=> 3)`,2 DIV 3 <=> 3 AS `(2 DIV 3) <=> 3`
+select 2 DIV 3 <=> 3, 2 DIV (3 <=> 3), (2 DIV 3) <=> 3 union select * from v1;
+2 DIV 3 <=> 3 2 DIV (3 <=> 3) (2 DIV 3) <=> 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 >= 3, 2 DIV (3 >= 3), (2 DIV 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 >= 3 AS `2 DIV 3 >= 3`,2 DIV (3 >= 3) AS `2 DIV (3 >= 3)`,2 DIV 3 >= 3 AS `(2 DIV 3) >= 3`
+select 2 DIV 3 >= 3, 2 DIV (3 >= 3), (2 DIV 3) >= 3 union select * from v1;
+2 DIV 3 >= 3 2 DIV (3 >= 3) (2 DIV 3) >= 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 <= 3, 2 DIV (3 <= 3), (2 DIV 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 <= 3 AS `2 DIV 3 <= 3`,2 DIV (3 <= 3) AS `2 DIV (3 <= 3)`,2 DIV 3 <= 3 AS `(2 DIV 3) <= 3`
+select 2 DIV 3 <= 3, 2 DIV (3 <= 3), (2 DIV 3) <= 3 union select * from v1;
+2 DIV 3 <= 3 2 DIV (3 <= 3) (2 DIV 3) <= 3
+1 2 1
+create or replace view v1 as select 2 DIV 3 < 3, 2 DIV (3 < 3), (2 DIV 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 < 3 AS `2 DIV 3 < 3`,2 DIV (3 < 3) AS `2 DIV (3 < 3)`,2 DIV 3 < 3 AS `(2 DIV 3) < 3`
+select 2 DIV 3 < 3, 2 DIV (3 < 3), (2 DIV 3) < 3 union select * from v1;
+2 DIV 3 < 3 2 DIV (3 < 3) (2 DIV 3) < 3
+1 NULL 1
+create or replace view v1 as select 2 DIV 3 <> 3, 2 DIV (3 <> 3), (2 DIV 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 <> 3 AS `2 DIV 3 <> 3`,2 DIV (3 <> 3) AS `2 DIV (3 <> 3)`,2 DIV 3 <> 3 AS `(2 DIV 3) <> 3`
+select 2 DIV 3 <> 3, 2 DIV (3 <> 3), (2 DIV 3) <> 3 union select * from v1;
+2 DIV 3 <> 3 2 DIV (3 <> 3) (2 DIV 3) <> 3
+1 NULL 1
+create or replace view v1 as select 2 DIV 3 > 3, 2 DIV (3 > 3), (2 DIV 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 > 3 AS `2 DIV 3 > 3`,2 DIV (3 > 3) AS `2 DIV (3 > 3)`,2 DIV 3 > 3 AS `(2 DIV 3) > 3`
+select 2 DIV 3 > 3, 2 DIV (3 > 3), (2 DIV 3) > 3 union select * from v1;
+2 DIV 3 > 3 2 DIV (3 > 3) (2 DIV 3) > 3
+0 NULL 0
+create or replace view v1 as select 2 DIV 3 != 3, 2 DIV (3 != 3), (2 DIV 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 <> 3 AS `2 DIV 3 != 3`,2 DIV (3 <> 3) AS `2 DIV (3 != 3)`,2 DIV 3 <> 3 AS `(2 DIV 3) != 3`
+select 2 DIV 3 != 3, 2 DIV (3 != 3), (2 DIV 3) != 3 union select * from v1;
+2 DIV 3 != 3 2 DIV (3 != 3) (2 DIV 3) != 3
+1 NULL 1
+create or replace view v1 as select 2 DIV 3 LIKE 3, 2 DIV (3 LIKE 3), (2 DIV 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 like 3 AS `2 DIV 3 LIKE 3`,2 DIV (3 like 3) AS `2 DIV (3 LIKE 3)`,2 DIV 3 like 3 AS `(2 DIV 3) LIKE 3`
+select 2 DIV 3 LIKE 3, 2 DIV (3 LIKE 3), (2 DIV 3) LIKE 3 union select * from v1;
+2 DIV 3 LIKE 3 2 DIV (3 LIKE 3) (2 DIV 3) LIKE 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 REGEXP 3, 2 DIV (3 REGEXP 3), (2 DIV 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 regexp 3 AS `2 DIV 3 REGEXP 3`,2 DIV (3 regexp 3) AS `2 DIV (3 REGEXP 3)`,2 DIV 3 regexp 3 AS `(2 DIV 3) REGEXP 3`
+select 2 DIV 3 REGEXP 3, 2 DIV (3 REGEXP 3), (2 DIV 3) REGEXP 3 union select * from v1;
+2 DIV 3 REGEXP 3 2 DIV (3 REGEXP 3) (2 DIV 3) REGEXP 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 | 3, 2 DIV (3 | 3), (2 DIV 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 | 3 AS `2 DIV 3 | 3`,2 DIV (3 | 3) AS `2 DIV (3 | 3)`,2 DIV 3 | 3 AS `(2 DIV 3) | 3`
+select 2 DIV 3 | 3, 2 DIV (3 | 3), (2 DIV 3) | 3 union select * from v1;
+2 DIV 3 | 3 2 DIV (3 | 3) (2 DIV 3) | 3
+3 0 3
+create or replace view v1 as select 2 DIV 3 & 1, 2 DIV (3 & 1), (2 DIV 3) & 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 & 1 AS `2 DIV 3 & 1`,2 DIV (3 & 1) AS `2 DIV (3 & 1)`,2 DIV 3 & 1 AS `(2 DIV 3) & 1`
+select 2 DIV 3 & 1, 2 DIV (3 & 1), (2 DIV 3) & 1 union select * from v1;
+2 DIV 3 & 1 2 DIV (3 & 1) (2 DIV 3) & 1
+0 2 0
+create or replace view v1 as select 4 DIV 3 << 3, 4 DIV (3 << 3), (4 DIV 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 DIV 3 << 3 AS `4 DIV 3 << 3`,4 DIV (3 << 3) AS `4 DIV (3 << 3)`,4 DIV 3 << 3 AS `(4 DIV 3) << 3`
+select 4 DIV 3 << 3, 4 DIV (3 << 3), (4 DIV 3) << 3 union select * from v1;
+4 DIV 3 << 3 4 DIV (3 << 3) (4 DIV 3) << 3
+8 0 8
+create or replace view v1 as select 2 DIV 3 >> 3, 2 DIV (3 >> 3), (2 DIV 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 >> 3 AS `2 DIV 3 >> 3`,2 DIV (3 >> 3) AS `2 DIV (3 >> 3)`,2 DIV 3 >> 3 AS `(2 DIV 3) >> 3`
+select 2 DIV 3 >> 3, 2 DIV (3 >> 3), (2 DIV 3) >> 3 union select * from v1;
+2 DIV 3 >> 3 2 DIV (3 >> 3) (2 DIV 3) >> 3
+0 NULL 0
+create or replace view v1 as select 2 DIV '2000-01-01' +INTERVAL 1 DAY, 2 DIV ('2000-01-01' +INTERVAL 1 DAY), (2 DIV '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV '2000-01-01' + interval 1 day AS `2 DIV '2000-01-01' +INTERVAL 1 DAY`,2 DIV ('2000-01-01' + interval 1 day) AS `2 DIV ('2000-01-01' +INTERVAL 1 DAY)`,2 DIV '2000-01-01' + interval 1 day AS `(2 DIV '2000-01-01') +INTERVAL 1 DAY`
+select 2 DIV '2000-01-01' +INTERVAL 1 DAY, 2 DIV ('2000-01-01' +INTERVAL 1 DAY), (2 DIV '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 DIV '2000-01-01' +INTERVAL 1 DAY 2 DIV ('2000-01-01' +INTERVAL 1 DAY) (2 DIV '2000-01-01') +INTERVAL 1 DAY
+NULL 0 NULL
+create or replace view v1 as select 2 DIV 3 + 3, 2 DIV (3 + 3), (2 DIV 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 + 3 AS `2 DIV 3 + 3`,2 DIV (3 + 3) AS `2 DIV (3 + 3)`,2 DIV 3 + 3 AS `(2 DIV 3) + 3`
+select 2 DIV 3 + 3, 2 DIV (3 + 3), (2 DIV 3) + 3 union select * from v1;
+2 DIV 3 + 3 2 DIV (3 + 3) (2 DIV 3) + 3
+3 0 3
+create or replace view v1 as select 2 DIV 3 - 3, 2 DIV (3 - 3), (2 DIV 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 - 3 AS `2 DIV 3 - 3`,2 DIV (3 - 3) AS `2 DIV (3 - 3)`,2 DIV 3 - 3 AS `(2 DIV 3) - 3`
+select 2 DIV 3 - 3, 2 DIV (3 - 3), (2 DIV 3) - 3 union select * from v1;
+2 DIV 3 - 3 2 DIV (3 - 3) (2 DIV 3) - 3
+-3 NULL -3
+create or replace view v1 as select 4 DIV 3 * 3, 4 DIV (3 * 3), (4 DIV 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 4 DIV 3 * 3 AS `4 DIV 3 * 3`,4 DIV (3 * 3) AS `4 DIV (3 * 3)`,4 DIV 3 * 3 AS `(4 DIV 3) * 3`
+select 4 DIV 3 * 3, 4 DIV (3 * 3), (4 DIV 3) * 3 union select * from v1;
+4 DIV 3 * 3 4 DIV (3 * 3) (4 DIV 3) * 3
+3 0 3
+create or replace view v1 as select 2 DIV 3 / 3, 2 DIV (3 / 3), (2 DIV 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 / 3 AS `2 DIV 3 / 3`,2 DIV (3 / 3) AS `2 DIV (3 / 3)`,2 DIV 3 / 3 AS `(2 DIV 3) / 3`
+select 2 DIV 3 / 3, 2 DIV (3 / 3), (2 DIV 3) / 3 union select * from v1;
+2 DIV 3 / 3 2 DIV (3 / 3) (2 DIV 3) / 3
+0.0000 2 0.0000
+create or replace view v1 as select 2 DIV 3 DIV 3, 2 DIV (3 DIV 3), (2 DIV 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 DIV 3 AS `2 DIV 3 DIV 3`,2 DIV (3 DIV 3) AS `2 DIV (3 DIV 3)`,2 DIV 3 DIV 3 AS `(2 DIV 3) DIV 3`
+select 2 DIV 3 DIV 3, 2 DIV (3 DIV 3), (2 DIV 3) DIV 3 union select * from v1;
+2 DIV 3 DIV 3 2 DIV (3 DIV 3) (2 DIV 3) DIV 3
+0 2 0
+create or replace view v1 as select 2 DIV 3 MOD 3, 2 DIV (3 MOD 3), (2 DIV 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 MOD 3 AS `2 DIV 3 MOD 3`,2 DIV (3 MOD 3) AS `2 DIV (3 MOD 3)`,2 DIV 3 MOD 3 AS `(2 DIV 3) MOD 3`
+select 2 DIV 3 MOD 3, 2 DIV (3 MOD 3), (2 DIV 3) MOD 3 union select * from v1;
+2 DIV 3 MOD 3 2 DIV (3 MOD 3) (2 DIV 3) MOD 3
+0 NULL 0
+create or replace view v1 as select 2 DIV 3 % 3, 2 DIV (3 % 3), (2 DIV 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 MOD 3 AS `2 DIV 3 % 3`,2 DIV (3 MOD 3) AS `2 DIV (3 % 3)`,2 DIV 3 MOD 3 AS `(2 DIV 3) % 3`
+select 2 DIV 3 % 3, 2 DIV (3 % 3), (2 DIV 3) % 3 union select * from v1;
+2 DIV 3 % 3 2 DIV (3 % 3) (2 DIV 3) % 3
+0 NULL 0
+create or replace view v1 as select 2 DIV 3 ^ 3, 2 DIV (3 ^ 3), (2 DIV 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 ^ 3 AS `2 DIV 3 ^ 3`,2 DIV 3 ^ 3 AS `2 DIV (3 ^ 3)`,(2 DIV 3) ^ 3 AS `(2 DIV 3) ^ 3`
+select 2 DIV 3 ^ 3, 2 DIV (3 ^ 3), (2 DIV 3) ^ 3 union select * from v1;
+2 DIV 3 ^ 3 2 DIV (3 ^ 3) (2 DIV 3) ^ 3
+NULL NULL 3
+create or replace view v1 as select 2 DIV 3 BETWEEN 1 AND 3, 2 DIV (3 BETWEEN 1 AND 3), (2 DIV 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 between 1 and 3 AS `2 DIV 3 BETWEEN 1 AND 3`,2 DIV (3 between 1 and 3) AS `2 DIV (3 BETWEEN 1 AND 3)`,2 DIV 3 between 1 and 3 AS `(2 DIV 3) BETWEEN 1 AND 3`
+select 2 DIV 3 BETWEEN 1 AND 3, 2 DIV (3 BETWEEN 1 AND 3), (2 DIV 3) BETWEEN 1 AND 3 union select * from v1;
+2 DIV 3 BETWEEN 1 AND 3 2 DIV (3 BETWEEN 1 AND 3) (2 DIV 3) BETWEEN 1 AND 3
+0 2 0
+create or replace view v1 as select 2 MOD 3 IS FALSE, 2 MOD (3 IS FALSE), (2 MOD 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 is false AS `2 MOD 3 IS FALSE`,2 MOD (3 is false) AS `2 MOD (3 IS FALSE)`,2 MOD 3 is false AS `(2 MOD 3) IS FALSE`
+select 2 MOD 3 IS FALSE, 2 MOD (3 IS FALSE), (2 MOD 3) IS FALSE union select * from v1;
+2 MOD 3 IS FALSE 2 MOD (3 IS FALSE) (2 MOD 3) IS FALSE
+0 NULL 0
+create or replace view v1 as select charset(2 MOD 3 COLLATE latin1_bin), charset(2 MOD (3 COLLATE latin1_bin)), charset((2 MOD 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 MOD 3 collate latin1_bin) AS `charset(2 MOD 3 COLLATE latin1_bin)`,charset(2 MOD 3 collate latin1_bin) AS `charset(2 MOD (3 COLLATE latin1_bin))`,charset((2 MOD 3) collate latin1_bin) AS `charset((2 MOD 3) COLLATE latin1_bin)`
+select charset(2 MOD 3 COLLATE latin1_bin), charset(2 MOD (3 COLLATE latin1_bin)), charset((2 MOD 3) COLLATE latin1_bin) union select * from v1;
+charset(2 MOD 3 COLLATE latin1_bin) charset(2 MOD (3 COLLATE latin1_bin)) charset((2 MOD 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 MOD 3 IN (0,1), 2 MOD (3 IN (0,1)), (2 MOD 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 in (0,1) AS `2 MOD 3 IN (0,1)`,2 MOD (3 in (0,1)) AS `2 MOD (3 IN (0,1))`,2 MOD 3 in (0,1) AS `(2 MOD 3) IN (0,1)`
+select 2 MOD 3 IN (0,1), 2 MOD (3 IN (0,1)), (2 MOD 3) IN (0,1) union select * from v1;
+2 MOD 3 IN (0,1) 2 MOD (3 IN (0,1)) (2 MOD 3) IN (0,1)
+0 NULL 0
+create or replace view v1 as select 2 MOD 3 OR 3, 2 MOD (3 OR 3), (2 MOD 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 or 3 AS `2 MOD 3 OR 3`,2 MOD (3 or 3) AS `2 MOD (3 OR 3)`,2 MOD 3 or 3 AS `(2 MOD 3) OR 3`
+select 2 MOD 3 OR 3, 2 MOD (3 OR 3), (2 MOD 3) OR 3 union select * from v1;
+2 MOD 3 OR 3 2 MOD (3 OR 3) (2 MOD 3) OR 3
+1 0 1
+create or replace view v1 as select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 or 3 AS `2 MOD 3 || 3`,2 MOD (3 or 3) AS `2 MOD (3 || 3)`,2 MOD 3 or 3 AS `(2 MOD 3) || 3`
+select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3 union select * from v1;
+2 MOD 3 || 3 2 MOD (3 || 3) (2 MOD 3) || 3
+1 0 1
+create or replace view v1 as select 2 MOD 3 XOR 3, 2 MOD (3 XOR 3), (2 MOD 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 xor 3 AS `2 MOD 3 XOR 3`,2 MOD (3 xor 3) AS `2 MOD (3 XOR 3)`,2 MOD 3 xor 3 AS `(2 MOD 3) XOR 3`
+select 2 MOD 3 XOR 3, 2 MOD (3 XOR 3), (2 MOD 3) XOR 3 union select * from v1;
+2 MOD 3 XOR 3 2 MOD (3 XOR 3) (2 MOD 3) XOR 3
+0 NULL 0
+create or replace view v1 as select 2 MOD 3 AND 3, 2 MOD (3 AND 3), (2 MOD 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 and 3 AS `2 MOD 3 AND 3`,2 MOD (3 and 3) AS `2 MOD (3 AND 3)`,2 MOD 3 and 3 AS `(2 MOD 3) AND 3`
+select 2 MOD 3 AND 3, 2 MOD (3 AND 3), (2 MOD 3) AND 3 union select * from v1;
+2 MOD 3 AND 3 2 MOD (3 AND 3) (2 MOD 3) AND 3
+1 0 1
+create or replace view v1 as select 2 MOD 3 && 3, 2 MOD (3 && 3), (2 MOD 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 and 3 AS `2 MOD 3 && 3`,2 MOD (3 and 3) AS `2 MOD (3 && 3)`,2 MOD 3 and 3 AS `(2 MOD 3) && 3`
+select 2 MOD 3 && 3, 2 MOD (3 && 3), (2 MOD 3) && 3 union select * from v1;
+2 MOD 3 && 3 2 MOD (3 && 3) (2 MOD 3) && 3
+1 0 1
+create or replace view v1 as select 2 MOD 3 = 2, 2 MOD (3 = 2), (2 MOD 3) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 = 2 AS `2 MOD 3 = 2`,2 MOD (3 = 2) AS `2 MOD (3 = 2)`,2 MOD 3 = 2 AS `(2 MOD 3) = 2`
+select 2 MOD 3 = 2, 2 MOD (3 = 2), (2 MOD 3) = 2 union select * from v1;
+2 MOD 3 = 2 2 MOD (3 = 2) (2 MOD 3) = 2
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 <=> 2, 2 MOD (3 <=> 2), (2 MOD 3) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <=> 2 AS `2 MOD 3 <=> 2`,2 MOD (3 <=> 2) AS `2 MOD (3 <=> 2)`,2 MOD 3 <=> 2 AS `(2 MOD 3) <=> 2`
+select 2 MOD 3 <=> 2, 2 MOD (3 <=> 2), (2 MOD 3) <=> 2 union select * from v1;
+2 MOD 3 <=> 2 2 MOD (3 <=> 2) (2 MOD 3) <=> 2
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 >= 1, 2 MOD (3 >= 1), (2 MOD 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 >= 1 AS `2 MOD 3 >= 1`,2 MOD (3 >= 1) AS `2 MOD (3 >= 1)`,2 MOD 3 >= 1 AS `(2 MOD 3) >= 1`
+select 2 MOD 3 >= 1, 2 MOD (3 >= 1), (2 MOD 3) >= 1 union select * from v1;
+2 MOD 3 >= 1 2 MOD (3 >= 1) (2 MOD 3) >= 1
+1 0 1
+create or replace view v1 as select 2 MOD 3 <= 3, 2 MOD (3 <= 3), (2 MOD 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <= 3 AS `2 MOD 3 <= 3`,2 MOD (3 <= 3) AS `2 MOD (3 <= 3)`,2 MOD 3 <= 3 AS `(2 MOD 3) <= 3`
+select 2 MOD 3 <= 3, 2 MOD (3 <= 3), (2 MOD 3) <= 3 union select * from v1;
+2 MOD 3 <= 3 2 MOD (3 <= 3) (2 MOD 3) <= 3
+1 0 1
+create or replace view v1 as select 2 MOD 3 < 3, 2 MOD (3 < 3), (2 MOD 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 < 3 AS `2 MOD 3 < 3`,2 MOD (3 < 3) AS `2 MOD (3 < 3)`,2 MOD 3 < 3 AS `(2 MOD 3) < 3`
+select 2 MOD 3 < 3, 2 MOD (3 < 3), (2 MOD 3) < 3 union select * from v1;
+2 MOD 3 < 3 2 MOD (3 < 3) (2 MOD 3) < 3
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 <> 3, 2 MOD (3 <> 3), (2 MOD 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <> 3 AS `2 MOD 3 <> 3`,2 MOD (3 <> 3) AS `2 MOD (3 <> 3)`,2 MOD 3 <> 3 AS `(2 MOD 3) <> 3`
+select 2 MOD 3 <> 3, 2 MOD (3 <> 3), (2 MOD 3) <> 3 union select * from v1;
+2 MOD 3 <> 3 2 MOD (3 <> 3) (2 MOD 3) <> 3
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 > 3, 2 MOD (3 > 3), (2 MOD 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 > 3 AS `2 MOD 3 > 3`,2 MOD (3 > 3) AS `2 MOD (3 > 3)`,2 MOD 3 > 3 AS `(2 MOD 3) > 3`
+select 2 MOD 3 > 3, 2 MOD (3 > 3), (2 MOD 3) > 3 union select * from v1;
+2 MOD 3 > 3 2 MOD (3 > 3) (2 MOD 3) > 3
+0 NULL 0
+create or replace view v1 as select 2 MOD 3 != 3, 2 MOD (3 != 3), (2 MOD 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <> 3 AS `2 MOD 3 != 3`,2 MOD (3 <> 3) AS `2 MOD (3 != 3)`,2 MOD 3 <> 3 AS `(2 MOD 3) != 3`
+select 2 MOD 3 != 3, 2 MOD (3 != 3), (2 MOD 3) != 3 union select * from v1;
+2 MOD 3 != 3 2 MOD (3 != 3) (2 MOD 3) != 3
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 LIKE 2, 2 MOD (3 LIKE 2), (2 MOD 3) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 like 2 AS `2 MOD 3 LIKE 2`,2 MOD (3 like 2) AS `2 MOD (3 LIKE 2)`,2 MOD 3 like 2 AS `(2 MOD 3) LIKE 2`
+select 2 MOD 3 LIKE 2, 2 MOD (3 LIKE 2), (2 MOD 3) LIKE 2 union select * from v1;
+2 MOD 3 LIKE 2 2 MOD (3 LIKE 2) (2 MOD 3) LIKE 2
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 REGEXP 2, 2 MOD (3 REGEXP 2), (2 MOD 3) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 regexp 2 AS `2 MOD 3 REGEXP 2`,2 MOD (3 regexp 2) AS `2 MOD (3 REGEXP 2)`,2 MOD 3 regexp 2 AS `(2 MOD 3) REGEXP 2`
+select 2 MOD 3 REGEXP 2, 2 MOD (3 REGEXP 2), (2 MOD 3) REGEXP 2 union select * from v1;
+2 MOD 3 REGEXP 2 2 MOD (3 REGEXP 2) (2 MOD 3) REGEXP 2
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 | 3, 2 MOD (3 | 3), (2 MOD 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 | 3 AS `2 MOD 3 | 3`,2 MOD (3 | 3) AS `2 MOD (3 | 3)`,2 MOD 3 | 3 AS `(2 MOD 3) | 3`
+select 2 MOD 3 | 3, 2 MOD (3 | 3), (2 MOD 3) | 3 union select * from v1;
+2 MOD 3 | 3 2 MOD (3 | 3) (2 MOD 3) | 3
+3 2 3
+create or replace view v1 as select 2 MOD 4 & 4, 2 MOD (4 & 4), (2 MOD 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 4 & 4 AS `2 MOD 4 & 4`,2 MOD (4 & 4) AS `2 MOD (4 & 4)`,2 MOD 4 & 4 AS `(2 MOD 4) & 4`
+select 2 MOD 4 & 4, 2 MOD (4 & 4), (2 MOD 4) & 4 union select * from v1;
+2 MOD 4 & 4 2 MOD (4 & 4) (2 MOD 4) & 4
+0 2 0
+create or replace view v1 as select 2 MOD 3 << 3, 2 MOD (3 << 3), (2 MOD 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 << 3 AS `2 MOD 3 << 3`,2 MOD (3 << 3) AS `2 MOD (3 << 3)`,2 MOD 3 << 3 AS `(2 MOD 3) << 3`
+select 2 MOD 3 << 3, 2 MOD (3 << 3), (2 MOD 3) << 3 union select * from v1;
+2 MOD 3 << 3 2 MOD (3 << 3) (2 MOD 3) << 3
+16 2 16
+create or replace view v1 as select 2 MOD 3 >> 3, 2 MOD (3 >> 3), (2 MOD 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 >> 3 AS `2 MOD 3 >> 3`,2 MOD (3 >> 3) AS `2 MOD (3 >> 3)`,2 MOD 3 >> 3 AS `(2 MOD 3) >> 3`
+select 2 MOD 3 >> 3, 2 MOD (3 >> 3), (2 MOD 3) >> 3 union select * from v1;
+2 MOD 3 >> 3 2 MOD (3 >> 3) (2 MOD 3) >> 3
+0 NULL 0
+create or replace view v1 as select 2 MOD '2000-01-01' +INTERVAL 1 DAY, 2 MOD ('2000-01-01' +INTERVAL 1 DAY), (2 MOD '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD '2000-01-01' + interval 1 day AS `2 MOD '2000-01-01' +INTERVAL 1 DAY`,2 MOD ('2000-01-01' + interval 1 day) AS `2 MOD ('2000-01-01' +INTERVAL 1 DAY)`,2 MOD '2000-01-01' + interval 1 day AS `(2 MOD '2000-01-01') +INTERVAL 1 DAY`
+select 2 MOD '2000-01-01' +INTERVAL 1 DAY, 2 MOD ('2000-01-01' +INTERVAL 1 DAY), (2 MOD '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 MOD '2000-01-01' +INTERVAL 1 DAY 2 MOD ('2000-01-01' +INTERVAL 1 DAY) (2 MOD '2000-01-01') +INTERVAL 1 DAY
+NULL 2 NULL
+create or replace view v1 as select 2 MOD 3 + 3, 2 MOD (3 + 3), (2 MOD 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 + 3 AS `2 MOD 3 + 3`,2 MOD (3 + 3) AS `2 MOD (3 + 3)`,2 MOD 3 + 3 AS `(2 MOD 3) + 3`
+select 2 MOD 3 + 3, 2 MOD (3 + 3), (2 MOD 3) + 3 union select * from v1;
+2 MOD 3 + 3 2 MOD (3 + 3) (2 MOD 3) + 3
+5 2 5
+create or replace view v1 as select 2 MOD 3 - 3, 2 MOD (3 - 3), (2 MOD 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 - 3 AS `2 MOD 3 - 3`,2 MOD (3 - 3) AS `2 MOD (3 - 3)`,2 MOD 3 - 3 AS `(2 MOD 3) - 3`
+select 2 MOD 3 - 3, 2 MOD (3 - 3), (2 MOD 3) - 3 union select * from v1;
+2 MOD 3 - 3 2 MOD (3 - 3) (2 MOD 3) - 3
+-1 NULL -1
+create or replace view v1 as select 2 MOD 3 * 3, 2 MOD (3 * 3), (2 MOD 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 * 3 AS `2 MOD 3 * 3`,2 MOD (3 * 3) AS `2 MOD (3 * 3)`,2 MOD 3 * 3 AS `(2 MOD 3) * 3`
+select 2 MOD 3 * 3, 2 MOD (3 * 3), (2 MOD 3) * 3 union select * from v1;
+2 MOD 3 * 3 2 MOD (3 * 3) (2 MOD 3) * 3
+6 2 6
+create or replace view v1 as select 2 MOD 3 / 3, 2 MOD (3 / 3), (2 MOD 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 / 3 AS `2 MOD 3 / 3`,2 MOD (3 / 3) AS `2 MOD (3 / 3)`,2 MOD 3 / 3 AS `(2 MOD 3) / 3`
+select 2 MOD 3 / 3, 2 MOD (3 / 3), (2 MOD 3) / 3 union select * from v1;
+2 MOD 3 / 3 2 MOD (3 / 3) (2 MOD 3) / 3
+0.6667 0.0000 0.6667
+create or replace view v1 as select 3 MOD 4 DIV 3, 3 MOD (4 DIV 3), (3 MOD 4) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 MOD 4 DIV 3 AS `3 MOD 4 DIV 3`,3 MOD (4 DIV 3) AS `3 MOD (4 DIV 3)`,3 MOD 4 DIV 3 AS `(3 MOD 4) DIV 3`
+select 3 MOD 4 DIV 3, 3 MOD (4 DIV 3), (3 MOD 4) DIV 3 union select * from v1;
+3 MOD 4 DIV 3 3 MOD (4 DIV 3) (3 MOD 4) DIV 3
+1 0 1
+create or replace view v1 as select 2 MOD 3 MOD 3, 2 MOD (3 MOD 3), (2 MOD 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 MOD 3 AS `2 MOD 3 MOD 3`,2 MOD (3 MOD 3) AS `2 MOD (3 MOD 3)`,2 MOD 3 MOD 3 AS `(2 MOD 3) MOD 3`
+select 2 MOD 3 MOD 3, 2 MOD (3 MOD 3), (2 MOD 3) MOD 3 union select * from v1;
+2 MOD 3 MOD 3 2 MOD (3 MOD 3) (2 MOD 3) MOD 3
+2 NULL 2
+create or replace view v1 as select 2 MOD 3 % 3, 2 MOD (3 % 3), (2 MOD 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 MOD 3 AS `2 MOD 3 % 3`,2 MOD (3 MOD 3) AS `2 MOD (3 % 3)`,2 MOD 3 MOD 3 AS `(2 MOD 3) % 3`
+select 2 MOD 3 % 3, 2 MOD (3 % 3), (2 MOD 3) % 3 union select * from v1;
+2 MOD 3 % 3 2 MOD (3 % 3) (2 MOD 3) % 3
+2 NULL 2
+create or replace view v1 as select 2 MOD 3 ^ 3, 2 MOD (3 ^ 3), (2 MOD 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 ^ 3 AS `2 MOD 3 ^ 3`,2 MOD 3 ^ 3 AS `2 MOD (3 ^ 3)`,(2 MOD 3) ^ 3 AS `(2 MOD 3) ^ 3`
+select 2 MOD 3 ^ 3, 2 MOD (3 ^ 3), (2 MOD 3) ^ 3 union select * from v1;
+2 MOD 3 ^ 3 2 MOD (3 ^ 3) (2 MOD 3) ^ 3
+NULL NULL 1
+create or replace view v1 as select 2 MOD 3 BETWEEN 1 AND 3, 2 MOD (3 BETWEEN 1 AND 3), (2 MOD 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 between 1 and 3 AS `2 MOD 3 BETWEEN 1 AND 3`,2 MOD (3 between 1 and 3) AS `2 MOD (3 BETWEEN 1 AND 3)`,2 MOD 3 between 1 and 3 AS `(2 MOD 3) BETWEEN 1 AND 3`
+select 2 MOD 3 BETWEEN 1 AND 3, 2 MOD (3 BETWEEN 1 AND 3), (2 MOD 3) BETWEEN 1 AND 3 union select * from v1;
+2 MOD 3 BETWEEN 1 AND 3 2 MOD (3 BETWEEN 1 AND 3) (2 MOD 3) BETWEEN 1 AND 3
+1 0 1
+create or replace view v1 as select 2 % 3 IS FALSE, 2 % (3 IS FALSE), (2 % 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 is false AS `2 % 3 IS FALSE`,2 MOD (3 is false) AS `2 % (3 IS FALSE)`,2 MOD 3 is false AS `(2 % 3) IS FALSE`
+select 2 % 3 IS FALSE, 2 % (3 IS FALSE), (2 % 3) IS FALSE union select * from v1;
+2 % 3 IS FALSE 2 % (3 IS FALSE) (2 % 3) IS FALSE
+0 NULL 0
+create or replace view v1 as select charset(2 % 3 COLLATE latin1_bin), charset(2 % (3 COLLATE latin1_bin)), charset((2 % 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 MOD 3 collate latin1_bin) AS `charset(2 % 3 COLLATE latin1_bin)`,charset(2 MOD 3 collate latin1_bin) AS `charset(2 % (3 COLLATE latin1_bin))`,charset((2 MOD 3) collate latin1_bin) AS `charset((2 % 3) COLLATE latin1_bin)`
+select charset(2 % 3 COLLATE latin1_bin), charset(2 % (3 COLLATE latin1_bin)), charset((2 % 3) COLLATE latin1_bin) union select * from v1;
+charset(2 % 3 COLLATE latin1_bin) charset(2 % (3 COLLATE latin1_bin)) charset((2 % 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 % 3 IN (0,1), 2 % (3 IN (0,1)), (2 % 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 in (0,1) AS `2 % 3 IN (0,1)`,2 MOD (3 in (0,1)) AS `2 % (3 IN (0,1))`,2 MOD 3 in (0,1) AS `(2 % 3) IN (0,1)`
+select 2 % 3 IN (0,1), 2 % (3 IN (0,1)), (2 % 3) IN (0,1) union select * from v1;
+2 % 3 IN (0,1) 2 % (3 IN (0,1)) (2 % 3) IN (0,1)
+0 NULL 0
+create or replace view v1 as select 2 % 3 OR 3, 2 % (3 OR 3), (2 % 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 or 3 AS `2 % 3 OR 3`,2 MOD (3 or 3) AS `2 % (3 OR 3)`,2 MOD 3 or 3 AS `(2 % 3) OR 3`
+select 2 % 3 OR 3, 2 % (3 OR 3), (2 % 3) OR 3 union select * from v1;
+2 % 3 OR 3 2 % (3 OR 3) (2 % 3) OR 3
+1 0 1
+create or replace view v1 as select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 or 3 AS `2 % 3 || 3`,2 MOD (3 or 3) AS `2 % (3 || 3)`,2 MOD 3 or 3 AS `(2 % 3) || 3`
+select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3 union select * from v1;
+2 % 3 || 3 2 % (3 || 3) (2 % 3) || 3
+1 0 1
+create or replace view v1 as select 2 % 3 XOR 3, 2 % (3 XOR 3), (2 % 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 xor 3 AS `2 % 3 XOR 3`,2 MOD (3 xor 3) AS `2 % (3 XOR 3)`,2 MOD 3 xor 3 AS `(2 % 3) XOR 3`
+select 2 % 3 XOR 3, 2 % (3 XOR 3), (2 % 3) XOR 3 union select * from v1;
+2 % 3 XOR 3 2 % (3 XOR 3) (2 % 3) XOR 3
+0 NULL 0
+create or replace view v1 as select 2 % 3 AND 3, 2 % (3 AND 3), (2 % 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 and 3 AS `2 % 3 AND 3`,2 MOD (3 and 3) AS `2 % (3 AND 3)`,2 MOD 3 and 3 AS `(2 % 3) AND 3`
+select 2 % 3 AND 3, 2 % (3 AND 3), (2 % 3) AND 3 union select * from v1;
+2 % 3 AND 3 2 % (3 AND 3) (2 % 3) AND 3
+1 0 1
+create or replace view v1 as select 2 % 3 && 3, 2 % (3 && 3), (2 % 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 and 3 AS `2 % 3 && 3`,2 MOD (3 and 3) AS `2 % (3 && 3)`,2 MOD 3 and 3 AS `(2 % 3) && 3`
+select 2 % 3 && 3, 2 % (3 && 3), (2 % 3) && 3 union select * from v1;
+2 % 3 && 3 2 % (3 && 3) (2 % 3) && 3
+1 0 1
+create or replace view v1 as select 2 % 3 = 2, 2 % (3 = 2), (2 % 3) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 = 2 AS `2 % 3 = 2`,2 MOD (3 = 2) AS `2 % (3 = 2)`,2 MOD 3 = 2 AS `(2 % 3) = 2`
+select 2 % 3 = 2, 2 % (3 = 2), (2 % 3) = 2 union select * from v1;
+2 % 3 = 2 2 % (3 = 2) (2 % 3) = 2
+1 NULL 1
+create or replace view v1 as select 2 % 3 <=> 2, 2 % (3 <=> 2), (2 % 3) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <=> 2 AS `2 % 3 <=> 2`,2 MOD (3 <=> 2) AS `2 % (3 <=> 2)`,2 MOD 3 <=> 2 AS `(2 % 3) <=> 2`
+select 2 % 3 <=> 2, 2 % (3 <=> 2), (2 % 3) <=> 2 union select * from v1;
+2 % 3 <=> 2 2 % (3 <=> 2) (2 % 3) <=> 2
+1 NULL 1
+create or replace view v1 as select 2 % 3 >= 1, 2 % (3 >= 1), (2 % 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 >= 1 AS `2 % 3 >= 1`,2 MOD (3 >= 1) AS `2 % (3 >= 1)`,2 MOD 3 >= 1 AS `(2 % 3) >= 1`
+select 2 % 3 >= 1, 2 % (3 >= 1), (2 % 3) >= 1 union select * from v1;
+2 % 3 >= 1 2 % (3 >= 1) (2 % 3) >= 1
+1 0 1
+create or replace view v1 as select 2 % 3 <= 3, 2 % (3 <= 3), (2 % 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <= 3 AS `2 % 3 <= 3`,2 MOD (3 <= 3) AS `2 % (3 <= 3)`,2 MOD 3 <= 3 AS `(2 % 3) <= 3`
+select 2 % 3 <= 3, 2 % (3 <= 3), (2 % 3) <= 3 union select * from v1;
+2 % 3 <= 3 2 % (3 <= 3) (2 % 3) <= 3
+1 0 1
+create or replace view v1 as select 2 % 3 < 3, 2 % (3 < 3), (2 % 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 < 3 AS `2 % 3 < 3`,2 MOD (3 < 3) AS `2 % (3 < 3)`,2 MOD 3 < 3 AS `(2 % 3) < 3`
+select 2 % 3 < 3, 2 % (3 < 3), (2 % 3) < 3 union select * from v1;
+2 % 3 < 3 2 % (3 < 3) (2 % 3) < 3
+1 NULL 1
+create or replace view v1 as select 2 % 3 <> 3, 2 % (3 <> 3), (2 % 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <> 3 AS `2 % 3 <> 3`,2 MOD (3 <> 3) AS `2 % (3 <> 3)`,2 MOD 3 <> 3 AS `(2 % 3) <> 3`
+select 2 % 3 <> 3, 2 % (3 <> 3), (2 % 3) <> 3 union select * from v1;
+2 % 3 <> 3 2 % (3 <> 3) (2 % 3) <> 3
+1 NULL 1
+create or replace view v1 as select 2 % 3 > 3, 2 % (3 > 3), (2 % 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 > 3 AS `2 % 3 > 3`,2 MOD (3 > 3) AS `2 % (3 > 3)`,2 MOD 3 > 3 AS `(2 % 3) > 3`
+select 2 % 3 > 3, 2 % (3 > 3), (2 % 3) > 3 union select * from v1;
+2 % 3 > 3 2 % (3 > 3) (2 % 3) > 3
+0 NULL 0
+create or replace view v1 as select 2 % 3 != 3, 2 % (3 != 3), (2 % 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 <> 3 AS `2 % 3 != 3`,2 MOD (3 <> 3) AS `2 % (3 != 3)`,2 MOD 3 <> 3 AS `(2 % 3) != 3`
+select 2 % 3 != 3, 2 % (3 != 3), (2 % 3) != 3 union select * from v1;
+2 % 3 != 3 2 % (3 != 3) (2 % 3) != 3
+1 NULL 1
+create or replace view v1 as select 2 % 3 LIKE 2, 2 % (3 LIKE 2), (2 % 3) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 like 2 AS `2 % 3 LIKE 2`,2 MOD (3 like 2) AS `2 % (3 LIKE 2)`,2 MOD 3 like 2 AS `(2 % 3) LIKE 2`
+select 2 % 3 LIKE 2, 2 % (3 LIKE 2), (2 % 3) LIKE 2 union select * from v1;
+2 % 3 LIKE 2 2 % (3 LIKE 2) (2 % 3) LIKE 2
+1 NULL 1
+create or replace view v1 as select 2 % 3 REGEXP 2, 2 % (3 REGEXP 2), (2 % 3) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 regexp 2 AS `2 % 3 REGEXP 2`,2 MOD (3 regexp 2) AS `2 % (3 REGEXP 2)`,2 MOD 3 regexp 2 AS `(2 % 3) REGEXP 2`
+select 2 % 3 REGEXP 2, 2 % (3 REGEXP 2), (2 % 3) REGEXP 2 union select * from v1;
+2 % 3 REGEXP 2 2 % (3 REGEXP 2) (2 % 3) REGEXP 2
+1 NULL 1
+create or replace view v1 as select 2 % 3 | 3, 2 % (3 | 3), (2 % 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 | 3 AS `2 % 3 | 3`,2 MOD (3 | 3) AS `2 % (3 | 3)`,2 MOD 3 | 3 AS `(2 % 3) | 3`
+select 2 % 3 | 3, 2 % (3 | 3), (2 % 3) | 3 union select * from v1;
+2 % 3 | 3 2 % (3 | 3) (2 % 3) | 3
+3 2 3
+create or replace view v1 as select 2 % 4 & 4, 2 % (4 & 4), (2 % 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 4 & 4 AS `2 % 4 & 4`,2 MOD (4 & 4) AS `2 % (4 & 4)`,2 MOD 4 & 4 AS `(2 % 4) & 4`
+select 2 % 4 & 4, 2 % (4 & 4), (2 % 4) & 4 union select * from v1;
+2 % 4 & 4 2 % (4 & 4) (2 % 4) & 4
+0 2 0
+create or replace view v1 as select 2 % 3 << 3, 2 % (3 << 3), (2 % 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 << 3 AS `2 % 3 << 3`,2 MOD (3 << 3) AS `2 % (3 << 3)`,2 MOD 3 << 3 AS `(2 % 3) << 3`
+select 2 % 3 << 3, 2 % (3 << 3), (2 % 3) << 3 union select * from v1;
+2 % 3 << 3 2 % (3 << 3) (2 % 3) << 3
+16 2 16
+create or replace view v1 as select 2 % 3 >> 3, 2 % (3 >> 3), (2 % 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 >> 3 AS `2 % 3 >> 3`,2 MOD (3 >> 3) AS `2 % (3 >> 3)`,2 MOD 3 >> 3 AS `(2 % 3) >> 3`
+select 2 % 3 >> 3, 2 % (3 >> 3), (2 % 3) >> 3 union select * from v1;
+2 % 3 >> 3 2 % (3 >> 3) (2 % 3) >> 3
+0 NULL 0
+create or replace view v1 as select 2 % '2000-01-01' +INTERVAL 1 DAY, 2 % ('2000-01-01' +INTERVAL 1 DAY), (2 % '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD '2000-01-01' + interval 1 day AS `2 % '2000-01-01' +INTERVAL 1 DAY`,2 MOD ('2000-01-01' + interval 1 day) AS `2 % ('2000-01-01' +INTERVAL 1 DAY)`,2 MOD '2000-01-01' + interval 1 day AS `(2 % '2000-01-01') +INTERVAL 1 DAY`
+select 2 % '2000-01-01' +INTERVAL 1 DAY, 2 % ('2000-01-01' +INTERVAL 1 DAY), (2 % '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 % '2000-01-01' +INTERVAL 1 DAY 2 % ('2000-01-01' +INTERVAL 1 DAY) (2 % '2000-01-01') +INTERVAL 1 DAY
+NULL 2 NULL
+create or replace view v1 as select 2 % 3 + 3, 2 % (3 + 3), (2 % 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 + 3 AS `2 % 3 + 3`,2 MOD (3 + 3) AS `2 % (3 + 3)`,2 MOD 3 + 3 AS `(2 % 3) + 3`
+select 2 % 3 + 3, 2 % (3 + 3), (2 % 3) + 3 union select * from v1;
+2 % 3 + 3 2 % (3 + 3) (2 % 3) + 3
+5 2 5
+create or replace view v1 as select 2 % 3 - 3, 2 % (3 - 3), (2 % 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 - 3 AS `2 % 3 - 3`,2 MOD (3 - 3) AS `2 % (3 - 3)`,2 MOD 3 - 3 AS `(2 % 3) - 3`
+select 2 % 3 - 3, 2 % (3 - 3), (2 % 3) - 3 union select * from v1;
+2 % 3 - 3 2 % (3 - 3) (2 % 3) - 3
+-1 NULL -1
+create or replace view v1 as select 2 % 3 * 3, 2 % (3 * 3), (2 % 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 * 3 AS `2 % 3 * 3`,2 MOD (3 * 3) AS `2 % (3 * 3)`,2 MOD 3 * 3 AS `(2 % 3) * 3`
+select 2 % 3 * 3, 2 % (3 * 3), (2 % 3) * 3 union select * from v1;
+2 % 3 * 3 2 % (3 * 3) (2 % 3) * 3
+6 2 6
+create or replace view v1 as select 2 % 3 / 3, 2 % (3 / 3), (2 % 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 / 3 AS `2 % 3 / 3`,2 MOD (3 / 3) AS `2 % (3 / 3)`,2 MOD 3 / 3 AS `(2 % 3) / 3`
+select 2 % 3 / 3, 2 % (3 / 3), (2 % 3) / 3 union select * from v1;
+2 % 3 / 3 2 % (3 / 3) (2 % 3) / 3
+0.6667 0.0000 0.6667
+create or replace view v1 as select 3 % 4 DIV 3, 3 % (4 DIV 3), (3 % 4) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 MOD 4 DIV 3 AS `3 % 4 DIV 3`,3 MOD (4 DIV 3) AS `3 % (4 DIV 3)`,3 MOD 4 DIV 3 AS `(3 % 4) DIV 3`
+select 3 % 4 DIV 3, 3 % (4 DIV 3), (3 % 4) DIV 3 union select * from v1;
+3 % 4 DIV 3 3 % (4 DIV 3) (3 % 4) DIV 3
+1 0 1
+create or replace view v1 as select 2 % 3 MOD 3, 2 % (3 MOD 3), (2 % 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 MOD 3 AS `2 % 3 MOD 3`,2 MOD (3 MOD 3) AS `2 % (3 MOD 3)`,2 MOD 3 MOD 3 AS `(2 % 3) MOD 3`
+select 2 % 3 MOD 3, 2 % (3 MOD 3), (2 % 3) MOD 3 union select * from v1;
+2 % 3 MOD 3 2 % (3 MOD 3) (2 % 3) MOD 3
+2 NULL 2
+create or replace view v1 as select 2 % 3 % 3, 2 % (3 % 3), (2 % 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 MOD 3 AS `2 % 3 % 3`,2 MOD (3 MOD 3) AS `2 % (3 % 3)`,2 MOD 3 MOD 3 AS `(2 % 3) % 3`
+select 2 % 3 % 3, 2 % (3 % 3), (2 % 3) % 3 union select * from v1;
+2 % 3 % 3 2 % (3 % 3) (2 % 3) % 3
+2 NULL 2
+create or replace view v1 as select 2 % 3 ^ 3, 2 % (3 ^ 3), (2 % 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 ^ 3 AS `2 % 3 ^ 3`,2 MOD 3 ^ 3 AS `2 % (3 ^ 3)`,(2 MOD 3) ^ 3 AS `(2 % 3) ^ 3`
+select 2 % 3 ^ 3, 2 % (3 ^ 3), (2 % 3) ^ 3 union select * from v1;
+2 % 3 ^ 3 2 % (3 ^ 3) (2 % 3) ^ 3
+NULL NULL 1
+create or replace view v1 as select 2 % 3 BETWEEN 1 AND 3, 2 % (3 BETWEEN 1 AND 3), (2 % 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 between 1 and 3 AS `2 % 3 BETWEEN 1 AND 3`,2 MOD (3 between 1 and 3) AS `2 % (3 BETWEEN 1 AND 3)`,2 MOD 3 between 1 and 3 AS `(2 % 3) BETWEEN 1 AND 3`
+select 2 % 3 BETWEEN 1 AND 3, 2 % (3 BETWEEN 1 AND 3), (2 % 3) BETWEEN 1 AND 3 union select * from v1;
+2 % 3 BETWEEN 1 AND 3 2 % (3 BETWEEN 1 AND 3) (2 % 3) BETWEEN 1 AND 3
+1 0 1
+create or replace view v1 as select 2 ^ 3 IS FALSE, 2 ^ (3 IS FALSE), (2 ^ 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 is false AS `2 ^ 3 IS FALSE`,2 ^ (3 is false) AS `2 ^ (3 IS FALSE)`,2 ^ 3 is false AS `(2 ^ 3) IS FALSE`
+select 2 ^ 3 IS FALSE, 2 ^ (3 IS FALSE), (2 ^ 3) IS FALSE union select * from v1;
+2 ^ 3 IS FALSE 2 ^ (3 IS FALSE) (2 ^ 3) IS FALSE
+0 2 0
+create or replace view v1 as select charset(2 ^ 3 COLLATE latin1_bin), charset(2 ^ (3 COLLATE latin1_bin)), charset((2 ^ 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 ^ 3 collate latin1_bin) AS `charset(2 ^ 3 COLLATE latin1_bin)`,charset(2 ^ 3 collate latin1_bin) AS `charset(2 ^ (3 COLLATE latin1_bin))`,charset((2 ^ 3) collate latin1_bin) AS `charset((2 ^ 3) COLLATE latin1_bin)`
+select charset(2 ^ 3 COLLATE latin1_bin), charset(2 ^ (3 COLLATE latin1_bin)), charset((2 ^ 3) COLLATE latin1_bin) union select * from v1;
+charset(2 ^ 3 COLLATE latin1_bin) charset(2 ^ (3 COLLATE latin1_bin)) charset((2 ^ 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 ^ 3 IN (0,1), 2 ^ (3 IN (0,1)), (2 ^ 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 in (0,1) AS `2 ^ 3 IN (0,1)`,2 ^ (3 in (0,1)) AS `2 ^ (3 IN (0,1))`,2 ^ 3 in (0,1) AS `(2 ^ 3) IN (0,1)`
+select 2 ^ 3 IN (0,1), 2 ^ (3 IN (0,1)), (2 ^ 3) IN (0,1) union select * from v1;
+2 ^ 3 IN (0,1) 2 ^ (3 IN (0,1)) (2 ^ 3) IN (0,1)
+1 2 1
+create or replace view v1 as select 2 ^ 3 OR 3, 2 ^ (3 OR 3), (2 ^ 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 or 3 AS `2 ^ 3 OR 3`,2 ^ (3 or 3) AS `2 ^ (3 OR 3)`,2 ^ 3 or 3 AS `(2 ^ 3) OR 3`
+select 2 ^ 3 OR 3, 2 ^ (3 OR 3), (2 ^ 3) OR 3 union select * from v1;
+2 ^ 3 OR 3 2 ^ (3 OR 3) (2 ^ 3) OR 3
+1 3 1
+create or replace view v1 as select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 or 3 AS `2 ^ 3 || 3`,2 ^ (3 or 3) AS `2 ^ (3 || 3)`,2 ^ 3 or 3 AS `(2 ^ 3) || 3`
+select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3 union select * from v1;
+2 ^ 3 || 3 2 ^ (3 || 3) (2 ^ 3) || 3
+1 3 1
+create or replace view v1 as select 2 ^ 3 XOR 3, 2 ^ (3 XOR 3), (2 ^ 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 xor 3 AS `2 ^ 3 XOR 3`,2 ^ (3 xor 3) AS `2 ^ (3 XOR 3)`,2 ^ 3 xor 3 AS `(2 ^ 3) XOR 3`
+select 2 ^ 3 XOR 3, 2 ^ (3 XOR 3), (2 ^ 3) XOR 3 union select * from v1;
+2 ^ 3 XOR 3 2 ^ (3 XOR 3) (2 ^ 3) XOR 3
+0 2 0
+create or replace view v1 as select 2 ^ 3 AND 3, 2 ^ (3 AND 3), (2 ^ 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 and 3 AS `2 ^ 3 AND 3`,2 ^ (3 and 3) AS `2 ^ (3 AND 3)`,2 ^ 3 and 3 AS `(2 ^ 3) AND 3`
+select 2 ^ 3 AND 3, 2 ^ (3 AND 3), (2 ^ 3) AND 3 union select * from v1;
+2 ^ 3 AND 3 2 ^ (3 AND 3) (2 ^ 3) AND 3
+1 3 1
+create or replace view v1 as select 2 ^ 3 && 3, 2 ^ (3 && 3), (2 ^ 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 and 3 AS `2 ^ 3 && 3`,2 ^ (3 and 3) AS `2 ^ (3 && 3)`,2 ^ 3 and 3 AS `(2 ^ 3) && 3`
+select 2 ^ 3 && 3, 2 ^ (3 && 3), (2 ^ 3) && 3 union select * from v1;
+2 ^ 3 && 3 2 ^ (3 && 3) (2 ^ 3) && 3
+1 3 1
+create or replace view v1 as select 2 ^ 3 = 3, 2 ^ (3 = 3), (2 ^ 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 = 3 AS `2 ^ 3 = 3`,2 ^ (3 = 3) AS `2 ^ (3 = 3)`,2 ^ 3 = 3 AS `(2 ^ 3) = 3`
+select 2 ^ 3 = 3, 2 ^ (3 = 3), (2 ^ 3) = 3 union select * from v1;
+2 ^ 3 = 3 2 ^ (3 = 3) (2 ^ 3) = 3
+0 3 0
+create or replace view v1 as select 2 ^ 3 <=> 3, 2 ^ (3 <=> 3), (2 ^ 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 <=> 3 AS `2 ^ 3 <=> 3`,2 ^ (3 <=> 3) AS `2 ^ (3 <=> 3)`,2 ^ 3 <=> 3 AS `(2 ^ 3) <=> 3`
+select 2 ^ 3 <=> 3, 2 ^ (3 <=> 3), (2 ^ 3) <=> 3 union select * from v1;
+2 ^ 3 <=> 3 2 ^ (3 <=> 3) (2 ^ 3) <=> 3
+0 3 0
+create or replace view v1 as select 2 ^ 3 >= 3, 2 ^ (3 >= 3), (2 ^ 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 >= 3 AS `2 ^ 3 >= 3`,2 ^ (3 >= 3) AS `2 ^ (3 >= 3)`,2 ^ 3 >= 3 AS `(2 ^ 3) >= 3`
+select 2 ^ 3 >= 3, 2 ^ (3 >= 3), (2 ^ 3) >= 3 union select * from v1;
+2 ^ 3 >= 3 2 ^ (3 >= 3) (2 ^ 3) >= 3
+0 3 0
+create or replace view v1 as select 2 ^ 3 <= 3, 2 ^ (3 <= 3), (2 ^ 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 <= 3 AS `2 ^ 3 <= 3`,2 ^ (3 <= 3) AS `2 ^ (3 <= 3)`,2 ^ 3 <= 3 AS `(2 ^ 3) <= 3`
+select 2 ^ 3 <= 3, 2 ^ (3 <= 3), (2 ^ 3) <= 3 union select * from v1;
+2 ^ 3 <= 3 2 ^ (3 <= 3) (2 ^ 3) <= 3
+1 3 1
+create or replace view v1 as select 2 ^ 3 < 3, 2 ^ (3 < 3), (2 ^ 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 < 3 AS `2 ^ 3 < 3`,2 ^ (3 < 3) AS `2 ^ (3 < 3)`,2 ^ 3 < 3 AS `(2 ^ 3) < 3`
+select 2 ^ 3 < 3, 2 ^ (3 < 3), (2 ^ 3) < 3 union select * from v1;
+2 ^ 3 < 3 2 ^ (3 < 3) (2 ^ 3) < 3
+1 2 1
+create or replace view v1 as select 2 ^ 3 <> 3, 2 ^ (3 <> 3), (2 ^ 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 <> 3 AS `2 ^ 3 <> 3`,2 ^ (3 <> 3) AS `2 ^ (3 <> 3)`,2 ^ 3 <> 3 AS `(2 ^ 3) <> 3`
+select 2 ^ 3 <> 3, 2 ^ (3 <> 3), (2 ^ 3) <> 3 union select * from v1;
+2 ^ 3 <> 3 2 ^ (3 <> 3) (2 ^ 3) <> 3
+1 2 1
+create or replace view v1 as select 2 ^ 3 > 3, 2 ^ (3 > 3), (2 ^ 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 > 3 AS `2 ^ 3 > 3`,2 ^ (3 > 3) AS `2 ^ (3 > 3)`,2 ^ 3 > 3 AS `(2 ^ 3) > 3`
+select 2 ^ 3 > 3, 2 ^ (3 > 3), (2 ^ 3) > 3 union select * from v1;
+2 ^ 3 > 3 2 ^ (3 > 3) (2 ^ 3) > 3
+0 2 0
+create or replace view v1 as select 2 ^ 3 != 3, 2 ^ (3 != 3), (2 ^ 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 <> 3 AS `2 ^ 3 != 3`,2 ^ (3 <> 3) AS `2 ^ (3 != 3)`,2 ^ 3 <> 3 AS `(2 ^ 3) != 3`
+select 2 ^ 3 != 3, 2 ^ (3 != 3), (2 ^ 3) != 3 union select * from v1;
+2 ^ 3 != 3 2 ^ (3 != 3) (2 ^ 3) != 3
+1 2 1
+create or replace view v1 as select 2 ^ 3 LIKE 3, 2 ^ (3 LIKE 3), (2 ^ 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 like 3 AS `2 ^ 3 LIKE 3`,2 ^ (3 like 3) AS `2 ^ (3 LIKE 3)`,2 ^ 3 like 3 AS `(2 ^ 3) LIKE 3`
+select 2 ^ 3 LIKE 3, 2 ^ (3 LIKE 3), (2 ^ 3) LIKE 3 union select * from v1;
+2 ^ 3 LIKE 3 2 ^ (3 LIKE 3) (2 ^ 3) LIKE 3
+0 3 0
+create or replace view v1 as select 2 ^ 3 REGEXP 3, 2 ^ (3 REGEXP 3), (2 ^ 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 regexp 3 AS `2 ^ 3 REGEXP 3`,2 ^ (3 regexp 3) AS `2 ^ (3 REGEXP 3)`,2 ^ 3 regexp 3 AS `(2 ^ 3) REGEXP 3`
+select 2 ^ 3 REGEXP 3, 2 ^ (3 REGEXP 3), (2 ^ 3) REGEXP 3 union select * from v1;
+2 ^ 3 REGEXP 3 2 ^ (3 REGEXP 3) (2 ^ 3) REGEXP 3
+0 3 0
+create or replace view v1 as select 2 ^ 3 | 3, 2 ^ (3 | 3), (2 ^ 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 | 3 AS `2 ^ 3 | 3`,2 ^ (3 | 3) AS `2 ^ (3 | 3)`,2 ^ 3 | 3 AS `(2 ^ 3) | 3`
+select 2 ^ 3 | 3, 2 ^ (3 | 3), (2 ^ 3) | 3 union select * from v1;
+2 ^ 3 | 3 2 ^ (3 | 3) (2 ^ 3) | 3
+3 1 3
+create or replace view v1 as select 2 ^ 0 & 0, 2 ^ (0 & 0), (2 ^ 0) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 0 & 0 AS `2 ^ 0 & 0`,2 ^ (0 & 0) AS `2 ^ (0 & 0)`,2 ^ 0 & 0 AS `(2 ^ 0) & 0`
+select 2 ^ 0 & 0, 2 ^ (0 & 0), (2 ^ 0) & 0 union select * from v1;
+2 ^ 0 & 0 2 ^ (0 & 0) (2 ^ 0) & 0
+0 2 0
+create or replace view v1 as select 2 ^ 3 << 3, 2 ^ (3 << 3), (2 ^ 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 << 3 AS `2 ^ 3 << 3`,2 ^ (3 << 3) AS `2 ^ (3 << 3)`,2 ^ 3 << 3 AS `(2 ^ 3) << 3`
+select 2 ^ 3 << 3, 2 ^ (3 << 3), (2 ^ 3) << 3 union select * from v1;
+2 ^ 3 << 3 2 ^ (3 << 3) (2 ^ 3) << 3
+8 26 8
+create or replace view v1 as select 2 ^ 3 >> 3, 2 ^ (3 >> 3), (2 ^ 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 >> 3 AS `2 ^ 3 >> 3`,2 ^ (3 >> 3) AS `2 ^ (3 >> 3)`,2 ^ 3 >> 3 AS `(2 ^ 3) >> 3`
+select 2 ^ 3 >> 3, 2 ^ (3 >> 3), (2 ^ 3) >> 3 union select * from v1;
+2 ^ 3 >> 3 2 ^ (3 >> 3) (2 ^ 3) >> 3
+0 2 0
+create or replace view v1 as select 2 ^ '2000-01-01' +INTERVAL 1 DAY, 2 ^ ('2000-01-01' +INTERVAL 1 DAY), (2 ^ '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ '2000-01-01' + interval 1 day AS `2 ^ '2000-01-01' +INTERVAL 1 DAY`,2 ^ ('2000-01-01' + interval 1 day) AS `2 ^ ('2000-01-01' +INTERVAL 1 DAY)`,2 ^ '2000-01-01' + interval 1 day AS `(2 ^ '2000-01-01') +INTERVAL 1 DAY`
+select 2 ^ '2000-01-01' +INTERVAL 1 DAY, 2 ^ ('2000-01-01' +INTERVAL 1 DAY), (2 ^ '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 ^ '2000-01-01' +INTERVAL 1 DAY 2 ^ ('2000-01-01' +INTERVAL 1 DAY) (2 ^ '2000-01-01') +INTERVAL 1 DAY
+NULL 20000100 NULL
+create or replace view v1 as select 2 ^ 3 + 1, 2 ^ (3 + 1), (2 ^ 3) + 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 + 1 AS `2 ^ 3 + 1`,2 ^ (3 + 1) AS `2 ^ (3 + 1)`,2 ^ 3 + 1 AS `(2 ^ 3) + 1`
+select 2 ^ 3 + 1, 2 ^ (3 + 1), (2 ^ 3) + 1 union select * from v1;
+2 ^ 3 + 1 2 ^ (3 + 1) (2 ^ 3) + 1
+2 6 2
+create or replace view v1 as select 5 ^ 1 - 1, 5 ^ (1 - 1), (5 ^ 1) - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 5 ^ 1 - 1 AS `5 ^ 1 - 1`,5 ^ (1 - 1) AS `5 ^ (1 - 1)`,5 ^ 1 - 1 AS `(5 ^ 1) - 1`
+select 5 ^ 1 - 1, 5 ^ (1 - 1), (5 ^ 1) - 1 union select * from v1;
+5 ^ 1 - 1 5 ^ (1 - 1) (5 ^ 1) - 1
+3 5 3
+create or replace view v1 as select 2 ^ 3 * 3, 2 ^ (3 * 3), (2 ^ 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 * 3 AS `2 ^ 3 * 3`,2 ^ (3 * 3) AS `2 ^ (3 * 3)`,2 ^ 3 * 3 AS `(2 ^ 3) * 3`
+select 2 ^ 3 * 3, 2 ^ (3 * 3), (2 ^ 3) * 3 union select * from v1;
+2 ^ 3 * 3 2 ^ (3 * 3) (2 ^ 3) * 3
+3 11 3
+create or replace view v1 as select 2 ^ 3 / 3, 2 ^ (3 / 3), (2 ^ 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 / 3 AS `2 ^ 3 / 3`,2 ^ (3 / 3) AS `2 ^ (3 / 3)`,2 ^ 3 / 3 AS `(2 ^ 3) / 3`
+select 2 ^ 3 / 3, 2 ^ (3 / 3), (2 ^ 3) / 3 union select * from v1;
+2 ^ 3 / 3 2 ^ (3 / 3) (2 ^ 3) / 3
+0.3333 3 0.3333
+create or replace view v1 as select 2 ^ 3 DIV 3, 2 ^ (3 DIV 3), (2 ^ 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 DIV 3 AS `2 ^ 3 DIV 3`,2 ^ (3 DIV 3) AS `2 ^ (3 DIV 3)`,2 ^ 3 DIV 3 AS `(2 ^ 3) DIV 3`
+select 2 ^ 3 DIV 3, 2 ^ (3 DIV 3), (2 ^ 3) DIV 3 union select * from v1;
+2 ^ 3 DIV 3 2 ^ (3 DIV 3) (2 ^ 3) DIV 3
+0 3 0
+create or replace view v1 as select 2 ^ 3 MOD 3, 2 ^ (3 MOD 3), (2 ^ 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 MOD 3 AS `2 ^ 3 MOD 3`,2 ^ (3 MOD 3) AS `2 ^ (3 MOD 3)`,2 ^ 3 MOD 3 AS `(2 ^ 3) MOD 3`
+select 2 ^ 3 MOD 3, 2 ^ (3 MOD 3), (2 ^ 3) MOD 3 union select * from v1;
+2 ^ 3 MOD 3 2 ^ (3 MOD 3) (2 ^ 3) MOD 3
+1 2 1
+create or replace view v1 as select 2 ^ 3 % 3, 2 ^ (3 % 3), (2 ^ 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 MOD 3 AS `2 ^ 3 % 3`,2 ^ (3 MOD 3) AS `2 ^ (3 % 3)`,2 ^ 3 MOD 3 AS `(2 ^ 3) % 3`
+select 2 ^ 3 % 3, 2 ^ (3 % 3), (2 ^ 3) % 3 union select * from v1;
+2 ^ 3 % 3 2 ^ (3 % 3) (2 ^ 3) % 3
+1 2 1
+create or replace view v1 as select 2 ^ 3 BETWEEN 1 AND 3, 2 ^ (3 BETWEEN 1 AND 3), (2 ^ 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 between 1 and 3 AS `2 ^ 3 BETWEEN 1 AND 3`,2 ^ (3 between 1 and 3) AS `2 ^ (3 BETWEEN 1 AND 3)`,2 ^ 3 between 1 and 3 AS `(2 ^ 3) BETWEEN 1 AND 3`
+select 2 ^ 3 BETWEEN 1 AND 3, 2 ^ (3 BETWEEN 1 AND 3), (2 ^ 3) BETWEEN 1 AND 3 union select * from v1;
+2 ^ 3 BETWEEN 1 AND 3 2 ^ (3 BETWEEN 1 AND 3) (2 ^ 3) BETWEEN 1 AND 3
+1 3 1
+create or replace view v1 as select 2 BETWEEN 1 AND 1 IS FALSE, 2 BETWEEN 1 AND (1 IS FALSE), (2 BETWEEN 1 AND 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 1 is false AS `2 BETWEEN 1 AND 1 IS FALSE`,2 between 1 and (1 is false) AS `2 BETWEEN 1 AND (1 IS FALSE)`,2 between 1 and 1 is false AS `(2 BETWEEN 1 AND 1) IS FALSE`
+select 2 BETWEEN 1 AND 1 IS FALSE, 2 BETWEEN 1 AND (1 IS FALSE), (2 BETWEEN 1 AND 1) IS FALSE union select * from v1;
+2 BETWEEN 1 AND 1 IS FALSE 2 BETWEEN 1 AND (1 IS FALSE) (2 BETWEEN 1 AND 1) IS FALSE
+1 0 1
+create or replace view v1 as select charset(2 BETWEEN 1 AND 3 COLLATE latin1_bin), charset(2 BETWEEN 1 AND (3 COLLATE latin1_bin)), charset((2 BETWEEN 1 AND 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 between 1 and 3 collate latin1_bin) AS `charset(2 BETWEEN 1 AND 3 COLLATE latin1_bin)`,charset(2 between 1 and 3 collate latin1_bin) AS `charset(2 BETWEEN 1 AND (3 COLLATE latin1_bin))`,charset((2 between 1 and 3) collate latin1_bin) AS `charset((2 BETWEEN 1 AND 3) COLLATE latin1_bin)`
+select charset(2 BETWEEN 1 AND 3 COLLATE latin1_bin), charset(2 BETWEEN 1 AND (3 COLLATE latin1_bin)), charset((2 BETWEEN 1 AND 3) COLLATE latin1_bin) union select * from v1;
+charset(2 BETWEEN 1 AND 3 COLLATE latin1_bin) charset(2 BETWEEN 1 AND (3 COLLATE latin1_bin)) charset((2 BETWEEN 1 AND 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 IN (0,1), 2 BETWEEN 1 AND (3 IN (0,1)), (2 BETWEEN 1 AND 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 in (0,1) AS `2 BETWEEN 1 AND 3 IN (0,1)`,2 between 1 and 3 in (0,1) AS `2 BETWEEN 1 AND (3 IN (0,1))`,(2 between 1 and 3) in (0,1) AS `(2 BETWEEN 1 AND 3) IN (0,1)`
+select 2 BETWEEN 1 AND 3 IN (0,1), 2 BETWEEN 1 AND (3 IN (0,1)), (2 BETWEEN 1 AND 3) IN (0,1) union select * from v1;
+2 BETWEEN 1 AND 3 IN (0,1) 2 BETWEEN 1 AND (3 IN (0,1)) (2 BETWEEN 1 AND 3) IN (0,1)
+0 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 OR 3, 2 BETWEEN 1 AND (3 OR 3), (2 BETWEEN 1 AND 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 or 3 AS `2 BETWEEN 1 AND 3 OR 3`,2 between 1 and (3 or 3) AS `2 BETWEEN 1 AND (3 OR 3)`,2 between 1 and 3 or 3 AS `(2 BETWEEN 1 AND 3) OR 3`
+select 2 BETWEEN 1 AND 3 OR 3, 2 BETWEEN 1 AND (3 OR 3), (2 BETWEEN 1 AND 3) OR 3 union select * from v1;
+2 BETWEEN 1 AND 3 OR 3 2 BETWEEN 1 AND (3 OR 3) (2 BETWEEN 1 AND 3) OR 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 or 3 AS `2 BETWEEN 1 AND 3 || 3`,2 between 1 and (3 or 3) AS `2 BETWEEN 1 AND (3 || 3)`,2 between 1 and 3 or 3 AS `(2 BETWEEN 1 AND 3) || 3`
+select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3 union select * from v1;
+2 BETWEEN 1 AND 3 || 3 2 BETWEEN 1 AND (3 || 3) (2 BETWEEN 1 AND 3) || 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 1 XOR 1, 2 BETWEEN 1 AND (1 XOR 1), (2 BETWEEN 1 AND 1) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 1 xor 1 AS `2 BETWEEN 1 AND 1 XOR 1`,2 between 1 and (1 xor 1) AS `2 BETWEEN 1 AND (1 XOR 1)`,2 between 1 and 1 xor 1 AS `(2 BETWEEN 1 AND 1) XOR 1`
+select 2 BETWEEN 1 AND 1 XOR 1, 2 BETWEEN 1 AND (1 XOR 1), (2 BETWEEN 1 AND 1) XOR 1 union select * from v1;
+2 BETWEEN 1 AND 1 XOR 1 2 BETWEEN 1 AND (1 XOR 1) (2 BETWEEN 1 AND 1) XOR 1
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 AND 3, 2 BETWEEN 1 AND (3 AND 3), (2 BETWEEN 1 AND 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 and 3 AS `2 BETWEEN 1 AND 3 AND 3`,2 between 1 and (3 and 3) AS `2 BETWEEN 1 AND (3 AND 3)`,2 between 1 and 3 and 3 AS `(2 BETWEEN 1 AND 3) AND 3`
+select 2 BETWEEN 1 AND 3 AND 3, 2 BETWEEN 1 AND (3 AND 3), (2 BETWEEN 1 AND 3) AND 3 union select * from v1;
+2 BETWEEN 1 AND 3 AND 3 2 BETWEEN 1 AND (3 AND 3) (2 BETWEEN 1 AND 3) AND 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 && 3, 2 BETWEEN 1 AND (3 && 3), (2 BETWEEN 1 AND 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 and 3 AS `2 BETWEEN 1 AND 3 && 3`,2 between 1 and (3 and 3) AS `2 BETWEEN 1 AND (3 && 3)`,2 between 1 and 3 and 3 AS `(2 BETWEEN 1 AND 3) && 3`
+select 2 BETWEEN 1 AND 3 && 3, 2 BETWEEN 1 AND (3 && 3), (2 BETWEEN 1 AND 3) && 3 union select * from v1;
+2 BETWEEN 1 AND 3 && 3 2 BETWEEN 1 AND (3 && 3) (2 BETWEEN 1 AND 3) && 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 = 1, 2 BETWEEN 1 AND (3 = 1), (2 BETWEEN 1 AND 3) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 = 1 AS `2 BETWEEN 1 AND 3 = 1`,2 between 1 and (3 = 1) AS `2 BETWEEN 1 AND (3 = 1)`,2 between 1 and 3 = 1 AS `(2 BETWEEN 1 AND 3) = 1`
+select 2 BETWEEN 1 AND 3 = 1, 2 BETWEEN 1 AND (3 = 1), (2 BETWEEN 1 AND 3) = 1 union select * from v1;
+2 BETWEEN 1 AND 3 = 1 2 BETWEEN 1 AND (3 = 1) (2 BETWEEN 1 AND 3) = 1
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 <=> 1, 2 BETWEEN 1 AND (3 <=> 1), (2 BETWEEN 1 AND 3) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 <=> 1 AS `2 BETWEEN 1 AND 3 <=> 1`,2 between 1 and (3 <=> 1) AS `2 BETWEEN 1 AND (3 <=> 1)`,2 between 1 and 3 <=> 1 AS `(2 BETWEEN 1 AND 3) <=> 1`
+select 2 BETWEEN 1 AND 3 <=> 1, 2 BETWEEN 1 AND (3 <=> 1), (2 BETWEEN 1 AND 3) <=> 1 union select * from v1;
+2 BETWEEN 1 AND 3 <=> 1 2 BETWEEN 1 AND (3 <=> 1) (2 BETWEEN 1 AND 3) <=> 1
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 >= 1, 2 BETWEEN 1 AND (3 >= 1), (2 BETWEEN 1 AND 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 >= 1 AS `2 BETWEEN 1 AND 3 >= 1`,2 between 1 and (3 >= 1) AS `2 BETWEEN 1 AND (3 >= 1)`,2 between 1 and 3 >= 1 AS `(2 BETWEEN 1 AND 3) >= 1`
+select 2 BETWEEN 1 AND 3 >= 1, 2 BETWEEN 1 AND (3 >= 1), (2 BETWEEN 1 AND 3) >= 1 union select * from v1;
+2 BETWEEN 1 AND 3 >= 1 2 BETWEEN 1 AND (3 >= 1) (2 BETWEEN 1 AND 3) >= 1
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 <= 3, 2 BETWEEN 1 AND (3 <= 3), (2 BETWEEN 1 AND 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 <= 3 AS `2 BETWEEN 1 AND 3 <= 3`,2 between 1 and (3 <= 3) AS `2 BETWEEN 1 AND (3 <= 3)`,2 between 1 and 3 <= 3 AS `(2 BETWEEN 1 AND 3) <= 3`
+select 2 BETWEEN 1 AND 3 <= 3, 2 BETWEEN 1 AND (3 <= 3), (2 BETWEEN 1 AND 3) <= 3 union select * from v1;
+2 BETWEEN 1 AND 3 <= 3 2 BETWEEN 1 AND (3 <= 3) (2 BETWEEN 1 AND 3) <= 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 < 3, 2 BETWEEN 1 AND (3 < 3), (2 BETWEEN 1 AND 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 < 3 AS `2 BETWEEN 1 AND 3 < 3`,2 between 1 and (3 < 3) AS `2 BETWEEN 1 AND (3 < 3)`,2 between 1 and 3 < 3 AS `(2 BETWEEN 1 AND 3) < 3`
+select 2 BETWEEN 1 AND 3 < 3, 2 BETWEEN 1 AND (3 < 3), (2 BETWEEN 1 AND 3) < 3 union select * from v1;
+2 BETWEEN 1 AND 3 < 3 2 BETWEEN 1 AND (3 < 3) (2 BETWEEN 1 AND 3) < 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 <> 3, 2 BETWEEN 1 AND (3 <> 3), (2 BETWEEN 1 AND 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 <> 3 AS `2 BETWEEN 1 AND 3 <> 3`,2 between 1 and (3 <> 3) AS `2 BETWEEN 1 AND (3 <> 3)`,2 between 1 and 3 <> 3 AS `(2 BETWEEN 1 AND 3) <> 3`
+select 2 BETWEEN 1 AND 3 <> 3, 2 BETWEEN 1 AND (3 <> 3), (2 BETWEEN 1 AND 3) <> 3 union select * from v1;
+2 BETWEEN 1 AND 3 <> 3 2 BETWEEN 1 AND (3 <> 3) (2 BETWEEN 1 AND 3) <> 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 > 0, 2 BETWEEN 1 AND (3 > 0), (2 BETWEEN 1 AND 3) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 > 0 AS `2 BETWEEN 1 AND 3 > 0`,2 between 1 and (3 > 0) AS `2 BETWEEN 1 AND (3 > 0)`,2 between 1 and 3 > 0 AS `(2 BETWEEN 1 AND 3) > 0`
+select 2 BETWEEN 1 AND 3 > 0, 2 BETWEEN 1 AND (3 > 0), (2 BETWEEN 1 AND 3) > 0 union select * from v1;
+2 BETWEEN 1 AND 3 > 0 2 BETWEEN 1 AND (3 > 0) (2 BETWEEN 1 AND 3) > 0
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 != 3, 2 BETWEEN 1 AND (3 != 3), (2 BETWEEN 1 AND 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 <> 3 AS `2 BETWEEN 1 AND 3 != 3`,2 between 1 and (3 <> 3) AS `2 BETWEEN 1 AND (3 != 3)`,2 between 1 and 3 <> 3 AS `(2 BETWEEN 1 AND 3) != 3`
+select 2 BETWEEN 1 AND 3 != 3, 2 BETWEEN 1 AND (3 != 3), (2 BETWEEN 1 AND 3) != 3 union select * from v1;
+2 BETWEEN 1 AND 3 != 3 2 BETWEEN 1 AND (3 != 3) (2 BETWEEN 1 AND 3) != 3
+1 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 LIKE 1, 2 BETWEEN 1 AND (3 LIKE 1), (2 BETWEEN 1 AND 3) LIKE 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 like 1 AS `2 BETWEEN 1 AND 3 LIKE 1`,2 between 1 and 3 like 1 AS `2 BETWEEN 1 AND (3 LIKE 1)`,(2 between 1 and 3) like 1 AS `(2 BETWEEN 1 AND 3) LIKE 1`
+select 2 BETWEEN 1 AND 3 LIKE 1, 2 BETWEEN 1 AND (3 LIKE 1), (2 BETWEEN 1 AND 3) LIKE 1 union select * from v1;
+2 BETWEEN 1 AND 3 LIKE 1 2 BETWEEN 1 AND (3 LIKE 1) (2 BETWEEN 1 AND 3) LIKE 1
+0 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 REGEXP 1, 2 BETWEEN 1 AND (3 REGEXP 1), (2 BETWEEN 1 AND 3) REGEXP 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 regexp 1 AS `2 BETWEEN 1 AND 3 REGEXP 1`,2 between 1 and 3 regexp 1 AS `2 BETWEEN 1 AND (3 REGEXP 1)`,(2 between 1 and 3) regexp 1 AS `(2 BETWEEN 1 AND 3) REGEXP 1`
+select 2 BETWEEN 1 AND 3 REGEXP 1, 2 BETWEEN 1 AND (3 REGEXP 1), (2 BETWEEN 1 AND 3) REGEXP 1 union select * from v1;
+2 BETWEEN 1 AND 3 REGEXP 1 2 BETWEEN 1 AND (3 REGEXP 1) (2 BETWEEN 1 AND 3) REGEXP 1
+0 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 | 3, 2 BETWEEN 1 AND (3 | 3), (2 BETWEEN 1 AND 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 | 3 AS `2 BETWEEN 1 AND 3 | 3`,2 between 1 and 3 | 3 AS `2 BETWEEN 1 AND (3 | 3)`,(2 between 1 and 3) | 3 AS `(2 BETWEEN 1 AND 3) | 3`
+select 2 BETWEEN 1 AND 3 | 3, 2 BETWEEN 1 AND (3 | 3), (2 BETWEEN 1 AND 3) | 3 union select * from v1;
+2 BETWEEN 1 AND 3 | 3 2 BETWEEN 1 AND (3 | 3) (2 BETWEEN 1 AND 3) | 3
+1 1 3
+create or replace view v1 as select 2 BETWEEN 1 AND 2 & 2, 2 BETWEEN 1 AND (2 & 2), (2 BETWEEN 1 AND 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 2 & 2 AS `2 BETWEEN 1 AND 2 & 2`,2 between 1 and 2 & 2 AS `2 BETWEEN 1 AND (2 & 2)`,(2 between 1 and 2) & 2 AS `(2 BETWEEN 1 AND 2) & 2`
+select 2 BETWEEN 1 AND 2 & 2, 2 BETWEEN 1 AND (2 & 2), (2 BETWEEN 1 AND 2) & 2 union select * from v1;
+2 BETWEEN 1 AND 2 & 2 2 BETWEEN 1 AND (2 & 2) (2 BETWEEN 1 AND 2) & 2
+1 1 0
+create or replace view v1 as select 2 BETWEEN 1 AND 3 << 3, 2 BETWEEN 1 AND (3 << 3), (2 BETWEEN 1 AND 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 << 3 AS `2 BETWEEN 1 AND 3 << 3`,2 between 1 and 3 << 3 AS `2 BETWEEN 1 AND (3 << 3)`,(2 between 1 and 3) << 3 AS `(2 BETWEEN 1 AND 3) << 3`
+select 2 BETWEEN 1 AND 3 << 3, 2 BETWEEN 1 AND (3 << 3), (2 BETWEEN 1 AND 3) << 3 union select * from v1;
+2 BETWEEN 1 AND 3 << 3 2 BETWEEN 1 AND (3 << 3) (2 BETWEEN 1 AND 3) << 3
+1 1 8
+create or replace view v1 as select 2 BETWEEN 1 AND 4 >> 1, 2 BETWEEN 1 AND (4 >> 1), (2 BETWEEN 1 AND 4) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 4 >> 1 AS `2 BETWEEN 1 AND 4 >> 1`,2 between 1 and 4 >> 1 AS `2 BETWEEN 1 AND (4 >> 1)`,(2 between 1 and 4) >> 1 AS `(2 BETWEEN 1 AND 4) >> 1`
+select 2 BETWEEN 1 AND 4 >> 1, 2 BETWEEN 1 AND (4 >> 1), (2 BETWEEN 1 AND 4) >> 1 union select * from v1;
+2 BETWEEN 1 AND 4 >> 1 2 BETWEEN 1 AND (4 >> 1) (2 BETWEEN 1 AND 4) >> 1
+1 1 0
+create or replace view v1 as select 2 BETWEEN 1 AND '2000-01-01' +INTERVAL 1 DAY, 2 BETWEEN 1 AND ('2000-01-01' +INTERVAL 1 DAY), (2 BETWEEN 1 AND '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and '2000-01-01' + interval 1 day AS `2 BETWEEN 1 AND '2000-01-01' +INTERVAL 1 DAY`,2 between 1 and '2000-01-01' + interval 1 day AS `2 BETWEEN 1 AND ('2000-01-01' +INTERVAL 1 DAY)`,(2 between 1 and '2000-01-01') + interval 1 day AS `(2 BETWEEN 1 AND '2000-01-01') +INTERVAL 1 DAY`
+select 2 BETWEEN 1 AND '2000-01-01' +INTERVAL 1 DAY, 2 BETWEEN 1 AND ('2000-01-01' +INTERVAL 1 DAY), (2 BETWEEN 1 AND '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 BETWEEN 1 AND '2000-01-01' +INTERVAL 1 DAY 2 BETWEEN 1 AND ('2000-01-01' +INTERVAL 1 DAY) (2 BETWEEN 1 AND '2000-01-01') +INTERVAL 1 DAY
+1 1 NULL
+create or replace view v1 as select 2 BETWEEN 1 AND 3 + 3, 2 BETWEEN 1 AND (3 + 3), (2 BETWEEN 1 AND 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 + 3 AS `2 BETWEEN 1 AND 3 + 3`,2 between 1 and 3 + 3 AS `2 BETWEEN 1 AND (3 + 3)`,(2 between 1 and 3) + 3 AS `(2 BETWEEN 1 AND 3) + 3`
+select 2 BETWEEN 1 AND 3 + 3, 2 BETWEEN 1 AND (3 + 3), (2 BETWEEN 1 AND 3) + 3 union select * from v1;
+2 BETWEEN 1 AND 3 + 3 2 BETWEEN 1 AND (3 + 3) (2 BETWEEN 1 AND 3) + 3
+1 1 4
+create or replace view v1 as select 2 BETWEEN 1 AND 3 - 3, 2 BETWEEN 1 AND (3 - 3), (2 BETWEEN 1 AND 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 - 3 AS `2 BETWEEN 1 AND 3 - 3`,2 between 1 and 3 - 3 AS `2 BETWEEN 1 AND (3 - 3)`,(2 between 1 and 3) - 3 AS `(2 BETWEEN 1 AND 3) - 3`
+select 2 BETWEEN 1 AND 3 - 3, 2 BETWEEN 1 AND (3 - 3), (2 BETWEEN 1 AND 3) - 3 union select * from v1;
+2 BETWEEN 1 AND 3 - 3 2 BETWEEN 1 AND (3 - 3) (2 BETWEEN 1 AND 3) - 3
+0 0 -2
+create or replace view v1 as select 2 BETWEEN 1 AND 3 * 3, 2 BETWEEN 1 AND (3 * 3), (2 BETWEEN 1 AND 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 * 3 AS `2 BETWEEN 1 AND 3 * 3`,2 between 1 and 3 * 3 AS `2 BETWEEN 1 AND (3 * 3)`,(2 between 1 and 3) * 3 AS `(2 BETWEEN 1 AND 3) * 3`
+select 2 BETWEEN 1 AND 3 * 3, 2 BETWEEN 1 AND (3 * 3), (2 BETWEEN 1 AND 3) * 3 union select * from v1;
+2 BETWEEN 1 AND 3 * 3 2 BETWEEN 1 AND (3 * 3) (2 BETWEEN 1 AND 3) * 3
+1 1 3
+create or replace view v1 as select 2 BETWEEN 1 AND 3 / 3, 2 BETWEEN 1 AND (3 / 3), (2 BETWEEN 1 AND 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 / 3 AS `2 BETWEEN 1 AND 3 / 3`,2 between 1 and 3 / 3 AS `2 BETWEEN 1 AND (3 / 3)`,(2 between 1 and 3) / 3 AS `(2 BETWEEN 1 AND 3) / 3`
+select 2 BETWEEN 1 AND 3 / 3, 2 BETWEEN 1 AND (3 / 3), (2 BETWEEN 1 AND 3) / 3 union select * from v1;
+2 BETWEEN 1 AND 3 / 3 2 BETWEEN 1 AND (3 / 3) (2 BETWEEN 1 AND 3) / 3
+0 0 0.3333
+create or replace view v1 as select 2 BETWEEN 1 AND 4 DIV 2, 2 BETWEEN 1 AND (4 DIV 2), (2 BETWEEN 1 AND 4) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 4 DIV 2 AS `2 BETWEEN 1 AND 4 DIV 2`,2 between 1 and 4 DIV 2 AS `2 BETWEEN 1 AND (4 DIV 2)`,(2 between 1 and 4) DIV 2 AS `(2 BETWEEN 1 AND 4) DIV 2`
+select 2 BETWEEN 1 AND 4 DIV 2, 2 BETWEEN 1 AND (4 DIV 2), (2 BETWEEN 1 AND 4) DIV 2 union select * from v1;
+2 BETWEEN 1 AND 4 DIV 2 2 BETWEEN 1 AND (4 DIV 2) (2 BETWEEN 1 AND 4) DIV 2
+1 1 0
+create or replace view v1 as select 2 BETWEEN 1 AND 3 MOD 3, 2 BETWEEN 1 AND (3 MOD 3), (2 BETWEEN 1 AND 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 MOD 3 AS `2 BETWEEN 1 AND 3 MOD 3`,2 between 1 and 3 MOD 3 AS `2 BETWEEN 1 AND (3 MOD 3)`,(2 between 1 and 3) MOD 3 AS `(2 BETWEEN 1 AND 3) MOD 3`
+select 2 BETWEEN 1 AND 3 MOD 3, 2 BETWEEN 1 AND (3 MOD 3), (2 BETWEEN 1 AND 3) MOD 3 union select * from v1;
+2 BETWEEN 1 AND 3 MOD 3 2 BETWEEN 1 AND (3 MOD 3) (2 BETWEEN 1 AND 3) MOD 3
+0 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 % 3, 2 BETWEEN 1 AND (3 % 3), (2 BETWEEN 1 AND 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 MOD 3 AS `2 BETWEEN 1 AND 3 % 3`,2 between 1 and 3 MOD 3 AS `2 BETWEEN 1 AND (3 % 3)`,(2 between 1 and 3) MOD 3 AS `(2 BETWEEN 1 AND 3) % 3`
+select 2 BETWEEN 1 AND 3 % 3, 2 BETWEEN 1 AND (3 % 3), (2 BETWEEN 1 AND 3) % 3 union select * from v1;
+2 BETWEEN 1 AND 3 % 3 2 BETWEEN 1 AND (3 % 3) (2 BETWEEN 1 AND 3) % 3
+0 0 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 ^ 3, 2 BETWEEN 1 AND (3 ^ 3), (2 BETWEEN 1 AND 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 ^ 3 AS `2 BETWEEN 1 AND 3 ^ 3`,2 between 1 and 3 ^ 3 AS `2 BETWEEN 1 AND (3 ^ 3)`,(2 between 1 and 3) ^ 3 AS `(2 BETWEEN 1 AND 3) ^ 3`
+select 2 BETWEEN 1 AND 3 ^ 3, 2 BETWEEN 1 AND (3 ^ 3), (2 BETWEEN 1 AND 3) ^ 3 union select * from v1;
+2 BETWEEN 1 AND 3 ^ 3 2 BETWEEN 1 AND (3 ^ 3) (2 BETWEEN 1 AND 3) ^ 3
+0 0 2
+create or replace view v1 as select 2 BETWEEN 1 AND 3 BETWEEN 1 AND 3, 2 BETWEEN 1 AND (3 BETWEEN 1 AND 3), (2 BETWEEN 1 AND 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 between 1 and 3 AS `2 BETWEEN 1 AND 3 BETWEEN 1 AND 3`,2 between 1 and 3 between 1 and 3 AS `2 BETWEEN 1 AND (3 BETWEEN 1 AND 3)`,(2 between 1 and 3) between 1 and 3 AS `(2 BETWEEN 1 AND 3) BETWEEN 1 AND 3`
+select 2 BETWEEN 1 AND 3 BETWEEN 1 AND 3, 2 BETWEEN 1 AND (3 BETWEEN 1 AND 3), (2 BETWEEN 1 AND 3) BETWEEN 1 AND 3 union select * from v1;
+2 BETWEEN 1 AND 3 BETWEEN 1 AND 3 2 BETWEEN 1 AND (3 BETWEEN 1 AND 3) (2 BETWEEN 1 AND 3) BETWEEN 1 AND 3
+0 0 1
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 IS FALSE, 2 LIKE 2 ESCAPE (3 IS FALSE), (2 LIKE 2 ESCAPE 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 is false AS `2 LIKE 2 ESCAPE 3 IS FALSE`,2 like 2 escape (3 is false) AS `2 LIKE 2 ESCAPE (3 IS FALSE)`,2 like 2 escape 3 is false AS `(2 LIKE 2 ESCAPE 3) IS FALSE`
+select 2 LIKE 2 ESCAPE 3 IS FALSE, 2 LIKE 2 ESCAPE (3 IS FALSE), (2 LIKE 2 ESCAPE 3) IS FALSE union select * from v1;
+2 LIKE 2 ESCAPE 3 IS FALSE 2 LIKE 2 ESCAPE (3 IS FALSE) (2 LIKE 2 ESCAPE 3) IS FALSE
+0 1 0
+create or replace view v1 as select charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin), charset(2 LIKE 1 ESCAPE (3 COLLATE latin1_bin)), charset((2 LIKE 1 ESCAPE 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 like 1 escape 3 collate latin1_bin) AS `charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin)`,charset(2 like 1 escape 3 collate latin1_bin) AS `charset(2 LIKE 1 ESCAPE (3 COLLATE latin1_bin))`,charset((2 like 1 escape 3) collate latin1_bin) AS `charset((2 LIKE 1 ESCAPE 3) COLLATE latin1_bin)`
+select charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin), charset(2 LIKE 1 ESCAPE (3 COLLATE latin1_bin)), charset((2 LIKE 1 ESCAPE 3) COLLATE latin1_bin) union select * from v1;
+charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin) charset(2 LIKE 1 ESCAPE (3 COLLATE latin1_bin)) charset((2 LIKE 1 ESCAPE 3) COLLATE latin1_bin)
+binary binary latin1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 in (0,1) AS `2 LIKE 1 ESCAPE 3 IN(0,1)`,2 like 1 escape (3 in (0,1)) AS `2 LIKE 1 ESCAPE (3 IN(0,1))`,2 like 1 escape 3 in (0,1) AS `(2 LIKE 1 ESCAPE 3) IN(0,1)`
+select 2 LIKE 1 ESCAPE 3 IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1) union select * from v1;
+2 LIKE 1 ESCAPE 3 IN(0,1) 2 LIKE 1 ESCAPE (3 IN(0,1)) (2 LIKE 1 ESCAPE 3) IN(0,1)
+1 0 1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 OR 4, 2 LIKE 1 ESCAPE (3 OR 4), (2 LIKE 1 ESCAPE 3) OR 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 or 4 AS `2 LIKE 1 ESCAPE 3 OR 4`,2 like 1 escape (3 or 4) AS `2 LIKE 1 ESCAPE (3 OR 4)`,2 like 1 escape 3 or 4 AS `(2 LIKE 1 ESCAPE 3) OR 4`
+select 2 LIKE 1 ESCAPE 3 OR 4, 2 LIKE 1 ESCAPE (3 OR 4), (2 LIKE 1 ESCAPE 3) OR 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 OR 4 2 LIKE 1 ESCAPE (3 OR 4) (2 LIKE 1 ESCAPE 3) OR 4
+1 0 1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 || 4, 2 LIKE 1 ESCAPE (3 || 4), (2 LIKE 1 ESCAPE 3) || 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 or 4 AS `2 LIKE 1 ESCAPE 3 || 4`,2 like 1 escape (3 or 4) AS `2 LIKE 1 ESCAPE (3 || 4)`,2 like 1 escape 3 or 4 AS `(2 LIKE 1 ESCAPE 3) || 4`
+select 2 LIKE 1 ESCAPE 3 || 4, 2 LIKE 1 ESCAPE (3 || 4), (2 LIKE 1 ESCAPE 3) || 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 || 4 2 LIKE 1 ESCAPE (3 || 4) (2 LIKE 1 ESCAPE 3) || 4
+1 0 1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 XOR 4, 2 LIKE 1 ESCAPE (3 XOR 4), (2 LIKE 1 ESCAPE 3) XOR 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 xor 4 AS `2 LIKE 1 ESCAPE 3 XOR 4`,2 like 1 escape (3 xor 4) AS `2 LIKE 1 ESCAPE (3 XOR 4)`,2 like 1 escape 3 xor 4 AS `(2 LIKE 1 ESCAPE 3) XOR 4`
+select 2 LIKE 1 ESCAPE 3 XOR 4, 2 LIKE 1 ESCAPE (3 XOR 4), (2 LIKE 1 ESCAPE 3) XOR 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 XOR 4 2 LIKE 1 ESCAPE (3 XOR 4) (2 LIKE 1 ESCAPE 3) XOR 4
+1 0 1
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 AND 0, 2 LIKE 2 ESCAPE (3 AND 0), (2 LIKE 2 ESCAPE 3) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 and 0 AS `2 LIKE 2 ESCAPE 3 AND 0`,2 like 2 escape (3 and 0) AS `2 LIKE 2 ESCAPE (3 AND 0)`,2 like 2 escape 3 and 0 AS `(2 LIKE 2 ESCAPE 3) AND 0`
+select 2 LIKE 2 ESCAPE 3 AND 0, 2 LIKE 2 ESCAPE (3 AND 0), (2 LIKE 2 ESCAPE 3) AND 0 union select * from v1;
+2 LIKE 2 ESCAPE 3 AND 0 2 LIKE 2 ESCAPE (3 AND 0) (2 LIKE 2 ESCAPE 3) AND 0
+0 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 && 0, 2 LIKE 2 ESCAPE (3 && 0), (2 LIKE 2 ESCAPE 3) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 and 0 AS `2 LIKE 2 ESCAPE 3 && 0`,2 like 2 escape (3 and 0) AS `2 LIKE 2 ESCAPE (3 && 0)`,2 like 2 escape 3 and 0 AS `(2 LIKE 2 ESCAPE 3) && 0`
+select 2 LIKE 2 ESCAPE 3 && 0, 2 LIKE 2 ESCAPE (3 && 0), (2 LIKE 2 ESCAPE 3) && 0 union select * from v1;
+2 LIKE 2 ESCAPE 3 && 0 2 LIKE 2 ESCAPE (3 && 0) (2 LIKE 2 ESCAPE 3) && 0
+0 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 = 4, 2 LIKE 2 ESCAPE (3 = 4), (2 LIKE 2 ESCAPE 3) = 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 = 4 AS `2 LIKE 2 ESCAPE 3 = 4`,2 like 2 escape (3 = 4) AS `2 LIKE 2 ESCAPE (3 = 4)`,2 like 2 escape 3 = 4 AS `(2 LIKE 2 ESCAPE 3) = 4`
+select 2 LIKE 2 ESCAPE 3 = 4, 2 LIKE 2 ESCAPE (3 = 4), (2 LIKE 2 ESCAPE 3) = 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 = 4 2 LIKE 2 ESCAPE (3 = 4) (2 LIKE 2 ESCAPE 3) = 4
+0 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 <=> 4, 2 LIKE 2 ESCAPE (3 <=> 4), (2 LIKE 2 ESCAPE 3) <=> 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 <=> 4 AS `2 LIKE 2 ESCAPE 3 <=> 4`,2 like 2 escape (3 <=> 4) AS `2 LIKE 2 ESCAPE (3 <=> 4)`,2 like 2 escape 3 <=> 4 AS `(2 LIKE 2 ESCAPE 3) <=> 4`
+select 2 LIKE 2 ESCAPE 3 <=> 4, 2 LIKE 2 ESCAPE (3 <=> 4), (2 LIKE 2 ESCAPE 3) <=> 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 <=> 4 2 LIKE 2 ESCAPE (3 <=> 4) (2 LIKE 2 ESCAPE 3) <=> 4
+0 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 >= 4, 2 LIKE 2 ESCAPE (3 >= 4), (2 LIKE 2 ESCAPE 3) >= 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 >= 4 AS `2 LIKE 2 ESCAPE 3 >= 4`,2 like 2 escape (3 >= 4) AS `2 LIKE 2 ESCAPE (3 >= 4)`,2 like 2 escape 3 >= 4 AS `(2 LIKE 2 ESCAPE 3) >= 4`
+select 2 LIKE 2 ESCAPE 3 >= 4, 2 LIKE 2 ESCAPE (3 >= 4), (2 LIKE 2 ESCAPE 3) >= 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 >= 4 2 LIKE 2 ESCAPE (3 >= 4) (2 LIKE 2 ESCAPE 3) >= 4
+0 1 0
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 <= 4, 2 LIKE 1 ESCAPE (3 <= 4), (2 LIKE 1 ESCAPE 3) <= 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 <= 4 AS `2 LIKE 1 ESCAPE 3 <= 4`,2 like 1 escape (3 <= 4) AS `2 LIKE 1 ESCAPE (3 <= 4)`,2 like 1 escape 3 <= 4 AS `(2 LIKE 1 ESCAPE 3) <= 4`
+select 2 LIKE 1 ESCAPE 3 <= 4, 2 LIKE 1 ESCAPE (3 <= 4), (2 LIKE 1 ESCAPE 3) <= 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 <= 4 2 LIKE 1 ESCAPE (3 <= 4) (2 LIKE 1 ESCAPE 3) <= 4
+1 0 1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 < 4, 2 LIKE 1 ESCAPE (3 < 4), (2 LIKE 1 ESCAPE 3) < 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 < 4 AS `2 LIKE 1 ESCAPE 3 < 4`,2 like 1 escape (3 < 4) AS `2 LIKE 1 ESCAPE (3 < 4)`,2 like 1 escape 3 < 4 AS `(2 LIKE 1 ESCAPE 3) < 4`
+select 2 LIKE 1 ESCAPE 3 < 4, 2 LIKE 1 ESCAPE (3 < 4), (2 LIKE 1 ESCAPE 3) < 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 < 4 2 LIKE 1 ESCAPE (3 < 4) (2 LIKE 1 ESCAPE 3) < 4
+1 0 1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 <> 4, 2 LIKE 1 ESCAPE (3 <> 4), (2 LIKE 1 ESCAPE 3) <> 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 <> 4 AS `2 LIKE 1 ESCAPE 3 <> 4`,2 like 1 escape (3 <> 4) AS `2 LIKE 1 ESCAPE (3 <> 4)`,2 like 1 escape 3 <> 4 AS `(2 LIKE 1 ESCAPE 3) <> 4`
+select 2 LIKE 1 ESCAPE 3 <> 4, 2 LIKE 1 ESCAPE (3 <> 4), (2 LIKE 1 ESCAPE 3) <> 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 <> 4 2 LIKE 1 ESCAPE (3 <> 4) (2 LIKE 1 ESCAPE 3) <> 4
+1 0 1
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 > 4, 2 LIKE 2 ESCAPE (3 > 4), (2 LIKE 2 ESCAPE 3) > 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 > 4 AS `2 LIKE 2 ESCAPE 3 > 4`,2 like 2 escape (3 > 4) AS `2 LIKE 2 ESCAPE (3 > 4)`,2 like 2 escape 3 > 4 AS `(2 LIKE 2 ESCAPE 3) > 4`
+select 2 LIKE 2 ESCAPE 3 > 4, 2 LIKE 2 ESCAPE (3 > 4), (2 LIKE 2 ESCAPE 3) > 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 > 4 2 LIKE 2 ESCAPE (3 > 4) (2 LIKE 2 ESCAPE 3) > 4
+0 1 0
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 != 4, 2 LIKE 1 ESCAPE (3 != 4), (2 LIKE 1 ESCAPE 3) != 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 <> 4 AS `2 LIKE 1 ESCAPE 3 != 4`,2 like 1 escape (3 <> 4) AS `2 LIKE 1 ESCAPE (3 != 4)`,2 like 1 escape 3 <> 4 AS `(2 LIKE 1 ESCAPE 3) != 4`
+select 2 LIKE 1 ESCAPE 3 != 4, 2 LIKE 1 ESCAPE (3 != 4), (2 LIKE 1 ESCAPE 3) != 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 != 4 2 LIKE 1 ESCAPE (3 != 4) (2 LIKE 1 ESCAPE 3) != 4
+1 0 1
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 like 4 AS `2 LIKE 2 ESCAPE 3 LIKE 4`,2 like 2 escape (3 like 4) AS `2 LIKE 2 ESCAPE (3 LIKE 4)`,2 like 2 escape 3 like 4 AS `(2 LIKE 2 ESCAPE 3) LIKE 4`
+select 2 LIKE 2 ESCAPE 3 LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 LIKE 4 2 LIKE 2 ESCAPE (3 LIKE 4) (2 LIKE 2 ESCAPE 3) LIKE 4
+0 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 regexp 4 AS `2 LIKE 2 ESCAPE 3 REGEXP 4`,2 like 2 escape (3 regexp 4) AS `2 LIKE 2 ESCAPE (3 REGEXP 4)`,2 like 2 escape 3 regexp 4 AS `(2 LIKE 2 ESCAPE 3) REGEXP 4`
+select 2 LIKE 2 ESCAPE 3 REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 REGEXP 4 2 LIKE 2 ESCAPE (3 REGEXP 4) (2 LIKE 2 ESCAPE 3) REGEXP 4
+0 1 0
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 | 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 | 4 AS `2 LIKE 1 ESCAPE 3 | 4`,2 like 1 escape 3 | 4 AS `2 LIKE 1 ESCAPE (3 | 4)`,(2 like 1 escape 3) | 4 AS `(2 LIKE 1 ESCAPE 3) | 4`
+select 2 LIKE 1 ESCAPE 3 | 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 | 4 2 LIKE 1 ESCAPE (3 | 4) (2 LIKE 1 ESCAPE 3) | 4
+0 0 4
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 & 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 & 4 AS `2 LIKE 2 ESCAPE 3 & 4`,2 like 2 escape 3 & 4 AS `2 LIKE 2 ESCAPE (3 & 4)`,(2 like 2 escape 3) & 4 AS `(2 LIKE 2 ESCAPE 3) & 4`
+select 2 LIKE 2 ESCAPE 3 & 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 & 4 2 LIKE 2 ESCAPE (3 & 4) (2 LIKE 2 ESCAPE 3) & 4
+1 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 1 << 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 1 << 1 AS `2 LIKE 2 ESCAPE 1 << 1`,2 like 2 escape 1 << 1 AS `2 LIKE 2 ESCAPE (1 << 1)`,(2 like 2 escape 1) << 1 AS `(2 LIKE 2 ESCAPE 1) << 1`
+select 2 LIKE 2 ESCAPE 1 << 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1 union select * from v1;
+2 LIKE 2 ESCAPE 1 << 1 2 LIKE 2 ESCAPE (1 << 1) (2 LIKE 2 ESCAPE 1) << 1
+1 1 2
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 >> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 >> 4 AS `2 LIKE 2 ESCAPE 3 >> 4`,2 like 2 escape 3 >> 4 AS `2 LIKE 2 ESCAPE (3 >> 4)`,(2 like 2 escape 3) >> 4 AS `(2 LIKE 2 ESCAPE 3) >> 4`
+select 2 LIKE 2 ESCAPE 3 >> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 >> 4 2 LIKE 2 ESCAPE (3 >> 4) (2 LIKE 2 ESCAPE 3) >> 4
+1 1 0
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 +INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 + interval 1 day AS `2 LIKE 1 ESCAPE 3 +INTERVAL 1 DAY`,2 like 1 escape 3 + interval 1 day AS `2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY)`,(2 like 1 escape 3) + interval 1 day AS `(2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY`
+select 2 LIKE 1 ESCAPE 3 +INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY union select * from v1;
+2 LIKE 1 ESCAPE 3 +INTERVAL 1 DAY 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY) (2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY
+0 0 NULL
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 + 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 + 4 AS `2 LIKE 1 ESCAPE 3 + 4`,2 like 1 escape 3 + 4 AS `2 LIKE 1 ESCAPE (3 + 4)`,(2 like 1 escape 3) + 4 AS `(2 LIKE 1 ESCAPE 3) + 4`
+select 2 LIKE 1 ESCAPE 3 + 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 + 4 2 LIKE 1 ESCAPE (3 + 4) (2 LIKE 1 ESCAPE 3) + 4
+0 0 4
+create or replace view v1 as select 2 LIKE 2 ESCAPE 1 - 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 1 - 1 AS `2 LIKE 2 ESCAPE 1 - 1`,2 like 2 escape 1 - 1 AS `2 LIKE 2 ESCAPE (1 - 1)`,(2 like 2 escape 1) - 1 AS `(2 LIKE 2 ESCAPE 1) - 1`
+select 2 LIKE 2 ESCAPE 1 - 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1 union select * from v1;
+2 LIKE 2 ESCAPE 1 - 1 2 LIKE 2 ESCAPE (1 - 1) (2 LIKE 2 ESCAPE 1) - 1
+1 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 * 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 * 0 AS `2 LIKE 2 ESCAPE 3 * 0`,2 like 2 escape 3 * 0 AS `2 LIKE 2 ESCAPE (3 * 0)`,(2 like 2 escape 3) * 0 AS `(2 LIKE 2 ESCAPE 3) * 0`
+select 2 LIKE 2 ESCAPE 3 * 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0 union select * from v1;
+2 LIKE 2 ESCAPE 3 * 0 2 LIKE 2 ESCAPE (3 * 0) (2 LIKE 2 ESCAPE 3) * 0
+1 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 DIV 3 AS `2 LIKE 2 ESCAPE 3 DIV 3`,2 like 2 escape 3 DIV 3 AS `2 LIKE 2 ESCAPE (3 DIV 3)`,(2 like 2 escape 3) DIV 3 AS `(2 LIKE 2 ESCAPE 3) DIV 3`
+select 2 LIKE 2 ESCAPE 3 DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3 union select * from v1;
+2 LIKE 2 ESCAPE 3 DIV 3 2 LIKE 2 ESCAPE (3 DIV 3) (2 LIKE 2 ESCAPE 3) DIV 3
+1 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 MOD 1 AS `2 LIKE 2 ESCAPE 3 MOD 1`,2 like 2 escape 3 MOD 1 AS `2 LIKE 2 ESCAPE (3 MOD 1)`,(2 like 2 escape 3) MOD 1 AS `(2 LIKE 2 ESCAPE 3) MOD 1`
+select 2 LIKE 2 ESCAPE 3 MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1 union select * from v1;
+2 LIKE 2 ESCAPE 3 MOD 1 2 LIKE 2 ESCAPE (3 MOD 1) (2 LIKE 2 ESCAPE 3) MOD 1
+1 1 0
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 % 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 MOD 1 AS `2 LIKE 2 ESCAPE 3 % 1`,2 like 2 escape 3 MOD 1 AS `2 LIKE 2 ESCAPE (3 % 1)`,(2 like 2 escape 3) MOD 1 AS `(2 LIKE 2 ESCAPE 3) % 1`
+select 2 LIKE 2 ESCAPE 3 % 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1 union select * from v1;
+2 LIKE 2 ESCAPE 3 % 1 2 LIKE 2 ESCAPE (3 % 1) (2 LIKE 2 ESCAPE 3) % 1
+1 1 0
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 ^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 ^ 4 AS `2 LIKE 1 ESCAPE 3 ^ 4`,2 like 1 escape 3 ^ 4 AS `2 LIKE 1 ESCAPE (3 ^ 4)`,(2 like 1 escape 3) ^ 4 AS `(2 LIKE 1 ESCAPE 3) ^ 4`
+select 2 LIKE 1 ESCAPE 3 ^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4 union select * from v1;
+2 LIKE 1 ESCAPE 3 ^ 4 2 LIKE 1 ESCAPE (3 ^ 4) (2 LIKE 1 ESCAPE 3) ^ 4
+0 0 4
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BETWEEN 2 AND 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 2 escape 3 between 2 and 4 AS `2 LIKE 2 ESCAPE 3 BETWEEN 2 AND 4`,2 like 2 escape (3 between 2 and 4) AS `2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4)`,2 like 2 escape 3 between 2 and 4 AS `(2 LIKE 2 ESCAPE 3) BETWEEN 2 AND 4`
+select 2 LIKE 2 ESCAPE 3 BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BETWEEN 2 AND 4 union select * from v1;
+2 LIKE 2 ESCAPE 3 BETWEEN 2 AND 4 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4) (2 LIKE 2 ESCAPE 3) BETWEEN 2 AND 4
+0 1 0
+create or replace view v1 as select NOT 2 IN (SELECT 0 UNION SELECT 2), NOT (2 IN (SELECT 0 UNION SELECT 2)), (NOT 2) IN (SELECT 0 UNION SELECT 2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !(2 in (select 0 union select 2)) AS `NOT 2 IN (SELECT 0 UNION SELECT 2)`,!(2 in (select 0 union select 2)) AS `NOT (2 IN (SELECT 0 UNION SELECT 2))`,!2 in (select 0 union select 2) AS `(NOT 2) IN (SELECT 0 UNION SELECT 2)`
+select NOT 2 IN (SELECT 0 UNION SELECT 2), NOT (2 IN (SELECT 0 UNION SELECT 2)), (NOT 2) IN (SELECT 0 UNION SELECT 2) union select * from v1;
+NOT 2 IN (SELECT 0 UNION SELECT 2) NOT (2 IN (SELECT 0 UNION SELECT 2)) (NOT 2) IN (SELECT 0 UNION SELECT 2)
+0 0 1
+create or replace view v1 as select - 2 IN (SELECT 2 UNION SELECT 1), - (2 IN (SELECT 2 UNION SELECT 1)), (- 2) IN (SELECT 2 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -2 in (select 2 union select 1) AS `- 2 IN (SELECT 2 UNION SELECT 1)`,-(2 in (select 2 union select 1)) AS `- (2 IN (SELECT 2 UNION SELECT 1))`,-2 in (select 2 union select 1) AS `(- 2) IN (SELECT 2 UNION SELECT 1)`
+select - 2 IN (SELECT 2 UNION SELECT 1), - (2 IN (SELECT 2 UNION SELECT 1)), (- 2) IN (SELECT 2 UNION SELECT 1) union select * from v1;
+- 2 IN (SELECT 2 UNION SELECT 1) - (2 IN (SELECT 2 UNION SELECT 1)) (- 2) IN (SELECT 2 UNION SELECT 1)
+0 -1 0
+create or replace view v1 as select ~ 2 IN (SELECT 0 UNION SELECT 1), ~ (2 IN (SELECT 0 UNION SELECT 1)), (~ 2) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select ~2 in (select 0 union select 1) AS `~ 2 IN (SELECT 0 UNION SELECT 1)`,~(2 in (select 0 union select 1)) AS `~ (2 IN (SELECT 0 UNION SELECT 1))`,~2 in (select 0 union select 1) AS `(~ 2) IN (SELECT 0 UNION SELECT 1)`
+select ~ 2 IN (SELECT 0 UNION SELECT 1), ~ (2 IN (SELECT 0 UNION SELECT 1)), (~ 2) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+~ 2 IN (SELECT 0 UNION SELECT 1) ~ (2 IN (SELECT 0 UNION SELECT 1)) (~ 2) IN (SELECT 0 UNION SELECT 1)
+0 18446744073709551615 0
+create or replace view v1 as select ! 2 IN (SELECT 0 UNION SELECT 2), ! (2 IN (SELECT 0 UNION SELECT 2)), (! 2) IN (SELECT 0 UNION SELECT 2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !2 in (select 0 union select 2) AS `! 2 IN (SELECT 0 UNION SELECT 2)`,!(2 in (select 0 union select 2)) AS `! (2 IN (SELECT 0 UNION SELECT 2))`,!2 in (select 0 union select 2) AS `(! 2) IN (SELECT 0 UNION SELECT 2)`
+select ! 2 IN (SELECT 0 UNION SELECT 2), ! (2 IN (SELECT 0 UNION SELECT 2)), (! 2) IN (SELECT 0 UNION SELECT 2) union select * from v1;
+! 2 IN (SELECT 0 UNION SELECT 2) ! (2 IN (SELECT 0 UNION SELECT 2)) (! 2) IN (SELECT 0 UNION SELECT 2)
+1 0 1
+create or replace view v1 as select BINARY 'c' IN (SELECT 'C' UNION SELECT 'X'), BINARY ('c' IN (SELECT 'C' UNION SELECT 'X')), (BINARY 'c') IN (SELECT 'C' UNION SELECT 'X');
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast('c' as char charset binary) in (select 'C' union select 'X') AS `BINARY 'c' IN (SELECT 'C' UNION SELECT 'X')`,cast('c' in (select 'C' union select 'X') as char charset binary) AS `BINARY ('c' IN (SELECT 'C' UNION SELECT 'X'))`,cast('c' as char charset binary) in (select 'C' union select 'X') AS `(BINARY 'c') IN (SELECT 'C' UNION SELECT 'X')`
+select BINARY 'c' IN (SELECT 'C' UNION SELECT 'X'), BINARY ('c' IN (SELECT 'C' UNION SELECT 'X')), (BINARY 'c') IN (SELECT 'C' UNION SELECT 'X') union select * from v1;
+BINARY 'c' IN (SELECT 'C' UNION SELECT 'X') BINARY ('c' IN (SELECT 'C' UNION SELECT 'X')) (BINARY 'c') IN (SELECT 'C' UNION SELECT 'X')
+0 1 0
+create or replace view v1 as select 0 OR 3 IN (SELECT 3 UNION SELECT 10), 0 OR (3 IN (SELECT 3 UNION SELECT 10)), (0 OR 3) IN (SELECT 3 UNION SELECT 10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 in (select 3 union select 10) AS `0 OR 3 IN (SELECT 3 UNION SELECT 10)`,0 or 3 in (select 3 union select 10) AS `0 OR (3 IN (SELECT 3 UNION SELECT 10))`,(0 or 3) in (select 3 union select 10) AS `(0 OR 3) IN (SELECT 3 UNION SELECT 10)`
+select 0 OR 3 IN (SELECT 3 UNION SELECT 10), 0 OR (3 IN (SELECT 3 UNION SELECT 10)), (0 OR 3) IN (SELECT 3 UNION SELECT 10) union select * from v1;
+0 OR 3 IN (SELECT 3 UNION SELECT 10) 0 OR (3 IN (SELECT 3 UNION SELECT 10)) (0 OR 3) IN (SELECT 3 UNION SELECT 10)
+1 1 0
+create or replace view v1 as select 0 || 3 IN (SELECT 3 UNION SELECT 10), 0 || (3 IN (SELECT 3 UNION SELECT 10)), (0 || 3) IN (SELECT 3 UNION SELECT 10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 or 3 in (select 3 union select 10) AS `0 || 3 IN (SELECT 3 UNION SELECT 10)`,0 or 3 in (select 3 union select 10) AS `0 || (3 IN (SELECT 3 UNION SELECT 10))`,(0 or 3) in (select 3 union select 10) AS `(0 || 3) IN (SELECT 3 UNION SELECT 10)`
+select 0 || 3 IN (SELECT 3 UNION SELECT 10), 0 || (3 IN (SELECT 3 UNION SELECT 10)), (0 || 3) IN (SELECT 3 UNION SELECT 10) union select * from v1;
+0 || 3 IN (SELECT 3 UNION SELECT 10) 0 || (3 IN (SELECT 3 UNION SELECT 10)) (0 || 3) IN (SELECT 3 UNION SELECT 10)
+1 1 0
+create or replace view v1 as select 2 XOR 3 IN (SELECT 4 UNION SELECT 5), 2 XOR (3 IN (SELECT 4 UNION SELECT 5)), (2 XOR 3) IN (SELECT 4 UNION SELECT 5);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor 3 in (select 4 union select 5) AS `2 XOR 3 IN (SELECT 4 UNION SELECT 5)`,2 xor 3 in (select 4 union select 5) AS `2 XOR (3 IN (SELECT 4 UNION SELECT 5))`,(2 xor 3) in (select 4 union select 5) AS `(2 XOR 3) IN (SELECT 4 UNION SELECT 5)`
+select 2 XOR 3 IN (SELECT 4 UNION SELECT 5), 2 XOR (3 IN (SELECT 4 UNION SELECT 5)), (2 XOR 3) IN (SELECT 4 UNION SELECT 5) union select * from v1;
+2 XOR 3 IN (SELECT 4 UNION SELECT 5) 2 XOR (3 IN (SELECT 4 UNION SELECT 5)) (2 XOR 3) IN (SELECT 4 UNION SELECT 5)
+1 1 0
+create or replace view v1 as select 2 AND 3 IN (SELECT 0 UNION SELECT 1), 2 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 AND 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 in (select 0 union select 1) AS `2 AND 3 IN (SELECT 0 UNION SELECT 1)`,2 and 3 in (select 0 union select 1) AS `2 AND (3 IN (SELECT 0 UNION SELECT 1))`,(2 and 3) in (select 0 union select 1) AS `(2 AND 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 AND 3 IN (SELECT 0 UNION SELECT 1), 2 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 AND 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 AND 3 IN (SELECT 0 UNION SELECT 1) 2 AND (3 IN (SELECT 0 UNION SELECT 1)) (2 AND 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 && 3 IN (SELECT 0 UNION SELECT 1), 2 && (3 IN (SELECT 0 UNION SELECT 1)), (2 && 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 and 3 in (select 0 union select 1) AS `2 && 3 IN (SELECT 0 UNION SELECT 1)`,2 and 3 in (select 0 union select 1) AS `2 && (3 IN (SELECT 0 UNION SELECT 1))`,(2 and 3) in (select 0 union select 1) AS `(2 && 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 && 3 IN (SELECT 0 UNION SELECT 1), 2 && (3 IN (SELECT 0 UNION SELECT 1)), (2 && 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 && 3 IN (SELECT 0 UNION SELECT 1) 2 && (3 IN (SELECT 0 UNION SELECT 1)) (2 && 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 = 3 IN (SELECT 0 UNION SELECT 1), 2 = (3 IN (SELECT 0 UNION SELECT 1)), (2 = 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = 3 in (select 0 union select 1) AS `2 = 3 IN (SELECT 0 UNION SELECT 1)`,2 = 3 in (select 0 union select 1) AS `2 = (3 IN (SELECT 0 UNION SELECT 1))`,(2 = 3) in (select 0 union select 1) AS `(2 = 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 = 3 IN (SELECT 0 UNION SELECT 1), 2 = (3 IN (SELECT 0 UNION SELECT 1)), (2 = 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 = 3 IN (SELECT 0 UNION SELECT 1) 2 = (3 IN (SELECT 0 UNION SELECT 1)) (2 = 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 <=> 3 IN (SELECT 0 UNION SELECT 1), 2 <=> (3 IN (SELECT 0 UNION SELECT 1)), (2 <=> 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> 3 in (select 0 union select 1) AS `2 <=> 3 IN (SELECT 0 UNION SELECT 1)`,2 <=> 3 in (select 0 union select 1) AS `2 <=> (3 IN (SELECT 0 UNION SELECT 1))`,(2 <=> 3) in (select 0 union select 1) AS `(2 <=> 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 <=> 3 IN (SELECT 0 UNION SELECT 1), 2 <=> (3 IN (SELECT 0 UNION SELECT 1)), (2 <=> 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 <=> 3 IN (SELECT 0 UNION SELECT 1) 2 <=> (3 IN (SELECT 0 UNION SELECT 1)) (2 <=> 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 >= 3 IN (SELECT 1 UNION SELECT 1), 2 >= (3 IN (SELECT 1 UNION SELECT 1)), (2 >= 3) IN (SELECT 1 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= 3 in (select 1 union select 1) AS `2 >= 3 IN (SELECT 1 UNION SELECT 1)`,2 >= 3 in (select 1 union select 1) AS `2 >= (3 IN (SELECT 1 UNION SELECT 1))`,(2 >= 3) in (select 1 union select 1) AS `(2 >= 3) IN (SELECT 1 UNION SELECT 1)`
+select 2 >= 3 IN (SELECT 1 UNION SELECT 1), 2 >= (3 IN (SELECT 1 UNION SELECT 1)), (2 >= 3) IN (SELECT 1 UNION SELECT 1) union select * from v1;
+2 >= 3 IN (SELECT 1 UNION SELECT 1) 2 >= (3 IN (SELECT 1 UNION SELECT 1)) (2 >= 3) IN (SELECT 1 UNION SELECT 1)
+1 1 0
+create or replace view v1 as select 2 <= 3 IN (SELECT 0 UNION SELECT 1), 2 <= (3 IN (SELECT 0 UNION SELECT 1)), (2 <= 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= 3 in (select 0 union select 1) AS `2 <= 3 IN (SELECT 0 UNION SELECT 1)`,2 <= 3 in (select 0 union select 1) AS `2 <= (3 IN (SELECT 0 UNION SELECT 1))`,(2 <= 3) in (select 0 union select 1) AS `(2 <= 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 <= 3 IN (SELECT 0 UNION SELECT 1), 2 <= (3 IN (SELECT 0 UNION SELECT 1)), (2 <= 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 <= 3 IN (SELECT 0 UNION SELECT 1) 2 <= (3 IN (SELECT 0 UNION SELECT 1)) (2 <= 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 < 3 IN (SELECT 0 UNION SELECT 1), 2 < (3 IN (SELECT 0 UNION SELECT 1)), (2 < 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < 3 in (select 0 union select 1) AS `2 < 3 IN (SELECT 0 UNION SELECT 1)`,2 < 3 in (select 0 union select 1) AS `2 < (3 IN (SELECT 0 UNION SELECT 1))`,(2 < 3) in (select 0 union select 1) AS `(2 < 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 < 3 IN (SELECT 0 UNION SELECT 1), 2 < (3 IN (SELECT 0 UNION SELECT 1)), (2 < 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 < 3 IN (SELECT 0 UNION SELECT 1) 2 < (3 IN (SELECT 0 UNION SELECT 1)) (2 < 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 <> 3 IN (SELECT 0 UNION SELECT 0), 2 <> (3 IN (SELECT 0 UNION SELECT 0)), (2 <> 3) IN (SELECT 0 UNION SELECT 0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 in (select 0 union select 0) AS `2 <> 3 IN (SELECT 0 UNION SELECT 0)`,2 <> 3 in (select 0 union select 0) AS `2 <> (3 IN (SELECT 0 UNION SELECT 0))`,(2 <> 3) in (select 0 union select 0) AS `(2 <> 3) IN (SELECT 0 UNION SELECT 0)`
+select 2 <> 3 IN (SELECT 0 UNION SELECT 0), 2 <> (3 IN (SELECT 0 UNION SELECT 0)), (2 <> 3) IN (SELECT 0 UNION SELECT 0) union select * from v1;
+2 <> 3 IN (SELECT 0 UNION SELECT 0) 2 <> (3 IN (SELECT 0 UNION SELECT 0)) (2 <> 3) IN (SELECT 0 UNION SELECT 0)
+1 1 0
+create or replace view v1 as select 2 > 3 IN (SELECT 1 UNION SELECT 1), 2 > (3 IN (SELECT 1 UNION SELECT 1)), (2 > 3) IN (SELECT 1 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 > 3 in (select 1 union select 1) AS `2 > 3 IN (SELECT 1 UNION SELECT 1)`,2 > 3 in (select 1 union select 1) AS `2 > (3 IN (SELECT 1 UNION SELECT 1))`,(2 > 3) in (select 1 union select 1) AS `(2 > 3) IN (SELECT 1 UNION SELECT 1)`
+select 2 > 3 IN (SELECT 1 UNION SELECT 1), 2 > (3 IN (SELECT 1 UNION SELECT 1)), (2 > 3) IN (SELECT 1 UNION SELECT 1) union select * from v1;
+2 > 3 IN (SELECT 1 UNION SELECT 1) 2 > (3 IN (SELECT 1 UNION SELECT 1)) (2 > 3) IN (SELECT 1 UNION SELECT 1)
+1 1 0
+create or replace view v1 as select 2 != 3 IN (SELECT 0 UNION SELECT 0), 2 != (3 IN (SELECT 0 UNION SELECT 0)), (2 != 3) IN (SELECT 0 UNION SELECT 0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <> 3 in (select 0 union select 0) AS `2 != 3 IN (SELECT 0 UNION SELECT 0)`,2 <> 3 in (select 0 union select 0) AS `2 != (3 IN (SELECT 0 UNION SELECT 0))`,(2 <> 3) in (select 0 union select 0) AS `(2 != 3) IN (SELECT 0 UNION SELECT 0)`
+select 2 != 3 IN (SELECT 0 UNION SELECT 0), 2 != (3 IN (SELECT 0 UNION SELECT 0)), (2 != 3) IN (SELECT 0 UNION SELECT 0) union select * from v1;
+2 != 3 IN (SELECT 0 UNION SELECT 0) 2 != (3 IN (SELECT 0 UNION SELECT 0)) (2 != 3) IN (SELECT 0 UNION SELECT 0)
+1 1 0
+create or replace view v1 as select 2 LIKE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 3 in (select 0 union select 1) AS `2 LIKE 3 IN (SELECT 0 UNION SELECT 1)`,2 like (3 in (select 0 union select 1)) AS `2 LIKE (3 IN (SELECT 0 UNION SELECT 1))`,2 like 3 in (select 0 union select 1) AS `(2 LIKE 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 LIKE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 LIKE 3 IN (SELECT 0 UNION SELECT 1) 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)) (2 LIKE 3) IN (SELECT 0 UNION SELECT 1)
+1 0 1
+create or replace view v1 as select 2 REGEXP 3 IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 REGEXP 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp 3 in (select 0 union select 1) AS `2 REGEXP 3 IN (SELECT 0 UNION SELECT 1)`,2 regexp (3 in (select 0 union select 1)) AS `2 REGEXP (3 IN (SELECT 0 UNION SELECT 1))`,2 regexp 3 in (select 0 union select 1) AS `(2 REGEXP 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 REGEXP 3 IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 REGEXP 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 REGEXP 3 IN (SELECT 0 UNION SELECT 1) 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)) (2 REGEXP 3) IN (SELECT 0 UNION SELECT 1)
+1 0 1
+create or replace view v1 as select 2 | 3 IN (SELECT 0 UNION SELECT 1), 2 | (3 IN (SELECT 0 UNION SELECT 1)), (2 | 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | 3 in (select 0 union select 1) AS `2 | 3 IN (SELECT 0 UNION SELECT 1)`,2 | (3 in (select 0 union select 1)) AS `2 | (3 IN (SELECT 0 UNION SELECT 1))`,2 | 3 in (select 0 union select 1) AS `(2 | 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 | 3 IN (SELECT 0 UNION SELECT 1), 2 | (3 IN (SELECT 0 UNION SELECT 1)), (2 | 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 | 3 IN (SELECT 0 UNION SELECT 1) 2 | (3 IN (SELECT 0 UNION SELECT 1)) (2 | 3) IN (SELECT 0 UNION SELECT 1)
+0 2 0
+create or replace view v1 as select 2 & 4 IN (SELECT 0 UNION SELECT 1), 2 & (4 IN (SELECT 0 UNION SELECT 1)), (2 & 4) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & 4 in (select 0 union select 1) AS `2 & 4 IN (SELECT 0 UNION SELECT 1)`,2 & (4 in (select 0 union select 1)) AS `2 & (4 IN (SELECT 0 UNION SELECT 1))`,2 & 4 in (select 0 union select 1) AS `(2 & 4) IN (SELECT 0 UNION SELECT 1)`
+select 2 & 4 IN (SELECT 0 UNION SELECT 1), 2 & (4 IN (SELECT 0 UNION SELECT 1)), (2 & 4) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 & 4 IN (SELECT 0 UNION SELECT 1) 2 & (4 IN (SELECT 0 UNION SELECT 1)) (2 & 4) IN (SELECT 0 UNION SELECT 1)
+1 0 1
+create or replace view v1 as select 2 << 3 IN (SELECT 0 UNION SELECT 1), 2 << (3 IN (SELECT 0 UNION SELECT 1)), (2 << 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << 3 in (select 0 union select 1) AS `2 << 3 IN (SELECT 0 UNION SELECT 1)`,2 << (3 in (select 0 union select 1)) AS `2 << (3 IN (SELECT 0 UNION SELECT 1))`,2 << 3 in (select 0 union select 1) AS `(2 << 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 << 3 IN (SELECT 0 UNION SELECT 1), 2 << (3 IN (SELECT 0 UNION SELECT 1)), (2 << 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 << 3 IN (SELECT 0 UNION SELECT 1) 2 << (3 IN (SELECT 0 UNION SELECT 1)) (2 << 3) IN (SELECT 0 UNION SELECT 1)
+0 2 0
+create or replace view v1 as select 2 >> 3 IN (SELECT 0 UNION SELECT 1), 2 >> (3 IN (SELECT 0 UNION SELECT 1)), (2 >> 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> 3 in (select 0 union select 1) AS `2 >> 3 IN (SELECT 0 UNION SELECT 1)`,2 >> (3 in (select 0 union select 1)) AS `2 >> (3 IN (SELECT 0 UNION SELECT 1))`,2 >> 3 in (select 0 union select 1) AS `(2 >> 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 >> 3 IN (SELECT 0 UNION SELECT 1), 2 >> (3 IN (SELECT 0 UNION SELECT 1)), (2 >> 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 >> 3 IN (SELECT 0 UNION SELECT 1) 2 >> (3 IN (SELECT 0 UNION SELECT 1)) (2 >> 3) IN (SELECT 0 UNION SELECT 1)
+1 2 1
+create or replace view v1 as select 2 + 3 IN (SELECT 0 UNION SELECT 1), 2 + (3 IN (SELECT 0 UNION SELECT 1)), (2 + 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + 3 in (select 0 union select 1) AS `2 + 3 IN (SELECT 0 UNION SELECT 1)`,2 + (3 in (select 0 union select 1)) AS `2 + (3 IN (SELECT 0 UNION SELECT 1))`,2 + 3 in (select 0 union select 1) AS `(2 + 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 + 3 IN (SELECT 0 UNION SELECT 1), 2 + (3 IN (SELECT 0 UNION SELECT 1)), (2 + 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 + 3 IN (SELECT 0 UNION SELECT 1) 2 + (3 IN (SELECT 0 UNION SELECT 1)) (2 + 3) IN (SELECT 0 UNION SELECT 1)
+0 2 0
+create or replace view v1 as select 2 - 3 IN (SELECT 0 UNION SELECT 1), 2 - (3 IN (SELECT 0 UNION SELECT 1)), (2 - 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - 3 in (select 0 union select 1) AS `2 - 3 IN (SELECT 0 UNION SELECT 1)`,2 - (3 in (select 0 union select 1)) AS `2 - (3 IN (SELECT 0 UNION SELECT 1))`,2 - 3 in (select 0 union select 1) AS `(2 - 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 - 3 IN (SELECT 0 UNION SELECT 1), 2 - (3 IN (SELECT 0 UNION SELECT 1)), (2 - 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 - 3 IN (SELECT 0 UNION SELECT 1) 2 - (3 IN (SELECT 0 UNION SELECT 1)) (2 - 3) IN (SELECT 0 UNION SELECT 1)
+0 2 0
+create or replace view v1 as select 2 * 0 IN (SELECT 0 UNION SELECT 1), 2 * (0 IN (SELECT 0 UNION SELECT 1)), (2 * 0) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * 0 in (select 0 union select 1) AS `2 * 0 IN (SELECT 0 UNION SELECT 1)`,2 * (0 in (select 0 union select 1)) AS `2 * (0 IN (SELECT 0 UNION SELECT 1))`,2 * 0 in (select 0 union select 1) AS `(2 * 0) IN (SELECT 0 UNION SELECT 1)`
+select 2 * 0 IN (SELECT 0 UNION SELECT 1), 2 * (0 IN (SELECT 0 UNION SELECT 1)), (2 * 0) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 * 0 IN (SELECT 0 UNION SELECT 1) 2 * (0 IN (SELECT 0 UNION SELECT 1)) (2 * 0) IN (SELECT 0 UNION SELECT 1)
+1 2 1
+create or replace view v1 as select 2 / 3 IN (SELECT 0 UNION SELECT 1), 2 / (3 IN (SELECT 0 UNION SELECT 1)), (2 / 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / 3 in (select 0 union select 1) AS `2 / 3 IN (SELECT 0 UNION SELECT 1)`,2 / (3 in (select 0 union select 1)) AS `2 / (3 IN (SELECT 0 UNION SELECT 1))`,2 / 3 in (select 0 union select 1) AS `(2 / 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 / 3 IN (SELECT 0 UNION SELECT 1), 2 / (3 IN (SELECT 0 UNION SELECT 1)), (2 / 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 / 3 IN (SELECT 0 UNION SELECT 1) 2 / (3 IN (SELECT 0 UNION SELECT 1)) (2 / 3) IN (SELECT 0 UNION SELECT 1)
+0 NULL 0
+create or replace view v1 as select 2 DIV 3 IN (SELECT 0 UNION SELECT 1), 2 DIV (3 IN (SELECT 0 UNION SELECT 1)), (2 DIV 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV 3 in (select 0 union select 1) AS `2 DIV 3 IN (SELECT 0 UNION SELECT 1)`,2 DIV (3 in (select 0 union select 1)) AS `2 DIV (3 IN (SELECT 0 UNION SELECT 1))`,2 DIV 3 in (select 0 union select 1) AS `(2 DIV 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 DIV 3 IN (SELECT 0 UNION SELECT 1), 2 DIV (3 IN (SELECT 0 UNION SELECT 1)), (2 DIV 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 DIV 3 IN (SELECT 0 UNION SELECT 1) 2 DIV (3 IN (SELECT 0 UNION SELECT 1)) (2 DIV 3) IN (SELECT 0 UNION SELECT 1)
+1 NULL 1
+create or replace view v1 as select 2 MOD 3 IN (SELECT 0 UNION SELECT 1), 2 MOD (3 IN (SELECT 0 UNION SELECT 1)), (2 MOD 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 in (select 0 union select 1) AS `2 MOD 3 IN (SELECT 0 UNION SELECT 1)`,2 MOD (3 in (select 0 union select 1)) AS `2 MOD (3 IN (SELECT 0 UNION SELECT 1))`,2 MOD 3 in (select 0 union select 1) AS `(2 MOD 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 MOD 3 IN (SELECT 0 UNION SELECT 1), 2 MOD (3 IN (SELECT 0 UNION SELECT 1)), (2 MOD 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 MOD 3 IN (SELECT 0 UNION SELECT 1) 2 MOD (3 IN (SELECT 0 UNION SELECT 1)) (2 MOD 3) IN (SELECT 0 UNION SELECT 1)
+0 NULL 0
+create or replace view v1 as select 2 % 3 IN (SELECT 0 UNION SELECT 1), 2 % (3 IN (SELECT 0 UNION SELECT 1)), (2 % 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD 3 in (select 0 union select 1) AS `2 % 3 IN (SELECT 0 UNION SELECT 1)`,2 MOD (3 in (select 0 union select 1)) AS `2 % (3 IN (SELECT 0 UNION SELECT 1))`,2 MOD 3 in (select 0 union select 1) AS `(2 % 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 % 3 IN (SELECT 0 UNION SELECT 1), 2 % (3 IN (SELECT 0 UNION SELECT 1)), (2 % 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 % 3 IN (SELECT 0 UNION SELECT 1) 2 % (3 IN (SELECT 0 UNION SELECT 1)) (2 % 3) IN (SELECT 0 UNION SELECT 1)
+0 NULL 0
+create or replace view v1 as select 2 ^ 3 IN (SELECT 0 UNION SELECT 1), 2 ^ (3 IN (SELECT 0 UNION SELECT 1)), (2 ^ 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ 3 in (select 0 union select 1) AS `2 ^ 3 IN (SELECT 0 UNION SELECT 1)`,2 ^ (3 in (select 0 union select 1)) AS `2 ^ (3 IN (SELECT 0 UNION SELECT 1))`,2 ^ 3 in (select 0 union select 1) AS `(2 ^ 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 ^ 3 IN (SELECT 0 UNION SELECT 1), 2 ^ (3 IN (SELECT 0 UNION SELECT 1)), (2 ^ 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 ^ 3 IN (SELECT 0 UNION SELECT 1) 2 ^ (3 IN (SELECT 0 UNION SELECT 1)) (2 ^ 3) IN (SELECT 0 UNION SELECT 1)
+1 2 1
+create or replace view v1 as select 2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1), 2 BETWEEN 1 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 BETWEEN 1 AND 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and 3 in (select 0 union select 1) AS `2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1)`,2 between 1 and 3 in (select 0 union select 1) AS `2 BETWEEN 1 AND (3 IN (SELECT 0 UNION SELECT 1))`,(2 between 1 and 3) in (select 0 union select 1) AS `(2 BETWEEN 1 AND 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1), 2 BETWEEN 1 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 BETWEEN 1 AND 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1) 2 BETWEEN 1 AND (3 IN (SELECT 0 UNION SELECT 1)) (2 BETWEEN 1 AND 3) IN (SELECT 0 UNION SELECT 1)
+0 0 1
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like 1 escape 3 in (select 0 union select 1) AS `2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1)`,2 like 1 escape (3 in (select 0 union select 1)) AS `2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1))`,2 like 1 escape 3 in (select 0 union select 1) AS `(2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1)`
+select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1) 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)) (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1)
+1 0 1
+create or replace view v1 as select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 3 between 1 and 2 and NULL AS `3 BETWEEN 1 AND 2 AND NULL`,3 between (1 and 2) and NULL AS `3 BETWEEN (1 AND 2) AND NULL`,3 between 1 and (2 and NULL) AS `3 BETWEEN 1 AND (2 AND NULL)`,3 between 1 and 2 and NULL AS `(3 BETWEEN 1 AND 2) AND NULL`
+select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL union select * from v1;
+3 BETWEEN 1 AND 2 AND NULL 3 BETWEEN (1 AND 2) AND NULL 3 BETWEEN 1 AND (2 AND NULL) (3 BETWEEN 1 AND 2) AND NULL
+0 NULL NULL 0
+set sql_mode=PIPES_AS_CONCAT;
+create or replace view v1 as select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 or concat(3,3) AS `2 OR 3 || 3`,2 or concat(3,3) AS `2 OR (3 || 3)`,concat(2 or 3,3) AS `(2 OR 3) || 3`
+select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3 union select * from v1;
+2 OR 3 || 3 2 OR (3 || 3) (2 OR 3) || 3
+1 1 13
+create or replace view v1 as select 2 || 3 OR 3, 2 || (3 OR 3), (2 || 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) or 3 AS `2 || 3 OR 3`,concat(2,3 or 3) AS `2 || (3 OR 3)`,concat(2,3) or 3 AS `(2 || 3) OR 3`
+select 2 || 3 OR 3, 2 || (3 OR 3), (2 || 3) OR 3 union select * from v1;
+2 || 3 OR 3 2 || (3 OR 3) (2 || 3) OR 3
+1 21 1
+create or replace view v1 as select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !concat(2,3) AS `NOT 2 || 3`,!concat(2,3) AS `NOT (2 || 3)`,concat(!2,3) AS `(NOT 2) || 3`
+select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3 union select * from v1;
+NOT 2 || 3 NOT (2 || 3) (NOT 2) || 3
+0 0 03
+create or replace view v1 as select - '2 ' || 3, - ('2 ' || 3), (- '2 ') || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(-'2 ',3) AS `- '2 ' || 3`,-concat('2 ',3) AS `- ('2 ' || 3)`,concat(-'2 ',3) AS `(- '2 ') || 3`
+select - '2 ' || 3, - ('2 ' || 3), (- '2 ') || 3 union select * from v1;
+- '2 ' || 3 - ('2 ' || 3) (- '2 ') || 3
+-23 -2 -23
+create or replace view v1 as select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(~2,3) AS `~ 2 || 3`,~concat(2,3) AS `~ (2 || 3)`,concat(~2,3) AS `(~ 2) || 3`
+select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3 union select * from v1;
+~ 2 || 3 ~ (2 || 3) (~ 2) || 3
+184467440737095516133 18446744073709551592 184467440737095516133
+create or replace view v1 as select ! 2 || 3, ! (2 || 3), (! 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(!2,3) AS `! 2 || 3`,!concat(2,3) AS `! (2 || 3)`,concat(!2,3) AS `(! 2) || 3`
+select ! 2 || 3, ! (2 || 3), (! 2) || 3 union select * from v1;
+! 2 || 3 ! (2 || 3) (! 2) || 3
+03 0 03
+create or replace view v1 as select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) is false AS `2 || 3 IS FALSE`,concat(2,3 is false) AS `2 || (3 IS FALSE)`,concat(2,3) is false AS `(2 || 3) IS FALSE`
+select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE union select * from v1;
+2 || 3 IS FALSE 2 || (3 IS FALSE) (2 || 3) IS FALSE
+0 20 0
+create or replace view v1 as select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(0,3) in (3,10) AS `0 || 3 IN (3,10)`,concat(0,3 in (3,10)) AS `0 || (3 IN (3,10))`,concat(0,3) in (3,10) AS `(0 || 3) IN (3,10)`
+select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10) union select * from v1;
+0 || 3 IN (3,10) 0 || (3 IN (3,10)) (0 || 3) IN (3,10)
+1 01 1
+create or replace view v1 as select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(1,0) xor 1 AS `1 || 0 XOR 1`,concat(1,0 xor 1) AS `1 || (0 XOR 1)`,concat(1,0) xor 1 AS `(1 || 0) XOR 1`
+select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1 union select * from v1;
+1 || 0 XOR 1 1 || (0 XOR 1) (1 || 0) XOR 1
+0 11 0
+create or replace view v1 as select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(1,1) and 0 AS `1 || 1 AND 0`,concat(1,1 and 0) AS `1 || (1 AND 0)`,concat(1,1) and 0 AS `(1 || 1) AND 0`
+select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0 union select * from v1;
+1 || 1 AND 0 1 || (1 AND 0) (1 || 1) AND 0
+0 10 0
+create or replace view v1 as select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(1,1) and 0 AS `1 || 1 && 0`,concat(1,1 and 0) AS `1 || (1 && 0)`,concat(1,1) and 0 AS `(1 || 1) && 0`
+select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0 union select * from v1;
+1 || 1 && 0 1 || (1 && 0) (1 || 1) && 0
+0 10 0
+create or replace view v1 as select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) = 3 AS `2 || 3 = 3`,concat(2,3 = 3) AS `2 || (3 = 3)`,concat(2,3) = 3 AS `(2 || 3) = 3`
+select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3 union select * from v1;
+2 || 3 = 3 2 || (3 = 3) (2 || 3) = 3
+0 21 0
+create or replace view v1 as select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) <=> 3 AS `2 || 3 <=> 3`,concat(2,3 <=> 3) AS `2 || (3 <=> 3)`,concat(2,3) <=> 3 AS `(2 || 3) <=> 3`
+select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3 union select * from v1;
+2 || 3 <=> 3 2 || (3 <=> 3) (2 || 3) <=> 3
+0 21 0
+create or replace view v1 as select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) >= 3 AS `2 || 3 >= 3`,concat(2,3 >= 3) AS `2 || (3 >= 3)`,concat(2,3) >= 3 AS `(2 || 3) >= 3`
+select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3 union select * from v1;
+2 || 3 >= 3 2 || (3 >= 3) (2 || 3) >= 3
+1 21 1
+create or replace view v1 as select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) <= 0 AS `2 || 3 <= 0`,concat(2,3 <= 0) AS `2 || (3 <= 0)`,concat(2,3) <= 0 AS `(2 || 3) <= 0`
+select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0 union select * from v1;
+2 || 3 <= 0 2 || (3 <= 0) (2 || 3) <= 0
+0 20 0
+create or replace view v1 as select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) < 0 AS `2 || 3 < 0`,concat(2,3 < 0) AS `2 || (3 < 0)`,concat(2,3) < 0 AS `(2 || 3) < 0`
+select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0 union select * from v1;
+2 || 3 < 0 2 || (3 < 0) (2 || 3) < 0
+0 20 0
+create or replace view v1 as select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(0,3) <> 3 AS `0 || 3 <> 3`,concat(0,3 <> 3) AS `0 || (3 <> 3)`,concat(0,3) <> 3 AS `(0 || 3) <> 3`
+select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3 union select * from v1;
+0 || 3 <> 3 0 || (3 <> 3) (0 || 3) <> 3
+0 00 0
+create or replace view v1 as select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) > 3 AS `2 || 3 > 3`,concat(2,3 > 3) AS `2 || (3 > 3)`,concat(2,3) > 3 AS `(2 || 3) > 3`
+select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3 union select * from v1;
+2 || 3 > 3 2 || (3 > 3) (2 || 3) > 3
+1 20 1
+create or replace view v1 as select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(0,3) <> 3 AS `0 || 3 != 3`,concat(0,3 <> 3) AS `0 || (3 != 3)`,concat(0,3) <> 3 AS `(0 || 3) != 3`
+select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3 union select * from v1;
+0 || 3 != 3 0 || (3 != 3) (0 || 3) != 3
+0 00 0
+create or replace view v1 as select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) like 3 AS `2 || 3 LIKE 3`,concat(2,3 like 3) AS `2 || (3 LIKE 3)`,concat(2,3) like 3 AS `(2 || 3) LIKE 3`
+select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3 union select * from v1;
+2 || 3 LIKE 3 2 || (3 LIKE 3) (2 || 3) LIKE 3
+0 21 0
+create or replace view v1 as select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) regexp 3 AS `2 || 3 REGEXP 3`,concat(2,3 regexp 3) AS `2 || (3 REGEXP 3)`,concat(2,3) regexp 3 AS `(2 || 3) REGEXP 3`
+select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3 union select * from v1;
+2 || 3 REGEXP 3 2 || (3 REGEXP 3) (2 || 3) REGEXP 3
+1 21 1
+create or replace view v1 as select 2 || ' 3' | 3, 2 || (' 3' | 3), (2 || ' 3') | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,' 3') | 3 AS `2 || ' 3' | 3`,concat(2,' 3' | 3) AS `2 || (' 3' | 3)`,concat(2,' 3') | 3 AS `(2 || ' 3') | 3`
+select 2 || ' 3' | 3, 2 || (' 3' | 3), (2 || ' 3') | 3 union select * from v1;
+2 || ' 3' | 3 2 || (' 3' | 3) (2 || ' 3') | 3
+3 23 3
+create or replace view v1 as select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(0,2) & 2 AS `0 || 2 & 2`,concat(0,2 & 2) AS `0 || (2 & 2)`,concat(0,2) & 2 AS `(0 || 2) & 2`
+select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2 union select * from v1;
+0 || 2 & 2 0 || (2 & 2) (0 || 2) & 2
+2 02 2
+create or replace view v1 as select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) << 3 AS `2 || 3 << 3`,concat(2,3 << 3) AS `2 || (3 << 3)`,concat(2,3) << 3 AS `(2 || 3) << 3`
+select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3 union select * from v1;
+2 || 3 << 3 2 || (3 << 3) (2 || 3) << 3
+184 224 184
+create or replace view v1 as select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) >> 3 AS `2 || 3 >> 3`,concat(2,3 >> 3) AS `2 || (3 >> 3)`,concat(2,3) >> 3 AS `(2 || 3) >> 3`
+select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3 union select * from v1;
+2 || 3 >> 3 2 || (3 >> 3) (2 || 3) >> 3
+2 20 2
+create or replace view v1 as select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,'2000-01-01') + interval 1 day AS `2 || '2000-01-01' +INTERVAL 1 DAY`,concat(2,'2000-01-01' + interval 1 day) AS `2 || ('2000-01-01' +INTERVAL 1 DAY)`,concat(2,'2000-01-01') + interval 1 day AS `(2 || '2000-01-01') +INTERVAL 1 DAY`
+select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+2 || '2000-01-01' +INTERVAL 1 DAY 2 || ('2000-01-01' +INTERVAL 1 DAY) (2 || '2000-01-01') +INTERVAL 1 DAY
+NULL 22000-01-02 NULL
+create or replace view v1 as select 2 || ' 3' + 3, 2 || (' 3' + 3), (2 || ' 3') + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,' 3') + 3 AS `2 || ' 3' + 3`,concat(2,' 3' + 3) AS `2 || (' 3' + 3)`,concat(2,' 3') + 3 AS `(2 || ' 3') + 3`
+select 2 || ' 3' + 3, 2 || (' 3' + 3), (2 || ' 3') + 3 union select * from v1;
+2 || ' 3' + 3 2 || (' 3' + 3) (2 || ' 3') + 3
+5 26 5
+create or replace view v1 as select 2 || ' 3' - 3, 2 || (' 3' - 3), (2 || ' 3') - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,' 3') - 3 AS `2 || ' 3' - 3`,concat(2,' 3' - 3) AS `2 || (' 3' - 3)`,concat(2,' 3') - 3 AS `(2 || ' 3') - 3`
+select 2 || ' 3' - 3, 2 || (' 3' - 3), (2 || ' 3') - 3 union select * from v1;
+2 || ' 3' - 3 2 || (' 3' - 3) (2 || ' 3') - 3
+-1 20 -1
+create or replace view v1 as select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) * 3 AS `2 || 3 * 3`,concat(2,3 * 3) AS `2 || (3 * 3)`,concat(2,3) * 3 AS `(2 || 3) * 3`
+select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3 union select * from v1;
+2 || 3 * 3 2 || (3 * 3) (2 || 3) * 3
+69 29 69
+create or replace view v1 as select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) / 3 AS `2 || 3 / 3`,concat(2,3 / 3) AS `2 || (3 / 3)`,concat(2,3) / 3 AS `(2 || 3) / 3`
+select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3 union select * from v1;
+2 || 3 / 3 2 || (3 / 3) (2 || 3) / 3
+7.666666666666667 21.0000 7.666666666666667
+create or replace view v1 as select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) DIV 3 AS `2 || 3 DIV 3`,concat(2,3 DIV 3) AS `2 || (3 DIV 3)`,concat(2,3) DIV 3 AS `(2 || 3) DIV 3`
+select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3 union select * from v1;
+2 || 3 DIV 3 2 || (3 DIV 3) (2 || 3) DIV 3
+7 21 7
+create or replace view v1 as select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(0,3) MOD 3 AS `0 || 3 MOD 3`,concat(0,3 MOD 3) AS `0 || (3 MOD 3)`,concat(0,3) MOD 3 AS `(0 || 3) MOD 3`
+select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3 union select * from v1;
+0 || 3 MOD 3 0 || (3 MOD 3) (0 || 3) MOD 3
+0 00 0
+create or replace view v1 as select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(0,3) MOD 3 AS `0 || 3 % 3`,concat(0,3 MOD 3) AS `0 || (3 % 3)`,concat(0,3) MOD 3 AS `(0 || 3) % 3`
+select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3 union select * from v1;
+0 || 3 % 3 0 || (3 % 3) (0 || 3) % 3
+0 00 0
+create or replace view v1 as select 2 || ' 3' ^ 3, 2 || (' 3' ^ 3), (2 || ' 3') ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,' 3') ^ 3 AS `2 || ' 3' ^ 3`,concat(2,' 3' ^ 3) AS `2 || (' 3' ^ 3)`,concat(2,' 3') ^ 3 AS `(2 || ' 3') ^ 3`
+select 2 || ' 3' ^ 3, 2 || (' 3' ^ 3), (2 || ' 3') ^ 3 union select * from v1;
+2 || ' 3' ^ 3 2 || (' 3' ^ 3) (2 || ' 3') ^ 3
+1 20 1
+create or replace view v1 as select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select concat(2,3) between 2 and 3 AS `2 || 3 BETWEEN 2 AND 3`,concat(2,3 between 2 and 3) AS `2 || (3 BETWEEN 2 AND 3)`,concat(2,3) between 2 and 3 AS `(2 || 3) BETWEEN 2 AND 3`
+select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3 union select * from v1;
+2 || 3 BETWEEN 2 AND 3 2 || (3 BETWEEN 2 AND 3) (2 || 3) BETWEEN 2 AND 3
+0 21 0
+create or replace view v1 as select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 xor concat(3,3) AS `2 XOR 3 || 3`,2 xor concat(3,3) AS `2 XOR (3 || 3)`,concat(2 xor 3,3) AS `(2 XOR 3) || 3`
+select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3 union select * from v1;
+2 XOR 3 || 3 2 XOR (3 || 3) (2 XOR 3) || 3
+0 0 03
+create or replace view v1 as select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and concat(3,3) AS `0 AND 3 || 3`,0 and concat(3,3) AS `0 AND (3 || 3)`,concat(0 and 3,3) AS `(0 AND 3) || 3`
+select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3 union select * from v1;
+0 AND 3 || 3 0 AND (3 || 3) (0 AND 3) || 3
+0 0 03
+create or replace view v1 as select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 and concat(3,3) AS `0 && 3 || 3`,0 and concat(3,3) AS `0 && (3 || 3)`,concat(0 and 3,3) AS `(0 && 3) || 3`
+select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3 union select * from v1;
+0 && 3 || 3 0 && (3 || 3) (0 && 3) || 3
+0 0 03
+create or replace view v1 as select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 = concat(3,3) AS `2 = 3 || 3`,2 = concat(3,3) AS `2 = (3 || 3)`,concat(2 = 3,3) AS `(2 = 3) || 3`
+select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3 union select * from v1;
+2 = 3 || 3 2 = (3 || 3) (2 = 3) || 3
+0 0 03
+create or replace view v1 as select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <=> concat(3,3) AS `2 <=> 3 || 3`,2 <=> concat(3,3) AS `2 <=> (3 || 3)`,concat(2 <=> 3,3) AS `(2 <=> 3) || 3`
+select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3 union select * from v1;
+2 <=> 3 || 3 2 <=> (3 || 3) (2 <=> 3) || 3
+0 0 03
+create or replace view v1 as select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >= concat(3,0) AS `2 >= 3 || 0`,2 >= concat(3,0) AS `2 >= (3 || 0)`,concat(2 >= 3,0) AS `(2 >= 3) || 0`
+select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0 union select * from v1;
+2 >= 3 || 0 2 >= (3 || 0) (2 >= 3) || 0
+0 0 00
+create or replace view v1 as select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 <= concat(3,3) AS `2 <= 3 || 3`,2 <= concat(3,3) AS `2 <= (3 || 3)`,concat(2 <= 3,3) AS `(2 <= 3) || 3`
+select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3 union select * from v1;
+2 <= 3 || 3 2 <= (3 || 3) (2 <= 3) || 3
+1 1 13
+create or replace view v1 as select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 < concat(3,3) AS `2 < 3 || 3`,2 < concat(3,3) AS `2 < (3 || 3)`,concat(2 < 3,3) AS `(2 < 3) || 3`
+select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3 union select * from v1;
+2 < 3 || 3 2 < (3 || 3) (2 < 3) || 3
+1 1 13
+create or replace view v1 as select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> concat(3,3) AS `1 <> 3 || 3`,1 <> concat(3,3) AS `1 <> (3 || 3)`,concat(1 <> 3,3) AS `(1 <> 3) || 3`
+select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3 union select * from v1;
+1 <> 3 || 3 1 <> (3 || 3) (1 <> 3) || 3
+1 1 13
+create or replace view v1 as select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 0 > concat(3,3) AS `0 > 3 || 3`,0 > concat(3,3) AS `0 > (3 || 3)`,concat(0 > 3,3) AS `(0 > 3) || 3`
+select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3 union select * from v1;
+0 > 3 || 3 0 > (3 || 3) (0 > 3) || 3
+0 0 03
+create or replace view v1 as select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> concat(3,3) AS `1 != 3 || 3`,1 <> concat(3,3) AS `1 != (3 || 3)`,concat(1 <> 3,3) AS `(1 != 3) || 3`
+select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3 union select * from v1;
+1 != 3 || 3 1 != (3 || 3) (1 != 3) || 3
+1 1 13
+create or replace view v1 as select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 like concat(3,3) AS `2 LIKE 3 || 3`,2 like concat(3,3) AS `2 LIKE (3 || 3)`,concat(2 like 3,3) AS `(2 LIKE 3) || 3`
+select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3 union select * from v1;
+2 LIKE 3 || 3 2 LIKE (3 || 3) (2 LIKE 3) || 3
+0 0 03
+create or replace view v1 as select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 regexp concat(3,3) AS `2 REGEXP 3 || 3`,2 regexp concat(3,3) AS `2 REGEXP (3 || 3)`,concat(2 regexp 3,3) AS `(2 REGEXP 3) || 3`
+select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3 union select * from v1;
+2 REGEXP 3 || 3 2 REGEXP (3 || 3) (2 REGEXP 3) || 3
+0 0 03
+create or replace view v1 as select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 | concat(3,3) AS `2 | 3 || 3`,2 | concat(3,3) AS `2 | (3 || 3)`,concat(2 | 3,3) AS `(2 | 3) || 3`
+select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3 union select * from v1;
+2 | 3 || 3 2 | (3 || 3) (2 | 3) || 3
+35 35 33
+create or replace view v1 as select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 & concat(3,3) AS `2 & 3 || 3`,2 & concat(3,3) AS `2 & (3 || 3)`,concat(2 & 3,3) AS `(2 & 3) || 3`
+select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3 union select * from v1;
+2 & 3 || 3 2 & (3 || 3) (2 & 3) || 3
+0 0 23
+create or replace view v1 as select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 << concat(3,3) AS `2 << 3 || 3`,2 << concat(3,3) AS `2 << (3 || 3)`,concat(2 << 3,3) AS `(2 << 3) || 3`
+select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3 union select * from v1;
+2 << 3 || 3 2 << (3 || 3) (2 << 3) || 3
+17179869184 17179869184 163
+create or replace view v1 as select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 >> concat(3,0) AS `2 >> 3 || 0`,2 >> concat(3,0) AS `2 >> (3 || 0)`,concat(2 >> 3,0) AS `(2 >> 3) || 0`
+select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0 union select * from v1;
+2 >> 3 || 0 2 >> (3 || 0) (2 >> 3) || 0
+0 0 00
+create or replace view v1 as select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 + concat(3,3) AS `2 + 3 || 3`,2 + concat(3,3) AS `2 + (3 || 3)`,concat(2 + 3,3) AS `(2 + 3) || 3`
+select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3 union select * from v1;
+2 + 3 || 3 2 + (3 || 3) (2 + 3) || 3
+35 35 53
+create or replace view v1 as select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 - concat(2,0) AS `2 - 2 || 0`,2 - concat(2,0) AS `2 - (2 || 0)`,concat(2 - 2,0) AS `(2 - 2) || 0`
+select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0 union select * from v1;
+2 - 2 || 0 2 - (2 || 0) (2 - 2) || 0
+-18 -18 00
+create or replace view v1 as select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 * concat(3,3) AS `2 * 3 || 3`,2 * concat(3,3) AS `2 * (3 || 3)`,concat(2 * 3,3) AS `(2 * 3) || 3`
+select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3 union select * from v1;
+2 * 3 || 3 2 * (3 || 3) (2 * 3) || 3
+66 66 63
+create or replace view v1 as select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 / concat(3,3) AS `2 / 3 || 3`,2 / concat(3,3) AS `2 / (3 || 3)`,concat(2 / 3,3) AS `(2 / 3) || 3`
+select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3 union select * from v1;
+2 / 3 || 3 2 / (3 || 3) (2 / 3) || 3
+0.06060606060606061 0.06060606060606061 0.66673
+create or replace view v1 as select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 DIV concat(3,3) AS `2 DIV 3 || 3`,2 DIV concat(3,3) AS `2 DIV (3 || 3)`,concat(2 DIV 3,3) AS `(2 DIV 3) || 3`
+select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3 union select * from v1;
+2 DIV 3 || 3 2 DIV (3 || 3) (2 DIV 3) || 3
+0 0 03
+create or replace view v1 as select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD concat(3,3) AS `2 MOD 3 || 3`,2 MOD concat(3,3) AS `2 MOD (3 || 3)`,concat(2 MOD 3,3) AS `(2 MOD 3) || 3`
+select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3 union select * from v1;
+2 MOD 3 || 3 2 MOD (3 || 3) (2 MOD 3) || 3
+2 2 23
+create or replace view v1 as select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 MOD concat(3,3) AS `2 % 3 || 3`,2 MOD concat(3,3) AS `2 % (3 || 3)`,concat(2 MOD 3,3) AS `(2 % 3) || 3`
+select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3 union select * from v1;
+2 % 3 || 3 2 % (3 || 3) (2 % 3) || 3
+2 2 23
+create or replace view v1 as select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 ^ concat(3,3) AS `2 ^ 3 || 3`,2 ^ concat(3,3) AS `2 ^ (3 || 3)`,concat(2 ^ 3,3) AS `(2 ^ 3) || 3`
+select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3 union select * from v1;
+2 ^ 3 || 3 2 ^ (3 || 3) (2 ^ 3) || 3
+35 35 13
+create or replace view v1 as select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 2 between 1 and concat(3,3) AS `2 BETWEEN 1 AND 3 || 3`,2 between 1 and concat(3,3) AS `2 BETWEEN 1 AND (3 || 3)`,concat(2 between 1 and 3,3) AS `(2 BETWEEN 1 AND 3) || 3`
+select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3 union select * from v1;
+2 BETWEEN 1 AND 3 || 3 2 BETWEEN 1 AND (3 || 3) (2 BETWEEN 1 AND 3) || 3
+1 1 13
+create or replace view v1 as select charset(2 LIKE 1 ESCAPE 3 || ''), charset(2 LIKE 1 ESCAPE (3 || '')), charset((2 LIKE 1 ESCAPE 3) || '');
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select charset(2 like 1 escape concat(3,'')) AS `charset(2 LIKE 1 ESCAPE 3 || '')`,charset(2 like 1 escape concat(3,'')) AS `charset(2 LIKE 1 ESCAPE (3 || ''))`,charset(concat(2 like 1 escape 3,'')) AS `charset((2 LIKE 1 ESCAPE 3) || '')`
+select charset(2 LIKE 1 ESCAPE 3 || ''), charset(2 LIKE 1 ESCAPE (3 || '')), charset((2 LIKE 1 ESCAPE 3) || '') union select * from v1;
+charset(2 LIKE 1 ESCAPE 3 || '') charset(2 LIKE 1 ESCAPE (3 || '')) charset((2 LIKE 1 ESCAPE 3) || '')
+binary binary latin1
+create or replace view v1 as select ! - 1, - ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !-1 AS `! - 1`,-!1 AS `- ! 1`
+create or replace view v1 as select ! BINARY 1, BINARY ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !cast(1 as char charset binary) AS `! BINARY 1`,cast(!1 as char charset binary) AS `BINARY ! 1`
+create or replace view v1 as select ! (NOT 1), NOT ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 <> 0 AS `! (NOT 1)`,1 <> 0 AS `NOT ! 1`
+create or replace view v1 as select ! ~ 1, ~ ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !~1 AS `! ~ 1`,~!1 AS `~ ! 1`
+create or replace view v1 as select - BINARY 1, BINARY - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -cast(1 as char charset binary) AS `- BINARY 1`,cast(-1 as char charset binary) AS `BINARY - 1`
+create or replace view v1 as select - (NOT 1), NOT - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -!1 AS `- (NOT 1)`,!-1 AS `NOT - 1`
+create or replace view v1 as select - ~ 1, ~ - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select -~1 AS `- ~ 1`,~-1 AS `~ - 1`
+create or replace view v1 as select BINARY (NOT 1), NOT BINARY 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast(!1 as char charset binary) AS `BINARY (NOT 1)`,!cast(1 as char charset binary) AS `NOT BINARY 1`
+create or replace view v1 as select BINARY ~ 1, ~ BINARY 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select cast(~1 as char charset binary) AS `BINARY ~ 1`,~cast(1 as char charset binary) AS `~ BINARY 1`
+create or replace view v1 as select NOT ~ 1, ~ (NOT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select !~1 AS `NOT ~ 1`,~!1 AS `~ (NOT 1)`
+create or replace view v1 as select 1 IS TRUE IS FALSE, 2 IS FALSE IS UNKNOWN, 3 IS UNKNOWN IS NULL, 4 IS NULL IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+view_definition
+select 1 is true is false AS `1 IS TRUE IS FALSE`,/*always not null*/ 1 is null AS `2 IS FALSE IS UNKNOWN`,/*always not null*/ 1 is null AS `3 IS UNKNOWN IS NULL`,/*always not null*/ 1 is null is true AS `4 IS NULL IS TRUE`
+drop view v1;
diff --git a/mysql-test/main/precedence.test b/mysql-test/main/precedence.test
new file mode 100644
index 00000000000..ad367c23603
--- /dev/null
+++ b/mysql-test/main/precedence.test
@@ -0,0 +1,4788 @@
+#
+# A fairly exhastive test for operator precedence
+#
+
+disable_warnings;
+
+#################### I couldn't come up with a test where precedence changes the result here
+#
+#create or replace view v1 as select BINARY 2 IS TRUE, BINARY (2 IS TRUE), (BINARY 2) IS TRUE;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 IS TRUE, BINARY (2 IS TRUE), (BINARY 2) IS TRUE union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 OR 3, BINARY (2 OR 3), (BINARY 2) OR 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 OR 3, BINARY (2 OR 3), (BINARY 2) OR 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 || 3, BINARY (2 || 3), (BINARY 2) || 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 || 3, BINARY (2 || 3), (BINARY 2) || 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 XOR 3, BINARY (2 XOR 3), (BINARY 2) XOR 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 XOR 3, BINARY (2 XOR 3), (BINARY 2) XOR 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 AND 3, BINARY (2 AND 3), (BINARY 2) AND 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 AND 3, BINARY (2 AND 3), (BINARY 2) AND 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 && 3, BINARY (2 && 3), (BINARY 2) && 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 && 3, BINARY (2 && 3), (BINARY 2) && 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 | 3, BINARY (2 | 3), (BINARY 2) | 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 | 3, BINARY (2 | 3), (BINARY 2) | 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 & 3, BINARY (2 & 3), (BINARY 2) & 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 & 3, BINARY (2 & 3), (BINARY 2) & 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 << 3, BINARY (2 << 3), (BINARY 2) << 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 << 3, BINARY (2 << 3), (BINARY 2) << 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 >> 3, BINARY (2 >> 3), (BINARY 2) >> 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 >> 3, BINARY (2 >> 3), (BINARY 2) >> 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY '2000-01-01' +INTERVAL 1 DAY, BINARY ('2000-01-01' +INTERVAL 1 DAY), (BINARY '2000-01-01') +INTERVAL 1 DAY;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY '2000-01-01' +INTERVAL 1 DAY, BINARY ('2000-01-01' +INTERVAL 1 DAY), (BINARY '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 + 3, BINARY (2 + 3), (BINARY 2) + 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 + 3, BINARY (2 + 3), (BINARY 2) + 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 - 3, BINARY (2 - 3), (BINARY 2) - 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 - 3, BINARY (2 - 3), (BINARY 2) - 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 * 3, BINARY (2 * 3), (BINARY 2) * 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 * 3, BINARY (2 * 3), (BINARY 2) * 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 / 3, BINARY (2 / 3), (BINARY 2) / 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 / 3, BINARY (2 / 3), (BINARY 2) / 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 DIV 3, BINARY (2 DIV 3), (BINARY 2) DIV 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 DIV 3, BINARY (2 DIV 3), (BINARY 2) DIV 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 MOD 3, BINARY (2 MOD 3), (BINARY 2) MOD 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 MOD 3, BINARY (2 MOD 3), (BINARY 2) MOD 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 % 3, BINARY (2 % 3), (BINARY 2) % 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 % 3, BINARY (2 % 3), (BINARY 2) % 3 union select * from v1;
+#
+#create or replace view v1 as select BINARY 2 ^ 3, BINARY (2 ^ 3), (BINARY 2) ^ 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select BINARY 2 ^ 3, BINARY (2 ^ 3), (BINARY 2) ^ 3 union select * from v1;
+#
+#set sql_mode=PIPES_AS_CONCAT;
+#create or replace view v1 as select 2 || 3 COLLATE latin1_bin, 2 || (3 COLLATE latin1_bin), (2 || 3) COLLATE latin1_bin;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 || 3 COLLATE latin1_bin, 2 || (3 COLLATE latin1_bin), (2 || 3) COLLATE latin1_bin union select * from v1;
+
+########################## The result doesn't depend on the precedence
+#
+#create or replace view v1 as select NOT 2 XOR 0, NOT (2 XOR 0), (NOT 2) XOR 0;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select NOT 2 XOR 0, NOT (2 XOR 0), (NOT 2) XOR 0 union select * from v1;
+#
+#create or replace view v1 as select - 2 * 3, - (2 * 3), (- 2) * 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select - 2 * 3, - (2 * 3), (- 2) * 3 union select * from v1;
+#
+#create or replace view v1 as select - 2 / 3, - (2 / 3), (- 2) / 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select - 2 / 3, - (2 / 3), (- 2) / 3 union select * from v1;
+#
+#create or replace view v1 as select - 2 DIV 3, - (2 DIV 3), (- 2) DIV 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select - 2 DIV 3, - (2 DIV 3), (- 2) DIV 3 union select * from v1;
+#
+#create or replace view v1 as select - 2 MOD 3, - (2 MOD 3), (- 2) MOD 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select - 2 MOD 3, - (2 MOD 3), (- 2) MOD 3 union select * from v1;
+#
+#create or replace view v1 as select - 2 % 3, - (2 % 3), (- 2) % 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select - 2 % 3, - (2 % 3), (- 2) % 3 union select * from v1;
+#
+#create or replace view v1 as select ~ 2 ^ 3, ~ (2 ^ 3), (~ 2) ^ 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select ~ 2 ^ 3, ~ (2 ^ 3), (~ 2) ^ 3 union select * from v1;
+#
+#create or replace view v1 as select ! 2 XOR 3, ! (2 XOR 3), (! 2) XOR 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select ! 2 XOR 3, ! (2 XOR 3), (! 2) XOR 3 union select * from v1;
+#
+#create or replace view v1 as select 2 OR 3 OR 3, 2 OR (3 OR 3), (2 OR 3) OR 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 OR 3 OR 3, 2 OR (3 OR 3), (2 OR 3) OR 3 union select * from v1;
+#
+#create or replace view v1 as select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3 union select * from v1;
+#
+#create or replace view v1 as select 2 || 3 OR 3, 2 || (3 OR 3), (2 || 3) OR 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 || 3 OR 3, 2 || (3 OR 3), (2 || 3) OR 3 union select * from v1;
+#
+#create or replace view v1 as select 2 || 3 || 3, 2 || (3 || 3), (2 || 3) || 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 || 3 || 3, 2 || (3 || 3), (2 || 3) || 3 union select * from v1;
+#
+#create or replace view v1 as select 2 XOR 3 IS FALSE, 2 XOR (3 IS FALSE), (2 XOR 3) IS FALSE;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 XOR 3 IS FALSE, 2 XOR (3 IS FALSE), (2 XOR 3) IS FALSE union select * from v1;
+#
+#create or replace view v1 as select 2 XOR 3 XOR 3, 2 XOR (3 XOR 3), (2 XOR 3) XOR 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 XOR 3 XOR 3, 2 XOR (3 XOR 3), (2 XOR 3) XOR 3 union select * from v1;
+#
+#create or replace view v1 as select 2 AND 3 AND 3, 2 AND (3 AND 3), (2 AND 3) AND 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 AND 3 AND 3, 2 AND (3 AND 3), (2 AND 3) AND 3 union select * from v1;
+#
+#create or replace view v1 as select 2 AND 3 && 3, 2 AND (3 && 3), (2 AND 3) && 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 AND 3 && 3, 2 AND (3 && 3), (2 AND 3) && 3 union select * from v1;
+#
+#create or replace view v1 as select 2 && 3 AND 3, 2 && (3 AND 3), (2 && 3) AND 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 && 3 AND 3, 2 && (3 AND 3), (2 && 3) AND 3 union select * from v1;
+#
+#create or replace view v1 as select 2 && 3 && 3, 2 && (3 && 3), (2 && 3) && 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 && 3 && 3, 2 && (3 && 3), (2 && 3) && 3 union select * from v1;
+#
+#create or replace view v1 as select 2 | 3 | 3, 2 | (3 | 3), (2 | 3) | 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 | 3 | 3, 2 | (3 | 3), (2 | 3) | 3 union select * from v1;
+#
+#create or replace view v1 as select 2 & 3 & 3, 2 & (3 & 3), (2 & 3) & 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 & 3 & 3, 2 & (3 & 3), (2 & 3) & 3 union select * from v1;
+#
+#create or replace view v1 as select 2 + 3 + 3, 2 + (3 + 3), (2 + 3) + 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 + 3 + 3, 2 + (3 + 3), (2 + 3) + 3 union select * from v1;
+#
+#create or replace view v1 as select 2 + 3 - 3, 2 + (3 - 3), (2 + 3) - 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 + 3 - 3, 2 + (3 - 3), (2 + 3) - 3 union select * from v1;
+#
+#create or replace view v1 as select 2 * 3 << 3, 2 * (3 << 3), (2 * 3) << 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 * 3 << 3, 2 * (3 << 3), (2 * 3) << 3 union select * from v1;
+#
+#create or replace view v1 as select 2 * 3 * 3, 2 * (3 * 3), (2 * 3) * 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 * 3 * 3, 2 * (3 * 3), (2 * 3) * 3 union select * from v1;
+#
+#create or replace view v1 as select 2 * 3 / 3, 2 * (3 / 3), (2 * 3) / 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 * 3 / 3, 2 * (3 / 3), (2 * 3) / 3 union select * from v1;
+#
+#create or replace view v1 as select 2 ^ 3 ^ 3, 2 ^ (3 ^ 3), (2 ^ 3) ^ 3;
+#Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+#select 2 ^ 3 ^ 3, 2 ^ (3 ^ 3), (2 ^ 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select NOT NULL IS TRUE, NOT (NULL IS TRUE), (NOT NULL) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT NULL IS TRUE, NOT (NULL IS TRUE), (NOT NULL) IS TRUE union select * from v1;
+
+create or replace view v1 as select ! NULL IS TRUE, ! (NULL IS TRUE), (! NULL) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! NULL IS TRUE, ! (NULL IS TRUE), (! NULL) IS TRUE union select * from v1;
+
+create or replace view v1 as select charset(NOT 2 COLLATE latin1_bin), charset(NOT (2 COLLATE latin1_bin)), charset((NOT 2) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(NOT 2 COLLATE latin1_bin), charset(NOT (2 COLLATE latin1_bin)), charset((NOT 2) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select NOT 2 IN (0,2), NOT (2 IN (0,2)), (NOT 2) IN (0,2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 IN (0,2), NOT (2 IN (0,2)), (NOT 2) IN (0,2) union select * from v1;
+
+create or replace view v1 as select NOT 2 OR 3, NOT (2 OR 3), (NOT 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 OR 3, NOT (2 OR 3), (NOT 2) OR 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 AND 0, NOT (2 AND 0), (NOT 2) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 AND 0, NOT (2 AND 0), (NOT 2) AND 0 union select * from v1;
+
+create or replace view v1 as select NOT 2 && 0, NOT (2 && 0), (NOT 2) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 && 0, NOT (2 && 0), (NOT 2) && 0 union select * from v1;
+
+create or replace view v1 as select NOT 2 = 3, NOT (2 = 3), (NOT 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 = 3, NOT (2 = 3), (NOT 2) = 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 <=> 3, NOT (2 <=> 3), (NOT 2) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 <=> 3, NOT (2 <=> 3), (NOT 2) <=> 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 >= 3, NOT (2 >= 3), (NOT 2) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 >= 3, NOT (2 >= 3), (NOT 2) >= 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 <= 3, NOT (2 <= 3), (NOT 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 <= 3, NOT (2 <= 3), (NOT 2) <= 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 < 3, NOT (2 < 3), (NOT 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 < 3, NOT (2 < 3), (NOT 2) < 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 <> 3, NOT (2 <> 3), (NOT 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 <> 3, NOT (2 <> 3), (NOT 2) <> 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 > 3, NOT (2 > 3), (NOT 2) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 > 3, NOT (2 > 3), (NOT 2) > 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 != 3, NOT (2 != 3), (NOT 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 != 3, NOT (2 != 3), (NOT 2) != 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 LIKE 3, NOT (2 LIKE 3), (NOT 2) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 LIKE 3, NOT (2 LIKE 3), (NOT 2) LIKE 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 REGEXP 3, NOT (2 REGEXP 3), (NOT 2) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 REGEXP 3, NOT (2 REGEXP 3), (NOT 2) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 | 3, NOT (2 | 3), (NOT 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 | 3, NOT (2 | 3), (NOT 2) | 3 union select * from v1;
+
+create or replace view v1 as select NOT 0 & 2, NOT (0 & 2), (NOT 0) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 0 & 2, NOT (0 & 2), (NOT 0) & 2 union select * from v1;
+
+create or replace view v1 as select NOT 0 << 3, NOT (0 << 3), (NOT 0) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 0 << 3, NOT (0 << 3), (NOT 0) << 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 >> 3, NOT (2 >> 3), (NOT 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 >> 3, NOT (2 >> 3), (NOT 2) >> 3 union select * from v1;
+
+create or replace view v1 as select NOT '2000-01-01' +INTERVAL 1 DAY, NOT ('2000-01-01' +INTERVAL 1 DAY), (NOT '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT '2000-01-01' +INTERVAL 1 DAY, NOT ('2000-01-01' +INTERVAL 1 DAY), (NOT '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select NOT 2 + 3, NOT (2 + 3), (NOT 2) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 + 3, NOT (2 + 3), (NOT 2) + 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 - 3, NOT (2 - 3), (NOT 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 - 3, NOT (2 - 3), (NOT 2) - 3 union select * from v1;
+
+create or replace view v1 as select NOT 0 * 3, NOT (0 * 3), (NOT 0) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 0 * 3, NOT (0 * 3), (NOT 0) * 3 union select * from v1;
+
+create or replace view v1 as select NOT 0 / 3, NOT (0 / 3), (NOT 0) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 0 / 3, NOT (0 / 3), (NOT 0) / 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 DIV 3, NOT (2 DIV 3), (NOT 2) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 DIV 3, NOT (2 DIV 3), (NOT 2) DIV 3 union select * from v1;
+
+create or replace view v1 as select NOT 6 MOD 3, NOT (6 MOD 3), (NOT 6) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 6 MOD 3, NOT (6 MOD 3), (NOT 6) MOD 3 union select * from v1;
+
+create or replace view v1 as select NOT 6 % 3, NOT (6 % 3), (NOT 6) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 6 % 3, NOT (6 % 3), (NOT 6) % 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 ^ 3, NOT (2 ^ 3), (NOT 2) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 ^ 3, NOT (2 ^ 3), (NOT 2) ^ 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 BETWEEN 3 AND 4, NOT (2 BETWEEN 3 AND 4), (NOT 2) BETWEEN 3 AND 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 BETWEEN 3 AND 4, NOT (2 BETWEEN 3 AND 4), (NOT 2) BETWEEN 3 AND 4 union select * from v1;
+
+create or replace view v1 as select - 2 IS TRUE, - (2 IS TRUE), (- 2) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 IS TRUE, - (2 IS TRUE), (- 2) IS TRUE union select * from v1;
+
+create or replace view v1 as select charset(- "2" COLLATE latin1_bin), charset(- ("2" COLLATE latin1_bin)), charset((- "2") COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(- "2" COLLATE latin1_bin), charset(- ("2" COLLATE latin1_bin)), charset((- "2") COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select - 2 IN (2,1), - (2 IN (2,1)), (- 2) IN (2,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 IN (2,1), - (2 IN (2,1)), (- 2) IN (2,1) union select * from v1;
+
+create or replace view v1 as select - 2 OR 3, - (2 OR 3), (- 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 OR 3, - (2 OR 3), (- 2) OR 3 union select * from v1;
+
+create or replace view v1 as select - 2 || 3, - (2 || 3), (- 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 || 3, - (2 || 3), (- 2) || 3 union select * from v1;
+
+create or replace view v1 as select - 0 XOR 3, - (0 XOR 3), (- 0) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 0 XOR 3, - (0 XOR 3), (- 0) XOR 3 union select * from v1;
+
+create or replace view v1 as select - 2 AND 3, - (2 AND 3), (- 2) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 AND 3, - (2 AND 3), (- 2) AND 3 union select * from v1;
+
+create or replace view v1 as select - 2 && 3, - (2 && 3), (- 2) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 && 3, - (2 && 3), (- 2) && 3 union select * from v1;
+
+create or replace view v1 as select - 2 = 2, - (2 = 2), (- 2) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 = 2, - (2 = 2), (- 2) = 2 union select * from v1;
+
+create or replace view v1 as select - 2 <=> 2, - (2 <=> 2), (- 2) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 <=> 2, - (2 <=> 2), (- 2) <=> 2 union select * from v1;
+
+create or replace view v1 as select - 2 >= 1, - (2 >= 1), (- 2) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 >= 1, - (2 >= 1), (- 2) >= 1 union select * from v1;
+
+create or replace view v1 as select - 2 <= 3, - (2 <= 3), (- 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 <= 3, - (2 <= 3), (- 2) <= 3 union select * from v1;
+
+create or replace view v1 as select - 2 < 3, - (2 < 3), (- 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 < 3, - (2 < 3), (- 2) < 3 union select * from v1;
+
+create or replace view v1 as select - 2 <> 3, - (2 <> 3), (- 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 <> 3, - (2 <> 3), (- 2) <> 3 union select * from v1;
+
+create or replace view v1 as select - 2 > 1, - (2 > 1), (- 2) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 > 1, - (2 > 1), (- 2) > 1 union select * from v1;
+
+create or replace view v1 as select - 2 != 3, - (2 != 3), (- 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 != 3, - (2 != 3), (- 2) != 3 union select * from v1;
+
+create or replace view v1 as select - 2 LIKE 2, - (2 LIKE 2), (- 2) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 LIKE 2, - (2 LIKE 2), (- 2) LIKE 2 union select * from v1;
+
+create or replace view v1 as select - 2 REGEXP 2, - (2 REGEXP 2), (- 2) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 REGEXP 2, - (2 REGEXP 2), (- 2) REGEXP 2 union select * from v1;
+
+create or replace view v1 as select - 2 | 3, - (2 | 3), (- 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 | 3, - (2 | 3), (- 2) | 3 union select * from v1;
+
+create or replace view v1 as select - 2 & 3, - (2 & 3), (- 2) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 & 3, - (2 & 3), (- 2) & 3 union select * from v1;
+
+create or replace view v1 as select - 2 << 3, - (2 << 3), (- 2) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 << 3, - (2 << 3), (- 2) << 3 union select * from v1;
+
+create or replace view v1 as select - 2 >> 3, - (2 >> 3), (- 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 >> 3, - (2 >> 3), (- 2) >> 3 union select * from v1;
+
+create or replace view v1 as select - '2000-01-01' +INTERVAL 1 DAY, - ('2000-01-01' +INTERVAL 1 DAY), (- '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - '2000-01-01' +INTERVAL 1 DAY, - ('2000-01-01' +INTERVAL 1 DAY), (- '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select - 2 + 3, - (2 + 3), (- 2) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 + 3, - (2 + 3), (- 2) + 3 union select * from v1;
+
+create or replace view v1 as select - 2 - 3, - (2 - 3), (- 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 - 3, - (2 - 3), (- 2) - 3 union select * from v1;
+
+create or replace view v1 as select - 2 ^ 3, - (2 ^ 3), (- 2) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 ^ 3, - (2 ^ 3), (- 2) ^ 3 union select * from v1;
+
+create or replace view v1 as select - 2 BETWEEN 1 AND 3, - (2 BETWEEN 1 AND 3), (- 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 BETWEEN 1 AND 3, - (2 BETWEEN 1 AND 3), (- 2) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 IS TRUE, ~ (2 IS TRUE), (~ 2) IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 IS TRUE, ~ (2 IS TRUE), (~ 2) IS TRUE union select * from v1;
+
+create or replace view v1 as select charset(~ 2 COLLATE latin1_bin), charset(~ (2 COLLATE latin1_bin)), charset((~ 2) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(~ 2 COLLATE latin1_bin), charset(~ (2 COLLATE latin1_bin)), charset((~ 2) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select ~ 2 IN (0,1), ~ (2 IN (0,1)), (~ 2) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 IN (0,1), ~ (2 IN (0,1)), (~ 2) IN (0,1) union select * from v1;
+
+create or replace view v1 as select ~ 2 OR 3, ~ (2 OR 3), (~ 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 OR 3, ~ (2 OR 3), (~ 2) OR 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 XOR 3, ~ (2 XOR 3), (~ 2) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 XOR 3, ~ (2 XOR 3), (~ 2) XOR 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 AND 3, ~ (2 AND 3), (~ 2) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 AND 3, ~ (2 AND 3), (~ 2) AND 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 && 3, ~ (2 && 3), (~ 2) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 && 3, ~ (2 && 3), (~ 2) && 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 = 3, ~ (2 = 3), (~ 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 = 3, ~ (2 = 3), (~ 2) = 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 <=> 3, ~ (2 <=> 3), (~ 2) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 <=> 3, ~ (2 <=> 3), (~ 2) <=> 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 >= 3, ~ (2 >= 3), (~ 2) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 >= 3, ~ (2 >= 3), (~ 2) >= 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 <= 3, ~ (2 <= 3), (~ 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 <= 3, ~ (2 <= 3), (~ 2) <= 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 < 3, ~ (2 < 3), (~ 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 < 3, ~ (2 < 3), (~ 2) < 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 <> 3, ~ (2 <> 3), (~ 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 <> 3, ~ (2 <> 3), (~ 2) <> 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 > 3, ~ (2 > 3), (~ 2) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 > 3, ~ (2 > 3), (~ 2) > 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 != 3, ~ (2 != 3), (~ 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 != 3, ~ (2 != 3), (~ 2) != 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 LIKE 3, ~ (2 LIKE 3), (~ 2) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 LIKE 3, ~ (2 LIKE 3), (~ 2) LIKE 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 REGEXP 3, ~ (2 REGEXP 3), (~ 2) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 REGEXP 3, ~ (2 REGEXP 3), (~ 2) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 | 3, ~ (2 | 3), (~ 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 | 3, ~ (2 | 3), (~ 2) | 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 & 3, ~ (2 & 3), (~ 2) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 & 3, ~ (2 & 3), (~ 2) & 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 << 3, ~ (2 << 3), (~ 2) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 << 3, ~ (2 << 3), (~ 2) << 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 >> 3, ~ (2 >> 3), (~ 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 >> 3, ~ (2 >> 3), (~ 2) >> 3 union select * from v1;
+
+create or replace view v1 as select ~ '2000-01-01' +INTERVAL 1 DAY, ~ ('2000-01-01' +INTERVAL 1 DAY), (~ '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ '2000-01-01' +INTERVAL 1 DAY, ~ ('2000-01-01' +INTERVAL 1 DAY), (~ '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select ~ 10000 + 3, ~ (10000 + 3), (~ 10000) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 10000 + 3, ~ (10000 + 3), (~ 10000) + 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 - 3, ~ (2 - 3), (~ 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 - 3, ~ (2 - 3), (~ 2) - 3 union select * from v1;
+
+create or replace view v1 as select ~ 10000000000000000000 * 2, ~ (100 * 2), (~ 10000000000000000000) * 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 10000000000000000000 * 2, ~ (100 * 2), (~ 10000000000000000000) * 2 union select * from v1;
+
+create or replace view v1 as select ~ 2 / 3, ~ (2 / 3), (~ 2) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 / 3, ~ (2 / 3), (~ 2) / 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 DIV 3, ~ (2 DIV 3), (~ 2) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 DIV 3, ~ (2 DIV 3), (~ 2) DIV 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 MOD 3, ~ (2 MOD 3), (~ 2) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 MOD 3, ~ (2 MOD 3), (~ 2) MOD 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 % 3, ~ (2 % 3), (~ 2) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 % 3, ~ (2 % 3), (~ 2) % 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 BETWEEN 1 AND 3, ~ (2 BETWEEN 1 AND 3), (~ 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 BETWEEN 1 AND 3, ~ (2 BETWEEN 1 AND 3), (~ 2) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select charset(! 2 COLLATE latin1_bin), charset(! (2 COLLATE latin1_bin)), charset((! 2) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(! 2 COLLATE latin1_bin), charset(! (2 COLLATE latin1_bin)), charset((! 2) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select ! 2 IN (0,2), ! (2 IN (0,2)), (! 2) IN (0,2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 IN (0,2), ! (2 IN (0,2)), (! 2) IN (0,2) union select * from v1;
+
+create or replace view v1 as select ! 2 OR 3, ! (2 OR 3), (! 2) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 OR 3, ! (2 OR 3), (! 2) OR 3 union select * from v1;
+
+create or replace view v1 as select ! 2 || 3, ! (2 || 3), (! 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 || 3, ! (2 || 3), (! 2) || 3 union select * from v1;
+
+create or replace view v1 as select ! 2 AND 0, ! (2 AND 0), (! 2) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 AND 0, ! (2 AND 0), (! 2) AND 0 union select * from v1;
+
+create or replace view v1 as select ! 2 && 0, ! (2 && 0), (! 2) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 && 0, ! (2 && 0), (! 2) && 0 union select * from v1;
+
+create or replace view v1 as select ! 2 = 3, ! (2 = 3), (! 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 = 3, ! (2 = 3), (! 2) = 3 union select * from v1;
+
+create or replace view v1 as select ! 2 <=> 3, ! (2 <=> 3), (! 2) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 <=> 3, ! (2 <=> 3), (! 2) <=> 3 union select * from v1;
+
+create or replace view v1 as select ! 2 >= 3, ! (2 >= 3), (! 2) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 >= 3, ! (2 >= 3), (! 2) >= 3 union select * from v1;
+
+create or replace view v1 as select ! 2 <= 3, ! (2 <= 3), (! 2) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 <= 3, ! (2 <= 3), (! 2) <= 3 union select * from v1;
+
+create or replace view v1 as select ! 2 < 3, ! (2 < 3), (! 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 < 3, ! (2 < 3), (! 2) < 3 union select * from v1;
+
+create or replace view v1 as select ! 2 <> 3, ! (2 <> 3), (! 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 <> 3, ! (2 <> 3), (! 2) <> 3 union select * from v1;
+
+create or replace view v1 as select ! 2 > 3, ! (2 > 3), (! 2) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 > 3, ! (2 > 3), (! 2) > 3 union select * from v1;
+
+create or replace view v1 as select ! 2 != 3, ! (2 != 3), (! 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 != 3, ! (2 != 3), (! 2) != 3 union select * from v1;
+
+create or replace view v1 as select ! 2 LIKE 3, ! (2 LIKE 3), (! 2) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 LIKE 3, ! (2 LIKE 3), (! 2) LIKE 3 union select * from v1;
+
+create or replace view v1 as select ! 2 REGEXP 3, ! (2 REGEXP 3), (! 2) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 REGEXP 3, ! (2 REGEXP 3), (! 2) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select ! 2 | 3, ! (2 | 3), (! 2) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 | 3, ! (2 | 3), (! 2) | 3 union select * from v1;
+
+create or replace view v1 as select ! 2 & 0, ! (2 & 0), (! 2) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 & 0, ! (2 & 0), (! 2) & 0 union select * from v1;
+
+create or replace view v1 as select ! 0 << 3, ! (0 << 3), (! 0) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 0 << 3, ! (0 << 3), (! 0) << 3 union select * from v1;
+
+create or replace view v1 as select ! 2 >> 3, ! (2 >> 3), (! 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 >> 3, ! (2 >> 3), (! 2) >> 3 union select * from v1;
+
+create or replace view v1 as select ! '2000-01-01' +INTERVAL 1 DAY, ! ('2000-01-01' +INTERVAL 1 DAY), (! '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! '2000-01-01' +INTERVAL 1 DAY, ! ('2000-01-01' +INTERVAL 1 DAY), (! '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select ! 2 + 3, ! (2 + 3), (! 2) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 + 3, ! (2 + 3), (! 2) + 3 union select * from v1;
+
+create or replace view v1 as select ! 2 - 3, ! (2 - 3), (! 2) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 - 3, ! (2 - 3), (! 2) - 3 union select * from v1;
+
+create or replace view v1 as select ! 0 * 3, ! (0 * 3), (! 0) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 0 * 3, ! (0 * 3), (! 0) * 3 union select * from v1;
+
+create or replace view v1 as select ! 0 / 3, ! (0 / 3), (! 0) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 0 / 3, ! (0 / 3), (! 0) / 3 union select * from v1;
+
+create or replace view v1 as select ! 2 DIV 3, ! (2 DIV 3), (! 2) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 DIV 3, ! (2 DIV 3), (! 2) DIV 3 union select * from v1;
+
+create or replace view v1 as select ! 6 MOD 3, ! (6 MOD 3), (! 6) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 6 MOD 3, ! (6 MOD 3), (! 6) MOD 3 union select * from v1;
+
+create or replace view v1 as select ! 6 % 3, ! (6 % 3), (! 6) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 6 % 3, ! (6 % 3), (! 6) % 3 union select * from v1;
+
+create or replace view v1 as select ! 2 ^ 3, ! (2 ^ 3), (! 2) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 ^ 3, ! (2 ^ 3), (! 2) ^ 3 union select * from v1;
+
+create or replace view v1 as select ! 2 BETWEEN 3 AND 4, ! (2 BETWEEN 3 AND 4), (! 2) BETWEEN 3 AND 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 BETWEEN 3 AND 4, ! (2 BETWEEN 3 AND 4), (! 2) BETWEEN 3 AND 4 union select * from v1;
+
+create or replace view v1 as select CHARSET(BINARY '2' COLLATE latin1_bin), CHARSET(BINARY ('2' COLLATE latin1_bin)), 'error'/*CHARSET((BINARY '2') COLLATE latin1_bin)*/;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select CHARSET(BINARY '2' COLLATE latin1_bin), CHARSET(BINARY ('2' COLLATE latin1_bin)), 'error'/*CHARSET((BINARY '2') COLLATE latin1_bin)*/ union select * from v1;
+
+create or replace view v1 as select BINARY 'c' IN ('C','X'), BINARY ('c' IN ('C','X')), (BINARY 'c') IN ('C','X');
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' IN ('C','X'), BINARY ('c' IN ('C','X')), (BINARY 'c') IN ('C','X') union select * from v1;
+
+create or replace view v1 as select BINARY 'c' = 'C', BINARY ('c' = 'C'), (BINARY 'c') = 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' = 'C', BINARY ('c' = 'C'), (BINARY 'c') = 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' <=> 'C', BINARY ('c' <=> 'C'), (BINARY 'c') <=> 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' <=> 'C', BINARY ('c' <=> 'C'), (BINARY 'c') <=> 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' >= 'D', BINARY ('c' >= 'D'), (BINARY 'c') >= 'D';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' >= 'D', BINARY ('c' >= 'D'), (BINARY 'c') >= 'D' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' <= 'C', BINARY ('c' <= 'C'), (BINARY 'c') <= 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' <= 'C', BINARY ('c' <= 'C'), (BINARY 'c') <= 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' < 'D', BINARY ('c' < 'D'), (BINARY 'c') < 'D';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' < 'D', BINARY ('c' < 'D'), (BINARY 'c') < 'D' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' <> 'C', BINARY ('c' <> 'C'), (BINARY 'c') <> 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' <> 'C', BINARY ('c' <> 'C'), (BINARY 'c') <> 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' > 'C', BINARY ('c' > 'C'), (BINARY 'c') > 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' > 'C', BINARY ('c' > 'C'), (BINARY 'c') > 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' != 'C', BINARY ('c' != 'C'), (BINARY 'c') != 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' != 'C', BINARY ('c' != 'C'), (BINARY 'c') != 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' LIKE 'C', BINARY ('c' LIKE 'C'), (BINARY 'c') LIKE 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' LIKE 'C', BINARY ('c' LIKE 'C'), (BINARY 'c') LIKE 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' REGEXP 'C', BINARY ('c' REGEXP 'C'), (BINARY 'c') REGEXP 'C';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' REGEXP 'C', BINARY ('c' REGEXP 'C'), (BINARY 'c') REGEXP 'C' union select * from v1;
+
+create or replace view v1 as select BINARY 'c' BETWEEN 'A' AND 'D', BINARY ('c' BETWEEN 'A' AND 'D'), (BINARY 'c') BETWEEN 'A' AND 'D';
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' BETWEEN 'A' AND 'D', BINARY ('c' BETWEEN 'A' AND 'D'), (BINARY 'c') BETWEEN 'A' AND 'D' union select * from v1;
+
+create or replace view v1 as select 2 OR 3 IS FALSE, 2 OR (3 IS FALSE), (2 OR 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 IS FALSE, 2 OR (3 IS FALSE), (2 OR 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 OR 3 COLLATE latin1_bin), charset(2 OR (3 COLLATE latin1_bin)), charset((2 OR 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 OR 3 COLLATE latin1_bin), charset(2 OR (3 COLLATE latin1_bin)), charset((2 OR 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 0 OR 3 IN (3,10), 0 OR (3 IN (3,10)), (0 OR 3) IN (3,10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 3 IN (3,10), 0 OR (3 IN (3,10)), (0 OR 3) IN (3,10) union select * from v1;
+
+create or replace view v1 as select 1 OR 0 XOR 1, 1 OR (0 XOR 1), (1 OR 0) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 OR 0 XOR 1, 1 OR (0 XOR 1), (1 OR 0) XOR 1 union select * from v1;
+
+create or replace view v1 as select 1 OR 1 AND 0, 1 OR (1 AND 0), (1 OR 1) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 OR 1 AND 0, 1 OR (1 AND 0), (1 OR 1) AND 0 union select * from v1;
+
+create or replace view v1 as select 1 OR 1 && 0, 1 OR (1 && 0), (1 OR 1) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 OR 1 && 0, 1 OR (1 && 0), (1 OR 1) && 0 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 = 3, 2 OR (3 = 3), (2 OR 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 = 3, 2 OR (3 = 3), (2 OR 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 <=> 3, 2 OR (3 <=> 3), (2 OR 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 <=> 3, 2 OR (3 <=> 3), (2 OR 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 >= 3, 2 OR (3 >= 3), (2 OR 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 >= 3, 2 OR (3 >= 3), (2 OR 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 <= 0, 2 OR (3 <= 0), (2 OR 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 <= 0, 2 OR (3 <= 0), (2 OR 3) <= 0 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 < 0, 2 OR (3 < 0), (2 OR 3) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 < 0, 2 OR (3 < 0), (2 OR 3) < 0 union select * from v1;
+
+create or replace view v1 as select 0 OR 3 <> 3, 0 OR (3 <> 3), (0 OR 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 3 <> 3, 0 OR (3 <> 3), (0 OR 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 > 3, 2 OR (3 > 3), (2 OR 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 > 3, 2 OR (3 > 3), (2 OR 3) > 3 union select * from v1;
+
+create or replace view v1 as select 0 OR 3 != 3, 0 OR (3 != 3), (0 OR 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 3 != 3, 0 OR (3 != 3), (0 OR 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 LIKE 3, 2 OR (3 LIKE 3), (2 OR 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 LIKE 3, 2 OR (3 LIKE 3), (2 OR 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 REGEXP 3, 2 OR (3 REGEXP 3), (2 OR 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 REGEXP 3, 2 OR (3 REGEXP 3), (2 OR 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 | 3, 2 OR (3 | 3), (2 OR 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 | 3, 2 OR (3 | 3), (2 OR 3) | 3 union select * from v1;
+
+create or replace view v1 as select 0 OR 2 & 2, 0 OR (2 & 2), (0 OR 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 2 & 2, 0 OR (2 & 2), (0 OR 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 << 3, 2 OR (3 << 3), (2 OR 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 << 3, 2 OR (3 << 3), (2 OR 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 >> 3, 2 OR (3 >> 3), (2 OR 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 >> 3, 2 OR (3 >> 3), (2 OR 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 OR '2000-01-01' +INTERVAL 1 DAY, 2 OR ('2000-01-01' +INTERVAL 1 DAY), (2 OR '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR '2000-01-01' +INTERVAL 1 DAY, 2 OR ('2000-01-01' +INTERVAL 1 DAY), (2 OR '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 OR 3 + 3, 2 OR (3 + 3), (2 OR 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 + 3, 2 OR (3 + 3), (2 OR 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 - 3, 2 OR (3 - 3), (2 OR 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 - 3, 2 OR (3 - 3), (2 OR 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 * 3, 2 OR (3 * 3), (2 OR 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 * 3, 2 OR (3 * 3), (2 OR 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 / 3, 2 OR (3 / 3), (2 OR 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 / 3, 2 OR (3 / 3), (2 OR 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 DIV 3, 2 OR (3 DIV 3), (2 OR 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 DIV 3, 2 OR (3 DIV 3), (2 OR 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 0 OR 3 MOD 3, 0 OR (3 MOD 3), (0 OR 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 3 MOD 3, 0 OR (3 MOD 3), (0 OR 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 0 OR 3 % 3, 0 OR (3 % 3), (0 OR 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 3 % 3, 0 OR (3 % 3), (0 OR 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 ^ 3, 2 OR (3 ^ 3), (2 OR 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 ^ 3, 2 OR (3 ^ 3), (2 OR 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 OR 3 BETWEEN 2 AND 3, 2 OR (3 BETWEEN 2 AND 3), (2 OR 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 BETWEEN 2 AND 3, 2 OR (3 BETWEEN 2 AND 3), (2 OR 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 || 3 COLLATE latin1_bin), charset(2 || (3 COLLATE latin1_bin)), charset((2 || 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 || 3 COLLATE latin1_bin), charset(2 || (3 COLLATE latin1_bin)), charset((2 || 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10) union select * from v1;
+
+create or replace view v1 as select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1 union select * from v1;
+
+create or replace view v1 as select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0 union select * from v1;
+
+create or replace view v1 as select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0 union select * from v1;
+
+create or replace view v1 as select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0 union select * from v1;
+
+create or replace view v1 as select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0 union select * from v1;
+
+create or replace view v1 as select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3 union select * from v1;
+
+create or replace view v1 as select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 | 3, 2 || (3 | 3), (2 || 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 | 3, 2 || (3 | 3), (2 || 3) | 3 union select * from v1;
+
+create or replace view v1 as select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 || 3 + 3, 2 || (3 + 3), (2 || 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 + 3, 2 || (3 + 3), (2 || 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 - 3, 2 || (3 - 3), (2 || 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 - 3, 2 || (3 - 3), (2 || 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 ^ 3, 2 || (3 ^ 3), (2 || 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 ^ 3, 2 || (3 ^ 3), (2 || 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select charset(2 XOR 3 COLLATE latin1_bin), charset(2 XOR (3 COLLATE latin1_bin)), charset((2 XOR 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 XOR 3 COLLATE latin1_bin), charset(2 XOR (3 COLLATE latin1_bin)), charset((2 XOR 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 IN (4,5), 2 XOR (3 IN (4,5)), (2 XOR 3) IN (4,5);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 IN (4,5), 2 XOR (3 IN (4,5)), (2 XOR 3) IN (4,5) union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 OR 3, 2 XOR (3 OR 3), (2 XOR 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 OR 3, 2 XOR (3 OR 3), (2 XOR 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 0 AND 0, 2 XOR (0 AND 0), (2 XOR 0) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 0 AND 0, 2 XOR (0 AND 0), (2 XOR 0) AND 0 union select * from v1;
+
+create or replace view v1 as select 2 XOR 0 && 0, 2 XOR (0 && 0), (2 XOR 0) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 0 && 0, 2 XOR (0 && 0), (2 XOR 0) && 0 union select * from v1;
+
+create or replace view v1 as select 2 XOR 2 = 3, 2 XOR (2 = 3), (2 XOR 2) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 2 = 3, 2 XOR (2 = 3), (2 XOR 2) = 3 union select * from v1;
+
+create or replace view v1 as select NULL XOR 3 <=> 3, NULL XOR (3 <=> 3), (NULL XOR 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NULL XOR 3 <=> 3, NULL XOR (3 <=> 3), (NULL XOR 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 1 >= 3, 2 XOR (1 >= 3), (2 XOR 1) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 1 >= 3, 2 XOR (1 >= 3), (2 XOR 1) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 <= 3, 2 XOR (3 <= 3), (2 XOR 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 <= 3, 2 XOR (3 <= 3), (2 XOR 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 1 < 3, 2 XOR (1 < 3), (2 XOR 1) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 1 < 3, 2 XOR (1 < 3), (2 XOR 1) < 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 2 <> 3, 2 XOR (2 <> 3), (2 XOR 2) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 2 <> 3, 2 XOR (2 <> 3), (2 XOR 2) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 > 3, 2 XOR (3 > 3), (2 XOR 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 > 3, 2 XOR (3 > 3), (2 XOR 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 2 != 3, 2 XOR (2 != 3), (2 XOR 2) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 2 != 3, 2 XOR (2 != 3), (2 XOR 2) != 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 1 LIKE 3, 2 XOR (1 LIKE 3), (2 XOR 1) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 1 LIKE 3, 2 XOR (1 LIKE 3), (2 XOR 1) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 1 REGEXP 3, 2 XOR (1 REGEXP 3), (2 XOR 1) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 1 REGEXP 3, 2 XOR (1 REGEXP 3), (2 XOR 1) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 | 3, 2 XOR (3 | 3), (2 XOR 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 | 3, 2 XOR (3 | 3), (2 XOR 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 0 & 0, 2 XOR (0 & 0), (2 XOR 0) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 0 & 0, 2 XOR (0 & 0), (2 XOR 0) & 0 union select * from v1;
+
+create or replace view v1 as select 0 XOR 3 << 3, 0 XOR (3 << 3), (0 XOR 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 XOR 3 << 3, 0 XOR (3 << 3), (0 XOR 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 >> 3, 2 XOR (3 >> 3), (2 XOR 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 >> 3, 2 XOR (3 >> 3), (2 XOR 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR '2000-01-01' +INTERVAL 1 DAY, 2 XOR ('2000-01-01' +INTERVAL 1 DAY), (2 XOR '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR '2000-01-01' +INTERVAL 1 DAY, 2 XOR ('2000-01-01' +INTERVAL 1 DAY), (2 XOR '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 + 3, 2 XOR (3 + 3), (2 XOR 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 + 3, 2 XOR (3 + 3), (2 XOR 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 - 3, 2 XOR (3 - 3), (2 XOR 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 - 3, 2 XOR (3 - 3), (2 XOR 3) - 3 union select * from v1;
+
+create or replace view v1 as select 0 XOR 3 * 3, 0 XOR (3 * 3), (0 XOR 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 XOR 3 * 3, 0 XOR (3 * 3), (0 XOR 3) * 3 union select * from v1;
+
+create or replace view v1 as select 0 XOR 3 / 3, 0 XOR (3 / 3), (0 XOR 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 XOR 3 / 3, 0 XOR (3 / 3), (0 XOR 3) / 3 union select * from v1;
+
+create or replace view v1 as select 0 XOR 3 DIV 3, 0 XOR (3 DIV 3), (0 XOR 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 XOR 3 DIV 3, 0 XOR (3 DIV 3), (0 XOR 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 MOD 3, 2 XOR (3 MOD 3), (2 XOR 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 MOD 3, 2 XOR (3 MOD 3), (2 XOR 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 % 3, 2 XOR (3 % 3), (2 XOR 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 % 3, 2 XOR (3 % 3), (2 XOR 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 ^ 3, 2 XOR (3 ^ 3), (2 XOR 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 ^ 3, 2 XOR (3 ^ 3), (2 XOR 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 BETWEEN 0 AND 3, 2 XOR (3 BETWEEN 0 AND 3), (2 XOR 3) BETWEEN 0 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 BETWEEN 0 AND 3, 2 XOR (3 BETWEEN 0 AND 3), (2 XOR 3) BETWEEN 0 AND 3 union select * from v1;
+
+create or replace view v1 as select 0 AND 3 IS FALSE, 0 AND (3 IS FALSE), (0 AND 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 AND 3 IS FALSE, 0 AND (3 IS FALSE), (0 AND 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 AND 3 COLLATE latin1_bin), charset(2 AND (3 COLLATE latin1_bin)), charset((2 AND 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 AND 3 COLLATE latin1_bin), charset(2 AND (3 COLLATE latin1_bin)), charset((2 AND 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 AND 3 IN (0,1), 2 AND (3 IN (0,1)), (2 AND 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 IN (0,1), 2 AND (3 IN (0,1)), (2 AND 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 0 AND 3 OR 3, 0 AND (3 OR 3), (0 AND 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 AND 3 OR 3, 0 AND (3 OR 3), (0 AND 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3 union select * from v1;
+
+create or replace view v1 as select 0 AND 3 XOR 3, 0 AND (3 XOR 3), (0 AND 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 AND 3 XOR 3, 0 AND (3 XOR 3), (0 AND 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 = 3, 2 AND (3 = 3), (2 AND 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 = 3, 2 AND (3 = 3), (2 AND 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 <=> 3, 2 AND (3 <=> 3), (2 AND 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 <=> 3, 2 AND (3 <=> 3), (2 AND 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 >= 3, 2 AND (3 >= 3), (2 AND 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 >= 3, 2 AND (3 >= 3), (2 AND 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 4 <= 3, 2 AND (4 <= 3), (2 AND 4) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 4 <= 3, 2 AND (4 <= 3), (2 AND 4) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 < 3, 2 AND (3 < 3), (2 AND 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 < 3, 2 AND (3 < 3), (2 AND 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 <> 3, 2 AND (3 <> 3), (2 AND 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 <> 3, 2 AND (3 <> 3), (2 AND 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 > 1, 2 AND (3 > 1), (2 AND 3) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 > 1, 2 AND (3 > 1), (2 AND 3) > 1 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 != 3, 2 AND (3 != 3), (2 AND 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 != 3, 2 AND (3 != 3), (2 AND 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 LIKE 3, 2 AND (3 LIKE 3), (2 AND 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 LIKE 3, 2 AND (3 LIKE 3), (2 AND 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 REGEXP 3, 2 AND (3 REGEXP 3), (2 AND 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 REGEXP 3, 2 AND (3 REGEXP 3), (2 AND 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 | 3, 2 AND (3 | 3), (2 AND 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 | 3, 2 AND (3 | 3), (2 AND 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 2 & 2, 2 AND (2 & 2), (2 AND 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 2 & 2, 2 AND (2 & 2), (2 AND 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 << 3, 2 AND (3 << 3), (2 AND 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 << 3, 2 AND (3 << 3), (2 AND 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 >> 1, 2 AND (3 >> 1), (2 AND 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 >> 1, 2 AND (3 >> 1), (2 AND 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 AND '2000-01-01' +INTERVAL 1 DAY, 2 AND ('2000-01-01' +INTERVAL 1 DAY), (2 AND '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND '2000-01-01' +INTERVAL 1 DAY, 2 AND ('2000-01-01' +INTERVAL 1 DAY), (2 AND '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 AND 3 + 3, 2 AND (3 + 3), (2 AND 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 + 3, 2 AND (3 + 3), (2 AND 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 - 3, 2 AND (3 - 3), (2 AND 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 - 3, 2 AND (3 - 3), (2 AND 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 * 3, 2 AND (3 * 3), (2 AND 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 * 3, 2 AND (3 * 3), (2 AND 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 / 3, 2 AND (3 / 3), (2 AND 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 / 3, 2 AND (3 / 3), (2 AND 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 DIV 3, 2 AND (3 DIV 3), (2 AND 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 DIV 3, 2 AND (3 DIV 3), (2 AND 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 MOD 3, 2 AND (3 MOD 3), (2 AND 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 MOD 3, 2 AND (3 MOD 3), (2 AND 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 % 3, 2 AND (3 % 3), (2 AND 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 % 3, 2 AND (3 % 3), (2 AND 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 ^ 3, 2 AND (3 ^ 3), (2 AND 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 ^ 3, 2 AND (3 ^ 3), (2 AND 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 AND 3 BETWEEN 2 AND 3, 2 AND (3 BETWEEN 2 AND 3), (2 AND 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 BETWEEN 2 AND 3, 2 AND (3 BETWEEN 2 AND 3), (2 AND 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select 0 && 3 IS FALSE, 0 && (3 IS FALSE), (0 && 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 && 3 IS FALSE, 0 && (3 IS FALSE), (0 && 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 && 3 COLLATE latin1_bin), charset(2 && (3 COLLATE latin1_bin)), charset((2 && 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 && 3 COLLATE latin1_bin), charset(2 && (3 COLLATE latin1_bin)), charset((2 && 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 && 3 IN (0,1), 2 && (3 IN (0,1)), (2 && 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 IN (0,1), 2 && (3 IN (0,1)), (2 && 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 0 && 3 OR 3, 0 && (3 OR 3), (0 && 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 && 3 OR 3, 0 && (3 OR 3), (0 && 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3 union select * from v1;
+
+create or replace view v1 as select 0 && 3 XOR 3, 0 && (3 XOR 3), (0 && 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 && 3 XOR 3, 0 && (3 XOR 3), (0 && 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 = 3, 2 && (3 = 3), (2 && 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 = 3, 2 && (3 = 3), (2 && 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 <=> 3, 2 && (3 <=> 3), (2 && 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 <=> 3, 2 && (3 <=> 3), (2 && 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 >= 3, 2 && (3 >= 3), (2 && 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 >= 3, 2 && (3 >= 3), (2 && 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 && 4 <= 3, 2 && (4 <= 3), (2 && 4) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 4 <= 3, 2 && (4 <= 3), (2 && 4) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 < 3, 2 && (3 < 3), (2 && 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 < 3, 2 && (3 < 3), (2 && 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 <> 3, 2 && (3 <> 3), (2 && 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 <> 3, 2 && (3 <> 3), (2 && 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 > 1, 2 && (3 > 1), (2 && 3) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 > 1, 2 && (3 > 1), (2 && 3) > 1 union select * from v1;
+
+create or replace view v1 as select 2 && 3 != 3, 2 && (3 != 3), (2 && 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 != 3, 2 && (3 != 3), (2 && 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 LIKE 3, 2 && (3 LIKE 3), (2 && 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 LIKE 3, 2 && (3 LIKE 3), (2 && 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 REGEXP 3, 2 && (3 REGEXP 3), (2 && 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 REGEXP 3, 2 && (3 REGEXP 3), (2 && 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 | 3, 2 && (3 | 3), (2 && 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 | 3, 2 && (3 | 3), (2 && 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 && 2 & 2, 2 && (2 & 2), (2 && 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 2 & 2, 2 && (2 & 2), (2 && 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 && 3 << 3, 2 && (3 << 3), (2 && 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 << 3, 2 && (3 << 3), (2 && 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 >> 1, 2 && (3 >> 1), (2 && 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 >> 1, 2 && (3 >> 1), (2 && 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 && '2000-01-01' +INTERVAL 1 DAY, 2 && ('2000-01-01' +INTERVAL 1 DAY), (2 && '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && '2000-01-01' +INTERVAL 1 DAY, 2 && ('2000-01-01' +INTERVAL 1 DAY), (2 && '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 && 3 + 3, 2 && (3 + 3), (2 && 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 + 3, 2 && (3 + 3), (2 && 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 - 3, 2 && (3 - 3), (2 && 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 - 3, 2 && (3 - 3), (2 && 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 * 3, 2 && (3 * 3), (2 && 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 * 3, 2 && (3 * 3), (2 && 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 / 3, 2 && (3 / 3), (2 && 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 / 3, 2 && (3 / 3), (2 && 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 DIV 3, 2 && (3 DIV 3), (2 && 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 DIV 3, 2 && (3 DIV 3), (2 && 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 MOD 3, 2 && (3 MOD 3), (2 && 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 MOD 3, 2 && (3 MOD 3), (2 && 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 % 3, 2 && (3 % 3), (2 && 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 % 3, 2 && (3 % 3), (2 && 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 ^ 3, 2 && (3 ^ 3), (2 && 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 ^ 3, 2 && (3 ^ 3), (2 && 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 && 3 BETWEEN 2 AND 3, 2 && (3 BETWEEN 2 AND 3), (2 && 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 BETWEEN 2 AND 3, 2 && (3 BETWEEN 2 AND 3), (2 && 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 IS FALSE, 2 = (3 IS FALSE), (2 = 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 IS FALSE, 2 = (3 IS FALSE), (2 = 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 = 3 COLLATE latin1_bin), charset(2 = (3 COLLATE latin1_bin)), charset((2 = 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 = 3 COLLATE latin1_bin), charset(2 = (3 COLLATE latin1_bin)), charset((2 = 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 = 3 IN (0,1), 2 = (3 IN (0,1)), (2 = 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 IN (0,1), 2 = (3 IN (0,1)), (2 = 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 = 3 OR 3, 2 = (3 OR 3), (2 = 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 OR 3, 2 = (3 OR 3), (2 = 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 XOR 3, 2 = (3 XOR 3), (2 = 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 XOR 3, 2 = (3 XOR 3), (2 = 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 = 2 AND 2, 2 = (2 AND 2), (2 = 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 2 AND 2, 2 = (2 AND 2), (2 = 2) AND 2 union select * from v1;
+
+create or replace view v1 as select 2 = 2 && 2, 2 = (2 && 2), (2 = 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 2 && 2, 2 = (2 && 2), (2 = 2) && 2 union select * from v1;
+
+create or replace view v1 as select 1 = 3 = 3, 1 = (3 = 3), (1 = 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 = 3, 1 = (3 = 3), (1 = 3) = 3 union select * from v1;
+
+create or replace view v1 as select 1 = 3 <=> 3, 1 = (3 <=> 3), (1 = 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 <=> 3, 1 = (3 <=> 3), (1 = 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 1 = 3 >= 3, 1 = (3 >= 3), (1 = 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 >= 3, 1 = (3 >= 3), (1 = 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 <= 3, 2 = (3 <= 3), (2 = 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 <= 3, 2 = (3 <= 3), (2 = 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 < 3, 2 = (3 < 3), (2 = 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 < 3, 2 = (3 < 3), (2 = 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 <> 3, 2 = (3 <> 3), (2 = 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 <> 3, 2 = (3 <> 3), (2 = 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 0 = 3 > 3, 0 = (3 > 3), (0 = 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 = 3 > 3, 0 = (3 > 3), (0 = 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 != 3, 2 = (3 != 3), (2 = 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 != 3, 2 = (3 != 3), (2 = 3) != 3 union select * from v1;
+
+create or replace view v1 as select 1 = 3 LIKE 3, 1 = (3 LIKE 3), (1 = 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 LIKE 3, 1 = (3 LIKE 3), (1 = 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 1 = 3 REGEXP 3, 1 = (3 REGEXP 3), (1 = 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 REGEXP 3, 1 = (3 REGEXP 3), (1 = 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 | 3, 2 = (3 | 3), (2 = 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 | 3, 2 = (3 | 3), (2 = 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 & 2, 2 = (3 & 2), (2 = 3) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 & 2, 2 = (3 & 2), (2 = 3) & 2 union select * from v1;
+
+create or replace view v1 as select 3 = 3 << 3, 3 = (3 << 3), (3 = 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 = 3 << 3, 3 = (3 << 3), (3 = 3) << 3 union select * from v1;
+
+create or replace view v1 as select 1 = 3 >> 1, 1 = (3 >> 1), (1 = 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 >> 1, 1 = (3 >> 1), (1 = 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 = '2000-01-01' +INTERVAL 1 DAY, 2 = ('2000-01-01' +INTERVAL 1 DAY), (2 = '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = '2000-01-01' +INTERVAL 1 DAY, 2 = ('2000-01-01' +INTERVAL 1 DAY), (2 = '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 = 3 + 3, 2 = (3 + 3), (2 = 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 + 3, 2 = (3 + 3), (2 = 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 - 3, 2 = (3 - 3), (2 = 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 - 3, 2 = (3 - 3), (2 = 3) - 3 union select * from v1;
+
+create or replace view v1 as select 3 = 3 * 3, 3 = (3 * 3), (3 = 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 = 3 * 3, 3 = (3 * 3), (3 = 3) * 3 union select * from v1;
+
+create or replace view v1 as select 3 = 9 / 3, 3 = (9 / 3), (3 = 9) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 = 9 / 3, 3 = (9 / 3), (3 = 9) / 3 union select * from v1;
+
+create or replace view v1 as select 3 = 9 DIV 3, 3 = (9 DIV 3), (3 = 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 = 9 DIV 3, 3 = (9 DIV 3), (3 = 9) DIV 3 union select * from v1;
+
+create or replace view v1 as select 3 = 3 MOD 3, 3 = (3 MOD 3), (3 = 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 = 3 MOD 3, 3 = (3 MOD 3), (3 = 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 3 = 3 % 3, 3 = (3 % 3), (3 = 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 = 3 % 3, 3 = (3 % 3), (3 = 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 ^ 3, 2 = (3 ^ 3), (2 = 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 ^ 3, 2 = (3 ^ 3), (2 = 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 1 = 3 BETWEEN 1 AND 3, 1 = (3 BETWEEN 1 AND 3), (1 = 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 = 3 BETWEEN 1 AND 3, 1 = (3 BETWEEN 1 AND 3), (1 = 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 IS FALSE, 2 <=> (3 IS FALSE), (2 <=> 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 IS FALSE, 2 <=> (3 IS FALSE), (2 <=> 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 <=> 3 COLLATE latin1_bin), charset(2 <=> (3 COLLATE latin1_bin)), charset((2 <=> 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 <=> 3 COLLATE latin1_bin), charset(2 <=> (3 COLLATE latin1_bin)), charset((2 <=> 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 IN (0,1), 2 <=> (3 IN (0,1)), (2 <=> 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 IN (0,1), 2 <=> (3 IN (0,1)), (2 <=> 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 OR 3, 2 <=> (3 OR 3), (2 <=> 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 OR 3, 2 <=> (3 OR 3), (2 <=> 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 XOR 3, 2 <=> (3 XOR 3), (2 <=> 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 XOR 3, 2 <=> (3 XOR 3), (2 <=> 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 2 AND 2, 2 <=> (2 AND 2), (2 <=> 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 2 AND 2, 2 <=> (2 AND 2), (2 <=> 2) AND 2 union select * from v1;
+
+create or replace view v1 as select 2 <=> 2 && 2, 2 <=> (2 && 2), (2 <=> 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 2 && 2, 2 <=> (2 && 2), (2 <=> 2) && 2 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 = 3, 1 <=> (3 = 3), (1 <=> 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 = 3, 1 <=> (3 = 3), (1 <=> 3) = 3 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 <=> 3, 1 <=> (3 <=> 3), (1 <=> 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 <=> 3, 1 <=> (3 <=> 3), (1 <=> 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 >= 3, 1 <=> (3 >= 3), (1 <=> 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 >= 3, 1 <=> (3 >= 3), (1 <=> 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 <= 3, 2 <=> (3 <= 3), (2 <=> 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 <= 3, 2 <=> (3 <= 3), (2 <=> 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 < 3, 2 <=> (3 < 3), (2 <=> 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 < 3, 2 <=> (3 < 3), (2 <=> 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 <> 3, 2 <=> (3 <> 3), (2 <=> 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 <> 3, 2 <=> (3 <> 3), (2 <=> 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 0 <=> 3 > 3, 0 <=> (3 > 3), (0 <=> 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 <=> 3 > 3, 0 <=> (3 > 3), (0 <=> 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 != 3, 2 <=> (3 != 3), (2 <=> 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 != 3, 2 <=> (3 != 3), (2 <=> 3) != 3 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 LIKE 3, 1 <=> (3 LIKE 3), (1 <=> 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 LIKE 3, 1 <=> (3 LIKE 3), (1 <=> 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 REGEXP 3, 1 <=> (3 REGEXP 3), (1 <=> 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 REGEXP 3, 1 <=> (3 REGEXP 3), (1 <=> 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 | 3, 2 <=> (3 | 3), (2 <=> 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 | 3, 2 <=> (3 | 3), (2 <=> 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 & 2, 2 <=> (3 & 2), (2 <=> 3) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 & 2, 2 <=> (3 & 2), (2 <=> 3) & 2 union select * from v1;
+
+create or replace view v1 as select 3 <=> 3 << 3, 3 <=> (3 << 3), (3 <=> 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <=> 3 << 3, 3 <=> (3 << 3), (3 <=> 3) << 3 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 >> 1, 1 <=> (3 >> 1), (1 <=> 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 >> 1, 1 <=> (3 >> 1), (1 <=> 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 <=> '2000-01-01' +INTERVAL 1 DAY, 2 <=> ('2000-01-01' +INTERVAL 1 DAY), (2 <=> '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> '2000-01-01' +INTERVAL 1 DAY, 2 <=> ('2000-01-01' +INTERVAL 1 DAY), (2 <=> '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 + 3, 2 <=> (3 + 3), (2 <=> 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 + 3, 2 <=> (3 + 3), (2 <=> 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 - 3, 2 <=> (3 - 3), (2 <=> 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 - 3, 2 <=> (3 - 3), (2 <=> 3) - 3 union select * from v1;
+
+create or replace view v1 as select 3 <=> 3 * 3, 3 <=> (3 * 3), (3 <=> 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <=> 3 * 3, 3 <=> (3 * 3), (3 <=> 3) * 3 union select * from v1;
+
+create or replace view v1 as select 3 <=> 9 / 3, 3 <=> (9 / 3), (3 <=> 9) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <=> 9 / 3, 3 <=> (9 / 3), (3 <=> 9) / 3 union select * from v1;
+
+create or replace view v1 as select 3 <=> 9 DIV 3, 3 <=> (9 DIV 3), (3 <=> 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <=> 9 DIV 3, 3 <=> (9 DIV 3), (3 <=> 9) DIV 3 union select * from v1;
+
+create or replace view v1 as select 3 <=> 3 MOD 3, 3 <=> (3 MOD 3), (3 <=> 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <=> 3 MOD 3, 3 <=> (3 MOD 3), (3 <=> 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 3 <=> 3 % 3, 3 <=> (3 % 3), (3 <=> 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <=> 3 % 3, 3 <=> (3 % 3), (3 <=> 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 ^ 3, 2 <=> (3 ^ 3), (2 <=> 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 ^ 3, 2 <=> (3 ^ 3), (2 <=> 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 1 <=> 3 BETWEEN 1 AND 3, 1 <=> (3 BETWEEN 1 AND 3), (1 <=> 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <=> 3 BETWEEN 1 AND 3, 1 <=> (3 BETWEEN 1 AND 3), (1 <=> 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 4 >= 3 IS FALSE, 4 >= (3 IS FALSE), (4 >= 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 >= 3 IS FALSE, 4 >= (3 IS FALSE), (4 >= 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 >= 3 COLLATE latin1_bin), charset(2 >= (3 COLLATE latin1_bin)), charset((2 >= 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 >= 3 COLLATE latin1_bin), charset(2 >= (3 COLLATE latin1_bin)), charset((2 >= 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 >= 3 IN (1,1), 2 >= (3 IN (1,1)), (2 >= 3) IN (1,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 IN (1,1), 2 >= (3 IN (1,1)), (2 >= 3) IN (1,1) union select * from v1;
+
+create or replace view v1 as select 2 >= 3 OR 0, 2 >= (3 OR 0), (2 >= 3) OR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 OR 0, 2 >= (3 OR 0), (2 >= 3) OR 0 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 XOR 0, 2 >= (3 XOR 0), (2 >= 3) XOR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 XOR 0, 2 >= (3 XOR 0), (2 >= 3) XOR 0 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 AND 3, 2 >= (3 AND 3), (2 >= 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 AND 3, 2 >= (3 AND 3), (2 >= 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 && 3, 2 >= (3 && 3), (2 >= 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 && 3, 2 >= (3 && 3), (2 >= 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 = 3, 2 >= (3 = 3), (2 >= 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 = 3, 2 >= (3 = 3), (2 >= 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 <=> 3, 2 >= (3 <=> 3), (2 >= 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 <=> 3, 2 >= (3 <=> 3), (2 >= 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 >= 3, 2 >= (3 >= 3), (2 >= 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 >= 3, 2 >= (3 >= 3), (2 >= 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 0 >= 3 <= 3, 0 >= (3 <= 3), (0 >= 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 >= 3 <= 3, 0 >= (3 <= 3), (0 >= 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 0 >= 2 < 3, 0 >= (2 < 3), (0 >= 2) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 >= 2 < 3, 0 >= (2 < 3), (0 >= 2) < 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 <> 0, 2 >= (3 <> 0), (2 >= 3) <> 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 <> 0, 2 >= (3 <> 0), (2 >= 3) <> 0 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 > 3, 2 >= (3 > 3), (2 >= 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 > 3, 2 >= (3 > 3), (2 >= 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 != 0, 2 >= (3 != 0), (2 >= 3) != 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 != 0, 2 >= (3 != 0), (2 >= 3) != 0 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 LIKE 3, 2 >= (3 LIKE 3), (2 >= 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 LIKE 3, 2 >= (3 LIKE 3), (2 >= 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 REGEXP 3, 2 >= (3 REGEXP 3), (2 >= 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 REGEXP 3, 2 >= (3 REGEXP 3), (2 >= 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 | 3, 2 >= (3 | 3), (2 >= 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 | 3, 2 >= (3 | 3), (2 >= 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 & 1, 2 >= (3 & 1), (2 >= 3) & 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 & 1, 2 >= (3 & 1), (2 >= 3) & 1 union select * from v1;
+
+create or replace view v1 as select 3 >= 3 << 3, 3 >= (3 << 3), (3 >= 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 >= 3 << 3, 3 >= (3 << 3), (3 >= 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 >> 3, 2 >= (3 >> 3), (2 >= 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 >> 3, 2 >= (3 >> 3), (2 >= 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 >= '2000-01-01' +INTERVAL 1 DAY, 2 >= ('2000-01-01' +INTERVAL 1 DAY), (2 >= '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= '2000-01-01' +INTERVAL 1 DAY, 2 >= ('2000-01-01' +INTERVAL 1 DAY), (2 >= '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 >= 3 + 3, 2 >= (3 + 3), (2 >= 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 + 3, 2 >= (3 + 3), (2 >= 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 - 3, 2 >= (3 - 3), (2 >= 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 - 3, 2 >= (3 - 3), (2 >= 3) - 3 union select * from v1;
+
+create or replace view v1 as select 3 >= 3 * 3, 3 >= (3 * 3), (3 >= 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 >= 3 * 3, 3 >= (3 * 3), (3 >= 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 / 3, 2 >= (3 / 3), (2 >= 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 / 3, 2 >= (3 / 3), (2 >= 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 DIV 3, 2 >= (3 DIV 3), (2 >= 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 DIV 3, 2 >= (3 DIV 3), (2 >= 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 MOD 3, 2 >= (3 MOD 3), (2 >= 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 MOD 3, 2 >= (3 MOD 3), (2 >= 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 % 3, 2 >= (3 % 3), (2 >= 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 % 3, 2 >= (3 % 3), (2 >= 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 ^ 3, 2 >= (3 ^ 3), (2 >= 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 ^ 3, 2 >= (3 ^ 3), (2 >= 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 BETWEEN 1 AND 3, 2 >= (3 BETWEEN 1 AND 3), (2 >= 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 BETWEEN 1 AND 3, 2 >= (3 BETWEEN 1 AND 3), (2 >= 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 1 IS FALSE, 2 <= (1 IS FALSE), (2 <= 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 1 IS FALSE, 2 <= (1 IS FALSE), (2 <= 1) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 <= 3 COLLATE latin1_bin), charset(2 <= (3 COLLATE latin1_bin)), charset((2 <= 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 <= 3 COLLATE latin1_bin), charset(2 <= (3 COLLATE latin1_bin)), charset((2 <= 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 <= 3 IN (0,1), 2 <= (3 IN (0,1)), (2 <= 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 IN (0,1), 2 <= (3 IN (0,1)), (2 <= 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 <= 3 OR 3, 2 <= (3 OR 3), (2 <= 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 OR 3, 2 <= (3 OR 3), (2 <= 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 1 XOR 1, 2 <= (1 XOR 1), (2 <= 1) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 1 XOR 1, 2 <= (1 XOR 1), (2 <= 1) XOR 1 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 AND 3, 2 <= (3 AND 3), (2 <= 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 AND 3, 2 <= (3 AND 3), (2 <= 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 && 3, 2 <= (3 && 3), (2 <= 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 && 3, 2 <= (3 && 3), (2 <= 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 0 = 0, 2 <= (0 = 0), (2 <= 0) = 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 0 = 0, 2 <= (0 = 0), (2 <= 0) = 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 0 <=> 0, 2 <= (0 <=> 0), (2 <= 0) <=> 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 0 <=> 0, 2 <= (0 <=> 0), (2 <= 0) <=> 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 0 >= 0, 2 <= (0 >= 0), (2 <= 0) >= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 0 >= 0, 2 <= (0 >= 0), (2 <= 0) >= 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 <= 3, 2 <= (3 <= 3), (2 <= 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 <= 3, 2 <= (3 <= 3), (2 <= 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 < 3, 2 <= (3 < 3), (2 <= 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 < 3, 2 <= (3 < 3), (2 <= 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 <> 3, 2 <= (3 <> 3), (2 <= 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 <> 3, 2 <= (3 <> 3), (2 <= 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 > 0, 2 <= (3 > 0), (2 <= 3) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 > 0, 2 <= (3 > 0), (2 <= 3) > 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 != 3, 2 <= (3 != 3), (2 <= 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 != 3, 2 <= (3 != 3), (2 <= 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 0 LIKE 0, 2 <= (0 LIKE 0), (2 <= 0) LIKE 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 0 LIKE 0, 2 <= (0 LIKE 0), (2 <= 0) LIKE 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 0 REGEXP 0, 2 <= (0 REGEXP 0), (2 <= 0) REGEXP 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 0 REGEXP 0, 2 <= (0 REGEXP 0), (2 <= 0) REGEXP 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 | 3, 2 <= (3 | 3), (2 <= 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 | 3, 2 <= (3 | 3), (2 <= 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 & 2, 2 <= (3 & 2), (2 <= 3) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 & 2, 2 <= (3 & 2), (2 <= 3) & 2 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 << 3, 2 <= (3 << 3), (2 <= 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 << 3, 2 <= (3 << 3), (2 <= 3) << 3 union select * from v1;
+
+create or replace view v1 as select 0 <= 3 >> 1, 0 <= (3 >> 1), (0 <= 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 <= 3 >> 1, 0 <= (3 >> 1), (0 <= 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 <= '2000-01-01' +INTERVAL 1 DAY, 2 <= ('2000-01-01' +INTERVAL 1 DAY), (2 <= '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= '2000-01-01' +INTERVAL 1 DAY, 2 <= ('2000-01-01' +INTERVAL 1 DAY), (2 <= '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 <= 3 + 3, 2 <= (3 + 3), (2 <= 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 + 3, 2 <= (3 + 3), (2 <= 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 - 3, 2 <= (3 - 3), (2 <= 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 - 3, 2 <= (3 - 3), (2 <= 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 * 3, 2 <= (3 * 3), (2 <= 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 * 3, 2 <= (3 * 3), (2 <= 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 / 3, 2 <= (3 / 3), (2 <= 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 / 3, 2 <= (3 / 3), (2 <= 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 9 DIV 3, 2 <= (9 DIV 3), (2 <= 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 9 DIV 3, 2 <= (9 DIV 3), (2 <= 9) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 MOD 3, 2 <= (3 MOD 3), (2 <= 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 MOD 3, 2 <= (3 MOD 3), (2 <= 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 % 3, 2 <= (3 % 3), (2 <= 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 % 3, 2 <= (3 % 3), (2 <= 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 ^ 3, 2 <= (3 ^ 3), (2 <= 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 ^ 3, 2 <= (3 ^ 3), (2 <= 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 BETWEEN 1 AND 3, 2 <= (3 BETWEEN 1 AND 3), (2 <= 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 BETWEEN 1 AND 3, 2 <= (3 BETWEEN 1 AND 3), (2 <= 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 < 1 IS FALSE, 2 < (1 IS FALSE), (2 < 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 1 IS FALSE, 2 < (1 IS FALSE), (2 < 1) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 < 3 COLLATE latin1_bin), charset(2 < (3 COLLATE latin1_bin)), charset((2 < 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 < 3 COLLATE latin1_bin), charset(2 < (3 COLLATE latin1_bin)), charset((2 < 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 < 3 IN (0,1), 2 < (3 IN (0,1)), (2 < 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 IN (0,1), 2 < (3 IN (0,1)), (2 < 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 < 3 OR 3, 2 < (3 OR 3), (2 < 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 OR 3, 2 < (3 OR 3), (2 < 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 XOR 0, 2 < (3 XOR 0), (2 < 3) XOR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 XOR 0, 2 < (3 XOR 0), (2 < 3) XOR 0 union select * from v1;
+
+create or replace view v1 as select 2 < 3 AND 3, 2 < (3 AND 3), (2 < 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 AND 3, 2 < (3 AND 3), (2 < 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 && 3, 2 < (3 && 3), (2 < 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 && 3, 2 < (3 && 3), (2 < 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 = 1, 2 < (3 = 1), (2 < 3) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 = 1, 2 < (3 = 1), (2 < 3) = 1 union select * from v1;
+
+create or replace view v1 as select 2 < 3 <=> 1, 2 < (3 <=> 1), (2 < 3) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 <=> 1, 2 < (3 <=> 1), (2 < 3) <=> 1 union select * from v1;
+
+create or replace view v1 as select 2 < 3 >= 1, 2 < (3 >= 1), (2 < 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 >= 1, 2 < (3 >= 1), (2 < 3) >= 1 union select * from v1;
+
+create or replace view v1 as select 2 < 3 <= 3, 2 < (3 <= 3), (2 < 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 <= 3, 2 < (3 <= 3), (2 < 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 < 3, 2 < (3 < 3), (2 < 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 < 3, 2 < (3 < 3), (2 < 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 <> 3, 2 < (3 <> 3), (2 < 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 <> 3, 2 < (3 <> 3), (2 < 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 > 0, 2 < (3 > 0), (2 < 3) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 > 0, 2 < (3 > 0), (2 < 3) > 0 union select * from v1;
+
+create or replace view v1 as select 2 < 3 != 3, 2 < (3 != 3), (2 < 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 != 3, 2 < (3 != 3), (2 < 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 LIKE 1, 2 < (3 LIKE 1), (2 < 3) LIKE 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 LIKE 1, 2 < (3 LIKE 1), (2 < 3) LIKE 1 union select * from v1;
+
+create or replace view v1 as select 2 < 3 REGEXP 1, 2 < (3 REGEXP 1), (2 < 3) REGEXP 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 REGEXP 1, 2 < (3 REGEXP 1), (2 < 3) REGEXP 1 union select * from v1;
+
+create or replace view v1 as select 2 < 3 | 3, 2 < (3 | 3), (2 < 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 | 3, 2 < (3 | 3), (2 < 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 < 4 & 4, 2 < (4 & 4), (2 < 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 4 & 4, 2 < (4 & 4), (2 < 4) & 4 union select * from v1;
+
+create or replace view v1 as select 2 < 3 << 3, 2 < (3 << 3), (2 < 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 << 3, 2 < (3 << 3), (2 < 3) << 3 union select * from v1;
+
+create or replace view v1 as select 0 < 3 >> 1, 0 < (3 >> 1), (0 < 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 < 3 >> 1, 0 < (3 >> 1), (0 < 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 < '2000-01-01' +INTERVAL 1 DAY, 2 < ('2000-01-01' +INTERVAL 1 DAY), (2 < '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < '2000-01-01' +INTERVAL 1 DAY, 2 < ('2000-01-01' +INTERVAL 1 DAY), (2 < '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 < 3 + 3, 2 < (3 + 3), (2 < 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 + 3, 2 < (3 + 3), (2 < 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 - 3, 2 < (3 - 3), (2 < 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 - 3, 2 < (3 - 3), (2 < 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 * 3, 2 < (3 * 3), (2 < 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 * 3, 2 < (3 * 3), (2 < 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 / 3, 2 < (3 / 3), (2 < 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 / 3, 2 < (3 / 3), (2 < 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 < 9 DIV 3, 2 < (9 DIV 3), (2 < 9) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 9 DIV 3, 2 < (9 DIV 3), (2 < 9) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 MOD 3, 2 < (3 MOD 3), (2 < 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 MOD 3, 2 < (3 MOD 3), (2 < 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 % 3, 2 < (3 % 3), (2 < 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 % 3, 2 < (3 % 3), (2 < 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 ^ 3, 2 < (3 ^ 3), (2 < 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 ^ 3, 2 < (3 ^ 3), (2 < 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 BETWEEN 1 AND 3, 2 < (3 BETWEEN 1 AND 3), (2 < 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 BETWEEN 1 AND 3, 2 < (3 BETWEEN 1 AND 3), (2 < 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 IS FALSE, 2 <> (3 IS FALSE), (2 <> 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 IS FALSE, 2 <> (3 IS FALSE), (2 <> 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 <> 3 COLLATE latin1_bin), charset(2 <> (3 COLLATE latin1_bin)), charset((2 <> 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 <> 3 COLLATE latin1_bin), charset(2 <> (3 COLLATE latin1_bin)), charset((2 <> 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 <> 3 IN (0,0), 2 <> (3 IN (0,0)), (2 <> 3) IN (0,0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 IN (0,0), 2 <> (3 IN (0,0)), (2 <> 3) IN (0,0) union select * from v1;
+
+create or replace view v1 as select 1 <> 3 OR 3, 1 <> (3 OR 3), (1 <> 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <> 3 OR 3, 1 <> (3 OR 3), (1 <> 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 XOR 3, 2 <> (3 XOR 3), (2 <> 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 XOR 3, 2 <> (3 XOR 3), (2 <> 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 3 <> 3 AND 3, 3 <> (3 AND 3), (3 <> 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <> 3 AND 3, 3 <> (3 AND 3), (3 <> 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 3 <> 3 && 3, 3 <> (3 && 3), (3 <> 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <> 3 && 3, 3 <> (3 && 3), (3 <> 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 = 3, 2 <> (3 = 3), (2 <> 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 = 3, 2 <> (3 = 3), (2 <> 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 <=> 3, 2 <> (3 <=> 3), (2 <> 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 <=> 3, 2 <> (3 <=> 3), (2 <> 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 >= 3, 2 <> (3 >= 3), (2 <> 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 >= 3, 2 <> (3 >= 3), (2 <> 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 1 <> 3 <= 3, 1 <> (3 <= 3), (1 <> 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <> 3 <= 3, 1 <> (3 <= 3), (1 <> 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 0 <> 3 < 3, 0 <> (3 < 3), (0 <> 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 <> 3 < 3, 0 <> (3 < 3), (0 <> 3) < 3 union select * from v1;
+
+create or replace view v1 as select 0 <> 3 <> 3, 0 <> (3 <> 3), (0 <> 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 <> 3 <> 3, 0 <> (3 <> 3), (0 <> 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 > 3, 2 <> (3 > 3), (2 <> 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 > 3, 2 <> (3 > 3), (2 <> 3) > 3 union select * from v1;
+
+create or replace view v1 as select 0 <> 3 != 3, 0 <> (3 != 3), (0 <> 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 <> 3 != 3, 0 <> (3 != 3), (0 <> 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 LIKE 3, 2 <> (3 LIKE 3), (2 <> 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 LIKE 3, 2 <> (3 LIKE 3), (2 <> 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 REGEXP 3, 2 <> (3 REGEXP 3), (2 <> 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 REGEXP 3, 2 <> (3 REGEXP 3), (2 <> 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 | 3, 2 <> (3 | 3), (2 <> 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 | 3, 2 <> (3 | 3), (2 <> 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 4 & 4, 2 <> (4 & 4), (2 <> 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 4 & 4, 2 <> (4 & 4), (2 <> 4) & 4 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 << 3, 2 <> (3 << 3), (2 <> 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 << 3, 2 <> (3 << 3), (2 <> 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 >> 3, 2 <> (3 >> 3), (2 <> 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 >> 3, 2 <> (3 >> 3), (2 <> 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 <> '2000-01-01' +INTERVAL 1 DAY, 2 <> ('2000-01-01' +INTERVAL 1 DAY), (2 <> '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> '2000-01-01' +INTERVAL 1 DAY, 2 <> ('2000-01-01' +INTERVAL 1 DAY), (2 <> '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 <> 3 + 3, 2 <> (3 + 3), (2 <> 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 + 3, 2 <> (3 + 3), (2 <> 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 - 3, 2 <> (3 - 3), (2 <> 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 - 3, 2 <> (3 - 3), (2 <> 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 * 3, 2 <> (3 * 3), (2 <> 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 * 3, 2 <> (3 * 3), (2 <> 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 / 3, 2 <> (3 / 3), (2 <> 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 / 3, 2 <> (3 / 3), (2 <> 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 DIV 3, 2 <> (3 DIV 3), (2 <> 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 DIV 3, 2 <> (3 DIV 3), (2 <> 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 3 <> 3 MOD 3, 3 <> (3 MOD 3), (3 <> 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <> 3 MOD 3, 3 <> (3 MOD 3), (3 <> 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 3 <> 3 % 3, 3 <> (3 % 3), (3 <> 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 <> 3 % 3, 3 <> (3 % 3), (3 <> 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 ^ 3, 2 <> (3 ^ 3), (2 <> 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 ^ 3, 2 <> (3 ^ 3), (2 <> 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 <> 3 BETWEEN 2 AND 3, 2 <> (3 BETWEEN 2 AND 3), (2 <> 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 BETWEEN 2 AND 3, 2 <> (3 BETWEEN 2 AND 3), (2 <> 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 > 0 IS FALSE, 2 > (0 IS FALSE), (2 > 0) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 0 IS FALSE, 2 > (0 IS FALSE), (2 > 0) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 > 3 COLLATE latin1_bin), charset(2 > (3 COLLATE latin1_bin)), charset((2 > 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 > 3 COLLATE latin1_bin), charset(2 > (3 COLLATE latin1_bin)), charset((2 > 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 > 3 IN (1,1), 2 > (3 IN (1,1)), (2 > 3) IN (1,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 IN (1,1), 2 > (3 IN (1,1)), (2 > 3) IN (1,1) union select * from v1;
+
+create or replace view v1 as select 0 > 3 OR 3, 0 > (3 OR 3), (0 > 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 > 3 OR 3, 0 > (3 OR 3), (0 > 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3 union select * from v1;
+
+create or replace view v1 as select 4 > 3 XOR 3, 4 > (3 XOR 3), (4 > 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 > 3 XOR 3, 4 > (3 XOR 3), (4 > 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 AND 3, 2 > (3 AND 3), (2 > 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 AND 3, 2 > (3 AND 3), (2 > 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 && 3, 2 > (3 && 3), (2 > 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 && 3, 2 > (3 && 3), (2 > 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 = 3, 2 > (3 = 3), (2 > 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 = 3, 2 > (3 = 3), (2 > 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 <=> 3, 2 > (3 <=> 3), (2 > 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 <=> 3, 2 > (3 <=> 3), (2 > 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 >= 3, 2 > (3 >= 3), (2 > 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 >= 3, 2 > (3 >= 3), (2 > 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 > 0 <= 0, 2 > (0 <= 0), (2 > 0) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 0 <= 0, 2 > (0 <= 0), (2 > 0) <= 0 union select * from v1;
+
+create or replace view v1 as select 2 > 0 < 0, 2 > (0 < 0), (2 > 0) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 0 < 0, 2 > (0 < 0), (2 > 0) < 0 union select * from v1;
+
+create or replace view v1 as select 2 > 1 <> 1, 2 > (1 <> 1), (2 > 1) <> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 1 <> 1, 2 > (1 <> 1), (2 > 1) <> 1 union select * from v1;
+
+create or replace view v1 as select 2 > 3 > 3, 2 > (3 > 3), (2 > 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 > 3, 2 > (3 > 3), (2 > 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 > 1 != 1, 2 > (1 != 1), (2 > 1) != 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 1 != 1, 2 > (1 != 1), (2 > 1) != 1 union select * from v1;
+
+create or replace view v1 as select 2 > 3 LIKE 3, 2 > (3 LIKE 3), (2 > 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 LIKE 3, 2 > (3 LIKE 3), (2 > 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 REGEXP 3, 2 > (3 REGEXP 3), (2 > 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 REGEXP 3, 2 > (3 REGEXP 3), (2 > 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 | 3, 2 > (3 | 3), (2 > 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 | 3, 2 > (3 | 3), (2 > 3) | 3 union select * from v1;
+
+create or replace view v1 as select 4 > 2 & 2, 4 > (2 & 2), (4 > 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 > 2 & 2, 4 > (2 & 2), (4 > 2) & 2 union select * from v1;
+
+create or replace view v1 as select 4 > 3 << 3, 4 > (3 << 3), (4 > 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 > 3 << 3, 4 > (3 << 3), (4 > 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 >> 3, 2 > (3 >> 3), (2 > 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 >> 3, 2 > (3 >> 3), (2 > 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 > '2000-01-01' +INTERVAL 1 DAY, 2 > ('2000-01-01' +INTERVAL 1 DAY), (2 > '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > '2000-01-01' +INTERVAL 1 DAY, 2 > ('2000-01-01' +INTERVAL 1 DAY), (2 > '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 > 3 + 3, 2 > (3 + 3), (2 > 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 + 3, 2 > (3 + 3), (2 > 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 - 3, 2 > (3 - 3), (2 > 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 - 3, 2 > (3 - 3), (2 > 3) - 3 union select * from v1;
+
+create or replace view v1 as select 4 > 3 * 3, 4 > (3 * 3), (4 > 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 > 3 * 3, 4 > (3 * 3), (4 > 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 / 3, 2 > (3 / 3), (2 > 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 / 3, 2 > (3 / 3), (2 > 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 DIV 3, 2 > (3 DIV 3), (2 > 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 DIV 3, 2 > (3 DIV 3), (2 > 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 MOD 3, 2 > (3 MOD 3), (2 > 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 MOD 3, 2 > (3 MOD 3), (2 > 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 % 3, 2 > (3 % 3), (2 > 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 % 3, 2 > (3 % 3), (2 > 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 ^ 3, 2 > (3 ^ 3), (2 > 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 ^ 3, 2 > (3 ^ 3), (2 > 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 > 3 BETWEEN 1 AND 3, 2 > (3 BETWEEN 1 AND 3), (2 > 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 BETWEEN 1 AND 3, 2 > (3 BETWEEN 1 AND 3), (2 > 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 IS FALSE, 2 != (3 IS FALSE), (2 != 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 IS FALSE, 2 != (3 IS FALSE), (2 != 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 != 3 COLLATE latin1_bin), charset(2 != (3 COLLATE latin1_bin)), charset((2 != 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 != 3 COLLATE latin1_bin), charset(2 != (3 COLLATE latin1_bin)), charset((2 != 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 != 3 IN (0,0), 2 != (3 IN (0,0)), (2 != 3) IN (0,0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 IN (0,0), 2 != (3 IN (0,0)), (2 != 3) IN (0,0) union select * from v1;
+
+create or replace view v1 as select 1 != 3 OR 3, 1 != (3 OR 3), (1 != 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 != 3 OR 3, 1 != (3 OR 3), (1 != 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 XOR 3, 2 != (3 XOR 3), (2 != 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 XOR 3, 2 != (3 XOR 3), (2 != 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 3 != 3 AND 3, 3 != (3 AND 3), (3 != 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 != 3 AND 3, 3 != (3 AND 3), (3 != 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 3 != 3 && 3, 3 != (3 && 3), (3 != 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 != 3 && 3, 3 != (3 && 3), (3 != 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 = 3, 2 != (3 = 3), (2 != 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 = 3, 2 != (3 = 3), (2 != 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 <=> 3, 2 != (3 <=> 3), (2 != 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 <=> 3, 2 != (3 <=> 3), (2 != 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 >= 3, 2 != (3 >= 3), (2 != 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 >= 3, 2 != (3 >= 3), (2 != 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 1 != 3 <= 3, 1 != (3 <= 3), (1 != 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 != 3 <= 3, 1 != (3 <= 3), (1 != 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 0 != 3 < 3, 0 != (3 < 3), (0 != 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 != 3 < 3, 0 != (3 < 3), (0 != 3) < 3 union select * from v1;
+
+create or replace view v1 as select 0 != 3 <> 3, 0 != (3 <> 3), (0 != 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 != 3 <> 3, 0 != (3 <> 3), (0 != 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 > 3, 2 != (3 > 3), (2 != 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 > 3, 2 != (3 > 3), (2 != 3) > 3 union select * from v1;
+
+create or replace view v1 as select 0 != 3 != 3, 0 != (3 != 3), (0 != 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 != 3 != 3, 0 != (3 != 3), (0 != 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 LIKE 3, 2 != (3 LIKE 3), (2 != 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 LIKE 3, 2 != (3 LIKE 3), (2 != 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 REGEXP 3, 2 != (3 REGEXP 3), (2 != 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 REGEXP 3, 2 != (3 REGEXP 3), (2 != 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 | 3, 2 != (3 | 3), (2 != 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 | 3, 2 != (3 | 3), (2 != 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 != 4 & 4, 2 != (4 & 4), (2 != 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 4 & 4, 2 != (4 & 4), (2 != 4) & 4 union select * from v1;
+
+create or replace view v1 as select 2 != 3 << 3, 2 != (3 << 3), (2 != 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 << 3, 2 != (3 << 3), (2 != 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 >> 3, 2 != (3 >> 3), (2 != 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 >> 3, 2 != (3 >> 3), (2 != 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 != '2000-01-01' +INTERVAL 1 DAY, 2 != ('2000-01-01' +INTERVAL 1 DAY), (2 != '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != '2000-01-01' +INTERVAL 1 DAY, 2 != ('2000-01-01' +INTERVAL 1 DAY), (2 != '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 != 3 + 3, 2 != (3 + 3), (2 != 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 + 3, 2 != (3 + 3), (2 != 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 - 3, 2 != (3 - 3), (2 != 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 - 3, 2 != (3 - 3), (2 != 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 * 3, 2 != (3 * 3), (2 != 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 * 3, 2 != (3 * 3), (2 != 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 / 3, 2 != (3 / 3), (2 != 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 / 3, 2 != (3 / 3), (2 != 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 DIV 3, 2 != (3 DIV 3), (2 != 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 DIV 3, 2 != (3 DIV 3), (2 != 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 3 != 3 MOD 3, 3 != (3 MOD 3), (3 != 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 != 3 MOD 3, 3 != (3 MOD 3), (3 != 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 3 != 3 % 3, 3 != (3 % 3), (3 != 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 != 3 % 3, 3 != (3 % 3), (3 != 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 ^ 3, 2 != (3 ^ 3), (2 != 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 ^ 3, 2 != (3 ^ 3), (2 != 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 != 3 BETWEEN 2 AND 3, 2 != (3 BETWEEN 2 AND 3), (2 != 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 BETWEEN 2 AND 3, 2 != (3 BETWEEN 2 AND 3), (2 != 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 IS FALSE, 2 LIKE (3 IS FALSE), (2 LIKE 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 IS FALSE, 2 LIKE (3 IS FALSE), (2 LIKE 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 LIKE 3 COLLATE latin1_bin), charset(2 LIKE (3 COLLATE latin1_bin)), charset((2 LIKE 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 LIKE 3 COLLATE latin1_bin), charset(2 LIKE (3 COLLATE latin1_bin)), charset((2 LIKE 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 OR 3, 2 LIKE (3 OR 3), (2 LIKE 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 OR 3, 2 LIKE (3 OR 3), (2 LIKE 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 XOR 3, 2 LIKE (3 XOR 3), (2 LIKE 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 XOR 3, 2 LIKE (3 XOR 3), (2 LIKE 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 AND 2, 2 LIKE (2 AND 2), (2 LIKE 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 AND 2, 2 LIKE (2 AND 2), (2 LIKE 2) AND 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 && 2, 2 LIKE (2 && 2), (2 LIKE 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 && 2, 2 LIKE (2 && 2), (2 LIKE 2) && 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 = 1, 2 LIKE (2 = 1), (2 LIKE 2) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 = 1, 2 LIKE (2 = 1), (2 LIKE 2) = 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 <=> 1, 2 LIKE (2 <=> 1), (2 LIKE 2) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 <=> 1, 2 LIKE (2 <=> 1), (2 LIKE 2) <=> 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 >= 1, 2 LIKE (2 >= 1), (2 LIKE 2) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 >= 1, 2 LIKE (2 >= 1), (2 LIKE 2) >= 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 <= 3, 2 LIKE (3 <= 3), (2 LIKE 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 <= 3, 2 LIKE (3 <= 3), (2 LIKE 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 < 3, 2 LIKE (3 < 3), (2 LIKE 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 < 3, 2 LIKE (3 < 3), (2 LIKE 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 <> 3, 2 LIKE (3 <> 3), (2 LIKE 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 <> 3, 2 LIKE (3 <> 3), (2 LIKE 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 > 0, 2 LIKE (2 > 0), (2 LIKE 2) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 > 0, 2 LIKE (2 > 0), (2 LIKE 2) > 0 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 != 3, 2 LIKE (3 != 3), (2 LIKE 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 != 3, 2 LIKE (3 != 3), (2 LIKE 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 | 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 | 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 & 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 & 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 << 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 << 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 4 >> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 4 >> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE '2000-01-01' +INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE '2000-01-01' +INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 + 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 + 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 - 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 - 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 * 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 * 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 / 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 / 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 4 DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 4 DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 % 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 % 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 ^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 ^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 IS FALSE, 2 REGEXP (3 IS FALSE), (2 REGEXP 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 IS FALSE, 2 REGEXP (3 IS FALSE), (2 REGEXP 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 REGEXP 3 COLLATE latin1_bin), charset(2 REGEXP (3 COLLATE latin1_bin)), charset((2 REGEXP 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 REGEXP 3 COLLATE latin1_bin), charset(2 REGEXP (3 COLLATE latin1_bin)), charset((2 REGEXP 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 OR 3, 2 REGEXP (3 OR 3), (2 REGEXP 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 OR 3, 2 REGEXP (3 OR 3), (2 REGEXP 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 XOR 3, 2 REGEXP (3 XOR 3), (2 REGEXP 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 XOR 3, 2 REGEXP (3 XOR 3), (2 REGEXP 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 AND 2, 2 REGEXP (2 AND 2), (2 REGEXP 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 AND 2, 2 REGEXP (2 AND 2), (2 REGEXP 2) AND 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 && 2, 2 REGEXP (2 && 2), (2 REGEXP 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 && 2, 2 REGEXP (2 && 2), (2 REGEXP 2) && 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 = 1, 2 REGEXP (2 = 1), (2 REGEXP 2) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 = 1, 2 REGEXP (2 = 1), (2 REGEXP 2) = 1 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 <=> 1, 2 REGEXP (2 <=> 1), (2 REGEXP 2) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 <=> 1, 2 REGEXP (2 <=> 1), (2 REGEXP 2) <=> 1 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 >= 1, 2 REGEXP (2 >= 1), (2 REGEXP 2) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 >= 1, 2 REGEXP (2 >= 1), (2 REGEXP 2) >= 1 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 <= 3, 2 REGEXP (3 <= 3), (2 REGEXP 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 <= 3, 2 REGEXP (3 <= 3), (2 REGEXP 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 < 3, 2 REGEXP (3 < 3), (2 REGEXP 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 < 3, 2 REGEXP (3 < 3), (2 REGEXP 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 <> 3, 2 REGEXP (3 <> 3), (2 REGEXP 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 <> 3, 2 REGEXP (3 <> 3), (2 REGEXP 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 > 0, 2 REGEXP (2 > 0), (2 REGEXP 2) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 > 0, 2 REGEXP (2 > 0), (2 REGEXP 2) > 0 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 != 3, 2 REGEXP (3 != 3), (2 REGEXP 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 != 3, 2 REGEXP (3 != 3), (2 REGEXP 3) != 3 union select * from v1;
+
+create or replace view v1 as select 1 REGEXP 3 LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 REGEXP 3 LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 1 REGEXP 3 REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 REGEXP 3 REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 | 3, 2 REGEXP (3 | 3), (2 REGEXP 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 | 3, 2 REGEXP (3 | 3), (2 REGEXP 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 & 2, 2 REGEXP (2 & 2), (2 REGEXP 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 & 2, 2 REGEXP (2 & 2), (2 REGEXP 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 << 2, 2 REGEXP (2 << 2), (2 REGEXP 2) << 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 << 2, 2 REGEXP (2 << 2), (2 REGEXP 2) << 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 4 >> 1, 2 REGEXP (4 >> 1), (2 REGEXP 4) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 4 >> 1, 2 REGEXP (4 >> 1), (2 REGEXP 4) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP '2000-01-01' +INTERVAL 1 DAY, 2 REGEXP ('2000-01-01' +INTERVAL 1 DAY), (2 REGEXP '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP '2000-01-01' +INTERVAL 1 DAY, 2 REGEXP ('2000-01-01' +INTERVAL 1 DAY), (2 REGEXP '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 + 3, 2 REGEXP (3 + 3), (2 REGEXP 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 + 3, 2 REGEXP (3 + 3), (2 REGEXP 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 - 3, 2 REGEXP (3 - 3), (2 REGEXP 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 - 3, 2 REGEXP (3 - 3), (2 REGEXP 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 * 2, 2 REGEXP (2 * 2), (2 REGEXP 2) * 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 * 2, 2 REGEXP (2 * 2), (2 REGEXP 2) * 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 / 2, 2 REGEXP (2 / 2), (2 REGEXP 2) / 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 / 2, 2 REGEXP (2 / 2), (2 REGEXP 2) / 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 4 DIV 2, 2 REGEXP (4 DIV 2), (2 REGEXP 4) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 4 DIV 2, 2 REGEXP (4 DIV 2), (2 REGEXP 4) DIV 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 MOD 2, 2 REGEXP (2 MOD 2), (2 REGEXP 2) MOD 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 MOD 2, 2 REGEXP (2 MOD 2), (2 REGEXP 2) MOD 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 % 2, 2 REGEXP (2 % 2), (2 REGEXP 2) % 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 % 2, 2 REGEXP (2 % 2), (2 REGEXP 2) % 2 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 ^ 3, 2 REGEXP (3 ^ 3), (2 REGEXP 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 ^ 3, 2 REGEXP (3 ^ 3), (2 REGEXP 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 2 BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 2 BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 IS FALSE, 2 | (3 IS FALSE), (2 | 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 IS FALSE, 2 | (3 IS FALSE), (2 | 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 | 3 COLLATE latin1_bin), charset(2 | (3 COLLATE latin1_bin)), charset((2 | 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 | 3 COLLATE latin1_bin), charset(2 | (3 COLLATE latin1_bin)), charset((2 | 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 | 3 IN (0,1), 2 | (3 IN (0,1)), (2 | 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 IN (0,1), 2 | (3 IN (0,1)), (2 | 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 | 3 OR 3, 2 | (3 OR 3), (2 | 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 OR 3, 2 | (3 OR 3), (2 | 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 XOR 3, 2 | (3 XOR 3), (2 | 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 XOR 3, 2 | (3 XOR 3), (2 | 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 AND 3, 2 | (3 AND 3), (2 | 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 AND 3, 2 | (3 AND 3), (2 | 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 && 3, 2 | (3 && 3), (2 | 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 && 3, 2 | (3 && 3), (2 | 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 = 3, 2 | (3 = 3), (2 | 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 = 3, 2 | (3 = 3), (2 | 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 <=> 3, 2 | (3 <=> 3), (2 | 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 <=> 3, 2 | (3 <=> 3), (2 | 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 >= 3, 2 | (3 >= 3), (2 | 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 >= 3, 2 | (3 >= 3), (2 | 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 <= 3, 2 | (3 <= 3), (2 | 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 <= 3, 2 | (3 <= 3), (2 | 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 < 3, 2 | (3 < 3), (2 | 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 < 3, 2 | (3 < 3), (2 | 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 <> 3, 2 | (3 <> 3), (2 | 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 <> 3, 2 | (3 <> 3), (2 | 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 > 3, 2 | (3 > 3), (2 | 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 > 3, 2 | (3 > 3), (2 | 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 != 3, 2 | (3 != 3), (2 | 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 != 3, 2 | (3 != 3), (2 | 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 LIKE 3, 2 | (3 LIKE 3), (2 | 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 LIKE 3, 2 | (3 LIKE 3), (2 | 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 REGEXP 3, 2 | (3 REGEXP 3), (2 | 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 REGEXP 3, 2 | (3 REGEXP 3), (2 | 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 | 0 & 0, 2 | (0 & 0), (2 | 0) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 0 & 0, 2 | (0 & 0), (2 | 0) & 0 union select * from v1;
+
+create or replace view v1 as select 2 | 3 << 3, 2 | (3 << 3), (2 | 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 << 3, 2 | (3 << 3), (2 | 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 >> 3, 2 | (3 >> 3), (2 | 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 >> 3, 2 | (3 >> 3), (2 | 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 | '2000-01-01' +INTERVAL 1 DAY, 2 | ('2000-01-01' +INTERVAL 1 DAY), (2 | '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | '2000-01-01' +INTERVAL 1 DAY, 2 | ('2000-01-01' +INTERVAL 1 DAY), (2 | '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 | 1 + 1, 2 | (1 + 1), (2 | 1) + 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 1 + 1, 2 | (1 + 1), (2 | 1) + 1 union select * from v1;
+
+create or replace view v1 as select 2 | 3 - 3, 2 | (3 - 3), (2 | 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 - 3, 2 | (3 - 3), (2 | 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 * 3, 2 | (3 * 3), (2 | 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 * 3, 2 | (3 * 3), (2 | 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 / 3, 2 | (3 / 3), (2 | 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 / 3, 2 | (3 / 3), (2 | 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 DIV 3, 2 | (3 DIV 3), (2 | 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 DIV 3, 2 | (3 DIV 3), (2 | 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 MOD 3, 2 | (3 MOD 3), (2 | 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 MOD 3, 2 | (3 MOD 3), (2 | 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 % 3, 2 | (3 % 3), (2 | 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 % 3, 2 | (3 % 3), (2 | 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 ^ 3, 2 | (3 ^ 3), (2 | 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 ^ 3, 2 | (3 ^ 3), (2 | 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 BETWEEN 1 AND 3, 2 | (3 BETWEEN 1 AND 3), (2 | 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 BETWEEN 1 AND 3, 2 | (3 BETWEEN 1 AND 3), (2 | 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 & 1 IS FALSE, 2 & (1 IS FALSE), (2 & 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 1 IS FALSE, 2 & (1 IS FALSE), (2 & 1) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 & 3 COLLATE latin1_bin), charset(2 & (3 COLLATE latin1_bin)), charset((2 & 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 & 3 COLLATE latin1_bin), charset(2 & (3 COLLATE latin1_bin)), charset((2 & 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 & 4 IN (0,1), 2 & (4 IN (0,1)), (2 & 4) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 4 IN (0,1), 2 & (4 IN (0,1)), (2 & 4) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 & 3 OR 3, 2 & (3 OR 3), (2 & 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 OR 3, 2 & (3 OR 3), (2 & 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 & 1 XOR 1, 2 & (1 XOR 1), (2 & 1) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 1 XOR 1, 2 & (1 XOR 1), (2 & 1) XOR 1 union select * from v1;
+
+create or replace view v1 as select 2 & 3 AND 3, 2 & (3 AND 3), (2 & 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 AND 3, 2 & (3 AND 3), (2 & 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 && 3, 2 & (3 && 3), (2 & 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 && 3, 2 & (3 && 3), (2 & 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 = 2, 2 & (3 = 2), (2 & 3) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 = 2, 2 & (3 = 2), (2 & 3) = 2 union select * from v1;
+
+create or replace view v1 as select 2 & 3 <=> 2, 2 & (3 <=> 2), (2 & 3) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 <=> 2, 2 & (3 <=> 2), (2 & 3) <=> 2 union select * from v1;
+
+create or replace view v1 as select 2 & 3 >= 2, 2 & (3 >= 2), (2 & 3) >= 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 >= 2, 2 & (3 >= 2), (2 & 3) >= 2 union select * from v1;
+
+create or replace view v1 as select 2 & 3 <= 3, 2 & (3 <= 3), (2 & 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 <= 3, 2 & (3 <= 3), (2 & 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 < 3, 2 & (3 < 3), (2 & 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 < 3, 2 & (3 < 3), (2 & 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 <> 3, 2 & (3 <> 3), (2 & 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 <> 3, 2 & (3 <> 3), (2 & 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 > 1, 2 & (3 > 1), (2 & 3) > 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 > 1, 2 & (3 > 1), (2 & 3) > 1 union select * from v1;
+
+create or replace view v1 as select 2 & 3 != 3, 2 & (3 != 3), (2 & 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 != 3, 2 & (3 != 3), (2 & 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 LIKE 2, 2 & (3 LIKE 2), (2 & 3) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 LIKE 2, 2 & (3 LIKE 2), (2 & 3) LIKE 2 union select * from v1;
+
+create or replace view v1 as select 2 & 3 REGEXP 2, 2 & (3 REGEXP 2), (2 & 3) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 REGEXP 2, 2 & (3 REGEXP 2), (2 & 3) REGEXP 2 union select * from v1;
+
+create or replace view v1 as select 2 & 3 | 3, 2 & (3 | 3), (2 & 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 | 3, 2 & (3 | 3), (2 & 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 << 3, 2 & (3 << 3), (2 & 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 << 3, 2 & (3 << 3), (2 & 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 >> 1, 2 & (3 >> 1), (2 & 3) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 >> 1, 2 & (3 >> 1), (2 & 3) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 & '2000-01-01' +INTERVAL 1 DAY, 2 & ('2000-01-01' +INTERVAL 1 DAY), (2 & '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & '2000-01-01' +INTERVAL 1 DAY, 2 & ('2000-01-01' +INTERVAL 1 DAY), (2 & '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 & 3 + 3, 2 & (3 + 3), (2 & 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 + 3, 2 & (3 + 3), (2 & 3) + 3 union select * from v1;
+
+create or replace view v1 as select 6 & 4 - 3, 6 & (4 - 3), (6 & 4) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 6 & 4 - 3, 6 & (4 - 3), (6 & 4) - 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 * 3, 2 & (3 * 3), (2 & 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 * 3, 2 & (3 * 3), (2 & 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 / 3, 2 & (3 / 3), (2 & 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 / 3, 2 & (3 / 3), (2 & 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 DIV 2, 2 & (3 DIV 2), (2 & 3) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 DIV 2, 2 & (3 DIV 2), (2 & 3) DIV 2 union select * from v1;
+
+create or replace view v1 as select 2 & 3 MOD 3, 2 & (3 MOD 3), (2 & 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 MOD 3, 2 & (3 MOD 3), (2 & 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 % 3, 2 & (3 % 3), (2 & 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 % 3, 2 & (3 % 3), (2 & 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 ^ 3, 2 & (3 ^ 3), (2 & 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 ^ 3, 2 & (3 ^ 3), (2 & 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 BETWEEN 1 AND 3, 2 & (3 BETWEEN 1 AND 3), (2 & 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 BETWEEN 1 AND 3, 2 & (3 BETWEEN 1 AND 3), (2 & 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 IS FALSE, 2 << (3 IS FALSE), (2 << 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 IS FALSE, 2 << (3 IS FALSE), (2 << 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 << 3 COLLATE latin1_bin), charset(2 << (3 COLLATE latin1_bin)), charset((2 << 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 << 3 COLLATE latin1_bin), charset(2 << (3 COLLATE latin1_bin)), charset((2 << 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 << 3 IN (0,1), 2 << (3 IN (0,1)), (2 << 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 IN (0,1), 2 << (3 IN (0,1)), (2 << 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 << 3 OR 3, 2 << (3 OR 3), (2 << 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 OR 3, 2 << (3 OR 3), (2 << 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 XOR 3, 2 << (3 XOR 3), (2 << 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 XOR 3, 2 << (3 XOR 3), (2 << 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 AND 3, 2 << (3 AND 3), (2 << 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 AND 3, 2 << (3 AND 3), (2 << 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 && 3, 2 << (3 && 3), (2 << 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 && 3, 2 << (3 && 3), (2 << 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 = 3, 2 << (3 = 3), (2 << 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 = 3, 2 << (3 = 3), (2 << 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 <=> 3, 2 << (3 <=> 3), (2 << 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 <=> 3, 2 << (3 <=> 3), (2 << 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 >= 3, 2 << (3 >= 3), (2 << 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 >= 3, 2 << (3 >= 3), (2 << 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 <= 3, 2 << (3 <= 3), (2 << 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 <= 3, 2 << (3 <= 3), (2 << 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 < 3, 2 << (3 < 3), (2 << 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 < 3, 2 << (3 < 3), (2 << 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 <> 3, 2 << (3 <> 3), (2 << 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 <> 3, 2 << (3 <> 3), (2 << 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 > 3, 2 << (3 > 3), (2 << 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 > 3, 2 << (3 > 3), (2 << 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 != 3, 2 << (3 != 3), (2 << 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 != 3, 2 << (3 != 3), (2 << 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 LIKE 3, 2 << (3 LIKE 3), (2 << 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 LIKE 3, 2 << (3 LIKE 3), (2 << 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 REGEXP 3, 2 << (3 REGEXP 3), (2 << 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 REGEXP 3, 2 << (3 REGEXP 3), (2 << 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 | 3, 2 << (3 | 3), (2 << 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 | 3, 2 << (3 | 3), (2 << 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 & 3, 2 << (3 & 3), (2 << 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 & 3, 2 << (3 & 3), (2 << 3) & 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 << 3, 2 << (3 << 3), (2 << 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 << 3, 2 << (3 << 3), (2 << 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 << 2 >> 3, 2 << (2 >> 3), (2 << 2) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 2 >> 3, 2 << (2 >> 3), (2 << 2) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 << '2000-01-01' +INTERVAL 1 DAY, 2 << ('2000-01-01' +INTERVAL 1 DAY), (2 << '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << '2000-01-01' +INTERVAL 1 DAY, 2 << ('2000-01-01' +INTERVAL 1 DAY), (2 << '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 << 3 + 3, 2 << (3 + 3), (2 << 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 + 3, 2 << (3 + 3), (2 << 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 - 3, 2 << (3 - 3), (2 << 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 - 3, 2 << (3 - 3), (2 << 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 * 3, 2 << (3 * 3), (2 << 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 * 3, 2 << (3 * 3), (2 << 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 / 3, 2 << (3 / 3), (2 << 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 / 3, 2 << (3 / 3), (2 << 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 DIV 3, 2 << (3 DIV 3), (2 << 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 DIV 3, 2 << (3 DIV 3), (2 << 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 MOD 3, 2 << (3 MOD 3), (2 << 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 MOD 3, 2 << (3 MOD 3), (2 << 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 % 3, 2 << (3 % 3), (2 << 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 % 3, 2 << (3 % 3), (2 << 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 ^ 3, 2 << (3 ^ 3), (2 << 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 ^ 3, 2 << (3 ^ 3), (2 << 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 BETWEEN 1 AND 3, 2 << (3 BETWEEN 1 AND 3), (2 << 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 BETWEEN 1 AND 3, 2 << (3 BETWEEN 1 AND 3), (2 << 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 IS FALSE, 2 >> (3 IS FALSE), (2 >> 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 IS FALSE, 2 >> (3 IS FALSE), (2 >> 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 >> 3 COLLATE latin1_bin), charset(2 >> (3 COLLATE latin1_bin)), charset((2 >> 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 >> 3 COLLATE latin1_bin), charset(2 >> (3 COLLATE latin1_bin)), charset((2 >> 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 >> 3 IN (0,1), 2 >> (3 IN (0,1)), (2 >> 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 IN (0,1), 2 >> (3 IN (0,1)), (2 >> 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 >> 3 OR 0, 2 >> (3 OR 0), (2 >> 3) OR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 OR 0, 2 >> (3 OR 0), (2 >> 3) OR 0 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 XOR 3, 2 >> (3 XOR 3), (2 >> 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 XOR 3, 2 >> (3 XOR 3), (2 >> 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 AND 3, 2 >> (3 AND 3), (2 >> 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 AND 3, 2 >> (3 AND 3), (2 >> 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 && 3, 2 >> (3 && 3), (2 >> 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 && 3, 2 >> (3 && 3), (2 >> 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 = 3, 2 >> (3 = 3), (2 >> 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 = 3, 2 >> (3 = 3), (2 >> 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 <=> 3, 2 >> (3 <=> 3), (2 >> 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 <=> 3, 2 >> (3 <=> 3), (2 >> 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 >= 3, 2 >> (3 >= 3), (2 >> 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 >= 3, 2 >> (3 >= 3), (2 >> 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 <= 0, 2 >> (3 <= 0), (2 >> 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 <= 0, 2 >> (3 <= 0), (2 >> 3) <= 0 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 < 3, 2 >> (3 < 3), (2 >> 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 < 3, 2 >> (3 < 3), (2 >> 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 <> 3, 2 >> (3 <> 3), (2 >> 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 <> 3, 2 >> (3 <> 3), (2 >> 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 > 3, 2 >> (3 > 3), (2 >> 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 > 3, 2 >> (3 > 3), (2 >> 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 != 3, 2 >> (3 != 3), (2 >> 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 != 3, 2 >> (3 != 3), (2 >> 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 LIKE 3, 2 >> (3 LIKE 3), (2 >> 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 LIKE 3, 2 >> (3 LIKE 3), (2 >> 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 REGEXP 3, 2 >> (3 REGEXP 3), (2 >> 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 REGEXP 3, 2 >> (3 REGEXP 3), (2 >> 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 | 3, 2 >> (3 | 3), (2 >> 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 | 3, 2 >> (3 | 3), (2 >> 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 & 1, 2 >> (3 & 1), (2 >> 3) & 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 & 1, 2 >> (3 & 1), (2 >> 3) & 1 union select * from v1;
+
+create or replace view v1 as select 2 >> 1 << 3, 2 >> (1 << 3), (2 >> 1) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 1 << 3, 2 >> (1 << 3), (2 >> 1) << 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 >> 3, 2 >> (3 >> 3), (2 >> 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 >> 3, 2 >> (3 >> 3), (2 >> 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 >> '2000-01-01' +INTERVAL 1 DAY, 2 >> ('2000-01-01' +INTERVAL 1 DAY), (2 >> '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> '2000-01-01' +INTERVAL 1 DAY, 2 >> ('2000-01-01' +INTERVAL 1 DAY), (2 >> '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 >> 3 + 3, 2 >> (3 + 3), (2 >> 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 + 3, 2 >> (3 + 3), (2 >> 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 1 - 1, 2 >> (1 - 1), (2 >> 1) - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 1 - 1, 2 >> (1 - 1), (2 >> 1) - 1 union select * from v1;
+
+create or replace view v1 as select 2 >> 1 * 3, 2 >> (1 * 3), (2 >> 1) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 1 * 3, 2 >> (1 * 3), (2 >> 1) * 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 / 3, 2 >> (3 / 3), (2 >> 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 / 3, 2 >> (3 / 3), (2 >> 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 DIV 3, 2 >> (3 DIV 3), (2 >> 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 DIV 3, 2 >> (3 DIV 3), (2 >> 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 MOD 3, 2 >> (3 MOD 3), (2 >> 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 MOD 3, 2 >> (3 MOD 3), (2 >> 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 % 3, 2 >> (3 % 3), (2 >> 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 % 3, 2 >> (3 % 3), (2 >> 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 ^ 3, 2 >> (3 ^ 3), (2 >> 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 ^ 3, 2 >> (3 ^ 3), (2 >> 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 BETWEEN 1 AND 3, 2 >> (3 BETWEEN 1 AND 3), (2 >> 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 BETWEEN 1 AND 3, 2 >> (3 BETWEEN 1 AND 3), (2 >> 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 IS FALSE, 2 + (3 IS FALSE), (2 + 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 IS FALSE, 2 + (3 IS FALSE), (2 + 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 + 3 COLLATE latin1_bin), charset(2 + (3 COLLATE latin1_bin)), charset((2 + 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 + 3 COLLATE latin1_bin), charset(2 + (3 COLLATE latin1_bin)), charset((2 + 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 + 3 IN (0,1), 2 + (3 IN (0,1)), (2 + 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 IN (0,1), 2 + (3 IN (0,1)), (2 + 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 + 3 OR 3, 2 + (3 OR 3), (2 + 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 OR 3, 2 + (3 OR 3), (2 + 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 XOR 3, 2 + (3 XOR 3), (2 + 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 XOR 3, 2 + (3 XOR 3), (2 + 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 AND 3, 2 + (3 AND 3), (2 + 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 AND 3, 2 + (3 AND 3), (2 + 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 && 3, 2 + (3 && 3), (2 + 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 && 3, 2 + (3 && 3), (2 + 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 = 3, 2 + (3 = 3), (2 + 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 = 3, 2 + (3 = 3), (2 + 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 <=> 3, 2 + (3 <=> 3), (2 + 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 <=> 3, 2 + (3 <=> 3), (2 + 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 >= 3, 2 + (3 >= 3), (2 + 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 >= 3, 2 + (3 >= 3), (2 + 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 <= 3, 2 + (3 <= 3), (2 + 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 <= 3, 2 + (3 <= 3), (2 + 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 < 3, 2 + (3 < 3), (2 + 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 < 3, 2 + (3 < 3), (2 + 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 <> 3, 2 + (3 <> 3), (2 + 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 <> 3, 2 + (3 <> 3), (2 + 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 > 3, 2 + (3 > 3), (2 + 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 > 3, 2 + (3 > 3), (2 + 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 != 3, 2 + (3 != 3), (2 + 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 != 3, 2 + (3 != 3), (2 + 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 LIKE 3, 2 + (3 LIKE 3), (2 + 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 LIKE 3, 2 + (3 LIKE 3), (2 + 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 REGEXP 3, 2 + (3 REGEXP 3), (2 + 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 REGEXP 3, 2 + (3 REGEXP 3), (2 + 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 | 3, 2 + (3 | 3), (2 + 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 | 3, 2 + (3 | 3), (2 + 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 & 3, 2 + (3 & 3), (2 + 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 & 3, 2 + (3 & 3), (2 + 3) & 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 << 3, 2 + (3 << 3), (2 + 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 << 3, 2 + (3 << 3), (2 + 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 >> 3, 2 + (3 >> 3), (2 + 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 >> 3, 2 + (3 >> 3), (2 + 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 + '2000-01-01' +INTERVAL 1 DAY, 2 + ('2000-01-01' +INTERVAL 1 DAY), (2 + '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + '2000-01-01' +INTERVAL 1 DAY, 2 + ('2000-01-01' +INTERVAL 1 DAY), (2 + '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 + 3 * 3, 2 + (3 * 3), (2 + 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 * 3, 2 + (3 * 3), (2 + 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 / 3, 2 + (3 / 3), (2 + 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 / 3, 2 + (3 / 3), (2 + 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 DIV 3, 2 + (3 DIV 3), (2 + 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 DIV 3, 2 + (3 DIV 3), (2 + 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 + 1 MOD 3, 2 + (1 MOD 3), (2 + 1) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 1 MOD 3, 2 + (1 MOD 3), (2 + 1) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 + 1 % 3, 2 + (1 % 3), (2 + 1) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 1 % 3, 2 + (1 % 3), (2 + 1) % 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 ^ 3, 2 + (3 ^ 3), (2 + 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 ^ 3, 2 + (3 ^ 3), (2 + 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 + 3 BETWEEN 1 AND 3, 2 + (3 BETWEEN 1 AND 3), (2 + 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 BETWEEN 1 AND 3, 2 + (3 BETWEEN 1 AND 3), (2 + 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 IS FALSE, 2 - (3 IS FALSE), (2 - 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 IS FALSE, 2 - (3 IS FALSE), (2 - 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 - 3 COLLATE latin1_bin), charset(2 - (3 COLLATE latin1_bin)), charset((2 - 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 - 3 COLLATE latin1_bin), charset(2 - (3 COLLATE latin1_bin)), charset((2 - 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 - 3 IN (0,1), 2 - (3 IN (0,1)), (2 - 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 IN (0,1), 2 - (3 IN (0,1)), (2 - 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 - 2 OR 0, 2 - (2 OR 0), (2 - 2) OR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 2 OR 0, 2 - (2 OR 0), (2 - 2) OR 0 union select * from v1;
+
+create or replace view v1 as select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0 union select * from v1;
+
+create or replace view v1 as select 2 - 3 XOR 3, 2 - (3 XOR 3), (2 - 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 XOR 3, 2 - (3 XOR 3), (2 - 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 - 2 AND 2, 2 - (2 AND 2), (2 - 2) AND 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 2 AND 2, 2 - (2 AND 2), (2 - 2) AND 2 union select * from v1;
+
+create or replace view v1 as select 2 - 2 && 2, 2 - (2 && 2), (2 - 2) && 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 2 && 2, 2 - (2 && 2), (2 - 2) && 2 union select * from v1;
+
+create or replace view v1 as select 2 - 3 = 3, 2 - (3 = 3), (2 - 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 = 3, 2 - (3 = 3), (2 - 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 <=> 3, 2 - (3 <=> 3), (2 - 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 <=> 3, 2 - (3 <=> 3), (2 - 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 >= 3, 2 - (3 >= 3), (2 - 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 >= 3, 2 - (3 >= 3), (2 - 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 <= 2, 2 - (3 <= 2), (2 - 3) <= 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 <= 2, 2 - (3 <= 2), (2 - 3) <= 2 union select * from v1;
+
+create or replace view v1 as select 2 - 3 < 3, 2 - (3 < 3), (2 - 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 < 3, 2 - (3 < 3), (2 - 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 <> 3, 2 - (3 <> 3), (2 - 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 <> 3, 2 - (3 <> 3), (2 - 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 > 3, 2 - (3 > 3), (2 - 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 > 3, 2 - (3 > 3), (2 - 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 != 3, 2 - (3 != 3), (2 - 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 != 3, 2 - (3 != 3), (2 - 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 LIKE 3, 2 - (3 LIKE 3), (2 - 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 LIKE 3, 2 - (3 LIKE 3), (2 - 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 REGEXP 3, 2 - (3 REGEXP 3), (2 - 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 REGEXP 3, 2 - (3 REGEXP 3), (2 - 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 - 0 | 1, 2 - (0 | 1), (2 - 0) | 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 0 | 1, 2 - (0 | 1), (2 - 0) | 1 union select * from v1;
+
+create or replace view v1 as select 2 - 1 & 2, 2 - (1 & 2), (2 - 1) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 1 & 2, 2 - (1 & 2), (2 - 1) & 2 union select * from v1;
+
+create or replace view v1 as select 2 - 1 << 1, 2 - (1 << 1), (2 - 1) << 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 1 << 1, 2 - (1 << 1), (2 - 1) << 1 union select * from v1;
+
+create or replace view v1 as select 2 - 3 >> 3, 2 - (3 >> 3), (2 - 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 >> 3, 2 - (3 >> 3), (2 - 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 - '2000-01-01' +INTERVAL 1 DAY, 2 - ('2000-01-01' +INTERVAL 1 DAY), (2 - '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - '2000-01-01' +INTERVAL 1 DAY, 2 - ('2000-01-01' +INTERVAL 1 DAY), (2 - '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 - 3 + 3, 2 - (3 + 3), (2 - 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 + 3, 2 - (3 + 3), (2 - 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 - 3, 2 - (3 - 3), (2 - 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 - 3, 2 - (3 - 3), (2 - 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 * 3, 2 - (3 * 3), (2 - 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 * 3, 2 - (3 * 3), (2 - 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 / 3, 2 - (3 / 3), (2 - 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 / 3, 2 - (3 / 3), (2 - 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 DIV 3, 2 - (3 DIV 3), (2 - 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 DIV 3, 2 - (3 DIV 3), (2 - 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 MOD 3, 2 - (3 MOD 3), (2 - 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 MOD 3, 2 - (3 MOD 3), (2 - 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 % 3, 2 - (3 % 3), (2 - 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 % 3, 2 - (3 % 3), (2 - 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 ^ 3, 2 - (3 ^ 3), (2 - 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 ^ 3, 2 - (3 ^ 3), (2 - 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 - 3 BETWEEN 1 AND 3, 2 - (3 BETWEEN 1 AND 3), (2 - 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 BETWEEN 1 AND 3, 2 - (3 BETWEEN 1 AND 3), (2 - 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 * 0 IS FALSE, 2 * (0 IS FALSE), (2 * 0) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 0 IS FALSE, 2 * (0 IS FALSE), (2 * 0) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 * 3 COLLATE latin1_bin), charset(2 * (3 COLLATE latin1_bin)), charset((2 * 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 * 3 COLLATE latin1_bin), charset(2 * (3 COLLATE latin1_bin)), charset((2 * 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 * 0 IN (0,1), 2 * (0 IN (0,1)), (2 * 0) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 0 IN (0,1), 2 * (0 IN (0,1)), (2 * 0) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 * 3 OR 3, 2 * (3 OR 3), (2 * 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 OR 3, 2 * (3 OR 3), (2 * 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 XOR 0, 2 * (3 XOR 0), (2 * 3) XOR 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 XOR 0, 2 * (3 XOR 0), (2 * 3) XOR 0 union select * from v1;
+
+create or replace view v1 as select 2 * 3 AND 3, 2 * (3 AND 3), (2 * 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 AND 3, 2 * (3 AND 3), (2 * 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 && 3, 2 * (3 && 3), (2 * 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 && 3, 2 * (3 && 3), (2 * 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 = 3, 2 * (3 = 3), (2 * 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 = 3, 2 * (3 = 3), (2 * 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 <=> 3, 2 * (3 <=> 3), (2 * 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 <=> 3, 2 * (3 <=> 3), (2 * 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 >= 3, 2 * (3 >= 3), (2 * 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 >= 3, 2 * (3 >= 3), (2 * 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 <= 3, 2 * (3 <= 3), (2 * 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 <= 3, 2 * (3 <= 3), (2 * 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 * 0 < 3, 2 * (0 < 3), (2 * 0) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 0 < 3, 2 * (0 < 3), (2 * 0) < 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 <> 3, 2 * (3 <> 3), (2 * 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 <> 3, 2 * (3 <> 3), (2 * 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 > 3, 2 * (3 > 3), (2 * 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 > 3, 2 * (3 > 3), (2 * 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 != 3, 2 * (3 != 3), (2 * 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 != 3, 2 * (3 != 3), (2 * 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 LIKE 3, 2 * (3 LIKE 3), (2 * 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 LIKE 3, 2 * (3 LIKE 3), (2 * 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 REGEXP 3, 2 * (3 REGEXP 3), (2 * 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 REGEXP 3, 2 * (3 REGEXP 3), (2 * 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 | 3, 2 * (3 | 3), (2 * 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 | 3, 2 * (3 | 3), (2 * 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 & 3, 2 * (3 & 3), (2 * 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 & 3, 2 * (3 & 3), (2 * 3) & 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 >> 2, 2 * (3 >> 2), (2 * 3) >> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 >> 2, 2 * (3 >> 2), (2 * 3) >> 2 union select * from v1;
+
+create or replace view v1 as select 2 * '2000-01-01' +INTERVAL 1 DAY, 2 * ('2000-01-01' +INTERVAL 1 DAY), (2 * '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * '2000-01-01' +INTERVAL 1 DAY, 2 * ('2000-01-01' +INTERVAL 1 DAY), (2 * '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 * 3 + 3, 2 * (3 + 3), (2 * 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 + 3, 2 * (3 + 3), (2 * 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 - 3, 2 * (3 - 3), (2 * 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 - 3, 2 * (3 - 3), (2 * 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 DIV 2, 2 * (3 DIV 2), (2 * 3) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 DIV 2, 2 * (3 DIV 2), (2 * 3) DIV 2 union select * from v1;
+
+create or replace view v1 as select 2 * 3 MOD 2, 2 * (3 MOD 2), (2 * 3) MOD 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 MOD 2, 2 * (3 MOD 2), (2 * 3) MOD 2 union select * from v1;
+
+create or replace view v1 as select 2 * 3 % 2, 2 * (3 % 2), (2 * 3) % 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 % 2, 2 * (3 % 2), (2 * 3) % 2 union select * from v1;
+
+create or replace view v1 as select 2 * 3 ^ 3, 2 * (3 ^ 3), (2 * 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 ^ 3, 2 * (3 ^ 3), (2 * 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 * 3 BETWEEN 1 AND 3, 2 * (3 BETWEEN 1 AND 3), (2 * 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 BETWEEN 1 AND 3, 2 * (3 BETWEEN 1 AND 3), (2 * 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 IS FALSE, 2 / (3 IS FALSE), (2 / 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 IS FALSE, 2 / (3 IS FALSE), (2 / 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 / 3 COLLATE latin1_bin), charset(2 / (3 COLLATE latin1_bin)), charset((2 / 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 / 3 COLLATE latin1_bin), charset(2 / (3 COLLATE latin1_bin)), charset((2 / 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 / 3 IN (0,1), 2 / (3 IN (0,1)), (2 / 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 IN (0,1), 2 / (3 IN (0,1)), (2 / 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 / 3 OR 3, 2 / (3 OR 3), (2 / 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 OR 3, 2 / (3 OR 3), (2 / 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 XOR 3, 2 / (3 XOR 3), (2 / 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 XOR 3, 2 / (3 XOR 3), (2 / 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 AND 3, 2 / (3 AND 3), (2 / 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 AND 3, 2 / (3 AND 3), (2 / 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 && 3, 2 / (3 && 3), (2 / 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 && 3, 2 / (3 && 3), (2 / 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 = 3, 2 / (3 = 3), (2 / 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 = 3, 2 / (3 = 3), (2 / 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 <=> 3, 2 / (3 <=> 3), (2 / 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 <=> 3, 2 / (3 <=> 3), (2 / 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 >= 3, 2 / (3 >= 3), (2 / 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 >= 3, 2 / (3 >= 3), (2 / 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 <= 3, 2 / (3 <= 3), (2 / 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 <= 3, 2 / (3 <= 3), (2 / 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 < 3, 2 / (3 < 3), (2 / 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 < 3, 2 / (3 < 3), (2 / 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 <> 3, 2 / (3 <> 3), (2 / 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 <> 3, 2 / (3 <> 3), (2 / 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 > 3, 2 / (3 > 3), (2 / 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 > 3, 2 / (3 > 3), (2 / 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 != 3, 2 / (3 != 3), (2 / 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 != 3, 2 / (3 != 3), (2 / 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 LIKE 3, 2 / (3 LIKE 3), (2 / 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 LIKE 3, 2 / (3 LIKE 3), (2 / 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 REGEXP 3, 2 / (3 REGEXP 3), (2 / 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 REGEXP 3, 2 / (3 REGEXP 3), (2 / 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 | 3, 2 / (3 | 3), (2 / 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 | 3, 2 / (3 | 3), (2 / 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 & 3, 2 / (3 & 3), (2 / 3) & 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 & 3, 2 / (3 & 3), (2 / 3) & 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 << 3, 2 / (3 << 3), (2 / 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 << 3, 2 / (3 << 3), (2 / 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 >> 3, 2 / (3 >> 3), (2 / 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 >> 3, 2 / (3 >> 3), (2 / 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 / '2000-01-01' +INTERVAL 1 DAY, 2 / ('2000-01-01' +INTERVAL 1 DAY), (2 / '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / '2000-01-01' +INTERVAL 1 DAY, 2 / ('2000-01-01' +INTERVAL 1 DAY), (2 / '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 / 3 + 3, 2 / (3 + 3), (2 / 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 + 3, 2 / (3 + 3), (2 / 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 - 3, 2 / (3 - 3), (2 / 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 - 3, 2 / (3 - 3), (2 / 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 * 3, 2 / (3 * 3), (2 / 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 * 3, 2 / (3 * 3), (2 / 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 / 3, 2 / (3 / 3), (2 / 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 / 3, 2 / (3 / 3), (2 / 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 DIV 3, 2 / (3 DIV 3), (2 / 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 DIV 3, 2 / (3 DIV 3), (2 / 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 MOD 3, 2 / (3 MOD 3), (2 / 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 MOD 3, 2 / (3 MOD 3), (2 / 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 % 3, 2 / (3 % 3), (2 / 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 % 3, 2 / (3 % 3), (2 / 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 ^ 3, 2 / (3 ^ 3), (2 / 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 ^ 3, 2 / (3 ^ 3), (2 / 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 BETWEEN 1 AND 3, 2 / (3 BETWEEN 1 AND 3), (2 / 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 BETWEEN 1 AND 3, 2 / (3 BETWEEN 1 AND 3), (2 / 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 IS FALSE, 2 DIV (3 IS FALSE), (2 DIV 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 IS FALSE, 2 DIV (3 IS FALSE), (2 DIV 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 DIV 3 COLLATE latin1_bin), charset(2 DIV (3 COLLATE latin1_bin)), charset((2 DIV 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 DIV 3 COLLATE latin1_bin), charset(2 DIV (3 COLLATE latin1_bin)), charset((2 DIV 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 IN (0,1), 2 DIV (3 IN (0,1)), (2 DIV 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 IN (0,1), 2 DIV (3 IN (0,1)), (2 DIV 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 OR 3, 2 DIV (3 OR 3), (2 DIV 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 OR 3, 2 DIV (3 OR 3), (2 DIV 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 XOR 3, 2 DIV (3 XOR 3), (2 DIV 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 XOR 3, 2 DIV (3 XOR 3), (2 DIV 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 AND 3, 2 DIV (3 AND 3), (2 DIV 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 AND 3, 2 DIV (3 AND 3), (2 DIV 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 && 3, 2 DIV (3 && 3), (2 DIV 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 && 3, 2 DIV (3 && 3), (2 DIV 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 = 3, 2 DIV (3 = 3), (2 DIV 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 = 3, 2 DIV (3 = 3), (2 DIV 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 <=> 3, 2 DIV (3 <=> 3), (2 DIV 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 <=> 3, 2 DIV (3 <=> 3), (2 DIV 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 >= 3, 2 DIV (3 >= 3), (2 DIV 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 >= 3, 2 DIV (3 >= 3), (2 DIV 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 <= 3, 2 DIV (3 <= 3), (2 DIV 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 <= 3, 2 DIV (3 <= 3), (2 DIV 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 < 3, 2 DIV (3 < 3), (2 DIV 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 < 3, 2 DIV (3 < 3), (2 DIV 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 <> 3, 2 DIV (3 <> 3), (2 DIV 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 <> 3, 2 DIV (3 <> 3), (2 DIV 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 > 3, 2 DIV (3 > 3), (2 DIV 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 > 3, 2 DIV (3 > 3), (2 DIV 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 != 3, 2 DIV (3 != 3), (2 DIV 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 != 3, 2 DIV (3 != 3), (2 DIV 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 LIKE 3, 2 DIV (3 LIKE 3), (2 DIV 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 LIKE 3, 2 DIV (3 LIKE 3), (2 DIV 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 REGEXP 3, 2 DIV (3 REGEXP 3), (2 DIV 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 REGEXP 3, 2 DIV (3 REGEXP 3), (2 DIV 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 | 3, 2 DIV (3 | 3), (2 DIV 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 | 3, 2 DIV (3 | 3), (2 DIV 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 & 1, 2 DIV (3 & 1), (2 DIV 3) & 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 & 1, 2 DIV (3 & 1), (2 DIV 3) & 1 union select * from v1;
+
+create or replace view v1 as select 4 DIV 3 << 3, 4 DIV (3 << 3), (4 DIV 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 DIV 3 << 3, 4 DIV (3 << 3), (4 DIV 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 >> 3, 2 DIV (3 >> 3), (2 DIV 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 >> 3, 2 DIV (3 >> 3), (2 DIV 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV '2000-01-01' +INTERVAL 1 DAY, 2 DIV ('2000-01-01' +INTERVAL 1 DAY), (2 DIV '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV '2000-01-01' +INTERVAL 1 DAY, 2 DIV ('2000-01-01' +INTERVAL 1 DAY), (2 DIV '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 + 3, 2 DIV (3 + 3), (2 DIV 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 + 3, 2 DIV (3 + 3), (2 DIV 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 - 3, 2 DIV (3 - 3), (2 DIV 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 - 3, 2 DIV (3 - 3), (2 DIV 3) - 3 union select * from v1;
+
+create or replace view v1 as select 4 DIV 3 * 3, 4 DIV (3 * 3), (4 DIV 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 4 DIV 3 * 3, 4 DIV (3 * 3), (4 DIV 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 / 3, 2 DIV (3 / 3), (2 DIV 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 / 3, 2 DIV (3 / 3), (2 DIV 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 DIV 3, 2 DIV (3 DIV 3), (2 DIV 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 DIV 3, 2 DIV (3 DIV 3), (2 DIV 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 MOD 3, 2 DIV (3 MOD 3), (2 DIV 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 MOD 3, 2 DIV (3 MOD 3), (2 DIV 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 % 3, 2 DIV (3 % 3), (2 DIV 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 % 3, 2 DIV (3 % 3), (2 DIV 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 ^ 3, 2 DIV (3 ^ 3), (2 DIV 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 ^ 3, 2 DIV (3 ^ 3), (2 DIV 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 BETWEEN 1 AND 3, 2 DIV (3 BETWEEN 1 AND 3), (2 DIV 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 BETWEEN 1 AND 3, 2 DIV (3 BETWEEN 1 AND 3), (2 DIV 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 IS FALSE, 2 MOD (3 IS FALSE), (2 MOD 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 IS FALSE, 2 MOD (3 IS FALSE), (2 MOD 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 MOD 3 COLLATE latin1_bin), charset(2 MOD (3 COLLATE latin1_bin)), charset((2 MOD 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 MOD 3 COLLATE latin1_bin), charset(2 MOD (3 COLLATE latin1_bin)), charset((2 MOD 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 IN (0,1), 2 MOD (3 IN (0,1)), (2 MOD 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 IN (0,1), 2 MOD (3 IN (0,1)), (2 MOD 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 OR 3, 2 MOD (3 OR 3), (2 MOD 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 OR 3, 2 MOD (3 OR 3), (2 MOD 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 XOR 3, 2 MOD (3 XOR 3), (2 MOD 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 XOR 3, 2 MOD (3 XOR 3), (2 MOD 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 AND 3, 2 MOD (3 AND 3), (2 MOD 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 AND 3, 2 MOD (3 AND 3), (2 MOD 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 && 3, 2 MOD (3 && 3), (2 MOD 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 && 3, 2 MOD (3 && 3), (2 MOD 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 = 2, 2 MOD (3 = 2), (2 MOD 3) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 = 2, 2 MOD (3 = 2), (2 MOD 3) = 2 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 <=> 2, 2 MOD (3 <=> 2), (2 MOD 3) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 <=> 2, 2 MOD (3 <=> 2), (2 MOD 3) <=> 2 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 >= 1, 2 MOD (3 >= 1), (2 MOD 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 >= 1, 2 MOD (3 >= 1), (2 MOD 3) >= 1 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 <= 3, 2 MOD (3 <= 3), (2 MOD 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 <= 3, 2 MOD (3 <= 3), (2 MOD 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 < 3, 2 MOD (3 < 3), (2 MOD 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 < 3, 2 MOD (3 < 3), (2 MOD 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 <> 3, 2 MOD (3 <> 3), (2 MOD 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 <> 3, 2 MOD (3 <> 3), (2 MOD 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 > 3, 2 MOD (3 > 3), (2 MOD 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 > 3, 2 MOD (3 > 3), (2 MOD 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 != 3, 2 MOD (3 != 3), (2 MOD 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 != 3, 2 MOD (3 != 3), (2 MOD 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 LIKE 2, 2 MOD (3 LIKE 2), (2 MOD 3) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 LIKE 2, 2 MOD (3 LIKE 2), (2 MOD 3) LIKE 2 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 REGEXP 2, 2 MOD (3 REGEXP 2), (2 MOD 3) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 REGEXP 2, 2 MOD (3 REGEXP 2), (2 MOD 3) REGEXP 2 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 | 3, 2 MOD (3 | 3), (2 MOD 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 | 3, 2 MOD (3 | 3), (2 MOD 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 4 & 4, 2 MOD (4 & 4), (2 MOD 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 4 & 4, 2 MOD (4 & 4), (2 MOD 4) & 4 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 << 3, 2 MOD (3 << 3), (2 MOD 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 << 3, 2 MOD (3 << 3), (2 MOD 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 >> 3, 2 MOD (3 >> 3), (2 MOD 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 >> 3, 2 MOD (3 >> 3), (2 MOD 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD '2000-01-01' +INTERVAL 1 DAY, 2 MOD ('2000-01-01' +INTERVAL 1 DAY), (2 MOD '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD '2000-01-01' +INTERVAL 1 DAY, 2 MOD ('2000-01-01' +INTERVAL 1 DAY), (2 MOD '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 + 3, 2 MOD (3 + 3), (2 MOD 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 + 3, 2 MOD (3 + 3), (2 MOD 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 - 3, 2 MOD (3 - 3), (2 MOD 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 - 3, 2 MOD (3 - 3), (2 MOD 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 * 3, 2 MOD (3 * 3), (2 MOD 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 * 3, 2 MOD (3 * 3), (2 MOD 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 / 3, 2 MOD (3 / 3), (2 MOD 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 / 3, 2 MOD (3 / 3), (2 MOD 3) / 3 union select * from v1;
+
+create or replace view v1 as select 3 MOD 4 DIV 3, 3 MOD (4 DIV 3), (3 MOD 4) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 MOD 4 DIV 3, 3 MOD (4 DIV 3), (3 MOD 4) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 MOD 3, 2 MOD (3 MOD 3), (2 MOD 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 MOD 3, 2 MOD (3 MOD 3), (2 MOD 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 % 3, 2 MOD (3 % 3), (2 MOD 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 % 3, 2 MOD (3 % 3), (2 MOD 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 ^ 3, 2 MOD (3 ^ 3), (2 MOD 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 ^ 3, 2 MOD (3 ^ 3), (2 MOD 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 BETWEEN 1 AND 3, 2 MOD (3 BETWEEN 1 AND 3), (2 MOD 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 BETWEEN 1 AND 3, 2 MOD (3 BETWEEN 1 AND 3), (2 MOD 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 IS FALSE, 2 % (3 IS FALSE), (2 % 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 IS FALSE, 2 % (3 IS FALSE), (2 % 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 % 3 COLLATE latin1_bin), charset(2 % (3 COLLATE latin1_bin)), charset((2 % 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 % 3 COLLATE latin1_bin), charset(2 % (3 COLLATE latin1_bin)), charset((2 % 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 % 3 IN (0,1), 2 % (3 IN (0,1)), (2 % 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 IN (0,1), 2 % (3 IN (0,1)), (2 % 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 % 3 OR 3, 2 % (3 OR 3), (2 % 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 OR 3, 2 % (3 OR 3), (2 % 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 XOR 3, 2 % (3 XOR 3), (2 % 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 XOR 3, 2 % (3 XOR 3), (2 % 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 AND 3, 2 % (3 AND 3), (2 % 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 AND 3, 2 % (3 AND 3), (2 % 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 && 3, 2 % (3 && 3), (2 % 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 && 3, 2 % (3 && 3), (2 % 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 = 2, 2 % (3 = 2), (2 % 3) = 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 = 2, 2 % (3 = 2), (2 % 3) = 2 union select * from v1;
+
+create or replace view v1 as select 2 % 3 <=> 2, 2 % (3 <=> 2), (2 % 3) <=> 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 <=> 2, 2 % (3 <=> 2), (2 % 3) <=> 2 union select * from v1;
+
+create or replace view v1 as select 2 % 3 >= 1, 2 % (3 >= 1), (2 % 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 >= 1, 2 % (3 >= 1), (2 % 3) >= 1 union select * from v1;
+
+create or replace view v1 as select 2 % 3 <= 3, 2 % (3 <= 3), (2 % 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 <= 3, 2 % (3 <= 3), (2 % 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 < 3, 2 % (3 < 3), (2 % 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 < 3, 2 % (3 < 3), (2 % 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 <> 3, 2 % (3 <> 3), (2 % 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 <> 3, 2 % (3 <> 3), (2 % 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 > 3, 2 % (3 > 3), (2 % 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 > 3, 2 % (3 > 3), (2 % 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 != 3, 2 % (3 != 3), (2 % 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 != 3, 2 % (3 != 3), (2 % 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 LIKE 2, 2 % (3 LIKE 2), (2 % 3) LIKE 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 LIKE 2, 2 % (3 LIKE 2), (2 % 3) LIKE 2 union select * from v1;
+
+create or replace view v1 as select 2 % 3 REGEXP 2, 2 % (3 REGEXP 2), (2 % 3) REGEXP 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 REGEXP 2, 2 % (3 REGEXP 2), (2 % 3) REGEXP 2 union select * from v1;
+
+create or replace view v1 as select 2 % 3 | 3, 2 % (3 | 3), (2 % 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 | 3, 2 % (3 | 3), (2 % 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 % 4 & 4, 2 % (4 & 4), (2 % 4) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 4 & 4, 2 % (4 & 4), (2 % 4) & 4 union select * from v1;
+
+create or replace view v1 as select 2 % 3 << 3, 2 % (3 << 3), (2 % 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 << 3, 2 % (3 << 3), (2 % 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 >> 3, 2 % (3 >> 3), (2 % 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 >> 3, 2 % (3 >> 3), (2 % 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 % '2000-01-01' +INTERVAL 1 DAY, 2 % ('2000-01-01' +INTERVAL 1 DAY), (2 % '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % '2000-01-01' +INTERVAL 1 DAY, 2 % ('2000-01-01' +INTERVAL 1 DAY), (2 % '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 % 3 + 3, 2 % (3 + 3), (2 % 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 + 3, 2 % (3 + 3), (2 % 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 - 3, 2 % (3 - 3), (2 % 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 - 3, 2 % (3 - 3), (2 % 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 * 3, 2 % (3 * 3), (2 % 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 * 3, 2 % (3 * 3), (2 % 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 / 3, 2 % (3 / 3), (2 % 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 / 3, 2 % (3 / 3), (2 % 3) / 3 union select * from v1;
+
+create or replace view v1 as select 3 % 4 DIV 3, 3 % (4 DIV 3), (3 % 4) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 % 4 DIV 3, 3 % (4 DIV 3), (3 % 4) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 MOD 3, 2 % (3 MOD 3), (2 % 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 MOD 3, 2 % (3 MOD 3), (2 % 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 % 3, 2 % (3 % 3), (2 % 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 % 3, 2 % (3 % 3), (2 % 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 ^ 3, 2 % (3 ^ 3), (2 % 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 ^ 3, 2 % (3 ^ 3), (2 % 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 BETWEEN 1 AND 3, 2 % (3 BETWEEN 1 AND 3), (2 % 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 BETWEEN 1 AND 3, 2 % (3 BETWEEN 1 AND 3), (2 % 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 IS FALSE, 2 ^ (3 IS FALSE), (2 ^ 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 IS FALSE, 2 ^ (3 IS FALSE), (2 ^ 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 ^ 3 COLLATE latin1_bin), charset(2 ^ (3 COLLATE latin1_bin)), charset((2 ^ 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 ^ 3 COLLATE latin1_bin), charset(2 ^ (3 COLLATE latin1_bin)), charset((2 ^ 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 IN (0,1), 2 ^ (3 IN (0,1)), (2 ^ 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 IN (0,1), 2 ^ (3 IN (0,1)), (2 ^ 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 OR 3, 2 ^ (3 OR 3), (2 ^ 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 OR 3, 2 ^ (3 OR 3), (2 ^ 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 XOR 3, 2 ^ (3 XOR 3), (2 ^ 3) XOR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 XOR 3, 2 ^ (3 XOR 3), (2 ^ 3) XOR 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 AND 3, 2 ^ (3 AND 3), (2 ^ 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 AND 3, 2 ^ (3 AND 3), (2 ^ 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 && 3, 2 ^ (3 && 3), (2 ^ 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 && 3, 2 ^ (3 && 3), (2 ^ 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 = 3, 2 ^ (3 = 3), (2 ^ 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 = 3, 2 ^ (3 = 3), (2 ^ 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 <=> 3, 2 ^ (3 <=> 3), (2 ^ 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 <=> 3, 2 ^ (3 <=> 3), (2 ^ 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 >= 3, 2 ^ (3 >= 3), (2 ^ 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 >= 3, 2 ^ (3 >= 3), (2 ^ 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 <= 3, 2 ^ (3 <= 3), (2 ^ 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 <= 3, 2 ^ (3 <= 3), (2 ^ 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 < 3, 2 ^ (3 < 3), (2 ^ 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 < 3, 2 ^ (3 < 3), (2 ^ 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 <> 3, 2 ^ (3 <> 3), (2 ^ 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 <> 3, 2 ^ (3 <> 3), (2 ^ 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 > 3, 2 ^ (3 > 3), (2 ^ 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 > 3, 2 ^ (3 > 3), (2 ^ 3) > 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 != 3, 2 ^ (3 != 3), (2 ^ 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 != 3, 2 ^ (3 != 3), (2 ^ 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 LIKE 3, 2 ^ (3 LIKE 3), (2 ^ 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 LIKE 3, 2 ^ (3 LIKE 3), (2 ^ 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 REGEXP 3, 2 ^ (3 REGEXP 3), (2 ^ 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 REGEXP 3, 2 ^ (3 REGEXP 3), (2 ^ 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 | 3, 2 ^ (3 | 3), (2 ^ 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 | 3, 2 ^ (3 | 3), (2 ^ 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 0 & 0, 2 ^ (0 & 0), (2 ^ 0) & 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 0 & 0, 2 ^ (0 & 0), (2 ^ 0) & 0 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 << 3, 2 ^ (3 << 3), (2 ^ 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 << 3, 2 ^ (3 << 3), (2 ^ 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 >> 3, 2 ^ (3 >> 3), (2 ^ 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 >> 3, 2 ^ (3 >> 3), (2 ^ 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ '2000-01-01' +INTERVAL 1 DAY, 2 ^ ('2000-01-01' +INTERVAL 1 DAY), (2 ^ '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ '2000-01-01' +INTERVAL 1 DAY, 2 ^ ('2000-01-01' +INTERVAL 1 DAY), (2 ^ '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 + 1, 2 ^ (3 + 1), (2 ^ 3) + 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 + 1, 2 ^ (3 + 1), (2 ^ 3) + 1 union select * from v1;
+
+create or replace view v1 as select 5 ^ 1 - 1, 5 ^ (1 - 1), (5 ^ 1) - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 5 ^ 1 - 1, 5 ^ (1 - 1), (5 ^ 1) - 1 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 * 3, 2 ^ (3 * 3), (2 ^ 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 * 3, 2 ^ (3 * 3), (2 ^ 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 / 3, 2 ^ (3 / 3), (2 ^ 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 / 3, 2 ^ (3 / 3), (2 ^ 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 DIV 3, 2 ^ (3 DIV 3), (2 ^ 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 DIV 3, 2 ^ (3 DIV 3), (2 ^ 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 MOD 3, 2 ^ (3 MOD 3), (2 ^ 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 MOD 3, 2 ^ (3 MOD 3), (2 ^ 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 % 3, 2 ^ (3 % 3), (2 ^ 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 % 3, 2 ^ (3 % 3), (2 ^ 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 BETWEEN 1 AND 3, 2 ^ (3 BETWEEN 1 AND 3), (2 ^ 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 BETWEEN 1 AND 3, 2 ^ (3 BETWEEN 1 AND 3), (2 ^ 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 1 IS FALSE, 2 BETWEEN 1 AND (1 IS FALSE), (2 BETWEEN 1 AND 1) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 1 IS FALSE, 2 BETWEEN 1 AND (1 IS FALSE), (2 BETWEEN 1 AND 1) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 BETWEEN 1 AND 3 COLLATE latin1_bin), charset(2 BETWEEN 1 AND (3 COLLATE latin1_bin)), charset((2 BETWEEN 1 AND 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 BETWEEN 1 AND 3 COLLATE latin1_bin), charset(2 BETWEEN 1 AND (3 COLLATE latin1_bin)), charset((2 BETWEEN 1 AND 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 IN (0,1), 2 BETWEEN 1 AND (3 IN (0,1)), (2 BETWEEN 1 AND 3) IN (0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 IN (0,1), 2 BETWEEN 1 AND (3 IN (0,1)), (2 BETWEEN 1 AND 3) IN (0,1) union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 OR 3, 2 BETWEEN 1 AND (3 OR 3), (2 BETWEEN 1 AND 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 OR 3, 2 BETWEEN 1 AND (3 OR 3), (2 BETWEEN 1 AND 3) OR 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 1 XOR 1, 2 BETWEEN 1 AND (1 XOR 1), (2 BETWEEN 1 AND 1) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 1 XOR 1, 2 BETWEEN 1 AND (1 XOR 1), (2 BETWEEN 1 AND 1) XOR 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 AND 3, 2 BETWEEN 1 AND (3 AND 3), (2 BETWEEN 1 AND 3) AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 AND 3, 2 BETWEEN 1 AND (3 AND 3), (2 BETWEEN 1 AND 3) AND 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 && 3, 2 BETWEEN 1 AND (3 && 3), (2 BETWEEN 1 AND 3) && 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 && 3, 2 BETWEEN 1 AND (3 && 3), (2 BETWEEN 1 AND 3) && 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 = 1, 2 BETWEEN 1 AND (3 = 1), (2 BETWEEN 1 AND 3) = 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 = 1, 2 BETWEEN 1 AND (3 = 1), (2 BETWEEN 1 AND 3) = 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 <=> 1, 2 BETWEEN 1 AND (3 <=> 1), (2 BETWEEN 1 AND 3) <=> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 <=> 1, 2 BETWEEN 1 AND (3 <=> 1), (2 BETWEEN 1 AND 3) <=> 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 >= 1, 2 BETWEEN 1 AND (3 >= 1), (2 BETWEEN 1 AND 3) >= 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 >= 1, 2 BETWEEN 1 AND (3 >= 1), (2 BETWEEN 1 AND 3) >= 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 <= 3, 2 BETWEEN 1 AND (3 <= 3), (2 BETWEEN 1 AND 3) <= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 <= 3, 2 BETWEEN 1 AND (3 <= 3), (2 BETWEEN 1 AND 3) <= 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 < 3, 2 BETWEEN 1 AND (3 < 3), (2 BETWEEN 1 AND 3) < 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 < 3, 2 BETWEEN 1 AND (3 < 3), (2 BETWEEN 1 AND 3) < 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 <> 3, 2 BETWEEN 1 AND (3 <> 3), (2 BETWEEN 1 AND 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 <> 3, 2 BETWEEN 1 AND (3 <> 3), (2 BETWEEN 1 AND 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 > 0, 2 BETWEEN 1 AND (3 > 0), (2 BETWEEN 1 AND 3) > 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 > 0, 2 BETWEEN 1 AND (3 > 0), (2 BETWEEN 1 AND 3) > 0 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 != 3, 2 BETWEEN 1 AND (3 != 3), (2 BETWEEN 1 AND 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 != 3, 2 BETWEEN 1 AND (3 != 3), (2 BETWEEN 1 AND 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 LIKE 1, 2 BETWEEN 1 AND (3 LIKE 1), (2 BETWEEN 1 AND 3) LIKE 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 LIKE 1, 2 BETWEEN 1 AND (3 LIKE 1), (2 BETWEEN 1 AND 3) LIKE 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 REGEXP 1, 2 BETWEEN 1 AND (3 REGEXP 1), (2 BETWEEN 1 AND 3) REGEXP 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 REGEXP 1, 2 BETWEEN 1 AND (3 REGEXP 1), (2 BETWEEN 1 AND 3) REGEXP 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 | 3, 2 BETWEEN 1 AND (3 | 3), (2 BETWEEN 1 AND 3) | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 | 3, 2 BETWEEN 1 AND (3 | 3), (2 BETWEEN 1 AND 3) | 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 2 & 2, 2 BETWEEN 1 AND (2 & 2), (2 BETWEEN 1 AND 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 2 & 2, 2 BETWEEN 1 AND (2 & 2), (2 BETWEEN 1 AND 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 << 3, 2 BETWEEN 1 AND (3 << 3), (2 BETWEEN 1 AND 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 << 3, 2 BETWEEN 1 AND (3 << 3), (2 BETWEEN 1 AND 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 4 >> 1, 2 BETWEEN 1 AND (4 >> 1), (2 BETWEEN 1 AND 4) >> 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 4 >> 1, 2 BETWEEN 1 AND (4 >> 1), (2 BETWEEN 1 AND 4) >> 1 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND '2000-01-01' +INTERVAL 1 DAY, 2 BETWEEN 1 AND ('2000-01-01' +INTERVAL 1 DAY), (2 BETWEEN 1 AND '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND '2000-01-01' +INTERVAL 1 DAY, 2 BETWEEN 1 AND ('2000-01-01' +INTERVAL 1 DAY), (2 BETWEEN 1 AND '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 + 3, 2 BETWEEN 1 AND (3 + 3), (2 BETWEEN 1 AND 3) + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 + 3, 2 BETWEEN 1 AND (3 + 3), (2 BETWEEN 1 AND 3) + 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 - 3, 2 BETWEEN 1 AND (3 - 3), (2 BETWEEN 1 AND 3) - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 - 3, 2 BETWEEN 1 AND (3 - 3), (2 BETWEEN 1 AND 3) - 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 * 3, 2 BETWEEN 1 AND (3 * 3), (2 BETWEEN 1 AND 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 * 3, 2 BETWEEN 1 AND (3 * 3), (2 BETWEEN 1 AND 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 / 3, 2 BETWEEN 1 AND (3 / 3), (2 BETWEEN 1 AND 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 / 3, 2 BETWEEN 1 AND (3 / 3), (2 BETWEEN 1 AND 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 4 DIV 2, 2 BETWEEN 1 AND (4 DIV 2), (2 BETWEEN 1 AND 4) DIV 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 4 DIV 2, 2 BETWEEN 1 AND (4 DIV 2), (2 BETWEEN 1 AND 4) DIV 2 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 MOD 3, 2 BETWEEN 1 AND (3 MOD 3), (2 BETWEEN 1 AND 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 MOD 3, 2 BETWEEN 1 AND (3 MOD 3), (2 BETWEEN 1 AND 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 % 3, 2 BETWEEN 1 AND (3 % 3), (2 BETWEEN 1 AND 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 % 3, 2 BETWEEN 1 AND (3 % 3), (2 BETWEEN 1 AND 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 ^ 3, 2 BETWEEN 1 AND (3 ^ 3), (2 BETWEEN 1 AND 3) ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 ^ 3, 2 BETWEEN 1 AND (3 ^ 3), (2 BETWEEN 1 AND 3) ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 BETWEEN 1 AND 3, 2 BETWEEN 1 AND (3 BETWEEN 1 AND 3), (2 BETWEEN 1 AND 3) BETWEEN 1 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 BETWEEN 1 AND 3, 2 BETWEEN 1 AND (3 BETWEEN 1 AND 3), (2 BETWEEN 1 AND 3) BETWEEN 1 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 IS FALSE, 2 LIKE 2 ESCAPE (3 IS FALSE), (2 LIKE 2 ESCAPE 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 IS FALSE, 2 LIKE 2 ESCAPE (3 IS FALSE), (2 LIKE 2 ESCAPE 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin), charset(2 LIKE 1 ESCAPE (3 COLLATE latin1_bin)), charset((2 LIKE 1 ESCAPE 3) COLLATE latin1_bin);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin), charset(2 LIKE 1 ESCAPE (3 COLLATE latin1_bin)), charset((2 LIKE 1 ESCAPE 3) COLLATE latin1_bin) union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1) union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 OR 4, 2 LIKE 1 ESCAPE (3 OR 4), (2 LIKE 1 ESCAPE 3) OR 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 OR 4, 2 LIKE 1 ESCAPE (3 OR 4), (2 LIKE 1 ESCAPE 3) OR 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 || 4, 2 LIKE 1 ESCAPE (3 || 4), (2 LIKE 1 ESCAPE 3) || 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 || 4, 2 LIKE 1 ESCAPE (3 || 4), (2 LIKE 1 ESCAPE 3) || 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 XOR 4, 2 LIKE 1 ESCAPE (3 XOR 4), (2 LIKE 1 ESCAPE 3) XOR 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 XOR 4, 2 LIKE 1 ESCAPE (3 XOR 4), (2 LIKE 1 ESCAPE 3) XOR 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 AND 0, 2 LIKE 2 ESCAPE (3 AND 0), (2 LIKE 2 ESCAPE 3) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 AND 0, 2 LIKE 2 ESCAPE (3 AND 0), (2 LIKE 2 ESCAPE 3) AND 0 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 && 0, 2 LIKE 2 ESCAPE (3 && 0), (2 LIKE 2 ESCAPE 3) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 && 0, 2 LIKE 2 ESCAPE (3 && 0), (2 LIKE 2 ESCAPE 3) && 0 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 = 4, 2 LIKE 2 ESCAPE (3 = 4), (2 LIKE 2 ESCAPE 3) = 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 = 4, 2 LIKE 2 ESCAPE (3 = 4), (2 LIKE 2 ESCAPE 3) = 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 <=> 4, 2 LIKE 2 ESCAPE (3 <=> 4), (2 LIKE 2 ESCAPE 3) <=> 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 <=> 4, 2 LIKE 2 ESCAPE (3 <=> 4), (2 LIKE 2 ESCAPE 3) <=> 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 >= 4, 2 LIKE 2 ESCAPE (3 >= 4), (2 LIKE 2 ESCAPE 3) >= 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 >= 4, 2 LIKE 2 ESCAPE (3 >= 4), (2 LIKE 2 ESCAPE 3) >= 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 <= 4, 2 LIKE 1 ESCAPE (3 <= 4), (2 LIKE 1 ESCAPE 3) <= 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 <= 4, 2 LIKE 1 ESCAPE (3 <= 4), (2 LIKE 1 ESCAPE 3) <= 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 < 4, 2 LIKE 1 ESCAPE (3 < 4), (2 LIKE 1 ESCAPE 3) < 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 < 4, 2 LIKE 1 ESCAPE (3 < 4), (2 LIKE 1 ESCAPE 3) < 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 <> 4, 2 LIKE 1 ESCAPE (3 <> 4), (2 LIKE 1 ESCAPE 3) <> 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 <> 4, 2 LIKE 1 ESCAPE (3 <> 4), (2 LIKE 1 ESCAPE 3) <> 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 > 4, 2 LIKE 2 ESCAPE (3 > 4), (2 LIKE 2 ESCAPE 3) > 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 > 4, 2 LIKE 2 ESCAPE (3 > 4), (2 LIKE 2 ESCAPE 3) > 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 != 4, 2 LIKE 1 ESCAPE (3 != 4), (2 LIKE 1 ESCAPE 3) != 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 != 4, 2 LIKE 1 ESCAPE (3 != 4), (2 LIKE 1 ESCAPE 3) != 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 | 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 | 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 & 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 & 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 1 << 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 1 << 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 >> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 >> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 +INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 +INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 + 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 + 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 1 - 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 1 - 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 * 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 * 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 % 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 % 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 ^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 ^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 2 ESCAPE 3 BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BETWEEN 2 AND 4;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 2 ESCAPE 3 BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BETWEEN 2 AND 4 union select * from v1;
+
+create or replace view v1 as select NOT 2 IN (SELECT 0 UNION SELECT 2), NOT (2 IN (SELECT 0 UNION SELECT 2)), (NOT 2) IN (SELECT 0 UNION SELECT 2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 IN (SELECT 0 UNION SELECT 2), NOT (2 IN (SELECT 0 UNION SELECT 2)), (NOT 2) IN (SELECT 0 UNION SELECT 2) union select * from v1;
+
+create or replace view v1 as select - 2 IN (SELECT 2 UNION SELECT 1), - (2 IN (SELECT 2 UNION SELECT 1)), (- 2) IN (SELECT 2 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - 2 IN (SELECT 2 UNION SELECT 1), - (2 IN (SELECT 2 UNION SELECT 1)), (- 2) IN (SELECT 2 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select ~ 2 IN (SELECT 0 UNION SELECT 1), ~ (2 IN (SELECT 0 UNION SELECT 1)), (~ 2) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 IN (SELECT 0 UNION SELECT 1), ~ (2 IN (SELECT 0 UNION SELECT 1)), (~ 2) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select ! 2 IN (SELECT 0 UNION SELECT 2), ! (2 IN (SELECT 0 UNION SELECT 2)), (! 2) IN (SELECT 0 UNION SELECT 2);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 IN (SELECT 0 UNION SELECT 2), ! (2 IN (SELECT 0 UNION SELECT 2)), (! 2) IN (SELECT 0 UNION SELECT 2) union select * from v1;
+
+create or replace view v1 as select BINARY 'c' IN (SELECT 'C' UNION SELECT 'X'), BINARY ('c' IN (SELECT 'C' UNION SELECT 'X')), (BINARY 'c') IN (SELECT 'C' UNION SELECT 'X');
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select BINARY 'c' IN (SELECT 'C' UNION SELECT 'X'), BINARY ('c' IN (SELECT 'C' UNION SELECT 'X')), (BINARY 'c') IN (SELECT 'C' UNION SELECT 'X') union select * from v1;
+
+create or replace view v1 as select 0 OR 3 IN (SELECT 3 UNION SELECT 10), 0 OR (3 IN (SELECT 3 UNION SELECT 10)), (0 OR 3) IN (SELECT 3 UNION SELECT 10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 OR 3 IN (SELECT 3 UNION SELECT 10), 0 OR (3 IN (SELECT 3 UNION SELECT 10)), (0 OR 3) IN (SELECT 3 UNION SELECT 10) union select * from v1;
+
+create or replace view v1 as select 0 || 3 IN (SELECT 3 UNION SELECT 10), 0 || (3 IN (SELECT 3 UNION SELECT 10)), (0 || 3) IN (SELECT 3 UNION SELECT 10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 IN (SELECT 3 UNION SELECT 10), 0 || (3 IN (SELECT 3 UNION SELECT 10)), (0 || 3) IN (SELECT 3 UNION SELECT 10) union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 IN (SELECT 4 UNION SELECT 5), 2 XOR (3 IN (SELECT 4 UNION SELECT 5)), (2 XOR 3) IN (SELECT 4 UNION SELECT 5);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 IN (SELECT 4 UNION SELECT 5), 2 XOR (3 IN (SELECT 4 UNION SELECT 5)), (2 XOR 3) IN (SELECT 4 UNION SELECT 5) union select * from v1;
+
+create or replace view v1 as select 2 AND 3 IN (SELECT 0 UNION SELECT 1), 2 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 AND 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 AND 3 IN (SELECT 0 UNION SELECT 1), 2 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 AND 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 && 3 IN (SELECT 0 UNION SELECT 1), 2 && (3 IN (SELECT 0 UNION SELECT 1)), (2 && 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 && 3 IN (SELECT 0 UNION SELECT 1), 2 && (3 IN (SELECT 0 UNION SELECT 1)), (2 && 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 = 3 IN (SELECT 0 UNION SELECT 1), 2 = (3 IN (SELECT 0 UNION SELECT 1)), (2 = 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 IN (SELECT 0 UNION SELECT 1), 2 = (3 IN (SELECT 0 UNION SELECT 1)), (2 = 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 IN (SELECT 0 UNION SELECT 1), 2 <=> (3 IN (SELECT 0 UNION SELECT 1)), (2 <=> 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 IN (SELECT 0 UNION SELECT 1), 2 <=> (3 IN (SELECT 0 UNION SELECT 1)), (2 <=> 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 >= 3 IN (SELECT 1 UNION SELECT 1), 2 >= (3 IN (SELECT 1 UNION SELECT 1)), (2 >= 3) IN (SELECT 1 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 IN (SELECT 1 UNION SELECT 1), 2 >= (3 IN (SELECT 1 UNION SELECT 1)), (2 >= 3) IN (SELECT 1 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 <= 3 IN (SELECT 0 UNION SELECT 1), 2 <= (3 IN (SELECT 0 UNION SELECT 1)), (2 <= 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 IN (SELECT 0 UNION SELECT 1), 2 <= (3 IN (SELECT 0 UNION SELECT 1)), (2 <= 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 < 3 IN (SELECT 0 UNION SELECT 1), 2 < (3 IN (SELECT 0 UNION SELECT 1)), (2 < 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 IN (SELECT 0 UNION SELECT 1), 2 < (3 IN (SELECT 0 UNION SELECT 1)), (2 < 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 <> 3 IN (SELECT 0 UNION SELECT 0), 2 <> (3 IN (SELECT 0 UNION SELECT 0)), (2 <> 3) IN (SELECT 0 UNION SELECT 0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <> 3 IN (SELECT 0 UNION SELECT 0), 2 <> (3 IN (SELECT 0 UNION SELECT 0)), (2 <> 3) IN (SELECT 0 UNION SELECT 0) union select * from v1;
+
+create or replace view v1 as select 2 > 3 IN (SELECT 1 UNION SELECT 1), 2 > (3 IN (SELECT 1 UNION SELECT 1)), (2 > 3) IN (SELECT 1 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 > 3 IN (SELECT 1 UNION SELECT 1), 2 > (3 IN (SELECT 1 UNION SELECT 1)), (2 > 3) IN (SELECT 1 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 != 3 IN (SELECT 0 UNION SELECT 0), 2 != (3 IN (SELECT 0 UNION SELECT 0)), (2 != 3) IN (SELECT 0 UNION SELECT 0);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 != 3 IN (SELECT 0 UNION SELECT 0), 2 != (3 IN (SELECT 0 UNION SELECT 0)), (2 != 3) IN (SELECT 0 UNION SELECT 0) union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 REGEXP 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 REGEXP 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 | 3 IN (SELECT 0 UNION SELECT 1), 2 | (3 IN (SELECT 0 UNION SELECT 1)), (2 | 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 IN (SELECT 0 UNION SELECT 1), 2 | (3 IN (SELECT 0 UNION SELECT 1)), (2 | 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 & 4 IN (SELECT 0 UNION SELECT 1), 2 & (4 IN (SELECT 0 UNION SELECT 1)), (2 & 4) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 4 IN (SELECT 0 UNION SELECT 1), 2 & (4 IN (SELECT 0 UNION SELECT 1)), (2 & 4) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 << 3 IN (SELECT 0 UNION SELECT 1), 2 << (3 IN (SELECT 0 UNION SELECT 1)), (2 << 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 IN (SELECT 0 UNION SELECT 1), 2 << (3 IN (SELECT 0 UNION SELECT 1)), (2 << 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 >> 3 IN (SELECT 0 UNION SELECT 1), 2 >> (3 IN (SELECT 0 UNION SELECT 1)), (2 >> 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 IN (SELECT 0 UNION SELECT 1), 2 >> (3 IN (SELECT 0 UNION SELECT 1)), (2 >> 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 + 3 IN (SELECT 0 UNION SELECT 1), 2 + (3 IN (SELECT 0 UNION SELECT 1)), (2 + 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 IN (SELECT 0 UNION SELECT 1), 2 + (3 IN (SELECT 0 UNION SELECT 1)), (2 + 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 - 3 IN (SELECT 0 UNION SELECT 1), 2 - (3 IN (SELECT 0 UNION SELECT 1)), (2 - 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 3 IN (SELECT 0 UNION SELECT 1), 2 - (3 IN (SELECT 0 UNION SELECT 1)), (2 - 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 * 0 IN (SELECT 0 UNION SELECT 1), 2 * (0 IN (SELECT 0 UNION SELECT 1)), (2 * 0) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 0 IN (SELECT 0 UNION SELECT 1), 2 * (0 IN (SELECT 0 UNION SELECT 1)), (2 * 0) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 / 3 IN (SELECT 0 UNION SELECT 1), 2 / (3 IN (SELECT 0 UNION SELECT 1)), (2 / 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 IN (SELECT 0 UNION SELECT 1), 2 / (3 IN (SELECT 0 UNION SELECT 1)), (2 / 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 IN (SELECT 0 UNION SELECT 1), 2 DIV (3 IN (SELECT 0 UNION SELECT 1)), (2 DIV 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 IN (SELECT 0 UNION SELECT 1), 2 DIV (3 IN (SELECT 0 UNION SELECT 1)), (2 DIV 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 IN (SELECT 0 UNION SELECT 1), 2 MOD (3 IN (SELECT 0 UNION SELECT 1)), (2 MOD 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 IN (SELECT 0 UNION SELECT 1), 2 MOD (3 IN (SELECT 0 UNION SELECT 1)), (2 MOD 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 % 3 IN (SELECT 0 UNION SELECT 1), 2 % (3 IN (SELECT 0 UNION SELECT 1)), (2 % 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 IN (SELECT 0 UNION SELECT 1), 2 % (3 IN (SELECT 0 UNION SELECT 1)), (2 % 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 IN (SELECT 0 UNION SELECT 1), 2 ^ (3 IN (SELECT 0 UNION SELECT 1)), (2 ^ 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 IN (SELECT 0 UNION SELECT 1), 2 ^ (3 IN (SELECT 0 UNION SELECT 1)), (2 ^ 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1), 2 BETWEEN 1 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 BETWEEN 1 AND 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 IN (SELECT 0 UNION SELECT 1), 2 BETWEEN 1 AND (3 IN (SELECT 0 UNION SELECT 1)), (2 BETWEEN 1 AND 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 1 ESCAPE 3 IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIKE 1 ESCAPE 3) IN (SELECT 0 UNION SELECT 1) union select * from v1;
+
+create or replace view v1 as select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 3 BETWEEN 1 AND 2 AND NULL, 3 BETWEEN (1 AND 2) AND NULL, 3 BETWEEN 1 AND (2 AND NULL), (3 BETWEEN 1 AND 2) AND NULL union select * from v1;
+
+set sql_mode=PIPES_AS_CONCAT;
+create or replace view v1 as select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 OR 3 || 3, 2 OR (3 || 3), (2 OR 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 OR 3, 2 || (3 OR 3), (2 || 3) OR 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 OR 3, 2 || (3 OR 3), (2 || 3) OR 3 union select * from v1;
+
+create or replace view v1 as select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select NOT 2 || 3, NOT (2 || 3), (NOT 2) || 3 union select * from v1;
+
+create or replace view v1 as select - '2 ' || 3, - ('2 ' || 3), (- '2 ') || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select - '2 ' || 3, - ('2 ' || 3), (- '2 ') || 3 union select * from v1;
+
+create or replace view v1 as select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ~ 2 || 3, ~ (2 || 3), (~ 2) || 3 union select * from v1;
+
+create or replace view v1 as select ! 2 || 3, ! (2 || 3), (! 2) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select ! 2 || 3, ! (2 || 3), (! 2) || 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 IS FALSE, 2 || (3 IS FALSE), (2 || 3) IS FALSE union select * from v1;
+
+create or replace view v1 as select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 IN (3,10), 0 || (3 IN (3,10)), (0 || 3) IN (3,10) union select * from v1;
+
+create or replace view v1 as select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 || 0 XOR 1, 1 || (0 XOR 1), (1 || 0) XOR 1 union select * from v1;
+
+create or replace view v1 as select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 || 1 AND 0, 1 || (1 AND 0), (1 || 1) AND 0 union select * from v1;
+
+create or replace view v1 as select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 || 1 && 0, 1 || (1 && 0), (1 || 1) && 0 union select * from v1;
+
+create or replace view v1 as select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 = 3, 2 || (3 = 3), (2 || 3) = 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 <=> 3, 2 || (3 <=> 3), (2 || 3) <=> 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 >= 3, 2 || (3 >= 3), (2 || 3) >= 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 <= 0, 2 || (3 <= 0), (2 || 3) <= 0 union select * from v1;
+
+create or replace view v1 as select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 < 0, 2 || (3 < 0), (2 || 3) < 0 union select * from v1;
+
+create or replace view v1 as select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 <> 3, 0 || (3 <> 3), (0 || 3) <> 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 > 3, 2 || (3 > 3), (2 || 3) > 3 union select * from v1;
+
+create or replace view v1 as select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 != 3, 0 || (3 != 3), (0 || 3) != 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 LIKE 3, 2 || (3 LIKE 3), (2 || 3) LIKE 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 REGEXP 3, 2 || (3 REGEXP 3), (2 || 3) REGEXP 3 union select * from v1;
+
+create or replace view v1 as select 2 || ' 3' | 3, 2 || (' 3' | 3), (2 || ' 3') | 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || ' 3' | 3, 2 || (' 3' | 3), (2 || ' 3') | 3 union select * from v1;
+
+create or replace view v1 as select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 2 & 2, 0 || (2 & 2), (0 || 2) & 2 union select * from v1;
+
+create or replace view v1 as select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 << 3, 2 || (3 << 3), (2 || 3) << 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 >> 3, 2 || (3 >> 3), (2 || 3) >> 3 union select * from v1;
+
+create or replace view v1 as select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || '2000-01-01' +INTERVAL 1 DAY, 2 || ('2000-01-01' +INTERVAL 1 DAY), (2 || '2000-01-01') +INTERVAL 1 DAY union select * from v1;
+
+create or replace view v1 as select 2 || ' 3' + 3, 2 || (' 3' + 3), (2 || ' 3') + 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || ' 3' + 3, 2 || (' 3' + 3), (2 || ' 3') + 3 union select * from v1;
+
+create or replace view v1 as select 2 || ' 3' - 3, 2 || (' 3' - 3), (2 || ' 3') - 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || ' 3' - 3, 2 || (' 3' - 3), (2 || ' 3') - 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 * 3, 2 || (3 * 3), (2 || 3) * 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 / 3, 2 || (3 / 3), (2 || 3) / 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 DIV 3, 2 || (3 DIV 3), (2 || 3) DIV 3 union select * from v1;
+
+create or replace view v1 as select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 MOD 3, 0 || (3 MOD 3), (0 || 3) MOD 3 union select * from v1;
+
+create or replace view v1 as select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 || 3 % 3, 0 || (3 % 3), (0 || 3) % 3 union select * from v1;
+
+create or replace view v1 as select 2 || ' 3' ^ 3, 2 || (' 3' ^ 3), (2 || ' 3') ^ 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || ' 3' ^ 3, 2 || (' 3' ^ 3), (2 || ' 3') ^ 3 union select * from v1;
+
+create or replace view v1 as select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 || 3 BETWEEN 2 AND 3, 2 || (3 BETWEEN 2 AND 3), (2 || 3) BETWEEN 2 AND 3 union select * from v1;
+
+create or replace view v1 as select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 XOR 3 || 3, 2 XOR (3 || 3), (2 XOR 3) || 3 union select * from v1;
+
+create or replace view v1 as select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 AND 3 || 3, 0 AND (3 || 3), (0 AND 3) || 3 union select * from v1;
+
+create or replace view v1 as select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 && 3 || 3, 0 && (3 || 3), (0 && 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 = 3 || 3, 2 = (3 || 3), (2 = 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <=> 3 || 3, 2 <=> (3 || 3), (2 <=> 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >= 3 || 0, 2 >= (3 || 0), (2 >= 3) || 0 union select * from v1;
+
+create or replace view v1 as select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 <= 3 || 3, 2 <= (3 || 3), (2 <= 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 < 3 || 3, 2 < (3 || 3), (2 < 3) || 3 union select * from v1;
+
+create or replace view v1 as select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 <> 3 || 3, 1 <> (3 || 3), (1 <> 3) || 3 union select * from v1;
+
+create or replace view v1 as select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 0 > 3 || 3, 0 > (3 || 3), (0 > 3) || 3 union select * from v1;
+
+create or replace view v1 as select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 1 != 3 || 3, 1 != (3 || 3), (1 != 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 LIKE 3 || 3, 2 LIKE (3 || 3), (2 LIKE 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 REGEXP 3 || 3, 2 REGEXP (3 || 3), (2 REGEXP 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 | 3 || 3, 2 | (3 || 3), (2 | 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 & 3 || 3, 2 & (3 || 3), (2 & 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 << 3 || 3, 2 << (3 || 3), (2 << 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 >> 3 || 0, 2 >> (3 || 0), (2 >> 3) || 0 union select * from v1;
+
+create or replace view v1 as select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 + 3 || 3, 2 + (3 || 3), (2 + 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 - 2 || 0, 2 - (2 || 0), (2 - 2) || 0 union select * from v1;
+
+create or replace view v1 as select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 * 3 || 3, 2 * (3 || 3), (2 * 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 / 3 || 3, 2 / (3 || 3), (2 / 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 DIV 3 || 3, 2 DIV (3 || 3), (2 DIV 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 MOD 3 || 3, 2 MOD (3 || 3), (2 MOD 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 % 3 || 3, 2 % (3 || 3), (2 % 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 ^ 3 || 3, 2 ^ (3 || 3), (2 ^ 3) || 3 union select * from v1;
+
+create or replace view v1 as select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select 2 BETWEEN 1 AND 3 || 3, 2 BETWEEN 1 AND (3 || 3), (2 BETWEEN 1 AND 3) || 3 union select * from v1;
+
+create or replace view v1 as select charset(2 LIKE 1 ESCAPE 3 || ''), charset(2 LIKE 1 ESCAPE (3 || '')), charset((2 LIKE 1 ESCAPE 3) || '');
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+select charset(2 LIKE 1 ESCAPE 3 || ''), charset(2 LIKE 1 ESCAPE (3 || '')), charset((2 LIKE 1 ESCAPE 3) || '') union select * from v1;
+
+# not precedence tests as such, but still tests of Item::print, parentheses and enum precedence
+
+create or replace view v1 as select ! - 1, - ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select ! BINARY 1, BINARY ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select ! (NOT 1), NOT ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select ! ~ 1, ~ ! 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select - BINARY 1, BINARY - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select - (NOT 1), NOT - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select - ~ 1, ~ - 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select BINARY (NOT 1), NOT BINARY 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select BINARY ~ 1, ~ BINARY 1;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select NOT ~ 1, ~ (NOT 1);
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+create or replace view v1 as select 1 IS TRUE IS FALSE, 2 IS FALSE IS UNKNOWN, 3 IS UNKNOWN IS NULL, 4 IS NULL IS TRUE;
+Select view_definition from information_schema.views where table_schema='test' and table_name='v1';
+
+drop view v1;
diff --git a/mysql-test/main/precedence_bugs.result b/mysql-test/main/precedence_bugs.result
new file mode 100644
index 00000000000..4b13e820d7f
--- /dev/null
+++ b/mysql-test/main/precedence_bugs.result
@@ -0,0 +1,60 @@
+#
+# Bug#6726: NOT BETWEEN parse failure
+#
+create table t1 (a int, b int);
+insert into t1 values (1,2), (2,3), (3,4), (4,5);
+select * from t1 where a not between 1 and 2;
+a b
+3 4
+4 5
+select * from t1 where a not between 1 and 2 and b not between 3 and 4;
+a b
+4 5
+drop table t1;
+#
+# MDEV-13673 Bad result in view
+#
+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)`
+#
+# MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
+#
+create table t1 (i int, j int);
+insert t1 values (1,1),(2,2);
+create view v1 as select (2, 3) not in (select i, j from t1);
+select * from v1;
+(2, 3) not in (select i, j from t1)
+1
+show create view v1;
+View v1
+Create View CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select !((2,3) in (select `t1`.`i`,`t1`.`j` from `t1`)) AS `(2, 3) not in (select i, j from t1)`
+character_set_client latin1
+collation_connection latin1_swedish_ci
+drop view v1;
+drop table t1;
+#
+# MDEV-23656 view: removal of parentheses results in wrong result
+#
+create table t1 (a int, b decimal(10,2));
+insert into t1 values (1, 10.2);
+create view v1 as select avg(b) / (2 + a) from t1;
+show create view v1;
+View v1
+Create View CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select avg(`t1`.`b`) / (2 + `t1`.`a`) AS `avg(b) / (2 + a)` from `t1`
+character_set_client latin1
+collation_connection latin1_swedish_ci
+drop view v1;
+drop table t1;
+#
+# MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN
+#
+create view v1 as select 1 like (now() between '2000-01-01' and '2012-12-12' );
+show create view v1;
+View v1
+Create View CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 like (current_timestamp() between '2000-01-01' and '2012-12-12') AS `1 like (now() between '2000-01-01' and '2012-12-12' )`
+character_set_client latin1
+collation_connection latin1_swedish_ci
+drop view v1;
diff --git a/mysql-test/main/precedence_bugs.test b/mysql-test/main/precedence_bugs.test
new file mode 100644
index 00000000000..6e8e624c840
--- /dev/null
+++ b/mysql-test/main/precedence_bugs.test
@@ -0,0 +1,41 @@
+--echo #
+--echo # Bug#6726: NOT BETWEEN parse failure
+--echo #
+create table t1 (a int, b int);
+insert into t1 values (1,2), (2,3), (3,4), (4,5);
+select * from t1 where a not between 1 and 2;
+select * from t1 where a not between 1 and 2 and b not between 3 and 4;
+drop table t1;
+
+--echo #
+--echo # MDEV-13673 Bad result in view
+--echo #
+explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
+
+--echo #
+--echo # MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
+--echo #
+create table t1 (i int, j int);
+insert t1 values (1,1),(2,2);
+create view v1 as select (2, 3) not in (select i, j from t1);
+select * from v1;
+query_vertical show create view v1;
+drop view v1;
+drop table t1;
+
+--echo #
+--echo # MDEV-23656 view: removal of parentheses results in wrong result
+--echo #
+create table t1 (a int, b decimal(10,2));
+insert into t1 values (1, 10.2);
+create view v1 as select avg(b) / (2 + a) from t1;
+query_vertical show create view v1;
+drop view v1;
+drop table t1;
+
+--echo #
+--echo # MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN
+--echo #
+create view v1 as select 1 like (now() between '2000-01-01' and '2012-12-12' );
+query_vertical show create view v1;
+drop view v1;
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index 671eb1e32a0..b6ad828e43a 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -6593,17 +6593,6 @@ INSERT INTO v (f1, f3) VALUES (1,1), (2,2);
ERROR HY000: Can not modify more than one base table through a join view 'test.v'
drop view v;
drop tables t1,t2,t3;
-create table t1 (i int, j int);
-insert t1 values (1,1),(2,2);
-create view v1 as select (2, 3) not in (select i, j from t1);
-select * from v1;
-(2, 3) not in (select i, j from t1)
-1
-show create view v1;
-View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select !((2,3) in (select `t1`.`i`,`t1`.`j` from `t1`)) AS `(2, 3) not in (select i, j from t1)` latin1 latin1_swedish_ci
-drop view v1;
-drop table t1;
#
# MDEV-10704: Assertion `field->field->table == table_arg'
# failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&,
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index ef42cf08df7..6e7b0adfbc3 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -6302,17 +6302,6 @@ INSERT INTO v (f1, f3) VALUES (1,1), (2,2);
drop view v;
drop tables t1,t2,t3;
-#
-# MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
-#
-create table t1 (i int, j int);
-insert t1 values (1,1),(2,2);
-create view v1 as select (2, 3) not in (select i, j from t1);
-select * from v1;
-show create view v1;
-drop view v1;
-drop table t1;
-
--echo #
--echo # MDEV-10704: Assertion `field->field->table == table_arg'
--echo # failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&,
diff --git a/mysql-test/suite/encryption/r/tempfiles_encrypted.result b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
new file mode 100644
index 00000000000..09512363be4
--- /dev/null
+++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result
@@ -0,0 +1,3951 @@
+#
+# Tests when the temporary files are encrypted
+#
+select @@encrypt_tmp_files;
+@@encrypt_tmp_files
+1
+drop table if exists t1,t2;
+drop view if exists v1;
+# ########################################################################
+# # Parser tests
+# ########################################################################
+#
+# Check what happens when one attempts to use window function without OVER clause
+create table t1 (a int, b int);
+insert into t1 values (1,1),(2,2);
+select row_number() from t1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from t1' at line 1
+select rank() from t1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from t1' at line 1
+# Attempt to use window function in the WHERE clause
+select * from t1 where 1=rank() over (order by a);
+ERROR HY000: Window function is allowed only in SELECT list and ORDER BY clause
+select * from t1 where 1>row_number() over (partition by b order by a);
+ERROR HY000: Window function is allowed only in SELECT list and ORDER BY clause
+drop table t1;
+# ########################################################################
+# # Functionality tests
+# ########################################################################
+#
+# Check if ROW_NUMBER() works in basic cases
+create table t1(a int, b int, x char(32));
+insert into t1 values (2, 10, 'xx');
+insert into t1 values (2, 10, 'zz');
+insert into t1 values (2, 20, 'yy');
+insert into t1 values (3, 10, 'xxx');
+insert into t1 values (3, 20, 'vvv');
+select a, row_number() over (partition by a order by b) from t1;
+a row_number() over (partition by a order by b)
+2 1
+2 2
+2 3
+3 1
+3 2
+select a, b, x, row_number() over (partition by a order by x) from t1;
+a b x row_number() over (partition by a order by x)
+2 10 xx 1
+2 20 yy 2
+2 10 zz 3
+3 20 vvv 1
+3 10 xxx 2
+drop table t1;
+create table t1 (pk int primary key, a int, b int);
+insert into t1 values
+(1, 10, 22),
+(2, 11, 21),
+(3, 12, 20),
+(4, 13, 19),
+(5, 14, 18);
+select
+pk, a, b,
+row_number() over (order by a),
+row_number() over (order by b)
+from t1
+order by b;
+pk a b row_number() over (order by a) row_number() over (order by b)
+5 14 18 5 1
+4 13 19 4 2
+3 12 20 3 3
+2 11 21 2 4
+1 10 22 1 5
+drop table t1;
+#
+# Try RANK() function
+#
+create table t2 (
+pk int primary key,
+a int
+);
+insert into t2 values
+( 1 , 0),
+( 2 , 0),
+( 3 , 1),
+( 4 , 1),
+( 8 , 2),
+( 5 , 2),
+( 6 , 2),
+( 7 , 2),
+( 9 , 4),
+(10 , 4);
+select pk, a, rank() over (order by a) from t2;
+pk a rank() over (order by a)
+1 0 1
+10 4 9
+2 0 1
+3 1 3
+4 1 3
+5 2 5
+6 2 5
+7 2 5
+8 2 5
+9 4 9
+select pk, a, rank() over (order by a desc) from t2;
+pk a rank() over (order by a desc)
+1 0 9
+10 4 1
+2 0 9
+3 1 7
+4 1 7
+5 2 3
+6 2 3
+7 2 3
+8 2 3
+9 4 1
+drop table t2;
+#
+# Try Aggregates as window functions. With frames.
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (pk int, c int);
+insert into t1 select a+1,1 from t0;
+update t1 set c=2 where pk not in (1,2,3,4);
+select * from t1;
+pk c
+1 1
+2 1
+3 1
+4 1
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+select
+pk, c,
+count(*) over (partition by c order by pk
+rows between 2 preceding and 2 following) as CNT
+from t1;
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+select
+pk, c,
+count(*) over (partition by c order by pk
+rows between 1 preceding and 2 following) as CNT
+from t1;
+pk c CNT
+1 1 3
+2 1 4
+3 1 3
+4 1 2
+5 2 3
+6 2 4
+7 2 4
+8 2 4
+9 2 3
+10 2 2
+select
+pk, c,
+count(*) over (partition by c order by pk
+rows between 2 preceding and current row) as CNT
+from t1;
+pk c CNT
+1 1 1
+2 1 2
+3 1 3
+4 1 3
+5 2 1
+6 2 2
+7 2 3
+8 2 3
+9 2 3
+10 2 3
+select
+pk,c,
+count(*) over (partition by c order by pk rows
+between 1 following and 2 following) as CNT
+from t1;
+pk c CNT
+1 1 2
+2 1 2
+3 1 1
+4 1 0
+5 2 2
+6 2 2
+7 2 2
+8 2 2
+9 2 1
+10 2 0
+select
+pk,c,
+count(*) over (partition by c order by pk rows
+between 2 preceding and 1 preceding) as CNT
+from t1;
+pk c CNT
+1 1 0
+2 1 1
+3 1 2
+4 1 2
+5 2 0
+6 2 1
+7 2 2
+8 2 2
+9 2 2
+10 2 2
+select
+pk, c,
+count(*) over (partition by c order by pk
+rows between current row and 1 following) as CNT
+from t1;
+pk c CNT
+1 1 2
+2 1 2
+3 1 2
+4 1 1
+5 2 2
+6 2 2
+7 2 2
+8 2 2
+9 2 2
+10 2 1
+# Check ORDER BY DESC
+select
+pk, c,
+count(*) over (partition by c order by pk desc
+rows between 2 preceding and 2 following) as CNT
+from t1;
+pk c CNT
+4 1 3
+3 1 4
+2 1 4
+1 1 3
+10 2 3
+9 2 4
+8 2 5
+7 2 5
+6 2 4
+5 2 3
+drop table t0,t1;
+#
+# Resolution of window names
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (pk int, c int);
+insert into t1 select a+1,1 from t0;
+update t1 set c=2 where pk not in (1,2,3,4);
+select * from t1;
+pk c
+1 1
+2 1
+3 1
+4 1
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+select
+pk, c,
+count(*) over w1 as CNT
+from t1
+window w1 as (partition by c order by pk
+rows between 2 preceding and 2 following);
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+select
+pk, c,
+count(*) over (w1 rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c order by pk);
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+select
+pk, c,
+count(*) over (w1 order by pk rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c);
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+select
+pk, c,
+count(*) over (w2 rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c), w2 as (w1 order by pk);
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+select
+pk, c,
+count(*) over w3 as CNT
+from t1
+window
+w1 as (partition by c),
+w2 as (w1 order by pk),
+w3 as (w2 rows between 2 preceding and 2 following);
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+select
+pk, c,
+count(*) over w as CNT
+from t1
+window w1 as (partition by c order by pk
+rows between 2 preceding and 2 following);
+ERROR HY000: Window specification with name 'w' is not defined
+select
+pk, c,
+count(*) over (w2 rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c), w1 as (order by pk);
+ERROR HY000: Multiple window specifications with the same name 'w1'
+select
+pk, c,
+count(*) over (w2 rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c), w2 as (w partition by c order by pk);
+ERROR HY000: Window specification with name 'w' is not defined
+select
+pk, c,
+count(*) over (w2 rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c), w2 as (w1 partition by c order by pk);
+ERROR HY000: Window specification referencing another one 'w1' cannot contain partition list
+select
+pk, c,
+count(*) over (w2 rows between 2 preceding and 2 following) as CNT
+from t1
+window w1 as (partition by c order by pk), w2 as (w1 order by pk);
+ERROR HY000: Referenced window specification 'w1' already contains order list
+select
+pk, c,
+count(*) over w3 as CNT
+from t1
+window
+w1 as (partition by c),
+w2 as (w1 order by pk rows between 3 preceding and 2 following),
+w3 as (w2 rows between 2 preceding and 2 following);
+ERROR HY000: Referenced window specification 'w2' cannot contain window frame
+select
+pk, c,
+count(*) over w1 as CNT
+from t1
+window w1 as (partition by c order by pk
+rows between unbounded following and 2 following);
+ERROR HY000: Unacceptable combination of window frame bound specifications
+select
+pk, c,
+count(*) over (w1 rows between 2 preceding and unbounded preceding) as CNT
+from t1
+window w1 as (partition by c order by pk);
+ERROR HY000: Unacceptable combination of window frame bound specifications
+select
+pk, c,
+count(*) over (w1 order by pk rows between current row and 2 preceding) as CNT
+from t1
+window w1 as (partition by c);
+ERROR HY000: Unacceptable combination of window frame bound specifications
+select
+pk, c,
+count(*) over (w2 rows between 2 following and current row) as CNT
+from t1
+window w1 as (partition by c), w2 as (w1 order by pk);
+ERROR HY000: Unacceptable combination of window frame bound specifications
+select
+pk, c
+from t1 where rank() over w1 > 2
+window w1 as (partition by c order by pk);
+ERROR HY000: Window function is allowed only in SELECT list and ORDER BY clause
+select
+c, max(pk) as m
+from t1
+group by c + rank() over w1
+window w1 as (order by m);
+ERROR HY000: Window function is allowed only in SELECT list and ORDER BY clause
+select
+c, max(pk) as m, rank() over w1 as r
+from t1
+group by c+r
+window w1 as (order by m);
+ERROR HY000: Window function is allowed only in SELECT list and ORDER BY clause
+select
+c, max(pk) as m, rank() over w1 as r
+from t1
+group by c having c+r > 3
+window w1 as (order by m);
+ERROR HY000: Window function is allowed only in SELECT list and ORDER BY clause
+select
+c, max(pk) as m, rank() over w1 as r,
+rank() over (partition by r+1 order by m)
+from t1
+group by c
+window w1 as (order by m);
+ERROR HY000: Window function is not allowed in window specification
+select
+c, max(pk) as m, rank() over w1 as r,
+rank() over (partition by m order by r)
+from t1
+group by c
+window w1 as (order by m);
+ERROR HY000: Window function is not allowed in window specification
+select
+c, max(pk) as m, rank() over w1 as r, dense_rank() over w2 as dr
+from t1
+group by c
+window w1 as (order by m), w2 as (partition by r order by m);
+ERROR HY000: Window function is not allowed in window specification
+select
+pk, c,
+row_number() over (partition by c order by pk
+range between unbounded preceding and current row) as r
+from t1;
+ERROR HY000: Window frame is not allowed with 'row_number'
+select
+pk, c,
+rank() over w1 as r
+from t1
+window w1 as (partition by c order by pk
+rows between 2 preceding and 2 following);
+ERROR HY000: Window frame is not allowed with 'rank'
+select
+pk, c,
+dense_rank() over (partition by c order by pk
+rows between 1 preceding and 1 following) as r
+from t1;
+ERROR HY000: Window frame is not allowed with 'dense_rank'
+select
+pk, c,
+rank() over w1 as r
+from t1
+window w1 as (partition by c);
+ERROR HY000: No order list in window specification for 'rank'
+select
+pk, c,
+dense_rank() over (partition by c) as r
+from t1;
+ERROR HY000: No order list in window specification for 'dense_rank'
+drop table t0,t1;
+#
+# MDEV-9634: Window function produces incorrect value
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 (part_id int, pk int, a int);
+insert into t2 select
+if(a<5, 0, 1), a, if(a<5, NULL, 1) from t0;
+select * from t2;
+part_id pk a
+0 0 NULL
+0 1 NULL
+0 2 NULL
+0 3 NULL
+0 4 NULL
+1 5 1
+1 6 1
+1 7 1
+1 8 1
+1 9 1
+select
+part_id, pk, a,
+count(a) over (partition by part_id order by pk
+rows between 1 preceding and 1 following) as CNT
+from t2;
+part_id pk a CNT
+0 0 NULL 0
+0 1 NULL 0
+0 2 NULL 0
+0 3 NULL 0
+0 4 NULL 0
+1 5 1 2
+1 6 1 3
+1 7 1 3
+1 8 1 3
+1 9 1 2
+drop table t0, t2;
+#
+# RANGE-type bounds
+#
+create table t3 (
+pk int,
+val int
+);
+insert into t3 values
+(0, 1),
+(1, 1),
+(2, 1),
+(3, 2),
+(4, 2),
+(5, 2),
+(6, 2);
+select
+val,
+count(val) over (order by val
+range between current row and
+current row)
+as CNT
+from t3;
+val CNT
+1 3
+1 3
+1 3
+2 4
+2 4
+2 4
+2 4
+insert into t3 values
+(7, 3),
+(8, 3);
+select
+val,
+count(val) over (order by val
+range between current row and
+current row)
+as CNT
+from t3;
+val CNT
+1 3
+1 3
+1 3
+2 4
+2 4
+2 4
+2 4
+3 2
+3 2
+drop table t3;
+# Now, check with PARTITION BY
+create table t4 (
+part_id int,
+pk int,
+val int
+);
+insert into t4 values
+(1234, 100, 1),
+(1234, 101, 1),
+(1234, 102, 1),
+(1234, 103, 2),
+(1234, 104, 2),
+(1234, 105, 2),
+(1234, 106, 2),
+(1234, 107, 3),
+(1234, 108, 3),
+(5678, 200, 1),
+(5678, 201, 1),
+(5678, 202, 1),
+(5678, 203, 2),
+(5678, 204, 2),
+(5678, 205, 2),
+(5678, 206, 2),
+(5678, 207, 3),
+(5678, 208, 3);
+select
+part_id,
+val,
+count(val) over (partition by part_id
+order by val
+range between current row and
+current row)
+as CNT
+from t4;
+part_id val CNT
+1234 1 3
+1234 1 3
+1234 1 3
+1234 2 4
+1234 2 4
+1234 2 4
+1234 2 4
+1234 3 2
+1234 3 2
+5678 1 3
+5678 1 3
+5678 1 3
+5678 2 4
+5678 2 4
+5678 2 4
+5678 2 4
+5678 3 2
+5678 3 2
+#
+# Try RANGE UNBOUNDED PRECEDING | FOLLOWING
+#
+select
+part_id,
+val,
+count(val) over (partition by part_id
+order by val
+range between unbounded preceding and
+current row)
+as CNT
+from t4;
+part_id val CNT
+1234 1 3
+1234 1 3
+1234 1 3
+1234 2 7
+1234 2 7
+1234 2 7
+1234 2 7
+1234 3 9
+1234 3 9
+5678 1 3
+5678 1 3
+5678 1 3
+5678 2 7
+5678 2 7
+5678 2 7
+5678 2 7
+5678 3 9
+5678 3 9
+select
+part_id,
+val,
+count(val) over (partition by part_id
+order by val
+range between current row and
+unbounded following)
+as CNT
+from t4;
+part_id val CNT
+1234 1 9
+1234 1 9
+1234 1 9
+1234 2 6
+1234 2 6
+1234 2 6
+1234 2 6
+1234 3 2
+1234 3 2
+5678 1 9
+5678 1 9
+5678 1 9
+5678 2 6
+5678 2 6
+5678 2 6
+5678 2 6
+5678 3 2
+5678 3 2
+select
+part_id,
+val,
+count(val) over (partition by part_id
+order by val
+range between unbounded preceding and
+unbounded following)
+as CNT
+from t4;
+part_id val CNT
+1234 1 9
+1234 1 9
+1234 1 9
+1234 2 9
+1234 2 9
+1234 2 9
+1234 2 9
+1234 3 9
+1234 3 9
+5678 1 9
+5678 1 9
+5678 1 9
+5678 2 9
+5678 2 9
+5678 2 9
+5678 2 9
+5678 3 9
+5678 3 9
+drop table t4;
+#
+# MDEV-9695: Wrong window frame when using RANGE BETWEEN N FOLLOWING AND PRECEDING
+#
+create table t1 (pk int, a int, b int);
+insert into t1 values
+( 1 , 0, 1),
+( 2 , 0, 2),
+( 3 , 1, 4),
+( 4 , 1, 8),
+( 5 , 2, 32),
+( 6 , 2, 64),
+( 7 , 2, 128),
+( 8 , 2, 16);
+select pk, a, b,
+bit_or(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as bit_or
+from t1;
+pk a b bit_or
+1 0 1 3
+2 0 2 3
+3 1 4 12
+4 1 8 12
+5 2 32 96
+6 2 64 224
+7 2 128 208
+8 2 16 144
+# Extra ROWS n PRECEDING tests
+select pk, a, b,
+bit_or(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) as bit_or
+from t1;
+pk a b bit_or
+1 0 1 0
+2 0 2 1
+3 1 4 0
+4 1 8 4
+5 2 32 0
+6 2 64 32
+7 2 128 64
+8 2 16 128
+drop table t1;
+create table t2 (
+pk int,
+a int,
+b int
+);
+insert into t2 values
+( 1, 0, 1),
+( 2, 0, 2),
+( 3, 0, 4),
+( 4, 0, 8),
+( 5, 1, 16),
+( 6, 1, 32),
+( 7, 1, 64),
+( 8, 1, 128),
+( 9, 2, 256),
+(10, 2, 512),
+(11, 2, 1024),
+(12, 2, 2048);
+select pk, a, b,
+bit_or(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) as bit_or
+from t2;
+pk a b bit_or
+1 0 1 0
+2 0 2 1
+3 0 4 2
+4 0 8 4
+5 1 16 0
+6 1 32 16
+7 1 64 32
+8 1 128 64
+9 2 256 0
+10 2 512 256
+11 2 1024 512
+12 2 2048 1024
+select pk, a, b,
+bit_or(b) over (partition by a order by pk ROWS BETWEEN 2 PRECEDING AND 2 PRECEDING) as bit_or
+from t2;
+pk a b bit_or
+1 0 1 0
+2 0 2 0
+3 0 4 1
+4 0 8 2
+5 1 16 0
+6 1 32 0
+7 1 64 16
+8 1 128 32
+9 2 256 0
+10 2 512 0
+11 2 1024 256
+12 2 2048 512
+select pk, a, b,
+bit_or(b) over (partition by a order by pk ROWS BETWEEN 2 PRECEDING AND 1 PRECEDING) as bit_or
+from t2;
+pk a b bit_or
+1 0 1 0
+2 0 2 1
+3 0 4 3
+4 0 8 6
+5 1 16 0
+6 1 32 16
+7 1 64 48
+8 1 128 96
+9 2 256 0
+10 2 512 256
+11 2 1024 768
+12 2 2048 1536
+# Check CURRENT ROW
+select pk, a, b,
+bit_or(b) over (partition by a order by pk ROWS BETWEEN CURRENT ROW AND CURRENT ROW) as bit_or
+from t2;
+pk a b bit_or
+1 0 1 1
+2 0 2 2
+3 0 4 4
+4 0 8 8
+5 1 16 16
+6 1 32 32
+7 1 64 64
+8 1 128 128
+9 2 256 256
+10 2 512 512
+11 2 1024 1024
+12 2 2048 2048
+drop table t2;
+#
+# Try RANGE PRECEDING|FOLLWING n
+#
+create table t1 (
+part_id int,
+pk int,
+a int
+);
+insert into t1 values
+(10, 1, 1),
+(10, 2, 2),
+(10, 3, 4),
+(10, 4, 8),
+(10, 5,26),
+(10, 6,27),
+(10, 7,40),
+(10, 8,71),
+(10, 9,72);
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 10 FOLLOWING) as cnt
+from t1;
+pk a cnt
+1 1 4
+2 2 4
+3 4 4
+4 8 4
+5 26 6
+6 27 6
+7 40 7
+8 71 9
+9 72 9
+select
+pk, a,
+count(a) over (ORDER BY a DESC
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 10 FOLLOWING) as cnt
+from t1;
+pk a cnt
+9 72 2
+8 71 2
+7 40 3
+6 27 5
+5 26 5
+4 8 9
+3 4 9
+2 2 9
+1 1 9
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 1 FOLLOWING) as cnt
+from t1;
+pk a cnt
+1 1 2
+2 2 2
+3 4 3
+4 8 4
+5 26 6
+6 27 6
+7 40 7
+8 71 9
+9 72 9
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 10 PRECEDING) as cnt
+from t1;
+pk a cnt
+1 1 0
+2 2 0
+3 4 0
+4 8 0
+5 26 4
+6 27 4
+7 40 6
+8 71 7
+9 72 7
+select
+pk, a,
+count(a) over (ORDER BY a DESC
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 10 PRECEDING) as cnt
+from t1;
+pk a cnt
+9 72 0
+8 71 0
+7 40 2
+6 27 3
+5 26 3
+4 8 5
+3 4 5
+2 2 5
+1 1 5
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 1 PRECEDING) as cnt
+from t1;
+pk a cnt
+1 1 0
+2 2 1
+3 4 2
+4 8 3
+5 26 4
+6 27 5
+7 40 6
+8 71 7
+9 72 8
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN 1 PRECEDING
+AND CURRENT ROW) as cnt
+from t1;
+pk a cnt
+1 1 1
+2 2 2
+3 4 1
+4 8 1
+5 26 1
+6 27 2
+7 40 1
+8 71 1
+9 72 2
+select
+pk, a,
+count(a) over (ORDER BY a DESC
+RANGE BETWEEN 1 PRECEDING
+AND CURRENT ROW) as cnt
+from t1;
+pk a cnt
+9 72 1
+8 71 2
+7 40 1
+6 27 1
+5 26 2
+4 8 1
+3 4 1
+2 2 1
+1 1 2
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN 1 FOLLOWING
+AND 3 FOLLOWING) as cnt
+from t1;
+pk a cnt
+1 1 2
+2 2 1
+3 4 0
+4 8 0
+5 26 1
+6 27 0
+7 40 0
+8 71 1
+9 72 0
+# Try CURRENT ROW with[out] DESC
+select
+pk, a,
+count(a) over (ORDER BY a
+RANGE BETWEEN CURRENT ROW
+AND 1 FOLLOWING) as cnt
+from t1;
+pk a cnt
+1 1 2
+2 2 1
+3 4 1
+4 8 1
+5 26 2
+6 27 1
+7 40 1
+8 71 2
+9 72 1
+select
+pk, a,
+count(a) over (order by a desc
+range between current row
+and 1 following) as cnt
+from t1;
+pk a cnt
+9 72 2
+8 71 1
+7 40 1
+6 27 2
+5 26 1
+4 8 1
+3 4 1
+2 2 2
+1 1 1
+insert into t1 select 22, pk, a from t1;
+select
+part_id, pk, a,
+count(a) over (PARTITION BY part_id
+ORDER BY a
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 10 FOLLOWING) as cnt
+from t1;
+part_id pk a cnt
+10 1 1 4
+10 2 2 4
+10 3 4 4
+10 4 8 4
+10 5 26 6
+10 6 27 6
+10 7 40 7
+10 8 71 9
+10 9 72 9
+22 1 1 4
+22 2 2 4
+22 3 4 4
+22 4 8 4
+22 5 26 6
+22 6 27 6
+22 7 40 7
+22 8 71 9
+22 9 72 9
+select
+pk, a,
+count(a) over (PARTITION BY part_id
+ORDER BY a
+RANGE BETWEEN UNBOUNDED PRECEDING
+AND 1 PRECEDING) as cnt
+from t1;
+pk a cnt
+1 1 0
+2 2 1
+3 4 2
+4 8 3
+5 26 4
+6 27 5
+7 40 6
+8 71 7
+9 72 8
+1 1 0
+2 2 1
+3 4 2
+4 8 3
+5 26 4
+6 27 5
+7 40 6
+8 71 7
+9 72 8
+drop table t1;
+# Try a RANGE frame over non-integer datatype:
+create table t1 (
+col1 int,
+a decimal(5,3)
+);
+insert into t1 values (1, 0.45);
+insert into t1 values (1, 0.5);
+insert into t1 values (1, 0.55);
+insert into t1 values (1, 1.21);
+insert into t1 values (1, 1.22);
+insert into t1 values (1, 3.33);
+select
+a,
+count(col1) over (order by a
+range between 0.1 preceding
+and 0.1 following)
+from t1;
+a count(col1) over (order by a
+range between 0.1 preceding
+and 0.1 following)
+0.450 3
+0.500 3
+0.550 3
+1.210 2
+1.220 2
+3.330 1
+drop table t1;
+#
+# RANGE-type frames and NULL values
+#
+create table t1 (
+pk int,
+a int,
+b int
+);
+insert into t1 values (1, NULL,1);
+insert into t1 values (2, NULL,1);
+insert into t1 values (3, NULL,1);
+insert into t1 values (4, 10 ,1);
+insert into t1 values (5, 11 ,1);
+insert into t1 values (6, 12 ,1);
+insert into t1 values (7, 13 ,1);
+insert into t1 values (8, 14 ,1);
+select
+pk, a,
+count(b) over (order by a
+range between 2 preceding
+and 2 following) as CNT
+from t1
+order by a, pk;
+pk a CNT
+1 NULL 3
+2 NULL 3
+3 NULL 3
+4 10 3
+5 11 4
+6 12 5
+7 13 4
+8 14 3
+drop table t1;
+#
+# Try ranges that have bound1 > bound2. The standard actually allows them
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (pk int, c int);
+insert into t1 select a+1,1 from t0;
+update t1 set c=2 where pk not in (1,2,3,4);
+select * from t1;
+pk c
+1 1
+2 1
+3 1
+4 1
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+select
+pk, c,
+count(*) over (partition by c
+order by pk
+rows between 1 preceding
+and 2 preceding)
+as cnt
+from t1;
+pk c cnt
+1 1 0
+2 1 0
+3 1 0
+4 1 0
+5 2 0
+6 2 0
+7 2 0
+8 2 0
+9 2 0
+10 2 0
+select
+pk, c,
+sum(c) over (partition by c
+order by pk
+rows between 1 preceding
+and 2 preceding)
+as sum
+from t1;
+pk c sum
+1 1 NULL
+2 1 NULL
+3 1 NULL
+4 1 NULL
+5 2 NULL
+6 2 NULL
+7 2 NULL
+8 2 NULL
+9 2 NULL
+10 2 NULL
+select
+pk, c,
+sum(c) over (partition by c
+order by pk
+rows between 2 following
+and 1 following)
+as sum
+from t1;
+pk c sum
+1 1 NULL
+2 1 NULL
+3 1 NULL
+4 1 NULL
+5 2 NULL
+6 2 NULL
+7 2 NULL
+8 2 NULL
+9 2 NULL
+10 2 NULL
+select
+pk, c,
+count(*) over (partition by c
+order by pk
+range between 1 preceding
+and 2 preceding)
+as cnt
+from t1;
+pk c cnt
+1 1 0
+2 1 0
+3 1 0
+4 1 0
+5 2 0
+6 2 0
+7 2 0
+8 2 0
+9 2 0
+10 2 0
+drop table t0, t1;
+#
+# Error checking for frame bounds
+#
+create table t1 (a int, b int, c varchar(32));
+insert into t1 values (1,1,'foo');
+insert into t1 values (2,2,'bar');
+select
+count(*) over (order by a,b
+range between unbounded preceding and current row)
+from t1;
+ERROR HY000: RANGE-type frame requires ORDER BY clause with single sort key
+select
+count(*) over (order by c
+range between unbounded preceding and current row)
+from t1;
+ERROR HY000: Numeric datatype is required for RANGE-type frame
+select
+count(*) over (order by a
+range between 'abcd' preceding and current row)
+from t1;
+ERROR HY000: Numeric datatype is required for RANGE-type frame
+select
+count(*) over (order by a
+range between current row and 'foo' following)
+from t1;
+ERROR HY000: Numeric datatype is required for RANGE-type frame
+# Try range frame with invalid bounds
+select
+count(*) over (order by a
+rows between 0.5 preceding and current row)
+from t1;
+ERROR HY000: Integer is required for ROWS-type frame
+select
+count(*) over (order by a
+rows between current row and 3.14 following)
+from t1;
+ERROR HY000: Integer is required for ROWS-type frame
+#
+# EXCLUDE clause is parsed but not supported
+#
+select
+count(*) over (order by a
+rows between 1 preceding and 1 following
+exclude current row)
+from t1;
+ERROR HY000: Frame exclusion is not supported yet
+select
+count(*) over (order by a
+range between 1 preceding and 1 following
+exclude ties)
+from t1;
+ERROR HY000: Frame exclusion is not supported yet
+select
+count(*) over (order by a
+range between 1 preceding and 1 following
+exclude group)
+from t1;
+ERROR HY000: Frame exclusion is not supported yet
+select
+count(*) over (order by a
+rows between 1 preceding and 1 following
+exclude no others)
+from t1;
+count(*) over (order by a
+rows between 1 preceding and 1 following
+exclude no others)
+2
+2
+drop table t1;
+#
+# Window function in grouping query
+#
+create table t1 (
+username varchar(32),
+amount int
+);
+insert into t1 values
+('user1',1),
+('user1',5),
+('user1',3),
+('user2',10),
+('user2',20),
+('user2',30);
+select
+username,
+sum(amount) as s,
+rank() over (order by s desc)
+from t1
+group by username;
+username s rank() over (order by s desc)
+user1 9 2
+user2 60 1
+drop table t1;
+#
+# mdev-9719: Window function in prepared statement
+#
+create table t1(a int, b int, x char(32));
+insert into t1 values (2, 10, 'xx');
+insert into t1 values (2, 10, 'zz');
+insert into t1 values (2, 20, 'yy');
+insert into t1 values (3, 10, 'xxx');
+insert into t1 values (3, 20, 'vvv');
+prepare stmt from 'select a, row_number() over (partition by a order by b) from t1';
+execute stmt;
+a row_number() over (partition by a order by b)
+2 1
+2 2
+2 3
+3 1
+3 2
+drop table t1;
+#
+# mdev-9754: Window name resolution in prepared statement
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (pk int, c int);
+insert into t1 select a+1,1 from t0;
+update t1 set c=2 where pk not in (1,2,3,4);
+select * from t1;
+pk c
+1 1
+2 1
+3 1
+4 1
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+prepare stmt from
+'select
+ pk, c,
+ count(*) over w1 as CNT
+from t1
+window w1 as (partition by c order by pk
+ rows between 2 preceding and 2 following)';
+execute stmt;
+pk c CNT
+1 1 3
+2 1 4
+3 1 4
+4 1 3
+5 2 3
+6 2 4
+7 2 5
+8 2 5
+9 2 4
+10 2 3
+drop table t0,t1;
+#
+# EXPLAIN FORMAT=JSON support for window functions
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+explain format=json select rank() over (order by a) from t0;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t0.a"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t0",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+create table t1 (a int, b int, c int);
+insert into t1 select a,a,a from t0;
+explain format=json
+select
+a,
+rank() over (order by sum(b))
+from t1
+group by a;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "t1.a",
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "sum(t1.b)"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+}
+explain format=json
+select
+a,
+rank() over (order by sum(b))
+from t1
+group by a
+order by null;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "sum(t1.b)"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+#
+# Check how window function works together with GROUP BY and HAVING
+#
+select b,max(a) as MX, rank() over (order by b) from t1 group by b having MX in (3,5,7);
+b MX rank() over (order by b)
+3 3 1
+5 5 2
+7 7 3
+explain format=json
+select b,max(a) as MX, rank() over (order by b) from t1 group by b having MX in (3,5,7);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "having_condition": "MX in (3,5,7)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.b"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+}
+drop table t1;
+drop table t0;
+#
+# Building ordering index for window functions
+#
+create table t1 (
+pk int primary key,
+a int,
+b int,
+c int
+);
+insert into t1 values
+(101 , 0, 10, 1),
+(102 , 0, 10, 2),
+(103 , 1, 10, 3),
+(104 , 1, 10, 4),
+(108 , 2, 10, 5),
+(105 , 2, 20, 6),
+(106 , 2, 20, 7),
+(107 , 2, 20, 8),
+(109 , 4, 20, 9),
+(110 , 4, 20, 10),
+(111 , 5, NULL, 11),
+(112 , 5, 1, 12),
+(113 , 5, NULL, 13),
+(114 , 5, NULL, 14),
+(115 , 5, NULL, 15),
+(116 , 6, 1, NULL),
+(117 , 6, 1, 10),
+(118 , 6, 1, 1),
+(119 , 6, 1, NULL),
+(120 , 6, 1, NULL),
+(121 , 6, 1, NULL),
+(122 , 6, 1, 2),
+(123 , 6, 1, 20),
+(124 , 6, 1, -10),
+(125 , 6, 1, NULL),
+(126 , 6, 1, NULL),
+(127 , 6, 1, NULL);
+select sum(b) over (partition by a order by b,pk
+rows between unbounded preceding and current row) as c1,
+avg(b) over (w1 rows between 1 preceding and 1 following) as c2,
+sum(c) over (w2 rows between 1 preceding and 1 following) as c5,
+avg(b) over (w1 rows between 5 preceding and 5 following) as c3,
+sum(b) over (w1 rows between 1 preceding and 1 following) as c4
+from t1
+window w1 as (partition by a order by b,pk),
+w2 as (partition by b order by c,pk);
+c1 c2 c5 c3 c4
+1 1.0000 42 1.0000 1
+1 1.0000 NULL 1.0000 2
+10 1.0000 NULL 1.0000 3
+10 10.0000 3 10.0000 20
+10 10.0000 9 10.0000 20
+10 15.0000 9 17.5000 30
+11 1.0000 NULL 1.0000 3
+12 1.0000 -10 1.0000 2
+2 1.0000 24 1.0000 3
+20 10.0000 12 10.0000 20
+20 10.0000 6 10.0000 20
+20 20.0000 27 20.0000 40
+3 1.0000 -7 1.0000 3
+30 16.6667 13 17.5000 50
+4 1.0000 NULL 1.0000 3
+40 20.0000 19 20.0000 40
+5 1.0000 NULL 1.0000 3
+50 20.0000 21 17.5000 60
+6 1.0000 NULL 1.0000 3
+7 1.0000 13 1.0000 3
+70 20.0000 24 17.5000 40
+8 1.0000 32 1.0000 3
+9 1.0000 -9 1.0000 3
+NULL 1.0000 29 1.0000 1
+NULL NULL 24 1.0000 NULL
+NULL NULL 38 1.0000 NULL
+NULL NULL 42 1.0000 NULL
+drop table t1;
+#
+# MDEV-9848: Window functions: reuse sorting and/or scanning
+#
+create table t1 (a int, b int, c int);
+insert into t1 values
+(1,3,1),
+(2,2,1),
+(3,1,1);
+# Check using counters
+flush status;
+select
+rank() over (partition by c order by a),
+rank() over (partition by c order by b)
+from t1;
+rank() over (partition by c order by a) rank() over (partition by c order by b)
+1 3
+2 2
+3 1
+show status like '%sort%';
+Variable_name Value
+Sort_merge_passes 0
+Sort_priority_queue_sorts 0
+Sort_range 0
+Sort_rows 6
+Sort_scan 2
+flush status;
+select
+rank() over (partition by c order by a),
+rank() over (partition by c order by a)
+from t1;
+rank() over (partition by c order by a) rank() over (partition by c order by a)
+1 1
+2 2
+3 3
+show status like '%sort%';
+Variable_name Value
+Sort_merge_passes 0
+Sort_priority_queue_sorts 0
+Sort_range 0
+Sort_rows 3
+Sort_scan 1
+explain format=json
+select
+rank() over (partition by c order by a),
+rank() over (partition by c order by a)
+from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.c, t1.a"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+explain format=json
+select
+rank() over (order by a),
+row_number() over (order by a)
+from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.a"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+explain format=json
+select
+rank() over (partition by c order by a),
+count(*) over (partition by c)
+from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.c, t1.a"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+explain format=json
+select
+count(*) over (partition by c),
+rank() over (partition by c order by a)
+from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.c, t1.a"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 3,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-9847: Window functions: crash with big_tables=1
+#
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+set @tmp=@@big_tables;
+set big_tables=1;
+select rank() over (order by a) from t1;
+rank() over (order by a)
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+set big_tables=@tmp;
+drop table t1;
+#
+# Check if "ORDER BY window_func" works
+#
+create table t1 (s1 int, s2 char(5));
+insert into t1 values (1,'a');
+insert into t1 values (null,null);
+insert into t1 values (1,null);
+insert into t1 values (null,'a');
+insert into t1 values (2,'b');
+insert into t1 values (-1,'');
+explain format=json
+select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "filesort": {
+ "sort_key": "row_number() over ( order by t1.s1,t1.s2) desc",
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.s1, t1.s2"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+}
+select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
+s1 s2 X
+2 b 6
+1 a 5
+1 NULL 4
+-1 3
+NULL a 2
+NULL NULL 1
+drop table t1;
+#
+# Try window functions that are not directly present in the select list
+#
+create table t1 (a int, b int);
+insert into t1 values
+(1,3),
+(2,2),
+(3,1);
+select
+a, b,
+rank() over (order by a), rank() over (order by b),
+rank() over (order by a) - rank() over (order by b) as diff
+from
+t1;
+a b rank() over (order by a) rank() over (order by b) diff
+1 3 1 3 -2
+2 2 2 2 0
+3 1 3 1 2
+drop table t1;
+create table t1 (i int);
+insert into t1 values (1),(2);
+SELECT MAX(i) OVER (PARTITION BY (i)) FROM t1;
+MAX(i) OVER (PARTITION BY (i))
+1
+2
+drop table t1;
+#
+# Check the 0 in ROWS 0 PRECEDING
+#
+create table t1 (
+part_id int,
+pk int,
+a int
+);
+insert into t1 values (1, 1, 1);
+insert into t1 values (1, 2, 2);
+insert into t1 values (1, 3, 4);
+insert into t1 values (1, 4, 8);
+select
+pk, a,
+sum(a) over (order by pk rows between 0 preceding and current row)
+from t1;
+pk a sum(a) over (order by pk rows between 0 preceding and current row)
+1 1 1
+2 2 2
+3 4 4
+4 8 8
+select
+pk, a,
+sum(a) over (order by pk rows between 1 preceding and 0 preceding)
+from t1;
+pk a sum(a) over (order by pk rows between 1 preceding and 0 preceding)
+1 1 1
+2 2 3
+3 4 6
+4 8 12
+insert into t1 values (200, 1, 1);
+insert into t1 values (200, 2, 2);
+insert into t1 values (200, 3, 4);
+insert into t1 values (200, 4, 8);
+select
+part_id, pk, a,
+sum(a) over (partition by part_id order by pk rows between 0 preceding and current row)
+from t1;
+part_id pk a sum(a) over (partition by part_id order by pk rows between 0 preceding and current row)
+1 1 1 1
+1 2 2 2
+1 3 4 4
+1 4 8 8
+200 1 1 1
+200 2 2 2
+200 3 4 4
+200 4 8 8
+select
+part_id, pk, a,
+sum(a) over (partition by part_id order by pk rows between 1 preceding and 0 preceding)
+from t1;
+part_id pk a sum(a) over (partition by part_id order by pk rows between 1 preceding and 0 preceding)
+1 1 1 1
+1 2 2 3
+1 3 4 6
+1 4 8 12
+200 1 1 1
+200 2 2 3
+200 3 4 6
+200 4 8 12
+drop table t1;
+#
+# MDEV-9780, The "DISTINCT must not bet converted into GROUP BY when
+# window functions are present" part
+#
+create table t1 (part_id int, a int);
+insert into t1 values
+(100, 1),
+(100, 2),
+(100, 2),
+(100, 3),
+(2000, 1),
+(2000, 2),
+(2000, 3),
+(2000, 3),
+(2000, 3);
+select rank() over (partition by part_id order by a) from t1;
+rank() over (partition by part_id order by a)
+1
+2
+2
+4
+1
+2
+3
+3
+3
+select distinct rank() over (partition by part_id order by a) from t1;
+rank() over (partition by part_id order by a)
+1
+2
+4
+3
+explain format=json
+select distinct rank() over (partition by part_id order by a) from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "duplicate_removal": {
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.part_id, t1.a"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-9893: Window functions with different ORDER BY lists,
+# one of these lists containing an expression
+#
+create table t1 (s1 int, s2 char(5));
+insert into t1 values (1,'a');
+insert into t1 values (null,null);
+insert into t1 values (3,null);
+insert into t1 values (4,'a');
+insert into t1 values (2,'b');
+insert into t1 values (-1,'');
+select
+*,
+ROW_NUMBER() OVER (order by s1),
+CUME_DIST() OVER (order by -s1)
+from t1;
+s1 s2 ROW_NUMBER() OVER (order by s1) CUME_DIST() OVER (order by -s1)
+-1 2 1.0000000000
+1 a 3 0.8333333333
+2 b 4 0.6666666667
+3 NULL 5 0.5000000000
+4 a 6 0.3333333333
+NULL NULL 1 0.1666666667
+drop table t1;
+#
+# MDEV-9925: Wrong result with aggregate function as a window function
+#
+create table t1 (i int);
+insert into t1 values (1),(2);
+select i, sum(i) over (partition by i) from t1;
+i sum(i) over (partition by i)
+1 1
+2 2
+drop table t1;
+#
+# MDEV-9922: Assertion `!join->only_const_tables() && fsort' failed in int create_sort_index
+#
+create view v1 as select 1 as i;
+select rank() over (order by i) from v1;
+rank() over (order by i)
+1
+drop view v1;
+#
+# MDEV-10097: Assertion `count > 0' failed in Item_sum_sum::add_helper(bool)
+#
+CREATE TABLE `orders` (
+`o_orderkey` int(11) NOT NULL,
+`o_custkey` int(11) DEFAULT NULL,
+PRIMARY KEY (`o_orderkey`)
+) DEFAULT CHARSET=latin1;
+INSERT INTO `orders` VALUES (59908,242);
+INSERT INTO `orders` VALUES (59940,238);
+SELECT o_custkey, avg(o_custkey) OVER (PARTITION BY abs(o_custkey)
+ORDER BY o_custkey
+RANGE BETWEEN 15 FOLLOWING
+AND 15 FOLLOWING) from orders;
+o_custkey avg(o_custkey) OVER (PARTITION BY abs(o_custkey)
+ORDER BY o_custkey
+RANGE BETWEEN 15 FOLLOWING
+AND 15 FOLLOWING)
+238 NULL
+242 NULL
+DROP table orders;
+#
+# MDEV-10842: window functions with the same order column
+# but different directions
+#
+create table t1 (
+pk int primary key,
+a int,
+b int,
+c char(10)
+);
+insert into t1 values
+( 1, 0, 1, 'one'),
+( 2, 0, 2, 'two'),
+( 3, 0, 3, 'three'),
+( 4, 1, 1, 'one'),
+( 5, 1, 1, 'two'),
+( 6, 1, 2, 'three'),
+( 7, 2, NULL, 'n_one'),
+( 8, 2, 1, 'n_two'),
+( 9, 2, 2, 'n_three'),
+(10, 2, 0, 'n_four'),
+(11, 2, 10, NULL);
+select pk,
+row_number() over (order by pk desc) as r_desc,
+row_number() over (order by pk asc) as r_asc
+from t1;
+pk r_desc r_asc
+11 1 11
+10 2 10
+9 3 9
+8 4 8
+7 5 7
+6 6 6
+5 7 5
+4 8 4
+3 9 3
+2 10 2
+1 11 1
+drop table t1;
+#
+# MDEV-10874: two window functions with compatible sorting
+#
+create table t1 (
+pk int primary key,
+a int,
+b int,
+c char(10),
+d decimal(10, 3),
+e real
+);
+insert into t1 values
+( 1, 0, 1, 'one', 0.1, 0.001),
+( 2, 0, 2, 'two', 0.2, 0.002),
+( 3, 0, 3, 'three', 0.3, 0.003),
+( 4, 1, 2, 'three', 0.4, 0.004),
+( 5, 1, 1, 'two', 0.5, 0.005),
+( 6, 1, 1, 'one', 0.6, 0.006),
+( 7, 2, NULL, 'n_one', 0.5, 0.007),
+( 8, 2, 1, 'n_two', NULL, 0.008),
+( 9, 2, 2, NULL, 0.7, 0.009),
+(10, 2, 0, 'n_four', 0.8, 0.010),
+(11, 2, 10, NULL, 0.9, NULL);
+select pk, a, d,
+sum(d) over (partition by a order by pk
+ROWS between 1 preceding and current row) as sum_1,
+sum(d) over (order by a
+ROWS BETWEEN 1 preceding and 2 following) as sum_2
+from t1;
+pk a d sum_1 sum_2
+1 0 0.100 0.100 0.600
+2 0 0.200 0.300 1.000
+3 0 0.300 0.500 1.400
+4 1 0.400 0.400 1.800
+5 1 0.500 0.900 2.000
+6 1 0.600 1.100 1.600
+7 2 0.500 0.500 1.800
+8 2 NULL 0.500 2.000
+9 2 0.700 0.700 2.400
+10 2 0.800 1.500 2.400
+11 2 0.900 1.700 1.700
+explain format=json
+select pk, a, d,
+sum(d) over (partition by a order by pk
+ROWS between 1 preceding and current row) as sum_1,
+sum(d) over (order by a
+ROWS BETWEEN 1 preceding and 2 following) as sum_2
+from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.a, t1.pk"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+select pk, a, d,
+sum(d) over (partition by a order by pk desc
+ROWS between 1 preceding and current row) as sum_1,
+sum(d) over (order by a
+ROWS BETWEEN 1 preceding and 2 following) as sum_2
+from t1;
+pk a d sum_1 sum_2
+3 0 0.300 0.300 0.600
+2 0 0.200 0.500 1.200
+1 0 0.100 0.300 1.400
+6 1 0.600 0.600 1.600
+5 1 0.500 1.100 2.400
+4 1 0.400 0.900 2.600
+11 2 0.900 0.900 2.800
+10 2 0.800 1.700 2.400
+9 2 0.700 1.500 2.000
+8 2 NULL 0.700 1.200
+7 2 0.500 0.500 0.500
+drop table t1;
+#
+# MDEV-9941: two window functions with compatible partitions
+#
+create table t1 (
+a int,
+b int,
+c int
+);
+insert into t1 values
+(10, 1, 1),
+(10, 3, 10),
+(10, 1, 10),
+(10, 3, 100),
+(10, 5, 1000),
+(10, 1, 100);
+explain format=json
+select
+a,b,c,
+row_number() over (partition by a),
+row_number() over (partition by a, b)
+from t1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "t1.a, t1.b"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 6,
+ "filtered": 100
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-10815: Window Function Expressions Wrong Results
+#
+create table t(a decimal(35,10), b int);
+insert into t(a,b) values(1,1);
+insert into t(a,b) values(2,1);
+insert into t(a,b) values(0,1);
+insert into t(a,b) values(1, 2);
+insert into t(a,b) values(1.5,2);
+insert into t(a,b) values(3, 2);
+insert into t(a,b) values(4.5,2);
+select a, b,
+sum(t.a) over (partition by t.b order by a) as simple_sum,
+sum(t.a) over (partition by t.b order by a) + 1 as sum_and_const,
+sum(t.b) over (partition by t.b order by a) + sum(t.a) over (partition by t.b order by a) as sum_and_sum
+from t
+order by t.b, t.a;
+a b simple_sum sum_and_const sum_and_sum
+0.0000000000 1 0.0000000000 1.0000000000 1.0000000000
+1.0000000000 1 1.0000000000 2.0000000000 3.0000000000
+2.0000000000 1 3.0000000000 4.0000000000 6.0000000000
+1.0000000000 2 1.0000000000 2.0000000000 3.0000000000
+1.5000000000 2 2.5000000000 3.5000000000 6.5000000000
+3.0000000000 2 5.5000000000 6.5000000000 11.5000000000
+4.5000000000 2 10.0000000000 11.0000000000 18.0000000000
+drop table t;
+#
+# MDEV-10669: Crash in SELECT with window function used
+#
+create table t(a decimal(35,10), b int);
+insert into t(a,b) values(1,1);
+insert into t(a,b) values(2,1);
+insert into t(a,b) values(0,1);
+SELECT (CASE WHEN sum(t.a) over (partition by t.b)=0 THEN null ELSE null END) AS a FROM t;
+a
+NULL
+NULL
+NULL
+SELECT ifnull(((t.a) / CASE WHEN sum(t.a) over(partition by t.b) =0 then null else null end) ,0) from t;
+ifnull(((t.a) / CASE WHEN sum(t.a) over(partition by t.b) =0 then null else null end) ,0)
+0.00000000000000
+0.00000000000000
+0.00000000000000
+SELECT sum(t.a) over (partition by t.b order by a),
+sqrt(ifnull((sum(t.a) over (partition by t.b order by a)), 0))
+from t;
+sum(t.a) over (partition by t.b order by a) sqrt(ifnull((sum(t.a) over (partition by t.b order by a)), 0))
+0.0000000000 0
+1.0000000000 1
+3.0000000000 1.7320508075688772
+drop table t;
+#
+# MDEV-10868: view definitions with window functions
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (pk int, c int);
+insert into t1 select a+1,1 from t0;
+update t1 set c=2 where pk not in (1,2,3,4);
+select * from t1;
+pk c
+1 1
+2 1
+3 1
+4 1
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+select pk, c, c/count(*) over (partition by c order by pk
+rows between 1 preceding and 2 following) as CNT
+from t1;
+pk c CNT
+1 1 0.3333
+2 1 0.2500
+3 1 0.3333
+4 1 0.5000
+5 2 0.6667
+6 2 0.5000
+7 2 0.5000
+8 2 0.5000
+9 2 0.6667
+10 2 1.0000
+create view v1 as select pk, c, c/count(*) over (partition by c order by pk
+rows between 1 preceding and 2 following) as CNT
+from t1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`pk` AS `pk`,`t1`.`c` AS `c`,`t1`.`c` / count(0) over ( partition by `t1`.`c` order by `t1`.`pk` rows between 1 preceding and 2 following ) AS `CNT` from `t1` latin1 latin1_swedish_ci
+select * from v1;
+pk c CNT
+1 1 0.3333
+2 1 0.2500
+3 1 0.3333
+4 1 0.5000
+5 2 0.6667
+6 2 0.5000
+7 2 0.5000
+8 2 0.5000
+9 2 0.6667
+10 2 1.0000
+select pk, c, c/count(*) over w1 as CNT from t1
+window w1 as (partition by c order by pk rows between 1 preceding and 2 following);
+pk c CNT
+1 1 0.3333
+2 1 0.2500
+3 1 0.3333
+4 1 0.5000
+5 2 0.6667
+6 2 0.5000
+7 2 0.5000
+8 2 0.5000
+9 2 0.6667
+10 2 1.0000
+create view v2 as select pk, c, c/count(*) over w1 as CNT from t1
+window w1 as (partition by c order by pk rows between 1 preceding and 2 following);
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `t1`.`pk` AS `pk`,`t1`.`c` AS `c`,`t1`.`c` / count(0) over ( partition by `t1`.`c` order by `t1`.`pk` rows between 1 preceding and 2 following ) AS `CNT` from `t1` latin1 latin1_swedish_ci
+select * from v2;
+pk c CNT
+1 1 0.3333
+2 1 0.2500
+3 1 0.3333
+4 1 0.5000
+5 2 0.6667
+6 2 0.5000
+7 2 0.5000
+8 2 0.5000
+9 2 0.6667
+10 2 1.0000
+select pk, c, c/count(*) over w1 as CNT from t1
+window w1 as (partition by c order by pk rows unbounded preceding);
+pk c CNT
+1 1 1.0000
+2 1 0.5000
+3 1 0.3333
+4 1 0.2500
+5 2 2.0000
+6 2 1.0000
+7 2 0.6667
+8 2 0.5000
+9 2 0.4000
+10 2 0.3333
+create view v3 as select pk, c, c/count(*) over w1 as CNT from t1
+window w1 as (partition by c order by pk rows unbounded preceding);
+show create view v3;
+View Create View character_set_client collation_connection
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`pk` AS `pk`,`t1`.`c` AS `c`,`t1`.`c` / count(0) over ( partition by `t1`.`c` order by `t1`.`pk` rows between unbounded preceding and current row ) AS `CNT` from `t1` latin1 latin1_swedish_ci
+select * from v3;
+pk c CNT
+1 1 1.0000
+2 1 0.5000
+3 1 0.3333
+4 1 0.2500
+5 2 2.0000
+6 2 1.0000
+7 2 0.6667
+8 2 0.5000
+9 2 0.4000
+10 2 0.3333
+select pk, c, c/count(*) over (partition by c order by pk
+range between 3 preceding and current row) as CNT
+from t1;
+pk c CNT
+1 1 1.0000
+2 1 0.5000
+3 1 0.3333
+4 1 0.2500
+5 2 2.0000
+6 2 1.0000
+7 2 0.6667
+8 2 0.5000
+9 2 0.5000
+10 2 0.5000
+create view v4 as select pk, c, c/count(*) over (partition by c order by pk
+range between 3 preceding and current row) as CNT
+from t1;
+show create view v4;
+View Create View character_set_client collation_connection
+v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `t1`.`pk` AS `pk`,`t1`.`c` AS `c`,`t1`.`c` / count(0) over ( partition by `t1`.`c` order by `t1`.`pk` range between 3 preceding and current row ) AS `CNT` from `t1` latin1 latin1_swedish_ci
+select * from v4;
+pk c CNT
+1 1 1.0000
+2 1 0.5000
+3 1 0.3333
+4 1 0.2500
+5 2 2.0000
+6 2 1.0000
+7 2 0.6667
+8 2 0.5000
+9 2 0.5000
+10 2 0.5000
+drop view v1,v2,v3,v4;
+drop table t0,t1;
+#
+# MDEV-10875: window function in subquery
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (3),(1);
+CREATE TABLE t2 (c VARCHAR(8));
+INSERT INTO t2 VALUES ('foo'),('bar'),('foo');
+SELECT COUNT(*) OVER (PARTITION BY c) FROM t2;
+COUNT(*) OVER (PARTITION BY c)
+1
+2
+2
+SELECT * FROM t1 WHERE i IN ( SELECT COUNT(*) OVER (PARTITION BY c) FROM t2 );
+i
+1
+DROP TABLE t1, t2;
+#
+# MDEV-9976: window function without PARTITION BY and ORDER BY
+#
+CREATE TABLE t1 (id int, a int);
+INSERT INTO t1 VALUES
+(1,1000), (2,1100), (3,1800), (4,1500), (5,1700), (6,1200),
+(7,2000), (8,2100), (9,1600);
+SELECT id, sum(a) OVER (PARTITION BY id
+ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
+FROM t1;
+id sum(a) OVER (PARTITION BY id
+1 1000
+2 1100
+3 1800
+4 1500
+5 1700
+6 1200
+7 2000
+8 2100
+9 1600
+ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
+SELECT id, sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
+FROM t1;
+id sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
+1 14000
+2 13000
+3 5900
+4 10700
+5 7600
+6 11900
+7 4100
+8 2100
+9 9200
+DROP TABLE t1;
+#
+# MDEV-11867: window function with aggregation
+# over the result of grouping
+#
+create table t1 (
+username varchar(32),
+amount int
+);
+insert into t1 values
+('user1',1),
+('user1',5),
+('user1',3),
+('user2',10),
+('user2',20),
+('user2',30);
+select username, sum(amount) as s, avg(sum(amount)) over (order by s desc)
+from t1
+group by username;
+username s avg(sum(amount)) over (order by s desc)
+user1 9 34.5000
+user2 60 60.0000
+select username, sum(amount), avg(sum(amount)) over (order by sum(amount) desc)
+from t1
+group by username;
+username sum(amount) avg(sum(amount)) over (order by sum(amount) desc)
+user1 9 34.5000
+user2 60 60.0000
+drop table t1;
+#
+# MDEV-11594: window function over implicit grouping
+#
+create table t1 (id int);
+insert into t1 values (1), (2), (3), (2);
+select sum(id) over (order by sum(id)) from t1;
+sum(id) over (order by sum(id))
+1
+select sum(sum(id)) over (order by sum(id)) from t1;
+sum(sum(id)) over (order by sum(id))
+8
+drop table t1;
+#
+# MDEV-9923: integer constant in order by list
+# of window specification
+#
+create table t1 (id int);
+insert into t1 values (1), (2), (3), (2);
+select rank() over (order by 1) from t1;
+rank() over (order by 1)
+1
+1
+1
+1
+select rank() over (order by 2) from t1;
+rank() over (order by 2)
+1
+1
+1
+1
+select rank() over (partition by id order by 2) from t1;
+rank() over (partition by id order by 2)
+1
+1
+1
+1
+drop table t1;
+#
+# MDEV-10660: view using a simple window function
+#
+create table t1 (id int);
+insert into t1 values (1), (2), (3), (2);
+create view v1(id,rnk) as
+select id, rank() over (order by id) from t1;
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`id` AS `id`,rank() over ( order by `t1`.`id`) AS `rnk` from `t1` latin1 latin1_swedish_ci
+select id, rank() over (order by id) from t1;
+id rank() over (order by id)
+1 1
+2 2
+2 2
+3 4
+select * from v1;
+id rnk
+1 1
+2 2
+2 2
+3 4
+drop view v1;
+drop table t1;
+#
+# MDEV-11138: window function in the query without tables
+#
+select row_number() over ();
+row_number() over ()
+1
+select count(*) over ();
+count(*) over ()
+1
+select sum(5) over ();
+sum(5) over ()
+5
+select row_number() over (), sum(5) over ();
+row_number() over () sum(5) over ()
+1 5
+select row_number() over (order by 2);
+row_number() over (order by 2)
+1
+select row_number() over (partition by 2);
+row_number() over (partition by 2)
+1
+select row_number() over (partition by 4 order by 1+2);
+row_number() over (partition by 4 order by 1+2)
+1
+#
+# MDEV-11999: execution of prepared statement for
+# tableless query with window functions
+#
+prepare stmt from
+"select row_number() over (partition by 4 order by 1+2)";
+execute stmt;
+row_number() over (partition by 4 order by 1+2)
+1
+execute stmt;
+row_number() over (partition by 4 order by 1+2)
+1
+deallocate prepare stmt;
+#
+# MDEV-11745: window function with min/max
+#
+create table t1 (i int, b int);
+insert into t1 values
+(1,1),(2,1),(3,1),(4,4),(5,4),(6,4),(7,8),(8,8),(9,8),(10,8);
+select b, min(i) over (partition by b) as f
+from t1 as tt
+order by i;
+b f
+1 1
+1 1
+1 1
+4 4
+4 4
+4 4
+8 7
+8 7
+8 7
+8 7
+select b, min(i) over (partition by b) as f
+from (select * from t1) as tt
+order by i;
+b f
+1 1
+1 1
+1 1
+4 4
+4 4
+4 4
+8 7
+8 7
+8 7
+8 7
+select b, min(i+10) over (partition by b) as f
+from t1 as tt
+order by i;
+b f
+1 11
+1 11
+1 11
+4 14
+4 14
+4 14
+8 17
+8 17
+8 17
+8 17
+select b, min(i) over (partition by b) as f
+from (select i+10 as i, b from t1) as tt
+order by i;
+b f
+1 11
+1 11
+1 11
+4 14
+4 14
+4 14
+8 17
+8 17
+8 17
+8 17
+select b, min(i+20) over (partition by b) as f
+from (select i+10 as i, b from t1) as tt
+order by i;
+b f
+1 31
+1 31
+1 31
+4 34
+4 34
+4 34
+8 37
+8 37
+8 37
+8 37
+select b, max(i) over (partition by b) as f
+from t1 as tt
+order by i;
+b f
+1 3
+1 3
+1 3
+4 6
+4 6
+4 6
+8 10
+8 10
+8 10
+8 10
+select b, max(i) over (partition by b) as f
+from (select * from t1) as tt
+order by i;
+b f
+1 3
+1 3
+1 3
+4 6
+4 6
+4 6
+8 10
+8 10
+8 10
+8 10
+select b, max(i+10) over (partition by b) as f
+from t1 as tt
+order by i;
+b f
+1 13
+1 13
+1 13
+4 16
+4 16
+4 16
+8 20
+8 20
+8 20
+8 20
+select b, max(i) over (partition by b) as f
+from (select i+10 as i, b from t1) as tt
+order by i;
+b f
+1 13
+1 13
+1 13
+4 16
+4 16
+4 16
+8 20
+8 20
+8 20
+8 20
+select b, max(i+20) over (partition by b) as f
+from (select i+10 as i, b from t1) as tt
+order by i;
+b f
+1 33
+1 33
+1 33
+4 36
+4 36
+4 36
+8 40
+8 40
+8 40
+8 40
+select max(i), max(i), sum(i), count(i)
+from t1 as tt
+group by b;
+max(i) max(i) sum(i) count(i)
+3 3 6 3
+6 6 15 3
+10 10 34 4
+select max(i), min(sum(i)) over (partition by count(i)) f
+from t1 as tt
+group by b;
+max(i) f
+3 6
+6 6
+10 34
+select max(i), min(sum(i)) over (partition by count(i)) f
+from (select * from t1) as tt
+group by b;
+max(i) f
+3 6
+6 6
+10 34
+select max(i+10), min(sum(i)+10) over (partition by count(i)) f
+from t1 as tt
+group by b;
+max(i+10) f
+13 16
+16 16
+20 44
+select max(i), max(i), sum(i), count(i)
+from (select i+10 as i, b from t1) as tt
+group by b;
+max(i) max(i) sum(i) count(i)
+13 13 36 3
+16 16 45 3
+20 20 74 4
+select max(i), min(sum(i)) over (partition by count(i)) f
+from (select i+10 as i, b from t1) as tt
+group by b;
+max(i) f
+13 36
+16 36
+20 74
+select max(i), min(i), min(max(i)-min(i)) over (partition by count(i)) f
+from (select i+10 as i, b from t1) as tt
+group by b;
+max(i) min(i) f
+13 11 2
+16 14 2
+20 17 3
+drop table t1;
+#
+# MDEV-12015: window function over select with WHERE
+# that is always FALSE
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (3), (1), (2);
+SELECT i, ROW_NUMBER() OVER () FROM t1 WHERE 1 = 2;
+i ROW_NUMBER() OVER ()
+SELECT i, COUNT(*) OVER () FROM t1 WHERE 1 = 2;
+i COUNT(*) OVER ()
+DROP TABLE t1;
+#
+# MDEV-12051: window function in query with implicit grouping
+# on always empty set
+#
+create table t1 (a int, b varchar(8));
+insert into t1 values (1,'foo'),(2,'bar');
+select max(a), row_number() over () from t1 where a > 10;
+max(a) row_number() over ()
+NULL 1
+select max(a), sum(max(a)) over () from t1 where a > 10;
+max(a) sum(max(a)) over ()
+NULL NULL
+select max(a), sum(max(a)) over (partition by max(a)) from t1 where a > 10;
+max(a) sum(max(a)) over (partition by max(a))
+NULL NULL
+select max(a), row_number() over () from t1 where 1 = 2;
+max(a) row_number() over ()
+NULL 1
+select max(a), sum(max(a)) over () from t1 where 1 = 2;
+max(a) sum(max(a)) over ()
+NULL NULL
+select max(a), sum(max(a)) over (partition by max(a)) from t1 where 1 = 2;
+max(a) sum(max(a)) over (partition by max(a))
+NULL NULL
+select max(a), row_number() over () from t1 where 1 = 2
+having max(a) is not null;
+max(a) row_number() over ()
+select max(a), sum(max(a)) over () from t1 where 1 = 2
+having max(a) is not null;
+max(a) sum(max(a)) over ()
+drop table t1;
+#
+# MDEV-10885: window function in query with implicit grouping
+# with constant condition evaluated to false
+#
+CREATE TABLE t1 (a INT, b VARCHAR(8));
+INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
+CREATE TABLE t2 (c INT);
+INSERT INTO t2 VALUES (3),(4);
+CREATE TABLE t3 (d INT);
+INSERT INTO t3 VALUES (5),(6);
+SELECT MAX(a), ROW_NUMBER() OVER (PARTITION BY MAX(a)) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) );
+MAX(a) ROW_NUMBER() OVER (PARTITION BY MAX(a))
+NULL 1
+SELECT MAX(a), COUNT(MAX(a)) OVER (PARTITION BY MAX(a)) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) );
+MAX(a) COUNT(MAX(a)) OVER (PARTITION BY MAX(a))
+NULL 0
+SELECT MAX(a), SUM(MAX(a)) OVER (PARTITION BY MAX(a)) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) );
+MAX(a) SUM(MAX(a)) OVER (PARTITION BY MAX(a))
+NULL NULL
+SELECT MAX(a), ROW_NUMBER() OVER (PARTITION BY MAX(a)) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) )
+HAVING MAX(a) IS NOT NULL;
+MAX(a) ROW_NUMBER() OVER (PARTITION BY MAX(a))
+SELECT a, MAX(a), ROW_NUMBER() OVER (PARTITION BY b) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) );
+a MAX(a) ROW_NUMBER() OVER (PARTITION BY b)
+NULL NULL 1
+SELECT a, COUNT(a), AVG(a) OVER (PARTITION BY b) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) );
+a COUNT(a) AVG(a) OVER (PARTITION BY b)
+NULL 0 NULL
+SELECT a, MAX(a), AVG(a) OVER (PARTITION BY b) FROM t1
+WHERE EXISTS ( SELECT * FROM t2 WHERE c IN ( SELECT MAX(d) FROM t3 ) );
+a MAX(a) AVG(a) OVER (PARTITION BY b)
+NULL NULL NULL
+DROP TABLE t1,t2,t3;
+#
+# MDEV-10859: Wrong result of aggregate window function in query
+# with HAVING and no ORDER BY
+#
+create table empsalary (depname varchar(32), empno smallint primary key, salary int);
+insert into empsalary values
+('develop', 1, 5000), ('develop', 2, 4000),('sales', 3, '6000'),('sales', 4, 5000);
+SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary;
+depname empno salary avg(salary) OVER (PARTITION BY depname)
+develop 1 5000 4500.0000
+develop 2 4000 4500.0000
+sales 3 6000 5500.0000
+sales 4 5000 5500.0000
+SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary ORDER BY depname;
+depname empno salary avg(salary) OVER (PARTITION BY depname)
+develop 1 5000 4500.0000
+develop 2 4000 4500.0000
+sales 3 6000 5500.0000
+sales 4 5000 5500.0000
+#
+# These last 2 should have the same row results, ignoring order.
+#
+SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary HAVING empno > 1;
+depname empno salary avg(salary) OVER (PARTITION BY depname)
+develop 2 4000 4000.0000
+sales 3 6000 5500.0000
+sales 4 5000 5500.0000
+SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary HAVING empno > 1 ORDER BY depname;
+depname empno salary avg(salary) OVER (PARTITION BY depname)
+develop 2 4000 4000.0000
+sales 3 6000 5500.0000
+sales 4 5000 5500.0000
+drop table empsalary;
+#
+# MDEV-11868: min(distinct) over () returns wrong value
+#
+create table TDEC (CDEC int, RNUM int);
+create view VDEC as select * from TDEC;
+insert into TDEC (CDEC) values (null),(-1),(0),(1),(0),(10);
+select TDEC.CDEC, min(TDEC.CDEC) over () from TDEC;
+CDEC min(TDEC.CDEC) over ()
+NULL -1
+-1 -1
+0 -1
+0 -1
+1 -1
+10 -1
+select VDEC.CDEC, min(VDEC.CDEC) over () from VDEC;
+CDEC min(VDEC.CDEC) over ()
+NULL -1
+-1 -1
+0 -1
+0 -1
+1 -1
+10 -1
+select TDEC.CDEC, max(TDEC.CDEC) over () from TDEC;
+CDEC max(TDEC.CDEC) over ()
+NULL 10
+-1 10
+0 10
+0 10
+1 10
+10 10
+select VDEC.CDEC, max(VDEC.CDEC) over () from VDEC;
+CDEC max(VDEC.CDEC) over ()
+NULL 10
+-1 10
+0 10
+0 10
+1 10
+10 10
+select TDEC.CDEC, min(distinct TDEC.CDEC) over () from TDEC;
+CDEC min(distinct TDEC.CDEC) over ()
+NULL -1
+-1 -1
+0 -1
+0 -1
+1 -1
+10 -1
+select VDEC.CDEC, min(distinct VDEC.CDEC) over () from VDEC;
+CDEC min(distinct VDEC.CDEC) over ()
+NULL -1
+-1 -1
+0 -1
+0 -1
+1 -1
+10 -1
+select TDEC.CDEC, max(distinct TDEC.CDEC) over () from TDEC;
+CDEC max(distinct TDEC.CDEC) over ()
+NULL 10
+-1 10
+0 10
+0 10
+1 10
+10 10
+select VDEC.CDEC, max(distinct VDEC.CDEC) over () from VDEC;
+CDEC max(distinct VDEC.CDEC) over ()
+NULL 10
+-1 10
+0 10
+0 10
+1 10
+10 10
+#
+# These should be removed once support for them is added.
+#
+select TDEC.CDEC, count(distinct TDEC.CDEC) over () from TDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'COUNT(DISTINCT) aggregate as window function'
+select VDEC.CDEC, count(distinct VDEC.CDEC) over () from VDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'COUNT(DISTINCT) aggregate as window function'
+select TDEC.CDEC, sum(distinct TDEC.CDEC) over () from TDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'SUM(DISTINCT) aggregate as window function'
+select VDEC.CDEC, sum(distinct VDEC.CDEC) over () from VDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'SUM(DISTINCT) aggregate as window function'
+select TDEC.CDEC, avg(distinct TDEC.CDEC) over () from TDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'AVG(DISTINCT) aggregate as window function'
+select VDEC.CDEC, avg(distinct VDEC.CDEC) over () from VDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'AVG(DISTINCT) aggregate as window function'
+select TDEC.CDEC, GROUP_CONCAT(TDEC.CDEC) over () from TDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'GROUP_CONCAT() aggregate as window function'
+select VDEC.CDEC, GROUP_CONCAT(distinct VDEC.CDEC) over () from VDEC;
+ERROR 42000: This version of MariaDB doesn't yet support 'GROUP_CONCAT() aggregate as window function'
+drop table TDEC;
+drop view VDEC;
+#
+# MDEV-10700: 10.2.2 windowing function returns incorrect result
+#
+create table t(a int,b int, c int , d int);
+insert into t(a,b,c,d) values(1, rand(10)*1000, rand(10)*1000, rand(10)*1000);
+insert into t(a,b,c,d) values(1, rand(10)*1000, rand(10)*1000, rand(10)*1000);
+replace into t(a,b,c,d) select 1, rand(10)*1000, rand(10)*1000, rand(10)*1000 from t t1, t t2, t t3, t t4, t t5, t t6, t t7, t t8, t t9, t t10, t t11, t t12, t t13, t t14, t t15, t t16, t t17;
+select count(distinct s) from (select sum(d) over(partition by a,b,c) as s from t) Z where s > 0;
+count(distinct s)
+993
+select count(distinct s) from (select sum(d) as s from t group by a,b,c) Z where s > 0;
+count(distinct s)
+993
+select count(distinct s) from (select sum(d) over(partition by a,b) as s from t) Z where s > 0;
+count(distinct s)
+993
+select count(distinct s) from (select sum(d) as s from t group by a,b) Z where s > 0;
+count(distinct s)
+993
+select count(distinct s) from (select sum(d) over(partition by a) as s from t) Z where s > 0;
+count(distinct s)
+1
+select count(distinct s) from (select sum(d) as s from t group by a) Z where s > 0;
+count(distinct s)
+1
+drop table t;
+#
+# MDEV-9924: window function in query with group by optimized away
+#
+create table t1 (i int);
+insert into t1 values (2),(3),(1);
+select row_number() over () from t1 group by 1+2;
+row_number() over ()
+1
+select max(i), row_number() over () from t1 group by 1+2;
+max(i) row_number() over ()
+3 1
+select rank() over (order by max(i)) from t1 group by 1+2;
+rank() over (order by max(i))
+1
+select i, row_number() over () from t1 group by 1+2;
+i row_number() over ()
+2 1
+select i, rank() over (order by i) rnk from t1 group by 1+2;
+i rnk
+2 1
+drop table t1;
+#
+# MDEV-11907: window function as the second operand of division
+#
+create table t1 (pk int, c int);
+insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2);
+set @sql_mode_save= @@sql_mode;
+set sql_mode='ERROR_FOR_DIVISION_BY_ZERO';
+select pk, c, c/count(*) over
+(partition by c order by pk
+rows between 1 preceding and 2 following) as CNT
+from t1;
+pk c CNT
+1 1 0.3333
+2 1 0.2500
+3 1 0.3333
+4 1 0.5000
+5 2 2.0000
+show warnings;
+Level Code Message
+set sql_mode=@sql_mode_save;
+drop table t1;
+#
+# MDEV-12336: several functions over a window function
+#
+create table t1 (name varchar(10), cnt int);
+insert into t1 values ('Fred', 23), ('Fred', 35), ('Joe', 10);
+select q.name, q.row_cnt,
+round( 100 * ( q.row_cnt /
+sum(q.row_cnt) over
+(
+order by q.name
+rows between
+unbounded preceding and
+unbounded following
+)
+),2
+) pct_of_total
+from
+(
+select name, count(*) row_cnt, sum(cnt) sum_cnt
+from t1
+group by 1
+) q;
+name row_cnt pct_of_total
+Fred 2 66.67
+Joe 1 33.33
+drop table t1;
+#
+# MDEV-11990: window function over min/max aggregation
+#
+create table t1 (id int);
+insert into t1 values (1), (2), (3), (2), (4), (2);
+select sum(max(id)) over (order by max(id)) from t1;
+sum(max(id)) over (order by max(id))
+4
+explain
+select sum(max(id)) over (order by max(id)) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary
+create index idx on t1(id);
+select sum(max(id)) over (order by max(id)) from t1;
+sum(max(id)) over (order by max(id))
+4
+explain
+select sum(max(id)) over (order by max(id)) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+select sum(max(id)) over (order by max(id)) from t1 where id < 3;
+sum(max(id)) over (order by max(id))
+2
+select count(max(id)) over (order by max(id)) from t1 where id < 3;
+count(max(id)) over (order by max(id))
+1
+select max(id), rank() over (order by max(id)) from t1 where id < 3;
+max(id) rank() over (order by max(id))
+2 1
+drop table t1;
+#
+# main.win failure post MDEV-12336
+#
+create table t(a decimal(35,10), b int);
+insert into t values (1, 10), (2, 20), (3, 30);
+prepare stmt from "SELECT (CASE WHEN sum(t.a) over (partition by t.b)=1 THEN 1000 ELSE 300 END) AS a FROM t";
+execute stmt;
+a
+1000
+300
+300
+drop table t;
+#
+# MDEV-12851 case with window functions query crashes server
+#
+create table t1(dt datetime);
+insert into t1 values ('2017-05-17'), ('2017-05-18');
+select dt,
+case when (max(dt) over (order by dt rows between 1 following and 1 following) is null)
+then '9999-12-31 12:00:00'
+ else max(dt) over (order by dt rows between 1 following and 1 following)
+end x,
+case when (max(dt) over (order by dt rows between 1 following and 1 following) is not null)
+then '9999-12-31 12:00:00'
+ else max(dt) over (order by dt rows between 1 following and 1 following)
+end x
+from t1;
+dt x x
+2017-05-17 00:00:00 2017-05-18 00:00:00 9999-12-31 12:00:00
+2017-05-18 00:00:00 9999-12-31 12:00:00 NULL
+drop table t1;
+create table t1(i int);
+insert into t1 values (null),(1),(2);
+select max(i) over (order by i),
+max(i) over (order by i) is null,
+max(i) over (order by i) is not null
+from t1;
+max(i) over (order by i) max(i) over (order by i) is null max(i) over (order by i) is not null
+NULL 1 0
+1 0 1
+2 0 1
+drop table t1;
+#
+# MDEV-13189: Window functions crash when using INTERVAL function
+#
+create table t1(i int);
+insert into t1 values (1),(2),(10),(20),(30);
+select sum(i) over (order by i), interval(sum(i) over (order by i), 10, 20)
+from t1;
+sum(i) over (order by i) interval(sum(i) over (order by i), 10, 20)
+1 0
+3 0
+13 1
+33 2
+63 2
+drop table t1;
+#
+# MDEV-13352: Server crashes in st_join_table::remove_duplicates
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
+ROW_NUMBER() OVER() i
+SELECT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
+ROW_NUMBER() OVER() i
+DROP TABLE t1;
+#
+# MDEV-13344: Server crashes in in AGGR_OP::put_record on subquery
+# with window function and constant table
+# (Testcase only)
+#
+CREATE TABLE t1 (c CHAR(8)) ENGINE=MyISAM;
+INSERT IGNORE INTO t1 VALUES ('foo');
+SELECT ('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1);
+('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1)
+0
+DROP TABLE t1;
+#
+# MDEV-13351: Server crashes in st_select_lex::set_explain_type upon UNION with window function
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT Nth_value(i,1) OVER() FROM t1
+UNION ALL
+( SELECT Nth_value(i,2) OVER() FROM t1 LIMIT 0 )
+;
+Nth_value(i,1) OVER()
+1
+1
+DROP TABLE t1;
+#
+# A regression after MDEV-13351:
+# MDEV-13374 : Server crashes in first_linear_tab / st_select_lex::set_explain_type
+# upon UNION with aggregate function
+#
+CREATE TABLE t1 (i INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1),(2);
+SELECT i AS fld FROM t1 UNION SELECT COUNT(*) AS fld FROM t1;
+fld
+1
+2
+DROP TABLE t1;
+#
+# MDEV-13240 Wrong warning with MAX(datetime_field) OVER (...)
+#
+CREATE TABLE t1 (dt DATETIME);
+INSERT INTO t1 VALUES ('2017-05-17');
+SELECT MAX(dt) OVER (ORDER BY dt ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) FROM t1;
+MAX(dt) OVER (ORDER BY dt ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING)
+NULL
+DROP TABLE t1;
+#
+# MDEV-13358 FIRST_VALUE throws SQL Error (1292): Incorrect datetime value
+#
+CREATE TABLE IF NOT EXISTS `fv_test` (
+`SOME_DATE` datetime NOT NULL
+);
+INSERT INTO `fv_test` (`SOME_DATE`) VALUES ('2017-07-20 12:47:56');
+CREATE TABLE fv_result
+SELECT
+FIRST_VALUE(SOME_DATE) OVER(ORDER BY SOME_DATE DESC) AS somedate
+FROM fv_test;
+SHOW CREATE TABLE fv_result;
+Table Create Table
+fv_result CREATE TABLE `fv_result` (
+ `somedate` datetime DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM fv_result;
+somedate
+2017-07-20 12:47:56
+DROP TABLE fv_test, fv_result;
+#
+# MDEV-13649: Server crashes in set_field_to_null_with_conversions or in Field::set_notnull
+#
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (0),(1),(2);
+SELECT LEAD(a) OVER (PARTITION BY a ORDER BY a) as lead,
+a AND LEAD(a) OVER (PARTITION BY a ORDER BY a) AS a_and_lead_part
+FROM t1;
+lead a_and_lead_part
+NULL 0
+NULL NULL
+NULL NULL
+SELECT a OR LEAD(a) OVER (ORDER BY a) AS a_or_lead_order
+FROM t1
+ORDER BY a;
+a_or_lead_order
+1
+1
+1
+SELECT a AND LEAD(a) OVER (ORDER BY a) AS a_and_lead_order
+FROM t1
+ORDER BY a;
+a_and_lead_order
+0
+1
+NULL
+SELECT a XOR LEAD(a) OVER (ORDER BY a) AS a_xor_lead_order
+FROM t1
+ORDER BY a;
+a_xor_lead_order
+1
+0
+NULL
+SELECT NOT LEAD(a) OVER (ORDER BY a) AS not_lead_order
+FROM t1
+ORDER BY a;
+not_lead_order
+0
+0
+NULL
+SELECT LEAD(a) OVER (ORDER BY a) is not null AS is_not_null_lead_order
+FROM t1
+ORDER BY a;
+is_not_null_lead_order
+1
+1
+0
+drop table t1;
+#
+# MDEV-13354: Server crashes in find_field_in_tables upon PS with window function and subquery
+#
+CREATE TABLE t1 (i INT, a char);
+INSERT INTO t1 VALUES (1, 'a'),(2, 'b');
+PREPARE stmt FROM "SELECT row_number() over (partition by i order by i), i FROM (SELECT * from t1) as sq";
+EXECUTE stmt;
+row_number() over (partition by i order by i) i
+1 1
+1 2
+DROP TABLE t1;
+#
+# MDEV-13384: "window" seems like a reserved column name but it's not listed as one
+#
+# Currently we allow window as an identifier, except for table aliases.
+#
+CREATE TABLE door (id INT, window VARCHAR(10));
+SELECT id
+FROM door as window;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'window' at line 2
+SELECT id, window
+FROM door;
+id window
+SELECT id, window
+FROM door as window;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'window' at line 2
+DROP TABLE door;
+#
+# MDEV-13352: Server crashes in st_join_table::remove_duplicates
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
+ROW_NUMBER() OVER() i
+SELECT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
+ROW_NUMBER() OVER() i
+DROP TABLE t1;
+#
+# MDEV-15853: Assertion `tab->filesort_result == 0' failed
+#
+CREATE TABLE t1 ( a1 int);
+insert into t1 values (1),(2),(3);
+CREATE TABLE t2 (b1 int, a1 int, a2 int);
+insert into t2 values (1,2,3),(2,3,4),(3,4,5);
+SELECT COUNT(DISTINCT t2.a2),
+rank() OVER (ORDER BY t2.b1)
+FROM t2 ,t1 GROUP BY t2.b1 ORDER BY t1.a1;
+COUNT(DISTINCT t2.a2) rank() OVER (ORDER BY t2.b1)
+1 1
+1 2
+1 3
+DROP TABLE t1,t2;
+#
+# MDEV-16990: server crashes in base_list_iterator::next
+#
+CREATE TABLE t1(i int);
+insert into t1 values (1),(2);
+SELECT DISTINCT row_number() OVER (), MAX(1) FROM t1;
+row_number() OVER () MAX(1)
+1 1
+SELECT DISTINCT BIT_AND(0) OVER (), MAX(1) FROM t1;
+BIT_AND(0) OVER () MAX(1)
+0 1
+drop table t1;
+#
+# MDEV-17525: Window functions not working in ONLY_FULL_GROUP_BY mode
+#
+CREATE TABLE t1 (name CHAR(10), test CHAR(10), score TINYINT);
+INSERT INTO t1 VALUES
+('Chun', 'SQL', 75), ('Chun', 'Tuning', 73),
+('Esben', 'SQL', 43), ('Esben', 'Tuning', 31),
+('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88),
+('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);
+SET @save_sql_mode= @@sql_mode;
+SET sql_mode = 'ONLY_FULL_GROUP_BY';
+SELECT name, test, score,
+AVG(score) OVER (PARTITION BY test) AS average_by_test
+FROM t1
+ORDER BY test, name;
+name test score average_by_test
+Chun SQL 75 65.2500
+Esben SQL 43 65.2500
+Kaolin SQL 56 65.2500
+Tatiana SQL 87 65.2500
+Chun Tuning 73 68.7500
+Esben Tuning 31 68.7500
+Kaolin Tuning 88 68.7500
+Tatiana Tuning 83 68.7500
+set @@sql_mode= @save_sql_mode;
+SELECT name, test, score,
+AVG(score) OVER (PARTITION BY test) AS average_by_test
+FROM t1
+ORDER BY test, name;
+name test score average_by_test
+Chun SQL 75 65.2500
+Esben SQL 43 65.2500
+Kaolin SQL 56 65.2500
+Tatiana SQL 87 65.2500
+Chun Tuning 73 68.7500
+Esben Tuning 31 68.7500
+Kaolin Tuning 88 68.7500
+Tatiana Tuning 83 68.7500
+drop table t1;
+#
+# MDEV-12575: Server crash in AGGR_OP::put_record or in JOIN_CACHE::free
+# or Invalid write in JOIN::make_aggr_tables_info
+#
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) order by 1+2;
+BIT_OR(100) OVER ()
+100
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT * FROM (
+SELECT
+ROW_NUMBER() OVER(), i, sum(i)
+FROM t1
+WHERE 1=0
+limit 0
+) AS sq;
+ROW_NUMBER() OVER() i sum(i)
+SELECT * FROM (
+SELECT
+ROW_NUMBER() OVER(), i, sum(i)
+FROM t1
+WHERE 1=0
+GROUP BY i
+) AS sq;
+ROW_NUMBER() OVER() i sum(i)
+drop table t1;
+create table t1 (a int);
+explain
+select distinct 1, row_number() over (order by 1) from t1 where a=0 group by a with rollup;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+select distinct 1, row_number() over (order by 1) from t1 where a=0 group by a with rollup;
+1 row_number() over (order by 1)
+drop table t1;
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) WITH ROLLUP
+HAVING @A := 'qwerty';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100) WITH ROLLUP
+HAVING @A := 'qwerty';
+BIT_OR(100) OVER ()
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100)
+HAVING @A := 'qwerty';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+SELECT DISTINCT BIT_OR(100) OVER () FROM dual
+GROUP BY LEFT('2018-08-24', 100)
+HAVING @A := 'qwerty';
+BIT_OR(100) OVER ()
+create table t1 (a int);
+explain
+SELECT DISTINCT BIT_OR(100) OVER () FROM t1
+GROUP BY LEFT('2018-08-24', 100) having 1=1 limit 0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit
+drop table t1;
+#
+# MDEV-13170: Database service (MySQL) stops after update with trigger
+#
+CREATE TABLE t1 ( t1_id int, point_id int, ml_id int, UNIQUE KEY t1_ml_u (ml_id,point_id)) ;
+INSERT INTO t1 VALUES (1,1,8884),(2,1,8885);
+CREATE TABLE t2 ( db_time datetime, au_nr int, col_id int, new_val int);
+CREATE TABLE t3 (id1 int, id2 int, d1 int);
+CREATE TRIGGER t1_aurtrg AFTER UPDATE ON t1 FOR EACH ROW begin
+CREATE OR REPLACE TEMPORARY TABLE trg_u AS
+WITH l AS
+(SELECT a.*,
+Max(t2.col_id) over (PARTITION BY a.d1),
+Max(t2.new_val) over (PARTITION BY a.d1)
+FROM
+(SELECT d1 , id1, id2 FROM t3) a
+JOIN t2 ON (a.d1=t2.db_time AND a.id1=t2.au_nr))
+SELECT 1;
+END;//
+update t1 set ml_id=8884 where point_id=1;
+ERROR 23000: Duplicate entry '8884-1' for key 't1_ml_u'
+update t1 set ml_id=8884 where point_id=1;
+ERROR 23000: Duplicate entry '8884-1' for key 't1_ml_u'
+drop table t1, t2,t3;
+CREATE TABLE t1 (i INT, a char);
+INSERT INTO t1 VALUES (1, 'a'),(2, 'b');
+create view v1 as select * from t1;
+PREPARE stmt FROM "SELECT i, row_number() over (partition by i order by i) FROM v1";
+execute stmt;
+i row_number() over (partition by i order by i)
+1 1
+2 1
+deallocate prepare stmt;
+drop table t1;
+drop view v1;
+#
+# MDEV-17676: Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init
+#
+CREATE TABLE t1 (b1 text NOT NULL);
+INSERT INTO t1 VALUES ('2'),('1');
+EXPLAIN
+SELECT DISTINCT MIN(b1) OVER () FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary
+SELECT DISTINCT MIN(b1) OVER () FROM t1;
+MIN(b1) OVER ()
+1
+drop table t1;
+#
+# MDEV-15424: Unreasonal SQL Error (1356) on select from view
+#
+create table t1 (id int, n1 int);
+insert into t1 values (1,1), (2,1), (3,2), (4,4);
+create view v1 as SELECT ifnull(max(n1) over (partition by n1),'aaa') FROM t1;
+explain select * from v1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4
+2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using temporary
+select * from v1;
+ifnull(max(n1) over (partition by n1),'aaa')
+1
+1
+2
+4
+drop table t1;
+drop view v1;
+#
+# MDEV-18431: Select max + row_number giving incorrect result
+#
+create table t1 (id int, v int);
+insert into t1 values (1, 1), (1,2), (1,3), (2, 1), (2, 2);
+select e.id,
+(select max(t1.v) from t1 where t1.id=e.id) as a,
+row_number() over (partition by e.id order by e.v) as b,
+(select max(t1.v) from t1 where t1.id=e.id) + (row_number() over (partition by e.id order by e.v)) as sum_a_b
+from t1 e;
+id a b sum_a_b
+1 3 1 4
+1 3 2 5
+1 3 3 6
+2 2 1 3
+2 2 2 4
+drop table t1;
+#
+# MDEV-15837: Assertion `item1->type() == Item::FIELD_ITEM && item2->type() == Item::FIELD_ITEM'
+# failed in compare_order_elements function
+#
+CREATE TABLE t1 (a1 int);
+insert into t1 values (1),(2),(3);
+SELECT rank() OVER (ORDER BY 1), ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4))) FROM t1;
+rank() OVER (ORDER BY 1) ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4)))
+1 1
+1 2
+1 3
+drop table t1;
+#
+# MDEV-17781: Server crashes in next_linear_tab
+#
+CREATE TABLE t1 (i1 int);
+explain
+(SELECT AVG(0) OVER (), MAX('2') FROM t1)
+UNION ALL
+(SELECT AVG(0) OVER (), MAX('2') FROM t1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used
+(SELECT AVG(0) OVER (), MAX('2') FROM t1)
+UNION ALL
+(SELECT AVG(0) OVER (), MAX('2') FROM t1);
+AVG(0) OVER () MAX('2')
+0.0000 NULL
+0.0000 NULL
+drop table t1;
+#
+# MDEV-14791: Crash with order by expression containing window functions
+#
+CREATE TABLE t1 (b1 int, b2 int);
+INSERT INTO t1 VALUES (1,1),(0,0);
+explain
+SELECT b1 from t1 order by row_number() over (ORDER BY b2) + 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+SELECT b1 from t1 order by row_number() over (ORDER BY b2) + 1;
+b1
+0
+1
+explain
+SELECT b1 from t1 order by row_number() over (ORDER BY b2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+SELECT b1 from t1 order by row_number() over (ORDER BY b2);
+b1
+0
+1
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b int, c int);
+INSERT INTO t1 VALUES (2,3,207), (1,21,909), (7,13,312), (8,64,248);
+explain
+SELECT * FROM t1 ORDER BY max(t1.a) over (partition by c);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
+SELECT * FROM t1 ORDER BY max(t1.a) over (partition by c);
+a b c
+1 21 909
+2 3 207
+7 13 312
+8 64 248
+explain
+SELECT max(t1.a) over (partition by c) as x, b, c from t1 order by max(t1.a) over (partition by c);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
+SELECT max(t1.a) over (partition by c) as x, b, c from t1 order by max(t1.a) over (partition by c);
+x b c
+1 21 909
+2 3 207
+7 13 312
+8 64 248
+drop table t1;
+#
+# MDEV-18373: DENSE_RANK is not calculated correctly
+#
+create table t1 (a int, b int);
+insert into t1 values (60, 1515),(60, 2000),(70, 2000),(55, 1600);
+select b, dense_rank() over (order by sum(a)) from t1 group by b;
+b dense_rank() over (order by sum(a))
+1515 2
+1600 1
+2000 3
+select b, dense_rank() over (order by sum(a)+1) from t1 group by b;
+b dense_rank() over (order by sum(a)+1)
+1515 2
+1600 1
+2000 3
+select b, row_number() over (partition by sum(a)) from t1 group by b;
+b row_number() over (partition by sum(a))
+1515 1
+1600 1
+2000 1
+select b, row_number() over (partition by sum(a)+1) from t1 group by b;
+b row_number() over (partition by sum(a)+1)
+1515 1
+1600 1
+2000 1
+drop table t1;
+#
+# MDEV-18015: Assertion `global_status_var.global_memory_used == 0' failed when using UDF,
+# window functions and views
+#
+create table t1 (id int, n1 int);
+insert into t1 values (1,1),(2,1),(3,2),(4,4);
+explain
+select max(n1) over (partition by 'abc') from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary
+select max(n1) over (partition by 'abc') from t1;
+max(n1) over (partition by 'abc')
+4
+4
+4
+4
+explain
+select rank() over (partition by 'abc' order by 'xyz') from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary
+select rank() over (partition by 'abc' order by 'xyz') from t1;
+rank() over (partition by 'abc' order by 'xyz')
+1
+1
+1
+1
+drop table t1;
+#
+# MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data
+#
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x;
+x
+foo
+drop table t1;
+#
+# MDEV-16579: Wrong result of query using DISTINCT COUNT(*) OVER (*)
+#
+CREATE TABLE t1 (i int) ;
+INSERT INTO t1 VALUES (1),(0),(1),(2),(0),(1),(2),(1),(2);
+SELECT DISTINCT COUNT(*) OVER (), MOD(MIN(i),2) FROM t1 GROUP BY i ;
+COUNT(*) OVER () MOD(MIN(i),2)
+3 0
+3 1
+drop table t1;
+#
+# MDEV-21318: Wrong results with window functions and implicit grouping
+#
+CREATE TABLE t1 (a INT);
+#
+# With empty const table
+# The expected result here is 1, NULL
+#
+explain
+SELECT row_number() over(), sum(1) FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found; Using temporary
+SELECT row_number() over(), sum(1) FROM t1;
+row_number() over() sum(1)
+1 NULL
+insert into t1 values (2);
+#
+# Const table has 1 row, but still impossible where
+# The expected result here is 1, NULL
+#
+EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+SELECT row_number() over(), sum(1) FROM t1 where a=1;
+row_number() over() sum(1)
+1 NULL
+#
+# Impossible HAVING
+# Empty result is expected
+#
+EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
+SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0;
+row_number() over() sum(1)
+#
+# const table has 1 row, no impossible where
+# The expected result here is 1, 2
+#
+EXPLAIN SELECT row_number() over(), sum(a) FROM t1 where a=2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary
+SELECT row_number() over(), sum(a) FROM t1 where a=2;
+row_number() over() sum(a)
+1 2
+drop table t1;
+#
+# Impossible Where
+#
+create table t1(a int);
+insert into t1 values (1);
+#
+# Expected result is NULL, 0, NULL
+#
+EXPLAIN SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE;
+MAX(a) OVER () COUNT(a) abs(a)
+NULL 0 NULL
+#
+# Expected result is 1, 0, NULL
+#
+EXPLAIN
+SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE;
+MAX(1) OVER () COUNT(a) abs(a)
+1 0 NULL
+drop table t1;
+#
+# MDEV-22461: JOIN::make_aggr_tables_info(): Assertion `select_options & (1ULL << 17)' failed.
+#
+CREATE TEMPORARY TABLE t0 (a INT PRIMARY KEY ) ;
+INSERT INTO t0 VALUES (1),(2),(3);
+SELECT a FROM t0
+WHERE a < 8
+GROUP BY 1.5
+WINDOW v2 AS ( PARTITION BY a ORDER BY a DESC );
+a
+1
+SELECT a, ROW_NUMBER() OVER v2
+FROM t0
+WHERE a < 8
+GROUP BY 1.5
+WINDOW v2 AS ( PARTITION BY a ORDER BY a DESC );
+a ROW_NUMBER() OVER v2
+1 1
+drop table t0;
+#
+# MDEV-16230:Server crashes when Analyze format=json is run with a window function with
+# empty PARTITION BY and ORDER BY clauses
+#
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
+ANALYZE FORMAT=JSON SELECT row_number() OVER() FROM t1;
+ANALYZE
+{
+ "query_block": {
+ "select_id": 1,
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "window_functions_computation": {
+ "sorts": {
+ "filesort": {
+ "sort_key": "`row_number() OVER()`",
+ "r_loops": 1,
+ "r_total_time_ms": "REPLACED",
+ "r_used_priority_queue": false,
+ "r_output_rows": 3,
+ "r_buffer_size": "REPLACED"
+ }
+ },
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "r_loops": 1,
+ "rows": 3,
+ "r_rows": 3,
+ "r_total_time_ms": "REPLACED",
+ "filtered": 100,
+ "r_filtered": 100
+ }
+ }
+ }
+ }
+}
+SELECT row_number() OVER() FROM t1;
+row_number() OVER()
+1
+2
+3
+DROP TABLE t1;
+#
+# MDEV-22984: Throw an error when arguments to window functions are window functions
+#
+CREATE TABLE t1(a INT, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
+SELECT NTILE(MAX(a) OVER (PARTITION BY a)) OVER (PARTITION BY a ORDER BY b) FROM t1;
+ERROR HY000: Window functions can not be used as arguments to group functions.
+SELECT FIRST_VALUE(MAX(a) OVER (PARTITION BY a)) OVER (ORDER BY a) AS x FROM t1 GROUP BY a;
+ERROR HY000: Window functions can not be used as arguments to group functions.
+DROP TABLE t1;
+#
+# MDEV-12059: Assertion `precision > 0' failed with a window function or window aggregate function
+#
+CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED);
+INSERT INTO t1 VALUES (1),(2);
+SELECT MIN(d) OVER () FROM t1;
+MIN(d) OVER ()
+1
+1
+DROP TABLE t1;
+#
+# MDEV-22463: Element_type &Bounds_checked_array<Item *>::operator[](size_t) [Element_type = Item *]:
+# Assertion `n < m_size' failed
+#
+CREATE TABLE t1 (a INT, b INT, c INT, d INT, e INT, f INT, g int, h INT, i INT);
+INSERT INTO t1 SELECT seq,seq,seq,seq, seq,seq,seq,seq,seq FROM seq_1_to_5;
+SELECT ROW_NUMBER() OVER w2 FROM t1 WINDOW w2 AS (PARTITION BY -1,0,1,2,3,4,5,6);
+ROW_NUMBER() OVER w2
+1
+2
+3
+4
+5
+SELECT a FROM t1 ORDER BY ROW_NUMBER() OVER (PARTITION BY -1,1,0,2,3,4,5,6,7,8);
+a
+1
+2
+3
+4
+5
+SELECT a,b FROM t1 WINDOW w2 AS (PARTITION BY -1,1,0,2,3,4);
+a b
+1 1
+2 2
+3 3
+4 4
+5 5
+SELECT ROW_NUMBER() OVER w2 FROM t1 WINDOW w2 AS (PARTITION BY -1,0,1,2,3,4,5,6);
+ROW_NUMBER() OVER w2
+1
+2
+3
+4
+5
+DROP TABLE t1;
+#
+# MDEV-18916: crash in Window_spec::print_partition() with decimals
+#
+SELECT cast((rank() over w1) as decimal (53,56));
+ERROR 42000: Too big scale 56 specified for 'rank() over w1'. Maximum is 38
+SELECT cast((rank() over w1) as decimal (53,30));
+ERROR HY000: Window specification with name 'w1' is not defined
+#
+# MDEV-15180: server crashed with NTH_VALUE()
+#
+CREATE TABLE t1 (i1 int, a int);
+INSERT INTO t1 VALUES (1, 1), (2, 2),(3, 3);
+CREATE TABLE t2 (i2 int);
+INSERT INTO t2 VALUES (1),(2),(5),(1),(7),(4),(3);
+CREATE VIEW v1 AS (SELECT * FROM t1,t2 WHERE t1.i1=t2.i2) ;
+SELECT NTH_VALUE(i1, i1) OVER (PARTITION BY i1) FROM v1;
+NTH_VALUE(i1, i1) OVER (PARTITION BY i1)
+1
+1
+NULL
+NULL
+DROP VIEW v1;
+DROP TABLE t1,t2;
+#
+# End of 10.2 tests
+#
+#
+# MDEV-16489 when lead() returns null on a datetime field, the result is treated as the literal string '[NULL]'
+#
+CREATE TABLE t1 (d datetime);
+INSERT INTO t1 VALUES ('2018-01-01 00:00:00'),('2018-02-01 00:00:00');
+SELECT *, LEAD(d) OVER (ORDER BY d) AS x FROM t1;
+d x
+2018-01-01 00:00:00 2018-02-01 00:00:00
+2018-02-01 00:00:00 NULL
+DROP TABLE t1;
+CREATE TABLE t1 (d time);
+INSERT INTO t1 VALUES ('00:00:01'),('00:00:02');
+SELECT *, LEAD(d) OVER (ORDER BY d) AS x FROM t1;
+d x
+00:00:01 00:00:02
+00:00:02 NULL
+DROP TABLE t1;
+#
+# MDEV-20351 Window function BIT_OR() OVER (..) return a wrong data type
+#
+CREATE TABLE t1 (pk INT, a INT, b BIGINT UNSIGNED);
+INSERT INTO t1 VALUES (1, 0, 1), (2, 0, 18446744073709551615);
+CREATE TABLE t2 AS
+SELECT pk, a, bit_or(b) AS bit_or FROM t1 GROUP BY pk;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `pk` int(11) DEFAULT NULL,
+ `a` int(11) DEFAULT NULL,
+ `bit_or` bigint(21) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t1;
+pk a b
+1 0 1
+2 0 18446744073709551615
+DROP TABLE t2;
+CREATE OR REPLACE TABLE t2 AS
+SELECT pk, a, BIT_OR(b) OVER (PARTITION BY a ORDER BY pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS bit_or
+FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `pk` int(11) DEFAULT NULL,
+ `a` int(11) DEFAULT NULL,
+ `bit_or` bigint(21) unsigned NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+pk a bit_or
+1 0 18446744073709551615
+2 0 18446744073709551615
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# End of 10.3 tests
+#
+#
+# MDEV-23867: select crash in compute_window_func
+#
+set @save_sort_buffer_size=@@sort_buffer_size;
+set sort_buffer_size= 2000;
+CREATE TABLE t1( a INT, b INT, c INT);
+INSERT INTO t1 select seq, seq, seq from seq_1_to_5000;
+CREATE TABLE t2( a INT, b INT, c INT);
+INSERT INTO t2 SELECT a, b, ROW_NUMBER() OVER (PARTITION BY b) FROM t1;
+SELECT COUNT(*), MAX(c) FROM t2;
+COUNT(*) MAX(c)
+5000 1
+CREATE TABLE t3( a INT, b INT, c INT);
+INSERT INTO t3 SELECT a, b, SUM(a) OVER () FROM t1;
+SELECT COUNT(*), MAX(c) FROM t3;
+COUNT(*) MAX(c)
+5000 12502500
+set @@sort_buffer_size=@save_sort_buffer_size;
+DROP TABLE t1,t2,t3;
+# end of 10.2 test
diff --git a/mysql-test/suite/encryption/t/tempfiles_encrypted.opt b/mysql-test/suite/encryption/t/tempfiles_encrypted.opt
new file mode 100644
index 00000000000..81877a8d1c5
--- /dev/null
+++ b/mysql-test/suite/encryption/t/tempfiles_encrypted.opt
@@ -0,0 +1 @@
+--encrypt-tmp_files=ON
diff --git a/mysql-test/suite/encryption/t/tempfiles_encrypted.test b/mysql-test/suite/encryption/t/tempfiles_encrypted.test
new file mode 100644
index 00000000000..962893df3f9
--- /dev/null
+++ b/mysql-test/suite/encryption/t/tempfiles_encrypted.test
@@ -0,0 +1,31 @@
+--echo #
+--echo # Tests when the temporary files are encrypted
+--echo #
+
+source include/have_file_key_management_plugin.inc;
+source include/have_sequence.inc;
+source include/have_innodb.inc;
+
+select @@encrypt_tmp_files;
+
+--source main/win.test
+
+--echo #
+--echo # MDEV-23867: select crash in compute_window_func
+--echo #
+
+set @save_sort_buffer_size=@@sort_buffer_size;
+
+set sort_buffer_size= 2000;
+CREATE TABLE t1( a INT, b INT, c INT);
+INSERT INTO t1 select seq, seq, seq from seq_1_to_5000;
+CREATE TABLE t2( a INT, b INT, c INT);
+INSERT INTO t2 SELECT a, b, ROW_NUMBER() OVER (PARTITION BY b) FROM t1;
+SELECT COUNT(*), MAX(c) FROM t2;
+CREATE TABLE t3( a INT, b INT, c INT);
+INSERT INTO t3 SELECT a, b, SUM(a) OVER () FROM t1;
+SELECT COUNT(*), MAX(c) FROM t3;
+set @@sort_buffer_size=@save_sort_buffer_size;
+DROP TABLE t1,t2,t3;
+
+--echo # end of 10.2 test
diff --git a/mysql-test/suite/galera/r/MDEV-22707.result b/mysql-test/suite/galera/r/MDEV-22707.result
new file mode 100644
index 00000000000..a74844d7e12
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-22707.result
@@ -0,0 +1,26 @@
+CREATE TABLE t1(f2 INT) ENGINE=InnoDB;
+connect node_1_applier_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
+connection node_2;
+SET SESSION wsrep_sync_wait = 0;
+INSERT INTO t1 (f2) VALUES (2);
+connection node_1_applier_thd;
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+connection node_1;
+SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR continue';
+INSERT INTO t1 (f2) VALUES (1);
+connect node_1_flush_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET DEBUG_SYNC="now WAIT_FOR wsrep_before_replication_reached";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_before_mdl_wait";
+FLUSH TABLES;
+connect node_1_sync_release_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET GLOBAL debug_dbug = "";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET DEBUG_SYNC = "now SIGNAL continue";
+SET DEBUG_SYNC = "RESET";
+connection node_1;
+connection node_1_flush_thd;
+connection node_2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MDEV-22707.test b/mysql-test/suite/galera/t/MDEV-22707.test
new file mode 100644
index 00000000000..19755f7c5ac
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-22707.test
@@ -0,0 +1,51 @@
+#
+# MDEV-22707 galera got stuck after flush tables
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+CREATE TABLE t1(f2 INT) ENGINE=InnoDB;
+
+--connect node_1_applier_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
+
+--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+--send INSERT INTO t1 (f2) VALUES (2)
+
+--connection node_1_applier_thd
+# Wait for `sync.wsrep_apply_cb_reached` signal
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+SET DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR continue';
+--send INSERT INTO t1 (f2) VALUES (1)
+
+--connect node_1_flush_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET DEBUG_SYNC="now WAIT_FOR wsrep_before_replication_reached";
+SET GLOBAL debug_dbug = "+d,sync.wsrep_before_mdl_wait";
+--send FLUSH TABLES
+
+--connect node_1_sync_release_thd, 127.0.0.1, root, , test, $NODE_MYPORT_1
+# First clear all DBUG points
+SET GLOBAL debug_dbug = "";
+# Now signal threads to continue execution
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
+SET DEBUG_SYNC = "now SIGNAL continue";
+SET DEBUG_SYNC = "RESET";
+
+--connection node_1
+--reap
+
+--connection node_1_flush_thd
+--reap
+
+--connection node_2
+--reap
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/include/wait_all_purged.inc b/mysql-test/suite/innodb/include/wait_all_purged.inc
index 992e14f0843..e3a506c7622 100644
--- a/mysql-test/suite/innodb/include/wait_all_purged.inc
+++ b/mysql-test/suite/innodb/include/wait_all_purged.inc
@@ -1,25 +1,17 @@
# Wait for everything to be purged.
# The user should have set innodb_purge_rseg_truncate_frequency=1.
+--disable_query_log
if (!$wait_all_purged)
{
- let $wait_all_purged= 0;
+ SET GLOBAL innodb_max_purge_lag_wait= 0;
}
-let $remaining_expect= `select concat('InnoDB ',$wait_all_purged)`;
-
-let $wait_counter= 600;
-while ($wait_counter)
+if ($wait_all_purged)
{
- --replace_regex /.*History list length ([0-9]+).*/\1/
- let $remaining= `SHOW ENGINE INNODB STATUS`;
- if ($remaining == $remaining_expect)
- {
- let $wait_counter= 0;
- }
- if ($wait_counter)
- {
- real_sleep 0.1;
- dec $wait_counter;
- }
+ eval SET GLOBAL innodb_max_purge_lag_wait= $wait_all_purged;
}
+--enable_query_log
+
+--replace_regex /.*History list length ([0-9]+).*/\1/
+let $remaining= `SHOW ENGINE INNODB STATUS`;
echo $remaining transactions not purged;
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
index 4b2df7eb287..484c9b30bd6 100644
--- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
@@ -34,7 +34,7 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed' else 'Not Completed' end) VIRTUAL,
+ `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed' else 'Not Completed' end) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
@@ -142,14 +142,14 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed' else 'Not Completed' end) VIRTUAL,
- `ofis_deg_status2` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress2' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed2' else 'Not Completed2' end) VIRTUAL,
- `ofis_deg_status3` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress3' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed3' else 'Not Completed3' end) VIRTUAL,
- `ofis_deg_status4` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress4' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed4' else 'Not Completed4' end) VIRTUAL,
- `ofis_deg_status5` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress5' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed5' else 'Not Completed5' end) VIRTUAL,
- `ofis_deg_status6` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress6' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed6' else 'Not Completed6' end) VIRTUAL,
- `ofis_deg_status7` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress7' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed7' else 'Not Completed7' end) VIRTUAL,
- `ofis_deg_status8` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress8' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed8' else 'Not Completed8' end) VIRTUAL,
+ `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed' else 'Not Completed' end) VIRTUAL,
+ `ofis_deg_status2` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress2' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed2' else 'Not Completed2' end) VIRTUAL,
+ `ofis_deg_status3` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress3' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed3' else 'Not Completed3' end) VIRTUAL,
+ `ofis_deg_status4` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress4' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed4' else 'Not Completed4' end) VIRTUAL,
+ `ofis_deg_status5` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress5' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed5' else 'Not Completed5' end) VIRTUAL,
+ `ofis_deg_status6` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress6' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed6' else 'Not Completed6' end) VIRTUAL,
+ `ofis_deg_status7` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress7' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed7' else 'Not Completed7' end) VIRTUAL,
+ `ofis_deg_status8` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress8' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed8' else 'Not Completed8' end) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
@@ -199,14 +199,14 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed' else 'Not Completed' end) VIRTUAL,
- `ofis_deg_status2` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress2' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed2' else 'Not Completed2' end) VIRTUAL,
- `ofis_deg_status3` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress3' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed3' else 'Not Completed3' end) VIRTUAL,
- `ofis_deg_status4` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress4' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed4' else 'Not Completed4' end) VIRTUAL,
- `ofis_deg_status5` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress5' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed5' else 'Not Completed5' end) VIRTUAL,
- `ofis_deg_status6` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress6' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed6' else 'Not Completed6' end) VIRTUAL,
- `ofis_deg_status7` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress7' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed7' else 'Not Completed7' end) VIRTUAL,
- `ofis_deg_status8` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress8' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed8' else 'Not Completed8' end) VIRTUAL,
+ `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed' else 'Not Completed' end) VIRTUAL,
+ `ofis_deg_status2` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress2' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed2' else 'Not Completed2' end) VIRTUAL,
+ `ofis_deg_status3` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress3' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed3' else 'Not Completed3' end) VIRTUAL,
+ `ofis_deg_status4` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress4' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed4' else 'Not Completed4' end) VIRTUAL,
+ `ofis_deg_status5` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress5' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed5' else 'Not Completed5' end) VIRTUAL,
+ `ofis_deg_status6` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress6' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed6' else 'Not Completed6' end) VIRTUAL,
+ `ofis_deg_status7` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress7' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed7' else 'Not Completed7' end) VIRTUAL,
+ `ofis_deg_status8` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress8' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed8' else 'Not Completed8' end) VIRTUAL,
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`),
KEY `grad_degree_as_of_term_ndx` (`deg_as_of_term`)
@@ -278,14 +278,14 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed' else 'Not Completed' end) VIRTUAL,
- `ofis_deg_status2` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress2' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed2' else 'Not Completed2' end) VIRTUAL,
- `ofis_deg_status3` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress3' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed3' else 'Not Completed3' end) VIRTUAL,
- `ofis_deg_status4` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress4' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed4' else 'Not Completed4' end) VIRTUAL,
- `ofis_deg_status5` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress5' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed5' else 'Not Completed5' end) VIRTUAL,
- `ofis_deg_status6` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress6' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed6' else 'Not Completed6' end) VIRTUAL,
- `ofis_deg_status7` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress7' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed7' else 'Not Completed7' end) VIRTUAL,
- `ofis_deg_status8` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress8' when (`wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC') then 'Completed8' else 'Not Completed8' end) VIRTUAL,
+ `ofis_deg_status` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed' else 'Not Completed' end) VIRTUAL,
+ `ofis_deg_status2` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress2' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed2' else 'Not Completed2' end) VIRTUAL,
+ `ofis_deg_status3` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress3' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed3' else 'Not Completed3' end) VIRTUAL,
+ `ofis_deg_status4` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress4' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed4' else 'Not Completed4' end) VIRTUAL,
+ `ofis_deg_status5` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress5' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed5' else 'Not Completed5' end) VIRTUAL,
+ `ofis_deg_status6` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress6' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed6' else 'Not Completed6' end) VIRTUAL,
+ `ofis_deg_status7` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress7' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed7' else 'Not Completed7' end) VIRTUAL,
+ `ofis_deg_status8` varchar(15) GENERATED ALWAYS AS (case when `wdraw_rsn` = '' then 'In progress8' when `wdraw_rsn` = 'DCMP' or `wdraw_rsn` = 'TRDC' then 'Completed8' else 'Not Completed8' end) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt
new file mode 100644
index 00000000000..1de4aa13350
--- /dev/null
+++ b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt
@@ -0,0 +1,7 @@
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--innodb-file-per-table
+--innodb-encryption-threads=4
+--innodb-encrypt-tables
+--innodb-encrypt-log
+--loose-file-key-management
+--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
new file mode 100644
index 00000000000..9349457ffbb
--- /dev/null
+++ b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.result
@@ -0,0 +1,26 @@
+SET @old_innodb_log_optimize_ddl=@@global.innodb_log_optimize_ddl;
+SET GLOBAL innodb_log_optimize_ddl=ON;
+SET @old_debug_dbug=@@global.debug_dbug;
+SET GLOBAL debug_dbug="+d,ib_log_checkpoint_avoid";
+SET @old_innodb_page_cleaner_disabled_debug=@@global.innodb_page_cleaner_disabled_debug;
+SET GLOBAL innodb_page_cleaner_disabled_debug=ON;
+CREATE TABLE t1 (c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+# backup
+SET GLOBAL debug_dbug="+d,ib_do_not_log_crypt_data";
+INSERT INTO t1 VALUES (2);
+# incremental backup
+# prepare
+# incremental prepare
+SET GLOBAL innodb_log_optimize_ddl=@old_innodb_log_optimize_ddl;
+SET GLOBAL innodb_page_cleaner_disabled_debug=@old_innodb_page_cleaner_disabled_debug;
+SET GLOBAL debug_dbug=@old_debug_dbug;
+# Restore and check results
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart server
+SELECT count(*) FROM t1;
+count(*)
+2
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/ddl_incremental_encrypted.test b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.test
new file mode 100644
index 00000000000..196201f61c7
--- /dev/null
+++ b/mysql-test/suite/mariabackup/ddl_incremental_encrypted.test
@@ -0,0 +1,66 @@
+#
+# If MDEV-20755 bug is no fixed, incremental prepare will fail.
+#
+--source include/have_debug.inc
+--source include/have_file_key_management.inc
+
+--let $base_dir=$MYSQLTEST_VARDIR/tmp/backup
+--let $inc_dir=$MYSQLTEST_VARDIR/tmp/backup_inc
+
+SET @old_innodb_log_optimize_ddl=@@global.innodb_log_optimize_ddl;
+SET GLOBAL innodb_log_optimize_ddl=ON;
+
+# Disable pages flushing to allow redo log records to be executed on --prepare.
+SET @old_debug_dbug=@@global.debug_dbug;
+SET GLOBAL debug_dbug="+d,ib_log_checkpoint_avoid";
+SET @old_innodb_page_cleaner_disabled_debug=@@global.innodb_page_cleaner_disabled_debug;
+SET GLOBAL innodb_page_cleaner_disabled_debug=ON;
+
+CREATE TABLE t1 (c INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+--echo # backup
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$base_dir
+--enable_result_log
+
+# Do not log crypt data to avoid it's execution on --prepare.
+SET GLOBAL debug_dbug="+d,ib_do_not_log_crypt_data";
+INSERT INTO t1 VALUES (2);
+
+--disable_result_log
+
+# Execute OPTIMIZE TABLE after the table is copied to execute optimized ddl
+# callback during backup, which, in turns, will create t1.new file in backup
+# directory.
+--let after_copy_test_t1=OPTIMIZE TABLE test.t1;
+
+--echo # incremental backup
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$inc_dir --incremental-basedir=$base_dir --dbug=+d,mariabackup_events
+
+--echo # prepare
+--exec $XTRABACKUP --prepare --target-dir=$base_dir
+
+# If the tablespace is created during delta tablespace open procedure, then
+# crypt data will be not written, and page corruption test will not pass
+# when some redo log event is executed, and --prepare will fail.
+--echo # incremental prepare
+--exec $XTRABACKUP --prepare --target-dir=$base_dir --incremental-dir=$inc_dir
+
+--enable_result_log
+
+SET GLOBAL innodb_log_optimize_ddl=@old_innodb_log_optimize_ddl;
+SET GLOBAL innodb_page_cleaner_disabled_debug=@old_innodb_page_cleaner_disabled_debug;
+SET GLOBAL debug_dbug=@old_debug_dbug;
+
+--echo # Restore and check results
+--let $targetdir=$base_dir
+--source include/restart_and_restore.inc
+--enable_result_log
+
+SELECT count(*) FROM t1;
+
+# Cleanup
+DROP TABLE t1;
+--rmdir $base_dir
+--rmdir $inc_dir
diff --git a/mysql-test/suite/mariabackup/mlog_index_load.result b/mysql-test/suite/mariabackup/mlog_index_load.result
index bc83981106e..8925e897399 100644
--- a/mysql-test/suite/mariabackup/mlog_index_load.result
+++ b/mysql-test/suite/mariabackup/mlog_index_load.result
@@ -1,5 +1,6 @@
CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
INSERT INTO t1(a) SELECT * from seq_1_to_10000;
+SET GLOBAL innodb_log_optimize_ddl=ON;
# xtrabackup backup
t1.frm
t1.ibd
diff --git a/mysql-test/suite/mariabackup/mlog_index_load.test b/mysql-test/suite/mariabackup/mlog_index_load.test
index fb29041fd3c..b9fd6f8ca32 100644
--- a/mysql-test/suite/mariabackup/mlog_index_load.test
+++ b/mysql-test/suite/mariabackup/mlog_index_load.test
@@ -2,6 +2,7 @@
CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
INSERT INTO t1(a) SELECT * from seq_1_to_10000;
+SET GLOBAL innodb_log_optimize_ddl=ON;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
diff --git a/mysql-test/suite/roles/set_default_role_clear.result b/mysql-test/suite/roles/set_default_role_clear.result
index 56e9662154c..05d52b6d58a 100644
--- a/mysql-test/suite/roles/set_default_role_clear.result
+++ b/mysql-test/suite/roles/set_default_role_clear.result
@@ -17,6 +17,7 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
+SET DEFAULT ROLE test_role FOR 'test_user'@'localhost'
select user, host, default_role from mysql.user where user='test_user';
user host default_role
test_user localhost test_role
diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result
index a3cd896ee84..b67b30ee075 100644
--- a/mysql-test/suite/roles/set_default_role_for.result
+++ b/mysql-test/suite/roles/set_default_role_for.result
@@ -21,6 +21,7 @@ Grants for user_a@localhost
GRANT `role_a` TO `user_a`@`localhost`
GRANT USAGE ON *.* TO `user_a`@`localhost`
GRANT SELECT ON *.* TO `role_a`
+SET DEFAULT ROLE role_a FOR 'user_a'@'localhost'
select user, host, default_role from mysql.user where user like 'user_%';
user host default_role
user_a localhost role_a
@@ -42,6 +43,7 @@ Grants for user_b@localhost
GRANT `role_b` TO `user_b`@`localhost`
GRANT USAGE ON *.* TO `user_b`@`localhost`
GRANT INSERT, UPDATE ON *.* TO `role_b`
+SET DEFAULT ROLE role_b FOR 'user_b'@'localhost'
select user, host, default_role from mysql.user where user like 'user_%';
ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user'
insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
diff --git a/mysql-test/suite/roles/set_default_role_invalid.result b/mysql-test/suite/roles/set_default_role_invalid.result
index 9ebe3069b4c..4417ef21f21 100644
--- a/mysql-test/suite/roles/set_default_role_invalid.result
+++ b/mysql-test/suite/roles/set_default_role_invalid.result
@@ -24,6 +24,7 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
+SET DEFAULT ROLE test_role FOR 'test_user'@'localhost'
select user, host, default_role from mysql.user where user='test_user';
user host default_role
test_user localhost test_role
@@ -71,6 +72,7 @@ GRANT `r1` TO `b`@`%`
GRANT `r2` TO `b`@`%`
GRANT USAGE ON *.* TO `b`@`%`
GRANT SELECT ON `mysql`.* TO `b`@`%`
+SET DEFAULT ROLE r2 FOR 'b'@'%'
SET DEFAULT ROLE r1 FOR a;
ERROR 42000: Access denied for user 'b'@'%' to database 'mysql'
SELECT CURRENT_ROLE;
@@ -96,6 +98,7 @@ GRANT `r1` TO `b`@`%`
GRANT `r2` TO `b`@`%`
GRANT USAGE ON *.* TO `b`@`%`
GRANT SELECT, UPDATE ON `mysql`.* TO `b`@`%`
+SET DEFAULT ROLE r2 FOR 'b'@'%'
SET DEFAULT ROLE r1 FOR a;
ERROR OP000: User `a@%` has not been granted role `r1`
SET DEFAULT ROLE invalid_role;
diff --git a/mysql-test/suite/roles/set_default_role_new_connection.result b/mysql-test/suite/roles/set_default_role_new_connection.result
index 03575e8aa8a..eaa42193d6e 100644
--- a/mysql-test/suite/roles/set_default_role_new_connection.result
+++ b/mysql-test/suite/roles/set_default_role_new_connection.result
@@ -23,6 +23,7 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
+SET DEFAULT ROLE test_role FOR 'test_user'@'localhost'
select user, host, default_role from mysql.user where user = 'test_user';
user host default_role
test_user localhost test_role
@@ -51,6 +52,7 @@ Grants for test_user@localhost
GRANT `test_role` TO `test_user`@`localhost`
GRANT USAGE ON *.* TO `test_user`@`localhost`
GRANT SELECT ON *.* TO `test_role`
+SET DEFAULT ROLE test_role FOR 'test_user'@'localhost'
select user, host, default_role from mysql.user where user = 'test_user';
user host default_role
test_user localhost test_role
diff --git a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
index 90d2fec3d0a..377b50e4481 100644
--- a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
+++ b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
@@ -153,6 +153,8 @@ SELECT @@session.session_track_system_variables;
@@session.session_track_system_variables
+# MDEV-22524 SIGABRT in safe_mutex_unlock with session_track_system_variables and max_relay_log_size.
+SET SESSION session_track_system_variables="sql_slave_skip_counter", sql_slave_skip_counter= 0;
# Restoring the original values.
SET @@global.session_track_system_variables = @global_saved_tmp;
# End of tests.
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 2bd2920ff9d..b43e9f1adc0 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -1307,10 +1307,10 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_OPTIMIZE_DDL
SESSION_VALUE NULL
-DEFAULT_VALUE ON
+DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Reduce redo logging when natively creating indexes or rebuilding tables. Setting this OFF avoids delay due to page flushing and allows concurrent backup.
+VARIABLE_COMMENT DEPRECATED. Ignored in MariaDB 10.5. Reduce redo logging when natively creating indexes or rebuilding tables. Enabling this may slow down backup and cause delay due to page flushing.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -1401,6 +1401,18 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_PURGE_LAG_WAIT
+SESSION_VALUE NULL
+DEFAULT_VALUE 4294967295
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Wait until History list length is below the specified limit
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_UNDO_LOG_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 10485760
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 0cbf4a9a2b2..fbf6e37e715 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -2267,7 +2267,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
-NUMERIC_MAX_VALUE 200
+NUMERIC_MAX_VALUE 1048576
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index f65be0f3159..9dee77a9110 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -2417,7 +2417,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
-NUMERIC_MAX_VALUE 200
+NUMERIC_MAX_VALUE 1048576
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
diff --git a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
index 2cb51e3e968..ceb2353d823 100644
--- a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
+++ b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
@@ -119,6 +119,8 @@ SELECT @@global.session_track_system_variables;
SELECT @@session.session_track_system_variables;
--echo
+--echo # MDEV-22524 SIGABRT in safe_mutex_unlock with session_track_system_variables and max_relay_log_size.
+SET SESSION session_track_system_variables="sql_slave_skip_counter", sql_slave_skip_counter= 0;
--echo # Restoring the original values.
SET @@global.session_track_system_variables = @global_saved_tmp;