mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
64393d7e24
client/mysqltest.c: Fix that LET can be used with queries that return multiple columns libmysql/errmsg.c: Extend socket name to 100 characters in error messages libmysql/libmysql.c: Reset some variables to make ensure that we can call mysql_server_init()/mysql_server_end() many times mysql-test/mysql-test-run.sh: Set open-files-limit to 1024 mysql-test/r/loaddata.result: Add test case for LOAD DATA bug report (was not a bug) mysql-test/r/query_cache.result: Move test with many tables to separate test mysql-test/r/select_safe.result: Make test repeatable mysql-test/t/loaddata.test: Add test case for LOAD DATA bug report (was not a bug) mysql-test/t/query_cache.test: Move test with many tables to separate test mysql-test/t/select_safe.test: Make test repeatable sql/field.cc: Portability fix for gcc 3.3 sql/mysqld.cc: Store in open_files_limit the true number of files we can open (if system supports it) sql/sql_load.cc: Safety fix
28 lines
1.1 KiB
Text
28 lines
1.1 KiB
Text
drop table if exists t1;
|
|
create table t1 (a date, b date, c date not null, d date);
|
|
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
|
|
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
|
|
SELECT * from t1;
|
|
a b c d
|
|
0000-00-00 NULL 0000-00-00 0000-00-00
|
|
0000-00-00 0000-00-00 0000-00-00 0000-00-00
|
|
2003-03-03 2003-03-03 2003-03-03 NULL
|
|
2003-03-03 2003-03-03 2003-03-03 NULL
|
|
truncate table t1;
|
|
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
|
SELECT * from t1;
|
|
a b c d
|
|
NULL NULL 0000-00-00 0000-00-00
|
|
NULL 0000-00-00 0000-00-00 0000-00-00
|
|
NULL 2003-03-03 2003-03-03 NULL
|
|
drop table t1;
|
|
create table t1 (a text, b text);
|
|
load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
|
|
select concat('|',a,'|'), concat('|',b,'|') from t1;
|
|
concat('|',a,'|') concat('|',b,'|')
|
|
|Field A| |Field B|
|
|
|Field 1| |Field 2'
|
|
Field 3,'Field 4|
|
|
|Field 5' ,'Field 6| NULL
|
|
|Field 6| | 'Field 7'|
|
|
drop table t1;
|