errors.result 4.3 KB
Newer Older
1 2
drop table if exists t1;
insert into t1 values(1);
3
ERROR 42S02: Table 'test.t1' doesn't exist
4
delete from t1;
5
ERROR 42S02: Table 'test.t1' doesn't exist
6
update t1 set a=1;
7
ERROR 42S02: Table 'test.t1' doesn't exist
8 9
create table t1 (a int);
select count(test.t1.b) from t1;
10
ERROR 42S22: Unknown column 'test.t1.b' in 'field list'
11
select count(not_existing_database.t1) from t1;
12
ERROR 42S22: Unknown column 'not_existing_database.t1' in 'field list'
13
select count(not_existing_database.t1.a) from t1;
14
ERROR 42S22: Unknown column 'not_existing_database.t1.a' in 'field list'
15
select count(not_existing_database.t1.a) from not_existing_database.t1;
16
Got one of the listed errors
17
select 1 from t1 order by 2;
18
ERROR 42S22: Unknown column '2' in 'order clause'
19
select 1 from t1 group by 2;
20
ERROR 42S22: Unknown column '2' in 'group statement'
21
select 1 from t1 order by t1.b;
22
ERROR 42S22: Unknown column 't1.b' in 'order clause'
23
select count(*),b from t1;
24
ERROR 42S22: Unknown column 'b' in 'field list'
25
drop table t1;
26 27 28 29 30
create table t1 (a int(256));
ERROR 42000: Display width out of range for column 'a' (max = 255)
set sql_mode='traditional';
create table t1 (a varchar(66000));
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
31
set sql_mode=default;
32 33 34 35 36 37 38 39 40 41 42 43
CREATE TABLE t1 (a INT);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
a
INSERT INTO t1 VALUES(1);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
a
1
INSERT INTO t1 VALUES(2),(3);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
a
1
DROP TABLE t1;
44 45 46 47 48 49 50 51 52 53 54 55 56 57
CREATE TABLE t1( a INT );
SELECT b FROM t1;
ERROR 42S22: Unknown column 'b' in 'field list'
SHOW ERRORS;
Level	Code	Message
Error	1054	Unknown column 'b' in 'field list'
CREATE TABLE t2 SELECT b FROM t1;
ERROR 42S22: Unknown column 'b' in 'field list'
SHOW ERRORS;
Level	Code	Message
Error	1054	Unknown column 'b' in 'field list'
INSERT INTO t1 SELECT b FROM t1;
ERROR 42S22: Unknown column 'b' in 'field list'
DROP TABLE t1;
58 59 60 61 62 63
flush status;
drop table if exists t1, t2;
create table t1 (a int unique);
create table t2 (a int);
drop function if exists f1;
Warnings:
64
Note	1305	FUNCTION test.f1 does not exist
65 66
drop function if exists f2;
Warnings:
67
Note	1305	FUNCTION test.f2 does not exist
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 93
create function f1() returns int
begin
insert into t1 (a) values (1);
insert into t1 (a) values (1);
return 1;
end|
create function f2() returns int
begin
insert into t2 (a) values (1);
return 2;
end|
flush status;
select f1(), f2();
ERROR 23000: Duplicate entry '1' for key 'a'
show status like 'Com_insert';
Variable_name	Value
Com_insert	2
select * from t1;
a
1
select * from t2;
a
drop table t1;
drop table t2;
drop function f1;
drop function f2;
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
SET NAMES utf8;
SET sql_quote_show_create= _binary x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
SET sql_quote_show_create= _utf8 x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create=_latin1 x'5452DC45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create='TRÜE';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create=TRÜE;
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET NAMES latin1;
SET sql_quote_show_create= _binary x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
SET sql_quote_show_create= _utf8 x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRE'
SET sql_quote_show_create=_latin1 x'5452DC45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRE'
112 113 114 115
SET sql_quote_show_create='TRE';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRE'
SET sql_quote_show_create=TRE;
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRE'
116 117 118 119 120 121 122
SET NAMES binary;
SET sql_quote_show_create= _binary x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TR\xC3\x9CE'
SET sql_quote_show_create= _utf8 x'5452C39C45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
SET sql_quote_show_create=_latin1 x'5452DC45';
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'