-
Notifications
You must be signed in to change notification settings - Fork 63
/
example.test
50 lines (35 loc) · 1.06 KB
/
example.test
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
create table t(a bigint, b bigint);
insert into t values(1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
select * from t where a = 1;
--error ER_NO_SUCH_TABLE
SELECT 1 FROM NON_EXISTING_TABLE;
--error 0,ER_NO_SUCH_TABLE
SELECT 2 FROM NON_EXISTING_TABLE;
--error ER_NO_SUCH_TABLE,0
SELECT 3 FROM NON_EXISTING_TABLE;
--error 0,ER_NO_SUCH_TABLE
SELECT 4;
--error ER_NO_SUCH_TABLE,0
SELECT 5;
--error 0
SELECT 6;
--error ER_PARSE_ERROR
1 SELECT;
--error 0,ER_PARSE_ERROR
2 SELECT;
-- error ER_PARSE_ERROR , 0
3 SELECT;
--replace_regex /:[ ]?[.0-9]+.*?,/:<num>,/ /:[ ]?[.0-9]+.*?}/:<num>}/ /[0-9]+ Bytes/<num> Bytes/
explain analyze format='brief' select * from t;
--replace_regex /:[ ]?[.0-9]+.*?,/:<num>,/ /:[ ]?[.0-9]+.*?}/:<num>}/ /[0-9]+ Bytes/<num> Bytes/
explain analyze select * from t;
--enable_info
insert into t values (6, 6);
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT NOT NULL UNIQUE);
INSERT t1 VALUES (1, 1);
INSERT t1 VALUES (1, 1), (1, 1) ON DUPLICATE KEY UPDATE f1 = 2, f2 = 2;
--disable_info
--let $a=`select 1`
--echo $a
use `test`;;