summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl000001.result
blob: eef986d8f8cfa4ea684cb9e6f3a889cabc7b411c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1;
select * from t1 limit 10;
word
Aarhus
Aaron
Ababa
aback
abaft
abandon
abandoned
abandoning
abandonment
abandons
stop slave;
set password for root@"localhost" = password('foo');
start slave;
set password for root@"localhost" = password('');
create table t3(n int);
insert into t3 values(1),(2);
select * from t3;
n
1
2
select sum(length(word)) from t1;
sum(length(word))
1022
drop table t1,t3;
reset master;
stop slave;
reset slave;
create table t1(n int);
select get_lock("hold_slave",10);
get_lock("hold_slave",10)
1
explain extended select get_lock("hold_slave",10);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
Warnings:
Note	1003	select sql_no_cache get_lock(_latin1'hold_slave',10) AS `get_lock("hold_slave",10)`
start slave;
select release_lock("hold_slave");
release_lock("hold_slave")
1
explain extended select release_lock("hold_slave");
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
Warnings:
Note	1003	select sql_no_cache release_lock(_latin1'hold_slave') AS `release_lock("hold_slave")`
unlock tables;
create table t2(id int);
insert into t2 values(connection_id());
create temporary table t3(n int);
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
 update t1 set n = n + get_lock('crash_lock%20C', 2);
select (@id := id) - id from t2;
(@id := id) - id
0
kill @id;
drop table t2;
ERROR 08S01: Server shutdown in progress
set global sql_slave_skip_counter=1;
start slave;
select count(*) from t1;
count(*)
5000
drop table t1;
create table t1 (n int);
insert into t1 values(3456);
insert into mysql.user (Host, User, Password)
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
select select_priv,user from mysql.user where user = _binary'blafasel2';
select_priv	user
N	blafasel2
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
select select_priv,user from mysql.user where user = _binary'blafasel2';
select_priv	user
Y	blafasel2
select n from t1;
n
3456
select select_priv,user from mysql.user where user = _binary'blafasel2';
select_priv	user
Y	blafasel2
drop table t1;