SET @NO_REFRESH = IF( '' = '', 0, 1);
USE test;
set @@global.max_heap_table_size  = 4294967295;
set @@session.max_heap_table_size = 4294967295;
drop table if exists tb2 ;
create table tb2 (
f59 numeric (0) unsigned, 
f60 numeric (64) unsigned, 
f61 numeric (0) zerofill, 
f62 numeric (64) zerofill, 
f63 numeric (0) unsigned zerofill, 
f64 numeric (64) unsigned zerofill, 
f65 numeric (0,0), 
f66 numeric (63,30), 
f67 numeric (0,0) unsigned, 
f68 numeric (63,30) unsigned, 
f69 numeric (0,0) zerofill, 
f70 numeric (63,30) zerofill, 
f71 numeric (0,0) unsigned zerofill, 
f72 numeric (63,30) unsigned zerofill, 
f73 real, 
f74 real unsigned, 
f75 real zerofill, 
f76 real unsigned zerofill, 
f77 double default 7.7, 
f78 double unsigned default 7.7, 
f79 double zerofill default 7.7, 
f80 double unsigned zerofill default 8.8, 
f81 float not null default 8.8, 
f82 float unsigned not null default 8.8, 
f83 float zerofill not null default 8.8, 
f84 float unsigned zerofill not null default 8.8, 
f85 float(0) not null default 8.8, 
f86 float(23) not null default 8.8, 
f87 float(0) unsigned not null default 8.8, 
f88 float(23) unsigned not null default 8.8, 
f89 float(0) zerofill not null default 8.8, 
f90 float(23) zerofill not null default 8.8, 
f91 float(0) unsigned zerofill not null default 8.8, 
f92 float(23) unsigned zerofill not null default 8.8, 
f93 float(24) not null default 8.8, 
f94 float(53) not null default 8.8, 
f95 float(24) unsigned not null default 8.8, 
f96 float(53) unsigned not null default 8.8, 
f97 float(24) zerofill not null default 8.8, 
f98 float(53) zerofill not null default 8.8, 
f99 float(24) unsigned zerofill not null default 8.8, 
f100 float(53) unsigned zerofill not null default 8.8, 
f101 date not null default '2000-01-01', 
f102 time not null default 20, 
f103 datetime not null default '2/2/2', 
f104 timestamp not null default 20001231235959, 
f105 year not null default 2000, 
f106 year(3) not null default 2000, 
f107 year(4) not null default 2000, 
f108 enum("1enum","2enum") not null default "1enum", 
f109 set("1set","2set") not null default "1set"
) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
USE test1;
set @@global.max_heap_table_size  = 4294967295;
set @@session.max_heap_table_size = 4294967295;
drop table if exists tb2 ;
create table tb2 (
f59 numeric (0) unsigned, 
f60 numeric (64) unsigned, 
f61 numeric (0) zerofill, 
f62 numeric (64) zerofill, 
f63 numeric (0) unsigned zerofill, 
f64 numeric (64) unsigned zerofill, 
f65 numeric (0,0), 
f66 numeric (63,30), 
f67 numeric (0,0) unsigned, 
f68 numeric (63,30) unsigned, 
f69 numeric (0,0) zerofill, 
f70 numeric (63,30) zerofill, 
f71 numeric (0,0) unsigned zerofill, 
f72 numeric (63,30) unsigned zerofill, 
f73 real, 
f74 real unsigned, 
f75 real zerofill, 
f76 real unsigned zerofill, 
f77 double default 7.7, 
f78 double unsigned default 7.7, 
f79 double zerofill default 7.7, 
f80 double unsigned zerofill default 8.8, 
f81 float not null default 8.8, 
f82 float unsigned not null default 8.8, 
f83 float zerofill not null default 8.8, 
f84 float unsigned zerofill not null default 8.8, 
f85 float(0) not null default 8.8, 
f86 float(23) not null default 8.8, 
f87 float(0) unsigned not null default 8.8, 
f88 float(23) unsigned not null default 8.8, 
f89 float(0) zerofill not null default 8.8, 
f90 float(23) zerofill not null default 8.8, 
f91 float(0) unsigned zerofill not null default 8.8, 
f92 float(23) unsigned zerofill not null default 8.8, 
f93 float(24) not null default 8.8, 
f94 float(53) not null default 8.8, 
f95 float(24) unsigned not null default 8.8, 
f96 float(53) unsigned not null default 8.8, 
f97 float(24) zerofill not null default 8.8, 
f98 float(53) zerofill not null default 8.8, 
f99 float(24) unsigned zerofill not null default 8.8, 
f100 float(53) unsigned zerofill not null default 8.8, 
f101 date not null default '2000-01-01', 
f102 time not null default 20, 
f103 datetime not null default '2/2/2', 
f104 timestamp not null default 20001231235959, 
f105 year not null default 2000, 
f106 year(3) not null default 2000, 
f107 year(4) not null default 2000, 
f108 enum("1enum","2enum") not null default "1enum", 
f109 set("1set","2set") not null default "1set"
) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
USE test;

! Attention: The file with the expected results is not
|            thoroughly checked.
!            The server return codes are correct, but
|            most result sets where the table tb2 is
!            involved are not checked.
--------------------------------------------------------------------------------

There are some statements where the ps-protocol is switched off.
Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill
--------------------------------------------------------------------------------

! Attention: The file with the expected results suffers from
Bug#10713: mysqldump includes database in create view and referenced tables
--------------------------------------------------------------------------------
insert into test.tb2 (f59,f60) values (76710,226546);
insert into test.tb2 (f59,f60) values(2760,985654);
insert into test.tb2 (f59,f60) values(569300,9114376);
insert into test.tb2 (f59,f60) values(660,876546);
insert into test.tb2 (f59,f60) values(250,87895654);
insert into test.tb2 (f59,f60) values(340,9984376);
insert into test.tb2 (f59,f60) values(3410,996546);
insert into test.tb2 (f59,f60) values(2550,775654);
insert into test.tb2 (f59,f60) values(3330,764376);
insert into test.tb2 (f59,f60) values(441,16546);
insert into test.tb2 (f59,f60) values(24,51654);
insert into test.tb2 (f59,f60) values(323,14376);
insert into test.tb2 (f59,f60) values(34,41);
insert into test.tb2 (f59,f60) values(04,74);
insert into test.tb2 (f59,f60) values(15,87);
insert into test.tb2 (f59,f60) values(22,93);
insert into test.tb2 (f59,f60) values(394,41);
insert into test.tb2 (f59,f60) values(094,74);
insert into test.tb2 (f59,f60) values(195,87);
insert into test.tb2 (f59,f60) values(292,93);
insert into test.tb2 (f59,f60) values(0987,41) ;
insert into test.tb2 (f59,f60) values(7876,74) ;
INSERT INTO tb2 (f59,f61) VALUES(321,765 );
INSERT INTO tb2 (f59,f61) VALUES(9112,8771);
INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
INSERT INTO tb2 (f59,f61) VALUES (500,900 ) ;
Insert into tb2 (f59,f60,f61) values (107,105,106) ;
Insert into tb2 (f59,f60,f61) values (109,108,104) ;
Insert into tb2 (f59,f60,f61) values (207,205,206) ;
Insert into tb2 (f59,f60,f61) values (209,208,204) ;
Insert into tb2 (f59,f60,f61) values (27,25,26) ;
Insert into tb2 (f59,f60,f61) values (29,28,24) ;
Insert into tb2 (f59,f60,f61) values (17,15,16) ;
Insert into tb2 (f59,f60,f61) values (19,18,14) ;
insert into tb2 (f59,f60,f61) values (107,105,106);
insert into tb2 (f59,f60,f61) values (109,108,104);
INSERT INTO tb2 (f59,f60) VALUES( 299,899 );
INSERT INTO tb2 (f59,f60) VALUES( 242,79  );
INSERT INTO tb2 (f59,f60) VALUES( 424,89  );
Use test;

Testcase 3.3.1.1 
--------------------------------------------------------------------------------
Drop table if exists t1;
Create table t1 (f59 INT, f60 INT) ;
Insert into t1  values (100,4234);
Insert into t1  values (990,6624);
Insert into t1  values (710,765);
Insert into t1  values (300,433334);
Insert into t1  values (800,9788);
Insert into t1  values (500,9866);
Drop view if exists v1 ;
CREATE VIEW v1 AS select f59,f60,f61
FROM test.tb2 where f59=250;
select * FROM v1 order by f60,f61 limit 0,10;
f59	f60	f61
250	87895654	NULL
Drop view if exists v1 ;
CREATE VIEW v1 AS select f59,f60,f61
FROM test.tb2 limit 100;
select * FROM v1 order by f59,f60,f61 limit 0,10;
f59	f60	f61
1	1	0000000001
2	2	0000000002
3	3	0000000003
4	4	0000000004
4	74	NULL
5	5	0000000005
6	6	0000000006
7	7	0000000007
8	8	0000000008
9	9	0000000009
CREATE or REPLACE VIEW v1 AS select f59,f60,f61
FROM test.tb2 limit 4,3;
select * FROM v1 order by f59,f60,f61 limit 0,10;
f59	f60	f61
5	5	0000000005
6	6	0000000006
7	7	0000000007
CREATE or REPLACE VIEW v1 AS select distinct f59
FROM test.tb2 limit 4,3;
select * FROM v1 order by f59 limit 0,10;
f59
5
6
7
ALTER VIEW v1 AS select f59
FROM test.tb2 limit 6,2;
select * FROM v1 order by f59 limit 0,10;
f59
7
8
CREATE or REPLACE VIEW v1 AS select f59
from tb2 order by f59 limit 100;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
4
5
6
7
8
9
CREATE or REPLACE VIEW v1 AS select f59
from tb2 order by f59 asc limit 100;
select * FROM v1 limit 0,10;
f59
1
2
3
4
4
5
6
7
8
9
CREATE or REPLACE VIEW v1 AS select f59
from tb2 order by f59 desc limit 100;
select * FROM v1 limit 0,10;
f59
569300
76710
9112
7876
3410
3330
2760
2550
987
660
CREATE or REPLACE VIEW v1 AS select f59
from tb2 group by f59 limit 100;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
5
6
7
8
9
10
CREATE or REPLACE VIEW v1 AS select f59
from tb2 group by f59 asc limit 100;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
5
6
7
8
9
10
CREATE or REPLACE VIEW v1 AS select f59
from tb2 group by f59 desc limit 100;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
5
6
7
8
9
10
CREATE or REPLACE VIEW v1 AS (select f59 from tb2)
union (select f59 from t1) limit 100;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
5
6
7
8
9
10
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
UNION DISTINCT(select f59 FROM t1) ;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
5
6
7
8
9
10
CREATE or REPLACE VIEW v1 AS (select f59 FROM tb2)
UNION ALL(select f59 FROM t1) ;
select * FROM v1 order by f59 limit 0,10;
f59
1
2
3
4
4
5
6
7
8
9
CREATE or REPLACE VIEW v1 AS select *
FROM test.tb2 WITH LOCAL CHECK OPTION ;
select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,50;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
3	3	0000000003	0000000000000000000000000000000000000000000000000000000000000003	0000000003	0000000000000000000000000000000000000000000000000000000000000003	-3	2.200000000000000000000000000000	3	2.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494348e-38	1.17549e-38	1.175494354e-38	01.17549e-38	00000001.175494354e-38	01.17549e-38	00000001.175494354e-38	1000-01-03	838:59:56	1970-01-04 00:00:03	1970-01-04 00:00:03	1904	1904	1904	2enum	1set
4	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
4	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
5	5	0000000005	0000000000000000000000000000000000000000000000000000000000000005	0000000005	0000000000000000000000000000000000000000000000000000000000000005	-1	4.400000000000000000000000000000	5	4.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494346e-38	1.17549e-38	1.175494356e-38	01.17549e-38	00000001.175494356e-38	01.17549e-38	00000001.175494356e-38	1000-01-05	838:59:54	1970-01-06 00:00:05	1970-01-06 00:00:05	1906	1906	1906	2enum	1set,2set
6	6	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0	5.500000000000000000000000000000	6	5.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494345e-38	1.17549e-38	1.175494357e-38	01.17549e-38	00000001.175494357e-38	01.17549e-38	00000001.175494357e-38	1000-01-06	838:59:53	1970-01-07 00:00:06	1970-01-07 00:00:06	1907	1907	1907	1enum	1set
7	7	0000000007	0000000000000000000000000000000000000000000000000000000000000007	0000000007	0000000000000000000000000000000000000000000000000000000000000007	1	6.600000000000000000000000000000	7	6.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494344e-38	1.17549e-38	1.175494358e-38	01.17549e-38	00000001.175494358e-38	01.17549e-38	00000001.175494358e-38	1000-01-07	838:59:52	1970-01-08 00:00:07	1970-01-08 00:00:07	1908	1908	1908	2enum	2set
8	8	0000000008	0000000000000000000000000000000000000000000000000000000000000008	0000000008	0000000000000000000000000000000000000000000000000000000000000008	2	7.700000000000000000000000000000	8	7.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494343e-38	1.17549e-38	1.175494359e-38	01.17549e-38	00000001.175494359e-38	01.17549e-38	00000001.175494359e-38	1000-01-08	838:59:51	1970-01-09 00:00:08	1970-01-09 00:00:08	1909	1909	1909	1enum	1set,2set
9	9	0000000009	0000000000000000000000000000000000000000000000000000000000000009	0000000009	0000000000000000000000000000000000000000000000000000000000000009	3	8.800000000000000000000000000000	9	8.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494342e-38	1.17549e-38	1.17549436e-38	01.17549e-38	000000001.17549436e-38	01.17549e-38	000000001.17549436e-38	1000-01-09	838:59:50	1970-01-10 00:00:09	1970-01-10 00:00:09	1910	1910	1910	2enum	1set
10	10	0000000010	0000000000000000000000000000000000000000000000000000000000000010	0000000010	0000000000000000000000000000000000000000000000000000000000000010	4	9.900000000000000000000000000000	10	9.900000000000000000000000000000	0000000010	000000000000000000000000000000009.900000000000000000000000000000	0000000010	000000000000000000000000000000009.900000000000000000000000000000	-1.175494341e-38	1.175494361e-38	00000001.175494361e-38	00000001.175494361e-38	-1.175494341e-38	1.175494361e-38	00000001.175494361e-38	00000001.175494361e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494341e-38	1.17549e-38	1.175494361e-38	01.17549e-38	00000001.175494361e-38	01.17549e-38	00000001.175494361e-38	1000-01-10	838:59:49	1970-01-11 00:00:10	1970-01-11 00:00:10	1911	1911	1911	1enum	2set
15	87	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
17	15	0000000016	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
19	18	0000000014	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
22	93	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
24	51654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
27	25	0000000026	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
29	28	0000000024	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
34	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
94	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
107	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
107	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
109	108	0000000104	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
109	108	0000000104	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
195	87	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
207	205	0000000206	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
209	208	0000000204	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
242	79	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
250	87895654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
292	93	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
299	899	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
321	NULL	0000000765	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
323	14376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
340	9984376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
394	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
424	89	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
441	16546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
500	NULL	0000000900	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
500	NULL	0000000900	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
500	NULL	0000000900	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
660	876546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
987	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
2550	775654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
2760	985654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
3330	764376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
3410	996546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
7876	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
9112	NULL	0000008771	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
76710	226546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
569300	9114376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
CREATE or REPLACE VIEW v1 AS select *
FROM test.tb2 WITH CASCADED CHECK OPTION ;
select * FROM v1 order by f59,f60,f61,f62,f63,f64 limit 0,10;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
3	3	0000000003	0000000000000000000000000000000000000000000000000000000000000003	0000000003	0000000000000000000000000000000000000000000000000000000000000003	-3	2.200000000000000000000000000000	3	2.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494348e-38	1.17549e-38	1.175494354e-38	01.17549e-38	00000001.175494354e-38	01.17549e-38	00000001.175494354e-38	1000-01-03	838:59:56	1970-01-04 00:00:03	1970-01-04 00:00:03	1904	1904	1904	2enum	1set
4	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
4	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
5	5	0000000005	0000000000000000000000000000000000000000000000000000000000000005	0000000005	0000000000000000000000000000000000000000000000000000000000000005	-1	4.400000000000000000000000000000	5	4.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494346e-38	1.17549e-38	1.175494356e-38	01.17549e-38	00000001.175494356e-38	01.17549e-38	00000001.175494356e-38	1000-01-05	838:59:54	1970-01-06 00:00:05	1970-01-06 00:00:05	1906	1906	1906	2enum	1set,2set
6	6	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0	5.500000000000000000000000000000	6	5.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494345e-38	1.17549e-38	1.175494357e-38	01.17549e-38	00000001.175494357e-38	01.17549e-38	00000001.175494357e-38	1000-01-06	838:59:53	1970-01-07 00:00:06	1970-01-07 00:00:06	1907	1907	1907	1enum	1set
7	7	0000000007	0000000000000000000000000000000000000000000000000000000000000007	0000000007	0000000000000000000000000000000000000000000000000000000000000007	1	6.600000000000000000000000000000	7	6.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494344e-38	1.17549e-38	1.175494358e-38	01.17549e-38	00000001.175494358e-38	01.17549e-38	00000001.175494358e-38	1000-01-07	838:59:52	1970-01-08 00:00:07	1970-01-08 00:00:07	1908	1908	1908	2enum	2set
8	8	0000000008	0000000000000000000000000000000000000000000000000000000000000008	0000000008	0000000000000000000000000000000000000000000000000000000000000008	2	7.700000000000000000000000000000	8	7.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494343e-38	1.17549e-38	1.175494359e-38	01.17549e-38	00000001.175494359e-38	01.17549e-38	00000001.175494359e-38	1000-01-08	838:59:51	1970-01-09 00:00:08	1970-01-09 00:00:08	1909	1909	1909	1enum	1set,2set
9	9	0000000009	0000000000000000000000000000000000000000000000000000000000000009	0000000009	0000000000000000000000000000000000000000000000000000000000000009	3	8.800000000000000000000000000000	9	8.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494342e-38	1.17549e-38	1.17549436e-38	01.17549e-38	000000001.17549436e-38	01.17549e-38	000000001.17549436e-38	1000-01-09	838:59:50	1970-01-10 00:00:09	1970-01-10 00:00:09	1910	1910	1910	2enum	1set
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 WITH CASCADED CHECK OPTION;
SELECT * FROM v1 order by f59,f60 limit 0,10;
F59	F60
1	1
2	2
3	3
4	4
4	74
5	5
6	6
7	7
8	8
9	9
CREATE or REPLACE VIEW v1 AS select f59, f60
from test.tb2 where f59=3330 ;
select * FROM v1 order by f60 limit 0,10;
f59	f60
3330	764376
DROP VIEW  v1 ;
DROP TABLE t1 ;

Testcase 3.3.1.2 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
DROP VIEW  IF EXISTS v2 ;
CREATE TABLE t1 (f1 BIGINT) ;
SET @x=0;
CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
ERROR HY000: View's SELECT contains a 'INTO' clause
Select @x;
@x
0
CREATE or REPLACE VIEW v1 AS Select 1
FROM (SELECT 1 FROM t1) my_table;
ERROR HY000: View's SELECT contains a subquery in the FROM clause
CREATE VIEW v1 AS SELECT f1 FROM t1;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ;
SET @a:=0 ;
SELECT @a ;
@a
0
INSERT INTO v1 VALUES (1) ;
SELECT @a ;
@a
1
SELECT * FROM t1;
f1
1
DROP TRIGGER tr1 ;
SET @a:=0 ;
CREATE TRIGGER tr1 BEFORE INSERT ON v1 FOR EACH ROW SET @a:=1 ;
ERROR HY000: 'test.v1' is not BASE TABLE
RENAME TABLE v1 TO v2;
RENAME VIEW  v2 TO v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW  v2 TO v1' at line 1
ALTER TABLE v2 RENAME AS v1;
ALTER VIEW  v1 RENAME AS v2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1
DROP TABLE IF EXISTS t1, t2 ;
DROP VIEW  IF EXISTS v1 ;
DROP VIEW  IF EXISTS v2 ;
CREATE TABLE t1 ( f1 DATE, f2 BLOB, f3 DOUBLE );
CREATE VIEW  v1 AS SELECT f1, f2, f3 FROM t1;
ALTER  TABLE t1 ADD PRIMARY KEY(f1);
ALTER  TABLE v1 ADD PRIMARY KEY(f1);
ERROR HY000: 'test.v1' is not BASE TABLE
ALTER  VIEW  v1 ADD PRIMARY KEY(f1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD PRIMARY KEY(f1)' at line 1
CREATE INDEX t1_idx ON t1(f3);
CREATE INDEX v1_idx ON v1(f3);
ERROR HY000: 'test.v1' is not BASE TABLE
DROP TABLE t1;
DROP VIEW  v1;

Testcase 3.3.1.3 + 3.1.1.4 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1 ;
CREATE VIEW v1 or REPLACE AS Select * from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or REPLACE AS Select * from tb2 my_table limit 50' at line 1
CREATE VIEW v1 WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH CASCADED CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1
CREATE VIEW v1 WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH LOCAL CHECK OPTION AS Select *
from tb2 my_table limit 50' at line 1
SELECT * FROM tb2 my_table CREATE VIEW As v1 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE VIEW As v1 limit 100' at line 1
CREATE or REPLACE VIEW v1 Select f59, f60
from test.tb2 my_table where f59 = 250 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Select f59, f60
from test.tb2 my_table where f59 = 250' at line 1
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
DROP VIEW v1;
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT AS F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION' at line 1
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table CASCADED WITH CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED WITH CHECK OPTION' at line 2
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED OPTION CHECK;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION CHECK' at line 2
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table CHECK OPTION WITH CASCADED;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK OPTION WITH CASCADED' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH CASCADED CHECK OPTION' at line 1
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60
FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1
REPLACE OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1
CREATE OR REPLACE VIEW v1 SELECT AS F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT AS F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION' at line 1
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table LOCAL WITH CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOCAL WITH CHECK OPTION' at line 2
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL OPTION CHECK;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION CHECK' at line 2
CREATE OR REPLACE VIEW v1 AS SELECT F59, F60
FROM test.tb2 my_table CHECK OPTION WITH LOCAL;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHECK OPTION WITH LOCAL' at line 2
CREATE OR REPLACE VIEW v1 WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH CASCADED CHECK OPTION
AS SELECT F59, F60 FROM test.tb2 my_table' at line 1
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60
FROM test.tb2 my_table VIEW v1 WITH LOCAL CHECK OPTION' at line 1
CREATE OR REPLACE AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT F59, F60
FROM test.tb2 my_table WITH LOCAL CHECK OPTION VIEW v1' at line 1
Drop table if exists t1 ;
CREATE table t1 (f1 int ,f2 int)  ;
INSERT INTO t1 values (235, 22);
INSERT INTO t1 values (554, 11);
CREATE or REPLACE view v1 as (Select from f59 tb2)
Union ALL (Select from f1 t1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from f59 tb2)
Union ALL (Select from f1 t1)' at line 1
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by order f59 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by order f59 limit 100' at line 2
CREATE or REPLACE view v1 as Select f59, f60
from tb2 by group f59  ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2

Testcase 3.3.1.5 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1 ;
CREATE VIEW v1 SELECT * FROM tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1
CREATE v1 AS SELECT * FROM tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'v1 AS SELECT * FROM tb2 limit 100' at line 1
VIEW v1 AS SELECT * FROM tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 AS SELECT * FROM tb2 limit 100' at line 1
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
VIEW v1 AS SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1 AS SELECT 1' at line 1
CREATE      v1 AS SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'v1 AS SELECT 1' at line 1
CREATE VIEW    AS SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS SELECT 1' at line 1
CREATE VIEW v1    SELECT 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1
CREATE VIEW v1 AS         ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Testcase 3.3.1.6 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1 ;
CREATE or REPLACE                       VIEW v1
as SELECT * from tb2 limit 100 ;
CREATE or REPLACE ALGORITHM = UNDEFINED VIEW v1
as SELECT * from tb2 limit 100 ;
CREATE or REPLACE ALGORITHM = MERGE     VIEW v1
as SELECT * from tb2 limit 100 ;
Warnings:
Warning	1354	View merge algorithm can't be used here for now (assumed undefined algorithm)
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100 ;
CREATE or REPLACE ALGORITHM = TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100 ;
CREATE or REPLACE           = TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100' at line 1
CREATE or REPLACE ALGORITHM   TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100' at line 1
CREATE or REPLACE ALGORITHM =           VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v1
as SELECT * from tb2 limit 100' at line 1
CREATE or REPLACE TEMPTABLE = ALGORITHM VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE = ALGORITHM VIEW v1
as SELECT * from tb2 limit 100' at line 1
CREATE or REPLACE TEMPTABLE - ALGORITHM VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPTABLE - ALGORITHM VIEW v1
as SELECT * from tb2 limit 100' at line 1
CREATE or REPLACE GARBAGE   = TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE   = TEMPTABLE VIEW v1
as SELECT * from tb2 limit 100' at line 1
CREATE or REPLACE ALGORITHM = GARBAGE VIEW v1
as SELECT * from tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE VIEW v1
as SELECT * from tb2 limit 100' at line 1
Drop view if exists v1 ;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH          CHECK OPTION;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK OPTION;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH LOCAL    CHECK OPTION;
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH NO       CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NO       CHECK OPTION' at line 2
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1      CASCADED CHECK OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASCADED CHECK OPTION' at line 2
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH CASCADED       OPTION;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION' at line 2
CREATE or REPLACE VIEW v1
AS SELECT * from tb2 where f59 < 1 WITH CASCADED CHECK       ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

Testcase 3.3.1.7 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1 ;
Create view test.v1 AS Select * from test.tb2 limit 100 ;
Alter view test.v1 AS Select F59 from test. tb2 limit 100 ;
Drop view test.v1 ;
Create view v1 AS Select * from test.tb2 limit 100 ;
Alter view v1 AS Select F59 from test.tb2 limit 100 ;
Drop view v1 ;

Testcase 3.3.1.A0 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
DROP VIEW  IF EXISTS V1 ;
CREATE TABLE t1 (f1 NUMERIC(4)) ENGINE = memory;
INSERT INTO t1 VALUES(1111), (2222);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 = 1111;
CREATE VIEW V1 AS SELECT * FROM t1 WHERE f1 = 2222;
SELECT * FROM v1;
f1
1111
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
DROP VIEW  IF EXISTS V1 ;

Testcase 3.3.1.8 
--------------------------------------------------------------------------------
Create view select AS Select * from test.tb2 limit 100;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select AS Select * from test.tb2 limit 100' at line 1
Create view as AS Select * from test.tb2 limit 100;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as AS Select * from test.tb2 limit 100' at line 1
Create view where AS Select * from test.tb2 limit 100;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where AS Select * from test.tb2 limit 100' at line 1
Create view from AS Select * from test.tb2 limit 100;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from AS Select * from test.tb2 limit 100' at line 1
Create view while AS Select * from test.tb2 limit 100;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'while AS Select * from test.tb2 limit 100' at line 1
Create view asdkj*(&*&&^ as Select * from test.tb2 limit 100 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*(&*&&^ as Select * from test.tb2 limit 100' at line 1
Drop view if exists test.procedure ;
Create view test.procedure as Select * from test.tb2 limit 100 ;
Drop view if exists test.procedure ;

Testcase 3.3.1.9 
--------------------------------------------------------------------------------
Drop TABLE IF EXISTS t1 ;
Drop VIEW  IF EXISTS v1;
Drop VIEW  IF EXISTS v2;
Drop VIEW  IF EXISTS v3;
CREATE TABLE t1 ( f1 char(5));
INSERT INTO t1 SET f1 = 'abcde';
CREATE VIEW v1 AS SELECT f1 FROM t1;
CREATE VIEW v2 AS SELECT *  FROM v1;
DROP TABLE t1;
SELECT * FROM v1;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DELETE FROM v1;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
UPDATE v1 SET f1 = 'aaaaa';
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO v1 SET f1 = "fffff";
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SELECT * FROM v2;
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DELETE FROM v2;
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
UPDATE v2 SET f1 = 'aaaaa';
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO v2 SET f1 = "fffff";
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DROP VIEW v1;
SELECT * FROM v2;
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DELETE FROM v2;
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
UPDATE v2 SET f1 = 'aaaaa';
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO v2 SET f1 = "fffff";
ERROR HY000: View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DROP VIEW v2;
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
CREATE TABLE t1 (f1 FLOAT);
CREATE VIEW v1 AS SELECT * FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
CREATE VIEW  v1 AS SELECT * FROM t1;
CREATE or REPLACE VIEW  v1 AS SELECT * FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
DROP VIEW  v1;
DROP TABLE t1;

Testcase 3.3.1.10 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
Create view test.v1 AS Select * from test.tb2 ;
Create view test.v1 AS Select F59 from test.tb2 ;
ERROR 42S01: Table 'v1' already exists
Create view      v1 AS Select F59 from test.tb2 ;
ERROR 42S01: Table 'v1' already exists

Testcase 3.3.1.11 
--------------------------------------------------------------------------------
Create view test.tb2 AS Select f59,f60 from test.tb2 limit 100 ;
ERROR 42S01: Table 'tb2' already exists
Create view      tb2 AS Select f59,f60 from test.tb2 limit 100 ;
ERROR 42S01: Table 'tb2' already exists
Drop view if exists test.v111 ;
Create view test.v111 as select * from tb2 limit 50;
Create table test.v111(f1 int );
ERROR 42S01: Table 'v111' already exists
Create table      v111(f1 int );
ERROR 42S01: Table 'v111' already exists
DROP VIEW test.v111;

Testcase 3.3.1.12 
--------------------------------------------------------------------------------
USE test;
Drop database if exists test2 ;
Create database test2 ;
DROP TABLE IF EXISTS test.t0, test.t1, test.t2;
DROP VIEW  IF EXISTS test.v1;
DROP VIEW  IF EXISTS test.v2;
CREATE TABLE  test.t1 ( f1 VARCHAR(20));
CREATE TABLE test2.t1 ( f1 VARCHAR(20));
CREATE TABLE  test.t2 ( f1 VARCHAR(20));
CREATE TABLE test2.v1 ( f1 VARCHAR(20));
CREATE TABLE  test.t0 ( f1 VARCHAR(20));
CREATE TABLE test2.t0 ( f1 VARCHAR(20));
CREATE VIEW  test2.t2 AS SELECT * FROM test2.t0;
CREATE VIEW   test.v1 AS SELECT * FROM  test.t0;
CREATE VIEW   test.v2 AS SELECT * FROM  test.t0;
CREATE VIEW  test2.v2 AS SELECT * FROM test2.t0;
INSERT INTO  test.t1 VALUES('test.t1  - 1');
INSERT INTO test2.t1 VALUES('test2.t1 - 1');
INSERT INTO  test.t2 VALUES('test.t2  - 1');
INSERT INTO test2.v1 VALUES('test2.v1 - 1');
INSERT INTO  test.t0 VALUES('test.t0  - 1');
INSERT INTO test2.t0 VALUES('test2.t0 - 1');
USE test;
INSERT INTO  t1 VALUES('test.t1  - 2');
INSERT INTO  t2 VALUES('test.t2  - 2');
INSERT INTO  t0 VALUES('test.t0  - 2');
USE test2;
INSERT INTO  t1 VALUES('test2.t1 - 2');
INSERT INTO  v1 VALUES('test2.v1 - 2');
INSERT INTO  t0 VALUES('test2.t0 - 2');
SELECT * FROM t1;
f1
test2.t1 - 1
test2.t1 - 2
SELECT * FROM t2;
f1
test2.t0 - 1
test2.t0 - 2
SELECT * FROM v1;
f1
test2.v1 - 1
test2.v1 - 2
SELECT * FROM v2;
f1
test2.t0 - 1
test2.t0 - 2
USE test;
SELECT * FROM t1;
f1
test.t1  - 1
test.t1  - 2
SELECT * FROM t2;
f1
test.t2  - 1
test.t2  - 2
SELECT * FROM v1;
f1
test.t0  - 1
test.t0  - 2
SELECT * FROM v2;
f1
test.t0  - 1
test.t0  - 2

Testcase 3.3.1.13 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS v1;
CREATE TABLE t1 (f1 BIGINT);
INSERT INTO t1 VALUES(1);
CREATE VIEW test.v1 AS SELECT * FROM t1 limit 2;
SHOW CREATE VIEW test.v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2	latin1	latin1_swedish_ci
SELECT * FROM test.v1;
f1
1
CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1
AS SELECT * FROM t1 limit 2;
SHOW CREATE VIEW test.v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` limit 2	latin1	latin1_swedish_ci
SELECT * FROM test.v1;
f1
1
CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2;
SHOW CREATE VIEW test.v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `f59`,`tb2`.`f60` AS `f60`,`tb2`.`f61` AS `f61`,`tb2`.`f62` AS `f62`,`tb2`.`f63` AS `f63`,`tb2`.`f64` AS `f64`,`tb2`.`f65` AS `f65`,`tb2`.`f66` AS `f66`,`tb2`.`f67` AS `f67`,`tb2`.`f68` AS `f68`,`tb2`.`f69` AS `f69`,`tb2`.`f70` AS `f70`,`tb2`.`f71` AS `f71`,`tb2`.`f72` AS `f72`,`tb2`.`f73` AS `f73`,`tb2`.`f74` AS `f74`,`tb2`.`f75` AS `f75`,`tb2`.`f76` AS `f76`,`tb2`.`f77` AS `f77`,`tb2`.`f78` AS `f78`,`tb2`.`f79` AS `f79`,`tb2`.`f80` AS `f80`,`tb2`.`f81` AS `f81`,`tb2`.`f82` AS `f82`,`tb2`.`f83` AS `f83`,`tb2`.`f84` AS `f84`,`tb2`.`f85` AS `f85`,`tb2`.`f86` AS `f86`,`tb2`.`f87` AS `f87`,`tb2`.`f88` AS `f88`,`tb2`.`f89` AS `f89`,`tb2`.`f90` AS `f90`,`tb2`.`f91` AS `f91`,`tb2`.`f92` AS `f92`,`tb2`.`f93` AS `f93`,`tb2`.`f94` AS `f94`,`tb2`.`f95` AS `f95`,`tb2`.`f96` AS `f96`,`tb2`.`f97` AS `f97`,`tb2`.`f98` AS `f98`,`tb2`.`f99` AS `f99`,`tb2`.`f100` AS `f100`,`tb2`.`f101` AS `f101`,`tb2`.`f102` AS `f102`,`tb2`.`f103` AS `f103`,`tb2`.`f104` AS `f104`,`tb2`.`f105` AS `f105`,`tb2`.`f106` AS `f106`,`tb2`.`f107` AS `f107`,`tb2`.`f108` AS `f108`,`tb2`.`f109` AS `f109` from `tb2` order by `tb2`.`f59` limit 2	latin1	latin1_swedish_ci
SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2 limit 10,100;
SHOW CREATE VIEW test.v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `tb2`.`f59` AS `F59` from `tb2` limit 10,100	latin1	latin1_swedish_ci
SELECT * FROM test.v1 order by F59;
F59
4
15
17
19
22
24
27
29
34
94
107
107
109
109
195
207
209
242
250
292
299
321
323
340
394
424
441
500
500
500
660
987
2550
2760
3330
3410
7876
9112
76710
569300
Drop table test.t1 ;
Drop view  test.v1 ;

Testcase 3.3.1.14 
--------------------------------------------------------------------------------
CREATE OR REPLACE VIEW test.tb2 AS SELECT * From tb2 LIMIT 2;
ERROR HY000: 'test.tb2' is not VIEW
CREATE OR REPLACE VIEW tb2 AS SELECT * From tb2 LIMIT 2;
ERROR HY000: 'test.tb2' is not VIEW

Testcase 3.3.1.15 
--------------------------------------------------------------------------------
Drop table if exists test.v1 ;
CREATE OR REPLACE view test.v1 as select * from tb2 LIMIT 2;
SELECT * FROM test.v1;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
Drop view test.v1 ;

Testcase 3.3.1.16 + 3.3.1.17 
--------------------------------------------------------------------------------
Drop table if exists test.v1 ;
CREATE OR REPLACE VIEW v1 AS SELECT * From tb2;
SELECT * FROM tb2 WHERE 1 = 2;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
SELECT * FROM v1  WHERE 1 = 2;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
Drop view v1;
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS v1;
CREATE TABLE t1 (f1 NUMERIC(15,3));
INSERT INTO t1 VALUES(8.8);
CREATE VIEW v1 AS SELECT * FROM t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`	latin1	latin1_swedish_ci
SELECT * FROM v1;
f1
8.800
CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1`	latin1	latin1_swedish_ci
SELECT * FROM v1;
f1
8.800
CREATE OR REPLACE VIEW v1 AS SELECT f1 As my_column FROM t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `my_column` from `t1`	latin1	latin1_swedish_ci
SELECT * FROM v1;
my_column
8.800
CREATE OR REPLACE VIEW v1(column1,column2)
AS SELECT f1 As my_column, f1 FROM t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1`	latin1	latin1_swedish_ci
SELECT * FROM v1;
column1	column2
8.800	8.800
CREATE OR REPLACE VIEW test.v1(column1,column2)
AS SELECT f1 As my_column, f1 FROM test.t1;
SHOW CREATE VIEW v1;
View	Create View	character_set_client	collation_connection
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `column1`,`t1`.`f1` AS `column2` from `t1`	latin1	latin1_swedish_ci
SELECT * FROM v1;
column1	column2
8.800	8.800

Testcase 3.3.1.18 
--------------------------------------------------------------------------------
Drop view if exists v1 ;
Drop view if exists v1_1 ;
Create view v1
as Select test.tb2.f59 as NewNameF1, test.tb2.f60
from test.tb2 limit 0,100 ;
Create view v1_1
as Select test.tb2.f59 as NewNameF1, test.tb2.f60 as NewNameF2
from tb2 limit 0,100 ;
SELECT NewNameF1,f60             FROM test.v1_1 ;
ERROR 42S22: Unknown column 'f60' in 'field list'
SELECT NewNameF1, v1_1.f60 FROM test.v1_1 ;
ERROR 42S22: Unknown column 'v1_1.f60' in 'field list'
SELECT f59, f60 FROM test.v1 ;
ERROR 42S22: Unknown column 'f59' in 'field list'
Use test ;
SELECT F59 FROM v1 ;
ERROR 42S22: Unknown column 'F59' in 'field list'

Testcase 3.3.1.19 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1, t2;
DROP VIEW  IF EXISTS v1;
CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
INSERT INTO t1 VALUES(7, 7.7);
CREATE TABLE t2( f1 BIGINT, f2 DECIMAL(5,2));
INSERT INTO t2 VALUES(6, 6.6);
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
f1	f2
7	7.70
CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1;
SELECT * FROM v1;
f1	f2
7	7.70
CREATE OR REPLACE VIEW v1 AS SELECT f1 AS my_f1, f2 AS my_f2 FROM t1;
SELECT * FROM v1;
my_f1	my_f2
7	7.70
CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
SELECT * FROM v1;
my_f1	my_f2
7	7.70
CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT t1.f1, t2.f2 FROM t1, t2;
SELECT * FROM v1;
my_f1	my_f2
7	6.60
SELECT f1, f2 AS f1 FROM t1;
f1	f1
7	7.70
CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 AS f1 FROM t1;
ERROR 42S21: Duplicate column name 'f1'
SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
f1	f1
7	6
CREATE OR REPLACE VIEW v1 AS SELECT t1.f1, t2.f1 AS f1 FROM t1, t2;
ERROR 42S21: Duplicate column name 'f1'
CREATE OR REPLACE VIEW v1 (my_col, my_col) AS SELECT * FROM t1;
ERROR 42S21: Duplicate column name 'my_col'

Testcase 3.3.1.20 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
CREATE TABLE t1( f1 BIGINT, f2 DECIMAL(5,2));
CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT *      FROM t1;
CREATE OR REPLACE VIEW v1 (my_f1, my_f2) AS SELECT f1, f2 FROM t1;
CREATE OR REPLACE VIEW v1 (my_f1       ) AS SELECT *      FROM t1;
ERROR HY000: View's SELECT and view's field list have different column counts
CREATE OR REPLACE VIEW v1 (my_f1       ) AS SELECT f1, f2 FROM t1;
ERROR HY000: View's SELECT and view's field list have different column counts
CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT *      FROM t1;
ERROR HY000: View's SELECT and view's field list have different column counts
CREATE OR REPLACE VIEW v1 (my_f1, my_f2, my_f3) AS SELECT f1, f2 FROM t1;
ERROR HY000: View's SELECT and view's field list have different column counts

Testcase 3.3.1.21 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1;
CREATE VIEW test.v1( F59, F60 ) AS SELECT F59, F60 From tb2 LIMIT 2;
SELECT * FROM test.v1 order by F59, F60 desc;
F59	F60
1	1
2	2
Drop view if exists test.v1 ;

Testcase 3.3.1.22 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1;
CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 LIMIT 2;
SELECT * FROM test.v1;
product
1
4
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2;
SELECT * FROM test.v1;
product
2
CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER();
SELECT * FROM test.v1;
product
root@localhost
Drop view if exists test.v1 ;

Testcase 3.3.1.23 + 3.3.1.24 
--------------------------------------------------------------------------------
USE test;
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS v1;
DROP VIEW  IF EXISTS v2;
CREATE VIEW test.v2 AS SELECT * FROM test.t1;
ERROR 42S02: Table 'test.t1' doesn't exist
CREATE VIEW      v2 AS Select * from test.v1;
ERROR 42S02: Table 'test.v1' doesn't exist
DROP VIEW IF EXISTS v2;
Warnings:
Note	1051	Unknown table 'test.v2'

Testcase 3.3.1.25 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1_temp;
DROP TABLE IF EXISTS t2_temp;
DROP VIEW  IF EXISTS v1;
Create table t1_temp(f59 char(10),f60 int) ;
Create temporary table t1_temp(f59 char(10),f60 int) ;
Insert into t1_temp values('FER',90);
Insert into t1_temp values('CAR',27);
Create view v1 as select * from t1_temp ;
ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
Create temporary table t2_temp(f59 char(10),f60 int) ;
Insert into t2_temp values('AAA',11);
Insert into t2_temp values('BBB',22);
Create or replace view v1
as select t1_temp.f59,t2_temp.f59 from t1_temp,t2_temp ;
ERROR HY000: View's SELECT refers to a temporary table 't1_temp'
DROP temporary table t1_temp;
DROP table t1_temp;
DROP temporary table t2_temp;
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS v1;
CREATE           TABLE t1 (f1 char(10));
CREATE TEMPORARY TABLE t2 (f2 char(10));
INSERT INTO t1 VALUES('t1');
INSERT INTO t1 VALUES('A');
INSERT INTO t2 VALUES('t2');
INSERT INTO t2 VALUES('B');
CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT *      FROM t2, t1;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT f2, f1 FROM t2, t1;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT *      FROM t1, t2;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT f1, f2 FROM t1, t2;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT *  FROM t2 UNION SELECT *  FROM t1;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t2 UNION SELECT f1 FROM t1;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT *  FROM t1 UNION SELECT *  FROM t2;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT f1 FROM t1 UNION SELECT f2 FROM t2;
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE f2 = ( SELECT f1 FROM t1 );
ERROR HY000: View's SELECT refers to a temporary table 't2'
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t1
WHERE f1 = ( SELECT f2 FROM t2 );
ERROR HY000: View's SELECT refers to a temporary table 't2'
DROP TABLE t1;
DROP TEMPORARY TABLE t2;

Testcase 3.3.1.26 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS v1;
Create view test.v1 AS Select * from test.tb2 limit 2 ;
Select * from test.v1;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
Drop view test.v1 ;

Testcase 3.3.1.27 
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS test.v1;
Drop VIEW  IF EXISTS test.v1_1 ;
Create view test.v1 AS Select * from test.tb2 limit 2 ;
Create view test.v1_1 AS Select F59 from test.v1 ;
Select * from test.v1_1 order by F59 limit 20 ;
F59
1
2
Drop view test.v1 ;
Drop view test.v1_1 ;

Testcase 3.3.1.28 
--------------------------------------------------------------------------------
Drop database if exists test2 ;
create database test2 ;
Create view test2.v2 AS Select * from test.tb2 limit 50,50;
use test2 ;
Create view v1 AS Select * from test.tb2 limit 50 ;
Select * from v1 order by f59,f60,f61,f62,f63,f64,f65;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
3	3	0000000003	0000000000000000000000000000000000000000000000000000000000000003	0000000003	0000000000000000000000000000000000000000000000000000000000000003	-3	2.200000000000000000000000000000	3	2.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494348e-38	1.17549e-38	1.175494354e-38	01.17549e-38	00000001.175494354e-38	01.17549e-38	00000001.175494354e-38	1000-01-03	838:59:56	1970-01-04 00:00:03	1970-01-04 00:00:03	1904	1904	1904	2enum	1set
4	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
4	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
5	5	0000000005	0000000000000000000000000000000000000000000000000000000000000005	0000000005	0000000000000000000000000000000000000000000000000000000000000005	-1	4.400000000000000000000000000000	5	4.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494346e-38	1.17549e-38	1.175494356e-38	01.17549e-38	00000001.175494356e-38	01.17549e-38	00000001.175494356e-38	1000-01-05	838:59:54	1970-01-06 00:00:05	1970-01-06 00:00:05	1906	1906	1906	2enum	1set,2set
6	6	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0	5.500000000000000000000000000000	6	5.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494345e-38	1.17549e-38	1.175494357e-38	01.17549e-38	00000001.175494357e-38	01.17549e-38	00000001.175494357e-38	1000-01-06	838:59:53	1970-01-07 00:00:06	1970-01-07 00:00:06	1907	1907	1907	1enum	1set
7	7	0000000007	0000000000000000000000000000000000000000000000000000000000000007	0000000007	0000000000000000000000000000000000000000000000000000000000000007	1	6.600000000000000000000000000000	7	6.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494344e-38	1.17549e-38	1.175494358e-38	01.17549e-38	00000001.175494358e-38	01.17549e-38	00000001.175494358e-38	1000-01-07	838:59:52	1970-01-08 00:00:07	1970-01-08 00:00:07	1908	1908	1908	2enum	2set
8	8	0000000008	0000000000000000000000000000000000000000000000000000000000000008	0000000008	0000000000000000000000000000000000000000000000000000000000000008	2	7.700000000000000000000000000000	8	7.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494343e-38	1.17549e-38	1.175494359e-38	01.17549e-38	00000001.175494359e-38	01.17549e-38	00000001.175494359e-38	1000-01-08	838:59:51	1970-01-09 00:00:08	1970-01-09 00:00:08	1909	1909	1909	1enum	1set,2set
9	9	0000000009	0000000000000000000000000000000000000000000000000000000000000009	0000000009	0000000000000000000000000000000000000000000000000000000000000009	3	8.800000000000000000000000000000	9	8.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494342e-38	1.17549e-38	1.17549436e-38	01.17549e-38	000000001.17549436e-38	01.17549e-38	000000001.17549436e-38	1000-01-09	838:59:50	1970-01-10 00:00:09	1970-01-10 00:00:09	1910	1910	1910	2enum	1set
10	10	0000000010	0000000000000000000000000000000000000000000000000000000000000010	0000000010	0000000000000000000000000000000000000000000000000000000000000010	4	9.900000000000000000000000000000	10	9.900000000000000000000000000000	0000000010	000000000000000000000000000000009.900000000000000000000000000000	0000000010	000000000000000000000000000000009.900000000000000000000000000000	-1.175494341e-38	1.175494361e-38	00000001.175494361e-38	00000001.175494361e-38	-1.175494341e-38	1.175494361e-38	00000001.175494361e-38	00000001.175494361e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494341e-38	1.17549e-38	1.175494361e-38	01.17549e-38	00000001.175494361e-38	01.17549e-38	00000001.175494361e-38	1000-01-10	838:59:49	1970-01-11 00:00:10	1970-01-11 00:00:10	1911	1911	1911	1enum	2set
15	87	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
17	15	0000000016	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
19	18	0000000014	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
22	93	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
24	51654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
27	25	0000000026	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
29	28	0000000024	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
34	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
94	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
107	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
107	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
109	108	0000000104	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
109	108	0000000104	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
195	87	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
207	205	0000000206	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
209	208	0000000204	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
242	79	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
250	87895654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
292	93	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
299	899	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
321	NULL	0000000765	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
323	14376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
340	9984376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
394	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
424	89	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
441	16546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
500	NULL	0000000900	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
500	NULL	0000000900	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
500	NULL	0000000900	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
660	876546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
987	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
2550	775654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
2760	985654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
3330	764376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
3410	996546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
7876	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
9112	NULL	0000008771	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
76710	226546	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
569300	9114376	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
Select * from test2.v2 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
Drop view if exists test2.v1 ;
Drop view if exists test2.v2 ;
Drop database test2 ;

Testcase 3.3.1.29 
--------------------------------------------------------------------------------
Drop database if exists test2 ;
Drop view if exists test.v1 ;
create database test2 ;
use test2;
Create view test.v1 AS Select * from test.tb2 limit 50 ;
Create view test2.v2 AS Select F59 from test.v1 ;
Drop view if exists test.v1 ;
Drop view if exists test2.v2 ;

Testcase 3.3.1.31 
--------------------------------------------------------------------------------
Drop table if exists test.t1 ;
CREATE TABLE test.t1 ( f59 int, f60 int );
INSERT INTO test.t1 VALUES( 34, 654 );
INSERT INTO test.t1 VALUES( 906, 434 );
INSERT INTO test.t1 VALUES( 445, 765 );
Create or replace view test.v1
AS SELECT test.t1.F59, test.tb2.F60
FROM test.tb2 JOIN test.t1 ON test.tb2.F59 = test.t1.F59     ;
Select * from test.v1;
F59	F60
34	41
Drop view test.v1 ;

Testcase 3.3.1.32 
--------------------------------------------------------------------------------
Drop table    if exists test.t1 ;
Drop database if exists test2 ;
Drop view     if exists test.v1 ;
create database test2 ;
use test2 ;
CREATE TABLE t1 ( f59 int, f60 int );
INSERT INTO t1 VALUES( 34, 654 );
INSERT INTO t1 VALUES( 906, 434 );
INSERT INTO t1 VALUES( 445, 765 );
CREATE VIEW test2.v1
AS SELECT test.tb2.F59, test.tb2.F60
FROM test.tb2 INNER JOIN test2.t1 ON tb2.f59 = t1.f59;
Select * from test2.v1;
F59	F60
34	41
Use test;

Testcase 3.3.1.33 
--------------------------------------------------------------------------------
Drop view if exists test.v1_firstview  ;
Drop view if exists test.v1_secondview ;
Drop view if exists test.v1 ;
CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2;
CREATE VIEW test.v1
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
FROM test.v1_firstview INNER JOIN test.v1_secondview
ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
SELECT * FROM test.v1 order by f59,f60 limit 0,10;
f59	f60
1	1
2	2
3	3
4	4
4	4
4	74
4	74
5	5
6	6
7	7
Drop view if exists test.v1_firstview  ;
Drop view if exists test.v1_secondview ;
Drop view if exists test.v1 ;

Testcase 3.3.1.34 
--------------------------------------------------------------------------------
Drop database if exists test2 ;
Drop view if exists test.v1_firstview  ;
Drop view if exists test.v1_secondview ;
create database test2 ;
use test2 ;
CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2 ;
CREATE VIEW test.v1_secondview AS SELECT * FROM test.tb2 ;
CREATE VIEW v1
AS SELECT test.v1_firstview.F59, test.v1_firstview.F60
FROM test.v1_firstview INNER JOIN test.v1_secondview
ON test.v1_firstview.f59 = test.v1_secondview.f59 ;
SELECT * FROM v1 order by f59,f60 limit 0,10;
F59	F60
1	1
2	2
3	3
4	4
4	4
4	74
4	74
5	5
6	6
7	7
Drop view v1 ;
Drop view test.v1_firstview ;
Drop view test.v1_secondview ;

Testcase 3.3.1.35 
--------------------------------------------------------------------------------
use test;
Drop view if exists test.v1;
Drop view if exists test.v1_firstview;
CREATE VIEW test.v1_firstview AS SELECT * FROM test.tb2;
CREATE VIEW test.v1
AS SELECT test.v1_firstview.f59, test.v1_firstview.f60
FROM test.v1_firstview INNER JOIN test.tb2
ON test.v1_firstview.f59 = test.tb2.f59;
SELECT * FROM test.v1 order by f59,f60 limit 0,10;
f59	f60
1	1
2	2
3	3
4	4
4	4
4	74
4	74
5	5
6	6
7	7
Drop view test.v1 ;
Drop view test.v1_firstview;

Testcase 3.3.1.36 
--------------------------------------------------------------------------------
Drop database if exists test2 ;
create database test2 ;
use test2 ;
CREATE VIEW v1_firstview AS SELECT * FROM test.tb2 ;
CREATE VIEW v1
AS SELECT v1_firstview.f59, v1_firstview.f60
FROM v1_firstview INNER JOIN test.tb2 ON v1_firstview.f59 = test.tb2.f59 ;
SELECT * FROM v1 order by f59,f60 limit 0,10;
f59	f60
1	1
2	2
3	3
4	4
4	4
4	74
4	74
5	5
6	6
7	7
Drop database test2 ;

Testcase 3.3.1.37 
--------------------------------------------------------------------------------
use test;
Drop table if exists t1;
Drop view  if exists test.v1 ;
Drop view  if exists test.v1_1 ;
Drop view  if exists test.v1_1 ;
Drop view  if exists test.v1_main ;
Create view test.v1 as Select f59, f60 FROM test.tb2;
Select * from test.v1 order by f59,f60 limit 0,10;
f59	f60
1	1
2	2
3	3
4	4
4	74
5	5
6	6
7	7
8	8
9	9
Create table t1(f59 int, f60 int);
Insert into t1 values (90,507) ;
Create view v1_1 as Select f59,f60 from t1 ;
Select * from v1_1 ;
f59	f60
90	507
Create view v1_main
as SELECT test.tb2.f59 FROM test.tb2 JOIN test.v1
ON test.tb2.f59 = test.v1.f59;
Select * from v1_main order by f59 limit 0,10;
f59
1
2
3
4
4
4
4
5
6
7
Drop table t1;
Drop view  test.v1 ;
Drop view  test.v1_1 ;
Drop view  test.v1_main ;

Testcase 3.3.1.31 - 3.3.1.37 New Implementation 
--------------------------------------------------------------------------------
USE test;
DROP DATABASE IF EXISTS test2;
DROP TABLE IF EXISTS t0,t1;
DROP VIEW  IF EXISTS t3,t4;
CREATE DATABASE test2;
CREATE TABLE test1.t0 (f1 VARCHAR(20));
CREATE TABLE test1.t1 (f1 VARCHAR(20));
CREATE TABLE test2.t0 (f1 VARCHAR(20));
CREATE TABLE test2.t1 (f1 VARCHAR(20));
CREATE VIEW  test1.t2 AS SELECT * FROM test1.t0;
CREATE VIEW  test1.t3 AS SELECT * FROM test2.t0;
CREATE VIEW  test2.t2 AS SELECT * FROM test2.t0;
CREATE VIEW  test2.t3 AS SELECT * FROM test1.t0;
INSERT INTO  test1.t0 VALUES('test1.t0');
INSERT INTO  test1.t1 VALUES('test1.t1');
INSERT INTO  test2.t0 VALUES('test2.t0');
INSERT INTO  test2.t1 VALUES('test2.t1');
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t3 ta, test2.t3 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t3 ta, test1.t3 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t3 ta, test2.t3 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t3 ta, test1.t3 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t3 ta, test2.t2 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t3 ta, test1.t2 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t3 ta, test2.t2 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t3 ta, test1.t2 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t3 ta, test2.t1 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test2.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t3 ta, test1.t1 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test1.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t3 ta, test2.t1 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test2.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t3 ta, test1.t1 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test1.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t2 ta, test2.t3 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t2 ta, test1.t3 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t2 ta, test2.t3 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t2 ta, test1.t3 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t2 ta, test2.t2 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t2 ta, test1.t2 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t2 ta, test2.t2 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t2 ta, test1.t2 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t2 ta, test2.t1 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test2.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t2 ta, test1.t1 tb;
SELECT * FROM test.v1;
col1	col2
test2.t0	test1.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t2 ta, test2.t1 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test2.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t2 ta, test1.t1 tb;
SELECT * FROM test.v1;
col1	col2
test1.t0	test1.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t1 ta, test2.t3 tb;
SELECT * FROM test.v1;
col1	col2
test2.t1	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t1 ta, test1.t3 tb;
SELECT * FROM test.v1;
col1	col2
test2.t1	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t1 ta, test2.t3 tb;
SELECT * FROM test.v1;
col1	col2
test1.t1	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t1 ta, test1.t3 tb;
SELECT * FROM test.v1;
col1	col2
test1.t1	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t1 ta, test2.t2 tb;
SELECT * FROM test.v1;
col1	col2
test2.t1	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t1 ta, test1.t2 tb;
SELECT * FROM test.v1;
col1	col2
test2.t1	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t1 ta, test2.t2 tb;
SELECT * FROM test.v1;
col1	col2
test1.t1	test2.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t1 ta, test1.t2 tb;
SELECT * FROM test.v1;
col1	col2
test1.t1	test1.t0
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t1 ta, test2.t1 tb;
SELECT * FROM test.v1;
col1	col2
test2.t1	test2.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test2.t1 ta, test1.t1 tb;
SELECT * FROM test.v1;
col1	col2
test2.t1	test1.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t1 ta, test2.t1 tb;
SELECT * FROM test.v1;
col1	col2
test1.t1	test2.t1
CREATE OR REPLACE VIEW test.v1 AS
SELECT ta.f1 AS col1,
tb.f1 AS col2
FROM test1.t1 ta, test1.t1 tb;
SELECT * FROM test.v1;
col1	col2
test1.t1	test1.t1

Testcase 3.3.1.38 
--------------------------------------------------------------------------------
Drop table if exists test1.t1 ;
Drop view  if exists test.v1 ;
Drop view  if exists test.v1_main;
Drop view  if exists test1.v1_1 ;
Drop database if exists test3 ;
Create view test.v1 as Select f59, f60 FROM test.tb2 limit 20 ;
Select * from test.v1 order by f59,f60;
f59	f60
1	1
2	2
3	3
4	4
5	5
6	6
7	7
8	8
9	9
10	10
250	87895654
340	9984376
441	16546
660	876546
2550	775654
2760	985654
3330	764376
3410	996546
76710	226546
569300	9114376
Create table test1.t1 (f59 int,f60 int)  ;
Insert into test1.t1 values (199,507) ;
Create view test1.v1_1 as Select f59,f60 from test1.t1 ;
Select * from test1.v1_1 ;
f59	f60
199	507
Create database test3 ;
Create table test3.t1(f59 int,f60 int) ;
Insert into test3.t1 values (1023,7670) ;
Create view test3.v1_2 as Select f59,f60 from test3.t1 ;
Select * from test3.v1_2 ;
f59	f60
1023	7670
use test ;
Create view v1_main
as SELECT test.tb2.f59 as f1, test1.v1_1.f59 as f2,
test3.v1_2.f59 as f3
FROM (test.tb2,test1.v1_1,test.v1) JOIN test3.v1_2
ON (test.v1.f59 = test1.v1_1.f59) ;
Select * from v1_main ;
f1	f2	f3
DROP VIEW test.v1 ;
DROP VIEW test1.v1_1 ;
DROP VIEW test.v1_main ;
DROP DATABASE test3;

Testcase 3.3.1.39 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
CREATE VIEW test.v1
AS Select f59 from (Select * FROM tb2 limit 20) tx ;
ERROR HY000: View's SELECT contains a subquery in the FROM clause
SELECT * FROM test.v1 order by f59 ;
ERROR 42S02: Table 'test.v1' doesn't exist
Drop view if exists test.v1 ;

Testcase 3.3.1.40 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
Set @var1 = 'ABC' ;
Set @var2 = 'XYZ' ;
CREATE VIEW test.v1 AS SELECT @var1, @var2 ;
ERROR HY000: View's SELECT contains a variable or parameter
CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size;
ERROR HY000: View's SELECT contains a variable or parameter
Drop view if exists test.v1 ;

Testcase 3.3.1.41 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
Drop procedure if exists sp1 ;
Create procedure sp1() DETERMINISTIC
Begin
DECLARE x char;
Set x = 200 ;
Create view test.v1  as SELECT * FROM tb2 WHERE f59 = x ;
End   //
ERROR HY000: View's SELECT contains a variable or parameter
Call sp1() ;
ERROR 42000: PROCEDURE test.sp1 does not exist
Drop view if exists test.v1 ;
Warnings:
Note	1051	Unknown table 'test.v1'
Drop procedure sp1 ;
ERROR 42000: PROCEDURE test.sp1 does not exist

Testcase 3.3.1.42 
--------------------------------------------------------------------------------
Drop VIEW if exists test.v1 ;
CREATE TEMPORARY VIEW test.v1 AS
SELECT * FROM test.tb2 limit 2 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW test.v1 AS
SELECT * FROM test.tb2 limit 2' at line 1
CREATE OR REPLACE TEMPORARY VIEW test.v1 AS
SELECT * FROM test.tb2 limit 2 ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEMPORARY VIEW test.v1 AS
SELECT * FROM test.tb2 limit 2' at line 1
Drop view if exists test.v1 ;
Use test;

Testcase 3.3.1.43 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2;
INSERT INTO test.v1 values(122,432);
SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
122	432	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ;
SELECT * FROM test.tb2  where f59 = 3000 limit 0,20;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
3000	432	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
DELETE FROM test.v1
where test.v1.f59 = 3000 and test.v1.f60 = 432;
SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
drop view test.v1 ;

Testcase 3.3.1.44 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 limit 100;
INSERT INTO test.v1 values(31, 32, 33) ;
ERROR HY000: The target table v1 of the INSERT is not insertable-into
Drop view test.v1 ;

Testcase 3.3.1.45 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04;
UPDATE test.v1 SET f59 = 30 where F59 = 04 ;
affected rows: 2
info: Rows matched: 2  Changed: 2  Warnings: 0
SELECT * FROM test.v1   where f59 = 30 order by f59;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
SELECT * FROM test.tb2        where f59 = 30 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
30	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
30	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
UPDATE tb2 SET f59 = 100 where f59 = 30 ;
affected rows: 2
info: Rows matched: 2  Changed: 2  Warnings: 0
SELECT * FROM tb2 where f59 = 100 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
100	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
100	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
SELECT * FROM test.v1 order by f59 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
drop view if exists test.v1 ;
Drop TABLE IF EXISTS test.t1 ;
Drop VIEW  IF EXISTS test.v1 ;
CREATE TABLE t1 (f1 BIGINT, f2 VARCHAR(20), PRIMARY KEY(f1))
ENGINE = memory;
INSERT INTO t1 VALUES(1,'one');
INSERT INTO t1 VALUES(2,'two');
INSERT INTO t1 VALUES(3,'three');
INSERT INTO t1 VALUES(5,'five');
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1 BETWEEN 2 AND 4;
SELECT COUNT(*) FROM v1 WHERE f1 = 2;
COUNT(*)
1
SELECT COUNT(*) FROM v1 WHERE f1 = 4;
COUNT(*)
0
SELECT COUNT(*) FROM v1 WHERE f1 = 5;
COUNT(*)
0
SELECT COUNT(*) FROM v1 WHERE f1 = 10;
COUNT(*)
0
INSERT INTO t1 VALUES(4,'four');
DELETE FROM v1 WHERE f1 = 3;
affected rows: 1
DELETE FROM v1 WHERE f1 = 5;
affected rows: 0
SELECT * FROM t1 ORDER BY f1;
f1	f2
1	one
2	two
4	four
5	five
SELECT * FROM v1 ORDER BY f1;
f1	f2
2	two
4	four
INSERT INTO v1 VALUES(2,'two');
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
INSERT INTO v1 VALUES(3,'three');
affected rows: 1
INSERT INTO v1 VALUES(6,'six');
affected rows: 1
SELECT * FROM t1 ORDER BY f1;
f1	f2
1	one
2	two
3	three
4	four
5	five
6	six
SELECT * FROM v1 ORDER BY f1;
f1	f2
2	two
3	three
4	four
UPDATE v1 SET f1 = 2 WHERE f1 = 3;
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
UPDATE v1 SET f2 = 'number' WHERE f1 = 3;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
UPDATE v1 SET f1 = 10 WHERE f1 = 3;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
UPDATE v1 SET f2 = 'number' WHERE f1 = 1;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0

Testcase 3.3.1.46 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60
FROM test.tb2 where f59 = 195 WITH CHECK OPTION ;
UPDATE test.v1 SET f59 = 198 where f59=195 ;
ERROR HY000: CHECK OPTION failed 'test.v1'
SELECT * FROM test.v1 order by f59 ;
f59	f60
195	87
drop view if exists test.v1 ;

Testcase 3.3.1.47 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
Drop view if exists test.v2 ;
CREATE VIEW test.v1 AS SELECT f59,f60
FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ;
CREATE VIEW test.v2 as SELECT * FROM test.v1 ;
UPDATE test.v1 SET F59 = 919 where f59 = 0987 ;
ERROR HY000: CHECK OPTION failed 'test.v1'
SELECT * FROM test.v1 order by f59 ;
f59	f60
987	41
UPDATE test.v2 SET F59 = 9879 where f59 = 919 ;
SELECT * FROM tb2 where f59 = 9879 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
drop view if exists v1 ;
drop view if exists v2 ;

Testcase 3.3.1.48 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS test.t1;
DROP VIEW  IF EXISTS test.v1;
CREATE TABLE t1 (f1 ENUM('A', 'B', 'C') NOT NULL, f2 INTEGER)
ENGINE = memory;
INSERT INTO t1 VALUES ('A', 1);
SELECT * FROM t1 order by f1, f2;
f1	f2
A	1
CREATE VIEW  v1 AS SELECT * FROM t1 WHERE f2 BETWEEN 1 AND 2
WITH CASCADED CHECK OPTION ;
SELECT * FROM v1 order by f1, f2;
f1	f2
A	1
UPDATE v1 SET f2 = 2 WHERE f2 = 1;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
INSERT INTO v1 VALUES('B',2);
affected rows: 1
SELECT * FROM v1 order by f1, f2;
f1	f2
A	2
B	2
UPDATE v1 SET f2 = 4;
ERROR HY000: CHECK OPTION failed 'test.v1'
INSERT INTO v1 VALUES('B',3);
ERROR HY000: CHECK OPTION failed 'test.v1'
SELECT * FROM v1 order by f1, f2;
f1	f2
A	2
B	2

Testcase 3.3.1.49 
--------------------------------------------------------------------------------
Drop table if exists test.t1 ;
Drop view  if exists test.v1 ;
Drop view  if exists test.v2 ;
Drop view  if exists test.v3 ;
Create table test.t1 (f59 INT, f60 INT) ;
Insert into test.t1  values (100,4234);
Insert into test.t1  values (290,6624);
Insert into test.t1  values (410,765);
Insert into test.t1  values (300,433334);
Insert into test.t1  values (800,9788);
Insert into test.t1  values (501,9866);
Create view test.v1 as select f59
FROM test.t1 where f59<500 with check option ;
Create view test.v2 as select *
from test.v1 where f59>0 with local check option ;
Create view test.v3 as select *
from test.v1 where f59>0 with cascaded check option ;
Insert into test.v2 values(23) ;
Insert into test.v3 values(24) ;
drop view if exists test.v1 ;
drop view if exists test.v2 ;
drop view if exists test.v3 ;

Testcase 3.3.1.49A 
--------------------------------------------------------------------------------
USE test;
DROP TABLE IF EXISTS test.t1 ;
DROP TABLE IF EXISTS test.t1_results ;
DROP VIEW  IF EXISTS test.v1;
DROP VIEW  IF EXISTS test.v2;
DROP VIEW  IF EXISTS test.v3;
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20));
CREATE TABLE t1_results (v3_to_v1_options VARCHAR(100), statement VARCHAR(10),
v3_to_v1_violation VARCHAR(20), errno CHAR(10));
CREATE VIEW v1 AS SELECT f1, f2
  FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH LOCAL    CHECK OPTION ;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL    CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH          CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16  ;
option_variant	WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2
  FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH CASCADED CHECK OPTION ;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL    CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH          CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16  ;
option_variant	WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2
  FROM t1 WHERE f1 BETWEEN 0 AND 10 WITH          CHECK OPTION ;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL    CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH          CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16  ;
option_variant	WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          -         <nothing>          - WITH          CHECK OPTION
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2
  FROM t1 WHERE f1 BETWEEN 0 AND 10  ;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH LOCAL    CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH CASCADED CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16 WITH          CHECK OPTION ;
option_variant	WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          - WITH          CHECK OPTION -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
CREATE VIEW v2 AS SELECT f1 AS col1, f2 AS col2
    FROM v1 WHERE f1 BETWEEN 6 AND 16  ;
option_variant	WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	WITH          CHECK OPTION -         <nothing>          -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
ERROR HY000: CHECK OPTION failed 'test.v3'
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(0, 'zero');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(7, 'seven');
ERROR HY000: CHECK OPTION failed 'test.v3'
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
8	eight
DELETE FROM t1;
DROP VIEW v3;
option_variant	        <nothing>          -         <nothing>          -         <nothing>         
option_variant	--------------------------------------------------------------------------------
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
SELECT * FROM v1;
f1	f2
0	zero
7	seven
8	eight
SELECT * FROM v2;
col1	col2
7	seven
8	eight
SELECT * FROM v3;
my_col1	my_col2
8	eight
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
DELETE FROM v3 WHERE my_col1 = 16;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 0;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 7;
affected rows: 0
DELETE FROM v3 WHERE my_col1 = 8;
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
DELETE FROM t1;
INSERT INTO t1 VALUES(16, 'sixteen');
INSERT INTO t1 VALUES(0, 'zero');
INSERT INTO t1 VALUES(7, 'seven');
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 16;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 0;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 7;
affected rows: 0
info: Rows matched: 0  Changed: 0  Warnings: 0
UPDATE v3 SET my_col2 = 'whatever' WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	whatever
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
7	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
0	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
16	eight
DELETE FROM t1;
INSERT INTO t1 VALUES(8, 'eight');
UPDATE v3 SET my_col1 = 10 WHERE my_col1 = 8;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM t1;
f1	f2
10	eight
DELETE FROM t1;
INSERT INTO v3 VALUES(16, 'sixteen');
affected rows: 1
INSERT INTO v3 VALUES(0, 'zero');
affected rows: 1
INSERT INTO v3 VALUES(7, 'seven');
affected rows: 1
INSERT INTO v3 VALUES(8, 'eight');
affected rows: 1
SELECT * FROM t1;
f1	f2
16	sixteen
0	zero
7	seven
8	eight
DELETE FROM t1;
DROP VIEW v3;
DROP VIEW v2;
DROP VIEW v1;
SELECT * FROM t1_results ORDER BY v3_to_v1_options;
v3_to_v1_options	statement	v3_to_v1_violation	errno
        <nothing>          -         <nothing>          -         <nothing>         	UPDATE	  _v2_  	0
        <nothing>          -         <nothing>          -         <nothing>         	INSERT	  _v2_  	0
        <nothing>          -         <nothing>          -         <nothing>         	INSERT	  _  _v1	0
        <nothing>          -         <nothing>          -         <nothing>         	UPDATE	  _  _  	0
        <nothing>          -         <nothing>          -         <nothing>         	UPDATE	  _  _v1	0
        <nothing>          -         <nothing>          -         <nothing>         	UPDATE	v3_  _  	0
        <nothing>          -         <nothing>          -         <nothing>         	INSERT	  _  _  	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _  	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	INSERT	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
        <nothing>          - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	v3_  _  	1369
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _  _  	0
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	1369
WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          -         <nothing>         	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION -         <nothing>          - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION -         <nothing>         	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH          CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH CASCADED CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _v2_  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _v1	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _  _  	0
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	UPDATE	v3_  _  	1369
WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION - WITH LOCAL    CHECK OPTION	INSERT	  _v2_  	0

Plausibility checks for INSERTs and UPDATEs ( 4. and 5. above).
All following SELECTs must give ROW NOT FOUND 
--------------------------------------------------------------------------------
SELECT * FROM t1_results
WHERE v3_to_v1_violation = '  _  _  ' AND errno <> 0
ORDER BY v3_to_v1_options;
v3_to_v1_options	statement	v3_to_v1_violation	errno
SELECT * FROM t1_results
WHERE v3_to_v1_options LIKE '  %' AND errno <> 0
ORDER BY v3_to_v1_options;
v3_to_v1_options	statement	v3_to_v1_violation	errno
SELECT * FROM t1_results
WHERE v3_to_v1_options LIKE 'WITH %' 
AND v3_to_v1_violation LIKE 'v3_%' AND errno = 0
ORDER BY v3_to_v1_options;
v3_to_v1_options	statement	v3_to_v1_violation	errno
SELECT * FROM t1_results
WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL %'
  AND v3_to_v1_violation NOT LIKE '  _  _  ' AND errno = 0
ORDER BY v3_to_v1_options;
v3_to_v1_options	statement	v3_to_v1_violation	errno
SELECT * FROM t1_results
WHERE errno <> 0 AND errno <> 1369
ORDER BY v3_to_v1_options;
v3_to_v1_options	statement	v3_to_v1_violation	errno

End of plausibility checks
--------------------------------------------------------------------------------
DROP TABLE t1_results;

Testcase 3.3.1.50 - 3.3.1.53
--------------------------------------------------------------------------------
DROP VIEW  IF EXISTS test.v1;
CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ;
SELECT * FROM test.v1 order by f59 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
3	3	0000000003	0000000000000000000000000000000000000000000000000000000000000003	0000000003	0000000000000000000000000000000000000000000000000000000000000003	-3	2.200000000000000000000000000000	3	2.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494348e-38	1.17549e-38	1.175494354e-38	01.17549e-38	00000001.175494354e-38	01.17549e-38	00000001.175494354e-38	1000-01-03	838:59:56	1970-01-04 00:00:03	1970-01-04 00:00:03	1904	1904	1904	2enum	1set
5	5	0000000005	0000000000000000000000000000000000000000000000000000000000000005	0000000005	0000000000000000000000000000000000000000000000000000000000000005	-1	4.400000000000000000000000000000	5	4.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494346e-38	1.17549e-38	1.175494356e-38	01.17549e-38	00000001.175494356e-38	01.17549e-38	00000001.175494356e-38	1000-01-05	838:59:54	1970-01-06 00:00:05	1970-01-06 00:00:05	1906	1906	1906	2enum	1set,2set
100	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
drop view test.v1 ;
CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ;
SELECT * FROM test.v1 order by F59, F61 ;
F59	F61
1	0000000001
2	0000000002
3	0000000003
5	0000000005
6	0000000006
7	0000000007
8	0000000008
9	0000000009
10	0000000010
15	NULL
17	0000000016
19	0000000014
22	NULL
24	NULL
27	0000000026
29	0000000024
34	NULL
94	NULL
100	NULL
100	0000000004
107	0000000106
107	0000000106
109	0000000104
109	0000000104
195	NULL
207	0000000206
209	0000000204
242	NULL
250	NULL
292	NULL
299	NULL
321	0000000765
323	NULL
340	NULL
394	NULL
424	NULL
441	NULL
500	0000000900
500	0000000900
500	0000000900
660	NULL
987	NULL
2550	NULL
2760	NULL
3330	NULL
3410	NULL
7876	NULL
9112	0000008771
76710	NULL
569300	NULL
drop view test.v1 ;
CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61 limit 20 ;
SELECT * FROM test.v1 order by f59,f60,f61 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
1	1	0000000001	0000000000000000000000000000000000000000000000000000000000000001	0000000001	0000000000000000000000000000000000000000000000000000000000000001	-5	0.000000000000000000000000000000	1	0.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	0000000001	000000000000000000000000000000000.000000000000000000000000000000	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549435e-38	1.175494352e-38	00000001.175494352e-38	00000001.175494352e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549435e-38	1.17549e-38	1.175494352e-38	01.17549e-38	00000001.175494352e-38	01.17549e-38	00000001.175494352e-38	1000-01-01	838:59:58	1970-01-02 00:00:01	1970-01-02 00:00:01	1902	1902	1902	2enum	2set
2	2	0000000002	0000000000000000000000000000000000000000000000000000000000000002	0000000002	0000000000000000000000000000000000000000000000000000000000000002	-4	1.100000000000000000000000000000	2	1.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	0000000002	000000000000000000000000000000001.100000000000000000000000000000	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.175494349e-38	1.175494353e-38	00000001.175494353e-38	00000001.175494353e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494349e-38	1.17549e-38	1.175494353e-38	01.17549e-38	00000001.175494353e-38	01.17549e-38	00000001.175494353e-38	1000-01-02	838:59:57	1970-01-03 00:00:02	1970-01-03 00:00:02	1903	1903	1903	1enum	1set,2set
3	3	0000000003	0000000000000000000000000000000000000000000000000000000000000003	0000000003	0000000000000000000000000000000000000000000000000000000000000003	-3	2.200000000000000000000000000000	3	2.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	0000000003	000000000000000000000000000000002.200000000000000000000000000000	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.175494348e-38	1.175494354e-38	00000001.175494354e-38	00000001.175494354e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494348e-38	1.17549e-38	1.175494354e-38	01.17549e-38	00000001.175494354e-38	01.17549e-38	00000001.175494354e-38	1000-01-03	838:59:56	1970-01-04 00:00:03	1970-01-04 00:00:03	1904	1904	1904	2enum	1set
5	5	0000000005	0000000000000000000000000000000000000000000000000000000000000005	0000000005	0000000000000000000000000000000000000000000000000000000000000005	-1	4.400000000000000000000000000000	5	4.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	0000000005	000000000000000000000000000000004.400000000000000000000000000000	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.175494346e-38	1.175494356e-38	00000001.175494356e-38	00000001.175494356e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494346e-38	1.17549e-38	1.175494356e-38	01.17549e-38	00000001.175494356e-38	01.17549e-38	00000001.175494356e-38	1000-01-05	838:59:54	1970-01-06 00:00:05	1970-01-06 00:00:05	1906	1906	1906	2enum	1set,2set
6	6	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0000000006	0000000000000000000000000000000000000000000000000000000000000006	0	5.500000000000000000000000000000	6	5.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	0000000006	000000000000000000000000000000005.500000000000000000000000000000	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.175494345e-38	1.175494357e-38	00000001.175494357e-38	00000001.175494357e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494345e-38	1.17549e-38	1.175494357e-38	01.17549e-38	00000001.175494357e-38	01.17549e-38	00000001.175494357e-38	1000-01-06	838:59:53	1970-01-07 00:00:06	1970-01-07 00:00:06	1907	1907	1907	1enum	1set
7	7	0000000007	0000000000000000000000000000000000000000000000000000000000000007	0000000007	0000000000000000000000000000000000000000000000000000000000000007	1	6.600000000000000000000000000000	7	6.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	0000000007	000000000000000000000000000000006.600000000000000000000000000000	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.175494344e-38	1.175494358e-38	00000001.175494358e-38	00000001.175494358e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494344e-38	1.17549e-38	1.175494358e-38	01.17549e-38	00000001.175494358e-38	01.17549e-38	00000001.175494358e-38	1000-01-07	838:59:52	1970-01-08 00:00:07	1970-01-08 00:00:07	1908	1908	1908	2enum	2set
8	8	0000000008	0000000000000000000000000000000000000000000000000000000000000008	0000000008	0000000000000000000000000000000000000000000000000000000000000008	2	7.700000000000000000000000000000	8	7.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	0000000008	000000000000000000000000000000007.700000000000000000000000000000	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.175494343e-38	1.175494359e-38	00000001.175494359e-38	00000001.175494359e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494343e-38	1.17549e-38	1.175494359e-38	01.17549e-38	00000001.175494359e-38	01.17549e-38	00000001.175494359e-38	1000-01-08	838:59:51	1970-01-09 00:00:08	1970-01-09 00:00:08	1909	1909	1909	1enum	1set,2set
9	9	0000000009	0000000000000000000000000000000000000000000000000000000000000009	0000000009	0000000000000000000000000000000000000000000000000000000000000009	3	8.800000000000000000000000000000	9	8.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	0000000009	000000000000000000000000000000008.800000000000000000000000000000	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.175494342e-38	1.17549436e-38	000000001.17549436e-38	000000001.17549436e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494342e-38	1.17549e-38	1.17549436e-38	01.17549e-38	000000001.17549436e-38	01.17549e-38	000000001.17549436e-38	1000-01-09	838:59:50	1970-01-10 00:00:09	1970-01-10 00:00:09	1910	1910	1910	2enum	1set
10	10	0000000010	0000000000000000000000000000000000000000000000000000000000000010	0000000010	0000000000000000000000000000000000000000000000000000000000000010	4	9.900000000000000000000000000000	10	9.900000000000000000000000000000	0000000010	000000000000000000000000000000009.900000000000000000000000000000	0000000010	000000000000000000000000000000009.900000000000000000000000000000	-1.175494341e-38	1.175494361e-38	00000001.175494361e-38	00000001.175494361e-38	-1.175494341e-38	1.175494361e-38	00000001.175494361e-38	00000001.175494361e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494341e-38	1.17549e-38	1.175494361e-38	01.17549e-38	00000001.175494361e-38	01.17549e-38	00000001.175494361e-38	1000-01-10	838:59:49	1970-01-11 00:00:10	1970-01-11 00:00:10	1911	1911	1911	1enum	2set
15	87	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
17	15	0000000016	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
19	18	0000000014	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
22	93	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
24	51654	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
27	25	0000000026	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
29	28	0000000024	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
34	41	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
94	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
100	4	0000000004	0000000000000000000000000000000000000000000000000000000000000004	0000000004	0000000000000000000000000000000000000000000000000000000000000004	-2	3.300000000000000000000000000000	4	3.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	0000000004	000000000000000000000000000000003.300000000000000000000000000000	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.175494347e-38	1.175494355e-38	00000001.175494355e-38	00000001.175494355e-38	-1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.17549e-38	1.17549e-38	1.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	01.17549e-38	-1.17549e-38	-1.175494347e-38	1.17549e-38	1.175494355e-38	01.17549e-38	00000001.175494355e-38	01.17549e-38	00000001.175494355e-38	1000-01-04	838:59:55	1970-01-05 00:00:04	1970-01-05 00:00:04	1905	1905	1905	1enum	2set
100	74	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
drop view test.v1 ;
CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ;
SELECT * FROM test.v1 order by f59,f61 desc limit 50;
F59	f61
1	0000000001
2	0000000002
3	0000000003
5	0000000005
6	0000000006
7	0000000007
8	0000000008
9	0000000009
10	0000000010
100	0000000004
250	NULL
340	NULL
441	NULL
660	NULL
2550	NULL
2760	NULL
3330	NULL
3410	NULL
76710	NULL
569300	NULL
drop view test.v1 ;

Testcase 3.3.1.54 
--------------------------------------------------------------------------------
USE test;
drop table if exists  test.t1 ;
drop table if exists  test.t2 ;
drop view  if exists  test.v1 ;
Create table t1 (f59 int, f60 int) ;
Create table t2 (f59 int, f60 int) ;
Insert into t1 values (1,10)   ;
Insert into t1 values (2,20)   ;
Insert into t1 values (47,80)  ;
Insert into t2 values (1,1000) ;
Insert into t2 values (2,2000) ;
Insert into t2 values (31,97)  ;
Create view test.v1 as select t1.f59, t1.f60
from t1,t2 where t1.f59=t2.f59 ;
Select * from test.v1 order by f59 limit 50 ;
f59	f60
1	10
2	20
drop table test.t1 ;
drop table test.t2 ;
drop view  test.v1 ;

Testcase 3.3.1.50 - 3.3.1.54 additional implementation
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
CREATE TABLE t1 ( f1 BIGINT, f2 char(10), f3 DECIMAL(10,5) );
INSERT INTO t1 VALUES(1, 'one',   1.1);
INSERT INTO t1 VALUES(2, 'two',   2.2);
INSERT INTO t1 VALUES(3, 'three', 3.3);
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
f1	f2	f3
1	one	1.10000
2	two	2.20000
3	three	3.30000
CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1;
SELECT * FROM v1;
f2
one
two
three
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1 WHERE f3 = 2.2;
SELECT * FROM v1;
f1	f2	f3
2	two	2.20000
CREATE OR REPLACE VIEW v1 AS SELECT f2 FROM t1 WHERE f3 = 2.2;
SELECT * FROM v1;
f2
two
SET sql_mode = 'traditional,ansi';
CREATE OR REPLACE VIEW v1 AS
SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ",
3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ",
'->' || CAST(f3 AS CHAR) || '<-'
         AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): "
FROM t1 WHERE f1 = 2;
SELECT * FROM v1;
pure column f3: 	2.20000
sum of columns f1 + f3 = 	4.20000
product of constants 3 * (- 0.11111E+1): 	-3.3333
expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): 	->2.20000<-
SET sql_mode = '';

Testcases 3.3.1.55 - 3.3.1.62 
--------------------------------------------------------------------------------
Drop table if exists t1, t2 ;
Drop view  if exists v1 ;
Create table t1 (f59 int, f60 char(10), f61 int, a char(1)) ;
Insert into t1 values (1, 'single',    3, '1')  ;
Insert into t1 values (2, 'double',    6, '2')  ;
Insert into t1 values (3, 'single-f3', 4, '3')  ;
Create table t2 (f59 int, f60 char(10), f61 int, b char(1)) ;
Insert into t2 values (2, 'double',    6, '2')  ;
Insert into t2 values (3, 'single-f3', 6, '3')  ;
Insert into t2 values (4, 'single',    4, '4')  ;
create or replace view test.v1 as
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
t1.f61 t1_f61, t2.f61 t2_f61
from t1 inner join t2 where t1.f59 = t2.f59 ;
select * from test.v1 order by t1_f59 ;
t1_f59	t2_f59	t1_f60	t2_f60	t1_f61	t2_f61
2	2	double	double	6	6
3	3	single-f3	single-f3	4	6
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
t1.f61 t1_f61, t2.f61 t2_f61
from t1 inner join t2 where t1.f59 = t2.f59;
t1_f59	t2_f59	t1_f60	t2_f60	t1_f61	t2_f61
2	2	double	double	6	6
3	3	single-f3	single-f3	4	6
Create or replace view test.v1 as
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
FROM t2 cross join t1;
Select * from v1 order by t1_f59,t2_f59;
t1_f59	t2_f59
1	2
1	3
1	4
2	2
2	3
2	4
3	2
3	3
3	4
Select t1.f59 AS t1_f59, t2.f59 AS t2_f59
FROM t2 cross join t1;
t1_f59	t2_f59
1	2
1	3
1	4
2	2
2	3
2	4
3	2
3	3
3	4
Create or replace view test.v1 as
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
FROM t2,t1;
Select * from v1 order by t1_f59,t2_f59;
t1_f59	t2_f59
1	2
1	3
1	4
2	2
2	3
2	4
3	2
3	3
3	4
Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59
FROM t2,t1;
t1_f59	t2_f59
1	2
1	3
1	4
2	2
2	3
2	4
3	2
3	3
3	4
Create or replace view test.v1 as
Select f59, f60, f61, a, b
FROM t2 natural join t1;
Select * from v1 order by f59;
f59	f60	f61	a	b
2	double	6	2	2
Select f59, f60, f61, a, b
FROM t2 natural join t1;
f59	f60	f61	a	b
2	double	6	2	2
Create or replace view test.v1 as
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
t1.f61 t1_f61, t2.f61 t2_f61
FROM t2 left outer join t1 on t2.f59=t1.f59;
Select * from v1 order by t1_f59;
t1_f59	t2_f59	t1_f60	t2_f60	t1_f61	t2_f61
NULL	4	NULL	single	NULL	4
2	2	double	double	6	6
3	3	single-f3	single-f3	4	6
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
t1.f61 t1_f61, t2.f61 t2_f61
FROM t2 left outer join t1 on t2.f59=t1.f59;
t1_f59	t2_f59	t1_f60	t2_f60	t1_f61	t2_f61
2	2	double	double	6	6
3	3	single-f3	single-f3	4	6
NULL	4	NULL	single	NULL	4
Create or replace view test.v1 as
Select f59, f60, f61, t1.a, t2.b
FROM t2 natural left outer join t1;
Select * from v1 order by f59;
f59	f60	f61	a	b
2	double	6	2	2
3	single-f3	6	NULL	3
4	single	4	NULL	4
Select f59, f60, f61, t1.a, t2.b
FROM t2 natural left outer join t1;
f59	f60	f61	a	b
2	double	6	2	2
3	single-f3	6	NULL	3
4	single	4	NULL	4
Create or replace view test.v1 as
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
t1.f61 t1_f61, t2.f61 t2_f61
FROM t2 right outer join t1 on t2.f59=t1.f59;
Select * from v1 order by t1_f59;
t1_f59	t2_f59	t1_f60	t2_f60	t1_f61	t2_f61
1	NULL	single	NULL	3	NULL
2	2	double	double	6	6
3	3	single-f3	single-f3	4	6
Select t1.f59 t1_f59, t2.f59 t2_f59, t1.f60 t1_f60, t2.f60 t2_f60,
t1.f61 t1_f61, t2.f61 t2_f61
FROM t2 right outer join t1 on t2.f59=t1.f59;
t1_f59	t2_f59	t1_f60	t2_f60	t1_f61	t2_f61
1	NULL	single	NULL	3	NULL
2	2	double	double	6	6
3	3	single-f3	single-f3	4	6
Create or replace view test.v1 as
Select f59, f60, a, b
FROM t2 natural right outer join t1;
Select * from v1 order by f59 desc;
f59	f60	a	b
3	single-f3	3	NULL
2	double	2	2
1	single	1	NULL
Select f59, f60, a, b
FROM t2 natural right outer join t1;
f59	f60	a	b
1	single	1	NULL
2	double	2	2
3	single-f3	3	NULL
drop table t1, t2;
drop view  v1 ;
Use test;

Testcase 3.3.1.A1 - 3.3.1.A3 
--------------------------------------------------------------------------------
Drop table if exists t1 ;
Drop view  if exists v1;
Create table t1 (f59 int, f60 int, f61 int) ;
Insert into t1 values (101,201,301)  ;
Insert into t1 values (107,501,601)  ;
Insert into t1 values (901,801,401)  ;
Create or replace view test.v1 as
Select tb2.f59 FROM tb2 LEFT JOIN t1 on tb2.f59 = t1.f59 ;
Select * from test.v1 order by f59 limit 0,10;
f59
1
2
3
5
6
7
8
9
10
15
Drop view if exists test.v1 ;
Drop table if exists t1 ;
Drop view  if exists v1;
Create table t1 (f59 int, f60 int, f61 int) ;
Insert into t1 values (201,201,201)  ;
Insert into t1 values (207,201,201)  ;
Insert into t1 values (201,201,201)  ;
Create or replace view test.v1
as Select tb2.f59 FROM tb2 INNER JOIN t1 on tb2.f59 = t1.f59 ;
Select * from test.v1 order by f59 limit 0,10;
f59
207
Drop view if exists test.v1 ;
Drop table if exists t1 ;
Drop view  if exists v1;
Create table t1 (f59 int, f60 int, f61 int) ;
Insert into t1 values (21,21,21)  ;
Insert into t1 values (27,21,21)  ;
Insert into t1 values (21,21,21)  ;
Create or replace view test.v1
as Select tb2.f59 FROM tb2 CROSS JOIN t1 on tb2.f59 = t1.f59 ;
Select * from test.v1 order by f59 limit 0,10;
f59
27
Drop view test.v1 ;

Testcase 3.3.1.63 
--------------------------------------------------------------------------------
Drop table if exists t1 ;
Drop view if exists test.v1 ;
Create table t1 (f59 int, f60 int, f61 int) ;
Insert into t1 values (11,21,31)  ;
Insert into t1 values (17,51,61)  ;
Insert into t1 values (91,81,41)  ;
Create or replace view test.v1 as  (Select f59 FROM tb2 where f59=17 )
Union  ALL (Select f59 from t1 where f59=17 );
Select * from test.v1 order by f59 limit 0,10;
f59
17
17
Create or replace view test.v1 as  (Select f59 FROM tb2 where f59=17 )
Union  (Select f59 from t1 where f59=17 );
Select * from test.v1 order by f59 limit 0,10;
f59
17
Create or replace view test.v1 as  (Select f59 FROM tb2 where f59=17 )
Union Distinct (Select f59 from t1 where f60=17 );
Select * from test.v1 order by f59 limit 0,10;
f59
17
Drop view test.v1 ;
drop table if exists t1;
drop view  if exists test.v1;
create table t1 (f59 int, f60 int, f61 int);
insert into t1 values (101,201,301);
insert into t1 values (107,501,601);
insert into t1 values (901,801,401);
create or replace view test.v1 as
select tb2.f59 from tb2  join t1 on tb2.f59 = t1.f59;
select * from test.v1 order by f59 limit 0,10;
f59
107
107
create or replace view test.v1 as
(select f59 from tb2 where f59=107 )
union all
(select f59 from t1 where f59=107 );
select * from test.v1 order by f59 limit 0,10;
f59
107
107
107
create or replace view test.v1 as
(select f59 from tb2 where f59=107 )
union
(select f59 from t1 where f59=107 );
select * from test.v1 order by f59 limit 0,10;
f59
107
create or replace view test.v1 as
(select f59 from tb2 where f59=107 )
union distinct
(select f59 from t1 where f59=107 );
select * from test.v1 order by f59 limit 0,10;
f59
107
drop view if exists test.v1 ;
drop table t1;

Testcase 3.3.1.64 
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT F59
FROM test.tb2 where test.tb2.F59 = 109;
SELECT * FROM test.v1 order by f59 limit 0,10;
F59
109
109
ALTER VIEW test.v1 AS  SELECT *
FROM test.tb2 WHERE test.tb2.f59 = 242 ;
SELECT * FROM test.v1 order by f59 limit 0,10;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
242	79	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
Drop view test.v1 ;

Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS test.v1 ;
CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = memory ;
CREATE VIEW  v1 AS SELECT f1 FROM t1;
DROP VIEW v1;
DROP VIEW v1;
ERROR 42S02: Unknown table 'v1'
CREATE VIEW  v1 AS SELECT f1 FROM t1;
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:
Note	1051	Unknown table 'test.v1'

Testcase 3.3.1.68 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS v1_base ;
DROP VIEW  IF EXISTS v1_top ;
CREATE TABLE t1 ( f1 DOUBLE);
CREATE VIEW  v1_base AS SELECT * FROM t1;
CREATE VIEW  v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top  ;
DROP VIEW v1_top;
ERROR 42S02: Unknown table 'v1_top'
CREATE VIEW  v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base  ;
DROP VIEW v1_base;
ERROR 42S02: Unknown table 'v1_base'
DROP VIEW v1_top;
CREATE VIEW  v1_base AS SELECT * FROM t1;
CREATE VIEW  v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top CASCADE ;
DROP VIEW v1_top;
ERROR 42S02: Unknown table 'v1_top'
CREATE VIEW  v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base CASCADE ;
DROP VIEW v1_base;
ERROR 42S02: Unknown table 'v1_base'
DROP VIEW v1_top;
CREATE VIEW  v1_base AS SELECT * FROM t1;
CREATE VIEW  v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top RESTRICT ;
DROP VIEW v1_top;
ERROR 42S02: Unknown table 'v1_top'
CREATE VIEW  v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base RESTRICT ;
DROP VIEW v1_base;
ERROR 42S02: Unknown table 'v1_base'
DROP VIEW v1_top;

Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ENGINE = memory;
CREATE VIEW v1 AS SELECT * FROM t1;
DROP VIEW v1 ;
SELECT * FROM v1 ;
ERROR 42S02: Table 'test.v1' doesn't exist
SHOW CREATE VIEW v1 ;
ERROR 42S02: Table 'test.v1' doesn't exist
SHOW CREATE TABLE v1 ;
ERROR 42S02: Table 'test.v1' doesn't exist
SHOW TABLE STATUS like 'v1' ;
Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
SHOW TABLES LIKE 'v1';
Tables_in_test (v1)
SHOW COLUMNS FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
SHOW FIELDS  FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
CHECK TABLE v1;
Table	Op	Msg_type	Msg_text
test.v1	check	Error	Table 'test.v1' doesn't exist
test.v1	check	error	Corrupt
DESCRIBE v1;
ERROR 42S02: Table 'test.v1' doesn't exist
EXPLAIN SELECT * FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
Use test;

Testcase 3.3.1.A6 
--------------------------------------------------------------------------------
DROP DATABASE IF EXISTS test3;
CREATE DATABASE test3;
CREATE TABLE test3.t1 (f1 DECIMAL(5,3)) ENGINE = memory;
INSERT INTO test3.t1 SET f1 = 1.0;
CREATE VIEW test3.v0 AS SELECT * FROM test3.t1;
CREATE VIEW test3.v1 AS SELECT * FROM test3.v0;
CREATE VIEW test3.v2 AS SELECT * FROM test3.v1;
CREATE VIEW test3.v3 AS SELECT * FROM test3.v2;
CREATE VIEW test3.v4 AS SELECT * FROM test3.v3;
CREATE VIEW test3.v5 AS SELECT * FROM test3.v4;
CREATE VIEW test3.v6 AS SELECT * FROM test3.v5;
CREATE VIEW test3.v7 AS SELECT * FROM test3.v6;
CREATE VIEW test3.v8 AS SELECT * FROM test3.v7;
CREATE VIEW test3.v9 AS SELECT * FROM test3.v8;
CREATE VIEW test3.v10 AS SELECT * FROM test3.v9;
CREATE VIEW test3.v11 AS SELECT * FROM test3.v10;
CREATE VIEW test3.v12 AS SELECT * FROM test3.v11;
CREATE VIEW test3.v13 AS SELECT * FROM test3.v12;
CREATE VIEW test3.v14 AS SELECT * FROM test3.v13;
CREATE VIEW test3.v15 AS SELECT * FROM test3.v14;
CREATE VIEW test3.v16 AS SELECT * FROM test3.v15;
CREATE VIEW test3.v17 AS SELECT * FROM test3.v16;
CREATE VIEW test3.v18 AS SELECT * FROM test3.v17;
CREATE VIEW test3.v19 AS SELECT * FROM test3.v18;
CREATE VIEW test3.v20 AS SELECT * FROM test3.v19;
CREATE VIEW test3.v21 AS SELECT * FROM test3.v20;
CREATE VIEW test3.v22 AS SELECT * FROM test3.v21;
CREATE VIEW test3.v23 AS SELECT * FROM test3.v22;
CREATE VIEW test3.v24 AS SELECT * FROM test3.v23;
CREATE VIEW test3.v25 AS SELECT * FROM test3.v24;
CREATE VIEW test3.v26 AS SELECT * FROM test3.v25;
CREATE VIEW test3.v27 AS SELECT * FROM test3.v26;
CREATE VIEW test3.v28 AS SELECT * FROM test3.v27;
CREATE VIEW test3.v29 AS SELECT * FROM test3.v28;
CREATE VIEW test3.v30 AS SELECT * FROM test3.v29;
CREATE VIEW test3.v31 AS SELECT * FROM test3.v30;
CREATE VIEW test3.v32 AS SELECT * FROM test3.v31;
SHOW CREATE VIEW test3.v32;
View	Create View	character_set_client	collation_connection
v32	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31`	latin1	latin1_swedish_ci
SELECT * FROM test3.v32;
f1
1.000
EXPLAIN SELECT * FROM test3.v32;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	
DROP VIEW test3.v0;
SHOW CREATE VIEW test3.v32;
View	Create View	character_set_client	collation_connection
v32	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test3`.`v32` AS select `v31`.`f1` AS `f1` from `test3`.`v31`	latin1	latin1_swedish_ci
Warnings:
Warning	1356	View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SELECT * FROM test3.v32;
ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
EXPLAIN SELECT * FROM test3.v32;
ERROR HY000: View 'test3.v32' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

FIXME - Setting join_limit to 28 - hangs for higher values
----------------------------------------------------------
SET @join_limit = 28;
SET @max_level = @join_limit - 1;
DROP DATABASE IF EXISTS test3;
DROP TABLE IF EXISTS test1.t1;
DROP TABLE IF EXISTS test2.t1;
DROP VIEW IF EXISTS test1.v27;
DROP VIEW IF EXISTS test1.v26;
DROP VIEW IF EXISTS test1.v25;
DROP VIEW IF EXISTS test1.v24;
DROP VIEW IF EXISTS test1.v23;
DROP VIEW IF EXISTS test1.v22;
DROP VIEW IF EXISTS test1.v21;
DROP VIEW IF EXISTS test1.v20;
DROP VIEW IF EXISTS test1.v19;
DROP VIEW IF EXISTS test1.v18;
DROP VIEW IF EXISTS test1.v17;
DROP VIEW IF EXISTS test1.v16;
DROP VIEW IF EXISTS test1.v15;
DROP VIEW IF EXISTS test1.v14;
DROP VIEW IF EXISTS test1.v13;
DROP VIEW IF EXISTS test1.v12;
DROP VIEW IF EXISTS test1.v11;
DROP VIEW IF EXISTS test1.v10;
DROP VIEW IF EXISTS test1.v9;
DROP VIEW IF EXISTS test1.v8;
DROP VIEW IF EXISTS test1.v7;
DROP VIEW IF EXISTS test1.v6;
DROP VIEW IF EXISTS test1.v5;
DROP VIEW IF EXISTS test1.v4;
DROP VIEW IF EXISTS test1.v3;
DROP VIEW IF EXISTS test1.v2;
DROP VIEW IF EXISTS test1.v1;
DROP VIEW IF EXISTS test1.v0;
CREATE DATABASE test3;
USE test1;
CREATE TABLE t1 (f1 BIGINT, f2 CHAR(50)) ENGINE = memory ;
INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
INSERT INTO t1 VALUES (0, NULL);
INSERT INTO t1 VALUES (5, 'five');
INSERT INTO t1 VALUES (1, 'one');
INSERT INTO t1 VALUES (2, 'two');
USE test2;
CREATE TABLE t1 (f1 DECIMAL(64,30), f2 VARCHAR(50)) ENGINE = memory;
INSERT INTO  t1 VALUES (NULL, 'numeric column is NULL');
INSERT INTO t1 VALUES (0.000000000000000000000000000000, NULL);
INSERT INTO t1 VALUES (5.000000000000000000000000000000, 'five');
INSERT INTO t1 VALUES (+1.000000000000000000000000000000, 'one');
INSERT INTO t1 VALUES (3.000000000000000, 'three');
USE test3;
CREATE TABLE t1 (f1 DOUBLE, f2 VARBINARY(50)) ENGINE = memory;
INSERT INTO t1 VALUES (NULL, 'numeric column is NULL');
INSERT INTO t1 VALUES (+0.0E-35, NULL);
INSERT INTO t1 VALUES (+0.5E+1, 'five');
INSERT INTO t1 VALUES (20.0E-1, 'two');
INSERT INTO t1 VALUES (0.0300E2, 'three');
USE test;
CREATE OR REPLACE VIEW test1.v0 AS SELECT * FROM test2.t1;
CREATE OR REPLACE VIEW test1.v1 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v0 tab2;
CREATE OR REPLACE VIEW test1.v2 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v1 tab2;
CREATE OR REPLACE VIEW test1.v3 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v2 tab2;
CREATE OR REPLACE VIEW test1.v4 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v3 tab2;
CREATE OR REPLACE VIEW test1.v5 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v4 tab2;
CREATE OR REPLACE VIEW test1.v6 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v5 tab2;
CREATE OR REPLACE VIEW test1.v7 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v6 tab2;
CREATE OR REPLACE VIEW test1.v8 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v7 tab2;
CREATE OR REPLACE VIEW test1.v9 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v8 tab2;
CREATE OR REPLACE VIEW test1.v10 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v9 tab2;
CREATE OR REPLACE VIEW test1.v11 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v10 tab2;
CREATE OR REPLACE VIEW test1.v12 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v11 tab2;
CREATE OR REPLACE VIEW test1.v13 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v12 tab2;
CREATE OR REPLACE VIEW test1.v14 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v13 tab2;
CREATE OR REPLACE VIEW test1.v15 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v14 tab2;
CREATE OR REPLACE VIEW test1.v16 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v15 tab2;
CREATE OR REPLACE VIEW test1.v17 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v16 tab2;
CREATE OR REPLACE VIEW test1.v18 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v17 tab2;
CREATE OR REPLACE VIEW test1.v19 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v18 tab2;
CREATE OR REPLACE VIEW test1.v20 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v19 tab2;
CREATE OR REPLACE VIEW test1.v21 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v20 tab2;
CREATE OR REPLACE VIEW test1.v22 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v21 tab2;
CREATE OR REPLACE VIEW test1.v23 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v22 tab2;
CREATE OR REPLACE VIEW test1.v24 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v23 tab2;
CREATE OR REPLACE VIEW test1.v25 AS SELECT f1, f2
FROM test2.t1 tab1 NATURAL JOIN test1.v24 tab2;
CREATE OR REPLACE VIEW test1.v26 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v25 tab2;
CREATE OR REPLACE VIEW test1.v27 AS SELECT f1, f2
FROM test1.t1 tab1 NATURAL JOIN test1.v26 tab2;
SHOW CREATE VIEW test1.v27;
View	Create View	character_set_client	collation_connection
v27	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v27` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test1`.`t1` `tab1` join `test1`.`v26` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`))))	latin1	latin1_swedish_ci
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
f1	f2
5	five

The output of following EXPLAIN is deactivated, because the result
differs on some platforms
FIXME Is this a bug ? 
--------------------------------------------------------------------------------
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
CREATE VIEW test1.v28 AS SELECT f1, f2
FROM test3.t1 tab1 NATURAL JOIN test1.v27 tab2;
SHOW CREATE VIEW test1.v28;
View	Create View	character_set_client	collation_connection
v28	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `test1`.`v28` AS select `tab1`.`f1` AS `f1`,`tab1`.`f2` AS `f2` from (`test3`.`t1` `tab1` join `test1`.`v27` `tab2` on(((`tab1`.`f1` = `tab2`.`f1`) and (`tab1`.`f2` = `tab2`.`f2`))))	latin1	latin1_swedish_ci
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v28;
f1	f2
5	five

The output of following EXPLAIN is deactivated, because the result
differs on some platforms
FIXME Is this a bug ? 
--------------------------------------------------------------------------------
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v28;
DROP VIEW IF EXISTS test1.v28;
CREATE OR REPLACE VIEW test1.v0 AS 
SELECT f1 as f2, f2 as f1 FROM test2.t1;
CREATE OR REPLACE VIEW test2.v0 AS 
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
SHOW CREATE VIEW test1.v27;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
CREATE OR REPLACE VIEW test3.v0 AS
SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
SHOW CREATE VIEW test1.v27;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
CREATE OR REPLACE VIEW test3.v0 AS
SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
SHOW CREATE VIEW test1.v27;
SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v27;
DROP VIEW IF EXISTS test1.v27;
DROP VIEW IF EXISTS test1.v26;
DROP VIEW IF EXISTS test1.v25;
DROP VIEW IF EXISTS test1.v24;
DROP VIEW IF EXISTS test1.v23;
DROP VIEW IF EXISTS test1.v22;
DROP VIEW IF EXISTS test1.v21;
DROP VIEW IF EXISTS test1.v20;
DROP VIEW IF EXISTS test1.v19;
DROP VIEW IF EXISTS test1.v18;
DROP VIEW IF EXISTS test1.v17;
DROP VIEW IF EXISTS test1.v16;
DROP VIEW IF EXISTS test1.v15;
DROP VIEW IF EXISTS test1.v14;
DROP VIEW IF EXISTS test1.v13;
DROP VIEW IF EXISTS test1.v12;
DROP VIEW IF EXISTS test1.v11;
DROP VIEW IF EXISTS test1.v10;
DROP VIEW IF EXISTS test1.v9;
DROP VIEW IF EXISTS test1.v8;
DROP VIEW IF EXISTS test1.v7;
DROP VIEW IF EXISTS test1.v6;
DROP VIEW IF EXISTS test1.v5;
DROP VIEW IF EXISTS test1.v4;
DROP VIEW IF EXISTS test1.v3;
DROP VIEW IF EXISTS test1.v2;
DROP VIEW IF EXISTS test1.v1;
DROP VIEW IF EXISTS test1.v0;
DROP DATABASE test3;
DROP TABLE test1.t1;
DROP TABLE test2.t1;
Use test;

Testcase 3.3.2.1
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
Create View test.v1 AS SELECT f59,f60 FROM tb2 where f59 = 1995 ;
INSERT INTO test.v1 (f59,f60) values (879,700) ;
affected rows: 1
SELECT f59,f60 FROM test.v1 where f59 = 879 and f60 = 700 ;
f59	f60
DELETE FROM tb2 where f59 = 879 and f60 = 700 ;
Drop view test.v1 ;

Testcase 3.3.2.2
--------------------------------------------------------------------------------
Drop view if exists test.v1 ;
Create view test.v1 AS SELECT f59,f60,f61 FROM tb2  ;
INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ;
affected rows: 1
SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
2005	101	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ;
f59	f60
2005	101
DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ;
Drop view test.v1 ;

Testcase 3.3.2.3
--------------------------------------------------------------------------------
Insert into tb2 (f59,f60,f61) values (780,105,106) ;
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2  ;
UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105;
affected rows: 1
info: Rows matched: 1  Changed: 1  Warnings: 0
SELECT * FROM tb2 where f59 = 8 and f60 = 105;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
8	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ;
f59	f60
8	105
Drop view test.v1 ;

Testcase 3.3.2.4
--------------------------------------------------------------------------------
Insert into tb2 (f59,f60,f61) values (781,105,106) ;
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ;
UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ;
affected rows: 4
info: Rows matched: 4  Changed: 4  Warnings: 0
SELECT * FROM tb2 where f59 = 891 and f60 = 105;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
891	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
891	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
891	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
891	105	0000000106	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	7.7	7.7	00000000000000000007.7	00000000000000000008.8	8.8	8.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	0000000008.8	0000000008.8	0000000008.8	8.8	8.8	8.8	8.8	0000000008.8	00000000000000000008.8	0000000008.8	00000000000000000008.8	2000-01-01	00:00:20	0002-02-02 00:00:00	2000-12-31 23:59:59	2000	2000	2000	1enum	1set
SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ;
f59	f60
891	105
891	105
891	105
891	105
Drop view test.v1 ;

Testcase 3.3.2.5
--------------------------------------------------------------------------------
Insert into tb2 (f59,f60,f61) values (789,105,106) ;
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ;
DELETE FROM test.v1 where f59 = 789 ;
affected rows: 1
SELECT * FROM tb2 where f59 = 789 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ;
f59	f60
Drop view test.v1 ;

Testcase 3.3.2.6
--------------------------------------------------------------------------------
Insert into tb2 (f59,f60,f61) values (711,105,106) ;
Drop view if exists test.v1 ;
CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 711  ;
DELETE FROM test.v1 where f59 = 711 ;
affected rows: 1
SELECT * FROM tb2 where f59 = 711 ;
f59	f60	f61	f62	f63	f64	f65	f66	f67	f68	f69	f70	f71	f72	f73	f74	f75	f76	f77	f78	f79	f80	f81	f82	f83	f84	f85	f86	f87	f88	f89	f90	f91	f92	f93	f94	f95	f96	f97	f98	f99	f100	f101	f102	f103	f104	f105	f106	f107	f108	f109
SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ;
f59	f60
Drop view test.v1 ;

Testcase 3.3.2.1 - 3.3.2.6 alternative implementation
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
DROP VIEW  IF EXISTS v1;
CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4),
f4 CHAR, PRIMARY KEY(f1));
CREATE VIEW v1 AS SELECT f1, f2, f3 FROM t1;
INSERT INTO v1 SET f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
1	NULL	NULL	NULL
DELETE FROM t1;
INSERT INTO v1 SET f2 = 'ABC';
INSERT INTO v1 SET f2 = 'ABC';
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
SELECT * from t1;
f1	f2	f3	f4
0	ABC	NULL	NULL
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1;
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2 WHERE f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2;
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
2	NNN	-0.0012	X
DELETE FROM t1;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f2, f3 FROM t1;
INSERT INTO v1 SET f2 = 'ABC';
INSERT INTO v1 SET f2 = 'ABC';
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
SELECT * from t1;
f1	f2	f3	f4
0	ABC	NULL	NULL
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1;
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
INSERT INTO v1 SET f1 = 1;
ERROR HY000: The target table v1 of the INSERT is not insertable-into
SELECT * from t1;
f1	f2	f3	f4
DELETE FROM t1;
INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
ERROR HY000: The target table v1 of the INSERT is not insertable-into
SELECT * from t1;
f1	f2	f3	f4
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE my_greeting = 'HELLO';
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1;
SELECT * from t1;
f1	f2	f3	f4
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2 WHERE f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2 WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2 WHERE my_greeting = 'HELLO';
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2;
SELECT * from t1;
f1	f2	f3	f4
2	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f1 = 1;
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE f3 = -1.2E-3;
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN' WHERE my_greeting = 'HELLO';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f2 = 'NNN';
SELECT * from t1;
f1	f2	f3	f4
1	NNN	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1;
ERROR HY000: Column 'my_greeting' is not updatable
SELECT * from t1;
f1	f2	f3	f4
1	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC';
ERROR HY000: Column 'my_greeting' is not updatable
SELECT * from t1;
f1	f2	f3	f4
1	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO';
ERROR HY000: Column 'my_greeting' is not updatable
SELECT * from t1;
f1	f2	f3	f4
1	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET my_greeting = 'Hej';
ERROR HY000: Column 'my_greeting' is not updatable
SELECT * from t1;
f1	f2	f3	f4
1	ABC	-0.0012	X
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f1 = 2, f2 = 'NNN' WHERE f1 = 1 AND f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
2	NNN	-0.0012	X
DELETE FROM t1;
DROP TABLE t1;
SET sql_mode = 'traditional';
CREATE TABLE t1 ( f1 BIGINT, f2 CHAR(20), f3 NUMERIC(7,4) NOT NULL,
f4 CHAR, PRIMARY KEY(f1));
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1;
INSERT INTO v1 SET f1 = 1;
ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value
SELECT * from t1;
f1	f2	f3	f4
DELETE FROM t1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
DELETE FROM v1 WHERE f1 = 1;
INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X');
UPDATE v1 SET f4 = 'Y' WHERE f2 = 'ABC';
SELECT * from t1;
f1	f2	f3	f4
1	ABC	-0.0012	Y
DELETE FROM t1;
SET sql_mode = '';

Testcases 3.3.2.7 - 3.3.2.9,
3.3.2.10 - 3.3.2.11 omitted because of missing
features EXCEPT and INTERSECT 
--------------------------------------------------------------------------------
INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ;
INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ;
DROP TABLE IF EXISTS t1 ;
DROP VIEW  IF EXISTS v1 ;
CREATE TABLE t1 (f59 INT, f60 INT, f61 INT) ;
INSERT INTO t1 VALUES (19,41,32)  ;
INSERT INTO t1 VALUES (59,54,71)  ;
INSERT INTO t1 VALUES (21,91,99)  ;
SET @variant1 = 'UNION ';
SET @variant2 = 'UNION ALL ';
SET @variant3 = 'UNION DISTINCT ';
SET @variant4 = 'EXCEPT ';
SET @variant5 = 'INTERSECT ';
CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION DISTINCT SELECT f61 FROM t1 WHERE f59=19;
INSERT INTO v1 VALUES (3000);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61 = 100 WHERE f61 = 32;
ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1 ;
CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION ALL SELECT f61 FROM t1 WHERE f59=19;
INSERT INTO v1 VALUES (3000);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61 = 100 WHERE f61 = 32;
ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1 ;
CREATE VIEW v1 AS SELECT f61 FROM tb2 WHERE f59=59 UNION SELECT f61 FROM t1 WHERE f59=19;
INSERT INTO v1 VALUES (3000);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61 = 100 WHERE f61 = 32;
ERROR HY000: The target table v1 of the UPDATE is not updatable
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1 ;

Testcases 3.3.2.12 - 3.3.2.20
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1, t2 ;
DROP VIEW  IF EXISTS test.v1 ;
Drop view if exists v2 ;
CREATE TABLE t1 (f59 int, f60 int, f61 int) ;
INSERT INTO t1 VALUES (19,41,32)  ;
INSERT INTO t1 VALUES (59,54,71)  ;
INSERT INTO t1 VALUES (21,91,99)  ;
CREATE TABLE t2 (f59 int, f60 int, f61 int) ;
INSERT INTO t2 VALUES (19,41,32)  ;
INSERT INTO t2 VALUES (59,54,71)  ;
INSERT INTO t2 VALUES (21,91,99)  ;
CREATE VIEW v2 AS SELECT f59, f60, f61 FROM t2 LIMIT 5;
SET @variant1= 'CREATE VIEW v1 AS SELECT DISTINCT(f61)   FROM t1';
SET @variant2= 'CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1';
SET @variant3= 'CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1';
SET @variant4= 'CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61';
SET @variant5= 'CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0';
SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1';
SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2';

Some server responses suffer from 
Bug#10773 Incorrect message is displayed while updating a view
--------------------------------------------------------------------------------
SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)';
SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1';
CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f61 FROM v2;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
CREATE VIEW v1 AS SELECT DISTINCT(f61)   FROM t1;
INSERT INTO v1 VALUES (1002);
ERROR HY000: The target table v1 of the INSERT is not insertable-into
UPDATE v1 SET f61=1007;
Got one of the listed errors
DELETE FROM v1;
ERROR HY000: The target table v1 of the DELETE is not updatable
DROP VIEW v1;
Drop TABLE t1, t2 ;
Drop VIEW  v2 ;

Testcases 3.3.A1
--------------------------------------------------------------------------------
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP VIEW  IF EXISTS v1;
DROP VIEW  IF EXISTS v2;
CREATE TABLE t1 (f1 BIGINT, f2 DATE DEFAULT NULL, f4 CHAR(5),
report char(10)) ENGINE = memory;
CREATE VIEW v1 AS SELECT * FROM t1;
INSERT INTO t1 SET f1 = -1, f4 = 'ABC', report = 't1 0';
INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	char(5)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	char(5)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5);
INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1';
INSERT INTO v1 SET f1 = 0, f4  = 'ABC', report = 'v1 1';
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a';
ERROR 42S22: Unknown column 'f4x' in 'field list'
INSERT INTO v1 SET f1 = 0, report = 'v1 1b';
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4x	char(5)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SELECT * FROM t1 order by f1, report;
f1	f2	f4x	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
SELECT * FROM v1 order by f1, report;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5);
ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(10);
INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2';
INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	char(10)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	char(10)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -->	t1 2
2	NULL	<-- 10 -->	v1 2
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -->	t1 2
2	NULL	<-- 10 -->	v1 2
ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8);
Warnings:
Warning	1265	Data truncated for column 'f4' at row 4
Warning	1265	Data truncated for column 'f4' at row 5
INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3';
Warnings:
Warning	1265	Data truncated for column 'f4' at row 1
INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3';
Warnings:
Warning	1265	Data truncated for column 'f4' at row 1
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	char(8)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	char(8)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20);
INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4';
INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	bigint(20)	YES		NULL	
f2	date	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30);
INSERT INTO t1 SET f1 = '<------------- 30 ----------->', 
f4 = '<------ 20 -------->', report = 't1 5';
INSERT INTO v1 SET f1 = '<------------- 30 ----------->', 
f4 = '<------ 20 -------->', report = 'v1 5';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f2	date	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f2	date	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
<------------- 30 ----------->	NULL	<------ 20 -------->	t1 5
<------------- 30 ----------->	NULL	<------ 20 -------->	v1 5
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
<------------- 30 ----------->	NULL	<------ 20 -------->	t1 5
<------------- 30 ----------->	NULL	<------ 20 -------->	v1 5
ALTER TABLE t1 DROP COLUMN f2;
INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6';
INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6';
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
DESCRIBE v1;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SELECT * FROM t1 order by f1, report;
f1	f4	report
-1	ABC	t1 0
-1	ABC	v1 0
0	ABC	t1 1
2	<-- 10 -	t1 2
2	<-- 10 -	v1 2
3	<-- 10 -	t1 3
3	<-- 10 -	v1 3
4	<------ 20 -------->	t1 4
4	<------ 20 -------->	v1 4
<------------- 30 ----------->	<------ 20 -------->	t1 5
<------------- 30 ----------->	<------ 20 -------->	v1 5
ABC	<------ 20 -------->	t1 6
SELECT * FROM v1 order by f1, report;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL;
INSERT INTO t1 SET f1 = 'ABC', f2 = '1500-12-04',
f4 = '<------ 20 -------->', report = 't1 7';
INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04',
f4 = '<------ 20 -------->', report = 'v1 7';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
f2	date	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f2	date	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f4	report	f2
-1	ABC	t1 0	NULL
-1	ABC	v1 0	NULL
0	ABC	t1 1	NULL
2	<-- 10 -	t1 2	NULL
2	<-- 10 -	v1 2	NULL
3	<-- 10 -	t1 3	NULL
3	<-- 10 -	v1 3	NULL
4	<------ 20 -------->	t1 4	NULL
4	<------ 20 -------->	v1 4	NULL
<------------- 30 ----------->	<------ 20 -------->	t1 5	NULL
<------------- 30 ----------->	<------ 20 -------->	v1 5	NULL
ABC	<------ 20 -------->	t1 6	NULL
ABC	<------ 20 -------->	t1 7	1500-12-04
ABC	<------ 20 -------->	v1 7	1500-12-04
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
<------------- 30 ----------->	NULL	<------ 20 -------->	t1 5
<------------- 30 ----------->	NULL	<------ 20 -------->	v1 5
ABC	NULL	<------ 20 -------->	t1 6
ABC	1500-12-04	<------ 20 -------->	t1 7
ABC	1500-12-04	<------ 20 -------->	v1 7
ALTER TABLE t1 DROP COLUMN f2;
ALTER TABLE t1 ADD COLUMN f2 FLOAT;
INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
f4 = '<------ 20 -------->', report = 't1 8';
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
f4 = '<------ 20 -------->', report = 'v1 8';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
f2	float	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f2	float	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f4	report	f2
-1	ABC	t1 0	NULL
-1	ABC	v1 0	NULL
0	ABC	t1 1	NULL
2	<-- 10 -	t1 2	NULL
2	<-- 10 -	v1 2	NULL
3	<-- 10 -	t1 3	NULL
3	<-- 10 -	v1 3	NULL
4	<------ 20 -------->	t1 4	NULL
4	<------ 20 -------->	v1 4	NULL
<------------- 30 ----------->	<------ 20 -------->	t1 5	NULL
<------------- 30 ----------->	<------ 20 -------->	v1 5	NULL
ABC	<------ 20 -------->	t1 6	NULL
ABC	<------ 20 -------->	t1 7	NULL
ABC	<------ 20 -------->	t1 8	-0.00033
ABC	<------ 20 -------->	v1 7	NULL
ABC	<------ 20 -------->	v1 8	-0.00033
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
<------------- 30 ----------->	NULL	<------ 20 -------->	t1 5
<------------- 30 ----------->	NULL	<------ 20 -------->	v1 5
ABC	NULL	<------ 20 -------->	t1 6
ABC	NULL	<------ 20 -------->	t1 7
ABC	-0.00033	<------ 20 -------->	t1 8
ABC	NULL	<------ 20 -------->	v1 7
ABC	-0.00033	<------ 20 -------->	v1 8
ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2);
INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4,
f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9';
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9';
ERROR 42S22: Unknown column 'f3' in 'field list'
INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4,
f4 = '<------ 20 -------->', report = 'v1 9a';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
f2	float	YES		NULL	
f3	decimal(7,2)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	varchar(30)	YES		NULL	
f2	float	YES		NULL	
f4	varchar(20)	YES		NULL	
report	char(10)	YES		NULL	
SELECT * FROM t1 order by f1, report;
f1	f4	report	f2	f3
-1	ABC	t1 0	NULL	NULL
-1	ABC	v1 0	NULL	NULL
0	ABC	t1 1	NULL	NULL
2	<-- 10 -	t1 2	NULL	NULL
2	<-- 10 -	v1 2	NULL	NULL
3	<-- 10 -	t1 3	NULL	NULL
3	<-- 10 -	v1 3	NULL	NULL
4	<------ 20 -------->	t1 4	NULL	NULL
4	<------ 20 -------->	v1 4	NULL	NULL
<------------- 30 ----------->	<------ 20 -------->	t1 5	NULL	NULL
<------------- 30 ----------->	<------ 20 -------->	v1 5	NULL	NULL
ABC	<------ 20 -------->	t1 6	NULL	NULL
ABC	<------ 20 -------->	t1 7	NULL	NULL
ABC	<------ 20 -------->	t1 8	-0.00033	NULL
ABC	<------ 20 -------->	t1 9	-0.00033	-2.20
ABC	<------ 20 -------->	v1 7	NULL	NULL
ABC	<------ 20 -------->	v1 8	-0.00033	NULL
ABC	<------ 20 -------->	v1 9a	-0.00033	NULL
SELECT * FROM v1 order by f1, report;
f1	f2	f4	report
-1	NULL	ABC	t1 0
-1	NULL	ABC	v1 0
0	NULL	ABC	t1 1
2	NULL	<-- 10 -	t1 2
2	NULL	<-- 10 -	v1 2
3	NULL	<-- 10 -	t1 3
3	NULL	<-- 10 -	v1 3
4	NULL	<------ 20 -------->	t1 4
4	NULL	<------ 20 -------->	v1 4
<------------- 30 ----------->	NULL	<------ 20 -------->	t1 5
<------------- 30 ----------->	NULL	<------ 20 -------->	v1 5
ABC	NULL	<------ 20 -------->	t1 6
ABC	NULL	<------ 20 -------->	t1 7
ABC	-0.00033	<------ 20 -------->	t1 8
ABC	-0.00033	<------ 20 -------->	t1 9
ABC	NULL	<------ 20 -------->	v1 7
ABC	-0.00033	<------ 20 -------->	v1 8
ABC	-0.00033	<------ 20 -------->	v1 9a
DROP TABLE t1;
DROP VIEW  v1;
CREATE TABLE t1 (f1 CHAR(10), f2 BIGINT) ENGINE = memory;
INSERT INTO t1   SET f1 = 'ABC', f2 = 3;
CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	char(10)	YES		NULL	
f2	bigint(20)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	char(10)	YES		NULL	
my_sqrt	double	YES		NULL	
SELECT * FROM t1 order by f1, f2;
f1	f2
ABC	3
SELECT * FROM v1 order by 2;
f1	my_sqrt
ABC	1.7320508075689
ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30);
INSERT INTO t1   SET f1 = 'ABC', f2 = 'DEF';
DESCRIBE t1;
Field	Type	Null	Key	Default	Extra
f1	char(10)	YES		NULL	
f2	varchar(30)	YES		NULL	
DESCRIBE v1;
Field	Type	Null	Key	Default	Extra
f1	char(10)	YES		NULL	
my_sqrt	double	YES		NULL	
SELECT * FROM t1 order by f1, f2;
f1	f2
ABC	3
ABC	DEF
SELECT * FROM v1 order by 2;
f1	my_sqrt
ABC	0
ABC	1.7320508075689
SELECT SQRT('DEF');
SQRT('DEF')
0
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: 'DEF'
CREATE VIEW v2 AS SELECT SQRT('DEF');
SELECT * FROM v2 order by 1;
SQRT('DEF')
0
Warnings:
Warning	1292	Truncated incorrect DOUBLE value: 'DEF'
CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
DESCRIBE v2;
Field	Type	Null	Key	Default	Extra
f1	char(10)	YES		NULL	
my_sqrt	double	YES		NULL	
SELECT * FROM v2 order by 2;
f1	my_sqrt
ABC	0
ABC	1.7320508075689
CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1;
SELECT * FROM t2 order by 2;
f1	my_sqrt
ABC	0
ABC	1.73205080756888
DROP TABLE t2;
CREATE TABLE t2 AS SELECT * FROM v1;
SELECT * FROM t2 order by 2;
f1	my_sqrt
ABC	0
ABC	1.73205080756888
DROP TABLE t2;
CREATE TABLE t2 AS SELECT * FROM v2;
SELECT * FROM t2 order by 2;
f1	my_sqrt
ABC	0
ABC	1.73205080756888
DROP TABLE t1;
DROP TABLE t2;
DROP VIEW  v1;
DROP VIEW  v2;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP VIEW  IF EXISTS v1;
DROP VIEW  IF EXISTS v1_1;
DROP VIEW  IF EXISTS v1_2;
DROP VIEW  IF EXISTS v1_firstview;
DROP VIEW  IF EXISTS v1_secondview;
DROP VIEW  IF EXISTS v2;
DROP DATABASE IF EXISTS test2;
DROP DATABASE IF EXISTS test3;
DROP DATABASE IF EXISTS test1;
