7 set global init_connect="set @a=2;set @b=3";
11 set GLOBAL init_connect=DEFAULT;
15 set global init_connect="drop table if exists t1; create table t1(a char(10));\
16 insert into t1 values ('\0');insert into t1 values('abc')";
17 select hex(a) from t1;
21 set GLOBAL init_connect="adsfsdfsdfs";
23 ERROR 08S01: Aborted connection to db: 'test' user: 'user_1' host: 'localhost' (init_connect command failed)
25 Got one of the listed errors
28 create table t1 (x int);
29 insert into t1 values (3), (5), (7);
30 create table t2 (y int);
31 create user mysqltest1@localhost;
32 grant all privileges on test.* to mysqltest1@localhost;
33 set global init_connect="create procedure p1() select * from t1";
40 set global init_connect="create procedure p1(x int)\
42 select count(*) from t1;\
56 set global init_connect="call p1(4711)";
60 set global init_connect="drop procedure if exists p1";
62 ERROR 42000: PROCEDURE test.p1 does not exist
63 create procedure p1(out sum int)
65 declare n int default 0;
66 declare c cursor for select * from t1;
67 declare exit handler for not found
83 set global init_connect="call p1(@sum)";
88 create procedure p1(tbl char(10), v int)
90 set @s = concat('insert into ', tbl, ' values (?)');
92 prepare stmt1 from @s;
93 execute stmt1 using @v;
94 deallocate prepare stmt1;
96 set global init_connect="call p1('t1', 11)";
104 create function f1() returns int
107 select count(*) into n from t1;
110 set global init_connect="set @x = f1()";
114 set global init_connect="create view v1 as select f1()";
118 set global init_connect="drop view v1";
120 ERROR 42S02: Table 'test.v1' doesn't exist
125 insert into t1 values (new.y);
126 set global init_connect="insert into t2 values (13), (17), (19)";
137 set global init_connect="set @a='a\\0c'";
138 revoke all privileges, grant option from mysqltest1@localhost;
139 drop user mysqltest1@localhost;