summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <mhansson@dl145s.mysql.com>2007-05-31 14:22:21 +0200
committerunknown <mhansson@dl145s.mysql.com>2007-05-31 14:22:21 +0200
commit572ec56a9421d248603469584c6d5eeaefd1ca5f (patch)
tree3b88e915652c80e942d1fbd5789f1791e7e4df5a /mysql-test
parent1e33cfb36a84b477a468dbcfc1ccc3035a9efb81 (diff)
downloadmariadb-git-572ec56a9421d248603469584c6d5eeaefd1ca5f.tar.gz
bug#27741: udf test fails on AIX < 5.3
problem #1: udf_example.so does not get built on AIX solution#1: build it yourself using cd sql; gcc -g -I ../include/ -I /usr/include/ -lpthread \ -shared -o udf_example.so udf_example.c; mv udf_example.so \ .libs/ problem#2 (the bug): udf_example fails because it does not recognize the variable LD_LIBRARY_PATH when doing dl_open(), it looks at LIBPATH solution#2: add the library path to LIBPATH problem#3: udf_example returns the wrong result length since it relies on strmov to return a pointer to the end of the string that it copies. On AIX builds, where m_string.h is not included (m_string defines a macro expanding strmov to stpcpy), there is a macro expanding strmov to strcpy, which returns a pointer to the first character. solution#3: define strmov as stpcpy. problem#4: #2 applies on hp-ux as well, but this platform looks at SHLIB_PATH solution#4: added the library path to SHLIB_PATH mysql-test/mysql-test-run.pl: bug#27741: Added library paths to LIBPATH ( shared library path environment variable used on AIX) and SHLIB_PATH (ditto on hp-ux) sql/udf_example.c: bug#27741: define strmov as stpcpy rather than strcpy and include string.h. The definition for strmov in the standalone case was not maintained properly
Diffstat (limited to 'mysql-test')
-rwxr-xr-xmysql-test/mysql-test-run.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index c494626bbae..85191a0be00 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1784,6 +1784,17 @@ sub environment_setup () {
split(':', $ENV{'DYLD_LIBRARY_PATH'}) : ());
mtr_debug("DYLD_LIBRARY_PATH: $ENV{'DYLD_LIBRARY_PATH'}");
+ # The environment variable used for shared libs on AIX
+ $ENV{'SHLIB_PATH'}= join(":", @ld_library_paths,
+ $ENV{'SHLIB_PATH'} ?
+ split(':', $ENV{'SHLIB_PATH'}) : ());
+ mtr_debug("SHLIB_PATH: $ENV{'SHLIB_PATH'}");
+
+ # The environment variable used for shared libs on hp-ux
+ $ENV{'LIBPATH'}= join(":", @ld_library_paths,
+ $ENV{'LIBPATH'} ?
+ split(':', $ENV{'LIBPATH'}) : ());
+ mtr_debug("LIBPATH: $ENV{'LIBPATH'}");
# --------------------------------------------------------------------------
# Also command lines in .opt files may contain env vars