rpl_view.result
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· RESULT 代码 · 共 116 行
RESULT
116 行
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;reset 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;a12select * from v1 order by a;a12update v1 set a=3 where a=1;select * from v1 order by a;a23select * from v1 order by a;a23delete from v1 where a=2;select * from v1 order by a;a3select * from v1 order by a;a3alter view v1 as select a as b from t1;select * from v1 order by 1;b3drop view v1;select * from v1 order by a;ERROR 42S02: Table 'test.v1' doesn't existdrop table t1;show binlog events limit 1,100;Log_name Pos Event_type Server_id End_log_pos Infoslave-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 t1slave-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=1slave-bin.000001 # Query 1 # use `test`; delete from v1 where a=2slave-bin.000001 # Query 1 # use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select a as b from t1slave-bin.000001 # Query 1 # use `test`; drop view v1slave-bin.000001 # Query 1 # use `test`; drop table t1---> Test for BUG#20438---> Preparing environment...---> connection: masterDROP TABLE IF EXISTS t1;DROP VIEW IF EXISTS v1;---> Synchronizing slave with master...---> connection: master---> Creating objects...CREATE TABLE t1(c INT);/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */;---> Inserting value...INSERT INTO t1 VALUES(1);---> Checking on master...SELECT * FROM t1;c1---> Synchronizing slave with master...---> connection: master---> Checking on slave...SELECT * FROM t1;c1---> connection: master---> Cleaning up...DROP VIEW v1;DROP TABLE t1;create table t1(a int, b int);insert into t1 values (1, 1), (1, 2), (1, 3);create view v1(a, b) as select a, sum(b) from t1 group by a;explain v1;Field Type Null Key Default Extraa int(11) YES NULL b decimal(32,0) YES NULL show create table v1;View Create Viewv1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a`select * from v1;a b1 6drop table t1;drop view v1;CREATE TABLE t1(a INT);CREATE VIEW v1 AS SELECT * FROM t1;CREATE VIEW v1 AS SELECT * FROM t1;ERROR 42S01: Table 'v1' already existsDROP VIEW v1;DROP TABLE t1;End of 5.0 tests
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?