summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/auto_increment.result2
-rw-r--r--mysql-test/r/create.result4
-rw-r--r--mysql-test/r/ctype_collate.result74
-rw-r--r--mysql-test/r/group_by.result58
-rw-r--r--mysql-test/r/heap.result6
-rw-r--r--mysql-test/r/heap_btree.result6
-rw-r--r--mysql-test/r/heap_hash.result6
-rw-r--r--mysql-test/r/isam.result14
-rw-r--r--mysql-test/r/key.result12
-rw-r--r--mysql-test/r/myisam.result28
-rw-r--r--mysql-test/r/null.result16
-rw-r--r--mysql-test/r/null_key.result2
-rw-r--r--mysql-test/r/order_by.result5
-rw-r--r--mysql-test/r/rpl_loaddata.result2
-rw-r--r--mysql-test/r/subselect.result6
-rw-r--r--mysql-test/r/type_decimal.result78
-rw-r--r--mysql-test/r/type_float.result3
-rw-r--r--mysql-test/r/type_ranges.result37
-rw-r--r--mysql-test/r/type_time.result4
-rw-r--r--mysql-test/r/type_uint.result2
-rw-r--r--mysql-test/r/variables.result6
-rw-r--r--mysql-test/r/warnings.result85
-rw-r--r--mysql-test/std_data/rpl_loaddata2.dat8
-rw-r--r--mysql-test/std_data/warnings_loaddata.dat8
-rw-r--r--mysql-test/t/ctype_collate.test46
-rw-r--r--mysql-test/t/ctype_latin1_de-master.opt2
-rw-r--r--mysql-test/t/ctype_many.test3
-rw-r--r--mysql-test/t/rpl_loaddata.test3
-rw-r--r--mysql-test/t/variables.test4
-rw-r--r--mysql-test/t/warnings.test49
30 files changed, 467 insertions, 112 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index 2facb504294..c993a47198a 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -124,6 +124,8 @@ select last_insert_id();
last_insert_id()
255
insert into t1 set i = null;
+Warnings:
+Warning 1262 Data truncated, out of range for column 'i' at row 1
select last_insert_id();
last_insert_id()
255
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 4e06c724142..b39bb96e36a 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -9,6 +9,8 @@ drop table if exists t1;
create table t1 (b char(0) not null);
create table if not exists t1 (b char(0) not null);
insert into t1 values (""),(null);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
select * from t1;
b
@@ -300,7 +302,7 @@ SELECT @@table_type;
GEMINI
CREATE TABLE t1 (a int not null);
Warnings:
-Warning 1259 Using storage engine MYISAM for table 't1'
+Warning 1264 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result
index 6e09cff7fd8..e06651da30e 100644
--- a/mysql-test/r/ctype_collate.result
+++ b/mysql-test/r/ctype_collate.result
@@ -4,7 +4,7 @@ CREATE TABLE t1 (
latin1_f CHAR(32) CHARACTER SET latin1 NOT NULL
);
CREATE TABLE t2 (
-latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r NOT NULL
+latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
);
COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
INSERT INTO t1 (latin1_f) VALUES (_latin1'A');
@@ -63,7 +63,7 @@ z
Ä
ä
ß
-SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1;
+SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_swedish_ci;
latin1_f
A
a
@@ -179,9 +179,9 @@ z
ä
å
ü
-SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE koi8r;
-COLLATION 'koi8r' is not valid for CHARACTER SET 'latin1'
-SELECT latin1_f COLLATE latin1 AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
+SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE koi8r_general_ci;
+COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
+SELECT latin1_f COLLATE latin1_swedish_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
latin1_f_as
A
a
@@ -297,8 +297,8 @@ z
ä
å
ü
-SELECT latin1_f COLLATE koi8r AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
-COLLATION 'koi8r' is not valid for CHARACTER SET 'latin1'
+SELECT latin1_f COLLATE koi8r_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
+COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f;
latin1_f count(*)
A 2
@@ -314,7 +314,7 @@ Z 2
Å 2
Ä 2
ß 1
-SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1;
+SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_swedish_ci;
latin1_f count(*)
A 2
AD 2
@@ -389,8 +389,8 @@ z 1
ä 1
å 1
ü 1
-SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE koi8r;
-COLLATION 'koi8r' is not valid for CHARACTER SET 'latin1'
+SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE koi8r_general_ci;
+COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
SELECT DISTINCT latin1_f FROM t1;
latin1_f
A
@@ -406,8 +406,8 @@ UE
SS
ß
Z
-SELECT DISTINCT latin1_f COLLATE latin1 FROM t1;
-latin1_f COLLATE latin1
+SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1;
+latin1_f COLLATE latin1_swedish_ci
A
AD
AE
@@ -511,64 +511,18 @@ SHOW FIELDS FROM t1;
Field Type Collation Null Key Default Extra
latin1_f char(32) latin1_bin YES NULL
SET CHARACTER SET 'latin1';
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client latin1_swedish_ci
-SET CHARACTER SET latin1;
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client latin1_swedish_ci
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client latin1_swedish_ci
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-charset('a') collation('a') coercibility('a') 'a'='A'
-latin1 latin1_swedish_ci 3 1
-SET CHARACTER SET latin1 COLLATE latin1_bin;
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client latin1_bin
-SET CHARACTER SET LATIN1 COLLATE Latin1_Bin;
-SHOW VARIABLES LIKE 'collation_client';
+SHOW VARIABLES LIKE 'character_set_client';
Variable_name Value
-collation_client latin1_bin
-SET CHARACTER SET 'latin1' COLLATE 'latin1_bin';
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client latin1_bin
+character_set_client latin1
SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
charset('a') collation('a') coercibility('a') 'a'='A'
latin1 latin1_swedish_ci 3 1
SET CHARACTER SET koi8r;
SHOW VARIABLES LIKE 'collation_client';
Variable_name Value
-collation_client koi8r_general_ci
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-charset('a') collation('a') coercibility('a') 'a'='A'
-latin1 latin1_swedish_ci 3 1
-SET CHARACTER SET koi8r COLLATE koi8r_bin;
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client koi8r_bin
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-charset('a') collation('a') coercibility('a') 'a'='A'
-latin1 latin1_swedish_ci 3 1
-SET CHARACTER SET koi8r COLLATE DEFAULT;
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client koi8r_general_ci
SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
charset('a') collation('a') coercibility('a') 'a'='A'
latin1 latin1_swedish_ci 3 1
-SET CHARACTER SET DEFAULT;
-SHOW VARIABLES LIKE 'collation_client';
-Variable_name Value
-collation_client latin1_swedish_ci
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-charset('a') collation('a') coercibility('a') 'a'='A'
-latin1 latin1_swedish_ci 3 1
-SET CHARACTER SET latin1 COLLATE koi8r;
-COLLATION 'koi8r_general_ci' is not valid for CHARACTER SET 'latin1'
SET CHARACTER SET 'DEFAULT';
Unknown character set: 'DEFAULT'
DROP TABLE t1;
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 2f9a55e0c42..9e89f2c0e5a 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -150,34 +150,92 @@ KEY qa_contact (qa_contact),
KEY votes (votes)
);
INSERT INTO t1 VALUES (1,0,0,'','normal','','2000-02-10 09:25:12',20000321114747,'','','Linux','P1','TestProduct','PC',3,'other','TestComponent','','M1',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (9,0,0,'','enhancement','','2000-03-10 11:49:36',20000321114747,'','','All','P5','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - conversion','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (10,0,0,'','enhancement','','2000-03-10 18:10:16',20000321114747,'','','All','P4','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - conversion','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (7,0,0,'','critical','','2000-03-09 10:50:21',20000321114747,'','','All','P1','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - generic','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (6,0,0,'','normal','','2000-03-09 10:42:44',20000321114747,'','','All','P2','AAAAA','PC',3,'2.00 CD - Pre','kkkkkkkkkkk lllllllllll','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (8,0,0,'','major','','2000-03-09 11:32:14',20000321114747,'','','All','P3','AAAAA','PC',3,'2.00 CD - Pre','kkkkkkkkkkk lllllllllll','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (5,0,0,'','enhancement','','2000-03-09 10:38:59',20000321114747,'','','All','P5','CCC/CCCCCC','PC',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (4,0,0,'','normal','','2000-03-08 18:32:14',20000321114747,'','','other','P2','TestProduct','Other',3,'other','TestComponent2','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (3,0,0,'','normal','','2000-03-08 18:30:52',20000321114747,'','','other','P2','TestProduct','Other',3,'other','TestComponent','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (2,0,0,'','enhancement','','2000-03-08 18:24:51',20000321114747,'','','All','P2','TestProduct','Other',4,'other','TestComponent2','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (11,0,0,'','blocker','','2000-03-13 09:43:41',20000321114747,'','','All','P2','CCC/CCCCCC','PC',5,'7.00','DDDDDDDDD','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (12,0,0,'','normal','','2000-03-13 16:14:31',20000321114747,'','','All','P2','AAAAA','PC',3,'2.00 CD - Pre','kkkkkkkkkkk lllllllllll','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (13,0,0,'','normal','','2000-03-15 16:20:44',20000321114747,'','','other','P2','TestProduct','Other',3,'other','TestComponent','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (14,0,0,'','blocker','','2000-03-15 18:13:47',20000321114747,'','','All','P1','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - generic','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (15,0,0,'','minor','','2000-03-16 18:03:28',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','DDDDDDDDD','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (16,0,0,'','normal','','2000-03-16 18:33:41',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (17,0,0,'','normal','','2000-03-16 18:34:18',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (18,0,0,'','normal','','2000-03-16 18:34:56',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (19,0,0,'','enhancement','','2000-03-16 18:35:34',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (20,0,0,'','enhancement','','2000-03-16 18:36:23',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (21,0,0,'','enhancement','','2000-03-16 18:37:23',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (22,0,0,'','enhancement','','2000-03-16 18:38:16',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (23,0,0,'','normal','','2000-03-16 18:58:12',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','DDDDDDDDD','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (24,0,0,'','normal','','2000-03-17 11:08:10',20000321114747,'','','All','P2','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (25,0,0,'','normal','','2000-03-17 11:10:45',20000321114747,'','','All','P2','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (26,0,0,'','normal','','2000-03-17 11:15:47',20000321114747,'','','All','P2','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (27,0,0,'','normal','','2000-03-17 17:45:41',20000321114747,'','','All','P2','CCC/CCCCCC','PC',5,'7.00','DDDDDDDDD','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (28,0,0,'','normal','','2000-03-20 09:51:45',20000321114747,'','','Windows NT','P2','TestProduct','PC',8,'other','TestComponent','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (29,0,0,'','normal','','2000-03-20 11:15:09',20000321114747,'','','All','P5','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
+Warnings:
+Warning 1263 Data truncated for column 'bug_status' at row 1
CREATE TABLE t2 (
value tinytext,
program varchar(64),
diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result
index 76022b66100..ab5870357f9 100644
--- a/mysql-test/r/heap.result
+++ b/mysql-test/r/heap.result
@@ -164,6 +164,12 @@ select * from t1 where btn like "q%";
btn
alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn;
update t1 set new_col=btn;
+Warnings:
+Warning 1263 Data truncated for column 'new_col' at row 1
+Warning 1263 Data truncated for column 'new_col' at row 2
+Warning 1263 Data truncated for column 'new_col' at row 3
+Warning 1263 Data truncated for column 'new_col' at row 4
+Warning 1263 Data truncated for column 'new_col' at row 5
explain select * from t1 where btn="a";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result
index bf24f78321f..7f6c9f8e591 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/r/heap_btree.result
@@ -180,6 +180,12 @@ select * from t1 where btn like "q%";
btn
alter table t1 add column new_col char(1) not null, add key using BTREE (btn,new_col), drop key btn;
update t1 set new_col=btn;
+Warnings:
+Warning 1263 Data truncated for column 'new_col' at row 1
+Warning 1263 Data truncated for column 'new_col' at row 2
+Warning 1263 Data truncated for column 'new_col' at row 3
+Warning 1263 Data truncated for column 'new_col' at row 4
+Warning 1263 Data truncated for column 'new_col' at row 5
explain select * from t1 where btn="a";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref btn btn 10 const 1 Using where
diff --git a/mysql-test/r/heap_hash.result b/mysql-test/r/heap_hash.result
index 3c2baa645f7..9554990aa34 100644
--- a/mysql-test/r/heap_hash.result
+++ b/mysql-test/r/heap_hash.result
@@ -164,6 +164,12 @@ select * from t1 where btn like "q%";
btn
alter table t1 add column new_col char(1) not null, add key using HASH (btn,new_col), drop key btn;
update t1 set new_col=btn;
+Warnings:
+Warning 1263 Data truncated for column 'new_col' at row 1
+Warning 1263 Data truncated for column 'new_col' at row 2
+Warning 1263 Data truncated for column 'new_col' at row 3
+Warning 1263 Data truncated for column 'new_col' at row 4
+Warning 1263 Data truncated for column 'new_col' at row 5
explain select * from t1 where btn="a";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where
diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result
index 7871e899773..6621be98073 100644
--- a/mysql-test/r/isam.result
+++ b/mysql-test/r/isam.result
@@ -1,5 +1,13 @@
drop table if exists t1,t2;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a)) type=isam;
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
delete from t1 where (a & 1);
select sum(length(b)) from t1;
sum(length(b))
@@ -49,14 +57,14 @@ test.t1 optimize status OK
check table t1,t2;
Table Op Msg_type Msg_text
test.t1 check status OK
-test.t2 check error The handler for the table doesn't support check
+test.t2 check error The storage enginge for the table doesn't support check
repair table t1,t2;
Table Op Msg_type Msg_text
test.t1 repair status OK
-test.t2 repair error The handler for the table doesn't support repair
+test.t2 repair error The storage enginge for the table doesn't support repair
check table t2,t1;
Table Op Msg_type Msg_text
-test.t2 check error The handler for the table doesn't support check
+test.t2 check error The storage enginge for the table doesn't support check
test.t1 check status OK
lock tables t1 write;
check table t2,t1;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 7fe7109699c..5060fbff5e8 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -32,6 +32,11 @@ KEY price (price,area,type,transityes,shopsyes,schoolsyes,petsyes)
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','','');
+Warnings:
+Warning 1263 Data truncated for column 'transityes' at row 1
+Warning 1263 Data truncated for column 'shopsyes' at row 1
+Warning 1263 Data truncated for column 'schoolsyes' at row 1
+Warning 1263 Data truncated for column 'petsyes' at row 1
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
@@ -89,9 +94,13 @@ INSERT t1 VALUES(NULL,'/');
INSERT t1 VALUES(NULL,'[T,U]_axpby');
SELECT * FROM t1 WHERE name='[T,U]_axpy';
name_id name
+Warnings:
+Warning 1263 Data truncated for column 'name' at row 1
SELECT * FROM t1 WHERE name='[T,U]_axpby';
name_id name
2 [T,U]_axpby
+Warnings:
+Warning 1263 Data truncated for column 'name' at row 1
create table t2
(
name_id int not null auto_increment,
@@ -149,6 +158,9 @@ drop table t1;
CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
UNIQUE (c,i));
INSERT INTO t1 (c) VALUES (NULL),(NULL);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 1
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 2
SELECT * FROM t1;
c i
1
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 13e0933adf4..5cfd1afd867 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -14,6 +14,34 @@ Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index 08612fa191f..d6dfb4621ab 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -76,27 +76,43 @@ drop table t1;
CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL);
INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
UPDATE t1 SET d=1/NULL;
+Warnings:
+Warning 1263 Data truncated for column 'd' at row 1
UPDATE t1 SET d=NULL;
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'd' at row 1
INSERT INTO t1 (a) values (null);
Column 'a' cannot be null
INSERT INTO t1 (a) values (1/null);
Column 'a' cannot be null
INSERT INTO t1 (a) values (null),(null);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 1
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
INSERT INTO t1 (b) values (null);
Column 'b' cannot be null
INSERT INTO t1 (b) values (1/null);
Column 'b' cannot be null
INSERT INTO t1 (b) values (null),(null);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 1
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
INSERT INTO t1 (c) values (null);
Column 'c' cannot be null
INSERT INTO t1 (c) values (1/null);
Column 'c' cannot be null
INSERT INTO t1 (c) values (null),(null);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 1
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 2
INSERT INTO t1 (d) values (null);
Column 'd' cannot be null
INSERT INTO t1 (d) values (1/null);
Column 'd' cannot be null
INSERT INTO t1 (d) values (null),(null);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'd' at row 1
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'd' at row 2
select * from t1;
a b c d
0 0000-00-00 00:00:00 0
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result
index c55f29a4e78..289290ba08c 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -234,6 +234,8 @@ index (id),
index (id2)
);
insert into t1 values(null,null),(1,1);
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'id2' at row 1
select * from t1;
id id2
NULL 0
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 0cfe1534252..08176aeb2f8 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -332,6 +332,11 @@ a b c
1 NULL b
1 NULL NULL
alter table t1 modify b int not null, modify c varchar(10) not null;
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warning 1263 Data truncated for column 'c' at row 1
+Warning 1263 Data truncated for column 'b' at row 2
+Warning 1263 Data truncated for column 'c' at row 3
explain select * from t1 order by a, b, c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 18 NULL 11 Using index
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 305868b04fd..5b7aab3df74 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -7,7 +7,7 @@ start slave;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
-load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
insert into t3 select * from t2;
select * from t1;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 5c57ea87f21..1a4701d8d0e 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -965,7 +965,13 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) TYPE=MyISAM CHARSET=latin1;
INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+Warnings:
+Warning 1263 Data truncated for column 'date' at row 1
+Warning 1263 Data truncated for column 'date' at row 2
INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+Warnings:
+Warning 1263 Data truncated for column 'date' at row 1
+Warning 1263 Data truncated for column 'date' at row 2
INSERT INTO t3 VALUES (1,1);
SELECT DISTINCT topic FROM t2 WHERE NOT EXISTS(SELECT * FROM t3 WHERE
numeropost=topic);
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index b74765696a2..c0e48fb42d8 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -156,8 +156,18 @@ insert into t1 values ("-.1"),("+.1"),(".1");
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1263 Data truncated for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 3
select * from t1;
a
0.00
@@ -189,12 +199,33 @@ a
drop table t1;
create table t1 (a decimal(10,2) unsigned);
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 6
insert into t1 values ("-.1"),("+.1"),(".1");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1263 Data truncated for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 3
select * from t1;
a
0.00
@@ -226,12 +257,33 @@ a
drop table t1;
create table t1 (a decimal(10,2) zerofill);
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 6
insert into t1 values ("-.1"),("+.1"),(".1");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1263 Data truncated for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 3
select * from t1;
a
00000000.00
@@ -267,7 +319,14 @@ insert into t1 values (-.1),(+.1),(.1);
insert into t1 values (00000000000001),(+0000000000001),(-0000000000001);
insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values (1e+100),(1e-100),(-1e+100);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 3
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
select * from t1;
a
@@ -300,6 +359,9 @@ a
drop table t1;
create table t1 (a decimal);
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 7
select * from t1;
a
-9999999999
@@ -312,6 +374,10 @@ a
drop table t1;
create table t1 (a decimal unsigned);
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 7
select * from t1;
a
0
@@ -324,6 +390,10 @@ a
drop table t1;
create table t1 (a decimal zerofill);
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 7
select * from t1;
a
0000000000
@@ -336,6 +406,10 @@ a
drop table t1;
create table t1 (a decimal unsigned zerofill);
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'a' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 7
select * from t1;
a
0000000000
@@ -348,11 +422,15 @@ a
drop table t1;
create table t1(a decimal(10,0));
insert into t1 values ("1e4294967295");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
select * from t1;
a
99999999999
delete from t1;
insert into t1 values("1e4294967297");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'a' at row 1
select * from t1;
a
99999999999
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 3914114d92c..eb9f6a00341 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -14,6 +14,9 @@ Field Type Collation Null Key Default Extra Privileges Comment
f1 float binary YES NULL select,insert,update,references
f2 double binary YES NULL select,insert,update,references
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'f1' at row 7
+Warning 1262 Data truncated, out of range for column 'f1' at row 8
insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150);
select * from t1;
f1 f2
diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result
index 3922826fdfd..54e1dea59c8 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -87,8 +87,34 @@ insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','o
insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one');
insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3);
insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'utiny' at row 1
+Warning 1262 Data truncated, out of range for column 'ushort' at row 1
+Warning 1262 Data truncated, out of range for column 'umedium' at row 1
+Warning 1262 Data truncated, out of range for column 'ulong' at row 1
+Warning 1263 Data truncated for column 'options' at row 1
+Warning 1263 Data truncated for column 'flags' at row 1
insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree");
+Warnings:
+Warning 1262 Data truncated, out of range for column 'tiny' at row 1
+Warning 1262 Data truncated, out of range for column 'short' at row 1
+Warning 1262 Data truncated, out of range for column 'medium' at row 1
+Warning 1262 Data truncated, out of range for column 'long_int' at row 1
+Warning 1262 Data truncated, out of range for column 'utiny' at row 1
+Warning 1262 Data truncated, out of range for column 'ushort' at row 1
+Warning 1262 Data truncated, out of range for column 'umedium' at row 1
+Warning 1262 Data truncated, out of range for column 'ulong' at row 1
+Warning 1263 Data truncated for column 'options' at row 1
insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'tiny' at row 1
+Warning 1262 Data truncated, out of range for column 'short' at row 1
+Warning 1262 Data truncated, out of range for column 'medium' at row 1
+Warning 1262 Data truncated, out of range for column 'long_int' at row 1
+Warning 1262 Data truncated, out of range for column 'utiny' at row 1
+Warning 1262 Data truncated, out of range for column 'ushort' at row 1
+Warning 1262 Data truncated, out of range for column 'umedium' at row 1
+Warning 1263 Data truncated for column 'options' at row 1
insert into t1 (tiny) values (1);
select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1;
auto string tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000) date_field time_field date_time blob_col tinyblob_col mediumblob_col longblob_col
@@ -136,6 +162,13 @@ new_field char(2),
PRIMARY KEY (auto)
);
INSERT INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10;
+Warnings:
+Warning 1263 Data truncated for column 'new_field' at row 2
+Warning 1263 Data truncated for column 'new_field' at row 3
+Warning 1263 Data truncated for column 'new_field' at row 4
+Warning 1263 Data truncated for column 'new_field' at row 5
+Warning 1263 Data truncated for column 'new_field' at row 6
+Warning 1263 Data truncated for column 'new_field' at row 7
select * from t2;
auto string mediumblob_col new_field
1 2 2 ne
@@ -166,6 +199,10 @@ options flags
one one
drop table t2;
create table t2 select * from t1;
+Warnings:
+Warning 1263 Data truncated for column 'options' at row 4
+Warning 1263 Data truncated for column 'options' at row 5
+Warning 1263 Data truncated for column 'options' at row 6
update t2 set string="changed" where auto=16;
show full columns from t1;
Field Type Collation Null Key Default Extra Privileges Comment
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result
index bacc3ec0176..27f2de823c6 100644
--- a/mysql-test/r/type_time.result
+++ b/mysql-test/r/type_time.result
@@ -24,6 +24,10 @@ t
12:30:35
36:30:31
insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a");
+Warnings:
+Warning 1262 Data truncated, out of range for column 't' at row 2
+Warning 1262 Data truncated, out of range for column 't' at row 3
+Warning 1262 Data truncated, out of range for column 't' at row 4
select * from t1;
t
10:22:33
diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result
index 1acfc700d3a..ee81295e696 100644
--- a/mysql-test/r/type_uint.result
+++ b/mysql-test/r/type_uint.result
@@ -2,6 +2,8 @@ drop table if exists t1;
create table t1 (this int unsigned);
insert into t1 values (1);
insert into t1 values (-1);
+Warnings:
+Warning 1262 Data truncated, out of range for column 'this' at row 1
select * from t1;
this
1
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 8cf0a676b95..b5e05cf6953 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -153,9 +153,9 @@ show variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1048576
set character set cp1251_koi8;
-show variables like "collation_client";
+show variables like "character_set_client";
Variable_name Value
-collation_client cp1251_bulgarian_ci
+character_set_client cp1251
select @@timestamp>0;
@@timestamp>0
1
@@ -182,7 +182,7 @@ set SESSION query_cache_size=10000;
Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
set GLOBAL table_type=DEFAULT;
Variable 'table_type' doesn't have a default value
-set collation_client=UNKNOWN_CHARACTER_SET;
+set character_set_client=UNKNOWN_CHARACTER_SET;
Unknown character set: 'UNKNOWN_CHARACTER_SET'
set global autocommit=1;
Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index d055511a50a..add9051ddfb 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -1,13 +1,24 @@
-drop table if exists t1;
+drop table if exists t1, t2;
Warnings:
Note 1051 Unknown table 't1'
+Note 1051 Unknown table 't2'
create table t1 (a int);
insert into t1 values (1);
insert into t1 values ("hej");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("då");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated for column 'a' at row 2
set SQL_WARNINGS=1;
insert into t1 values ("hej");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("då");
+Warnings:
+Warning 1263 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated for column 'a' at row 2
drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
@@ -31,10 +42,78 @@ select @@warning_count;
@@warning_count
0
drop table t1;
+create table t1(a tinyint, b int not null, c date, d char(5));
+load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
+Warning 1263 Data truncated for column 'd' at row 3
+Warning 1263 Data truncated for column 'c' at row 4
+Warning 1259 Record count is fewer than the column count at row 5
+Warning 1263 Data truncated for column 'b' at row 6
+Warning 1260 Record count is more than the column count at row 7
+Warning 1262 Data truncated, out of range for column 'a' at row 8
+select @@warning_count;
+@@warning_count
+7
+drop table t1;
+create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
+insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 1
+Warning 1262 Data truncated, out of range for column 'b' at row 2
+Warning 1263 Data truncated for column 'c' at row 2
+Warning 1262 Data truncated, out of range for column 'a' at row 3
+Warning 1262 Data truncated, out of range for column 'b' at row 3
+Warning 1263 Data truncated for column 'c' at row 3
+alter table t1 modify c char(4);
+Warnings:
+Warning 1263 Data truncated for column 'c' at row 1
+Warning 1263 Data truncated for column 'c' at row 2
+alter table t1 add d char(2);
+update t1 set a=NULL where a=10;
+Warnings:
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
+update t1 set c='mysql ab' where c='test';
+Warnings:
+Warning 1263 Data truncated for column 'c' at row 4
+update t1 set d=c;
+Warnings:
+Warning 1263 Data truncated for column 'd' at row 1
+Warning 1263 Data truncated for column 'd' at row 2
+Warning 1263 Data truncated for column 'd' at row 3
+Warning 1263 Data truncated for column 'd' at row 4
+create table t2(a tinyint NOT NULL, b char(3));
+insert into t2 select b,c from t1;
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warning 1263 Data truncated for column 'b' at row 2
+Warning 1263 Data truncated for column 'b' at row 3
+Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
+Warning 1263 Data truncated for column 'b' at row 4
+drop table t1, t2;
+create table t1(a char(10));
+alter table t1 add b char;
+set max_error_count=10;
+update t1 set b=a;
+Warnings:
+Warning 1263 Data truncated for column 'b' at row 1
+Warning 1263 Data truncated for column 'b' at row 2
+Warning 1263 Data truncated for column 'b' at row 3
+Warning 1263 Data truncated for column 'b' at row 4
+Warning 1263 Data truncated for column 'b' at row 5
+Warning 1263 Data truncated for column 'b' at row 6
+Warning 1263 Data truncated for column 'b' at row 7
+Warning 1263 Data truncated for column 'b' at row 8
+Warning 1263 Data truncated for column 'b' at row 9
+Warning 1263 Data truncated for column 'b' at row 10
+select @@warning_count;
+@@warning_count
+50
+drop table t1;
create table t1 (id int) type=isam;
Warnings:
-Warning 1259 Using storage engine MYISAM for table 't1'
+Warning 1264 Using storage engine MYISAM for table 't1'
alter table t1 type=isam;
Warnings:
-Warning 1259 Using storage engine MYISAM for table 't1'
+Warning 1264 Using storage engine MYISAM for table 't1'
drop table t1;
diff --git a/mysql-test/std_data/rpl_loaddata2.dat b/mysql-test/std_data/rpl_loaddata2.dat
index 7a3d4ea7695..b883d9dcd58 100644
--- a/mysql-test/std_data/rpl_loaddata2.dat
+++ b/mysql-test/std_data/rpl_loaddata2.dat
@@ -1,8 +1,8 @@
-2003-01-21,6328,%a%,%aaaaa%
+>2003-01-21,6328,%a%,%aaaaa%
##
-2003-02-22,2461,b,%a a a @@ @% @b ' " a%
+>2003-02-22,2461,b,%a a a @@ @% @b ' " a%
##
-2003-03-22,2161,%c%,%asdf%
+>2003-03-22,2161,%c%,%asdf%
##
-2003-04-22,2416,%a%,%bbbbb%
+>2003-04-22,2416,%a%,%bbbbb%
##
diff --git a/mysql-test/std_data/warnings_loaddata.dat b/mysql-test/std_data/warnings_loaddata.dat
new file mode 100644
index 00000000000..e645de775ab
--- /dev/null
+++ b/mysql-test/std_data/warnings_loaddata.dat
@@ -0,0 +1,8 @@
+10,20,2003-04-21,mysql
+20,\N,2003-04-22,MySQL
+30,40,2003-04-23,MySQL is Open Source Database
+40,50,monty,30
+50,60,2003-04-24
+60,67 abc,2003-04-25,mysql
+70,80,2003-04-26,mysql,open,source
+500,90,2003-04-27,mysql
diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test
index 0b32c3ccf88..0cf531156a9 100644
--- a/mysql-test/t/ctype_collate.test
+++ b/mysql-test/t/ctype_collate.test
@@ -9,7 +9,7 @@ CREATE TABLE t1 (
--error 1251
CREATE TABLE t2 (
- latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r NOT NULL
+ latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
);
@@ -57,39 +57,39 @@ INSERT INTO t1 (latin1_f) VALUES (_latin1'z');
-- ORDER BY
SELECT latin1_f FROM t1 ORDER BY latin1_f;
-SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1;
+SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_swedish_ci;
SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_german2_ci;
SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_general_ci;
SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_bin;
--error 1251
-SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE koi8r;
+SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE koi8r_general_ci;
--SELECT latin1_f COLLATE koi8r FROM t1 ;
-- AS + ORDER BY
-SELECT latin1_f COLLATE latin1 AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
+SELECT latin1_f COLLATE latin1_swedish_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
SELECT latin1_f COLLATE latin1_german2_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
SELECT latin1_f COLLATE latin1_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
SELECT latin1_f COLLATE latin1_bin AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
--error 1251
-SELECT latin1_f COLLATE koi8r AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
+SELECT latin1_f COLLATE koi8r_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as;
-- GROUP BY
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f;
-SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1;
+SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_swedish_ci;
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_german2_ci;
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_general_ci;
SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_bin;
--error 1251
-SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE koi8r;
+SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE koi8r_general_ci;
-- DISTINCT
SELECT DISTINCT latin1_f FROM t1;
-SELECT DISTINCT latin1_f COLLATE latin1 FROM t1;
+SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_german2_ci FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_general_ci FROM t1;
SELECT DISTINCT latin1_f COLLATE latin1_bin FROM t1;
@@ -127,35 +127,19 @@ ALTER TABLE t1 CHARACTER SET latin1 COLLATE latin1_bin;
SHOW CREATE TABLE t1;
SHOW FIELDS FROM t1;
+#
+# Check SET CHARACTER SET
+#
+
SET CHARACTER SET 'latin1';
-SHOW VARIABLES LIKE 'collation_client';
-SET CHARACTER SET latin1;
-SHOW VARIABLES LIKE 'collation_client';
-SHOW VARIABLES LIKE 'collation_client';
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-SET CHARACTER SET latin1 COLLATE latin1_bin;
-SHOW VARIABLES LIKE 'collation_client';
-SET CHARACTER SET LATIN1 COLLATE Latin1_Bin;
-SHOW VARIABLES LIKE 'collation_client';
-SET CHARACTER SET 'latin1' COLLATE 'latin1_bin';
-SHOW VARIABLES LIKE 'collation_client';
+SHOW VARIABLES LIKE 'character_set_client';
SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
+
SET CHARACTER SET koi8r;
SHOW VARIABLES LIKE 'collation_client';
SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-SET CHARACTER SET koi8r COLLATE koi8r_bin;
-SHOW VARIABLES LIKE 'collation_client';
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-SET CHARACTER SET koi8r COLLATE DEFAULT;
-SHOW VARIABLES LIKE 'collation_client';
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
-SET CHARACTER SET DEFAULT;
-SHOW VARIABLES LIKE 'collation_client';
-SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
---error 1251
-SET CHARACTER SET latin1 COLLATE koi8r;
+
--error 1115
SET CHARACTER SET 'DEFAULT';
-
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_latin1_de-master.opt b/mysql-test/t/ctype_latin1_de-master.opt
index 62f864d501d..79fdb1c63dc 100644
--- a/mysql-test/t/ctype_latin1_de-master.opt
+++ b/mysql-test/t/ctype_latin1_de-master.opt
@@ -1 +1 @@
---default-character-set=latin1_german2_ci
+--default-character-set=latin1 --default-collation=latin1_german2_ci
diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test
index 8378ef35685..ab528dc11e7 100644
--- a/mysql-test/t/ctype_many.test
+++ b/mysql-test/t/ctype_many.test
@@ -167,7 +167,10 @@ ORDER BY t12.utf8_f,t11.comment,t12.comment;
SET CHARACTER SET utf8;
ALTER TABLE t1 ADD ucs2_f CHAR(32) CHARACTER SET ucs2;
+
+--disable_warnings
ALTER TABLE t1 CHANGE ucs2_f ucs2_f CHAR(32) UNICODE NOT NULL;
+--enable_warnings
INSERT INTO t1 (ucs2_f,comment) VALUES (0x0391,'GREEK CAPIT ALPHA');
INSERT INTO t1 (ucs2_f,comment) VALUES (0x0392,'GREEK CAPIT BETA');
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test
index 2acb67dfce2..1f34aa9d3f9 100644
--- a/mysql-test/t/rpl_loaddata.test
+++ b/mysql-test/t/rpl_loaddata.test
@@ -10,8 +10,7 @@ create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
-#load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionaly enclosed by '%' escaped by '@' lines terminated by '\n%%\n' ignore 1 lines;
- load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
insert into t3 select * from t2;
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 4f244311a59..7d4b25df0eb 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -92,7 +92,7 @@ set net_buffer_length=2000000000;
show variables like 'net_buffer_length';
set character set cp1251_koi8;
-show variables like "collation_client";
+show variables like "character_set_client";
select @@timestamp>0;
set @@rand_seed1=10000000,@@rand_seed2=1000000;
@@ -119,7 +119,7 @@ set SESSION query_cache_size=10000;
--error 1230
set GLOBAL table_type=DEFAULT;
--error 1115
-set collation_client=UNKNOWN_CHARACTER_SET;
+set character_set_client=UNKNOWN_CHARACTER_SET;
--error 1228
set global autocommit=1;
--error 1228
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index ab8c0b99ca5..6374fbf83ac 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -2,7 +2,7 @@
# Test some warnings
#
--disable-warnings
-drop table if exists t1;
+drop table if exists t1, t2;
--enable-warnings
create table t1 (a int);
@@ -17,6 +17,7 @@ set SQL_WARNINGS=0;
#
# Test other warnings
+#
drop temporary table if exists not_exists;
drop table if exists not_exists_table;
@@ -28,6 +29,52 @@ create table if not exists t1(id int);
select @@warning_count;
drop table t1;
+#
+# Test warnings for LOAD DATA INFILE
+#
+
+create table t1(a tinyint, b int not null, c date, d char(5));
+load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
+select @@warning_count;
+drop table t1;
+
+#
+# Warnings from basic INSERT, UPDATE and ALTER commands
+#
+
+create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
+insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
+alter table t1 modify c char(4);
+alter table t1 add d char(2);
+update t1 set a=NULL where a=10;
+update t1 set c='mysql ab' where c='test';
+update t1 set d=c;
+create table t2(a tinyint NOT NULL, b char(3));
+insert into t2 select b,c from t1;
+drop table t1, t2;
+
+#
+# Test for max_error_count
+#
+
+create table t1(a char(10));
+let $1=50;
+disable_query_log;
+while ($1)
+{
+ eval insert into t1 values('mysql ab');
+ dec $1;
+}
+enable_query_log;
+alter table t1 add b char;
+set max_error_count=10;
+update t1 set b=a;
+select @@warning_count;
+
+#
+# Test for handler type
+#
+drop table t1;
create table t1 (id int) type=isam;
alter table t1 type=isam;
drop table t1;