From 3a626d1027eb0348c954b0138c1f550cec86a424 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Tue, 20 Apr 2010 16:17:34 +0200 Subject: [PATCH] Bug#50373 --secure-file-priv="" Correcting a patch misstake. The converted file path is placed in 'buff' not in opt_secure_file_priv. mysql-test/r/loaddata.result: * Updated test case; Since secure_file_priv now is normalized the previous values are changed. sql/mysqld.cc: * Fixed patch misstake --- mysql-test/r/loaddata.result | 4 ++-- sql/mysqld.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 mysql-test/r/loaddata.result diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result old mode 100755 new mode 100644 index ef206565db5..8246cb40538 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -204,10 +204,10 @@ a b c 15 NULL Fifteen show variables like "secure_file_pri%"; Variable_name Value -secure_file_priv MYSQLTEST_VARDIR/ +secure_file_priv MYSQLTEST_VARDIR select @@secure_file_priv; @@secure_file_priv -MYSQLTEST_VARDIR/ +MYSQLTEST_VARDIR set @@secure_file_priv= 0; ERROR HY000: Variable 'secure_file_priv' is a read only variable truncate table t1; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 26dcc1753da..0d62c5953fc 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8846,7 +8846,7 @@ static int fix_paths(void) convert_dirname(buff, opt_secure_file_priv, NullS); char *secure_file_real_path= (char *)my_malloc(FN_REFLEN, MYF(MY_FAE)); if (secure_file_real_path == 0 || - my_realpath(secure_file_real_path, opt_secure_file_priv, 0)) + my_realpath(secure_file_real_path, buff, 0)) { sql_print_warning("Failed to normalize the argument for --secure-file-priv."); return 1;