Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-05-04 14:41:58+05:00, gluh@stripped +3 -0
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@stripped, 2007-05-04 14:41:56+05:00, gluh@stripped +18 -1
test result
mysql-test/t/outfile.test@stripped, 2007-05-04 14:41:56+05:00, gluh@stripped +35 -0
test case
sql/sql_parse.cc@stripped, 2007-05-04 14:41:56+05:00, gluh@stripped +2 -1
allow select into out file from I_S if user has FILE privilege
otherwise issue an error
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gluh
# Host: eagle.(none)
# Root: /home/gluh/MySQL/Merge/5.0-opt
--- 1.618/sql/sql_parse.cc 2007-04-24 14:08:00 +05:00
+++ 1.619/sql/sql_parse.cc 2007-05-04 14:41:56 +05:00
@@ -5261,7 +5261,8 @@ check_access(THD *thd, ulong want_access
if (schema_db)
{
- if (want_access & ~(SELECT_ACL | EXTRA_ACL))
+ if (!(sctx->master_access & FILE_ACL) && (want_access & FILE_ACL)
||
+ (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
{
if (!no_errors)
{
Binary files /tmp/bk_outfile.result-1.7_Skpo9G and /tmp/bk_outfile.result-1.8_kW2AwU
differ
--- 1.15/mysql-test/t/outfile.test 2007-02-14 17:44:30 +04:00
+++ 1.16/mysql-test/t/outfile.test 2007-05-04 14:41:56 +05:00
@@ -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;
+
| Thread |
|---|
| • bk commit into 5.0 tree (gluh:1.2471) BUG#28181 | gluh | 4 May |