summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorElena Stepanova <elenst@wheezy-64.home>2014-02-05 14:25:37 +0400
committerElena Stepanova <elenst@wheezy-64.home>2014-02-05 14:25:37 +0400
commit41fd4844e8492880f9139cd9f10992a3dac390df (patch)
tree073953cdf203418954a180dec778018ff4610999 /mysql-test
parent5fb973b020634703c5c2beda63a439c608de667e (diff)
downloadmariadb-git-41fd4844e8492880f9139cd9f10992a3dac390df.tar.gz
unix_socket fails in some build environments when $USER variable
appears to be unset, or when it contains 'root' even though the user does not have real root permissions
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/plugins/t/unix_socket.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/t/unix_socket.test b/mysql-test/suite/plugins/t/unix_socket.test
index 72106fab46d..5869e2717c9 100644
--- a/mysql-test/suite/plugins/t/unix_socket.test
+++ b/mysql-test/suite/plugins/t/unix_socket.test
@@ -3,10 +3,23 @@
# get .result differences from CURRENT_USER().
--source include/not_as_root.inc
+# The previous check verifies that the user does not have root permissions.
+# However in some cases tests are run under a user named 'root',
+# even although this user does not have real root permissions.
+# This test should be skipped in this case, since it does not expect
+# that there are records in mysql.user where user=<username>
+if ($USER=="root") {
+ skip Cannot be run by user named 'root' even if it does not have all privileges;
+}
+
if (!$AUTH_SOCKET_SO) {
skip No auth_socket plugin;
}
+if (!$USER) {
+ skip USER variable is undefined;
+}
+
let $plugindir=`SELECT @@global.plugin_dir`;
eval install plugin unix_socket soname '$AUTH_SOCKET_SO';