Debian Codegraph @

mysql-test/suite/storage_engine/loaddata.result

raw
1 DROP TABLE IF EXISTS t1;
2 CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
3 LOAD DATA INFILE '<DATADIR>/se_loaddata.dat' INTO TABLE t1
4 FIELDS TERMINATED BY ',' (a,b);
5 SELECT a,b FROM t1;
6 a b
7 1 foo
8 2 bar
9 3
10 4 abc
11 LOAD DATA LOCAL INFILE '<DATADIR>/se_loaddata.dat' INTO TABLE t1
12 CHARACTER SET utf8 COLUMNS TERMINATED BY ','
13 ESCAPED BY '/' (a,b);
14 SELECT a,b FROM t1;
15 a b
16 1 foo
17 1 foo
18 2 bar
19 2 bar
20 3
21 3
22 4 abc
23 4 abc
24 LOAD DATA LOCAL INFILE '<DATADIR>/se_loaddata.dat' INTO TABLE t1
25 FIELDS TERMINATED BY ';'
26 (a) SET b='loaded';
27 Warnings:
28 Warning 1262 Row 1 was truncated; it contained more data than there were input columns
29 Warning 1262 Row 2 was truncated; it contained more data than there were input columns
30 Warning 1262 Row 3 was truncated; it contained more data than there were input columns
31 SELECT a,b FROM t1;
32 a b
33 0 loaded
34 1 foo
35 1 foo
36 102 loaded
37 2 bar
38 2 bar
39 3
40 3
41 4 abc
42 4 abc
43 5 loaded
44 LOAD DATA INFILE '<DATADIR>/se_loaddata.dat' INTO TABLE t1
45 FIELDS TERMINATED BY ';'
46 OPTIONALLY ENCLOSED BY ''''
47 LINES STARTING BY 'prefix:'
48 IGNORE 2 LINES (a,b);
49 Warnings:
50 Warning 1262 Row 2 was truncated; it contained more data than there were input columns
51 SELECT a,b FROM t1;
52 a b
53 0
54 0 loaded
55 1 foo
56 1 foo
57 100 foo
58 102 loaded
59 2 bar
60 2 bar
61 3
62 3
63 4 abc
64 4 abc
65 5 loaded
66 7 test
67 LOAD DATA INFILE '<DATADIR>/se_loaddata.dat' INTO TABLE t1;
68 SELECT a,b FROM t1;
69 a b
70 0
71 0 loaded
72 1 foo
73 1 foo
74 1 foo
75 100 foo
76 102 loaded
77 2 bar
78 2 bar
79 2 bar
80 3
81 3
82 3
83 4 abc
84 4 abc
85 4 abc
86 5 loaded
87 7 test
88 DROP TABLE t1;