diff options
author | monty@mysql.com <> | 2005-05-14 00:01:40 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-05-14 00:01:40 +0300 |
commit | b4e92e6360df30ab8d5e1baaf4d4d5d7cb8bc5f1 (patch) | |
tree | f66bb31f8c3bb3a7c23d82b86abf8f0810f05403 /mysql-test/t/outfile.test | |
parent | 59cce601513ac01d19d45120c784572afd9acbec (diff) | |
parent | 9b39f8304ef1e9ca9a10803271125431ed15fc0f (diff) | |
download | mariadb-git-b4e92e6360df30ab8d5e1baaf4d4d5d7cb8bc5f1.tar.gz |
Merge with 4.0
Diffstat (limited to 'mysql-test/t/outfile.test')
-rw-r--r-- | mysql-test/t/outfile.test | 65 |
1 files changed, 43 insertions, 22 deletions
diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test index 59ce6cc56fe..b029a65284c 100644 --- a/mysql-test/t/outfile.test +++ b/mysql-test/t/outfile.test @@ -1,3 +1,9 @@ +disable_query_log; +-- source include/test_outfile.inc +eval set @tmpdir="$MYSQL_TEST_DIR/var/tmp"; +enable_query_log; +-- source include/have_outfile.inc + # # test of into outfile|dumpfile # @@ -6,29 +12,44 @@ drop table if exists t1; --enable_warnings -# We need to check that we have 'file' privilege. +create table t1 (`a` blob); +insert into t1 values("hello world"),("Hello mars"),(NULL); +disable_query_log; +eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1; +enable_query_log; +select load_file(concat(@tmpdir,"/outfile-test.1")); +disable_query_log; +eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1 limit 1; +enable_query_log; +select load_file(concat(@tmpdir,"/outfile-test.2")); +disable_query_log; +eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1 where a is null; +enable_query_log; +select load_file(concat(@tmpdir,"/outfile-test.3")); -#create table t1 (`a` blob); -#insert into t1 values("hello world"),("Hello mars"),(NULL); -#select * into outfile "/tmp/select-test.1" from t1; -#select load_file("/tmp/select-test.1"); -#select * into dumpfile "/tmp/select-test.2" from t1 limit 1; -#select load_file("/tmp/select-test.2"); -#select * into dumpfile "/tmp/select-test.3" from t1 where a is null; -#select load_file("/tmp/select-test.3"); -# -## the following should give errors -# -#select * into outfile "/tmp/select-test.1" from t1; -#select * into dumpfile "/tmp/select-test.1" from t1; -#select * into dumpfile "/tmp/select-test.99" from t1; -#select load_file("/tmp/select-test.not-exist"); -#drop table t1; -#drop table if exists t; -#CREATE TABLE t ( t timestamp NOT NULL, c char(200) character set latin1 NOT NULL default '', i int(11), v varchar(200), b blob, KEY t (t)) ENGINE=MyISAM; -#INSERT INTO t VALUES ('2002-12-20 12:01:20','',1,"aaa","bbb"); -#select * from t into outfile "check"; -#drop table if exists t; +# the following should give errors + +#disabled as error message has variable path +#disable_query_log; +#--error 1086 +#eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1; +#--error 1086 +#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1; +#--error 1086 +#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1; +#enable_query_log; +select load_file(concat(@tmpdir,"/outfile-test.not-exist")); +--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.1 +--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.2 +--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.3 +drop table t1; + +# Bug#8191 +disable_query_log; +eval select 1 into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.4"; +enable_query_log; +select load_file(concat(@tmpdir,"/outfile-test.4")); +--exec rm $MYSQL_TEST_DIR/var/tmp/outfile-test.4 # # Bug #5382: 'explain select into outfile' crashes the server |