2005-01-17 00:18:08 +01:00
|
|
|
stop slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
reset master;
|
|
|
|
reset slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
start slave;
|
|
|
|
drop table if exists t1,v1;
|
|
|
|
drop view if exists t1,v1;
|
2005-09-14 09:53:09 +02:00
|
|
|
reset master;
|
2005-01-17 00:18:08 +01:00
|
|
|
create table t1 (a int);
|
|
|
|
insert into t1 values (1);
|
|
|
|
create view v1 as select a from t1;
|
|
|
|
insert into v1 values (2);
|
|
|
|
select * from v1 order by a;
|
|
|
|
a
|
|
|
|
1
|
|
|
|
2
|
|
|
|
select * from v1 order by a;
|
|
|
|
a
|
|
|
|
1
|
|
|
|
2
|
|
|
|
update v1 set a=3 where a=1;
|
|
|
|
select * from v1 order by a;
|
|
|
|
a
|
|
|
|
2
|
|
|
|
3
|
|
|
|
select * from v1 order by a;
|
|
|
|
a
|
|
|
|
2
|
|
|
|
3
|
|
|
|
delete from v1 where a=2;
|
|
|
|
select * from v1 order by a;
|
|
|
|
a
|
|
|
|
3
|
|
|
|
select * from v1 order by a;
|
|
|
|
a
|
|
|
|
3
|
|
|
|
alter view v1 as select a as b from t1;
|
|
|
|
select * from v1 order by 1;
|
|
|
|
b
|
|
|
|
3
|
|
|
|
drop view v1;
|
|
|
|
select * from v1 order by a;
|
|
|
|
ERROR 42S02: Table 'test.v1' doesn't exist
|
|
|
|
drop table t1;
|
2005-09-14 22:12:01 +02:00
|
|
|
show binlog events limit 1,100;
|
2005-09-14 09:53:09 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; create table t1 (a int)
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; insert into t1 values (1)
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY DEFINER VIEW v1 AS select a from t1
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; insert into v1 values (2)
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; update v1 set a=3 where a=1
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; delete from v1 where a=2
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=root@localhost SQL SECURITY DEFINER VIEW v1 AS select a as b from t1
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; drop view v1
|
|
|
|
slave-bin.000001 # Query 1 # use `test`; drop table t1
|