~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
2140.1.2 by Brian Aker
Merge in decomplication of our error system when reading through the table
8
--error ER_TABLE_UNKNOWN
1 by brian
clean slate
9
insert into t1 values(1);
2140.1.2 by Brian Aker
Merge in decomplication of our error system when reading through the table
10
--error ER_TABLE_UNKNOWN
1 by brian
clean slate
11
delete from t1;
2140.1.2 by Brian Aker
Merge in decomplication of our error system when reading through the table
12
--error ER_TABLE_UNKNOWN
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;
2187.7.5 by Brian Aker
Merge in modifications such that we check both schema and table for
21
--error ER_DBACCESS_DENIED_ERROR, ER_TABLE_UNKNOWN,ER_SCHEMA_DOES_NOT_EXIST
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_TOO_BIG_FIELDLENGTH
1 by brian
clean slate
39
create table t1 (a varchar(66000));
40
41
#
42
# Bug #27513: mysql 5.0.x + NULL pointer DoS
43
#
44
CREATE TABLE t1 (a INT);
1812.4.2 by Brian Aker
Fix issue with divide by zero not being an error.
45
--error ER_DIVISION_BY_ZERO
1 by brian
clean slate
46
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
47
INSERT INTO t1 VALUES(1);
1812.4.2 by Brian Aker
Fix issue with divide by zero not being an error.
48
--error ER_DIVISION_BY_ZERO
1 by brian
clean slate
49
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
50
INSERT INTO t1 VALUES(2),(3);
1812.4.2 by Brian Aker
Fix issue with divide by zero not being an error.
51
--error ER_DIVISION_BY_ZERO
1 by brian
clean slate
52
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
53
DROP TABLE t1;
54
55
#
56
# Bug #28677: SELECT on missing column gives extra error
57
#
58
CREATE TABLE t1( a INT );
59
--error ER_BAD_FIELD_ERROR
60
SELECT b FROM t1;
61
SHOW ERRORS;
62
--error ER_BAD_FIELD_ERROR
63
CREATE TABLE t2 SELECT b FROM t1;
64
SHOW ERRORS;
65
--error ER_BAD_FIELD_ERROR
66
INSERT INTO t1 SELECT b FROM t1;
67
DROP TABLE t1;
68
# End of 5.0 tests