mariadb/mysql-test/t/init_connect.test
monty@mysql.com 0279dc4234 Portability fixes found during 5.0 test compilation
Fixed bug in ORDER BY on a small column (Bug #2147)
Fixed error from pthread_mutex_destroy() when one had wrong errmsg file
2003-12-21 19:39:32 +02:00

34 lines
789 B
Text

#
# Test of init_connect variable
#
connect (con0,localhost,root,,);
connection con0;
select hex(@a);
connect (con1,localhost,user_1,,);
connection con1;
select hex(@a);
connection con0;
set global init_connect="set @a=2;set @b=3";
connect (con2,localhost,user_1,,);
connection con2;
select @a, @b;
connection con0;
set GLOBAL init_connect=DEFAULT;
connect (con3,localhost,user_1,,);
connection con3;
select @a;
connection con0;
set global init_connect="create table t1(a char(10));\
insert into t1 values ('\0');insert into t1 values('abc')";
connect (con4,localhost,user_1,,);
connection con4;
select hex(a) from t1;
connection con0;
set GLOBAL init_connect="adsfsdfsdfs";
connect (con5,localhost,user_1,,);
connection con5;
--error 2013,2006
select @a;
connection con0;
drop table t1;