1
# Check for error if no parameter provided
2
create database authz_no;
3
--error ER_NO_SUCH_TABLE
4
SELECT * from authz_no.dont_exist;
5
create database authz_yes;
7
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
8
connect (should_succeed,localhost,authz,test,,);
9
connection should_succeed;
11
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
12
--replace_regex /@'.*?'/@'LOCALHOST'/
13
--error ER_DBACCESS_DENIED_ERROR
14
SELECT * from authz_no.dont_exist;
15
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
16
--replace_regex /@'.*?'/@'LOCALHOST'/
17
--error ER_DBACCESS_DENIED_ERROR
18
create database authz_no;
19
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
20
--replace_regex /@'.*?'/@'LOCALHOST'/
21
--error ER_DBACCESS_DENIED_ERROR
22
drop database authz_no;
24
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
25
connect (con1,localhost,root,test,,);
26
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
27
connect (con2,localhost,root,test,,);
30
--replace_column 3 # 5 # 6 # 7 #
34
create table t1 (kill_id int);
35
insert into t1 values(connection_id());
38
select ((@id := kill_id) - kill_id) from t1;
46
# One of the following statements should fail
55
select ((@id := kill_id) - kill_id) from t1;
56
select @id != connection_id();
58
update t1 set kill_id= connection_id();
60
connection should_succeed;
61
--replace_column 3 # 6 #
63
select ((@id := kill_id) - kill_id) from t1;
65
--error ER_NO_SUCH_THREAD
71
# Test failing initial connection
72
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
73
--replace_regex /@'.*?'/@'LOCALHOST'/
74
--error ER_DBACCESS_DENIED_ERROR
75
connect (should_fail,localhost,authz,,authz_no,,);
79
drop schema authz_yes;