2004-09-08 09:18:04 +02:00
|
|
|
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
|
|
|
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
2004-09-07 18:58:02 +02:00
|
|
|
drop database if exists MySQLTest;
|
|
|
|
create database MySQLTest;
|
|
|
|
use MySQLTest;
|
|
|
|
create table TaB (Field int);
|
|
|
|
create view ViE as select * from TAb;
|
|
|
|
show create table VIe;
|
2004-09-24 11:50:10 +02:00
|
|
|
View Create View
|
2004-10-07 22:26:26 +02:00
|
|
|
vie CREATE ALGORITHM=UNDEFINED VIEW `mysqltest`.`vie` AS select `mysqltest`.`tab`.`Field` AS `Field` from `mysqltest`.`tab`
|
2004-09-07 18:58:02 +02:00
|
|
|
drop database MySQLTest;
|
2004-09-07 19:40:16 +02:00
|
|
|
use test;
|
2004-09-08 09:18:04 +02:00
|
|
|
create table t1Aa (col1 int);
|
|
|
|
create table t2Aa (col1 int);
|
|
|
|
create view v1Aa as select * from t1Aa;
|
|
|
|
create view v2Aa as select * from v1Aa;
|
|
|
|
update v2aA set col1 = (select max(col1) from v1aA);
|
|
|
|
ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause
|
|
|
|
delete from v2aA where col1 = (select max(col1) from v1aA);
|
|
|
|
ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause
|
|
|
|
insert into v2aA values ((select max(col1) from v1aA));
|
|
|
|
ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause
|
|
|
|
drop view v2Aa,v1Aa;
|
|
|
|
drop table t1Aa,t2Aa;
|
2004-11-24 18:48:30 +01:00
|
|
|
create table t1Aa (col1 int);
|
|
|
|
create view v1Aa as select col1 from t1Aa as AaA;
|
|
|
|
show create view v1AA;
|
|
|
|
View Create View
|
|
|
|
v1aa CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA`
|
|
|
|
drop view v1AA;
|
|
|
|
select Aaa.col1 from t1Aa as AaA;
|
|
|
|
col1
|
|
|
|
create view v1Aa as select Aaa.col1 from t1Aa as AaA;
|
|
|
|
drop view v1AA;
|
|
|
|
create view v1Aa as select AaA.col1 from t1Aa as AaA;
|
|
|
|
show create view v1AA;
|
|
|
|
View Create View
|
|
|
|
v1aa CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA`
|
|
|
|
drop view v1AA;
|
|
|
|
drop table t1Aa;
|