1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into myvenu.com:/home/venu/work/sql/dev-4.1
This commit is contained in:
venu@myvenu.com
2003-04-28 22:58:19 -07:00
7 changed files with 114 additions and 10 deletions

View File

@ -30,3 +30,27 @@ create table if not exists t1(id int);
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 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
Warning 1261 Data truncated for column 'd' at row 3
Warning 1261 Data truncated for column 'c' at row 4
Warning 1259 Value count is fewer than the column count at row 5
Warning 1261 Data truncated for column 'b' at row 6
Warning 1260 Value count is more than the column count at row 7
Warning 1261 Data truncated for column 'a' at row 8
select @@warning_count;
@@warning_count
7
show warnings;
Level Code Message
Warning 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
Warning 1261 Data truncated for column 'd' at row 3
Warning 1261 Data truncated for column 'c' at row 4
Warning 1259 Value count is fewer than the column count at row 5
Warning 1261 Data truncated for column 'b' at row 6
Warning 1260 Value count is more than the column count at row 7
Warning 1261 Data truncated for column 'a' at row 8
drop table t1;

View File

@ -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

View File

@ -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;
@ -26,3 +27,14 @@ show count(*) warnings;
create table t1(id int);
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;
show warnings;
drop table t1;