1
by brian
clean slate |
1 |
#
|
2 |
# Test of init_connect variable
|
|
3 |
#
|
|
4 |
||
5 |
connect (con0,localhost,root,,); |
|
6 |
connection con0; |
|
7 |
select hex(@a); |
|
8 |
connect (con1,localhost,user_1,,); |
|
9 |
connection con1; |
|
10 |
select hex(@a); |
|
11 |
connection con0; |
|
12 |
set global init_connect="set @a=2;set @b=3"; |
|
13 |
connect (con2,localhost,user_1,,); |
|
14 |
connection con2; |
|
15 |
select @a, @b; |
|
16 |
connection con0; |
|
17 |
set GLOBAL init_connect=DEFAULT; |
|
18 |
connect (con3,localhost,user_1,,); |
|
19 |
connection con3; |
|
20 |
select @a; |
|
21 |
connection con0; |
|
22 |
set global init_connect="drop table if exists t1; create table t1(a char(10));\ |
|
23 |
insert into t1 values ('\0');insert into t1 values('abc')"; |
|
24 |
connect (con4,localhost,user_1,,); |
|
25 |
connection con4; |
|
26 |
select hex(a) from t1; |
|
27 |
connection con0; |
|
28 |
set GLOBAL init_connect="adsfsdfsdfs"; |
|
29 |
connect (con5,localhost,user_1,,); |
|
30 |
connection con5; |
|
31 |
--error 2013,2006 |
|
32 |
select @a; |
|
33 |
connection con0; |
|
34 |
drop table t1; |
|
35 |
||
36 |
disconnect con1; |
|
37 |
disconnect con2; |
|
38 |
disconnect con3; |
|
39 |
disconnect con4; |
|
40 |
disconnect con5; |
|
41 |
||
42 |
--echo End of 4.1 tests |
|
43 |
#
|
|
44 |
# Test 5.* features
|
|
45 |
#
|
|
46 |
||
774
by Brian Aker
Fix init_connect test. |
47 |
set GLOBAL init_connect=DEFAULT; |