Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0eb1be58
Commit
0eb1be58
authored
Apr 22, 2003
by
venu@myvenu.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the test for LOAD DATA INFILE warnings
parent
21384728
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
0 deletions
+44
-0
mysql-test/r/warnings.result
mysql-test/r/warnings.result
+24
-0
mysql-test/std_data/warnings_loaddata.dat
mysql-test/std_data/warnings_loaddata.dat
+8
-0
mysql-test/t/warnings.test
mysql-test/t/warnings.test
+12
-0
No files found.
mysql-test/r/warnings.result
View file @
0eb1be58
...
...
@@ -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;
mysql-test/std_data/warnings_loaddata.dat
0 → 100644
View file @
0eb1be58
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
mysql-test/t/warnings.test
View file @
0eb1be58
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment