From: Date: September 22 2006 2:37pm Subject: bk commit into 5.0 tree (georg:1.2281) BUG#19121 List-Archive: http://lists.mysql.com/commits/12397 X-Bug: 19121 Message-Id: <20060922123702.B334C340600@lmy002.wdf.sap.corp> Below is the list of changes that have just been committed into a local 5.0 repository of georg. When georg 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, 2006-09-22 14:36:52+02:00, georg@stripped +4 -0 Fix for bug #19121: Windows incompatible udf_example sql/CMakeLists.txt@stripped, 2006-09-22 14:36:48+02:00, georg@stripped +4 -1 Added missing udf_example sql/Makefile.am@stripped, 2006-09-22 14:36:48+02:00, georg@stripped +2 -1 Added udf_example files for make dist sql/udf_example.c@stripped, 2006-09-22 14:36:48+02:00, georg@stripped +11 -0 fix for Windows: Windows doesn't have socket.h and friends Added replacements for strmov,bzero and memcpy_fixed when compiling standalone. sql/udf_example.def@stripped, 2006-09-22 14:35:26+02:00, georg@stripped +24 -0 BitKeeper file /home/georg/work/mysql/prod/mysql-5.0-win/sql/udf_example.def sql/udf_example.def@stripped, 2006-09-22 14:35:26+02:00, georg@stripped +0 -0 # 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: georg # Host: lmy002.wdf.sap.corp # Root: /home/georg/work/mysql/prod/mysql-5.0-win --- 1.122/sql/Makefile.am 2006-09-22 14:37:02 +02:00 +++ 1.123/sql/Makefile.am 2006-09-22 14:37:02 +02:00 @@ -117,7 +117,8 @@ BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h EXTRA_DIST = $(BUILT_SOURCES) nt_servc.cc nt_servc.h \ - message.mc examples/CMakeLists.txt CMakeLists.txt + message.mc examples/CMakeLists.txt CMakeLists.txt \ + udf_example.c udf_example.def DISTCLEANFILES = lex_hash.h sql_yacc.output AM_YFLAGS = -d --debug --verbose --- 1.29/sql/udf_example.c 2006-09-22 14:37:02 +02:00 +++ 1.30/sql/udf_example.c 2006-09-22 14:37:02 +02:00 @@ -127,7 +127,14 @@ #else #include #include +#if defined(MYSQL_SERVER) #include /* To get strmov() */ +#else +/* when compiled as standalone */ +#define strmov(a,b) strcpy(a,b) +#define bzero(a,b) memset(a,0,b) +#define memcpy_fixed(a,b,c) memcpy(a,b,c) +#endif #endif #include #include @@ -674,10 +681,14 @@ ** ****************************************************************************/ +#ifdef __WIN__ +#include +#else #include #include #include #include +#endif my_bool lookup_init(UDF_INIT *initid, UDF_ARGS *args, char *message); void lookup_deinit(UDF_INIT *initid); --- 1.1/sql/CMakeLists.txt 2006-09-22 14:37:02 +02:00 +++ 1.2/sql/CMakeLists.txt 2006-09-22 14:37:02 +02:00 @@ -110,5 +110,8 @@ COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h DEPENDS ${GEN_LEX_HASH_EXE} ) - ADD_DEPENDENCIES(mysqld gen_lex_hash) + +ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def) +ADD_DEPENDENCIES(udf_example strings) +TARGET_LINK_LIBRARIES(udf_example wsock32) --- New file --- +++ sql/udf_example.def 06/09/22 14:35:26 LIBRARY udf_example DESCRIPTION 'MySQL Sample for UDF' VERSION 1.0 EXPORTS lookup lookup_init reverse_lookup reverse_lookup_init metaphon_init metaphon_deinit metaphon myfunc_double_init myfunc_double myfunc_int_init myfunc_int sequence_init sequence_deinit sequence avgcost_init avgcost_deinit avgcost_reset avgcost_add avgcost_clear avgcost