summaryrefslogtreecommitdiff
path: root/mysql-test/t/loaddata.test
diff options
context:
space:
mode:
authorKristofer Pettersson <kristofer.pettersson@sun.com>2010-05-03 18:14:39 +0200
committerKristofer Pettersson <kristofer.pettersson@sun.com>2010-05-03 18:14:39 +0200
commit5b6ebdf086fe0506dc1d2cb70a95f9633fd7a782 (patch)
tree2952d068c6ed5d80e6bb5b5c84e9724d6530c95f /mysql-test/t/loaddata.test
parent0f5afe5d7f6eacb125475e43372574bb97387c47 (diff)
downloadmariadb-git-5b6ebdf086fe0506dc1d2cb70a95f9633fd7a782.tar.gz
Bug#50373 --secure-file-priv=""
Iterative patch improvement. Previously committed patch caused wrong result on Windows. The previous patch also broke secure_file_priv for symlinks since not all file paths which must be compared against this variable are normalized using the same norm. The server variable opt_secure_file_priv wasn't normalized properly and caused the operations LOAD DATA INFILE .. INTO TABLE .. and SELECT load_file(..) to do different interpretations of the --secure-file-priv option. The patch moves code to the server initialization routines so that the path always is normalized once and only once. It was also intended that setting the option to an empty string should be equal to lifting all previously set restrictions. This is also fixed by this patch.
Diffstat (limited to 'mysql-test/t/loaddata.test')
-rw-r--r--mysql-test/t/loaddata.test14
1 files changed, 10 insertions, 4 deletions
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index e5f0a1d7eba..126bd5c8838 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -153,10 +153,16 @@ select * from t1;
#
# It should not be possible to load from a file outside of vardir
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-show variables like "secure_file_pri%";
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-select @@secure_file_priv;
+## The following lines were disabled because of patch for
+## bug 50373. MYSQLTEST_VARDIR doesn't rewrite symlinks
+## to real paths, but this is done for secure_file_priv.
+## Because of this the result can't be replaced if the
+## test suite runs with the --mem option which creates
+## symlinks to the ramdisk.
+#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+#show variables like "secure_file_pri%";
+#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+#select @@secure_file_priv;
--error 1238
set @@secure_file_priv= 0;