From 21ea14db8cc8c5d88ff804650de7caf984d08a98 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 22 Oct 2020 15:51:14 +0400 Subject: MDEV-20593 SIGSEGV in report_json_error_ex (on optimized builds). When first argument to the JSON_MERGE_PATCH was NULL and second - the invalid JSON line, the error code was garbage. So it should be set to 0 initially. --- mysql-test/r/func_json.result | 5 +++++ mysql-test/t/func_json.test | 1 + 2 files changed, 6 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result index caf46eb5145..8f014c89733 100644 --- a/mysql-test/r/func_json.result +++ b/mysql-test/r/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/t/func_json.test b/mysql-test/t/func_json.test index c9adbd945b1..805e9954b81 100644 --- a/mysql-test/t/func_json.test +++ b/mysql-test/t/func_json.test @@ -531,6 +531,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 -- cgit v1.2.1 From 54c521ca338322ea08a6aba583be3b99649fb666 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Thu, 22 Oct 2020 16:49:57 +0300 Subject: MDEV-23672: incorrect v_indexes access fix v_indexes was wrongly copied from the source table. --- mysql-test/suite/innodb/t/instant_alter_bugs.test | 4 ---- 1 file changed, 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test index eb2198e2a96..cdfe6472c06 100644 --- a/mysql-test/suite/innodb/t/instant_alter_bugs.test +++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test @@ -446,10 +446,6 @@ create table t1 ( col_text_g text generated always as (substr(col_text,1,499)) ) engine innodb row_format = redundant; insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b'); -# FIXME: remove the following to trigger the bug ---disable_query_log -alter table t1 modify column col_text text null, force; ---enable_query_log alter table t1 modify column col_text text null, algorithm = instant; insert into t1 (col_int,col_text) values (1, null), (null, null); update t1 set col_text= 'd'; -- cgit v1.2.1 From cc1646dae821a136c8368ee84954aac9937abdd4 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 22 Oct 2020 14:00:17 +0400 Subject: MDEV-19443 server_audit plugin doesn't log proxy users. PROXY_USER event added. --- mysql-test/suite/plugins/r/server_audit.result | 55 ++++++++++++++++++++++++++ mysql-test/suite/plugins/t/server_audit.test | 21 +++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index 89f1c69a746..7c287b369b1 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -227,6 +227,21 @@ set global server_audit_logging= on; disconnect cn1; drop user user1@localhost; set global server_audit_events=''; +CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; +CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; +connect(localhost,plug,plug_dest,test,MYSQL_PORT,MYSQL_SOCK); +connect plug_con,localhost,plug,plug_dest; +ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES) +GRANT PROXY ON plug_dest TO plug; +connect plug_con,localhost,plug,plug_dest; +connection plug_con; +select USER(),CURRENT_USER(); +USER() CURRENT_USER() +plug@localhost plug_dest@% +connection default; +disconnect plug_con; +DROP USER plug; +DROP USER plug_dest; set global server_audit_query_log_limit= 15; select (1), (2), (3), (4); 1 2 3 4 @@ -404,6 +419,46 @@ TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug IDENTIFIED WITH \'test_plugin_server\' AS \'plug_dest\'',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug_dest IDENTIFIED BY *****',0 +TIME,HOSTNAME,plug,localhost,ID,0,FAILED_CONNECT,,,ID +TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0 +TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0 +TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0 +TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug_dest',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select \'A\', ',0 diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 7f1653ee444..397dd554962 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -1,4 +1,4 @@ - +--source include/have_plugin_auth.inc --source include/not_embedded.inc if (!$SERVER_AUDIT_SO) { @@ -174,6 +174,25 @@ drop user user1@localhost; set global server_audit_events=''; +CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; +CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; +--sleep 2 +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +--error ER_ACCESS_DENIED_ERROR : this should fail : no grant +connect(plug_con,localhost,plug,plug_dest); +--sleep 2 +GRANT PROXY ON plug_dest TO plug; +--sleep 2 +connect(plug_con,localhost,plug,plug_dest); +connection plug_con; +select USER(),CURRENT_USER(); +connection default; +disconnect plug_con; +--sleep 2 +--sleep 2 +DROP USER plug; +DROP USER plug_dest; + set global server_audit_query_log_limit= 15; select (1), (2), (3), (4); select 'A', 'B', 'C', 'D'; -- cgit v1.2.1 From 81870e499ff14afacc7e9cabde65a626165f209f Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Mon, 31 Aug 2020 16:36:32 +0200 Subject: MDEV-21786 mysqldump will forget sequence definition details on --no-data dump - Original patch was contributed by Jani Tolonen https://github.com/an3l/server/commits/bb-10.3-anel-MDEV-21786-dump-sequence which distinguishes data structure (linked list) of sequences from tables. - Added standard sql output to prevent future changes of sequences and disabled locks for sequences. - Added test case for `MDEV-20070: mysqldump won't work correct on sequences` where table column depends on sequence value. - Restore sequence last value in the following way: - Find `next_not_cached_value` and use it to `setval()` - We just need for logical restore, so don't execute `setval()` - `setval()` should be showed also in case of `--no-data` option. Reviewed-by: daniel@mariadb.org --- mysql-test/main/mysqldump.result | 118 +++++++++++++++++++++++++ mysql-test/main/mysqldump.test | 83 +++++++++++++++++ mysql-test/suite/sql_sequence/mysqldump.result | 32 +------ 3 files changed, 205 insertions(+), 28 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index 5f3f0d89593..622ef745859 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -5904,4 +5904,122 @@ invisible int(11) YES NULL a b c & $!@#$%^&*( ) int(11) YES 4 INVISIBLE ds=~!@ \# $% ^ & * ( ) _ - = + int(11) YES 5 INVISIBLE drop database d; +# +# MDEV-21786: +# mysqldump will forget sequence definition details on --no-data dump +# +create database d; +CREATE SEQUENCE d.s1 START WITH 100 INCREMENT BY 10 MINVALUE=100 MAXVALUE=1100 CYCLE; +CREATE SEQUENCE d.s2 START WITH 200 INCREMENT BY 20 MINVALUE=200 MAXVALUE=1200 CYCLE; +CREATE SEQUENCE d.s3 START WITH 300 INCREMENT BY 30 MINVALUE=300 MAXVALUE=1300 CYCLE; +CREATE SEQUENCE d.s4 START WITH 400 INCREMENT BY 40 MINVALUE=400 MAXVALUE=1400 CYCLE; +SELECT NEXTVAL(d.s1),NEXTVAL(d.s2),NEXTVAL(d.s3), NEXTVAL(d.s4); +NEXTVAL(d.s1) NEXTVAL(d.s2) NEXTVAL(d.s3) NEXTVAL(d.s4) +100 200 300 400 +# Show create before dump +show create sequence d.s1; +Table Create Table +s1 CREATE SEQUENCE `s1` start with 100 minvalue 100 maxvalue 1100 increment by 10 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s2; +Table Create Table +s2 CREATE SEQUENCE `s2` start with 200 minvalue 200 maxvalue 1200 increment by 20 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s3; +Table Create Table +s3 CREATE SEQUENCE `s3` start with 300 minvalue 300 maxvalue 1300 increment by 30 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s4; +Table Create Table +s4 CREATE SEQUENCE `s4` start with 400 minvalue 400 maxvalue 1400 increment by 40 cache 1000 cycle ENGINE=MyISAM +# Dump sequence without `--no-data` +# Restore from mysqldump +SETVAL(`s1`, 1101, 0) +1101 +SETVAL(`s2`, 1201, 0) +1201 +SETVAL(`s3`, 1301, 0) +1301 +SETVAL(`s4`, 1401, 0) +1401 +# Show create after restore +show create sequence d.s1; +Table Create Table +s1 CREATE SEQUENCE `s1` start with 100 minvalue 100 maxvalue 1100 increment by 10 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s2; +Table Create Table +s2 CREATE SEQUENCE `s2` start with 200 minvalue 200 maxvalue 1200 increment by 20 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s3; +Table Create Table +s3 CREATE SEQUENCE `s3` start with 300 minvalue 300 maxvalue 1300 increment by 30 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s4; +Table Create Table +s4 CREATE SEQUENCE `s4` start with 400 minvalue 400 maxvalue 1400 increment by 40 cache 1000 cycle ENGINE=MyISAM +SELECT NEXTVAL(d.s1),NEXTVAL(d.s2),NEXTVAL(d.s3), NEXTVAL(d.s4); +NEXTVAL(d.s1) NEXTVAL(d.s2) NEXTVAL(d.s3) NEXTVAL(d.s4) +100 200 300 400 +# Dump sequence with `--no-data` +# Restore from mysqldump +SETVAL(`s1`, 1101, 0) +1101 +SETVAL(`s2`, 1201, 0) +1201 +SETVAL(`s3`, 1301, 0) +1301 +SETVAL(`s4`, 1401, 0) +1401 +# Show create after restore `--no-data` +show create sequence d.s1; +Table Create Table +s1 CREATE SEQUENCE `s1` start with 100 minvalue 100 maxvalue 1100 increment by 10 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s2; +Table Create Table +s2 CREATE SEQUENCE `s2` start with 200 minvalue 200 maxvalue 1200 increment by 20 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s3; +Table Create Table +s3 CREATE SEQUENCE `s3` start with 300 minvalue 300 maxvalue 1300 increment by 30 cache 1000 cycle ENGINE=MyISAM +show create sequence d.s4; +Table Create Table +s4 CREATE SEQUENCE `s4` start with 400 minvalue 400 maxvalue 1400 increment by 40 cache 1000 cycle ENGINE=MyISAM +SELECT NEXTVAL(d.s1),NEXTVAL(d.s2),NEXTVAL(d.s3), NEXTVAL(d.s4); +NEXTVAL(d.s1) NEXTVAL(d.s2) NEXTVAL(d.s3) NEXTVAL(d.s4) +100 200 300 400 +# Restore to different database than original +create database d2; +SETVAL(`s1`, 1101, 0) +1101 +SETVAL(`s2`, 1201, 0) +1201 +SETVAL(`s3`, 1301, 0) +1301 +SETVAL(`s4`, 1401, 0) +1401 +show create sequence d2.s1; +Table Create Table +s1 CREATE SEQUENCE `s1` start with 100 minvalue 100 maxvalue 1100 increment by 10 cache 1000 cycle ENGINE=MyISAM +drop sequence d.s1, d.s2, d.s3, d.s4; +drop database d; +drop database d2; +# +# MDEV-20070 +# mysqldump won't work correct on sequences +# +DROP DATABASE IF EXISTS test1; +Warnings: +Note 1008 Can't drop database 'test1'; database doesn't exist +DROP DATABASE IF EXISTS test2; +Warnings: +Note 1008 Can't drop database 'test2'; database doesn't exist +CREATE DATABASE test1; +CREATE DATABASE test2; +USE test1; +CREATE SEQUENCE seq_t_i INCREMENT 5 START WITH 1; +CREATE TABLE t( +i integer DEFAULT nextval(seq_t_i), +j integer +); +INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4); +# Dump database 1 +# Restore from database 1 to database 2 +SETVAL(`seq_t_i`, 1, 0) +1 +DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; # End of 10.3 tests diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test index 10dc9bf6d96..662ff077d91 100644 --- a/mysql-test/main/mysqldump.test +++ b/mysql-test/main/mysqldump.test @@ -2793,4 +2793,87 @@ select * from t3; desc t3; drop database d; +--echo # +--echo # MDEV-21786: +--echo # mysqldump will forget sequence definition details on --no-data dump +--echo # +create database d; + +CREATE SEQUENCE d.s1 START WITH 100 INCREMENT BY 10 MINVALUE=100 MAXVALUE=1100 CYCLE; +CREATE SEQUENCE d.s2 START WITH 200 INCREMENT BY 20 MINVALUE=200 MAXVALUE=1200 CYCLE; +CREATE SEQUENCE d.s3 START WITH 300 INCREMENT BY 30 MINVALUE=300 MAXVALUE=1300 CYCLE; +CREATE SEQUENCE d.s4 START WITH 400 INCREMENT BY 40 MINVALUE=400 MAXVALUE=1400 CYCLE; +SELECT NEXTVAL(d.s1),NEXTVAL(d.s2),NEXTVAL(d.s3), NEXTVAL(d.s4); + +--echo # Show create before dump +show create sequence d.s1; +show create sequence d.s2; +show create sequence d.s3; +show create sequence d.s4; + +--echo # Dump sequence without `--no-data` +--exec $MYSQL_DUMP --databases d > $MYSQLTEST_VARDIR/tmp/dump1.sql +--echo # Restore from mysqldump +--exec $MYSQL -Dd < $MYSQLTEST_VARDIR/tmp/dump1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/dump1.sql + +--echo # Show create after restore +show create sequence d.s1; +show create sequence d.s2; +show create sequence d.s3; +show create sequence d.s4; +SELECT NEXTVAL(d.s1),NEXTVAL(d.s2),NEXTVAL(d.s3), NEXTVAL(d.s4); + +--echo # Dump sequence with `--no-data` +--exec $MYSQL_DUMP --databases d --no-data > $MYSQLTEST_VARDIR/tmp/dump-no-data.sql +--echo # Restore from mysqldump +--exec $MYSQL -Dd < $MYSQLTEST_VARDIR/tmp/dump-no-data.sql +--remove_file $MYSQLTEST_VARDIR/tmp/dump-no-data.sql + +--echo # Show create after restore `--no-data` +show create sequence d.s1; +show create sequence d.s2; +show create sequence d.s3; +show create sequence d.s4; +SELECT NEXTVAL(d.s1),NEXTVAL(d.s2),NEXTVAL(d.s3), NEXTVAL(d.s4); + +--echo # Restore to different database than original +--exec $MYSQL_DUMP d > $MYSQLTEST_VARDIR/tmp/dumpd.sql +create database d2; +--exec $MYSQL d2 < $MYSQLTEST_VARDIR/tmp/dumpd.sql +--remove_file $MYSQLTEST_VARDIR/tmp/dumpd.sql +show create sequence d2.s1; + +drop sequence d.s1, d.s2, d.s3, d.s4; +drop database d; +drop database d2; + +--echo # +--echo # MDEV-20070 +--echo # mysqldump won't work correct on sequences +--echo # + +DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; +CREATE DATABASE test1; +CREATE DATABASE test2; +USE test1; +CREATE SEQUENCE seq_t_i INCREMENT 5 START WITH 1; +CREATE TABLE t( +i integer DEFAULT nextval(seq_t_i), +j integer +); +INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4); + +--echo # Dump database 1 +--exec $MYSQL_DUMP test1 > $MYSQLTEST_VARDIR/tmp/dumptest1.sql +--echo # Restore from database 1 to database 2 + +--error 1 +--exec $MYSQL test2 < $MYSQLTEST_VARDIR/tmp/dumptest1.sql + +--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql +DROP DATABASE IF EXISTS test1; +DROP DATABASE IF EXISTS test2; + --echo # End of 10.3 tests diff --git a/mysql-test/suite/sql_sequence/mysqldump.result b/mysql-test/suite/sql_sequence/mysqldump.result index 5a3711ebda3..e6aedb57ea6 100644 --- a/mysql-test/suite/sql_sequence/mysqldump.result +++ b/mysql-test/suite/sql_sequence/mysqldump.result @@ -2,20 +2,8 @@ CREATE SEQUENCE a1 engine=aria; CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024; insert into t1 values (1),(2); CREATE SEQUENCE x1 engine=innodb; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `a1` ( - `next_not_cached_value` bigint(21) NOT NULL, - `minimum_value` bigint(21) NOT NULL, - `maximum_value` bigint(21) NOT NULL, - `start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used', - `increment` bigint(21) NOT NULL COMMENT 'increment value', - `cache_size` bigint(21) unsigned NOT NULL, - `cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed', - `cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done' -) ENGINE=Aria SEQUENCE=1; -/*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `a1` VALUES (1,1,9223372036854775806,1,1,1000,0,0); +CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria; +SELECT SETVAL(`a1`, 1, 0); /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -24,20 +12,8 @@ CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1024; /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (1),(2); -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `x1` ( - `next_not_cached_value` bigint(21) NOT NULL, - `minimum_value` bigint(21) NOT NULL, - `maximum_value` bigint(21) NOT NULL, - `start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used', - `increment` bigint(21) NOT NULL COMMENT 'increment value', - `cache_size` bigint(21) unsigned NOT NULL, - `cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed', - `cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done' -) ENGINE=InnoDB SEQUENCE=1; -/*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `x1` VALUES (1,1,9223372036854775806,1,1,1000,0,0); +CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; +SELECT SETVAL(`x1`, 1, 0); DROP TABLE a1,t1,x1; set default_storage_engine=InnoDB; create sequence t1; -- cgit v1.2.1 From 985ede92034696d544d484a29b45828d56a031a5 Mon Sep 17 00:00:00 2001 From: Vlad Lesin Date: Tue, 20 Oct 2020 13:05:58 +0300 Subject: MDEV-20755 InnoDB: Database page corruption on disk or a failed file read of tablespace upon prepare of mariabackup incremental backup The problem: When incremental backup is taken, delta files are created for innodb tables which are marked as new tables during innodb ddl tracking. When such tablespace is tried to be opened during prepare in xb_delta_open_matching_space(), it is "created", i.e. xb_space_create_file() is invoked, instead of opening, even if a tablespace with the same name exists in the base backup directory. xb_space_create_file() writes page 0 header the tablespace. This header does not contain crypt data, as mariabackup does not have any information about crypt data in delta file metadata for tablespaces. After delta file is applied, recovery process is started. As the sequence of recovery for different pages is not defined, there can be the situation when crypt data redo log event is executed after some other page is read for recovery. When some page is read for recovery, it's decrypted using crypt data stored in tablespace header in page 0, if there is no crypt data, the page is not decryped and does not pass corruption test. This causes error for incremental backup --prepare for encrypted tablespaces. The error is not stable because crypt data redo log event updates crypt data on page 0, and recovery for different pages can be executed in undefined order. The fix: When delta file is created, the corresponding write filter copies only the pages which LSN is greater then some incremental LSN. When new file is created during incremental backup, the LSN of all it's pages must be greater then incremental LSN, so there is no need to create delta for such table, we can just copy it completely. The fix is to copy the whole file which was tracked during incremental backup with innodb ddl tracker, and copy it to base directory during --prepare instead of delta applying. There is also DBUG_EXECUTE_IF() in innodb code to avoid writing redo log record for crypt data updating on page 0 to make the test case stable. Note: The issue is not reproducible in 10.5 as optimized DDL's are deprecated in 10.5. But the fix is still useful because it allows to decrease data copy size during backup, as delta file contains some extra info. The test case should be removed for 10.5 as it will always pass. --- .../mariabackup/ddl_incremental_encrypted.opt | 7 +++ .../mariabackup/ddl_incremental_encrypted.result | 26 +++++++++ .../mariabackup/ddl_incremental_encrypted.test | 66 ++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 mysql-test/suite/mariabackup/ddl_incremental_encrypted.opt create mode 100644 mysql-test/suite/mariabackup/ddl_incremental_encrypted.result create mode 100644 mysql-test/suite/mariabackup/ddl_incremental_encrypted.test (limited to 'mysql-test') 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 -- cgit v1.2.1 From 5a9484b78438775f431601a1fc2b302e01e35882 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 22 Oct 2020 14:00:17 +0400 Subject: MDEV-19443 server_audit plugin doesn't log proxy users. PROXY_USER event added. Conflicts: plugin/server_audit/server_audit.c --- mysql-test/suite/plugins/r/server_audit.result | 55 ++++++++++++++++++++++++++ mysql-test/suite/plugins/t/server_audit.test | 21 +++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index 89f1c69a746..7c287b369b1 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -227,6 +227,21 @@ set global server_audit_logging= on; disconnect cn1; drop user user1@localhost; set global server_audit_events=''; +CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; +CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; +connect(localhost,plug,plug_dest,test,MYSQL_PORT,MYSQL_SOCK); +connect plug_con,localhost,plug,plug_dest; +ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES) +GRANT PROXY ON plug_dest TO plug; +connect plug_con,localhost,plug,plug_dest; +connection plug_con; +select USER(),CURRENT_USER(); +USER() CURRENT_USER() +plug@localhost plug_dest@% +connection default; +disconnect plug_con; +DROP USER plug; +DROP USER plug_dest; set global server_audit_query_log_limit= 15; select (1), (2), (3), (4); 1 2 3 4 @@ -404,6 +419,46 @@ TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug IDENTIFIED WITH \'test_plugin_server\' AS \'plug_dest\'',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug_dest IDENTIFIED BY *****',0 +TIME,HOSTNAME,plug,localhost,ID,0,FAILED_CONNECT,,,ID +TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0 +TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,test,`plug_dest`@`%`,0 +TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,test,,0 +TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,test,,0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, +TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug_dest',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select \'A\', ',0 diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 7f1653ee444..397dd554962 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -1,4 +1,4 @@ - +--source include/have_plugin_auth.inc --source include/not_embedded.inc if (!$SERVER_AUDIT_SO) { @@ -174,6 +174,25 @@ drop user user1@localhost; set global server_audit_events=''; +CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; +CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; +--sleep 2 +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +--error ER_ACCESS_DENIED_ERROR : this should fail : no grant +connect(plug_con,localhost,plug,plug_dest); +--sleep 2 +GRANT PROXY ON plug_dest TO plug; +--sleep 2 +connect(plug_con,localhost,plug,plug_dest); +connection plug_con; +select USER(),CURRENT_USER(); +connection default; +disconnect plug_con; +--sleep 2 +--sleep 2 +DROP USER plug; +DROP USER plug_dest; + set global server_audit_query_log_limit= 15; select (1), (2), (3), (4); select 'A', 'B', 'C', 'D'; -- cgit v1.2.1 From 6cefe7d31ef43cadb905d71be743462825c7b4ff Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 2 Aug 2020 10:30:46 +0200 Subject: cleanup: use predefined CMAKE_DL_LIBS instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL) --- mysql-test/lib/My/SafeProcess/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/My/SafeProcess/CMakeLists.txt b/mysql-test/lib/My/SafeProcess/CMakeLists.txt index 4c3b62fa67e..33ff99da89b 100644 --- a/mysql-test/lib/My/SafeProcess/CMakeLists.txt +++ b/mysql-test/lib/My/SafeProcess/CMakeLists.txt @@ -24,7 +24,7 @@ ENDIF() IF(WITH_WSREP) ADD_EXECUTABLE(wsrep_check_version wsrep_check_version.c) - TARGET_LINK_LIBRARIES(wsrep_check_version ${LIBDL}) + TARGET_LINK_LIBRARIES(wsrep_check_version ${CMAKE_DL_LIBS}) ENDIF() IF(NOT INSTALL_MYSQLTESTDIR) -- cgit v1.2.1 From 15f03c204159325c343bd8c793f71edad0be3347 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 31 Aug 2020 09:54:46 +0200 Subject: MDEV-23492 performance_schema_digests_size changing from default to 5000 when enabling performance_schema max allowed value limit should be larger than any auto-sized value --- mysql-test/suite/sys_vars/r/sysvars_server_embedded.result | 2 +- mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') 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 8221a64472b..87795f802e2 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -2137,7 +2137,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 f9c92b91d86..aaaf1afb8b7 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -2277,7 +2277,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 -- cgit v1.2.1 From 2cd5df8c83d018d1aa58c8426b8406c3c6528d7e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 1 Oct 2020 16:35:55 +0200 Subject: MDEV-23656 view: removal of parentheses results in wrong result Item_ref should have the precedence of the item it's referencing --- mysql-test/r/precedence_bugs.result | 13 +++++++++++++ mysql-test/t/precedence_bugs.test | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 mysql-test/r/precedence_bugs.result create mode 100644 mysql-test/t/precedence_bugs.test (limited to 'mysql-test') diff --git a/mysql-test/r/precedence_bugs.result b/mysql-test/r/precedence_bugs.result new file mode 100644 index 00000000000..a9b1cd81503 --- /dev/null +++ b/mysql-test/r/precedence_bugs.result @@ -0,0 +1,13 @@ +# +# 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; diff --git a/mysql-test/t/precedence_bugs.test b/mysql-test/t/precedence_bugs.test new file mode 100644 index 00000000000..6e00fee41a5 --- /dev/null +++ b/mysql-test/t/precedence_bugs.test @@ -0,0 +1,10 @@ + +--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; -- cgit v1.2.1 From 71a5857291d6d1d54bc5929efc5156c6f3035007 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 5 Oct 2020 13:11:12 +0200 Subject: cleanup: move precedence tests into precedence_bugs.test --- mysql-test/r/func_math.result | 5 ----- mysql-test/r/func_test.result | 10 ---------- mysql-test/r/precedence_bugs.result | 37 +++++++++++++++++++++++++++++++++++++ mysql-test/r/view.result | 11 ----------- mysql-test/t/func_math.test | 5 ----- mysql-test/t/func_test.test | 9 --------- mysql-test/t/precedence_bugs.test | 24 ++++++++++++++++++++++++ mysql-test/t/view.test | 11 ----------- 8 files changed, 61 insertions(+), 51 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 436542b7225..1a01a4ed150 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -1766,8 +1766,3 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1); select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678'); CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678') NULL 0 3259397556 2501908538 763378421 939184570 -explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -Warnings: -Note 1003 select 3 - 2 + 1 AS `(3-2)+1`,3 / 2 * 1 AS `(3/2)*1`,3 - (2 + 1) AS `3-(2+1)`,3 / (2 * 1) AS `3/(2*1)` diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 8f175a6805b..94cf6d3e6fa 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -273,16 +273,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/r/precedence_bugs.result b/mysql-test/r/precedence_bugs.result index a9b1cd81503..3da61b6b58a 100644 --- a/mysql-test/r/precedence_bugs.result +++ b/mysql-test/r/precedence_bugs.result @@ -1,4 +1,41 @@ # +# 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)); diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index a422819ad0f..994d5949460 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -6649,17 +6649,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&, List&, diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 077cfdc5b6d..8dfec3063f4 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -792,8 +792,3 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1); --echo # select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678'); - -# -# MDEV-13673 Bad result in view -# -explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1); diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index d1c0702da80..9bdbe5bc4e4 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -141,15 +141,6 @@ select mod(NULL, 2) as 'NULL'; 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/t/precedence_bugs.test b/mysql-test/t/precedence_bugs.test index 6e00fee41a5..46a803504f2 100644 --- a/mysql-test/t/precedence_bugs.test +++ b/mysql-test/t/precedence_bugs.test @@ -1,3 +1,27 @@ +--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 diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index d4e5fdd7a46..cd5cc6efade 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -6362,17 +6362,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&, List&, -- cgit v1.2.1 From 9ad4e0d6d8952b861848da95778e35cf3abc1b93 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 14 Oct 2020 14:00:09 +0200 Subject: A fairly exhastive test for operator precedence some results are incorrect --- mysql-test/r/precedence.result | 8104 ++++++++++++++++++++++++++++++++++++++++ mysql-test/t/precedence.test | 4789 ++++++++++++++++++++++++ 2 files changed, 12893 insertions(+) create mode 100644 mysql-test/r/precedence.result create mode 100644 mysql-test/t/precedence.test (limited to 'mysql-test') diff --git a/mysql-test/r/precedence.result b/mysql-test/r/precedence.result new file mode 100644 index 00000000000..be07af1c550 --- /dev/null +++ b/mysql-test/r/precedence.result @@ -0,0 +1,8104 @@ +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 % 3) AS `NOT 6 MOD 3`,!(6 % 3) AS `NOT (6 MOD 3)`,!6 % 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 % 3) AS `NOT 6 % 3`,!(6 % 3) AS `NOT (6 % 3)`,!6 % 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 % 3 AS `~ 2 MOD 3`,~(2 % 3) AS `~ (2 MOD 3)`,~2 % 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 % 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 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 % 3 AS `! 6 MOD 3`,!(6 % 3) AS `! (6 MOD 3)`,!6 % 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 % 3 AS `! 6 % 3`,!(6 % 3) AS `! (6 % 3)`,!6 % 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 % 3 AS `0 OR 3 MOD 3`,0 or 3 % 3 AS `0 OR (3 MOD 3)`,(0 or 3) % 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 % 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 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 % 3 AS `0 || 3 MOD 3`,0 or 3 % 3 AS `0 || (3 MOD 3)`,(0 or 3) % 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 % 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 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 % 3 AS `2 XOR 3 MOD 3`,2 xor 3 % 3 AS `2 XOR (3 MOD 3)`,(2 xor 3) % 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 % 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 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 % 3 AS `2 AND 3 MOD 3`,2 and 3 % 3 AS `2 AND (3 MOD 3)`,(2 and 3) % 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 % 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 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 % 3 AS `2 && 3 MOD 3`,2 and 3 % 3 AS `2 && (3 MOD 3)`,(2 and 3) % 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 % 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 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 +0 0 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 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 +1 1 1 +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 +1 1 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 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 % 3 AS `3 = 3 MOD 3`,3 = 3 % 3 AS `3 = (3 MOD 3)`,(3 = 3) % 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 % 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 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 +1 1 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 +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 +0 0 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 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 +1 1 1 +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 +1 1 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 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 % 3 AS `3 <=> 3 MOD 3`,3 <=> 3 % 3 AS `3 <=> (3 MOD 3)`,(3 <=> 3) % 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 % 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 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 +1 1 1 +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 +1 1 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 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 +1 1 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 1 0 +1 1 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 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 % 3 AS `2 >= 3 MOD 3`,2 >= 3 % 3 AS `2 >= (3 MOD 3)`,(2 >= 3) % 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 % 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 >= 3 ^ 3, 2 >= (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 +1 1 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 +0 0 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 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 +0 0 0 +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 +0 0 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 & 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 % 3 AS `2 <= 3 MOD 3`,2 <= 3 % 3 AS `2 <= (3 MOD 3)`,(2 <= 3) % 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 % 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 ^ 3, 2 <= (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 +0 0 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 +0 0 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 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 +0 0 0 +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 +0 0 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 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 % 3 AS `2 < 3 MOD 3`,2 < 3 % 3 AS `2 < (3 MOD 3)`,(2 < 3) % 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 % 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 ^ 3, 2 < (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 +0 0 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 +1 1 1 +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 +1 1 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 1 0 +1 1 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 2 <> 3 >> 3, 2 <> (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 % 3 AS `3 <> 3 MOD 3`,3 <> 3 % 3 AS `3 <> (3 MOD 3)`,(3 <> 3) % 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 % 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 +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 +1 1 1 +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 +1 1 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 > 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 +1 1 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 1 0 +1 1 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 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 % 3 AS `2 > 3 MOD 3`,2 > 3 % 3 AS `2 > (3 MOD 3)`,(2 > 3) % 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 % 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 > 3 ^ 3, 2 > (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 +1 1 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 +1 1 1 +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 +1 1 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 1 0 +1 1 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 2 != 3 >> 3, 2 != (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 % 3 AS `3 != 3 MOD 3`,3 <> 3 % 3 AS `3 != (3 MOD 3)`,(3 <> 3) % 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 % 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 +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 +1 1 1 +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 +1 1 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); +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 'IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1)' at line 1 +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 2 LIKE 3 IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1) union select * from v1; +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 'IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1) union select * from v1' at line 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 1 +create or replace view v1 as select 2 LIKE 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1; +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 'LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1' at line 1 +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 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1 union select * from v1; +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 'LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1; +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 'REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1' at line 1 +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 2 REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1 union select * from v1; +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 'REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 3 | 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3; +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 '| 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3' at line 1 +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; +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 '| 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 & 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2; +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 '& 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2' at line 1 +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 2 & 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2 union select * from v1; +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 '& 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 << 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2; +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 '<< 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2' at line 1 +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 2 << 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2 union select * from v1; +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 '<< 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 4 >> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1; +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 '>> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1' at line 1 +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 4 >> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1 union select * from v1; +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 '>> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1 union select * from v1' at line 1 +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; +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 '+INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01')...' at line 1 +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 '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; +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 '+INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01')...' at line 1 +create or replace view v1 as select 2 LIKE 3 + 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3; +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 '+ 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3' at line 1 +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; +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 '+ 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 3 - 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3; +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 '- 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3' at line 1 +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; +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 '- 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 * 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2; +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 '* 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2' at line 1 +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 2 * 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2 union select * from v1; +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 '* 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 / 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2; +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 '/ 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2' at line 1 +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 2 / 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2 union select * from v1; +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 '/ 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 4 DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2; +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 'DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2' at line 1 +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 4 DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2 union select * from v1; +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 'DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2; +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 'MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2' at line 1 +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 2 MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2 union select * from v1; +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 'MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 2 % 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2; +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 '% 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2' at line 1 +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 2 % 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2 union select * from v1; +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 '% 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2 union select * from v1' at line 1 +create or replace view v1 as select 2 LIKE 3 ^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3; +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 '^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3' at line 1 +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; +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 '^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3 union select * from v1' at line 1 +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; +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 'BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3' at line 1 +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 2 BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3 union select * from v1; +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 'BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3 union...' at line 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); +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 'IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1)' at line 1 +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 2 REGEXP 3 IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1) union select * from v1; +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 'IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1) union select * from v1' at line 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; +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 'LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3' at line 1 +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 1 REGEXP 3 LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3 union select * from v1; +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 'LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3 union select * from v1' at line 1 +create or replace view v1 as select 1 REGEXP 3 REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3; +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 'REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3' at line 1 +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 1 REGEXP 3 REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3 union select * from v1; +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 'REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3 union select * from v1' at line 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 & 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 % 2 AS `2 REGEXP 2 MOD 2`,2 regexp 2 % 2 AS `2 REGEXP (2 MOD 2)`,(2 regexp 2) % 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 % 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 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; +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 'BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3' at line 1 +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 2 BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3 union select * from v1; +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 'BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3 u...' at line 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 % 3 AS `2 | 3 MOD 3`,2 | 3 % 3 AS `2 | (3 MOD 3)`,(2 | 3) % 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 % 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 +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 % 3 AS `2 & 3 MOD 3`,2 & 3 % 3 AS `2 & (3 MOD 3)`,(2 & 3) % 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 % 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 +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 % 3 AS `2 << 3 MOD 3`,2 << 3 % 3 AS `2 << (3 MOD 3)`,(2 << 3) % 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 % 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 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 % 3 AS `2 >> 3 MOD 3`,2 >> 3 % 3 AS `2 >> (3 MOD 3)`,(2 >> 3) % 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 % 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 +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 % 3 AS `2 + 1 MOD 3`,2 + 1 % 3 AS `2 + (1 MOD 3)`,(2 + 1) % 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 % 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 +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 % 3 AS `2 - 3 MOD 3`,2 - 3 % 3 AS `2 - (3 MOD 3)`,(2 - 3) % 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 % 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 -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 % 2 AS `2 * 3 MOD 2`,2 * (3 % 2) AS `2 * (3 MOD 2)`,2 * 3 % 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 % 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 +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 +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 % 3 AS `2 / 3 MOD 3`,2 / (3 % 3) AS `2 / (3 MOD 3)`,2 / 3 % 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 % 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.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 % 3 AS `2 DIV 3 MOD 3`,2 DIV (3 % 3) AS `2 DIV (3 MOD 3)`,2 DIV 3 % 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 % 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 +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 % 3 is false AS `2 MOD 3 IS FALSE`,2 % (3 is false) AS `2 MOD (3 IS FALSE)`,2 % 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 % 3 collate latin1_bin) AS `charset(2 MOD 3 COLLATE latin1_bin)`,charset(2 % 3 collate latin1_bin) AS `charset(2 MOD (3 COLLATE latin1_bin))`,charset((2 % 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 % 3 in (0,1) AS `2 MOD 3 IN (0,1)`,2 % (3 in (0,1)) AS `2 MOD (3 IN (0,1))`,2 % 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 % 3 or 3 AS `2 MOD 3 OR 3`,2 % (3 or 3) AS `2 MOD (3 OR 3)`,2 % 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 % 3 or 3 AS `2 MOD 3 || 3`,2 % (3 or 3) AS `2 MOD (3 || 3)`,2 % 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 % 3 xor 3 AS `2 MOD 3 XOR 3`,2 % (3 xor 3) AS `2 MOD (3 XOR 3)`,2 % 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 % 3 and 3 AS `2 MOD 3 AND 3`,2 % (3 and 3) AS `2 MOD (3 AND 3)`,2 % 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 % 3 and 3 AS `2 MOD 3 && 3`,2 % (3 and 3) AS `2 MOD (3 && 3)`,2 % 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 % 3 = 2 AS `2 MOD 3 = 2`,2 % (3 = 2) AS `2 MOD (3 = 2)`,2 % 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 % 3 <=> 2 AS `2 MOD 3 <=> 2`,2 % (3 <=> 2) AS `2 MOD (3 <=> 2)`,2 % 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 % 3 >= 1 AS `2 MOD 3 >= 1`,2 % (3 >= 1) AS `2 MOD (3 >= 1)`,2 % 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 % 3 <= 3 AS `2 MOD 3 <= 3`,2 % (3 <= 3) AS `2 MOD (3 <= 3)`,2 % 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 % 3 < 3 AS `2 MOD 3 < 3`,2 % (3 < 3) AS `2 MOD (3 < 3)`,2 % 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 % 3 <> 3 AS `2 MOD 3 <> 3`,2 % (3 <> 3) AS `2 MOD (3 <> 3)`,2 % 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 % 3 > 3 AS `2 MOD 3 > 3`,2 % (3 > 3) AS `2 MOD (3 > 3)`,2 % 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 % 3 <> 3 AS `2 MOD 3 != 3`,2 % (3 <> 3) AS `2 MOD (3 != 3)`,2 % 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 % 3 like 2 AS `2 MOD 3 LIKE 2`,2 % (3 like 2) AS `2 MOD (3 LIKE 2)`,2 % 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 % 3 regexp 2 AS `2 MOD 3 REGEXP 2`,2 % (3 regexp 2) AS `2 MOD (3 REGEXP 2)`,2 % 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 % 3 | 3 AS `2 MOD 3 | 3`,2 % (3 | 3) AS `2 MOD (3 | 3)`,2 % 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 % 4 & 4 AS `2 MOD 4 & 4`,2 % (4 & 4) AS `2 MOD (4 & 4)`,2 % 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 % 3 << 3 AS `2 MOD 3 << 3`,2 % (3 << 3) AS `2 MOD (3 << 3)`,2 % 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 % 3 >> 3 AS `2 MOD 3 >> 3`,2 % (3 >> 3) AS `2 MOD (3 >> 3)`,2 % 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 % '2000-01-01' + interval 1 day AS `2 MOD '2000-01-01' +INTERVAL 1 DAY`,2 % ('2000-01-01' + interval 1 day) AS `2 MOD ('2000-01-01' +INTERVAL 1 DAY)`,2 % '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 % 3 + 3 AS `2 MOD 3 + 3`,2 % (3 + 3) AS `2 MOD (3 + 3)`,2 % 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 % 3 - 3 AS `2 MOD 3 - 3`,2 % (3 - 3) AS `2 MOD (3 - 3)`,2 % 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 % 3 * 3 AS `2 MOD 3 * 3`,2 % (3 * 3) AS `2 MOD (3 * 3)`,2 % 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 % 3 / 3 AS `2 MOD 3 / 3`,2 % (3 / 3) AS `2 MOD (3 / 3)`,2 % 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 % 4 DIV 3 AS `3 MOD 4 DIV 3`,3 % (4 DIV 3) AS `3 MOD (4 DIV 3)`,3 % 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 % 3 % 3 AS `2 MOD 3 MOD 3`,2 % (3 % 3) AS `2 MOD (3 MOD 3)`,2 % 3 % 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 % 3 % 3 AS `2 MOD 3 % 3`,2 % (3 % 3) AS `2 MOD (3 % 3)`,2 % 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 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 % 3 ^ 3 AS `2 MOD 3 ^ 3`,2 % 3 ^ 3 AS `2 MOD (3 ^ 3)`,(2 % 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 % 3 between 1 and 3 AS `2 MOD 3 BETWEEN 1 AND 3`,2 % (3 between 1 and 3) AS `2 MOD (3 BETWEEN 1 AND 3)`,2 % 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 % 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 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 +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 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 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 % 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 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 % 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 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 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 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 % 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 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 +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 % 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 +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 +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 % 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 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 +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 % 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 +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 % 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.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 % 4 DIV 3 AS `3 % 4 DIV 3`,3 % (4 DIV 3) AS `3 % (4 DIV 3)`,3 % 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 % 3 % 3 AS `2 % 3 MOD 3`,2 % (3 % 3) AS `2 % (3 MOD 3)`,2 % 3 % 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 % 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 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 % 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 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) +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 % 3 AS `2 ^ 3 MOD 3`,2 ^ (3 % 3) AS `2 ^ (3 MOD 3)`,2 ^ 3 % 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 % 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 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 +1 1 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 % 3 AS `2 BETWEEN 1 AND 3 MOD 3`,2 between 1 and 3 % 3 AS `2 BETWEEN 1 AND (3 MOD 3)`,(2 between 1 and 3) % 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 % 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 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 +0 0 0 +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 +0 0 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); +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 'IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1)' at line 1 +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 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; +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 'IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1) union selec...' at line 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 +1 1 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 +1 1 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 +1 1 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 +0 0 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 +0 0 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 +0 0 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 +0 0 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 +0 0 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 +1 1 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 +1 1 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 +1 1 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 +0 0 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 +1 1 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; +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 'LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4' at line 1 +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 2 ESCAPE 3 LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4 union select * from v1; +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 'LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4 union select *...' at line 1 +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; +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 'REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4' at line 1 +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 2 ESCAPE 3 REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4 union select * from v1; +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 'REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4 union se...' at line 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; +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 '| 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4' at line 1 +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; +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 '| 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4 union select * from v1' at line 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; +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 '& 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4' at line 1 +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 2 ESCAPE 3 & 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4 union select * from v1; +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 '& 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4 union select * from v1' at line 1 +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; +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 '<< 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1' at line 1 +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 2 ESCAPE 1 << 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1 union select * from v1; +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 '<< 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1 union select * from v1' at line 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; +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 '>> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4' at line 1 +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 2 ESCAPE 3 >> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4 union select * from v1; +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 '>> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4 union select * from v1' at line 1 +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; +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 '+INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +IN...' at line 1 +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 +INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +INTERVAL 1 DAY union select * from v1; +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 '+INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +IN...' at line 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; +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 '+ 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4' at line 1 +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; +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 '+ 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4 union select * from v1' at line 1 +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; +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 '- 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1' at line 1 +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 2 ESCAPE 1 - 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1 union select * from v1; +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 '- 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1 union select * from v1' at line 1 +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; +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 '* 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0' at line 1 +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 2 ESCAPE 3 * 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0 union select * from v1; +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 '* 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0 union select * from v1' at line 1 +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; +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 'DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3' at line 1 +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 2 ESCAPE 3 DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3 union select * from v1; +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 'DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3 union select * fr...' at line 1 +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; +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 'MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1' at line 1 +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 2 ESCAPE 3 MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1 union select * from v1; +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 'MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1 union select * fr...' at line 1 +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; +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 '% 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1' at line 1 +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 2 ESCAPE 3 % 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1 union select * from v1; +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 '% 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1 union select * from v1' at line 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; +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 '^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4' at line 1 +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; +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 '^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4 union select * from v1' at line 1 +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; +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 'BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BET...' at line 1 +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 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; +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 'BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BET...' at line 1 +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 +1 1 1 +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 +1 1 1 +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 +1 1 1 +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 +0 0 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 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 +0 0 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 +0 0 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 +0 0 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 +1 1 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 +0 0 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 +0 0 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 +1 1 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 +1 1 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 +1 1 1 +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); +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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIK...' at line 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 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 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; +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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIK...' at line 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); +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 'IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 R...' at line 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 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 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; +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 'IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 R...' at line 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 % 3 in (select 0 union select 1) AS `2 MOD 3 IN (SELECT 0 UNION SELECT 1)`,2 % (3 in (select 0 union select 1)) AS `2 MOD (3 IN (SELECT 0 UNION SELECT 1))`,2 % 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 % 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 ^ 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 +0 0 0 +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); +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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)...' at line 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 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; +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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)...' at line 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) % 3 AS `0 || 3 MOD 3`,concat(0,3 % 3) AS `0 || (3 MOD 3)`,concat(0,3) % 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) % 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 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 % concat(3,3) AS `2 MOD 3 || 3`,2 % concat(3,3) AS `2 MOD (3 || 3)`,concat(2 % 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 % 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 +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; +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 'NOT 1, NOT ! 1' at line 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 ! ~ 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; +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 'NOT 1, NOT - 1' at line 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 - ~ 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; +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 'NOT 1, NOT BINARY 1' at line 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; +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 'NOT 1' at line 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 1 IS TRUE IS FALSE, 2 IS FALSE IS UNKNOWN, 3 IS UNKNOWN IS NULL, 4 IS NULL 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 FALSE, 2 IS FALSE IS UNKNOWN, 3 IS UNKNOWN IS NULL, 4 IS NULL IS TRUE' at line 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` +drop view v1; diff --git a/mysql-test/t/precedence.test b/mysql-test/t/precedence.test new file mode 100644 index 00000000000..28e915a118c --- /dev/null +++ b/mysql-test/t/precedence.test @@ -0,0 +1,4789 @@ +# +# A fairly exhastive test for operator precedence +# + +disable_abort_on_error; +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; -- cgit v1.2.1 From 7f974e5ad3317168f174465dc61c0feb27c04162 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 16 Oct 2020 15:07:34 +0200 Subject: cleanup: remove redundant BANG_PRECEDENCE prefix unary operators don't need to have different precedence, the syntax unambiguously specifies in what order they apply --- mysql-test/r/precedence.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/precedence.result b/mysql-test/r/precedence.result index be07af1c550..2a797467758 100644 --- a/mysql-test/r/precedence.result +++ b/mysql-test/r/precedence.result @@ -8068,7 +8068,7 @@ select !cast(1 as char charset binary) AS `! BINARY 1`,cast(!1 as char charset b 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` +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 -- cgit v1.2.1 From 05a878c139963d4859ef8f2c974fee5dae56ee51 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 5 Oct 2020 12:50:51 +0200 Subject: precedence bugfixing fix printing precedence for BETWEEN, LIKE/ESCAPE, REGEXP, IN don't use precedence for printing CASE/WHEN/THEN/ELSE/END fix parsing precedence of BETWEEN, LIKE/ESCAPE, REGEXP, IN support predicate arguments for IN, BETWEEN, SOUNDS LIKE, LIKE/ESCAPE, REGEXP use %nonassoc for unary operators fix parsing of IS TRUE/FALSE/UNKNOWN/NULL remove parser_precedence test as superseded by the precedence test --- mysql-test/r/derived_cond_pushdown.result | 16 +- mysql-test/r/func_test.result | 9 - mysql-test/r/parser.result | 17 + mysql-test/r/parser_precedence.result | 748 --------------------- mysql-test/r/precedence.result | 480 ++++++------- .../suite/innodb/r/innodb-virtual-columns.result | 50 +- mysql-test/t/func_test.test | 8 - mysql-test/t/parser.test | 14 + mysql-test/t/parser_precedence.test | 335 --------- 9 files changed, 264 insertions(+), 1413 deletions(-) delete mode 100644 mysql-test/r/parser_precedence.result delete mode 100644 mysql-test/t/parser_precedence.test (limited to 'mysql-test') diff --git a/mysql-test/r/derived_cond_pushdown.result b/mysql-test/r/derived_cond_pushdown.result index e2c24639cc7..d4e8feff740 100644 --- a/mysql-test/r/derived_cond_pushdown.result +++ b/mysql-test/r/derived_cond_pushdown.result @@ -10052,11 +10052,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": { @@ -10101,11 +10101,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": { @@ -10150,11 +10150,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": { @@ -10199,7 +10199,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, @@ -10211,7 +10211,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/r/func_test.result b/mysql-test/r/func_test.result index 94cf6d3e6fa..c2a1ea1137d 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/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 diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index 45fcca146fe..9ae5b654eed 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -1321,3 +1321,20 @@ 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; diff --git a/mysql-test/r/parser_precedence.result b/mysql-test/r/parser_precedence.result deleted file mode 100644 index f23295bd61b..00000000000 --- a/mysql-test/r/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/r/precedence.result b/mysql-test/r/precedence.result index 2a797467758..7584375061d 100644 --- a/mysql-test/r/precedence.result +++ b/mysql-test/r/precedence.result @@ -1996,11 +1996,10 @@ 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) 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 -0 0 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 @@ -2095,19 +2094,17 @@ 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'; 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 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 -1 1 1 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 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 -1 1 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 @@ -2202,11 +2199,10 @@ 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'; 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 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 -1 1 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 @@ -2224,11 +2220,10 @@ 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) 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 -0 0 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 @@ -2323,19 +2318,17 @@ 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'; 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 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 -1 1 1 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 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 -1 1 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 @@ -2430,11 +2423,10 @@ 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'; 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 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 -1 1 1 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 @@ -2452,11 +2444,10 @@ 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) 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 -1 1 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 @@ -2551,19 +2542,17 @@ 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'; 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 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 -1 1 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 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 -1 1 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 @@ -2658,11 +2647,10 @@ 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'; 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 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 -1 1 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 @@ -2680,11 +2668,10 @@ 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) 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 -0 0 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 @@ -2779,19 +2766,17 @@ 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'; 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 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 -0 0 0 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 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 -0 0 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 @@ -2886,11 +2871,10 @@ 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'; 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 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 -0 0 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 @@ -2908,11 +2892,10 @@ 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) 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 -0 0 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 @@ -3007,19 +2990,17 @@ 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'; 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 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 -0 0 0 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 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 -0 0 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 @@ -3114,11 +3095,10 @@ 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'; 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 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 -0 0 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 @@ -3136,11 +3116,10 @@ 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) 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 -1 1 1 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 @@ -3235,19 +3214,17 @@ 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'; 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 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 -1 1 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 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 -1 1 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 @@ -3342,11 +3319,10 @@ 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'; 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 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 -1 1 1 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 @@ -3364,11 +3340,10 @@ 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) 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 -1 1 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 @@ -3463,19 +3438,17 @@ 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'; 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 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 -1 1 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 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 -1 1 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 @@ -3570,11 +3543,10 @@ 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'; 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 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 -1 1 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 @@ -3592,11 +3564,10 @@ 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) 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 -1 1 1 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 @@ -3691,19 +3662,17 @@ 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'; 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 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 -1 1 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 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 -1 1 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 @@ -3798,19 +3767,17 @@ 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'; 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 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 -1 1 1 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 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 -1 1 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 @@ -3819,12 +3786,12 @@ select charset(2 LIKE 3 COLLATE latin1_bin), charset(2 LIKE (3 COLLATE latin1_bi 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); -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 'IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1)' at line 1 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 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; -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 'IN (0,1), 2 LIKE (3 IN (0,1)), (2 LIKE 3) IN (0,1) union select * from v1' at line 1 +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 @@ -3863,179 +3830,171 @@ 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'; 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 1 create or replace view v1 as select 2 LIKE 2 LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1; -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 'LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1' at line 1 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 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; -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 'LIKE 1, 2 LIKE (2 LIKE 1), (2 LIKE 2) LIKE 1 union select * from v1' at line 1 +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; -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 'REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1' at line 1 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 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; -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 'REGEXP 1, 2 LIKE (2 REGEXP 1), (2 LIKE 2) REGEXP 1 union select * from v1' at line 1 +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; -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 '| 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3' at line 1 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 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; -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 '| 3, 2 LIKE (3 | 3), (2 LIKE 3) | 3 union select * from v1' at line 1 +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; -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 '& 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2' at line 1 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 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; -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 '& 2, 2 LIKE (2 & 2), (2 LIKE 2) & 2 union select * from v1' at line 1 +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; -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 '<< 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2' at line 1 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 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; -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 '<< 2, 2 LIKE (2 << 2), (2 LIKE 2) << 2 union select * from v1' at line 1 +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; -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 '>> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1' at line 1 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 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; -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 '>> 1, 2 LIKE (4 >> 1), (2 LIKE 4) >> 1 union select * from v1' at line 1 +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; -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 '+INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01')...' at line 1 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 '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; -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 '+INTERVAL 1 DAY, 2 LIKE ('2000-01-01' +INTERVAL 1 DAY), (2 LIKE '2000-01-01')...' at line 1 +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; -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 '+ 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3' at line 1 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 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; -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 '+ 3, 2 LIKE (3 + 3), (2 LIKE 3) + 3 union select * from v1' at line 1 +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; -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 '- 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3' at line 1 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 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; -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 '- 3, 2 LIKE (3 - 3), (2 LIKE 3) - 3 union select * from v1' at line 1 +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; -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 '* 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2' at line 1 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 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; -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 '* 2, 2 LIKE (2 * 2), (2 LIKE 2) * 2 union select * from v1' at line 1 +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; -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 '/ 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2' at line 1 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 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; -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 '/ 2, 2 LIKE (2 / 2), (2 LIKE 2) / 2 union select * from v1' at line 1 +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; -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 'DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2' at line 1 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 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; -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 'DIV 2, 2 LIKE (4 DIV 2), (2 LIKE 4) DIV 2 union select * from v1' at line 1 +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; -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 'MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2' at line 1 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 2 % 2 AS `2 LIKE 2 MOD 2`,2 like 2 % 2 AS `2 LIKE (2 MOD 2)`,(2 like 2) % 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; -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 'MOD 2, 2 LIKE (2 MOD 2), (2 LIKE 2) MOD 2 union select * from v1' at line 1 +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; -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 '% 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2' at line 1 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 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; -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 '% 2, 2 LIKE (2 % 2), (2 LIKE 2) % 2 union select * from v1' at line 1 +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; -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 '^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3' at line 1 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 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; -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 '^ 3, 2 LIKE (3 ^ 3), (2 LIKE 3) ^ 3 union select * from v1' at line 1 +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; -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 'BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3' at line 1 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 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; -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 'BETWEEN 1 AND 3, 2 LIKE (2 BETWEEN 1 AND 3), (2 LIKE 2) BETWEEN 1 AND 3 union...' at line 1 +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 @@ -4051,12 +4010,12 @@ select charset(2 REGEXP 3 COLLATE latin1_bin), charset(2 REGEXP (3 COLLATE latin 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); -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 'IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1)' at line 1 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 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; -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 'IN (0,1), 2 REGEXP (3 IN (0,1)), (2 REGEXP 3) IN (0,1) union select * from v1' at line 1 +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 @@ -4149,19 +4108,19 @@ select 2 REGEXP 3 != 3, 2 REGEXP (3 != 3), (2 REGEXP 3) != 3 union select * from 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; -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 'LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3' at line 1 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 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; -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 'LIKE 3, 1 REGEXP (3 LIKE 3), (1 REGEXP 3) LIKE 3 union select * from v1' at line 1 +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; -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 'REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3' at line 1 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 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; -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 'REGEXP 3, 1 REGEXP (3 REGEXP 3), (1 REGEXP 3) REGEXP 3 union select * from v1' at line 1 +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 @@ -4254,12 +4213,12 @@ 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; -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 'BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3' at line 1 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 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; -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 'BETWEEN 1 AND 3, 2 REGEXP (2 BETWEEN 1 AND 3), (2 REGEXP 2) BETWEEN 1 AND 3 u...' at line 1 +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 @@ -6896,11 +6855,10 @@ select 2 ^ 3 BETWEEN 1 AND 3, 2 ^ (3 BETWEEN 1 AND 3), (2 ^ 3) BETWEEN 1 AND 3 u 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 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 -1 1 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 @@ -6953,67 +6911,59 @@ select 2 BETWEEN 1 AND 3 && 3, 2 BETWEEN 1 AND (3 && 3), (2 BETWEEN 1 AND 3) && 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 @@ -7122,19 +7072,17 @@ select 2 BETWEEN 1 AND 3 ^ 3, 2 BETWEEN 1 AND (3 ^ 3), (2 BETWEEN 1 AND 3) ^ 3 u 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 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 -0 0 0 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 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 -0 0 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 @@ -7143,221 +7091,208 @@ select charset(2 LIKE 1 ESCAPE 3 COLLATE latin1_bin), charset(2 LIKE 1 ESCAPE (3 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); -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 'IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1)' at line 1 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 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; -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 'IN(0,1), 2 LIKE 1 ESCAPE (3 IN(0,1)), (2 LIKE 1 ESCAPE 3) IN(0,1) union selec...' at line 1 +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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -0 0 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 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 -0 0 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 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 -0 0 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 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 -0 0 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 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 -0 0 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 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 -1 1 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 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 -1 1 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 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 -1 1 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 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 -0 0 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 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 -1 1 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; -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 'LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4' at line 1 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 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; -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 'LIKE 4, 2 LIKE 2 ESCAPE (3 LIKE 4), (2 LIKE 2 ESCAPE 3) LIKE 4 union select *...' at line 1 +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; -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 'REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4' at line 1 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 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; -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 'REGEXP 4, 2 LIKE 2 ESCAPE (3 REGEXP 4), (2 LIKE 2 ESCAPE 3) REGEXP 4 union se...' at line 1 +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; -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 '| 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4' at line 1 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 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; -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 '| 4, 2 LIKE 1 ESCAPE (3 | 4), (2 LIKE 1 ESCAPE 3) | 4 union select * from v1' at line 1 +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; -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 '& 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4' at line 1 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 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; -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 '& 4, 2 LIKE 2 ESCAPE (3 & 4), (2 LIKE 2 ESCAPE 3) & 4 union select * from v1' at line 1 +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; -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 '<< 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1' at line 1 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 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; -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 '<< 1, 2 LIKE 2 ESCAPE (1 << 1), (2 LIKE 2 ESCAPE 1) << 1 union select * from v1' at line 1 +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; -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 '>> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4' at line 1 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 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; -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 '>> 4, 2 LIKE 2 ESCAPE (3 >> 4), (2 LIKE 2 ESCAPE 3) >> 4 union select * from v1' at line 1 +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; -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 '+INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +IN...' at line 1 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 + 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; -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 '+INTERVAL 1 DAY, 2 LIKE 1 ESCAPE (3 +INTERVAL 1 DAY), (2 LIKE 1 ESCAPE 3) +IN...' at line 1 +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; -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 '+ 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4' at line 1 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 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; -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 '+ 4, 2 LIKE 1 ESCAPE (3 + 4), (2 LIKE 1 ESCAPE 3) + 4 union select * from v1' at line 1 +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; -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 '- 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1' at line 1 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 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; -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 '- 1, 2 LIKE 2 ESCAPE (1 - 1), (2 LIKE 2 ESCAPE 1) - 1 union select * from v1' at line 1 +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; -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 '* 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0' at line 1 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 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; -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 '* 0, 2 LIKE 2 ESCAPE (3 * 0), (2 LIKE 2 ESCAPE 3) * 0 union select * from v1' at line 1 +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; -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 'DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3' at line 1 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 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; -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 'DIV 3, 2 LIKE 2 ESCAPE (3 DIV 3), (2 LIKE 2 ESCAPE 3) DIV 3 union select * fr...' at line 1 +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; -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 'MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1' at line 1 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 2 escape 3 % 1 AS `2 LIKE 2 ESCAPE 3 MOD 1`,2 like 2 escape 3 % 1 AS `2 LIKE 2 ESCAPE (3 MOD 1)`,(2 like 2 escape 3) % 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; -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 'MOD 1, 2 LIKE 2 ESCAPE (3 MOD 1), (2 LIKE 2 ESCAPE 3) MOD 1 union select * fr...' at line 1 +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; -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 '% 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1' at line 1 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 2 escape 3 % 1 AS `2 LIKE 2 ESCAPE 3 % 1`,2 like 2 escape 3 % 1 AS `2 LIKE 2 ESCAPE (3 % 1)`,(2 like 2 escape 3) % 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; -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 '% 1, 2 LIKE 2 ESCAPE (3 % 1), (2 LIKE 2 ESCAPE 3) % 1 union select * from v1' at line 1 +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; -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 '^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4' at line 1 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 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; -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 '^ 4, 2 LIKE 1 ESCAPE (3 ^ 4), (2 LIKE 1 ESCAPE 3) ^ 4 union select * from v1' at line 1 +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; -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 'BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BET...' at line 1 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 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; -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 'BETWEEN 2 AND 4, 2 LIKE 2 ESCAPE (3 BETWEEN 2 AND 4), (2 LIKE 2 ESCAPE 3) BET...' at line 1 +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 @@ -7396,121 +7331,108 @@ BINARY 'c' IN (SELECT 'C' UNION SELECT 'X') BINARY ('c' IN (SELECT 'C' UNION SEL 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) 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 -1 1 1 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 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 -1 1 1 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) 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 -1 1 1 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) 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 -0 0 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 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 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 -0 0 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) 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 -0 0 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) 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 -0 0 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) 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 -1 1 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) 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 -0 0 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) 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 -0 0 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) 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 -1 1 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) 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 -1 1 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) 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 -1 1 1 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); -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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIK...' at line 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 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 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; -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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE (3 IN (SELECT 0 UNION SELECT 1)), (2 LIK...' at line 1 +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); -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 'IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 R...' at line 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 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 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; -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 'IN (SELECT 0 UNION SELECT 1), 2 REGEXP (3 IN (SELECT 0 UNION SELECT 1)), (2 R...' at line 1 +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 @@ -7598,18 +7520,17 @@ select 2 ^ 3 IN (SELECT 0 UNION SELECT 1), 2 ^ (3 IN (SELECT 0 UNION SELECT 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) 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 -0 0 0 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); -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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)...' at line 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 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; -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 'IN (SELECT 0 UNION SELECT 1), 2 LIKE 1 ESCAPE (3 IN (SELECT 0 UNION SELECT 1)...' at line 1 +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 @@ -8097,8 +8018,7 @@ Select view_definition from information_schema.views where table_schema='test' a 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 1 IS TRUE IS FALSE, 2 IS FALSE IS UNKNOWN, 3 IS UNKNOWN IS NULL, 4 IS NULL 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 FALSE, 2 IS FALSE IS UNKNOWN, 3 IS UNKNOWN IS NULL, 4 IS NULL IS TRUE' at line 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` +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/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result index de97d933ad9..20cd55bd7b0 100644 --- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result +++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result @@ -30,7 +30,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`) @@ -136,14 +136,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`) @@ -193,14 +193,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`) @@ -270,14 +270,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/t/func_test.test b/mysql-test/t/func_test.test index 9bdbe5bc4e4..570fd0ae87a 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -35,14 +35,6 @@ select - a from t1; 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 # diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test index 7e11a71c500..c5bd31c576e 100644 --- a/mysql-test/t/parser.test +++ b/mysql-test/t/parser.test @@ -1351,3 +1351,17 @@ create function fs() returns serial return 1; 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; diff --git a/mysql-test/t/parser_precedence.test b/mysql-test/t/parser_precedence.test deleted file mode 100644 index 7b69bc9c6da..00000000000 --- a/mysql-test/t/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); - -- cgit v1.2.1 From 8894dae1df87efda299d2c1fbccc4792c9058f45 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 19 Oct 2020 12:57:44 +0200 Subject: MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN --- mysql-test/r/precedence_bugs.result | 10 ++++++++++ mysql-test/t/precedence_bugs.test | 7 +++++++ 2 files changed, 17 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/precedence_bugs.result b/mysql-test/r/precedence_bugs.result index 3da61b6b58a..4b13e820d7f 100644 --- a/mysql-test/r/precedence_bugs.result +++ b/mysql-test/r/precedence_bugs.result @@ -48,3 +48,13 @@ 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/t/precedence_bugs.test b/mysql-test/t/precedence_bugs.test index 46a803504f2..6e8e624c840 100644 --- a/mysql-test/t/precedence_bugs.test +++ b/mysql-test/t/precedence_bugs.test @@ -32,3 +32,10 @@ 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; -- cgit v1.2.1 From b94e8e4b25e039b5f165339b8ee0fd4af856459c Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Fri, 23 Oct 2020 12:32:49 +0530 Subject: MDEV-23867: insert... select crash in compute_window_func There are 2 issues here: Issue #1: memory allocation. An IO_CACHE that uses encryption uses a larger buffer (it needs space for the encrypted data, decrypted data, IO_CACHE_CRYPT struct to describe encryption parameters etc). Issue #2: IO_CACHE::seek_not_done When IO_CACHE objects are cloned, they still share the file descriptor. This means, operation on one IO_CACHE may change the file read position which will confuse other IO_CACHEs using it. The fix of these issues would be: Allocate the buffer to also include the extra size needed for encryption. Perform seek again after one IO_CACHE reads the file. --- .../suite/encryption/r/tempfiles_encrypted.result | 3896 ++++++++++++++++++++ .../suite/encryption/t/tempfiles_encrypted.opt | 1 + .../suite/encryption/t/tempfiles_encrypted.test | 31 + 3 files changed, 3928 insertions(+) create mode 100644 mysql-test/suite/encryption/r/tempfiles_encrypted.result create mode 100644 mysql-test/suite/encryption/t/tempfiles_encrypted.opt create mode 100644 mysql-test/suite/encryption/t/tempfiles_encrypted.test (limited to 'mysql-test') 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..1856c30a36b --- /dev/null +++ b/mysql-test/suite/encryption/r/tempfiles_encrypted.result @@ -0,0 +1,3896 @@ +# +# 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 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::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-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..7ba63cedaaa --- /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 t/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 -- cgit v1.2.1 From 4e987b1c6ba7a0d73c5df54ae0af2805c081b0c3 Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Wed, 22 Apr 2020 20:13:21 +0200 Subject: MDEV-22313: Neither SHOW CREATE USER nor SHOW GRANTS prints a user's default role Reviewed-by: serg@mariadb.com --- mysql-test/r/grant5.result | 32 ++++++++++++++++++++++ .../suite/roles/set_default_role_clear.result | 1 + mysql-test/suite/roles/set_default_role_for.result | 2 ++ .../suite/roles/set_default_role_invalid.result | 3 ++ .../roles/set_default_role_new_connection.result | 2 ++ mysql-test/t/grant5.test | 18 ++++++++++++ 6 files changed, 58 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/grant5.result b/mysql-test/r/grant5.result index 338bbd36e14..a69070e8399 100644 --- a/mysql-test/r/grant5.result +++ b/mysql-test/r/grant5.result @@ -39,3 +39,35 @@ 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; diff --git a/mysql-test/suite/roles/set_default_role_clear.result b/mysql-test/suite/roles/set_default_role_clear.result index 7f54b5eabcc..3cb13f55b4b 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 b55ca49c680..62c31373486 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 74d517b7c8f..53ee464e2c1 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 a59ecbd75f7..75e4075ff9e 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/t/grant5.test b/mysql-test/t/grant5.test index 74a69952124..944918e63ec 100644 --- a/mysql-test/t/grant5.test +++ b/mysql-test/t/grant5.test @@ -52,6 +52,24 @@ disconnect u1; 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 # -- cgit v1.2.1 From 987df9b37a2198ab70fb12076fa983d2efe408bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sun, 25 Oct 2020 11:48:34 +0200 Subject: MDEV-23720 Change innodb_log_optimize_ddl=OFF by default MariaDB 10.2.2 inherited from MySQL 5.7 a perceived optimization of ALTER TABLE, which skips the writing of redo log records. In MDEV-16809 we introduced a parameter that allows the redo log to be written, so that Mariabackup would not be impacted, but we kept the MySQL 5.7 behaviour enabled by default (innodb_log_optimize_ddl=ON). As noted in MDEV-19747 (Deprecate and ignore innodb_log_optimize_ddl, implemented in MariaDB 10.5.1), omitting the redo log writes can actually reduce performance, because we will have to wait for the data pages to be written out. When the redo log file is configured to be large enough, it actually can be much faster to write the redo log and avoid the extra page flushing. When the redo log is omitted (innodb_log_optimize_ddl=ON), also Mariabackup may have to perform a lot of extra work, to re-copy the entire data file if it is possible that any log was omitted during the backup. Starting with MariaDB 10.5.1, the parameter innodb_log_optimize_ddl is deprecated and ignored. We hereby deprecate (but will not ignore) the parameter in earlier versions as well. --- mysql-test/suite/mariabackup/mlog_index_load.result | 1 + mysql-test/suite/mariabackup/mlog_index_load.test | 1 + mysql-test/suite/sys_vars/r/sysvars_innodb.result | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test') 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/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index bed23a777a8..d3d30f8f53f 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -1568,10 +1568,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 -- cgit v1.2.1 From 2fdc50367cb31526a8fe2f5b2c89e71350cd4b32 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 25 Oct 2020 19:18:54 +0100 Subject: remove disable_abort_on_error from precedence.test was left over from testing --- mysql-test/r/precedence.result | 20 ++++++++------------ mysql-test/t/precedence.test | 9 ++++----- 2 files changed, 12 insertions(+), 17 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/precedence.result b/mysql-test/r/precedence.result index 7584375061d..34304d980c0 100644 --- a/mysql-test/r/precedence.result +++ b/mysql-test/r/precedence.result @@ -7981,11 +7981,10 @@ 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; -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 'NOT 1, NOT ! 1' at line 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 !cast(1 as char charset binary) AS `! BINARY 1`,cast(!1 as char charset binary) AS `BINARY ! 1` +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 @@ -7994,29 +7993,26 @@ 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; -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 'NOT 1, NOT - 1' at line 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 -cast(1 as char charset binary) AS `- BINARY 1`,cast(-1 as char charset binary) AS `BINARY - 1` +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; -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 'NOT 1, NOT BINARY 1' at line 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 -~1 AS `- ~ 1`,~-1 AS `~ - 1` +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; -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 'NOT 1' at line 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 cast(~1 as char charset binary) AS `BINARY ~ 1`,~cast(1 as char charset binary) AS `~ BINARY 1` +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 diff --git a/mysql-test/t/precedence.test b/mysql-test/t/precedence.test index 28e915a118c..ad367c23603 100644 --- a/mysql-test/t/precedence.test +++ b/mysql-test/t/precedence.test @@ -2,7 +2,6 @@ # A fairly exhastive test for operator precedence # -disable_abort_on_error; disable_warnings; #################### I couldn't come up with a test where precedence changes the result here @@ -4759,7 +4758,7 @@ Select view_definition from information_schema.views where table_schema='test' a 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; +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; @@ -4768,19 +4767,19 @@ Select view_definition from information_schema.views where table_schema='test' a 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; +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; +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; +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; -- cgit v1.2.1 From 31cde275c26ba5009d16dfc62654884b94b22322 Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Tue, 20 Oct 2020 20:10:40 +0300 Subject: MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit innobase_rename_indexes_cache(): fix corruption of index cache. Index ids help distinguish indexes when their names clash. innobase_rename_indexes_cache(): fix corruption of index statistics table. Use unique temporary names to avoid names clashing. Reviewed by: Marko Mäkelä --- .../innodb/r/instant_alter_index_rename.result | 36 ++++++++++++++++++++++ .../suite/innodb/t/instant_alter_index_rename.test | 20 ++++++++++++ 2 files changed, 56 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/instant_alter_index_rename.result b/mysql-test/suite/innodb/r/instant_alter_index_rename.result index 69f7cc8df4c..41dec275d90 100644 --- a/mysql-test/suite/innodb/r/instant_alter_index_rename.result +++ b/mysql-test/suite/innodb/r/instant_alter_index_rename.result @@ -198,3 +198,39 @@ Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; DROP FUNCTION get_index_id; +# +# MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes +# +CREATE TABLE t1 (a INT, b INT, c CHAR(8), +KEY ind1(c), KEY ind2(b)) ENGINE=InnoDB STATS_PERSISTENT=1; +INSERT INTO t1 SELECT 1, 1, 'a' FROM seq_1_to_100; +SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; +table_name index_name stat_name +t1 GEN_CLUST_INDEX n_diff_pfx01 +t1 GEN_CLUST_INDEX n_leaf_pages +t1 GEN_CLUST_INDEX size +t1 ind1 n_diff_pfx01 +t1 ind1 n_diff_pfx02 +t1 ind1 n_leaf_pages +t1 ind1 size +t1 ind2 n_diff_pfx01 +t1 ind2 n_diff_pfx02 +t1 ind2 n_leaf_pages +t1 ind2 size +ALTER TABLE t1 DROP INDEX ind2, ADD INDEX ind3(b), +DROP INDEX ind1, ADD INDEX ind2(c); +SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; +table_name index_name stat_name +t1 GEN_CLUST_INDEX n_diff_pfx01 +t1 GEN_CLUST_INDEX n_leaf_pages +t1 GEN_CLUST_INDEX size +t1 ind2 n_diff_pfx01 +t1 ind2 n_diff_pfx02 +t1 ind2 n_leaf_pages +t1 ind2 size +t1 ind3 n_diff_pfx01 +t1 ind3 n_diff_pfx02 +t1 ind3 n_leaf_pages +t1 ind3 size +UPDATE t1 SET a = 1 WHERE c = 'foo'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/instant_alter_index_rename.test b/mysql-test/suite/innodb/t/instant_alter_index_rename.test index dd6cee7c860..af66c1027cc 100644 --- a/mysql-test/suite/innodb/t/instant_alter_index_rename.test +++ b/mysql-test/suite/innodb/t/instant_alter_index_rename.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_sequence.inc delimiter |; create function get_index_id(tbl_id int, index_name char(100)) @@ -207,3 +208,22 @@ CHECK TABLE t1 EXTENDED ; DROP TABLE t1; DROP FUNCTION get_index_id; + +--echo # +--echo # MDEV-23356 InnoDB: Failing assertion: field->col->mtype == type, crash or ASAN failures in row_sel_convert_mysql_key_to_innobase, InnoDB indexes are inconsistent after INDEX changes +--echo # + +CREATE TABLE t1 (a INT, b INT, c CHAR(8), + KEY ind1(c), KEY ind2(b)) ENGINE=InnoDB STATS_PERSISTENT=1; + +INSERT INTO t1 SELECT 1, 1, 'a' FROM seq_1_to_100; + +SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; + +ALTER TABLE t1 DROP INDEX ind2, ADD INDEX ind3(b), + DROP INDEX ind1, ADD INDEX ind2(c); + +SELECT table_name, index_name, stat_name FROM mysql.innodb_index_stats; + +UPDATE t1 SET a = 1 WHERE c = 'foo'; +DROP TABLE t1; -- cgit v1.2.1 From 6a614d6934a85e8228957fe1d7242928a00dc5ff Mon Sep 17 00:00:00 2001 From: mkaruza Date: Wed, 21 Oct 2020 09:48:52 +0200 Subject: MDEV-22707: galera got stuck after flush tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deadlock is possible between applier thread and local committing thread with active FLUSH TABLE. Applier thread should skip table share checks and locks when opening table. Reviewed-by: Jan Lindström --- mysql-test/suite/galera/r/MDEV-22707.result | 26 +++++++++++++++ mysql-test/suite/galera/t/MDEV-22707.test | 51 +++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 mysql-test/suite/galera/r/MDEV-22707.result create mode 100644 mysql-test/suite/galera/t/MDEV-22707.test (limited to 'mysql-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; -- cgit v1.2.1 From 97b10b7fdc268c25dc52d1e960b1f89b1c7db38c Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Tue, 27 Oct 2020 18:55:22 +0700 Subject: MDEV-22805: SIGSEGV in check_fields on UPDATE For debug build of MariaDB server running of the following test case will hit the assert `thd->lex->sql_command == SQLCOM_UPDATE' in the function check_fields() on attempt to execute the UPDATE statement. CREATE TABLE t1 (a INT); UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT 1 FROM t1) TO 2 SET a = 1; Stack trace to the fired assert statement DBUG_ASSERT(thd->lex->sql_command == SQLCOM_UPDATE) listed below: mysql_execute_command() -> mysql_multi_update_prepare() --> Multiupdate_prelocking_strategy::handle_end() --> check_fiels() It's worth to note that this stack trace looks like a multi update statement is being executed. The fired assert is checked inside the function check_fields() in case table->has_period() returns the value true that in turns happens when temporal period specified in the UPDATE statement. Condition specified in the DEBUG_ASSERT statement returns the false value since the data member thd->lex->sql_command have the value SQLCOM_UPDATE_MULTI. So, the main question is why a program control flow go to the path prescribed for handling MULTI update statement despite of the fact that the ordinary UPDATE statement being executed. The answer is a way that SQL grammar rules written. When the statement UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT 1 FROM t1) TO 2 SET a = 1; being parsed an action for the rule 'table_primary_ident' (part of this action is listed below to simplify description) is invoked to handle the table name 't1' specified in the clause 'SELECT 1 FROM t1'. table_primary_ident: table_ident opt_use_partition opt_for_system_time_clause opt_table_alias_clause opt_key_definition { SELECT_LEX *sel= Select; sel->table_join_options= 0; if (!($$= Select->add_table_to_list(thd, $1, $4, This action calls the method st_select_lex::add_table_to_list() to add the table name 't1' to the list of tables being used by the statement. Later, an action for the following grammar rule update_table_list: table_ident opt_use_partition for_portion_of_time_clause opt_table_alias_clause opt_key_definition { SELECT_LEX *sel= Select; sel->table_join_options= 0; if (!($$= Select->add_table_to_list(thd, $1, $4, is invoked to handle the clause 't1 FOR PORTION OF APPTIME FROM ... TO 2'. This action also calls the method st_select_lex::add_table_to_list() to add the table name 't1' to the list of tables being used by the statement. In result the table name 't1' contained twice in this list. Presence of duplicate names for the table 't1' in a list of table used by a statement leads to the fact that the function unique_table() called from the function mysql_update() returns the value true that forces implementation of the function mysql_update() to return the value 2 as a signal to fall through the case boundary of the switch statement placed in the function mysql_execute_statement() and start handling of the case for sql_command SQLCOM_UPDATE_MULTI. The compound statement block for the case SQLCOM_UPDATE_MULTI invokes the function mysql_multi_update_prepare() that executes the statement set thd->lex->sql_command= SQLCOM_UPDATE_MULTI; and after that calls the method Multiupdate_prelocking_strategy::handle_end(). Finally, this method invokes the check_field() function and assert is fired. The above analysis shows that update for a table that simultaneously specified both as a destination table of UPDATE statement and as a table taking part in subquery is actually treated by MariaDB server as multi-update statement. Taking into account that multi-update statement for temporal period table is not supported yet by MariaDB, correct way to fix the bug is to return the error ER_NOT_SUPPORTED_YET for this case. --- mysql-test/suite/period/r/update.result | 12 ++++++++++++ mysql-test/suite/period/t/update.test | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/period/r/update.result b/mysql-test/suite/period/r/update.result index b02c075560e..b61d8a73b83 100644 --- a/mysql-test/suite/period/r/update.result +++ b/mysql-test/suite/period/r/update.result @@ -292,3 +292,15 @@ Warning 1264 Out of range value for column 'id' at row 1 Warning 1264 Out of range value for column 'id' at row 2 update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1; drop table t1; +# +# MDEV-22805 SIGSEGV in check_fields on UPDATE (optimized builds) | Assertion `thd->lex->sql_command == SQLCOM_UPDATE' failed. +# +CREATE TABLE t1 (a INT, b DATE, c DATE, PERIOD FOR APPTIME(b, c)); +INSERT INTO t1 VALUES(1, '1999-01-01', '2018-12-12'); +UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100; +ERROR 42000: This version of MariaDB doesn't yet support 'updating and querying the same temporal periods table' +CREATE VIEW v1 AS SELECT * FROM t1; +UPDATE v1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100; +ERROR 42S02: 'v1' is a view +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/suite/period/t/update.test b/mysql-test/suite/period/t/update.test index d4a2080ea0a..66d3bc1e9bf 100644 --- a/mysql-test/suite/period/t/update.test +++ b/mysql-test/suite/period/t/update.test @@ -183,3 +183,21 @@ update ignore t1 set id = 2429681664; update ignore t1 for portion of p from '1995-07-06' to '2009-01-12' set f = 1; drop table t1; + +--echo # +--echo # MDEV-22805 SIGSEGV in check_fields on UPDATE (optimized builds) | Assertion `thd->lex->sql_command == SQLCOM_UPDATE' failed. +--echo # +CREATE TABLE t1 (a INT, b DATE, c DATE, PERIOD FOR APPTIME(b, c)); + +INSERT INTO t1 VALUES(1, '1999-01-01', '2018-12-12'); + +# Without a patch the following statement crashs a server built in debug mode +--error ER_NOT_SUPPORTED_YET +UPDATE t1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100; + +CREATE VIEW v1 AS SELECT * FROM t1; +--error ER_IT_IS_A_VIEW +UPDATE v1 FOR PORTION OF APPTIME FROM (SELECT '1999-01-01' FROM t1 WHERE a=2) TO '2018-01-01' SET a = 100; + +DROP VIEW v1; +DROP TABLE t1; -- cgit v1.2.1 From 8761571a71f0d628c5a82abed115e170d63e34c0 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Tue, 27 Oct 2020 00:30:39 +0400 Subject: MDEV-22524 SIGABRT in safe_mutex_unlock with session_track_system_variables and max_relay_log_size. lock LOCK_global_system_variables around the get_one_variable() call in the Session_sysvars_tracker::store_variable(). --- mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result | 2 ++ mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test | 2 ++ 2 files changed, 4 insertions(+) (limited to 'mysql-test') 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 7162e40ef6b..c9e4a0f7dca 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 @@ -159,6 +159,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/t/session_track_system_variables_basic.test b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test index 90e6052947c..13423f4404d 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 @@ -122,6 +122,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; -- cgit v1.2.1 From 42e1815ad850384fad292534665ff61b78dd96f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 27 Oct 2020 15:35:04 +0200 Subject: MDEV-16952 Introduce SET GLOBAL innodb_max_purge_lag_wait Let us introduce a dummy variable innodb_max_purge_lag_wait for waiting that the InnoDB history list length is below the user-specified limit. Specifically, SET GLOBAL innodb_max_purge_lag_wait=0; should wait for all history to be purged. This could be useful when upgrading from an older version to MariaDB 10.3 or later, to avoid hitting MDEV-15912. Note: the history cannot be purged if there exist transactions that may see old versions. Reviewed by: Vladislav Vaintroub --- .../suite/innodb/include/wait_all_purged.inc | 24 ++++++++-------------- mysql-test/suite/sys_vars/r/sysvars_innodb.result | 12 +++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'mysql-test') 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/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index d3d30f8f53f..89138c2fedd 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -1686,6 +1686,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 -- cgit v1.2.1 From e183aec1d75ea7b424ebe237e6b1643961903f2d Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Tue, 27 Oct 2020 12:16:53 +0100 Subject: MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL Reviewed-by: wlad@mariadb.com --- mysql-test/suite/sql_sequence/next.result | 5 +++++ mysql-test/suite/sql_sequence/next.test | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/sql_sequence/next.result b/mysql-test/suite/sql_sequence/next.result index fe761baa032..76991fbe68c 100644 --- a/mysql-test/suite/sql_sequence/next.result +++ b/mysql-test/suite/sql_sequence/next.result @@ -541,5 +541,10 @@ CREATE VIEW v AS SELECT 1; LOCK TABLE v READ; SELECT NEXT VALUE FOR v; ERROR 42S02: 'test.v' is not a SEQUENCE +# +# MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL +# +SELECT SETVAL (v,0); +ERROR 42S02: 'test.v' is not a SEQUENCE UNLOCK TABLES; DROP VIEW v; diff --git a/mysql-test/suite/sql_sequence/next.test b/mysql-test/suite/sql_sequence/next.test index 5eac3b668ba..9f0eebdf774 100644 --- a/mysql-test/suite/sql_sequence/next.test +++ b/mysql-test/suite/sql_sequence/next.test @@ -288,5 +288,12 @@ CREATE VIEW v AS SELECT 1; LOCK TABLE v READ; --error ER_NOT_SEQUENCE SELECT NEXT VALUE FOR v; + +--echo # +--echo # MDEV-24018: SIGSEGV in Item_func_nextval::update_table on SELECT SETVAL +--echo # +--error ER_NOT_SEQUENCE +SELECT SETVAL (v,0); + UNLOCK TABLES; DROP VIEW v; -- cgit v1.2.1 From afc9d00c66db946c8240fe1fa6b345a3a8b6fec1 Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Tue, 27 Oct 2020 12:24:55 +0300 Subject: MDEV-23991 dict_table_stats_lock() has unnecessarily long scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch removes dict_index_t::stats_latch. Table/index statistics now protected with dict_sys->mutex. That way statistics computation can happen in parallel in several threads and dict_sys->mutex will be locked only for a short period of time. This patch is a joint work with Marko Mäkelä dict_index_t::lock: make mutable which allows to pass const pointer when only lock is touched in an object btr_height_get() btr_get_size(): make index argument const for better type safety btr_estimate_number_of_different_key_vals(): now returns computed values instead of setting fields in dict_index_t directly remove everything related to dict_index_t::stats_latch dict_stats_index_set_n_diff(): now returns computed values instead of setting fields in dict_index_t directly dict_stats_analyze_index(): now returns computed values instead of setting fields in dict_index_t directly Reviewed by: Marko Mäkelä --- mysql-test/suite/innodb/r/stats_persistent.result | 18 +++++++++++++++ mysql-test/suite/innodb/t/stats_persistent.test | 27 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 mysql-test/suite/innodb/r/stats_persistent.result create mode 100644 mysql-test/suite/innodb/t/stats_persistent.test (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/stats_persistent.result b/mysql-test/suite/innodb/r/stats_persistent.result new file mode 100644 index 00000000000..c96afb41af2 --- /dev/null +++ b/mysql-test/suite/innodb/r/stats_persistent.result @@ -0,0 +1,18 @@ +# +# MDEV-23991 dict_table_stats_lock() has unnecessarily long scope +# +CREATE TABLE t1(a INT) ENGINE=INNODB STATS_PERSISTENT=1; +SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go'; +ANALYZE TABLE t1; +connect con1, localhost, root; +SET DEBUG_SYNC='now WAIT_FOR stop'; +SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB'; +ENGINE SUM(DATA_LENGTH+INDEX_LENGTH) COUNT(ENGINE) SUM(DATA_LENGTH) SUM(INDEX_LENGTH) +InnoDB 49152 3 49152 0 +SET DEBUG_SYNC='now SIGNAL go'; +disconnect con1; +connection default; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/stats_persistent.test b/mysql-test/suite/innodb/t/stats_persistent.test new file mode 100644 index 00000000000..ac412d56d0d --- /dev/null +++ b/mysql-test/suite/innodb/t/stats_persistent.test @@ -0,0 +1,27 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/count_sessions.inc + +--echo # +--echo # MDEV-23991 dict_table_stats_lock() has unnecessarily long scope +--echo # +CREATE TABLE t1(a INT) ENGINE=INNODB STATS_PERSISTENT=1; + +SET DEBUG_SYNC='dict_stats_update_persistent SIGNAL stop WAIT_FOR go'; +--send ANALYZE TABLE t1 + +--connect(con1, localhost, root) +SET DEBUG_SYNC='now WAIT_FOR stop'; + +SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE ENGINE='InnoDB'; + +SET DEBUG_SYNC='now SIGNAL go'; +--disconnect con1 + +--connection default +--reap +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t1; + +--source include/wait_until_count_sessions.inc -- cgit v1.2.1 From 46c273892eb56d3ebd1fbfcdd06e5ce337ce30e7 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 8 Oct 2020 13:15:18 +0200 Subject: MDEV-23623 - Fix assertion in MTR test galera_sr.GCF-1051 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix assertion `thd->in_active_multi_stmt_transaction() || thd->m_transaction_psi == __null' failed on MTR test galera_sr.GCF-1051. Add a new MTR test MDEV-23623 that reproduces the issue deterministically and update wsrep-lib submodule, containing the actual fix. Reviewed-by: Jan Lindström --- mysql-test/suite/galera_sr/r/MDEV-23623.result | 26 ++++++++++++++ mysql-test/suite/galera_sr/t/MDEV-23623.test | 50 ++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 mysql-test/suite/galera_sr/r/MDEV-23623.result create mode 100644 mysql-test/suite/galera_sr/t/MDEV-23623.test (limited to 'mysql-test') diff --git a/mysql-test/suite/galera_sr/r/MDEV-23623.result b/mysql-test/suite/galera_sr/r/MDEV-23623.result new file mode 100644 index 00000000000..edba2a16bcb --- /dev/null +++ b/mysql-test/suite/galera_sr/r/MDEV-23623.result @@ -0,0 +1,26 @@ +connection node_2; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB; +INSERT INTO t1 (f2) VALUES ('a'); +INSERT INTO t1 (f2) VALUES ('b'); +INSERT INTO t1 (f2) VALUES ('c'); +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,after_certify_apply_monitor_enter'; +connection node_2; +SET SESSION wsrep_retry_autocommit = 0; +SET SESSION wsrep_trx_fragment_size = 64; +DELETE FROM t1 ORDER BY f1 DESC LIMIT 2;; +connection node_2a; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +connection node_1; +INSERT INTO t1 (f2) VALUES ('d'),('e'); +connection node_2a; +SET GLOBAL wsrep_provider_options = 'signal=after_certify_apply_monitor_enter'; +SET GLOBAL wsrep_provider_options = 'dbug='; +connection node_2; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/MDEV-23623.test b/mysql-test/suite/galera_sr/t/MDEV-23623.test new file mode 100644 index 00000000000..2fe728f42bb --- /dev/null +++ b/mysql-test/suite/galera_sr/t/MDEV-23623.test @@ -0,0 +1,50 @@ +# +# MDEV-23623 - trans_commit_stmt(THD*): Assertion +# `thd->in_active_multi_stmt_transaction() || +# thd->m_transaction_psi == __null' failed +# + +--source include/galera_cluster.inc +--source include/have_debug_sync.inc +--source include/galera_have_debug_sync.inc + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB; +INSERT INTO t1 (f2) VALUES ('a'); +INSERT INTO t1 (f2) VALUES ('b'); +INSERT INTO t1 (f2) VALUES ('c'); + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connection node_2a +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = after_certify_apply_monitor_enter +--source include/galera_set_sync_point.inc + +--connection node_2 +SET SESSION wsrep_retry_autocommit = 0; +SET SESSION wsrep_trx_fragment_size = 64; +--send DELETE FROM t1 ORDER BY f1 DESC LIMIT 2; + +--connection node_2a +--source include/galera_wait_sync_point.inc + +# +# This is going to cause a certification +# failure on node_2 +# +--connection node_1 +INSERT INTO t1 (f2) VALUES ('d'),('e'); + +--connection node_2a +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc + +--connection node_2 +--error ER_LOCK_DEADLOCK +--reap + +# +# Assertion would happen when the following +# DROP TABLE is applied on node_2 +# +--connection node_1 +DROP TABLE t1; -- cgit v1.2.1 From ec0e9d6f76b1715bb7e229f8361b42476c016734 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Sun, 25 Oct 2020 11:17:27 +0200 Subject: MDEV-22681 EXECUTE IMMEDIATE crashes server if wsrep is on. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A wsrep transaction was started for EXECUTE IMMEDIATE, which caused assertion failure when the executed statement was CREATE TABLE which should be executed in TOI mode. As a fix, don't start wsrep transaction for EXECUTE IMMEDIATE to let the wsrep state logic to be handled from inside stored procedure codepath. Reviewed-by: Jan Lindström --- .../galera/r/galera_var_replicate_myisam_on.result | 133 ++++++++++++++++++++- .../galera/t/galera_var_replicate_myisam_on.test | 80 +++++++++++++ mysql-test/suite/wsrep/r/mdev_22681.result | 3 + mysql-test/suite/wsrep/t/mdev_22681.cnf | 10 ++ mysql-test/suite/wsrep/t/mdev_22681.test | 15 +++ 5 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/wsrep/r/mdev_22681.result create mode 100644 mysql-test/suite/wsrep/t/mdev_22681.cnf create mode 100644 mysql-test/suite/wsrep/t/mdev_22681.test (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result index 716af033e7a..ad28f5a426e 100644 --- a/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result +++ b/mysql-test/suite/galera/r/galera_var_replicate_myisam_on.result @@ -107,6 +107,135 @@ i 1 DROP TABLE t1; connection node_1; -SET GLOBAL wsrep_replicate_myisam = 0; +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM; +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +PREPARE upd from 'update t1 set b = 100 where id = 5'; +PREPARE ins from 'insert into t1 values (11,11)'; +PREPARE del from 'delete from t1 where id = 4'; +PREPARE rep from 'replace into t1 values (12,12),(6,600)'; +EXECUTE upd; +EXECUTE ins; +EXECUTE del; +EXECUTE rep; +SELECT * FROM t1 ORDER BY id; +id b +1 1 +2 2 +3 3 +5 100 +6 600 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +connection node_2; +SELECT * FROM t1 ORDER BY id; +id b +1 1 +2 2 +3 3 +5 100 +6 600 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +DROP TABLE t1; +connection node_1; +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM; +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +CREATE PROCEDURE proc() +BEGIN +UPDATE t1 set b = 100 WHERE id = 5; +INSERT INTO t1 VALUES (11,11); +DELETE FROM t1 WHERE id = 4; +REPLACE INTO t1 VALUES (12,12),(6,600); +COMMIT; +END| +CALL proc(); +SELECT * FROM t1 ORDER BY id; +id b +1 1 +2 2 +3 3 +5 100 +6 600 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +connection node_2; +SELECT * FROM t1 ORDER BY id; +id b +1 1 +2 2 +3 3 +5 100 +6 600 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +DROP PROCEDURE proc; +DROP TABLE t1; +connection node_1; +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM; +CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT) ENGINE=MyISAM; +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.b); +CREATE TRIGGER tr2 BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b),(NULL, NEW.b); +CREATE TRIGGER tr3 BEFORE DELETE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b); +INSERT INTO t1 VALUES (11,11); +UPDATE t1 SET b = 200 WHERE id = 2; +DELETE FROM t1 where id = 5; +SELECT * FROM t1 ORDER BY id; +id b +1 1 +2 200 +3 3 +4 4 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +SELECT * FROM t2 ORDER BY id; +id b +1 11 +2 2 +3 200 +4 5 +connection node_2; +SELECT * FROM t1 ORDER BY id; +id b +1 1 +2 200 +3 3 +4 4 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +SELECT * FROM t2 ORDER BY id; +id b +1 11 +2 2 +3 200 +4 5 +DROP TRIGGER tr1; +DROP TRIGGER tr2; +DROP TRIGGER tr3; +DROP TABLE t1,t2; +connection node_1; connection node_2; -SET GLOBAL wsrep_replicate_myisam = 0; diff --git a/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test b/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test index 90c786f0af0..adb5cb04273 100644 --- a/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test +++ b/mysql-test/suite/galera/t/galera_var_replicate_myisam_on.test @@ -142,8 +142,88 @@ INSERT INTO t1 VALUES(1); SELECT * FROM t1; DROP TABLE t1; +# +# Test prepared staments +# +--connection node_1 +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM; +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); + +PREPARE upd from 'update t1 set b = 100 where id = 5'; +PREPARE ins from 'insert into t1 values (11,11)'; +PREPARE del from 'delete from t1 where id = 4'; +PREPARE rep from 'replace into t1 values (12,12),(6,600)'; + +EXECUTE upd; +EXECUTE ins; +EXECUTE del; +EXECUTE rep; + +SELECT * FROM t1 ORDER BY id; + +--connection node_2 +SELECT * FROM t1 ORDER BY id; + +DROP TABLE t1; + +# +# Test procedure +# +--connection node_1 +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM; +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); + +DELIMITER |; +CREATE PROCEDURE proc() +BEGIN + UPDATE t1 set b = 100 WHERE id = 5; + INSERT INTO t1 VALUES (11,11); + DELETE FROM t1 WHERE id = 4; + REPLACE INTO t1 VALUES (12,12),(6,600); + COMMIT; +END| +DELIMITER ;| + +CALL proc(); +SELECT * FROM t1 ORDER BY id; + +--connection node_2 +SELECT * FROM t1 ORDER BY id; + +DROP PROCEDURE proc; +DROP TABLE t1; + +# +# Test trigger +# +--connection node_1 +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, b INT) ENGINE=MyISAM; +CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT) ENGINE=MyISAM; +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10); +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, NEW.b); +CREATE TRIGGER tr2 BEFORE UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b),(NULL, NEW.b); +CREATE TRIGGER tr3 BEFORE DELETE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NULL, OLD.b); + +INSERT INTO t1 VALUES (11,11); +UPDATE t1 SET b = 200 WHERE id = 2; +DELETE FROM t1 where id = 5; +SELECT * FROM t1 ORDER BY id; +SELECT * FROM t2 ORDER BY id; + +--connection node_2 +SELECT * FROM t1 ORDER BY id; +SELECT * FROM t2 ORDER BY id; +DROP TRIGGER tr1; +DROP TRIGGER tr2; +DROP TRIGGER tr3; +DROP TABLE t1,t2; + --connection node_1 +--disable_query_log --eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig +--enable_query_log --connection node_2 +--disable_query_log --eval SET GLOBAL wsrep_replicate_myisam = $wsrep_replicate_myisam_orig +--enable_query_log diff --git a/mysql-test/suite/wsrep/r/mdev_22681.result b/mysql-test/suite/wsrep/r/mdev_22681.result new file mode 100644 index 00000000000..ecce324ead6 --- /dev/null +++ b/mysql-test/suite/wsrep/r/mdev_22681.result @@ -0,0 +1,3 @@ +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b'; +DROP TABLE t1; diff --git a/mysql-test/suite/wsrep/t/mdev_22681.cnf b/mysql-test/suite/wsrep/t/mdev_22681.cnf new file mode 100644 index 00000000000..2f310476733 --- /dev/null +++ b/mysql-test/suite/wsrep/t/mdev_22681.cnf @@ -0,0 +1,10 @@ +!include ../my.cnf + +[mysqld.1] +wsrep-on=ON +log-bin +binlog-format=ROW +innodb-flush-log-at-trx-commit=1 +wsrep-cluster-address=gcomm:// +wsrep-provider=@ENV.WSREP_PROVIDER +innodb-autoinc-lock-mode=2 diff --git a/mysql-test/suite/wsrep/t/mdev_22681.test b/mysql-test/suite/wsrep/t/mdev_22681.test new file mode 100644 index 00000000000..ce1129c7485 --- /dev/null +++ b/mysql-test/suite/wsrep/t/mdev_22681.test @@ -0,0 +1,15 @@ +# +# MDEV-22681: Server crashes in galera::ReplicatorSMM::CommitOrder::CommitOrder +# or assertion failed in wsrep::transaction::before_prepare. +# +# EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b' +# crashes the server if binlog is on (see mdev_22681.cnf for configuration). +# +--source include/have_wsrep.inc +--source include/have_wsrep_provider.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 ENGINE=InnoDB AS SELECT 1 AS b'; + +DROP TABLE t1; -- cgit v1.2.1