~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
#
2
# Test some error conditions
3
#
4
5
--disable_warnings
6
drop table if exists t1;
7
--enable_warnings
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
8
--error ER_NO_SUCH_TABLE
1 by brian
clean slate
9
insert into t1 values(1);
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
10
--error ER_NO_SUCH_TABLE
1 by brian
clean slate
11
delete from t1;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
12
--error ER_NO_SUCH_TABLE
1 by brian
clean slate
13
update t1 set a=1;
14
create table t1 (a int);
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
15
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
16
select count(test.t1.b) from t1;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
17
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
18
select count(not_existing_database.t1) from t1;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
19
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
20
select count(not_existing_database.t1.a) from t1;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
21
--error ER_DBACCESS_DENIED_ERROR, ER_NO_SUCH_TABLE
1 by brian
clean slate
22
select count(not_existing_database.t1.a) from not_existing_database.t1;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
23
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
24
select 1 from t1 order by 2;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
25
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
26
select 1 from t1 group by 2;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
27
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
28
select 1 from t1 order by t1.b;
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
29
--error ER_BAD_FIELD_ERROR
1 by brian
clean slate
30
select count(*),b from t1;
31
drop table t1;
32
33
# End of 4.1 tests
34
35
#
36
# Bug #6080: Error message for a field with a display width that is too long
37
#
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
38
--error ER_PARSE_ERROR
1 by brian
clean slate
39
create table t1 (a int(256));
1731.3.1 by Lee Bieber
change tests to use enum values instead of error numbers
40
--error ER_TOO_BIG_FIELDLENGTH
1 by brian
clean slate
41
create table t1 (a varchar(66000));
42
43
#
44
# Bug #27513: mysql 5.0.x + NULL pointer DoS
45
#
46
CREATE TABLE t1 (a INT);
47
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
48
INSERT INTO t1 VALUES(1);
49
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
50
INSERT INTO t1 VALUES(2),(3);
51
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
52
DROP TABLE t1;
53
54
#
55
# Bug #28677: SELECT on missing column gives extra error
56
#
57
CREATE TABLE t1( a INT );
58
--error ER_BAD_FIELD_ERROR
59
SELECT b FROM t1;
60
SHOW ERRORS;
61
--error ER_BAD_FIELD_ERROR
62
CREATE TABLE t2 SELECT b FROM t1;
63
SHOW ERRORS;
64
--error ER_BAD_FIELD_ERROR
65
INSERT INTO t1 SELECT b FROM t1;
66
DROP TABLE t1;
67
# End of 5.0 tests