config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/funcs_1/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/funcs_1/r/myisam_func_view.result

SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
Warnings:
Warning	3090	Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
SET timestamp=UNIX_TIMESTAMP('2010-01-01');
DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values;
DROP VIEW  IF EXISTS v1;
CREATE TABLE t1_values
(
id BIGINT AUTO_INCREMENT,
select_id BIGINT,
PRIMARY KEY(id)
) ENGINE = <engine_to_be_tested>;
ALTER TABLE t1_values ADD my_char_30        CHAR(30);
ALTER TABLE t1_values ADD my_varchar_1000   VARCHAR(1000);
ALTER TABLE t1_values ADD my_binary_30      BINARY(30);
ALTER TABLE t1_values ADD my_varbinary_1000 VARBINARY(1000);
ALTER TABLE t1_values ADD my_datetime       DATETIME;
ALTER TABLE t1_values ADD my_date           DATE;
ALTER TABLE t1_values ADD ts_dummy          TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1_values ADD my_timestamp      TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE t1_values ADD my_time           TIME;
ALTER TABLE t1_values ADD my_year           YEAR;
ALTER TABLE t1_values ADD my_bigint         BIGINT;
ALTER TABLE t1_values ADD my_double         DOUBLE;
ALTER TABLE t1_values ADD my_decimal        DECIMAL(64,30);
SET sql_mode = default;
SET sql_mode = 'traditional';
INSERT INTO t1_values SET id = 0;
INSERT INTO t1_values SET
my_char_30 = '',
my_varchar_1000 = '',
my_binary_30 = '',
my_varbinary_1000 = '',
my_datetime = '0001-01-01 00:00:00',
my_date = '0001-01-01',
my_timestamp = '1970-01-01 03:00:01',
my_time = '-838:59:59',
my_year = '1901',
my_bigint = -9223372036854775808,
my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = -1.7976931348623E+308;
INSERT INTO t1_values SET
my_char_30 = '<--------30 characters------->',
my_varchar_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'),
my_binary_30 = '<--------30 characters------->',
my_varbinary_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'),
my_datetime = '9999-12-31 23:59:59',
my_date = '9999-12-31',
my_timestamp = '2038-01-01 02:59:59',
my_time = '838:59:59',
my_year = 2155,
my_bigint = 9223372036854775807,
my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = 1.7976931348623E+308;
INSERT INTO t1_values SET
my_char_30 = ' ---äÖüß@µ*$-- ',
my_varchar_1000 = ' ---äÖüß@µ*$-- ',
my_binary_30 = ' ---äÖüß@µ*$-- ',
my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
my_datetime = '2004-02-29 23:59:59',
my_date = '2004-02-29',
my_timestamp = '2004-02-29 23:59:59',
my_time = '13:00:00',
my_year = 2000,
my_bigint = 0,  	
my_decimal = 0.0,
my_double = 0;
INSERT INTO t1_values SET
my_char_30 = '-1',
my_varchar_1000 = '-1',
my_binary_30 = '-1',
my_varbinary_1000 = '-1',
my_datetime = '2005-06-28 10:00:00',
my_date = '2005-06-28',
my_timestamp = '2005-06-28 10:00:00',
my_time = '10:00:00',
my_year = 2005,
my_bigint = -1,
my_decimal = -1.000000000000000000000000000000,
my_double = -0.1E+1;
PREPARE ins_sel_with_result FROM "INSERT INTO t1_selects SET my_select = @my_select,
disable_result = 'No'" ;
PREPARE ins_sel_no_result   FROM "INSERT INTO t1_selects SET my_select = @my_select,
disable_result = 'Yes'" ;
SET sql_mode = 'traditional';
SET @my_select = 'SELECT sqrt(my_bigint), my_bigint, id FROM t1_values';
INSERT INTO t1_values SET select_id = @select_id,
my_bigint = 4;
INSERT INTO t1_values SET select_id = @select_id,
my_bigint = -25;
##### 1.1.1. CAST --> BINARY
##### 1.1.2. CAST --> CHAR
##### 1.1.3. CAST --> DATE
INSERT INTO t1_values SET select_id = @select_id,
my_char_30 = '2005-06-27';
INSERT INTO t1_values SET select_id = @select_id,
my_varchar_1000 = '2005-06-27';
INSERT INTO t1_values SET select_id = @select_id,
my_binary_30 = '2005-06-27';
INSERT INTO t1_values SET select_id = @select_id,
my_varbinary_1000 = '2005-06-27';
INSERT INTO t1_values SET select_id = @select_id,
my_bigint = 20050627;
INSERT INTO t1_values SET select_id = @select_id,
my_double = +20.050627E+6;
##### 1.1.4. CAST --> DATETIME
INSERT INTO t1_values SET select_id = @select_id,
my_char_30 = '2005-06-27 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_varchar_1000 = '2005-06-27 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_binary_30 = '2005-06-27 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_varbinary_1000 = '2005-06-27 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_bigint = 200506271758;
INSERT INTO t1_values SET select_id = @select_id,
my_double = +0.0200506271758E+13;
##### 1.1.5. CAST --> TIME
INSERT INTO t1_values SET select_id = @select_id,
my_char_30 = '1 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_varchar_1000 = '1 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_binary_30 = '1 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_varbinary_1000 = '1 17:58';
INSERT INTO t1_values SET select_id = @select_id,
my_bigint = 1758;
INSERT INTO t1_values SET select_id = @select_id,
my_double = +1.758E+3;
##### 1.1.6. CAST --> DECIMAL
INSERT INTO t1_values SET select_id = @select_id,
my_char_30 = '-3333.3333';
INSERT INTO t1_values SET select_id = @select_id,
my_varchar_1000 = '-3333.3333';
INSERT INTO t1_values SET select_id = @select_id,
my_binary_30 = '-3333.3333';
INSERT INTO t1_values SET select_id = @select_id,
my_varbinary_1000 = '-3333.3333';
INSERT INTO t1_values SET select_id = @select_id,
my_double = -0.33333333E+4;
##### 1.1.7. CAST --> SIGNED INTEGER

"Attention: CAST --> SIGNED INTEGER
            Bug#5913 Traditional mode: BIGINT range not correctly delimited
            Status: To be fixed later"
--------------------------------------------------------------------------------
##### 1.1.8. CAST --> UNSIGNED INTEGER

"Attention: CAST --> UNSIGNED INTEGER
            The file with expected results suffers from Bug 5913"
--------------------------------------------------------------------------------

some statements disabled because of
Bug#5913 Traditional mode: BIGINT range not correctly delimited
--------------------------------------------------------------------------------
SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_binary_30),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LCASE(my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select =
'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
SET @my_select =
'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
SET @my_select =
'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
SET @my_select =
'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_char_30),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values';
SET @my_select =
'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt'')
           AS my_col,
        id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_binary_30),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_varbinary_1000),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_char_30, my_char_30 ),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_char_30, my_varchar_1000 ),
my_char_30, my_varchar_1000 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_char_30, my_binary_30 ),
my_char_30, my_binary_30 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_char_30, my_varbinary_1000 ),
my_char_30, my_varbinary_1000 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_char_30 ),
my_varchar_1000, my_char_30 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_binary_30 ),
my_varchar_1000, my_binary_30 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
my_varchar_1000, my_varbinary_1000 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_binary_30, my_binary_30 ),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_binary_30, my_char_30 ),
my_binary_30, my_char_30 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_binary_30, my_varchar_1000 ),
my_binary_30, my_varchar_1000 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
my_binary_30, my_varbinary_1000 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_char_30 ),
my_varbinary_1000, my_char_30 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
my_varbinary_1000, my_varchar_1000 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
my_varbinary_1000, my_binary_30 id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', my_char_30, 3),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', my_varchar_1000, 3),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', my_binary_30, 3),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', my_varbinary_1000, 3),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_bigint),
my_bigint, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_double),
my_double, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''-'', '' - -ABC'', my_decimal),
my_decimal, id FROM t1_values';
SET @my_select = 'SELECT LOWER(my_char_30),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOWER(my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LOWER(my_binary_30),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LOWER(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT LTRIM(my_char_30),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LTRIM(my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LTRIM(my_binary_30),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LTRIM(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values';
SET @my_select =
'SELECT CONCAT(''A'',my_char_30), my_char_30, id FROM t1_values';
SET @my_select = 'SELECT my_char_30, id FROM t1_values';
INSERT INTO t1_values SET select_id = @select_id,
my_char_30 = 'Viana do Castelo';
SET sql_mode = '';
Warnings:
Warning	3090	Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.

"# The basic preparations end and the main test starts here"
--------------------------------------------------------------------------------
CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values;
SELECT my_char_30, id FROM t1_values
WHERE select_id = 193 OR select_id IS NULL order by id;
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_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 193 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values;
SELECT CONCAT('A',my_char_30), my_char_30, id FROM t1_values
WHERE select_id = 192 OR select_id IS NULL order by id;
CONCAT('A',my_char_30)	my_char_30	id
NULL	NULL	1
A		2
A<--------30 characters------->	<--------30 characters------->	3
A ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
A-1	-1	5
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 concat('A',`t1_values`.`my_char_30`) AS `CONCAT('A',my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 192 OR select_id IS NULL) order by id;
CONCAT('A',my_char_30)	my_char_30	id
NULL	NULL	1
A		2
A<--------30 characters------->	<--------30 characters------->	3
A ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
A-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LTRIM(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values;
SELECT LTRIM(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 191 OR select_id IS NULL order by id;
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 ltrim(`t1_values`.`my_varbinary_1000`) AS `LTRIM(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 191 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LTRIM(my_binary_30),
my_binary_30, id FROM t1_values;
SELECT LTRIM(my_binary_30),
my_binary_30, id FROM t1_values
WHERE select_id = 190 OR select_id IS NULL order by id;
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 ltrim(`t1_values`.`my_binary_30`) AS `LTRIM(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 190 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LTRIM(my_varchar_1000),
my_varchar_1000, id FROM t1_values;
SELECT LTRIM(my_varchar_1000),
my_varchar_1000, id FROM t1_values
WHERE select_id = 189 OR select_id IS NULL order by id;
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 ltrim(`t1_values`.`my_varchar_1000`) AS `LTRIM(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 189 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LTRIM(my_char_30),
my_char_30, id FROM t1_values;
SELECT LTRIM(my_char_30),
my_char_30, id FROM t1_values
WHERE select_id = 188 OR select_id IS NULL order by id;
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 ltrim(`t1_values`.`my_char_30`) AS `LTRIM(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 188 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOWER(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values;
SELECT LOWER(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 187 OR select_id IS NULL order by id;
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 lower(`t1_values`.`my_varbinary_1000`) AS `LOWER(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 187 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOWER(my_binary_30),
my_binary_30, id FROM t1_values;
SELECT LOWER(my_binary_30),
my_binary_30, id FROM t1_values
WHERE select_id = 186 OR select_id IS NULL order by id;
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 lower(`t1_values`.`my_binary_30`) AS `LOWER(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 186 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOWER(my_varchar_1000),
my_varchar_1000, id FROM t1_values;
SELECT LOWER(my_varchar_1000),
my_varchar_1000, id FROM t1_values
WHERE select_id = 185 OR select_id IS NULL order by id;
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 lower(`t1_values`.`my_varchar_1000`) AS `LOWER(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 185 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOWER(my_char_30),
my_char_30, id FROM t1_values;
SELECT LOWER(my_char_30),
my_char_30, id FROM t1_values
WHERE select_id = 184 OR select_id IS NULL order by id;
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 lower(`t1_values`.`my_char_30`) AS `LOWER(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 184 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_decimal),
my_decimal, id FROM t1_values;
SELECT LOCATE('-', ' - -ABC', my_decimal),
my_decimal, id FROM t1_values
WHERE select_id = 183 OR select_id IS NULL order by id;
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 locate('-',' - -ABC',`t1_values`.`my_decimal`) AS `LOCATE('-', ' - -ABC', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 183 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_double),
my_double, id FROM t1_values;
SELECT LOCATE('-', ' - -ABC', my_double),
my_double, id FROM t1_values
WHERE select_id = 182 OR select_id IS NULL order by id;
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 locate('-',' - -ABC',`t1_values`.`my_double`) AS `LOCATE('-', ' - -ABC', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 182 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', ' - -ABC', my_bigint),
my_bigint, id FROM t1_values;
SELECT LOCATE('-', ' - -ABC', my_bigint),
my_bigint, id FROM t1_values
WHERE select_id = 181 OR select_id IS NULL order by id;
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 locate('-',' - -ABC',`t1_values`.`my_bigint`) AS `LOCATE('-', ' - -ABC', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 181 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', my_varbinary_1000, 3),
my_varbinary_1000, id FROM t1_values;
SELECT LOCATE('-', my_varbinary_1000, 3),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 180 OR select_id IS NULL order by id;
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 locate('-',`t1_values`.`my_varbinary_1000`,3) AS `LOCATE('-', my_varbinary_1000, 3)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 180 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', my_binary_30, 3),
my_binary_30, id FROM t1_values;
SELECT LOCATE('-', my_binary_30, 3),
my_binary_30, id FROM t1_values
WHERE select_id = 179 OR select_id IS NULL order by id;
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 locate('-',`t1_values`.`my_binary_30`,3) AS `LOCATE('-', my_binary_30, 3)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 179 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', my_varchar_1000, 3),
my_varchar_1000, id FROM t1_values;
SELECT LOCATE('-', my_varchar_1000, 3),
my_varchar_1000, id FROM t1_values
WHERE select_id = 178 OR select_id IS NULL order by id;
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 locate('-',`t1_values`.`my_varchar_1000`,3) AS `LOCATE('-', my_varchar_1000, 3)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 178 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('-', my_char_30, 3),
my_char_30, id FROM t1_values;
SELECT LOCATE('-', my_char_30, 3),
my_char_30, id FROM t1_values
WHERE select_id = 177 OR select_id IS NULL order by id;
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 locate('-',`t1_values`.`my_char_30`,3) AS `LOCATE('-', my_char_30, 3)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 177 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
my_varbinary_1000, my_binary_30 id FROM t1_values;
SELECT LOCATE(my_varbinary_1000, my_binary_30 ),
my_varbinary_1000, my_binary_30 id FROM t1_values
WHERE select_id = 176 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varbinary_1000, my_binary_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 176 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
my_varbinary_1000, my_varchar_1000 id FROM t1_values;
SELECT LOCATE(my_varbinary_1000, my_varchar_1000 ),
my_varbinary_1000, my_varchar_1000 id FROM t1_values
WHERE select_id = 175 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varbinary_1000, my_varchar_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 175 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_char_30 ),
my_varbinary_1000, my_char_30 id FROM t1_values;
SELECT LOCATE(my_varbinary_1000, my_char_30 ),
my_varbinary_1000, my_char_30 id FROM t1_values
WHERE select_id = 174 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varbinary_1000, my_char_30 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 174 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
my_varbinary_1000, id FROM t1_values;
SELECT LOCATE(my_varbinary_1000, my_varbinary_1000 ),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 173 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varbinary_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varbinary_1000, my_varbinary_1000 )`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 173 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
my_binary_30, my_varbinary_1000 id FROM t1_values;
SELECT LOCATE(my_binary_30, my_varbinary_1000 ),
my_binary_30, my_varbinary_1000 id FROM t1_values
WHERE select_id = 172 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_binary_30, my_varbinary_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 172 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_varchar_1000 ),
my_binary_30, my_varchar_1000 id FROM t1_values;
SELECT LOCATE(my_binary_30, my_varchar_1000 ),
my_binary_30, my_varchar_1000 id FROM t1_values
WHERE select_id = 171 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_binary_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_binary_30, my_varchar_1000 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 171 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_char_30 ),
my_binary_30, my_char_30 id FROM t1_values;
SELECT LOCATE(my_binary_30, my_char_30 ),
my_binary_30, my_char_30 id FROM t1_values
WHERE select_id = 170 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_binary_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_binary_30, my_char_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`my_char_30` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 170 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_binary_30, my_binary_30 ),
my_binary_30, id FROM t1_values;
SELECT LOCATE(my_binary_30, my_binary_30 ),
my_binary_30, id FROM t1_values
WHERE select_id = 169 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_binary_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_binary_30, my_binary_30 )`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 169 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
my_varchar_1000, my_varbinary_1000 id FROM t1_values;
SELECT LOCATE(my_varchar_1000, my_varbinary_1000 ),
my_varchar_1000, my_varbinary_1000 id FROM t1_values
WHERE select_id = 168 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_varchar_1000, my_varbinary_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 168 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_binary_30 ),
my_varchar_1000, my_binary_30 id FROM t1_values;
SELECT LOCATE(my_varchar_1000, my_binary_30 ),
my_varchar_1000, my_binary_30 id FROM t1_values
WHERE select_id = 167 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_binary_30`) AS `LOCATE(my_varchar_1000, my_binary_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_binary_30` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 167 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_char_30 ),
my_varchar_1000, my_char_30 id FROM t1_values;
SELECT LOCATE(my_varchar_1000, my_char_30 ),
my_varchar_1000, my_char_30 id FROM t1_values
WHERE select_id = 166 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_char_30`) AS `LOCATE(my_varchar_1000, my_char_30 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`my_char_30` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 166 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
my_varchar_1000, id FROM t1_values;
SELECT LOCATE(my_varchar_1000, my_varchar_1000 ),
my_varchar_1000, id FROM t1_values
WHERE select_id = 165 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_varchar_1000`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_varchar_1000, my_varchar_1000 )`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 165 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varbinary_1000 ),
my_char_30, my_varbinary_1000 id FROM t1_values;
SELECT LOCATE(my_char_30, my_varbinary_1000 ),
my_char_30, my_varbinary_1000 id FROM t1_values
WHERE select_id = 164 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_char_30`,`t1_values`.`my_varbinary_1000`) AS `LOCATE(my_char_30, my_varbinary_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varbinary_1000` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 164 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_binary_30 ),
my_char_30, my_binary_30 id FROM t1_values;
SELECT LOCATE(my_char_30, my_binary_30 ),
my_char_30, my_binary_30 id FROM t1_values
WHERE select_id = 163 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_char_30`,`t1_values`.`my_binary_30`) AS `LOCATE(my_char_30, my_binary_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_binary_30` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 163 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_varchar_1000 ),
my_char_30, my_varchar_1000 id FROM t1_values;
SELECT LOCATE(my_char_30, my_varchar_1000 ),
my_char_30, my_varchar_1000 id FROM t1_values
WHERE select_id = 162 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_char_30`,`t1_values`.`my_varchar_1000`) AS `LOCATE(my_char_30, my_varchar_1000 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`my_varchar_1000` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 162 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE(my_char_30, my_char_30 ),
my_char_30, id FROM t1_values;
SELECT LOCATE(my_char_30, my_char_30 ),
my_char_30, id FROM t1_values
WHERE select_id = 161 OR select_id IS NULL order by id;
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 locate(`t1_values`.`my_char_30`,`t1_values`.`my_char_30`) AS `LOCATE(my_char_30, my_char_30 )`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 161 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('char', my_varbinary_1000),
my_varbinary_1000, id FROM t1_values;
SELECT LOCATE('char', my_varbinary_1000),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 160 OR select_id IS NULL order by id;
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 locate('char',`t1_values`.`my_varbinary_1000`) AS `LOCATE('char', my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 160 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('char', my_binary_30),
my_binary_30, id FROM t1_values;
SELECT LOCATE('char', my_binary_30),
my_binary_30, id FROM t1_values
WHERE select_id = 159 OR select_id IS NULL order by id;
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 locate('char',`t1_values`.`my_binary_30`) AS `LOCATE('char', my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 159 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('char', my_varchar_1000),
my_varchar_1000, id FROM t1_values;
SELECT LOCATE('char', my_varchar_1000),
my_varchar_1000, id FROM t1_values
WHERE select_id = 158 OR select_id IS NULL order by id;
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 locate('char',`t1_values`.`my_varchar_1000`) AS `LOCATE('char', my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 158 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOCATE('char', my_char_30),
my_char_30, id FROM t1_values;
SELECT LOCATE('char', my_char_30),
my_char_30, id FROM t1_values
WHERE select_id = 157 OR select_id IS NULL order by id;
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 locate('char',`t1_values`.`my_char_30`) AS `LOCATE('char', my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 157 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
           AS my_col,
        id FROM t1_values;
SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt')
           AS my_col,
        id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL order by id;
my_col	id
Here is content from load_file
	1
Here is content from load_file
	2
Here is content from load_file
	3
Here is content from load_file
	4
Here is content from load_file
	5
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 load_file('<MYSQLTEST_VARDIR>/std_data/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL) order by id;
my_col	id
Here is content from load_file
	1
Here is content from load_file
	2
Here is content from load_file
	3
Here is content from load_file
	4
Here is content from load_file
	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values;
SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 155 OR select_id IS NULL order by id;
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 length(`t1_values`.`my_varbinary_1000`) AS `LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 155 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values;
SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values
WHERE select_id = 154 OR select_id IS NULL order by id;
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 length(`t1_values`.`my_binary_30`) AS `LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 154 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values;
SELECT LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values
WHERE select_id = 153 OR select_id IS NULL order by id;
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 length(`t1_values`.`my_varchar_1000`) AS `LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 153 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LENGTH(my_char_30),
my_char_30, id FROM t1_values;
SELECT LENGTH(my_char_30),
my_char_30, id FROM t1_values
WHERE select_id = 152 OR select_id IS NULL order by id;
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 length(`t1_values`.`my_char_30`) AS `LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 152 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values;
SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double), my_double, id FROM t1_values
WHERE select_id = 151 OR select_id IS NULL order by id;
LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)	my_double	id
NULL	NULL	1
	-1.7976931348623e308	2
AaBbCcDdEeFfGgHhIiJjÄäÜüÖö	1.7976931348623e308	3
	0	4
	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect INTEGER value: '1.7976931348623e308'
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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_double`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 151 OR select_id IS NULL) order by id;
LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_double)	my_double	id
NULL	NULL	1
	-1.7976931348623e308	2
AaBbCcDdEeFfGgHhIiJjÄäÜüÖö	1.7976931348623e308	3
	0	4
	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect INTEGER value: '1.7976931348623e308'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values;
SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal), my_decimal, id FROM t1_values
WHERE select_id = 150 OR select_id IS NULL order by id;
LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)	my_decimal	id
NULL	NULL	1
	-9999999999999999999999999999999999.999999999999999999999999999999	2
AaBbCcDdEeFfGgHhIiJjÄäÜüÖö	9999999999999999999999999999999999.999999999999999999999999999999	3
	0.000000000000000000000000000000	4
	-1.000000000000000000000000000000	5
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '9999999999999999999999999999999999.999999999999999999999999999999'
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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 150 OR select_id IS NULL) order by id;
LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)	my_decimal	id
NULL	NULL	1
	-9999999999999999999999999999999999.999999999999999999999999999999	2
AaBbCcDdEeFfGgHhIiJjÄäÜüÖö	9999999999999999999999999999999999.999999999999999999999999999999	3
	0.000000000000000000000000000000	4
	-1.000000000000000000000000000000	5
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '9999999999999999999999999999999999.999999999999999999999999999999'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values;
SELECT LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint), my_bigint, id FROM t1_values
WHERE select_id = 149 OR select_id IS NULL order by id;
LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)	my_bigint	id
NULL	NULL	1
	-9223372036854775808	2
AaBbCcDdEeFfGgHhIiJjÄäÜüÖö	9223372036854775807	3
	0	4
	-1	5
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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_bigint`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 149 OR select_id IS NULL) order by id;
LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_bigint)	my_bigint	id
NULL	NULL	1
	-9223372036854775808	2
AaBbCcDdEeFfGgHhIiJjÄäÜüÖö	9223372036854775807	3
	0	4
	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values;
SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values
WHERE select_id = 148 OR select_id IS NULL order by id;
LEFT(my_varbinary_1000, 2)	my_varbinary_1000	id
NULL	NULL	1
		2
<-	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 -	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 left(`t1_values`.`my_varbinary_1000`,2) AS `LEFT(my_varbinary_1000, 2)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 148 OR select_id IS NULL) order by id;
LEFT(my_varbinary_1000, 2)	my_varbinary_1000	id
NULL	NULL	1
		2
<-	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 -	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values;
SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
WHERE select_id = 147 OR select_id IS NULL order by id;
LEFT(my_binary_30, 2)	my_binary_30	id
NULL	NULL	1
		2
<-	<--------30 characters------->	3
 -	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 147 OR select_id IS NULL) order by id;
LEFT(my_binary_30, 2)	my_binary_30	id
NULL	NULL	1
		2
<-	<--------30 characters------->	3
 -	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values;
SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values
WHERE select_id = 146 OR select_id IS NULL order by id;
LEFT(my_varchar_1000, 2)	my_varchar_1000	id
NULL	NULL	1
		2
<-	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 -	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 left(`t1_values`.`my_varchar_1000`,2) AS `LEFT(my_varchar_1000, 2)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 146 OR select_id IS NULL) order by id;
LEFT(my_varchar_1000, 2)	my_varchar_1000	id
NULL	NULL	1
		2
<-	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 -	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values;
SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values
WHERE select_id = 145 OR select_id IS NULL order by id;
LEFT(my_char_30, 2)	my_char_30	id
NULL	NULL	1
		2
<-	<--------30 characters------->	3
 -	 ---äÖüß@µ*$--	4
-1	-1	5
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 left(`t1_values`.`my_char_30`,2) AS `LEFT(my_char_30, 2)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 145 OR select_id IS NULL) order by id;
LEFT(my_char_30, 2)	my_char_30	id
NULL	NULL	1
		2
<-	<--------30 characters------->	3
 -	 ---äÖüß@µ*$--	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT LCASE(my_varchar_1000),
my_varchar_1000, id FROM t1_values;
SELECT LCASE(my_varchar_1000),
my_varchar_1000, id FROM t1_values
WHERE select_id = 144 OR select_id IS NULL order by id;
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 lower(`t1_values`.`my_varchar_1000`) AS `LCASE(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 144 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT INSTR(my_char_30, 'char'),
my_char_30, id FROM t1_values;
SELECT INSTR(my_char_30, 'char'),
my_char_30, id FROM t1_values
WHERE select_id = 143 OR select_id IS NULL order by id;
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 locate('char',`t1_values`.`my_char_30`) AS `INSTR(my_char_30, 'char')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 143 OR select_id IS NULL) order by id;
DROP VIEW v1;


CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values;
SELECT BIT_LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 142 OR select_id IS NULL order by id;
BIT_LENGTH(my_varbinary_1000)	my_varbinary_1000	id
NULL	NULL	1
0		2
8000	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
160	 ---äÖüß@µ*$-- 	4
16	-1	5
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 bit_length(`t1_values`.`my_varbinary_1000`) AS `BIT_LENGTH(my_varbinary_1000)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 142 OR select_id IS NULL) order by id;
BIT_LENGTH(my_varbinary_1000)	my_varbinary_1000	id
NULL	NULL	1
0		2
8000	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
160	 ---äÖüß@µ*$-- 	4
16	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT BIT_LENGTH(my_binary_30),
my_binary_30, id FROM t1_values;
SELECT BIT_LENGTH(my_binary_30),
my_binary_30, id FROM t1_values
WHERE select_id = 141 OR select_id IS NULL order by id;
BIT_LENGTH(my_binary_30)	my_binary_30	id
NULL	NULL	1
240		2
240	<--------30 characters------->	3
240	 ---äÖüß@µ*$-- 	4
240	-1	5
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 bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 141 OR select_id IS NULL) order by id;
BIT_LENGTH(my_binary_30)	my_binary_30	id
NULL	NULL	1
240		2
240	<--------30 characters------->	3
240	 ---äÖüß@µ*$-- 	4
240	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT BIT_LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values;
SELECT BIT_LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values
WHERE select_id = 140 OR select_id IS NULL order by id;
BIT_LENGTH(my_varchar_1000)	my_varchar_1000	id
NULL	NULL	1
0		2
8000	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
160	 ---äÖüß@µ*$-- 	4
16	-1	5
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 bit_length(`t1_values`.`my_varchar_1000`) AS `BIT_LENGTH(my_varchar_1000)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 140 OR select_id IS NULL) order by id;
BIT_LENGTH(my_varchar_1000)	my_varchar_1000	id
NULL	NULL	1
0		2
8000	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
160	 ---äÖüß@µ*$-- 	4
16	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT BIT_LENGTH(my_char_30),
my_char_30, id FROM t1_values;
SELECT BIT_LENGTH(my_char_30),
my_char_30, id FROM t1_values
WHERE select_id = 139 OR select_id IS NULL order by id;
BIT_LENGTH(my_char_30)	my_char_30	id
NULL	NULL	1
0		2
240	<--------30 characters------->	3
152	 ---äÖüß@µ*$--	4
16	-1	5
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 bit_length(`t1_values`.`my_char_30`) AS `BIT_LENGTH(my_char_30)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 139 OR select_id IS NULL) order by id;
BIT_LENGTH(my_char_30)	my_char_30	id
NULL	NULL	1
0		2
240	<--------30 characters------->	3
152	 ---äÖüß@µ*$--	4
16	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_year,'IS_NULL'),
my_year, id FROM t1_values;
SELECT IFNULL(my_year,'IS_NULL'),
my_year, id FROM t1_values
WHERE select_id = 138 OR select_id IS NULL order by id;
IFNULL(my_year,'IS_NULL')	my_year	id
IS_NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
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 ifnull(`t1_values`.`my_year`,'IS_NULL') AS `IFNULL(my_year,'IS_NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 138 OR select_id IS NULL) order by id;
IFNULL(my_year,'IS_NULL')	my_year	id
IS_NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_time,'IS_NULL'),
my_time, id FROM t1_values;
SELECT IFNULL(my_time,'IS_NULL'),
my_time, id FROM t1_values
WHERE select_id = 137 OR select_id IS NULL order by id;
IFNULL(my_time,'IS_NULL')	my_time	id
IS_NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
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 ifnull(`t1_values`.`my_time`,'IS_NULL') AS `IFNULL(my_time,'IS_NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 137 OR select_id IS NULL) order by id;
IFNULL(my_time,'IS_NULL')	my_time	id
IS_NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_timestamp,'IS_NULL'),
my_timestamp, id FROM t1_values;
SELECT IFNULL(my_timestamp,'IS_NULL'),
my_timestamp, id FROM t1_values
WHERE select_id = 136 OR select_id IS NULL order by id;
IFNULL(my_timestamp,'IS_NULL')	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 ifnull(`t1_values`.`my_timestamp`,'IS_NULL') AS `IFNULL(my_timestamp,'IS_NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 136 OR select_id IS NULL) order by id;
IFNULL(my_timestamp,'IS_NULL')	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_date,'IS_NULL'),
my_date, id FROM t1_values;
SELECT IFNULL(my_date,'IS_NULL'),
my_date, id FROM t1_values
WHERE select_id = 135 OR select_id IS NULL order by id;
IFNULL(my_date,'IS_NULL')	my_date	id
IS_NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
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 ifnull(`t1_values`.`my_date`,'IS_NULL') AS `IFNULL(my_date,'IS_NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 135 OR select_id IS NULL) order by id;
IFNULL(my_date,'IS_NULL')	my_date	id
IS_NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_datetime,'IS_NULL'),
my_datetime, id FROM t1_values;
SELECT IFNULL(my_datetime,'IS_NULL'),
my_datetime, id FROM t1_values
WHERE select_id = 134 OR select_id IS NULL order by id;
IFNULL(my_datetime,'IS_NULL')	my_datetime	id
IS_NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 ifnull(`t1_values`.`my_datetime`,'IS_NULL') AS `IFNULL(my_datetime,'IS_NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 134 OR select_id IS NULL) order by id;
IFNULL(my_datetime,'IS_NULL')	my_datetime	id
IS_NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_double,'IS_NULL'),
my_double, id FROM t1_values;
SELECT IFNULL(my_double,'IS_NULL'),
my_double, id FROM t1_values
WHERE select_id = 133 OR select_id IS NULL order by id;
IFNULL(my_double,'IS_NULL')	my_double	id
IS_NULL	NULL	1
-1.7976931348623e308	-1.7976931348623e308	2
1.7976931348623e308	1.7976931348623e308	3
0	0	4
-1	-1	5
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 ifnull(`t1_values`.`my_double`,'IS_NULL') AS `IFNULL(my_double,'IS_NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 133 OR select_id IS NULL) order by id;
IFNULL(my_double,'IS_NULL')	my_double	id
IS_NULL	NULL	1
-1.7976931348623e308	-1.7976931348623e308	2
1.7976931348623e308	1.7976931348623e308	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_decimal,'IS_NULL'),
my_decimal, id FROM t1_values;
SELECT IFNULL(my_decimal,'IS_NULL'),
my_decimal, id FROM t1_values
WHERE select_id = 132 OR select_id IS NULL order by id;
IFNULL(my_decimal,'IS_NULL')	my_decimal	id
IS_NULL	NULL	1
-9999999999999999999999999999999999.999999999999999999999999999999	-9999999999999999999999999999999999.999999999999999999999999999999	2
9999999999999999999999999999999999.999999999999999999999999999999	9999999999999999999999999999999999.999999999999999999999999999999	3
0.000000000000000000000000000000	0.000000000000000000000000000000	4
-1.000000000000000000000000000000	-1.000000000000000000000000000000	5
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 ifnull(`t1_values`.`my_decimal`,'IS_NULL') AS `IFNULL(my_decimal,'IS_NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 132 OR select_id IS NULL) order by id;
IFNULL(my_decimal,'IS_NULL')	my_decimal	id
IS_NULL	NULL	1
-9999999999999999999999999999999999.999999999999999999999999999999	-9999999999999999999999999999999999.999999999999999999999999999999	2
9999999999999999999999999999999999.999999999999999999999999999999	9999999999999999999999999999999999.999999999999999999999999999999	3
0.000000000000000000000000000000	0.000000000000000000000000000000	4
-1.000000000000000000000000000000	-1.000000000000000000000000000000	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_bigint,'IS_NULL'),
my_bigint, id FROM t1_values;
SELECT IFNULL(my_bigint,'IS_NULL'),
my_bigint, id FROM t1_values
WHERE select_id = 131 OR select_id IS NULL order by id;
IFNULL(my_bigint,'IS_NULL')	my_bigint	id
IS_NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
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 ifnull(`t1_values`.`my_bigint`,'IS_NULL') AS `IFNULL(my_bigint,'IS_NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 131 OR select_id IS NULL) order by id;
IFNULL(my_bigint,'IS_NULL')	my_bigint	id
IS_NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
my_varbinary_1000, id FROM t1_values;
SELECT IFNULL(my_varbinary_1000,'IS_NULL'),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 130 OR select_id IS NULL order by id;
IFNULL(my_varbinary_1000,'IS_NULL')	my_varbinary_1000	id
IS_NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 ifnull(`t1_values`.`my_varbinary_1000`,'IS_NULL') AS `IFNULL(my_varbinary_1000,'IS_NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 130 OR select_id IS NULL) order by id;
IFNULL(my_varbinary_1000,'IS_NULL')	my_varbinary_1000	id
IS_NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_binary_30,'IS_NULL'),
my_binary_30, id FROM t1_values;
SELECT IFNULL(my_binary_30,'IS_NULL'),
my_binary_30, id FROM t1_values
WHERE select_id = 129 OR select_id IS NULL order by id;
IFNULL(my_binary_30,'IS_NULL')	my_binary_30	id
IS_NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 129 OR select_id IS NULL) order by id;
IFNULL(my_binary_30,'IS_NULL')	my_binary_30	id
IS_NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_varchar_1000,'IS_NULL'),
my_varchar_1000, id FROM t1_values;
SELECT IFNULL(my_varchar_1000,'IS_NULL'),
my_varchar_1000, id FROM t1_values
WHERE select_id = 128 OR select_id IS NULL order by id;
IFNULL(my_varchar_1000,'IS_NULL')	my_varchar_1000	id
IS_NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 ifnull(`t1_values`.`my_varchar_1000`,'IS_NULL') AS `IFNULL(my_varchar_1000,'IS_NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 128 OR select_id IS NULL) order by id;
IFNULL(my_varchar_1000,'IS_NULL')	my_varchar_1000	id
IS_NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IFNULL(my_char_30,'IS_NULL'),
my_char_30, id FROM t1_values;
SELECT IFNULL(my_char_30,'IS_NULL'),
my_char_30, id FROM t1_values
WHERE select_id = 127 OR select_id IS NULL order by id;
IFNULL(my_char_30,'IS_NULL')	my_char_30	id
IS_NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
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 ifnull(`t1_values`.`my_char_30`,'IS_NULL') AS `IFNULL(my_char_30,'IS_NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 127 OR select_id IS NULL) order by id;
IFNULL(my_char_30,'IS_NULL')	my_char_30	id
IS_NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_year IS NULL, 'IS     NULL',
'IS NOT NULL'), my_year, id FROM t1_values;
SELECT IF(my_year IS NULL, 'IS     NULL',
'IS NOT NULL'), my_year, id FROM t1_values
WHERE select_id = 126 OR select_id IS NULL order by id;
IF(my_year IS NULL, 'IS     NULL',
'IS NOT NULL')	my_year	id
IS     NULL	NULL	1
IS NOT NULL	1901	2
IS NOT NULL	2155	3
IS NOT NULL	2000	4
IS NOT NULL	2005	5
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 if(isnull(`t1_values`.`my_year`),'IS     NULL','IS NOT NULL') AS `IF(my_year IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 126 OR select_id IS NULL) order by id;
IF(my_year IS NULL, 'IS     NULL',
'IS NOT NULL')	my_year	id
IS     NULL	NULL	1
IS NOT NULL	1901	2
IS NOT NULL	2155	3
IS NOT NULL	2000	4
IS NOT NULL	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_time IS NULL, 'IS     NULL',
'IS NOT NULL'), my_time, id FROM t1_values;
SELECT IF(my_time IS NULL, 'IS     NULL',
'IS NOT NULL'), my_time, id FROM t1_values
WHERE select_id = 125 OR select_id IS NULL order by id;
IF(my_time IS NULL, 'IS     NULL',
'IS NOT NULL')	my_time	id
IS     NULL	NULL	1
IS NOT NULL	-838:59:59	2
IS NOT NULL	838:59:59	3
IS NOT NULL	13:00:00	4
IS NOT NULL	10:00:00	5
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 if(isnull(`t1_values`.`my_time`),'IS     NULL','IS NOT NULL') AS `IF(my_time IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 125 OR select_id IS NULL) order by id;
IF(my_time IS NULL, 'IS     NULL',
'IS NOT NULL')	my_time	id
IS     NULL	NULL	1
IS NOT NULL	-838:59:59	2
IS NOT NULL	838:59:59	3
IS NOT NULL	13:00:00	4
IS NOT NULL	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_timestamp IS NULL, 'IS     NULL',
'IS NOT NULL'), my_timestamp, id FROM t1_values;
SELECT IF(my_timestamp IS NULL, 'IS     NULL',
'IS NOT NULL'), my_timestamp, id FROM t1_values
WHERE select_id = 124 OR select_id IS NULL order by id;
IF(my_timestamp IS NULL, 'IS     NULL',
'IS NOT NULL')	my_timestamp	id
IS NOT NULL	0000-00-00 00:00:00	1
IS NOT NULL	1970-01-01 03:00:01	2
IS NOT NULL	2038-01-01 02:59:59	3
IS NOT NULL	2004-02-29 23:59:59	4
IS NOT NULL	2005-06-28 10:00:00	5
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 if(isnull(`t1_values`.`my_timestamp`),'IS     NULL','IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 124 OR select_id IS NULL) order by id;
IF(my_timestamp IS NULL, 'IS     NULL',
'IS NOT NULL')	my_timestamp	id
IS NOT NULL	0000-00-00 00:00:00	1
IS NOT NULL	1970-01-01 03:00:01	2
IS NOT NULL	2038-01-01 02:59:59	3
IS NOT NULL	2004-02-29 23:59:59	4
IS NOT NULL	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_date IS NULL, 'IS     NULL',
'IS NOT NULL'), my_date, id FROM t1_values;
SELECT IF(my_date IS NULL, 'IS     NULL',
'IS NOT NULL'), my_date, id FROM t1_values
WHERE select_id = 123 OR select_id IS NULL order by id;
IF(my_date IS NULL, 'IS     NULL',
'IS NOT NULL')	my_date	id
IS     NULL	NULL	1
IS NOT NULL	0001-01-01	2
IS NOT NULL	9999-12-31	3
IS NOT NULL	2004-02-29	4
IS NOT NULL	2005-06-28	5
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 if(isnull(`t1_values`.`my_date`),'IS     NULL','IS NOT NULL') AS `IF(my_date IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 123 OR select_id IS NULL) order by id;
IF(my_date IS NULL, 'IS     NULL',
'IS NOT NULL')	my_date	id
IS     NULL	NULL	1
IS NOT NULL	0001-01-01	2
IS NOT NULL	9999-12-31	3
IS NOT NULL	2004-02-29	4
IS NOT NULL	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_datetime IS NULL, 'IS     NULL',
'IS NOT NULL'), my_datetime, id FROM t1_values;
SELECT IF(my_datetime IS NULL, 'IS     NULL',
'IS NOT NULL'), my_datetime, id FROM t1_values
WHERE select_id = 122 OR select_id IS NULL order by id;
IF(my_datetime IS NULL, 'IS     NULL',
'IS NOT NULL')	my_datetime	id
IS     NULL	NULL	1
IS NOT NULL	0001-01-01 00:00:00	2
IS NOT NULL	9999-12-31 23:59:59	3
IS NOT NULL	2004-02-29 23:59:59	4
IS NOT NULL	2005-06-28 10:00:00	5
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 if(isnull(`t1_values`.`my_datetime`),'IS     NULL','IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 122 OR select_id IS NULL) order by id;
IF(my_datetime IS NULL, 'IS     NULL',
'IS NOT NULL')	my_datetime	id
IS     NULL	NULL	1
IS NOT NULL	0001-01-01 00:00:00	2
IS NOT NULL	9999-12-31 23:59:59	3
IS NOT NULL	2004-02-29 23:59:59	4
IS NOT NULL	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_double IS NULL, 'IS     NULL',
'IS NOT NULL'), my_double, id FROM t1_values;
SELECT IF(my_double IS NULL, 'IS     NULL',
'IS NOT NULL'), my_double, id FROM t1_values
WHERE select_id = 121 OR select_id IS NULL order by id;
IF(my_double IS NULL, 'IS     NULL',
'IS NOT NULL')	my_double	id
IS     NULL	NULL	1
IS NOT NULL	-1.7976931348623e308	2
IS NOT NULL	1.7976931348623e308	3
IS NOT NULL	0	4
IS NOT NULL	-1	5
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 if(isnull(`t1_values`.`my_double`),'IS     NULL','IS NOT NULL') AS `IF(my_double IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 121 OR select_id IS NULL) order by id;
IF(my_double IS NULL, 'IS     NULL',
'IS NOT NULL')	my_double	id
IS     NULL	NULL	1
IS NOT NULL	-1.7976931348623e308	2
IS NOT NULL	1.7976931348623e308	3
IS NOT NULL	0	4
IS NOT NULL	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_decimal IS NULL, 'IS     NULL',
'IS NOT NULL'), my_decimal, id FROM t1_values;
SELECT IF(my_decimal IS NULL, 'IS     NULL',
'IS NOT NULL'), my_decimal, id FROM t1_values
WHERE select_id = 120 OR select_id IS NULL order by id;
IF(my_decimal IS NULL, 'IS     NULL',
'IS NOT NULL')	my_decimal	id
IS     NULL	NULL	1
IS NOT NULL	-9999999999999999999999999999999999.999999999999999999999999999999	2
IS NOT NULL	9999999999999999999999999999999999.999999999999999999999999999999	3
IS NOT NULL	0.000000000000000000000000000000	4
IS NOT NULL	-1.000000000000000000000000000000	5
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 if(isnull(`t1_values`.`my_decimal`),'IS     NULL','IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 120 OR select_id IS NULL) order by id;
IF(my_decimal IS NULL, 'IS     NULL',
'IS NOT NULL')	my_decimal	id
IS     NULL	NULL	1
IS NOT NULL	-9999999999999999999999999999999999.999999999999999999999999999999	2
IS NOT NULL	9999999999999999999999999999999999.999999999999999999999999999999	3
IS NOT NULL	0.000000000000000000000000000000	4
IS NOT NULL	-1.000000000000000000000000000000	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_bigint IS NULL, 'IS     NULL',
'IS NOT NULL'), my_bigint, id FROM t1_values;
SELECT IF(my_bigint IS NULL, 'IS     NULL',
'IS NOT NULL'), my_bigint, id FROM t1_values
WHERE select_id = 119 OR select_id IS NULL order by id;
IF(my_bigint IS NULL, 'IS     NULL',
'IS NOT NULL')	my_bigint	id
IS     NULL	NULL	1
IS NOT NULL	-9223372036854775808	2
IS NOT NULL	9223372036854775807	3
IS NOT NULL	0	4
IS NOT NULL	-1	5
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 if(isnull(`t1_values`.`my_bigint`),'IS     NULL','IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 119 OR select_id IS NULL) order by id;
IF(my_bigint IS NULL, 'IS     NULL',
'IS NOT NULL')	my_bigint	id
IS     NULL	NULL	1
IS NOT NULL	-9223372036854775808	2
IS NOT NULL	9223372036854775807	3
IS NOT NULL	0	4
IS NOT NULL	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_varbinary_1000 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_varbinary_1000, id FROM t1_values;
SELECT IF(my_varbinary_1000 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_varbinary_1000, id FROM t1_values
WHERE select_id = 118 OR select_id IS NULL order by id;
IF(my_varbinary_1000 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_varbinary_1000	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT NULL	 ---äÖüß@µ*$-- 	4
IS NOT NULL	-1	5
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 if(isnull(`t1_values`.`my_varbinary_1000`),'IS     NULL','IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 118 OR select_id IS NULL) order by id;
IF(my_varbinary_1000 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_varbinary_1000	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT NULL	 ---äÖüß@µ*$-- 	4
IS NOT NULL	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_binary_30 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_binary_30, id FROM t1_values;
SELECT IF(my_binary_30 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_binary_30, id FROM t1_values
WHERE select_id = 117 OR select_id IS NULL order by id;
IF(my_binary_30 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_binary_30	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<--------30 characters------->	3
IS NOT NULL	 ---äÖüß@µ*$-- 	4
IS NOT NULL	-1	5
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 if(isnull(`t1_values`.`my_binary_30`),'IS     NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 117 OR select_id IS NULL) order by id;
IF(my_binary_30 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_binary_30	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<--------30 characters------->	3
IS NOT NULL	 ---äÖüß@µ*$-- 	4
IS NOT NULL	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_varchar_1000 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_varchar_1000, id FROM t1_values;
SELECT IF(my_varchar_1000 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_varchar_1000, id FROM t1_values
WHERE select_id = 116 OR select_id IS NULL order by id;
IF(my_varchar_1000 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_varchar_1000	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT NULL	 ---äÖüß@µ*$-- 	4
IS NOT NULL	-1	5
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 if(isnull(`t1_values`.`my_varchar_1000`),'IS     NULL','IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 116 OR select_id IS NULL) order by id;
IF(my_varchar_1000 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_varchar_1000	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT NULL	 ---äÖüß@µ*$-- 	4
IS NOT NULL	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_char_30 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_char_30, id FROM t1_values;
SELECT IF(my_char_30 IS NULL, 'IS     NULL',
'IS NOT NULL'), my_char_30, id FROM t1_values
WHERE select_id = 115 OR select_id IS NULL order by id;
IF(my_char_30 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_char_30	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<--------30 characters------->	3
IS NOT NULL	 ---äÖüß@µ*$--	4
IS NOT NULL	-1	5
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 if(isnull(`t1_values`.`my_char_30`),'IS     NULL','IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS     NULL',
'IS NOT NULL')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 115 OR select_id IS NULL) order by id;
IF(my_char_30 IS NULL, 'IS     NULL',
'IS NOT NULL')	my_char_30	id
IS     NULL	NULL	1
IS NOT NULL		2
IS NOT NULL	<--------30 characters------->	3
IS NOT NULL	 ---äÖüß@µ*$--	4
IS NOT NULL	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_year, 'IS     TRUE', 'IS NOT TRUE'),
my_year, id FROM t1_values;
SELECT IF(my_year, 'IS     TRUE', 'IS NOT TRUE'),
my_year, id FROM t1_values
WHERE select_id = 114 OR select_id IS NULL order by id;
IF(my_year, 'IS     TRUE', 'IS NOT TRUE')	my_year	id
IS NOT TRUE	NULL	1
IS     TRUE	1901	2
IS     TRUE	2155	3
IS     TRUE	2000	4
IS     TRUE	2005	5
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 if(`t1_values`.`my_year`,'IS     TRUE','IS NOT TRUE') AS `IF(my_year, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 114 OR select_id IS NULL) order by id;
IF(my_year, 'IS     TRUE', 'IS NOT TRUE')	my_year	id
IS NOT TRUE	NULL	1
IS     TRUE	1901	2
IS     TRUE	2155	3
IS     TRUE	2000	4
IS     TRUE	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_time, 'IS     TRUE', 'IS NOT TRUE'),
my_time, id FROM t1_values;
SELECT IF(my_time, 'IS     TRUE', 'IS NOT TRUE'),
my_time, id FROM t1_values
WHERE select_id = 113 OR select_id IS NULL order by id;
IF(my_time, 'IS     TRUE', 'IS NOT TRUE')	my_time	id
IS NOT TRUE	NULL	1
IS     TRUE	-838:59:59	2
IS     TRUE	838:59:59	3
IS     TRUE	13:00:00	4
IS     TRUE	10:00:00	5
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 if(`t1_values`.`my_time`,'IS     TRUE','IS NOT TRUE') AS `IF(my_time, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 113 OR select_id IS NULL) order by id;
IF(my_time, 'IS     TRUE', 'IS NOT TRUE')	my_time	id
IS NOT TRUE	NULL	1
IS     TRUE	-838:59:59	2
IS     TRUE	838:59:59	3
IS     TRUE	13:00:00	4
IS     TRUE	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_timestamp, 'IS     TRUE', 'IS NOT TRUE'),
my_timestamp, id FROM t1_values;
SELECT IF(my_timestamp, 'IS     TRUE', 'IS NOT TRUE'),
my_timestamp, id FROM t1_values
WHERE select_id = 112 OR select_id IS NULL order by id;
IF(my_timestamp, 'IS     TRUE', 'IS NOT TRUE')	my_timestamp	id
IS NOT TRUE	0000-00-00 00:00:00	1
IS     TRUE	1970-01-01 03:00:01	2
IS     TRUE	2038-01-01 02:59:59	3
IS     TRUE	2004-02-29 23:59:59	4
IS     TRUE	2005-06-28 10:00:00	5
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 if(`t1_values`.`my_timestamp`,'IS     TRUE','IS NOT TRUE') AS `IF(my_timestamp, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 112 OR select_id IS NULL) order by id;
IF(my_timestamp, 'IS     TRUE', 'IS NOT TRUE')	my_timestamp	id
IS NOT TRUE	0000-00-00 00:00:00	1
IS     TRUE	1970-01-01 03:00:01	2
IS     TRUE	2038-01-01 02:59:59	3
IS     TRUE	2004-02-29 23:59:59	4
IS     TRUE	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_date, 'IS     TRUE', 'IS NOT TRUE'),
my_date, id FROM t1_values;
SELECT IF(my_date, 'IS     TRUE', 'IS NOT TRUE'),
my_date, id FROM t1_values
WHERE select_id = 111 OR select_id IS NULL order by id;
IF(my_date, 'IS     TRUE', 'IS NOT TRUE')	my_date	id
IS NOT TRUE	NULL	1
IS     TRUE	0001-01-01	2
IS     TRUE	9999-12-31	3
IS     TRUE	2004-02-29	4
IS     TRUE	2005-06-28	5
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 if(`t1_values`.`my_date`,'IS     TRUE','IS NOT TRUE') AS `IF(my_date, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 111 OR select_id IS NULL) order by id;
IF(my_date, 'IS     TRUE', 'IS NOT TRUE')	my_date	id
IS NOT TRUE	NULL	1
IS     TRUE	0001-01-01	2
IS     TRUE	9999-12-31	3
IS     TRUE	2004-02-29	4
IS     TRUE	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_datetime, 'IS     TRUE', 'IS NOT TRUE'),
my_datetime, id FROM t1_values;
SELECT IF(my_datetime, 'IS     TRUE', 'IS NOT TRUE'),
my_datetime, id FROM t1_values
WHERE select_id = 110 OR select_id IS NULL order by id;
IF(my_datetime, 'IS     TRUE', 'IS NOT TRUE')	my_datetime	id
IS NOT TRUE	NULL	1
IS     TRUE	0001-01-01 00:00:00	2
IS     TRUE	9999-12-31 23:59:59	3
IS     TRUE	2004-02-29 23:59:59	4
IS     TRUE	2005-06-28 10:00:00	5
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 if(`t1_values`.`my_datetime`,'IS     TRUE','IS NOT TRUE') AS `IF(my_datetime, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 110 OR select_id IS NULL) order by id;
IF(my_datetime, 'IS     TRUE', 'IS NOT TRUE')	my_datetime	id
IS NOT TRUE	NULL	1
IS     TRUE	0001-01-01 00:00:00	2
IS     TRUE	9999-12-31 23:59:59	3
IS     TRUE	2004-02-29 23:59:59	4
IS     TRUE	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_double, 'IS     TRUE', 'IS NOT TRUE'),
my_double, id FROM t1_values;
SELECT IF(my_double, 'IS     TRUE', 'IS NOT TRUE'),
my_double, id FROM t1_values
WHERE select_id = 109 OR select_id IS NULL order by id;
IF(my_double, 'IS     TRUE', 'IS NOT TRUE')	my_double	id
IS NOT TRUE	NULL	1
IS     TRUE	-1.7976931348623e308	2
IS     TRUE	1.7976931348623e308	3
IS NOT TRUE	0	4
IS     TRUE	-1	5
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 if(`t1_values`.`my_double`,'IS     TRUE','IS NOT TRUE') AS `IF(my_double, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 109 OR select_id IS NULL) order by id;
IF(my_double, 'IS     TRUE', 'IS NOT TRUE')	my_double	id
IS NOT TRUE	NULL	1
IS     TRUE	-1.7976931348623e308	2
IS     TRUE	1.7976931348623e308	3
IS NOT TRUE	0	4
IS     TRUE	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_decimal, 'IS     TRUE', 'IS NOT TRUE'),
my_decimal, id FROM t1_values;
SELECT IF(my_decimal, 'IS     TRUE', 'IS NOT TRUE'),
my_decimal, id FROM t1_values
WHERE select_id = 108 OR select_id IS NULL order by id;
IF(my_decimal, 'IS     TRUE', 'IS NOT TRUE')	my_decimal	id
IS NOT TRUE	NULL	1
IS     TRUE	-9999999999999999999999999999999999.999999999999999999999999999999	2
IS     TRUE	9999999999999999999999999999999999.999999999999999999999999999999	3
IS NOT TRUE	0.000000000000000000000000000000	4
IS     TRUE	-1.000000000000000000000000000000	5
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 if(`t1_values`.`my_decimal`,'IS     TRUE','IS NOT TRUE') AS `IF(my_decimal, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 108 OR select_id IS NULL) order by id;
IF(my_decimal, 'IS     TRUE', 'IS NOT TRUE')	my_decimal	id
IS NOT TRUE	NULL	1
IS     TRUE	-9999999999999999999999999999999999.999999999999999999999999999999	2
IS     TRUE	9999999999999999999999999999999999.999999999999999999999999999999	3
IS NOT TRUE	0.000000000000000000000000000000	4
IS     TRUE	-1.000000000000000000000000000000	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_bigint, 'IS     TRUE', 'IS NOT TRUE'),
my_bigint, id FROM t1_values;
SELECT IF(my_bigint, 'IS     TRUE', 'IS NOT TRUE'),
my_bigint, id FROM t1_values
WHERE select_id = 107 OR select_id IS NULL order by id;
IF(my_bigint, 'IS     TRUE', 'IS NOT TRUE')	my_bigint	id
IS NOT TRUE	NULL	1
IS     TRUE	-9223372036854775808	2
IS     TRUE	9223372036854775807	3
IS NOT TRUE	0	4
IS     TRUE	-1	5
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 if(`t1_values`.`my_bigint`,'IS     TRUE','IS NOT TRUE') AS `IF(my_bigint, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 107 OR select_id IS NULL) order by id;
IF(my_bigint, 'IS     TRUE', 'IS NOT TRUE')	my_bigint	id
IS NOT TRUE	NULL	1
IS     TRUE	-9223372036854775808	2
IS     TRUE	9223372036854775807	3
IS NOT TRUE	0	4
IS     TRUE	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_varbinary_1000, 'IS     TRUE', 'IS NOT TRUE'),
my_varbinary_1000, id FROM t1_values;
SELECT IF(my_varbinary_1000, 'IS     TRUE', 'IS NOT TRUE'),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 106 OR select_id IS NULL order by id;
IF(my_varbinary_1000, 'IS     TRUE', 'IS NOT TRUE')	my_varbinary_1000	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT TRUE	 ---äÖüß@µ*$-- 	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
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 if(`t1_values`.`my_varbinary_1000`,'IS     TRUE','IS NOT TRUE') AS `IF(my_varbinary_1000, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 106 OR select_id IS NULL) order by id;
IF(my_varbinary_1000, 'IS     TRUE', 'IS NOT TRUE')	my_varbinary_1000	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT TRUE	 ---äÖüß@µ*$-- 	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_binary_30, 'IS     TRUE', 'IS NOT TRUE'),
my_binary_30, id FROM t1_values;
SELECT IF(my_binary_30, 'IS     TRUE', 'IS NOT TRUE'),
my_binary_30, id FROM t1_values
WHERE select_id = 105 OR select_id IS NULL order by id;
IF(my_binary_30, 'IS     TRUE', 'IS NOT TRUE')	my_binary_30	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<--------30 characters------->	3
IS NOT TRUE	 ---äÖüß@µ*$-- 	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning	1292	Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
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 if(`t1_values`.`my_binary_30`,'IS     TRUE','IS NOT TRUE') AS `IF(my_binary_30, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 105 OR select_id IS NULL) order by id;
IF(my_binary_30, 'IS     TRUE', 'IS NOT TRUE')	my_binary_30	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<--------30 characters------->	3
IS NOT TRUE	 ---äÖüß@µ*$-- 	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning	1292	Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DOUBLE value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_varchar_1000, 'IS     TRUE', 'IS NOT TRUE'),
my_varchar_1000, id FROM t1_values;
SELECT IF(my_varchar_1000, 'IS     TRUE', 'IS NOT TRUE'),
my_varchar_1000, id FROM t1_values
WHERE select_id = 104 OR select_id IS NULL order by id;
IF(my_varchar_1000, 'IS     TRUE', 'IS NOT TRUE')	my_varchar_1000	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT TRUE	 ---äÖüß@µ*$-- 	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
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 if(`t1_values`.`my_varchar_1000`,'IS     TRUE','IS NOT TRUE') AS `IF(my_varchar_1000, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 104 OR select_id IS NULL) order by id;
IF(my_varchar_1000, 'IS     TRUE', 'IS NOT TRUE')	my_varchar_1000	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
IS NOT TRUE	 ---äÖüß@µ*$-- 	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT IF(my_char_30, 'IS     TRUE', 'IS NOT TRUE'),
my_char_30, id FROM t1_values;
SELECT IF(my_char_30, 'IS     TRUE', 'IS NOT TRUE'),
my_char_30, id FROM t1_values
WHERE select_id = 103 OR select_id IS NULL order by id;
IF(my_char_30, 'IS     TRUE', 'IS NOT TRUE')	my_char_30	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<--------30 characters------->	3
IS NOT TRUE	 ---äÖüß@µ*$--	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning	1292	Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$--           '
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 if(`t1_values`.`my_char_30`,'IS     TRUE','IS NOT TRUE') AS `IF(my_char_30, 'IS     TRUE', 'IS NOT TRUE')`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 103 OR select_id IS NULL) order by id;
IF(my_char_30, 'IS     TRUE', 'IS NOT TRUE')	my_char_30	id
IS NOT TRUE	NULL	1
IS NOT TRUE		2
IS NOT TRUE	<--------30 characters------->	3
IS NOT TRUE	 ---äÖüß@µ*$--	4
IS     TRUE	-1	5
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: '<--------30 characters------->'
Warning	1292	Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$--           '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 102 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING koi8r)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---???????÷@??*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 convert(`t1_values`.`my_varbinary_1000` using koi8r) AS `CONVERT(my_varbinary_1000 USING koi8r)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 102 OR select_id IS NULL) order by id;
CONVERT(my_varbinary_1000 USING koi8r)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---???????÷@??*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values
WHERE select_id = 101 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING koi8r)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---???????÷@??*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 101 OR select_id IS NULL) order by id;
CONVERT(my_binary_30 USING koi8r)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---???????÷@??*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values
WHERE select_id = 100 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING koi8r)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---????????@??*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 convert(`t1_values`.`my_varchar_1000` using koi8r) AS `CONVERT(my_varchar_1000 USING koi8r)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 100 OR select_id IS NULL) order by id;
CONVERT(my_varchar_1000 USING koi8r)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---????????@??*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values
WHERE select_id = 99 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING koi8r)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---????????@??*$--	 ---äÖüß@µ*$--	4
-1	-1	5
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 convert(`t1_values`.`my_char_30` using koi8r) AS `CONVERT(my_char_30 USING koi8r)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 99 OR select_id IS NULL) order by id;
CONVERT(my_char_30 USING koi8r)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---????????@??*$--	 ---äÖüß@µ*$--	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 98 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING utf8)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 convert(`t1_values`.`my_varbinary_1000` using utf8) AS `CONVERT(my_varbinary_1000 USING utf8)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 98 OR select_id IS NULL) order by id;
CONVERT(my_varbinary_1000 USING utf8)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values
WHERE select_id = 97 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING utf8)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 97 OR select_id IS NULL) order by id;
CONVERT(my_binary_30 USING utf8)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values
WHERE select_id = 96 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING utf8)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 convert(`t1_values`.`my_varchar_1000` using utf8) AS `CONVERT(my_varchar_1000 USING utf8)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 96 OR select_id IS NULL) order by id;
CONVERT(my_varchar_1000 USING utf8)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values
WHERE select_id = 95 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING utf8)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
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 convert(`t1_values`.`my_char_30` using utf8) AS `CONVERT(my_char_30 USING utf8)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 95 OR select_id IS NULL) order by id;
CONVERT(my_char_30 USING utf8)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS UNSIGNED INTEGER),
my_year, id FROM t1_values;
SELECT CAST(my_year AS UNSIGNED INTEGER),
my_year, id FROM t1_values
WHERE select_id = 94 OR select_id IS NULL order by id;
CAST(my_year AS UNSIGNED INTEGER)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
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 cast(`t1_values`.`my_year` as unsigned) AS `CAST(my_year AS UNSIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 94 OR select_id IS NULL) order by id;
CAST(my_year AS UNSIGNED INTEGER)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS UNSIGNED INTEGER),
my_time, id FROM t1_values;
SELECT CAST(my_time AS UNSIGNED INTEGER),
my_time, id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL order by id;
CAST(my_time AS UNSIGNED INTEGER)	my_time	id
NULL	NULL	1
18446744073701165657	-838:59:59	2
8385959	838:59:59	3
130000	13:00:00	4
100000	10:00:00	5
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 cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 93 OR select_id IS NULL) order by id;
CAST(my_time AS UNSIGNED INTEGER)	my_time	id
NULL	NULL	1
18446744073701165657	-838:59:59	2
8385959	838:59:59	3
130000	13:00:00	4
100000	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS UNSIGNED INTEGER),
my_timestamp, id FROM t1_values
WHERE select_id = 92 OR select_id IS NULL order by id;
CAST(my_timestamp AS UNSIGNED INTEGER)	my_timestamp	id
0	0000-00-00 00:00:00	1
19700101030001	1970-01-01 03:00:01	2
20380101025959	2038-01-01 02:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 92 OR select_id IS NULL) order by id;
CAST(my_timestamp AS UNSIGNED INTEGER)	my_timestamp	id
0	0000-00-00 00:00:00	1
19700101030001	1970-01-01 03:00:01	2
20380101025959	2038-01-01 02:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS UNSIGNED INTEGER),
my_date, id FROM t1_values;
SELECT CAST(my_date AS UNSIGNED INTEGER),
my_date, id FROM t1_values
WHERE select_id = 91 OR select_id IS NULL order by id;
CAST(my_date AS UNSIGNED INTEGER)	my_date	id
NULL	NULL	1
10101	0001-01-01	2
99991231	9999-12-31	3
20040229	2004-02-29	4
20050628	2005-06-28	5
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 cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 91 OR select_id IS NULL) order by id;
CAST(my_date AS UNSIGNED INTEGER)	my_date	id
NULL	NULL	1
10101	0001-01-01	2
99991231	9999-12-31	3
20040229	2004-02-29	4
20050628	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS UNSIGNED INTEGER),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS UNSIGNED INTEGER),
my_datetime, id FROM t1_values
WHERE select_id = 90 OR select_id IS NULL order by id;
CAST(my_datetime AS UNSIGNED INTEGER)	my_datetime	id
NULL	NULL	1
10101000000	0001-01-01 00:00:00	2
99991231235959	9999-12-31 23:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 90 OR select_id IS NULL) order by id;
CAST(my_datetime AS UNSIGNED INTEGER)	my_datetime	id
NULL	NULL	1
10101000000	0001-01-01 00:00:00	2
99991231235959	9999-12-31 23:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS UNSIGNED INTEGER),
my_double, id FROM t1_values;
SELECT CAST(my_double AS UNSIGNED INTEGER),
my_double, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL order by id;
CAST(my_double AS UNSIGNED INTEGER)	my_double	id
NULL	NULL	1
9223372036854775808	-1.7976931348623e308	2
9223372036854775807	1.7976931348623e308	3
0	0	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect INTEGER value: '1.7976931348623e308'
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 cast(`t1_values`.`my_double` as unsigned) AS `CAST(my_double AS UNSIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL) order by id;
CAST(my_double AS UNSIGNED INTEGER)	my_double	id
NULL	NULL	1
9223372036854775808	-1.7976931348623e308	2
9223372036854775807	1.7976931348623e308	3
0	0	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect INTEGER value: '1.7976931348623e308'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_decimal AS UNSIGNED INTEGER),
my_decimal, id FROM t1_values;
SELECT CAST(my_decimal AS UNSIGNED INTEGER),
my_decimal, id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL order by id;
CAST(my_decimal AS UNSIGNED INTEGER)	my_decimal	id
NULL	NULL	1
0	-9999999999999999999999999999999999.999999999999999999999999999999	2
18446744073709551615	9999999999999999999999999999999999.999999999999999999999999999999	3
0	0.000000000000000000000000000000	4
0	-1.000000000000000000000000000000	5
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '-1.000000000000000000000000000000'
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 cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL) order by id;
CAST(my_decimal AS UNSIGNED INTEGER)	my_decimal	id
NULL	NULL	1
0	-9999999999999999999999999999999999.999999999999999999999999999999	2
18446744073709551615	9999999999999999999999999999999999.999999999999999999999999999999	3
0	0.000000000000000000000000000000	4
0	-1.000000000000000000000000000000	5
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '-1.000000000000000000000000000000'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS UNSIGNED INTEGER),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS UNSIGNED INTEGER),
my_bigint, id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL order by id;
CAST(my_bigint AS UNSIGNED INTEGER)	my_bigint	id
NULL	NULL	1
9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
18446744073709551615	-1	5
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 cast(`t1_values`.`my_bigint` as unsigned) AS `CAST(my_bigint AS UNSIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL) order by id;
CAST(my_bigint AS UNSIGNED INTEGER)	my_bigint	id
NULL	NULL	1
9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
18446744073709551615	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS UNSIGNED INTEGER),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS UNSIGNED INTEGER)	my_varbinary_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
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 cast(`t1_values`.`my_varbinary_1000` as unsigned) AS `CAST(my_varbinary_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS UNSIGNED INTEGER)	my_varbinary_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS UNSIGNED INTEGER),
my_binary_30, id FROM t1_values
WHERE select_id = 85 OR select_id IS NULL order by id;
CAST(my_binary_30 AS UNSIGNED INTEGER)	my_binary_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$-- 	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
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 cast(`t1_values`.`my_binary_30` as unsigned) AS `CAST(my_binary_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 85 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS UNSIGNED INTEGER)	my_binary_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$-- 	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS UNSIGNED INTEGER),
my_varchar_1000, id FROM t1_values
WHERE select_id = 84 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS UNSIGNED INTEGER)	my_varchar_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
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 cast(`t1_values`.`my_varchar_1000` as unsigned) AS `CAST(my_varchar_1000 AS UNSIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 84 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS UNSIGNED INTEGER)	my_varchar_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS UNSIGNED INTEGER),
my_char_30, id FROM t1_values
WHERE select_id = 83 OR select_id IS NULL order by id;
CAST(my_char_30 AS UNSIGNED INTEGER)	my_char_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$--	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
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 cast(`t1_values`.`my_char_30` as unsigned) AS `CAST(my_char_30 AS UNSIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 83 OR select_id IS NULL) order by id;
CAST(my_char_30 AS UNSIGNED INTEGER)	my_char_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$--	4
18446744073709551615	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
Warning	1105	Cast to unsigned converted negative integer to it's positive complement
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS SIGNED INTEGER),
my_year, id FROM t1_values;
SELECT CAST(my_year AS SIGNED INTEGER),
my_year, id FROM t1_values
WHERE select_id = 82 OR select_id IS NULL order by id;
CAST(my_year AS SIGNED INTEGER)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
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 cast(`t1_values`.`my_year` as signed) AS `CAST(my_year AS SIGNED INTEGER)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 82 OR select_id IS NULL) order by id;
CAST(my_year AS SIGNED INTEGER)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS SIGNED INTEGER),
my_time, id FROM t1_values;
SELECT CAST(my_time AS SIGNED INTEGER),
my_time, id FROM t1_values
WHERE select_id = 81 OR select_id IS NULL order by id;
CAST(my_time AS SIGNED INTEGER)	my_time	id
NULL	NULL	1
-8385959	-838:59:59	2
8385959	838:59:59	3
130000	13:00:00	4
100000	10:00:00	5
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 cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 81 OR select_id IS NULL) order by id;
CAST(my_time AS SIGNED INTEGER)	my_time	id
NULL	NULL	1
-8385959	-838:59:59	2
8385959	838:59:59	3
130000	13:00:00	4
100000	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS SIGNED INTEGER),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS SIGNED INTEGER),
my_timestamp, id FROM t1_values
WHERE select_id = 80 OR select_id IS NULL order by id;
CAST(my_timestamp AS SIGNED INTEGER)	my_timestamp	id
0	0000-00-00 00:00:00	1
19700101030001	1970-01-01 03:00:01	2
20380101025959	2038-01-01 02:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 80 OR select_id IS NULL) order by id;
CAST(my_timestamp AS SIGNED INTEGER)	my_timestamp	id
0	0000-00-00 00:00:00	1
19700101030001	1970-01-01 03:00:01	2
20380101025959	2038-01-01 02:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS SIGNED INTEGER),
my_date, id FROM t1_values;
SELECT CAST(my_date AS SIGNED INTEGER),
my_date, id FROM t1_values
WHERE select_id = 79 OR select_id IS NULL order by id;
CAST(my_date AS SIGNED INTEGER)	my_date	id
NULL	NULL	1
10101	0001-01-01	2
99991231	9999-12-31	3
20040229	2004-02-29	4
20050628	2005-06-28	5
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 cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 79 OR select_id IS NULL) order by id;
CAST(my_date AS SIGNED INTEGER)	my_date	id
NULL	NULL	1
10101	0001-01-01	2
99991231	9999-12-31	3
20040229	2004-02-29	4
20050628	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS SIGNED INTEGER),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS SIGNED INTEGER),
my_datetime, id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL order by id;
CAST(my_datetime AS SIGNED INTEGER)	my_datetime	id
NULL	NULL	1
10101000000	0001-01-01 00:00:00	2
99991231235959	9999-12-31 23:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL) order by id;
CAST(my_datetime AS SIGNED INTEGER)	my_datetime	id
NULL	NULL	1
10101000000	0001-01-01 00:00:00	2
99991231235959	9999-12-31 23:59:59	3
20040229235959	2004-02-29 23:59:59	4
20050628100000	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS SIGNED INTEGER),
my_double, id FROM t1_values;
SELECT CAST(my_double AS SIGNED INTEGER),
my_double, id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL order by id;
CAST(my_double AS SIGNED INTEGER)	my_double	id
NULL	NULL	1
-9223372036854775808	-1.7976931348623e308	2
9223372036854775807	1.7976931348623e308	3
0	0	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect INTEGER value: '1.7976931348623e308'
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 cast(`t1_values`.`my_double` as signed) AS `CAST(my_double AS SIGNED INTEGER)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL) order by id;
CAST(my_double AS SIGNED INTEGER)	my_double	id
NULL	NULL	1
-9223372036854775808	-1.7976931348623e308	2
9223372036854775807	1.7976931348623e308	3
0	0	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect INTEGER value: '1.7976931348623e308'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_decimal AS SIGNED INTEGER),
my_decimal, id FROM t1_values;
SELECT CAST(my_decimal AS SIGNED INTEGER),
my_decimal, id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL order by id;
CAST(my_decimal AS SIGNED INTEGER)	my_decimal	id
NULL	NULL	1
-9223372036854775808	-9999999999999999999999999999999999.999999999999999999999999999999	2
9223372036854775807	9999999999999999999999999999999999.999999999999999999999999999999	3
0	0.000000000000000000000000000000	4
-1	-1.000000000000000000000000000000	5
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '9999999999999999999999999999999999.999999999999999999999999999999'
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 cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL) order by id;
CAST(my_decimal AS SIGNED INTEGER)	my_decimal	id
NULL	NULL	1
-9223372036854775808	-9999999999999999999999999999999999.999999999999999999999999999999	2
9223372036854775807	9999999999999999999999999999999999.999999999999999999999999999999	3
0	0.000000000000000000000000000000	4
-1	-1.000000000000000000000000000000	5
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-9999999999999999999999999999999999.999999999999999999999999999999'
Warning	1292	Truncated incorrect DECIMAL value: '9999999999999999999999999999999999.999999999999999999999999999999'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS SIGNED INTEGER),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS SIGNED INTEGER),
my_bigint, id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL order by id;
CAST(my_bigint AS SIGNED INTEGER)	my_bigint	id
NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
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 cast(`t1_values`.`my_bigint` as signed) AS `CAST(my_bigint AS SIGNED INTEGER)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL) order by id;
CAST(my_bigint AS SIGNED INTEGER)	my_bigint	id
NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS SIGNED INTEGER),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS SIGNED INTEGER)	my_varbinary_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
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 cast(`t1_values`.`my_varbinary_1000` as signed) AS `CAST(my_varbinary_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS SIGNED INTEGER)	my_varbinary_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS SIGNED INTEGER),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS SIGNED INTEGER),
my_binary_30, id FROM t1_values
WHERE select_id = 73 OR select_id IS NULL order by id;
CAST(my_binary_30 AS SIGNED INTEGER)	my_binary_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$-- 	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
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 cast(`t1_values`.`my_binary_30` as signed) AS `CAST(my_binary_30 AS SIGNED INTEGER)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 73 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS SIGNED INTEGER)	my_binary_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$-- 	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect INTEGER value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS SIGNED INTEGER),
my_varchar_1000, id FROM t1_values
WHERE select_id = 72 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS SIGNED INTEGER)	my_varchar_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
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 cast(`t1_values`.`my_varchar_1000` as signed) AS `CAST(my_varchar_1000 AS SIGNED INTEGER)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 72 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS SIGNED INTEGER)	my_varchar_1000	id
NULL	NULL	1
0		2
0	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0	 ---äÖüß@µ*$-- 	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS SIGNED INTEGER),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS SIGNED INTEGER),
my_char_30, id FROM t1_values
WHERE select_id = 71 OR select_id IS NULL order by id;
CAST(my_char_30 AS SIGNED INTEGER)	my_char_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$--	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
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 cast(`t1_values`.`my_char_30` as signed) AS `CAST(my_char_30 AS SIGNED INTEGER)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 71 OR select_id IS NULL) order by id;
CAST(my_char_30 AS SIGNED INTEGER)	my_char_30	id
NULL	NULL	1
0		2
0	<--------30 characters------->	3
0	 ---äÖüß@µ*$--	4
-1	-1	5
Warnings:
Warning	1292	Truncated incorrect INTEGER value: ''
Warning	1292	Truncated incorrect INTEGER value: '<--------30 characters------->'
Warning	1292	Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values;
SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values
WHERE select_id = 70 OR select_id IS NULL order by id;
CAST(my_year AS DECIMAL(37,2))	my_year	id
NULL	NULL	1
1901.00	1901	2
2155.00	2155	3
2000.00	2000	4
2005.00	2005	5
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 cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 70 OR select_id IS NULL) order by id;
CAST(my_year AS DECIMAL(37,2))	my_year	id
NULL	NULL	1
1901.00	1901	2
2155.00	2155	3
2000.00	2000	4
2005.00	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values;
SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values
WHERE select_id = 69 OR select_id IS NULL order by id;
CAST(my_time AS DECIMAL(37,2))	my_time	id
NULL	NULL	1
-8385959.00	-838:59:59	2
8385959.00	838:59:59	3
130000.00	13:00:00	4
100000.00	10:00:00	5
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 cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 69 OR select_id IS NULL) order by id;
CAST(my_time AS DECIMAL(37,2))	my_time	id
NULL	NULL	1
-8385959.00	-838:59:59	2
8385959.00	838:59:59	3
130000.00	13:00:00	4
100000.00	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL order by id;
CAST(my_timestamp AS DECIMAL(37,2))	my_timestamp	id
0.00	0000-00-00 00:00:00	1
19700101030001.00	1970-01-01 03:00:01	2
20380101025959.00	2038-01-01 02:59:59	3
20040229235959.00	2004-02-29 23:59:59	4
20050628100000.00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL) order by id;
CAST(my_timestamp AS DECIMAL(37,2))	my_timestamp	id
0.00	0000-00-00 00:00:00	1
19700101030001.00	1970-01-01 03:00:01	2
20380101025959.00	2038-01-01 02:59:59	3
20040229235959.00	2004-02-29 23:59:59	4
20050628100000.00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values;
SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL order by id;
CAST(my_date AS DECIMAL(37,2))	my_date	id
NULL	NULL	1
10101.00	0001-01-01	2
99991231.00	9999-12-31	3
20040229.00	2004-02-29	4
20050628.00	2005-06-28	5
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 cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL) order by id;
CAST(my_date AS DECIMAL(37,2))	my_date	id
NULL	NULL	1
10101.00	0001-01-01	2
99991231.00	9999-12-31	3
20040229.00	2004-02-29	4
20050628.00	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL order by id;
CAST(my_datetime AS DECIMAL(37,2))	my_datetime	id
NULL	NULL	1
10101000000.00	0001-01-01 00:00:00	2
99991231235959.00	9999-12-31 23:59:59	3
20040229235959.00	2004-02-29 23:59:59	4
20050628100000.00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL) order by id;
CAST(my_datetime AS DECIMAL(37,2))	my_datetime	id
NULL	NULL	1
10101000000.00	0001-01-01 00:00:00	2
99991231235959.00	9999-12-31 23:59:59	3
20040229235959.00	2004-02-29 23:59:59	4
20050628100000.00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS DECIMAL(37,2)),
my_double, id FROM t1_values;
SELECT CAST(my_double AS DECIMAL(37,2)),
my_double, id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL order by id;
CAST(my_double AS DECIMAL(37,2))	my_double	id
NULL	NULL	1
-99999999999999999999999999999999999.99	-1.7976931348623e308	2
99999999999999999999999999999999999.99	1.7976931348623e308	3
0.00	0	4
-1.00	-1	5
-3333.33	-3333.3333	30
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-1.7976931348623'
Warning	1264	Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning	1292	Truncated incorrect DECIMAL value: '1.7976931348623'
Warning	1264	Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 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 cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL) order by id;
CAST(my_double AS DECIMAL(37,2))	my_double	id
NULL	NULL	1
-99999999999999999999999999999999999.99	-1.7976931348623e308	2
99999999999999999999999999999999999.99	1.7976931348623e308	3
0.00	0	4
-1.00	-1	5
-3333.33	-3333.3333	30
Warnings:
Warning	1292	Truncated incorrect DECIMAL value: '-1.7976931348623'
Warning	1264	Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
Warning	1292	Truncated incorrect DECIMAL value: '1.7976931348623'
Warning	1264	Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values;
SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL order by id;
CAST(my_decimal AS DECIMAL(37,2))	my_decimal	id
NULL	NULL	1
-10000000000000000000000000000000000.00	-9999999999999999999999999999999999.999999999999999999999999999999	2
10000000000000000000000000000000000.00	9999999999999999999999999999999999.999999999999999999999999999999	3
0.00	0.000000000000000000000000000000	4
-1.00	-1.000000000000000000000000000000	5
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 cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL) order by id;
CAST(my_decimal AS DECIMAL(37,2))	my_decimal	id
NULL	NULL	1
-10000000000000000000000000000000000.00	-9999999999999999999999999999999999.999999999999999999999999999999	2
10000000000000000000000000000000000.00	9999999999999999999999999999999999.999999999999999999999999999999	3
0.00	0.000000000000000000000000000000	4
-1.00	-1.000000000000000000000000000000	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL order by id;
CAST(my_bigint AS DECIMAL(37,2))	my_bigint	id
NULL	NULL	1
-9223372036854775808.00	-9223372036854775808	2
9223372036854775807.00	9223372036854775807	3
0.00	0	4
-1.00	-1	5
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 cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL) order by id;
CAST(my_bigint AS DECIMAL(37,2))	my_bigint	id
NULL	NULL	1
-9223372036854775808.00	-9223372036854775808	2
9223372036854775807.00	9223372036854775807	3
0.00	0	4
-1.00	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS DECIMAL(37,2))	my_varbinary_1000	id
NULL	NULL	1
0.00		2
0.00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0.00	 ---äÖüß@µ*$-- 	4
-1.00	-1	5
-3333.33	-3333.3333	29
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ''
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
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 cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS DECIMAL(37,2))	my_varbinary_1000	id
NULL	NULL	1
0.00		2
0.00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0.00	 ---äÖüß@µ*$-- 	4
-1.00	-1	5
-3333.33	-3333.3333	29
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ''
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DECIMAL(37,2))	my_binary_30	id
NULL	NULL	1
0.00		2
0.00	<--------30 characters------->	3
0.00	 ---äÖüß@µ*$-- 	4
-1.00	-1	5
-3333.33	-3333.3333	28
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
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 cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS DECIMAL(37,2))	my_binary_30	id
NULL	NULL	1
0.00		2
0.00	<--------30 characters------->	3
0.00	 ---äÖüß@µ*$-- 	4
-1.00	-1	5
-3333.33	-3333.3333	28
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS DECIMAL(37,2))	my_varchar_1000	id
NULL	NULL	1
0.00		2
0.00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0.00	 ---äÖüß@µ*$-- 	4
-1.00	-1	5
-3333.33	-3333.3333	27
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ''
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
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 cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS DECIMAL(37,2))	my_varchar_1000	id
NULL	NULL	1
0.00		2
0.00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
0.00	 ---äÖüß@µ*$-- 	4
-1.00	-1	5
-3333.33	-3333.3333	27
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ''
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL order by id;
CAST(my_char_30 AS DECIMAL(37,2))	my_char_30	id
NULL	NULL	1
0.00		2
0.00	<--------30 characters------->	3
0.00	 ---äÖüß@µ*$--	4
-1.00	-1	5
-3333.33	-3333.3333	26
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '                              '
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$--           '
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 cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL) order by id;
CAST(my_char_30 AS DECIMAL(37,2))	my_char_30	id
NULL	NULL	1
0.00		2
0.00	<--------30 characters------->	3
0.00	 ---äÖüß@µ*$--	4
-1.00	-1	5
-3333.33	-3333.3333	26
Warnings:
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '                              '
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning	1366	Incorrect DECIMAL value: '0' for column '' at row -1
Warning	1292	Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$--           '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS TIME),
my_year, id FROM t1_values;
SELECT CAST(my_year AS TIME),
my_year, id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL order by id;
CAST(my_year AS TIME)	my_year	id
NULL	NULL	1
00:19:01	1901	2
00:21:55	2155	3
00:20:00	2000	4
00:20:05	2005	5
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 cast(`t1_values`.`my_year` as time) AS `CAST(my_year AS TIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL) order by id;
CAST(my_year AS TIME)	my_year	id
NULL	NULL	1
00:19:01	1901	2
00:21:55	2155	3
00:20:00	2000	4
00:20:05	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS TIME),
my_time, id FROM t1_values;
SELECT CAST(my_time AS TIME),
my_time, id FROM t1_values
WHERE select_id = 57 OR select_id IS NULL order by id;
CAST(my_time AS TIME)	my_time	id
NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
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 cast(`t1_values`.`my_time` as time) AS `CAST(my_time AS TIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 57 OR select_id IS NULL) order by id;
CAST(my_time AS TIME)	my_time	id
NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS TIME),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS TIME),
my_timestamp, id FROM t1_values
WHERE select_id = 56 OR select_id IS NULL order by id;
CAST(my_timestamp AS TIME)	my_timestamp	id
00:00:00	0000-00-00 00:00:00	1
03:00:01	1970-01-01 03:00:01	2
02:59:59	2038-01-01 02:59:59	3
23:59:59	2004-02-29 23:59:59	4
10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as time) AS `CAST(my_timestamp AS TIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 56 OR select_id IS NULL) order by id;
CAST(my_timestamp AS TIME)	my_timestamp	id
00:00:00	0000-00-00 00:00:00	1
03:00:01	1970-01-01 03:00:01	2
02:59:59	2038-01-01 02:59:59	3
23:59:59	2004-02-29 23:59:59	4
10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS TIME),
my_date, id FROM t1_values;
SELECT CAST(my_date AS TIME),
my_date, id FROM t1_values
WHERE select_id = 55 OR select_id IS NULL order by id;
CAST(my_date AS TIME)	my_date	id
NULL	NULL	1
00:00:00	0001-01-01	2
00:00:00	9999-12-31	3
00:00:00	2004-02-29	4
00:00:00	2005-06-28	5
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 cast(`t1_values`.`my_date` as time) AS `CAST(my_date AS TIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 55 OR select_id IS NULL) order by id;
CAST(my_date AS TIME)	my_date	id
NULL	NULL	1
00:00:00	0001-01-01	2
00:00:00	9999-12-31	3
00:00:00	2004-02-29	4
00:00:00	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS TIME),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS TIME),
my_datetime, id FROM t1_values
WHERE select_id = 54 OR select_id IS NULL order by id;
CAST(my_datetime AS TIME)	my_datetime	id
NULL	NULL	1
00:00:00	0001-01-01 00:00:00	2
23:59:59	9999-12-31 23:59:59	3
23:59:59	2004-02-29 23:59:59	4
10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as time) AS `CAST(my_datetime AS TIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 54 OR select_id IS NULL) order by id;
CAST(my_datetime AS TIME)	my_datetime	id
NULL	NULL	1
00:00:00	0001-01-01 00:00:00	2
23:59:59	9999-12-31 23:59:59	3
23:59:59	2004-02-29 23:59:59	4
10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS TIME),
my_double, id FROM t1_values;
SELECT CAST(my_double AS TIME),
my_double, id FROM t1_values
WHERE select_id = 53 OR select_id IS NULL order by id;
CAST(my_double AS TIME)	my_double	id
NULL	NULL	1
NULL	-1.7976931348623e308	2
NULL	1.7976931348623e308	3
00:00:00	0	4
-00:00:01	-1	5
00:17:58	1758	25
Warnings:
Warning	1292	Truncated incorrect time value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect time value: '1.7976931348623e308'
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 cast(`t1_values`.`my_double` as time) AS `CAST(my_double AS TIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 53 OR select_id IS NULL) order by id;
CAST(my_double AS TIME)	my_double	id
NULL	NULL	1
NULL	-1.7976931348623e308	2
NULL	1.7976931348623e308	3
00:00:00	0	4
-00:00:01	-1	5
00:17:58	1758	25
Warnings:
Warning	1292	Truncated incorrect time value: '-1.7976931348623e308'
Warning	1292	Truncated incorrect time value: '1.7976931348623e308'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS TIME),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS TIME),
my_bigint, id FROM t1_values
WHERE select_id = 52 OR select_id IS NULL order by id;
CAST(my_bigint AS TIME)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
NULL	9223372036854775807	3
00:00:00	0	4
-00:00:01	-1	5
00:17:58	1758	24
Warnings:
Warning	1292	Truncated incorrect time value: '-9223372036854775808'
Warning	1292	Truncated incorrect time value: '9223372036854775807'
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 cast(`t1_values`.`my_bigint` as time) AS `CAST(my_bigint AS TIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 52 OR select_id IS NULL) order by id;
CAST(my_bigint AS TIME)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
NULL	9223372036854775807	3
00:00:00	0	4
-00:00:01	-1	5
00:17:58	1758	24
Warnings:
Warning	1292	Truncated incorrect time value: '-9223372036854775808'
Warning	1292	Truncated incorrect time value: '9223372036854775807'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS TIME),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS TIME),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 51 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS TIME)	my_varbinary_1000	id
NULL	NULL	1
NULL		2
00:00:00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
-00:00:00	 ---äÖüß@µ*$-- 	4
-00:00:01	-1	5
41:58:00	1 17:58	23
Warnings:
Warning	1292	Truncated incorrect time value: ''
Warning	1292	Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
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 cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 51 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS TIME)	my_varbinary_1000	id
NULL	NULL	1
NULL		2
00:00:00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
00:00:00	 ---äÖüß@µ*$-- 	4
-00:00:01	-1	5
41:58:00	1 17:58	23
Warnings:
Warning	1292	Truncated incorrect time value: ''
Warning	1292	Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS TIME),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS TIME),
my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME)	my_binary_30	id
NULL	NULL	1
00:00:00		2
00:00:00	<--------30 characters------->	3
-00:00:00	 ---äÖüß@µ*$-- 	4
NULL	-1	5
41:58:00	1 17:58	22
Warnings:
Warning	1292	Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect time value: '<--------30 characters------->'
Warning	1292	Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
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 cast(`t1_values`.`my_binary_30` as time) AS `CAST(my_binary_30 AS TIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS TIME)	my_binary_30	id
NULL	NULL	1
00:00:00		2
00:00:00	<--------30 characters------->	3
00:00:00	 ---äÖüß@µ*$-- 	4
NULL	-1	5
41:58:00	1 17:58	22
Warnings:
Warning	1292	Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect time value: '<--------30 characters------->'
Warning	1292	Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS TIME),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS TIME),
my_varchar_1000, id FROM t1_values
WHERE select_id = 49 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS TIME)	my_varchar_1000	id
NULL	NULL	1
NULL		2
00:00:00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
-00:00:00	 ---äÖüß@µ*$-- 	4
-00:00:01	-1	5
41:58:00	1 17:58	21
Warnings:
Warning	1292	Truncated incorrect time value: ''
Warning	1292	Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect time value: ' ---äÖüß@µ*$-- '
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 cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 49 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS TIME)	my_varchar_1000	id
NULL	NULL	1
NULL		2
00:00:00	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
00:00:00	 ---äÖüß@µ*$-- 	4
-00:00:01	-1	5
41:58:00	1 17:58	21
Warnings:
Warning	1292	Truncated incorrect time value: ''
Warning	1292	Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Truncated incorrect time value: ' ---äÖüß@µ*$-- '
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS TIME),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS TIME),
my_char_30, id FROM t1_values
WHERE select_id = 48 OR select_id IS NULL order by id;
CAST(my_char_30 AS TIME)	my_char_30	id
NULL	NULL	1
NULL		2
00:00:00	<--------30 characters------->	3
-00:00:00	 ---äÖüß@µ*$--	4
-00:00:01	-1	5
41:58:00	1 17:58	20
Warnings:
Warning	1292	Truncated incorrect time value: ''
Warning	1292	Truncated incorrect time value: '<--------30 characters------->'
Warning	1292	Truncated incorrect time value: ' ---äÖüß@µ*$--'
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 cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 48 OR select_id IS NULL) order by id;
CAST(my_char_30 AS TIME)	my_char_30	id
NULL	NULL	1
NULL		2
00:00:00	<--------30 characters------->	3
00:00:00	 ---äÖüß@µ*$--	4
-00:00:01	-1	5
41:58:00	1 17:58	20
Warnings:
Warning	1292	Truncated incorrect time value: ''
Warning	1292	Truncated incorrect time value: '<--------30 characters------->'
Warning	1292	Truncated incorrect time value: ' ---äÖüß@µ*$--'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS DATETIME),
my_year, id FROM t1_values;
SELECT CAST(my_year AS DATETIME),
my_year, id FROM t1_values
WHERE select_id = 47 OR select_id IS NULL order by id;
CAST(my_year AS DATETIME)	my_year	id
NULL	NULL	1
NULL	1901	2
NULL	2155	3
NULL	2000	4
NULL	2005	5
Warnings:
Warning	1292	Incorrect datetime value: '1901'
Warning	1292	Incorrect datetime value: '2155'
Warning	1292	Incorrect datetime value: '2000'
Warning	1292	Incorrect datetime value: '2005'
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 cast(`t1_values`.`my_year` as datetime) AS `CAST(my_year AS DATETIME)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 47 OR select_id IS NULL) order by id;
CAST(my_year AS DATETIME)	my_year	id
NULL	NULL	1
NULL	1901	2
NULL	2155	3
NULL	2000	4
NULL	2005	5
Warnings:
Warning	1292	Incorrect datetime value: '1901'
Warning	1292	Incorrect datetime value: '2155'
Warning	1292	Incorrect datetime value: '2000'
Warning	1292	Incorrect datetime value: '2005'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS DATETIME),
my_time, id FROM t1_values;
SELECT CAST(my_time AS DATETIME),
my_time, id FROM t1_values
WHERE select_id = 46 OR select_id IS NULL order by id;
CAST(my_time AS DATETIME)	my_time	id
NULL	NULL	1
2009-11-27 01:00:01	-838:59:59	2
2010-02-04 22:59:59	838:59:59	3
2010-01-01 13:00:00	13:00:00	4
2010-01-01 10:00:00	10:00:00	5
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 cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 46 OR select_id IS NULL) order by id;
CAST(my_time AS DATETIME)	my_time	id
NULL	NULL	1
2009-11-27 01:00:01	-838:59:59	2
2010-02-04 22:59:59	838:59:59	3
2010-01-01 13:00:00	13:00:00	4
2010-01-01 10:00:00	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATETIME),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS DATETIME),
my_timestamp, id FROM t1_values
WHERE select_id = 45 OR select_id IS NULL order by id;
CAST(my_timestamp AS DATETIME)	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as datetime) AS `CAST(my_timestamp AS DATETIME)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 45 OR select_id IS NULL) order by id;
CAST(my_timestamp AS DATETIME)	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS DATETIME),
my_date, id FROM t1_values;
SELECT CAST(my_date AS DATETIME),
my_date, id FROM t1_values
WHERE select_id = 44 OR select_id IS NULL order by id;
CAST(my_date AS DATETIME)	my_date	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01	2
9999-12-31 00:00:00	9999-12-31	3
2004-02-29 00:00:00	2004-02-29	4
2005-06-28 00:00:00	2005-06-28	5
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 cast(`t1_values`.`my_date` as datetime) AS `CAST(my_date AS DATETIME)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 44 OR select_id IS NULL) order by id;
CAST(my_date AS DATETIME)	my_date	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01	2
9999-12-31 00:00:00	9999-12-31	3
2004-02-29 00:00:00	2004-02-29	4
2005-06-28 00:00:00	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATETIME),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS DATETIME),
my_datetime, id FROM t1_values
WHERE select_id = 43 OR select_id IS NULL order by id;
CAST(my_datetime AS DATETIME)	my_datetime	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as datetime) AS `CAST(my_datetime AS DATETIME)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 43 OR select_id IS NULL) order by id;
CAST(my_datetime AS DATETIME)	my_datetime	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS DATETIME),
my_double, id FROM t1_values;
SELECT CAST(my_double AS DATETIME),
my_double, id FROM t1_values
WHERE select_id = 42 OR select_id IS NULL order by id;
CAST(my_double AS DATETIME)	my_double	id
NULL	NULL	1
NULL	-1.7976931348623e308	2
NULL	1.7976931348623e308	3
0000-00-00 00:00:00	0	4
NULL	-1	5
NULL	200506271758	19
Warnings:
Warning	1292	Incorrect datetime value: '-1.7976931348623e308'
Warning	1292	Incorrect datetime value: '1.7976931348623e308'
Warning	1292	Incorrect datetime value: '-1'
Warning	1292	Incorrect datetime value: '200506271758'
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 cast(`t1_values`.`my_double` as datetime) AS `CAST(my_double AS DATETIME)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 42 OR select_id IS NULL) order by id;
CAST(my_double AS DATETIME)	my_double	id
NULL	NULL	1
NULL	-1.7976931348623e308	2
NULL	1.7976931348623e308	3
0000-00-00 00:00:00	0	4
NULL	-1	5
NULL	200506271758	19
Warnings:
Warning	1292	Incorrect datetime value: '-1.7976931348623e308'
Warning	1292	Incorrect datetime value: '1.7976931348623e308'
Warning	1292	Incorrect datetime value: '-1'
Warning	1292	Incorrect datetime value: '200506271758'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATETIME),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS DATETIME),
my_bigint, id FROM t1_values
WHERE select_id = 41 OR select_id IS NULL order by id;
CAST(my_bigint AS DATETIME)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
NULL	9223372036854775807	3
0000-00-00 00:00:00	0	4
NULL	-1	5
NULL	200506271758	18
Warnings:
Warning	1292	Incorrect datetime value: '-9223372036854775808'
Warning	1292	Incorrect datetime value: '9223372036854775807'
Warning	1292	Incorrect datetime value: '-1'
Warning	1292	Incorrect datetime value: '200506271758'
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 cast(`t1_values`.`my_bigint` as datetime) AS `CAST(my_bigint AS DATETIME)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 41 OR select_id IS NULL) order by id;
CAST(my_bigint AS DATETIME)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
NULL	9223372036854775807	3
0000-00-00 00:00:00	0	4
NULL	-1	5
NULL	200506271758	18
Warnings:
Warning	1292	Incorrect datetime value: '-9223372036854775808'
Warning	1292	Incorrect datetime value: '9223372036854775807'
Warning	1292	Incorrect datetime value: '-1'
Warning	1292	Incorrect datetime value: '200506271758'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATETIME),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS DATETIME),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 40 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS DATETIME)	my_varbinary_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	17
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_varbinary_1000` as datetime) AS `CAST(my_varbinary_1000 AS DATETIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 40 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS DATETIME)	my_varbinary_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	17
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATETIME),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS DATETIME),
my_binary_30, id FROM t1_values
WHERE select_id = 39 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATETIME)	my_binary_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	16
Warnings:
Warning	1292	Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
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 cast(`t1_values`.`my_binary_30` as datetime) AS `CAST(my_binary_30 AS DATETIME)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 39 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS DATETIME)	my_binary_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	16
Warnings:
Warning	1292	Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect datetime value: '2005-06-27 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATETIME),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS DATETIME),
my_varchar_1000, id FROM t1_values
WHERE select_id = 38 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS DATETIME)	my_varchar_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	15
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$-- '
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_varchar_1000` as datetime) AS `CAST(my_varchar_1000 AS DATETIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 38 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS DATETIME)	my_varchar_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	15
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$-- '
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATETIME),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS DATETIME),
my_char_30, id FROM t1_values
WHERE select_id = 37 OR select_id IS NULL order by id;
CAST(my_char_30 AS DATETIME)	my_char_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$--	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	14
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$--'
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_char_30` as datetime) AS `CAST(my_char_30 AS DATETIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 37 OR select_id IS NULL) order by id;
CAST(my_char_30 AS DATETIME)	my_char_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$--	4
NULL	-1	5
2005-06-27 17:58:00	2005-06-27 17:58	14
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$--'
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS DATE),
my_year, id FROM t1_values;
SELECT CAST(my_year AS DATE),
my_year, id FROM t1_values
WHERE select_id = 36 OR select_id IS NULL order by id;
CAST(my_year AS DATE)	my_year	id
NULL	NULL	1
NULL	1901	2
NULL	2155	3
NULL	2000	4
NULL	2005	5
Warnings:
Warning	1292	Incorrect datetime value: '1901'
Warning	1292	Incorrect datetime value: '2155'
Warning	1292	Incorrect datetime value: '2000'
Warning	1292	Incorrect datetime value: '2005'
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 cast(`t1_values`.`my_year` as date) AS `CAST(my_year AS DATE)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 36 OR select_id IS NULL) order by id;
CAST(my_year AS DATE)	my_year	id
NULL	NULL	1
NULL	1901	2
NULL	2155	3
NULL	2000	4
NULL	2005	5
Warnings:
Warning	1292	Incorrect datetime value: '1901'
Warning	1292	Incorrect datetime value: '2155'
Warning	1292	Incorrect datetime value: '2000'
Warning	1292	Incorrect datetime value: '2005'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS DATE),
my_time, id FROM t1_values;
SELECT CAST(my_time AS DATE),
my_time, id FROM t1_values
WHERE select_id = 35 OR select_id IS NULL order by id;
CAST(my_time AS DATE)	my_time	id
NULL	NULL	1
2009-11-27	-838:59:59	2
2010-02-04	838:59:59	3
2010-01-01	13:00:00	4
2010-01-01	10:00:00	5
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 cast(`t1_values`.`my_time` as date) AS `CAST(my_time AS DATE)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 35 OR select_id IS NULL) order by id;
CAST(my_time AS DATE)	my_time	id
NULL	NULL	1
2009-11-27	-838:59:59	2
2010-02-04	838:59:59	3
2010-01-01	13:00:00	4
2010-01-01	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DATE),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS DATE),
my_timestamp, id FROM t1_values
WHERE select_id = 34 OR select_id IS NULL order by id;
CAST(my_timestamp AS DATE)	my_timestamp	id
0000-00-00	0000-00-00 00:00:00	1
1970-01-01	1970-01-01 03:00:01	2
2038-01-01	2038-01-01 02:59:59	3
2004-02-29	2004-02-29 23:59:59	4
2005-06-28	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as date) AS `CAST(my_timestamp AS DATE)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 34 OR select_id IS NULL) order by id;
CAST(my_timestamp AS DATE)	my_timestamp	id
0000-00-00	0000-00-00 00:00:00	1
1970-01-01	1970-01-01 03:00:01	2
2038-01-01	2038-01-01 02:59:59	3
2004-02-29	2004-02-29 23:59:59	4
2005-06-28	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS DATE),
my_date, id FROM t1_values;
SELECT CAST(my_date AS DATE),
my_date, id FROM t1_values
WHERE select_id = 33 OR select_id IS NULL order by id;
CAST(my_date AS DATE)	my_date	id
NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
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 cast(`t1_values`.`my_date` as date) AS `CAST(my_date AS DATE)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 33 OR select_id IS NULL) order by id;
CAST(my_date AS DATE)	my_date	id
NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS DATE),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS DATE),
my_datetime, id FROM t1_values
WHERE select_id = 32 OR select_id IS NULL order by id;
CAST(my_datetime AS DATE)	my_datetime	id
NULL	NULL	1
0001-01-01	0001-01-01 00:00:00	2
9999-12-31	9999-12-31 23:59:59	3
2004-02-29	2004-02-29 23:59:59	4
2005-06-28	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as date) AS `CAST(my_datetime AS DATE)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 32 OR select_id IS NULL) order by id;
CAST(my_datetime AS DATE)	my_datetime	id
NULL	NULL	1
0001-01-01	0001-01-01 00:00:00	2
9999-12-31	9999-12-31 23:59:59	3
2004-02-29	2004-02-29 23:59:59	4
2005-06-28	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS DATE),
my_double, id FROM t1_values;
SELECT CAST(my_double AS DATE),
my_double, id FROM t1_values
WHERE select_id = 31 OR select_id IS NULL order by id;
CAST(my_double AS DATE)	my_double	id
NULL	NULL	1
NULL	-1.7976931348623e308	2
NULL	1.7976931348623e308	3
0000-00-00	0	4
NULL	-1	5
2005-06-27	20050627	13
Warnings:
Warning	1292	Incorrect datetime value: '-1.7976931348623e308'
Warning	1292	Incorrect datetime value: '1.7976931348623e308'
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_double` as date) AS `CAST(my_double AS DATE)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 31 OR select_id IS NULL) order by id;
CAST(my_double AS DATE)	my_double	id
NULL	NULL	1
NULL	-1.7976931348623e308	2
NULL	1.7976931348623e308	3
0000-00-00	0	4
NULL	-1	5
2005-06-27	20050627	13
Warnings:
Warning	1292	Incorrect datetime value: '-1.7976931348623e308'
Warning	1292	Incorrect datetime value: '1.7976931348623e308'
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS DATE),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS DATE),
my_bigint, id FROM t1_values
WHERE select_id = 30 OR select_id IS NULL order by id;
CAST(my_bigint AS DATE)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
NULL	9223372036854775807	3
0000-00-00	0	4
NULL	-1	5
2005-06-27	20050627	12
Warnings:
Warning	1292	Incorrect datetime value: '-9223372036854775808'
Warning	1292	Incorrect datetime value: '9223372036854775807'
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_bigint` as date) AS `CAST(my_bigint AS DATE)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 30 OR select_id IS NULL) order by id;
CAST(my_bigint AS DATE)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
NULL	9223372036854775807	3
0000-00-00	0	4
NULL	-1	5
2005-06-27	20050627	12
Warnings:
Warning	1292	Incorrect datetime value: '-9223372036854775808'
Warning	1292	Incorrect datetime value: '9223372036854775807'
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DATE),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS DATE),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 29 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS DATE)	my_varbinary_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27	2005-06-27	11
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_varbinary_1000` as date) AS `CAST(my_varbinary_1000 AS DATE)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 29 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS DATE)	my_varbinary_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27	2005-06-27	11
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DATE),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS DATE),
my_binary_30, id FROM t1_values
WHERE select_id = 28 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATE)	my_binary_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27	2005-06-27	10
Warnings:
Warning	1292	Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
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 cast(`t1_values`.`my_binary_30` as date) AS `CAST(my_binary_30 AS DATE)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 28 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS DATE)	my_binary_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27	2005-06-27	10
Warnings:
Warning	1292	Incorrect datetime value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Incorrect datetime value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning	1292	Truncated incorrect date value: '2005-06-27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DATE),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS DATE),
my_varchar_1000, id FROM t1_values
WHERE select_id = 27 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS DATE)	my_varchar_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27	2005-06-27	9
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$-- '
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_varchar_1000` as date) AS `CAST(my_varchar_1000 AS DATE)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 27 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS DATE)	my_varchar_1000	id
NULL	NULL	1
NULL		2
NULL	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
NULL	 ---äÖüß@µ*$-- 	4
NULL	-1	5
2005-06-27	2005-06-27	9
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$-- '
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DATE),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS DATE),
my_char_30, id FROM t1_values
WHERE select_id = 26 OR select_id IS NULL order by id;
CAST(my_char_30 AS DATE)	my_char_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$--	4
NULL	-1	5
2005-06-27	2005-06-27	8
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$--'
Warning	1292	Incorrect datetime value: '-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 cast(`t1_values`.`my_char_30` as date) AS `CAST(my_char_30 AS DATE)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 26 OR select_id IS NULL) order by id;
CAST(my_char_30 AS DATE)	my_char_30	id
NULL	NULL	1
NULL		2
NULL	<--------30 characters------->	3
NULL	 ---äÖüß@µ*$--	4
NULL	-1	5
2005-06-27	2005-06-27	8
Warnings:
Warning	1292	Incorrect datetime value: ''
Warning	1292	Incorrect datetime value: '<--------30 characters------->'
Warning	1292	Incorrect datetime value: ' ---äÖüß@µ*$--'
Warning	1292	Incorrect datetime value: '-1'
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS CHAR),
my_year, id FROM t1_values;
SELECT CAST(my_year AS CHAR),
my_year, id FROM t1_values
WHERE select_id = 25 OR select_id IS NULL order by id;
CAST(my_year AS CHAR)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
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 cast(`t1_values`.`my_year` as char charset latin1) AS `CAST(my_year AS CHAR)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 25 OR select_id IS NULL) order by id;
CAST(my_year AS CHAR)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS CHAR),
my_time, id FROM t1_values;
SELECT CAST(my_time AS CHAR),
my_time, id FROM t1_values
WHERE select_id = 24 OR select_id IS NULL order by id;
CAST(my_time AS CHAR)	my_time	id
NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
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 cast(`t1_values`.`my_time` as char charset latin1) AS `CAST(my_time AS CHAR)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 24 OR select_id IS NULL) order by id;
CAST(my_time AS CHAR)	my_time	id
NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS CHAR),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS CHAR),
my_timestamp, id FROM t1_values
WHERE select_id = 23 OR select_id IS NULL order by id;
CAST(my_timestamp AS CHAR)	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as char charset latin1) AS `CAST(my_timestamp AS CHAR)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 23 OR select_id IS NULL) order by id;
CAST(my_timestamp AS CHAR)	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS CHAR),
my_date, id FROM t1_values;
SELECT CAST(my_date AS CHAR),
my_date, id FROM t1_values
WHERE select_id = 22 OR select_id IS NULL order by id;
CAST(my_date AS CHAR)	my_date	id
NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
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 cast(`t1_values`.`my_date` as char charset latin1) AS `CAST(my_date AS CHAR)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 22 OR select_id IS NULL) order by id;
CAST(my_date AS CHAR)	my_date	id
NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS CHAR),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS CHAR),
my_datetime, id FROM t1_values
WHERE select_id = 21 OR select_id IS NULL order by id;
CAST(my_datetime AS CHAR)	my_datetime	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as char charset latin1) AS `CAST(my_datetime AS CHAR)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 21 OR select_id IS NULL) order by id;
CAST(my_datetime AS CHAR)	my_datetime	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS CHAR),
my_double, id FROM t1_values;
SELECT CAST(my_double AS CHAR),
my_double, id FROM t1_values
WHERE select_id = 20 OR select_id IS NULL order by id;
CAST(my_double AS CHAR)	my_double	id
NULL	NULL	1
-1.7976931348623e308	-1.7976931348623e308	2
1.7976931348623e308	1.7976931348623e308	3
0	0	4
-1	-1	5
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 cast(`t1_values`.`my_double` as char charset latin1) AS `CAST(my_double AS CHAR)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 20 OR select_id IS NULL) order by id;
CAST(my_double AS CHAR)	my_double	id
NULL	NULL	1
-1.7976931348623e308	-1.7976931348623e308	2
1.7976931348623e308	1.7976931348623e308	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_decimal AS CHAR),
my_decimal, id FROM t1_values;
SELECT CAST(my_decimal AS CHAR),
my_decimal, id FROM t1_values
WHERE select_id = 19 OR select_id IS NULL order by id;
CAST(my_decimal AS CHAR)	my_decimal	id
NULL	NULL	1
-9999999999999999999999999999999999.999999999999999999999999999999	-9999999999999999999999999999999999.999999999999999999999999999999	2
9999999999999999999999999999999999.999999999999999999999999999999	9999999999999999999999999999999999.999999999999999999999999999999	3
0.000000000000000000000000000000	0.000000000000000000000000000000	4
-1.000000000000000000000000000000	-1.000000000000000000000000000000	5
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 cast(`t1_values`.`my_decimal` as char charset latin1) AS `CAST(my_decimal AS CHAR)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 19 OR select_id IS NULL) order by id;
CAST(my_decimal AS CHAR)	my_decimal	id
NULL	NULL	1
-9999999999999999999999999999999999.999999999999999999999999999999	-9999999999999999999999999999999999.999999999999999999999999999999	2
9999999999999999999999999999999999.999999999999999999999999999999	9999999999999999999999999999999999.999999999999999999999999999999	3
0.000000000000000000000000000000	0.000000000000000000000000000000	4
-1.000000000000000000000000000000	-1.000000000000000000000000000000	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS CHAR),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS CHAR),
my_bigint, id FROM t1_values
WHERE select_id = 18 OR select_id IS NULL order by id;
CAST(my_bigint AS CHAR)	my_bigint	id
NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
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 cast(`t1_values`.`my_bigint` as char charset latin1) AS `CAST(my_bigint AS CHAR)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 18 OR select_id IS NULL) order by id;
CAST(my_bigint AS CHAR)	my_bigint	id
NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS CHAR),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS CHAR),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 17 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS CHAR)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 cast(`t1_values`.`my_varbinary_1000` as char charset latin1) AS `CAST(my_varbinary_1000 AS CHAR)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 17 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS CHAR)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS CHAR),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS CHAR),
my_binary_30, id FROM t1_values
WHERE select_id = 16 OR select_id IS NULL order by id;
CAST(my_binary_30 AS CHAR)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 16 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS CHAR)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS CHAR),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS CHAR),
my_varchar_1000, id FROM t1_values
WHERE select_id = 15 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS CHAR)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 cast(`t1_values`.`my_varchar_1000` as char charset latin1) AS `CAST(my_varchar_1000 AS CHAR)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 15 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS CHAR)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS CHAR),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS CHAR),
my_char_30, id FROM t1_values
WHERE select_id = 14 OR select_id IS NULL order by id;
CAST(my_char_30 AS CHAR)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
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 cast(`t1_values`.`my_char_30` as char charset latin1) AS `CAST(my_char_30 AS CHAR)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 14 OR select_id IS NULL) order by id;
CAST(my_char_30 AS CHAR)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_year AS BINARY),
my_year, id FROM t1_values;
SELECT CAST(my_year AS BINARY),
my_year, id FROM t1_values
WHERE select_id = 13 OR select_id IS NULL order by id;
CAST(my_year AS BINARY)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
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 cast(`t1_values`.`my_year` as char charset binary) AS `CAST(my_year AS BINARY)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 13 OR select_id IS NULL) order by id;
CAST(my_year AS BINARY)	my_year	id
NULL	NULL	1
1901	1901	2
2155	2155	3
2000	2000	4
2005	2005	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_time AS BINARY),
my_time, id FROM t1_values;
SELECT CAST(my_time AS BINARY),
my_time, id FROM t1_values
WHERE select_id = 12 OR select_id IS NULL order by id;
CAST(my_time AS BINARY)	my_time	id
NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
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 cast(`t1_values`.`my_time` as char charset binary) AS `CAST(my_time AS BINARY)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 12 OR select_id IS NULL) order by id;
CAST(my_time AS BINARY)	my_time	id
NULL	NULL	1
-838:59:59	-838:59:59	2
838:59:59	838:59:59	3
13:00:00	13:00:00	4
10:00:00	10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_timestamp AS BINARY),
my_timestamp, id FROM t1_values;
SELECT CAST(my_timestamp AS BINARY),
my_timestamp, id FROM t1_values
WHERE select_id = 11 OR select_id IS NULL order by id;
CAST(my_timestamp AS BINARY)	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_timestamp` as char charset binary) AS `CAST(my_timestamp AS BINARY)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 11 OR select_id IS NULL) order by id;
CAST(my_timestamp AS BINARY)	my_timestamp	id
0000-00-00 00:00:00	0000-00-00 00:00:00	1
1970-01-01 03:00:01	1970-01-01 03:00:01	2
2038-01-01 02:59:59	2038-01-01 02:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_date AS BINARY),
my_date, id FROM t1_values;
SELECT CAST(my_date AS BINARY),
my_date, id FROM t1_values
WHERE select_id = 10 OR select_id IS NULL order by id;
CAST(my_date AS BINARY)	my_date	id
NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
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 cast(`t1_values`.`my_date` as char charset binary) AS `CAST(my_date AS BINARY)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 10 OR select_id IS NULL) order by id;
CAST(my_date AS BINARY)	my_date	id
NULL	NULL	1
0001-01-01	0001-01-01	2
9999-12-31	9999-12-31	3
2004-02-29	2004-02-29	4
2005-06-28	2005-06-28	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_datetime AS BINARY),
my_datetime, id FROM t1_values;
SELECT CAST(my_datetime AS BINARY),
my_datetime, id FROM t1_values
WHERE select_id = 9 OR select_id IS NULL order by id;
CAST(my_datetime AS BINARY)	my_datetime	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
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 cast(`t1_values`.`my_datetime` as char charset binary) AS `CAST(my_datetime AS BINARY)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 9 OR select_id IS NULL) order by id;
CAST(my_datetime AS BINARY)	my_datetime	id
NULL	NULL	1
0001-01-01 00:00:00	0001-01-01 00:00:00	2
9999-12-31 23:59:59	9999-12-31 23:59:59	3
2004-02-29 23:59:59	2004-02-29 23:59:59	4
2005-06-28 10:00:00	2005-06-28 10:00:00	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_double AS BINARY),
my_double, id FROM t1_values;
SELECT CAST(my_double AS BINARY),
my_double, id FROM t1_values
WHERE select_id = 8 OR select_id IS NULL order by id;
CAST(my_double AS BINARY)	my_double	id
NULL	NULL	1
-1.7976931348623e308	-1.7976931348623e308	2
1.7976931348623e308	1.7976931348623e308	3
0	0	4
-1	-1	5
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 cast(`t1_values`.`my_double` as char charset binary) AS `CAST(my_double AS BINARY)`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 8 OR select_id IS NULL) order by id;
CAST(my_double AS BINARY)	my_double	id
NULL	NULL	1
-1.7976931348623e308	-1.7976931348623e308	2
1.7976931348623e308	1.7976931348623e308	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_decimal AS BINARY),
my_decimal, id FROM t1_values;
SELECT CAST(my_decimal AS BINARY),
my_decimal, id FROM t1_values
WHERE select_id = 7 OR select_id IS NULL order by id;
CAST(my_decimal AS BINARY)	my_decimal	id
NULL	NULL	1
-9999999999999999999999999999999999.999999999999999999999999999999	-9999999999999999999999999999999999.999999999999999999999999999999	2
9999999999999999999999999999999999.999999999999999999999999999999	9999999999999999999999999999999999.999999999999999999999999999999	3
0.000000000000000000000000000000	0.000000000000000000000000000000	4
-1.000000000000000000000000000000	-1.000000000000000000000000000000	5
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 cast(`t1_values`.`my_decimal` as char charset binary) AS `CAST(my_decimal AS BINARY)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 7 OR select_id IS NULL) order by id;
CAST(my_decimal AS BINARY)	my_decimal	id
NULL	NULL	1
-9999999999999999999999999999999999.999999999999999999999999999999	-9999999999999999999999999999999999.999999999999999999999999999999	2
9999999999999999999999999999999999.999999999999999999999999999999	9999999999999999999999999999999999.999999999999999999999999999999	3
0.000000000000000000000000000000	0.000000000000000000000000000000	4
-1.000000000000000000000000000000	-1.000000000000000000000000000000	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_bigint AS BINARY),
my_bigint, id FROM t1_values;
SELECT CAST(my_bigint AS BINARY),
my_bigint, id FROM t1_values
WHERE select_id = 6 OR select_id IS NULL order by id;
CAST(my_bigint AS BINARY)	my_bigint	id
NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
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 cast(`t1_values`.`my_bigint` as char charset binary) AS `CAST(my_bigint AS BINARY)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 6 OR select_id IS NULL) order by id;
CAST(my_bigint AS BINARY)	my_bigint	id
NULL	NULL	1
-9223372036854775808	-9223372036854775808	2
9223372036854775807	9223372036854775807	3
0	0	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS BINARY),
my_varbinary_1000, id FROM t1_values;
SELECT CAST(my_varbinary_1000 AS BINARY),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 5 OR select_id IS NULL order by id;
CAST(my_varbinary_1000 AS BINARY)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 cast(`t1_values`.`my_varbinary_1000` as char charset binary) AS `CAST(my_varbinary_1000 AS BINARY)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 5 OR select_id IS NULL) order by id;
CAST(my_varbinary_1000 AS BINARY)	my_varbinary_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS BINARY),
my_binary_30, id FROM t1_values;
SELECT CAST(my_binary_30 AS BINARY),
my_binary_30, id FROM t1_values
WHERE select_id = 4 OR select_id IS NULL order by id;
CAST(my_binary_30 AS BINARY)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 4 OR select_id IS NULL) order by id;
CAST(my_binary_30 AS BINARY)	my_binary_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS BINARY),
my_varchar_1000, id FROM t1_values;
SELECT CAST(my_varchar_1000 AS BINARY),
my_varchar_1000, id FROM t1_values
WHERE select_id = 3 OR select_id IS NULL order by id;
CAST(my_varchar_1000 AS BINARY)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
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 cast(`t1_values`.`my_varchar_1000` as char charset binary) AS `CAST(my_varchar_1000 AS BINARY)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 3 OR select_id IS NULL) order by id;
CAST(my_varchar_1000 AS BINARY)	my_varchar_1000	id
NULL	NULL	1
		2
<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	<---------1000 characters-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->	3
 ---äÖüß@µ*$-- 	 ---äÖüß@µ*$-- 	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT CAST(my_char_30 AS BINARY),
my_char_30, id FROM t1_values;
SELECT CAST(my_char_30 AS BINARY),
my_char_30, id FROM t1_values
WHERE select_id = 2 OR select_id IS NULL order by id;
CAST(my_char_30 AS BINARY)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
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 cast(`t1_values`.`my_char_30` as char charset binary) AS `CAST(my_char_30 AS BINARY)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 2 OR select_id IS NULL) order by id;
CAST(my_char_30 AS BINARY)	my_char_30	id
NULL	NULL	1
		2
<--------30 characters------->	<--------30 characters------->	3
 ---äÖüß@µ*$--	 ---äÖüß@µ*$--	4
-1	-1	5
DROP VIEW v1;


CREATE VIEW v1 AS SELECT sqrt(my_bigint), my_bigint, id FROM t1_values;
SELECT sqrt(my_bigint), my_bigint, id FROM t1_values
WHERE select_id = 1 OR select_id IS NULL order by id;
sqrt(my_bigint)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
3037000499.97605	9223372036854775807	3
0	0	4
NULL	-1	5
2	4	6
NULL	-25	7
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 sqrt(`t1_values`.`my_bigint`) AS `sqrt(my_bigint)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`	latin1	latin1_swedish_ci
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 1 OR select_id IS NULL) order by id;
sqrt(my_bigint)	my_bigint	id
NULL	NULL	1
NULL	-9223372036854775808	2
3037000499.97605	9223372036854775807	3
0	0	4
NULL	-1	5
2	4	6
NULL	-25	7
DROP VIEW v1;


DROP TABLE t1_selects, t1_modes, t1_values;

Man Man