summaryrefslogtreecommitdiff
path: root/mysql-test/t/outfile.test
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/eagle.(none)>2007-05-04 14:41:58 +0500
committerunknown <gluh@mysql.com/eagle.(none)>2007-05-04 14:41:58 +0500
commit13cfc4775c4e310ad8a8c44efa512944b4c7a11d (patch)
tree21599319b1facc2d206f15618620a7449b307b2e /mysql-test/t/outfile.test
parent74c794d0e4a14b6deddc90e74ed718c2f00653df (diff)
downloadmariadb-git-13cfc4775c4e310ad8a8c44efa512944b4c7a11d.tar.gz
Bug#28181 Access denied to 'information_schema when select into out file (regression)
allow select into out file from I_S if user has FILE privilege otherwise issue an error mysql-test/r/outfile.result: test result mysql-test/t/outfile.test: test case sql/sql_parse.cc: allow select into out file from I_S if user has FILE privilege otherwise issue an error
Diffstat (limited to 'mysql-test/t/outfile.test')
-rw-r--r--mysql-test/t/outfile.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test
index 7c90fd32909..f285407efd4 100644
--- a/mysql-test/t/outfile.test
+++ b/mysql-test/t/outfile.test
@@ -96,3 +96,38 @@ create table t1(a int);
eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1;
drop table t1;
+#
+# Bug#28181 Access denied to 'information_schema when
+# select into out file (regression)
+#
+create database mysqltest;
+create user user_1@localhost;
+grant all on mysqltest.* to user_1@localhost;
+connect (con28181_1,localhost,user_1,,mysqltest);
+
+--error 1044
+eval select schema_name
+into outfile "../tmp/outfile-test.4"
+fields terminated by ',' optionally enclosed by '"'
+ lines terminated by '\n'
+from information_schema.schemata
+where schema_name like 'mysqltest';
+
+connection default;
+grant file on *.* to user_1@localhost;
+
+connect (con28181_2,localhost,user_1,,mysqltest);
+eval select schema_name
+into outfile "../tmp/outfile-test.4"
+fields terminated by ',' optionally enclosed by '"'
+ lines terminated by '\n'
+from information_schema.schemata
+where schema_name like 'mysqltest';
+
+connection default;
+--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4
+use test;
+revoke all privileges on *.* from user_1@localhost;
+drop user user_1@localhost;
+drop database mysqltest;
+