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

Merge ltantony.mysql.com:/usr/home/antony/work2/p4-bug8191

into ltantony.mysql.com:/usr/home/antony/work2/megapatch-4.0


BitKeeper/etc/logging_ok:
  auto-union
This commit is contained in:
unknown
2005-05-08 23:07:46 +01:00
6 changed files with 55 additions and 21 deletions

View File

@ -0,0 +1,5 @@
-- require r/have_outfile.require
disable_query_log;
select load_file(concat(@tmpdir,"/outfile.test"));
--exec rm $MYSQL_TEST_DIR/var/tmp/outfile.test
enable_query_log;

View File

@ -0,0 +1 @@
eval select "Outfile OK" into outfile "$MYSQL_TEST_DIR/var/tmp/outfile.test";

View File

@ -0,0 +1,3 @@
load_file(concat(@tmpdir,"/outfile.test"))
Outfile OK

BIN
mysql-test/r/outfile.result Normal file

Binary file not shown.

View File

@ -1,23 +1,47 @@
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
#
# We need to check that we have 'file' privilege.
drop table if exists t1;
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"));
#drop table if exists t1;
#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;
# the following should give errors
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