diff options
author | unknown <bell@sanja.is.com.ua> | 2005-01-17 01:18:08 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-01-17 01:18:08 +0200 |
commit | 8002f008e98ecb68dc3e88c1fb6fcaba8702fd08 (patch) | |
tree | 081dcdf4ee59b18544a590017853f6e6fbb2e054 /mysql-test/t/rpl_view.test | |
parent | 4db9aaeea7e8ffce21740913071d58793340af3d (diff) | |
download | mariadb-git-8002f008e98ecb68dc3e88c1fb6fcaba8702fd08.tar.gz |
added replication of VIEW DDL commands (BUG#4838)
sql/sql_acl.cc:
filling privileges for slave thread fixed
sql/sql_parse.cc:
added writing to binary log view DDL commands
Diffstat (limited to 'mysql-test/t/rpl_view.test')
-rw-r--r-- | mysql-test/t/rpl_view.test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_view.test b/mysql-test/t/rpl_view.test new file mode 100644 index 00000000000..c50e9fc6dc9 --- /dev/null +++ b/mysql-test/t/rpl_view.test @@ -0,0 +1,44 @@ +source include/master-slave.inc; +--disable_warnings +drop table if exists t1,v1; +drop view if exists t1,v1; +sync_slave_with_master; +--enable_warnings + +# +# Check that createion drop of view is replicated, also check replication of +# updating of view +# +connection master; +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; +sync_slave_with_master; +# view already have to be on slave +select * from v1 order by a; +connection master; +update v1 set a=3 where a=1; +select * from v1 order by a; +sync_slave_with_master; +select * from v1 order by a; +connection master; +delete from v1 where a=2; +select * from v1 order by a; +sync_slave_with_master; +select * from v1 order by a; +connection master; +# 'alter view' internally maped to creation, but still check that it works +alter view v1 as select a as b from t1; +sync_slave_with_master; +select * from v1 order by 1; +connection master; +drop view v1; +sync_slave_with_master; +#error, because view have to be removed from slave +-- error 1146 +select * from v1 order by a; +connection master; +drop table t1; +sync_slave_with_master; |