Below is the list of changes that have just been committed into a local
5.0 repository of mhansson. When mhansson 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-16 17:30:02+02:00, mhansson@stripped +2 -0
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: add the library path to SHLIB_PATH
mysql-test/mysql-test-run.pl@stripped, 2007-05-16 17:30:00+02:00, mhansson@stripped
+9 -0
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@stripped, 2007-05-16 17:30:00+02:00, mhansson@stripped +1 -1
bug#27741: define strmov as stpcpy rather than strcpy
# 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: mhansson
# Host: dl145s.mysql.com
# Root: /users/mhansson/5.0o-bug27741
--- 1.34/sql/udf_example.c 2006-12-23 20:04:28 +01:00
+++ 1.35/sql/udf_example.c 2007-05-16 17:30:00 +02:00
@@ -130,7 +130,7 @@ typedef long long longlong;
#include <m_string.h> /* To get strmov() */
#else
/* when compiled as standalone */
-#define strmov(a,b) strcpy(a,b)
+#define strmov(a,b) ((char*)stpcpy(a,b))
#define bzero(a,b) memset(a,0,b)
#define memcpy_fixed(a,b,c) memcpy(a,b,c)
#endif
--- 1.218/mysql-test/mysql-test-run.pl 2007-04-13 15:06:04 +02:00
+++ 1.219/mysql-test/mysql-test-run.pl 2007-05-16 17:30:00 +02:00
@@ -1785,6 +1785,15 @@ sub environment_setup () {
mtr_debug("DYLD_LIBRARY_PATH: $ENV{'DYLD_LIBRARY_PATH'}");
+ $ENV{'SHLIB_PATH'}= join(":", @ld_library_paths,
+ $ENV{'SHLIB_PATH'} ?
+ split(':', $ENV{'SHLIB_PATH'}) : ());
+ mtr_debug("SHLIB_PATH: $ENV{'SHLIB_PATH'}");
+ $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
# --------------------------------------------------------------------------
| Thread |
|---|
| • bk commit into 5.0 tree (mhansson:1.2470) BUG#27741 | mhansson | 16 May |