mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
f68085c4e7
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921: Auto merged BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56: Auto merged BitKeeper/deleted/.del-mysys.dsp~32695fee91189326: Auto merged BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833: Auto merged BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048: Auto merged BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f: Auto merged client/mysql.cc: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqlcheck.c: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged dbug/dbug.c: Auto merged extra/perror.c: Auto merged extra/yassl/src/yassl_imp.cpp: Auto merged extra/yassl/src/yassl_int.cpp: Auto merged include/mysql.h: Auto merged include/mysql_com.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/r/cast.result: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/r/federated.result: Auto merged mysql-test/r/func_compress.result: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/gis-rtree.result: Auto merged mysql-test/r/gis.result: Auto merged mysql-test/r/im_daemon_life_cycle.result: Auto merged mysql-test/r/im_utils.result: Auto merged mysql-test/r/join_outer.result: Auto merged mysql-test/r/mysqlcheck.result: Auto merged mysql-test/r/rpl_sp.result: Auto merged mysql-test/r/rpl_trigger.result: Auto merged mysql-test/r/sp-code.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/r/strict.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/r/type_datetime.result: Auto merged mysql-test/r/type_ranges.result: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/r/user_var.result: Auto merged mysql-test/t/cast.test: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/func_group.test: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/im_daemon_life_cycle.imtest: Auto merged mysql-test/t/im_life_cycle.imtest: Auto merged mysql-test/t/im_utils.imtest: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/mysqlbinlog.test: Auto merged mysql-test/t/mysqlcheck.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/rpl_trigger.test: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/t/udf.test: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.h: Auto merged sql/item_timefunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/protocol.cc: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_udf.cc: Auto merged sql/sql_view.cc: Auto merged sql/table.cc: Auto merged sql-common/client.c: Auto merged sql-common/my_time.c: Auto merged sql/table.h: Auto merged storage/ndb/src/kernel/error/ndbd_exit_codes.c: Auto merged storage/ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged mysql-test/r/im_life_cycle.result: e use local mysql-test/r/ps.result: use local client/Makefile.am: Manual merge. client/mysqlimport.c: Manual merge. configure.in: Manual merge. mysql-test/mysql-test-run.pl: Manual merge. mysql-test/r/mysqldump.result: Manual merge. mysql-test/r/mysqltest.result: Manual merge. mysql-test/r/ndb_basic.result: Manual merge. mysql-test/r/rpl_view.result: Manual merge. mysql-test/r/show_check.result: Manual merge. mysql-test/r/sp-error.result: Manual merge. mysql-test/r/sp.result: Manual merge. mysql-test/r/union.result: Manual merge. mysql-test/t/mysqldump.test: Manual merge. mysql-test/t/mysqltest.test: Manual merge. mysql-test/t/ndb_basic.test: Manual merge. mysql-test/t/rpl_sp.test: Manual merge. mysql-test/t/rpl_view.test: Manual merge. mysql-test/t/show_check.test: Manual merge. mysql-test/t/sp-error.test: Manual merge. mysql-test/t/sp.test: Manual merge. sql/item_sum.cc: Manual merge. sql/mysql_priv.h: Manual merge. sql/sp_head.cc: Manual merge. sql/sql_db.cc: Manual merge. sql/sql_delete.cc: Manual merge. sql/sql_lex.h: Manual merge. sql/sql_show.cc: Manual merge. sql/sql_table.cc: Manual merge. sql/sql_trigger.cc: Manual merge. sql/sql_yacc.yy: Manual merge. tests/mysql_client_test.c: Manual merge.
135 lines
2.5 KiB
Text
135 lines
2.5 KiB
Text
# NYI - row-based cannot use CREATE ... SELECT
|
|
|
|
source include/master-slave.inc;
|
|
--disable_warnings
|
|
drop table if exists t1,v1;
|
|
drop view if exists t1,v1;
|
|
sync_slave_with_master;
|
|
reset master;
|
|
--enable_warnings
|
|
|
|
#
|
|
# Check that creation 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;
|
|
# Change Author: JBM
|
|
# Change Date: 2005-12-22
|
|
# Change: Commented out binlog events to work with SBR and RBR
|
|
#--replace_column 2 # 5 #
|
|
# show binlog events limit 1,100;
|
|
|
|
#
|
|
# BUG#20438: CREATE statements for views, stored routines and triggers can be
|
|
# not replicable.
|
|
#
|
|
|
|
--echo
|
|
--echo ---> Test for BUG#20438
|
|
|
|
# Prepare environment.
|
|
|
|
--echo
|
|
--echo ---> Preparing environment...
|
|
--echo ---> connection: master
|
|
--connection master
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
DROP VIEW IF EXISTS v1;
|
|
--enable_warnings
|
|
|
|
--echo
|
|
--echo ---> Synchronizing slave with master...
|
|
|
|
--save_master_pos
|
|
--connection slave
|
|
--sync_with_master
|
|
|
|
--echo
|
|
--echo ---> connection: master
|
|
--connection master
|
|
|
|
# Test.
|
|
|
|
--echo
|
|
--echo ---> Creating objects...
|
|
|
|
CREATE TABLE t1(c INT);
|
|
|
|
/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */;
|
|
|
|
--echo
|
|
--echo ---> Inserting value...
|
|
|
|
INSERT INTO t1 VALUES(1);
|
|
|
|
--echo
|
|
--echo ---> Checking on master...
|
|
|
|
SELECT * FROM t1;
|
|
|
|
--echo
|
|
--echo ---> Synchronizing slave with master...
|
|
|
|
--save_master_pos
|
|
--connection slave
|
|
--sync_with_master
|
|
|
|
--echo ---> connection: master
|
|
|
|
--echo
|
|
--echo ---> Checking on slave...
|
|
|
|
SELECT * FROM t1;
|
|
|
|
# Cleanup.
|
|
|
|
--echo
|
|
--echo ---> connection: master
|
|
--connection master
|
|
|
|
--echo
|
|
--echo ---> Cleaning up...
|
|
|
|
DROP VIEW v1;
|
|
DROP TABLE t1;
|
|
|
|
--save_master_pos
|
|
--connection slave
|
|
--sync_with_master
|
|
--connection master
|
|
|
|
--echo End of 5.0 tests
|