init_connect.result
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· RESULT 代码 · 共 139 行
RESULT
139 行
select hex(@a);hex(@a)NULLselect hex(@a);hex(@a)610063set global init_connect="set @a=2;set @b=3";select @a, @b;@a @b2 3set GLOBAL init_connect=DEFAULT;select @a;@aNULLset global init_connect="drop table if exists t1; create table t1(a char(10));\insert into t1 values ('\0');insert into t1 values('abc')";select hex(a) from t1;hex(a)00616263set GLOBAL init_connect="adsfsdfsdfs";select @a;Got one of the listed errorsdrop table t1;End of 4.1 testscreate table t1 (x int);insert into t1 values (3), (5), (7);create table t2 (y int);create user mysqltest1@localhost;grant all privileges on test.* to mysqltest1@localhost;set global init_connect="create procedure p1() select * from t1";call p1();x357drop procedure p1;set global init_connect="create procedure p1(x int)\begin\ select count(*) from t1;\ select * from t1;\ set @x = x;end";call p1(42);count(*)3x357select @x;@x42set global init_connect="call p1(4711)";select @x;@x4711set global init_connect="drop procedure if exists p1";call p1();ERROR 42000: PROCEDURE test.p1 does not existcreate procedure p1(out sum int)begindeclare n int default 0;declare c cursor for select * from t1;declare exit handler for not foundbeginclose c;set sum = n;end;open c;loopbegindeclare x int;fetch c into x;if x > 3 thenset n = n + x;end if;end;end loop;end|set global init_connect="call p1(@sum)";select @sum;@sum12drop procedure p1;create procedure p1(tbl char(10), v int)beginset @s = concat('insert into ', tbl, ' values (?)');set @v = v;prepare stmt1 from @s;execute stmt1 using @v;deallocate prepare stmt1;end|set global init_connect="call p1('t1', 11)";select * from t1;x35711drop procedure p1;create function f1() returns intbegindeclare n int;select count(*) into n from t1;return n;end|set global init_connect="set @x = f1()";select @x;@x4set global init_connect="create view v1 as select f1()";select * from v1;f1()4set global init_connect="drop view v1";select * from v1;ERROR 42S02: Table 'test.v1' doesn't existdrop function f1;create trigger trg1after insert on t2for each rowinsert into t1 values (new.y);set global init_connect="insert into t2 values (13), (17), (19)";select * from t1;x35711131719drop trigger trg1;set global init_connect="set @a='a\\0c'";revoke all privileges, grant option from mysqltest1@localhost;drop user mysqltest1@localhost;drop table t1, t2;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?