diff --git a/Makefile.am b/Makefile.am index f2450dffb45..3d49ce03c12 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS = foreign # These are built from source in the Docs directory EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \ - README COPYING EXCEPTIONS-CLIENT + README COPYING EXCEPTIONS-CLIENT cmakelists.txt SUBDIRS = . include @docs_dirs@ @zlib_dir@ @yassl_dir@ \ @readline_topdir@ sql-common \ @thread_dirs@ pstack \ @@ -29,7 +29,7 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ @yassl_dir@ \ @mysql_se_plugins@ \ netware @libmysqld_dirs@ \ @bench_dirs@ support-files @tools_dirs@ \ - plugin + plugin win DIST_SUBDIRS = . include @docs_dirs@ zlib \ @readline_topdir@ sql-common \ @@ -39,7 +39,7 @@ DIST_SUBDIRS = . include @docs_dirs@ zlib \ @man_dirs@ tests SSL\ BUILD netware os2 @libmysqld_dirs@\ @bench_dirs@ support-files server-tools tools \ - plugin + plugin win # Run these targets before any others, also make part of clean target, # to make sure we create new links after a clean. diff --git a/client/Makefile.am b/client/Makefile.am index af7c3d2a549..970ca744146 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -77,6 +77,7 @@ strings_src=decimal.c # Fix for mit-threads DEFS = -DUNDEF_THREADS_HACK +EXTRA_DIST = get_password.c cmakelists.txt link_sources: for f in $(sql_src) ; do \ diff --git a/cmakelists.txt b/cmakelists.txt index 6c6834730b0..5ed5069fb46 100644 --- a/cmakelists.txt +++ b/cmakelists.txt @@ -33,5 +33,5 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visu ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D _CRT_SECURE_NO_DEPRECATE") SUBDIRS(vio dbug strings regex mysys extra/yassl extra/yassl/taocrypt extra - zlib storage/innobase storage/heap storage/myisam storage/myisammrg - client sql server-tools/instance-manager libmysql tests) + zlib storage/heap storage/myisam storage/myisammrg client + ${se_subdirs} sql server-tools/instance-manager libmysql tests) diff --git a/configure.in b/configure.in index 1140048d8e5..3dfbe913727 100644 --- a/configure.in +++ b/configure.in @@ -2620,7 +2620,8 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl zlib/Makefile dnl cmd-line-utils/readline/Makefile dnl plugin/Makefile dnl - plugin/fulltext/Makefile) + plugin/fulltext/Makefile dnl + win/Makefile) AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h) AC_OUTPUT diff --git a/dbug/Makefile.am b/dbug/Makefile.am index 1046e770fa7..b0c8862bede 100644 --- a/dbug/Makefile.am +++ b/dbug/Makefile.am @@ -20,7 +20,7 @@ LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a pkglib_LIBRARIES = libdbug.a noinst_HEADERS = dbug_long.h libdbug_a_SOURCES = dbug.c sanity.c -EXTRA_DIST = example1.c example2.c example3.c \ +EXTRA_DIST = cmakelists.txt example1.c example2.c example3.c \ user.r monty.doc dbug_add_tags.pl \ my_main.c main.c factorial.c dbug_analyze.c NROFF_INC = example1.r example2.r example3.r main.r \ diff --git a/extra/Makefile.am b/extra/Makefile.am index 4fe1039d306..0aaa8c4d127 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -43,6 +43,7 @@ $(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ resolve_stack_dump mysql_waitpid innochecksum noinst_PROGRAMS = charset2html +EXTRA_DIST = cmakelists.txt perror.o: perror.c $(COMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $< diff --git a/extra/comp_err.c b/extra/comp_err.c index 2d685a04087..0a77cf6f66d 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -188,8 +188,9 @@ int main(int argc, char *argv[]) DBUG_RETURN(1); } clean_up(lang_head, error_head); + DBUG_LEAVE; /* Can't use dbug after my_end() */ my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); - DBUG_RETURN(0); + return 0; } } diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am index 7ec49ec8c33..3ce5e2632cc 100644 --- a/extra/yassl/Makefile.am +++ b/extra/yassl/Makefile.am @@ -1,2 +1,3 @@ SUBDIRS = taocrypt src -EXTRA_DIST = yassl.dsp yassl.dsw yassl.vcproj $(wildcard mySTL/*.hpp) +EXTRA_DIST = yassl.dsp yassl.dsw yassl.vcproj $(wildcard mySTL/*.hpp) \ + cmakelists.txt diff --git a/extra/yassl/taocrypt/Makefile.am b/extra/yassl/taocrypt/Makefile.am index c8413af3285..e882f7bafe6 100644 --- a/extra/yassl/taocrypt/Makefile.am +++ b/extra/yassl/taocrypt/Makefile.am @@ -1,2 +1,2 @@ SUBDIRS = src -EXTRA_DIST = taocrypt.dsw taocrypt.dsp taocrypt.vcproj +EXTRA_DIST = taocrypt.dsw taocrypt.dsp taocrypt.vcproj cmakelists.txt diff --git a/include/my_dbug.h b/include/my_dbug.h index db2139fa2e2..65bb7b55d0d 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -81,6 +81,7 @@ extern FILE *_db_fp_(void); #else /* No debugger */ #define DBUG_ENTER(a1) +#define DBUG_LEAVE #define DBUG_RETURN(a1) do { return(a1); } while(0) #define DBUG_VOID_RETURN do { return; } while(0) #define DBUG_EXECUTE(keyword,a1) do { } while(0) diff --git a/include/my_pthread.h b/include/my_pthread.h index 81100fe2b88..9146cab8589 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -116,6 +116,13 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #define _REENTRANT 1 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 +/* + Windows has two ways to use thread local storage. The most efficient + is using __declspec(thread), but that does not work properly when + used in a .dll that is loaded at runtime, after program load. So for + libmysql.dll and libmysqld.dll we define USE_TLS in order to use the + TlsXxx() API instead, which works in all cases. +*/ #ifdef USE_TLS /* For LIBMYSQL.DLL */ #undef SAFE_MUTEX /* This will cause conflicts */ #define pthread_key(T,V) DWORD V diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index a3e16b521a9..8cc29ec690a 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -31,7 +31,7 @@ include $(srcdir)/Makefile.shared libmysqlclient_la_SOURCES = $(target_sources) libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_libs_with_path) libmysqlclient_la_LDFLAGS = $(target_ldflags) -EXTRA_DIST = Makefile.shared libmysql.def +EXTRA_DIST = Makefile.shared libmysql.def dll.c mytest.c cmakelists.txt noinst_HEADERS = client_settings.h # This is called from the toplevel makefile diff --git a/libmysql/cmakelists.txt b/libmysql/cmakelists.txt index 006eac2fbb9..35795102082 100644 --- a/libmysql/cmakelists.txt +++ b/libmysql/cmakelists.txt @@ -1,5 +1,7 @@ -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +# Need to set USE_TLS, since __declspec(thread) approach to thread local +# storage does not work properly in DLLs. +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib @@ -48,6 +50,5 @@ ADD_LIBRARY(libmysql MODULE dll.c libmysql.def ADD_DEPENDENCIES(libmysql dbug vio mysys strings GenError zlib yassl taocrypt) TARGET_LINK_LIBRARIES(libmysql mysys strings wsock32) -# ToDo: We should move the mytest.c program out in libmysql/ -ADD_EXECUTABLE(myTest ../VC++Files/libmysqltest/mytest.c) +ADD_EXECUTABLE(myTest mytest.c) TARGET_LINK_LIBRARIES(myTest libmysql) diff --git a/libmysql/mytest.c b/libmysql/mytest.c new file mode 100644 index 00000000000..a1dc13db39f --- /dev/null +++ b/libmysql/mytest.c @@ -0,0 +1,175 @@ +/*C4*/ +/****************************************************************/ +/* Author: Jethro Wright, III TS : 3/ 4/1998 9:15 */ +/* Date: 02/18/1998 */ +/* mytest.c : do some testing of the libmySQL.DLL.... */ +/* */ +/* History: */ +/* 02/18/1998 jw3 also sprach zarathustra.... */ +/****************************************************************/ + + +#include +#include +#include + +#include + +#define DEFALT_SQL_STMT "SELECT * FROM db" +#ifndef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif + + +/******************************************************** +** +** main :- +** +********************************************************/ + +int +main( int argc, char * argv[] ) +{ + + char szSQL[ 200 ], aszFlds[ 25 ][ 25 ], szDB[ 50 ] ; + const char *pszT; + int i, j, k, l, x ; + MYSQL * myData ; + MYSQL_RES * res ; + MYSQL_FIELD * fd ; + MYSQL_ROW row ; + + //....just curious.... + printf( "sizeof( MYSQL ) == %d\n", (int) sizeof( MYSQL ) ) ; + if ( argc == 2 ) + { + strcpy( szDB, argv[ 1 ] ) ; + strcpy( szSQL, DEFALT_SQL_STMT ) ; + if (!strcmp(szDB,"--debug")) + { + strcpy( szDB, "mysql" ) ; + printf("Some mysql struct information (size and offset):\n"); + printf("net:\t%3d %3d\n",(int) sizeof(myData->net), + (int) offsetof(MYSQL,net)); + printf("host:\t%3d %3d\n",(int) sizeof(myData->host), + (int) offsetof(MYSQL,host)); + printf("port:\t%3d %3d\n", (int) sizeof(myData->port), + (int) offsetof(MYSQL,port)); + printf("protocol_version:\t%3d %3d\n", + (int) sizeof(myData->protocol_version), + (int) offsetof(MYSQL,protocol_version)); + printf("thread_id:\t%3d %3d\n",(int) sizeof(myData->thread_id), + (int) offsetof(MYSQL,thread_id)); + printf("affected_rows:\t%3d %3d\n",(int) sizeof(myData->affected_rows), + (int) offsetof(MYSQL,affected_rows)); + printf("packet_length:\t%3d %3d\n",(int) sizeof(myData->packet_length), + (int) offsetof(MYSQL,packet_length)); + printf("status:\t%3d %3d\n",(int) sizeof(myData->status), + (int) offsetof(MYSQL,status)); + printf("fields:\t%3d %3d\n",(int) sizeof(myData->fields), + (int) offsetof(MYSQL,fields)); + printf("field_alloc:\t%3d %3d\n",(int) sizeof(myData->field_alloc), + (int) offsetof(MYSQL,field_alloc)); + printf("free_me:\t%3d %3d\n",(int) sizeof(myData->free_me), + (int) offsetof(MYSQL,free_me)); + printf("options:\t%3d %3d\n",(int) sizeof(myData->options), + (int) offsetof(MYSQL,options)); + puts(""); + } + } + else if ( argc > 2 ) { + strcpy( szDB, argv[ 1 ] ) ; + strcpy( szSQL, argv[ 2 ] ) ; + } + else { + strcpy( szDB, "mysql" ) ; + strcpy( szSQL, DEFALT_SQL_STMT ) ; + } + //.... + + if ( (myData = mysql_init((MYSQL*) 0)) && + mysql_real_connect( myData, NULL, NULL, NULL, NULL, MYSQL_PORT, + NULL, 0 ) ) + { + myData->reconnect= 1; + if ( mysql_select_db( myData, szDB ) < 0 ) { + printf( "Can't select the %s database !\n", szDB ) ; + mysql_close( myData ) ; + return 2 ; + } + } + else { + printf( "Can't connect to the mysql server on port %d !\n", + MYSQL_PORT ) ; + mysql_close( myData ) ; + return 1 ; + } + //.... + if ( ! mysql_query( myData, szSQL ) ) { + res = mysql_store_result( myData ) ; + i = (int) mysql_num_rows( res ) ; l = 1 ; + printf( "Query: %s\nNumber of records found: %ld\n", szSQL, i ) ; + //....we can get the field-specific characteristics here.... + for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ ) + strcpy( aszFlds[ x ], fd->name ) ; + //.... + while ( row = mysql_fetch_row( res ) ) { + j = mysql_num_fields( res ) ; + printf( "Record #%ld:-\n", l++ ) ; + for ( k = 0 ; k < j ; k++ ) + printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ], + (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ; + puts( "==============================\n" ) ; + } + mysql_free_result( res ) ; + } + else printf( "Couldn't execute %s on the server !\n", szSQL ) ; + //.... + puts( "==== Diagnostic info ====" ) ; + pszT = mysql_get_client_info() ; + printf( "Client info: %s\n", pszT ) ; + //.... + pszT = mysql_get_host_info( myData ) ; + printf( "Host info: %s\n", pszT ) ; + //.... + pszT = mysql_get_server_info( myData ) ; + printf( "Server info: %s\n", pszT ) ; + //.... + res = mysql_list_processes( myData ) ; l = 1 ; + if (res) + { + for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ ) + strcpy( aszFlds[ x ], fd->name ) ; + while ( row = mysql_fetch_row( res ) ) { + j = mysql_num_fields( res ) ; + printf( "Process #%ld:-\n", l++ ) ; + for ( k = 0 ; k < j ; k++ ) + printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ], + (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ; + puts( "==============================\n" ) ; + } + } + else + { + printf("Got error %s when retreiving processlist\n",mysql_error(myData)); + } + //.... + res = mysql_list_tables( myData, "%" ) ; l = 1 ; + for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ ) + strcpy( aszFlds[ x ], fd->name ) ; + while ( row = mysql_fetch_row( res ) ) { + j = mysql_num_fields( res ) ; + printf( "Table #%ld:-\n", l++ ) ; + for ( k = 0 ; k < j ; k++ ) + printf( " Fld #%d (%s): %s\n", k + 1, aszFlds[ k ], + (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k])) ; + puts( "==============================\n" ) ; + } + //.... + pszT = mysql_stat( myData ) ; + puts( pszT ) ; + //.... + mysql_close( myData ) ; + return 0 ; + +} diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index be9947ca2dd..b5d437918ae 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -22,6 +22,7 @@ MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(libdir) +EXTRA_DIST = libmysqld.def DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 3a3dedfd963..6b87d5ddd6c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1063,6 +1063,8 @@ sub executable_setup () { $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysql_client_test= mtr_exe_exists("$glob_basedir/tests/mysql_client_test", + "$glob_basedir/tests/release/mysql_client_test", + "$glob_basedir/tests/debug/mysql_client_test", "$path_client_bindir/mysql_client_test", "/usr/bin/false"); } @@ -1074,7 +1076,8 @@ sub executable_setup () { $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin"); $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $exe_mysql_fix_system_tables= - mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables"); + mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables", + "/usr/bin/false"); $path_ndb_tools_dir= mtr_path_exists("$glob_basedir/storage/ndb/tools"); $exe_ndb_mgm= "$glob_basedir/storage/ndb/src/mgmclient/ndb_mgm"; } @@ -1090,7 +1093,8 @@ sub executable_setup () { $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $exe_mysql_fix_system_tables= mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables", - "$glob_basedir/scripts/mysql_fix_privilege_tables"); + "$glob_basedir/scripts/mysql_fix_privilege_tables", + "/usr/bin/false"); $exe_my_print_defaults= mtr_exe_exists("$path_client_bindir/my_print_defaults"); @@ -1126,6 +1130,8 @@ sub executable_setup () { $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest"); $exe_mysql_client_test= mtr_exe_exists("$path_client_bindir/mysql_client_test", + "$glob_basedir/tests/release/mysql_client_test", + "$glob_basedir/tests/debug/mysql_client_test", "/usr/bin/false"); # FIXME temporary } diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 121342bec87..51ea249bbf6 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -58,7 +58,9 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ my_handler.c my_netware.c my_largepage.c \ my_windac.c my_access.c base64.c EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ - thr_mutex.c thr_rwlock.c + thr_mutex.c thr_rwlock.c \ + cmakelists.txt mf_soundex.c \ + my_conio.c my_wincond.c my_winsem.c my_winthread.c libmysys_a_LIBADD = @THREAD_LOBJECTS@ # test_dir_DEPENDENCIES= $(LIBRARIES) # testhash_DEPENDENCIES= $(LIBRARIES) diff --git a/mysys/cmakelists.txt b/mysys/cmakelists.txt index ceecc1368ec..5a3b8f1657e 100644 --- a/mysys/cmakelists.txt +++ b/mysys/cmakelists.txt @@ -1,5 +1,13 @@ -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR") +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") + +# Need to set USE_TLS, since mysys is linked into libmysql.dll and +# libmysqld.dll, and __declspec(thread) approach to thread local storage does +# not work properly in DLLs. +# Currently, USE_TLS crashes in Debug builds, so until that is fixed Debug +# .dlls cannot be loaded at runtime. +SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_TLS") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DUSE_TLS") INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include) ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c diff --git a/mysys/my_init.c b/mysys/my_init.c index efeee0fbc76..31757cd5df0 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -134,7 +134,10 @@ void my_end(int infoflag) */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); - DBUG_ENTER("my_end"); + /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer + operational, so we cannot use DBUG_RETURN. + */ + DBUG_PRINT("info",("Shutting down")); if (!info_file) { info_file= stderr; @@ -214,7 +217,6 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", WSACleanup(); #endif /* __WIN__ */ my_init_done=0; - DBUG_VOID_RETURN; } /* my_end */ diff --git a/regex/Makefile.am b/regex/Makefile.am index 7e8478e8123..6fd5b1b57a2 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -25,7 +25,7 @@ re_SOURCES = split.c debug.c main.c re_LDFLAGS= @NOINST_LDFLAGS@ EXTRA_DIST = tests CHANGES COPYRIGHT WHATSNEW regexp.c \ debug.ih engine.ih main.ih regcomp.ih regerror.ih \ - regex.3 regex.7 + regex.3 regex.7 cmakelists.txt test: re tests ./re < tests diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am index ab08df99fd9..462d7984aa4 100644 --- a/server-tools/instance-manager/Makefile.am +++ b/server-tools/instance-manager/Makefile.am @@ -87,6 +87,8 @@ mysqlmanager_LDADD= @CLIENT_EXTRA_LDFLAGS@ \ $(top_builddir)/dbug/libdbug.a \ @openssl_libs@ @yassl_libs@ @ZLIB_LIBS@ +EXTRA_DIST = WindowsService.cpp WindowsService.h IMService.cpp \ + IMService.h cmakelists.txt tags: ctags -R *.h *.cc diff --git a/sql/Makefile.am b/sql/Makefile.am index aff08ba64d8..60e7891931f 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -124,7 +124,8 @@ DEFS = -DMYSQL_SERVER \ @DEFS@ BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h -EXTRA_DIST = udf_example.cc $(BUILT_SOURCES) +EXTRA_DIST = udf_example.cc $(BUILT_SOURCES) \ + nt_servc.cc nt_servc.h message.mc cmakelists.txt CLEANFILES = lex_hash.h sql_yacc.cc sql_yacc.h AM_YFLAGS = -d diff --git a/sql/cmakelists.txt b/sql/cmakelists.txt index d4e8c9a826b..81b4c3de10e 100644 --- a/sql/cmakelists.txt +++ b/sql/cmakelists.txt @@ -5,7 +5,9 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/zlib) + ${CMAKE_SOURCE_DIR}/zlib + ${CMAKE_SOURCE_DIR}/storage/bdb/build_win32 + ${CMAKE_SOURCE_DIR}/storage/bdb/dbinc) SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc ${CMAKE_SOURCE_DIR}/sql/message.h @@ -61,9 +63,8 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/handlerton.cc.in ${CMAKE_SOURCE_DIR}/sql/ ADD_DEFINITIONS(-DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER -D_CONSOLE -DHAVE_DLOPEN) ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc discover.cc ../libmysql/errmsg.c field.cc - field_conv.cc filesort.cc gstream.cc ha_blackhole.cc - ha_federated.cc ha_heap.cc ha_innodb.cc ha_myisam.cc ha_myisammrg.cc - ha_partition.cc handler.cc hash_filo.cc hash_filo.h hostname.cc + field_conv.cc filesort.cc gstream.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc + ${handlertons} handler.cc hash_filo.cc hash_filo.h hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc item_create.cc item_func.cc item_geofunc.cc item_row.cc item_strfunc.cc item_subselect.cc item_sum.cc item_timefunc.cc item_uniq.cc key.cc log.cc lock.cc log_event.cc message.rc message.h mf_iocache.cc @@ -88,7 +89,7 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc discover. ${PROJECT_SOURCE_DIR}/include/mysql_version.h ${PROJECT_SOURCE_DIR}/sql/handlerton.cc ${PROJECT_SOURCE_DIR}/sql/lex_hash.h) -TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg innobase mysys yassl zlib dbug yassl taocrypt strings vio regex wsock32) +TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg ${se_deps} mysys yassl zlib dbug yassl taocrypt strings vio regex wsock32) ADD_DEPENDENCIES(mysqld GenError) # Sql Parser custom command @@ -106,10 +107,10 @@ ADD_CUSTOM_COMMAND( # Windows message file ADD_CUSTOM_COMMAND( - SOURCE ../VC++Files/sql/messae.mc + SOURCE message.mc OUTPUT message.rc message.h - COMMAND mc ARGS ../VC++Files/sql/message.mc - DEPENDS ../VC++Files/sql/message.mc) + COMMAND mc ARGS message.mc + DEPENDS message.mc) # Gen_lex_hash ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) diff --git a/sql/message.mc b/sql/message.mc new file mode 100644 index 00000000000..a1a7c8cff7e --- /dev/null +++ b/sql/message.mc @@ -0,0 +1,8 @@ +MessageId = 100 +Severity = Error +Facility = Application +SymbolicName = MSG_DEFAULT +Language = English +%1For more information, see Help and Support Center at http://www.mysql.com. + + diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ccb74730bc3..99948bff8d2 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8173,6 +8173,7 @@ my_bool innobase_log_archive, innobase_file_per_table, innobase_locks_unsafe_for_binlog; +extern "C" { ulong srv_max_buf_pool_modified_pct; ulong srv_max_purge_lag; ulong srv_auto_extend_increment; @@ -8181,6 +8182,7 @@ ulong srv_n_free_tickets_to_enter; ulong srv_thread_sleep_delay; ulong srv_thread_concurrency; ulong srv_commit_concurrency; +} #endif #ifndef WITH_NDBCLUSTER_STORAGE_ENGINE diff --git a/sql/sql_class.h b/sql/sql_class.h index bcc00c19eb0..cc1c5488ae5 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1605,13 +1605,14 @@ public: lock(0) {} int prepare(List &list, SELECT_LEX_UNIT *u); - friend class select_create_prepare_hooks; void binlog_show_create_table(TABLE **tables, uint count); void store_values(List &values); void send_error(uint errcode,const char *err); bool send_eof(); void abort(); + // Needed for access from local class MY_HOOKS in prepare(), since thd is proteted. + THD *get_thd(void) { return thd; } }; #include diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 13e1f80f512..168d3950830 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2507,28 +2507,25 @@ bool select_insert::send_eof() CREATE TABLE (SELECT) ... ***************************************************************************/ -/* HPUX compiler bug prevents this from being a local class, since then it - does not have access to protected member select_create::thd. -*/ -class select_create_prepare_hooks : public TABLEOP_HOOKS { -public: - select_create_prepare_hooks(select_create *x) : ptr(x) { } - virtual void do_prelock(TABLE **tables, uint count) - { - if (ptr->thd->current_stmt_binlog_row_based) - ptr->binlog_show_create_table(tables, count); - } - -private: - select_create *ptr; -}; - int select_create::prepare(List &values, SELECT_LEX_UNIT *u) { DBUG_ENTER("select_create::prepare"); - select_create_prepare_hooks hooks(this); + class MY_HOOKS : public TABLEOP_HOOKS { + public: + MY_HOOKS(select_create *x) : ptr(x) { } + virtual void do_prelock(TABLE **tables, uint count) + { + if (ptr->get_thd()->current_stmt_binlog_row_based) + ptr->binlog_show_create_table(tables, count); + } + + private: + select_create *ptr; + }; + + MY_HOOKS hooks(this); unit= u; table= create_table_from_items(thd, create_info, create_table, diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am index c2ae9d6b728..415e0dc8f8f 100644 --- a/storage/archive/Makefile.am +++ b/storage/archive/Makefile.am @@ -27,6 +27,7 @@ noinst_PROGRAMS = archive_test archive_test_LDFLAGS = @NOINST_LDFLAGS@ noinst_HEADERS = azlib.h libarchive_a_SOURCES = azio.c +EXTRA_DIST = cmakelists.txt # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/storage/archive/cmakelists.txt b/storage/archive/cmakelists.txt new file mode 100644 index 00000000000..4189781e73a --- /dev/null +++ b/storage/archive/cmakelists.txt @@ -0,0 +1,6 @@ +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib) +ADD_LIBRARY(archive azio.c) +TARGET_LINK_LIBRARIES(archive zlib mysys dbug strings) diff --git a/storage/bdb/Makefile.in b/storage/bdb/Makefile.in index c6d445f2ed5..4e2439025f3 100644 --- a/storage/bdb/Makefile.in +++ b/storage/bdb/Makefile.in @@ -23,13 +23,13 @@ top_srcdir = @top_srcdir@ # distdir and top_distdir are set by the calling Makefile bdb_build = build_unix -files = LICENSE Makefile Makefile.in README +files = LICENSE Makefile Makefile.in README cmakelists.txt subdirs = btree build_win32 clib common cxx db dbinc \ dbinc_auto db185 db_archive db_checkpoint db_deadlock db_dump \ db_dump185 db_hotbackup db_load db_printlog db_recover db_stat db_upgrade \ db_verify dbm dbreg dist env fileops hash \ hsearch hmac include lock log mp mutex os \ - os_win32 qam rep txn xa sequence + os_win32 qam rep txn xa sequence crypto @SET_MAKE@ diff --git a/storage/bdb/cmakelists.txt b/storage/bdb/cmakelists.txt index 8651930657f..c27665d902c 100644 --- a/storage/bdb/cmakelists.txt +++ b/storage/bdb/cmakelists.txt @@ -1,8 +1,67 @@ -SET(CMAKE_CXX_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -#INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/extra/yassl/include) -ADD_LIBRARY(bdb _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c - hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c - hp_rename.c hp_rfirst.c hp_rkey.c hp_rlast.c hp_rnext.c hp_rprev.c - hp_rrnd.c hp_rsame.c hp_scan.c hp_static.c hp_update.c hp_write.c) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/bdb/build_win32 + ${CMAKE_SOURCE_DIR}/storage/bdb/dbinc + ${CMAKE_SOURCE_DIR}/storage/bdb) + +# BDB needs a number of source files that are auto-generated by the unix +# configure. So to build BDB, it is necessary to copy these over to the Windows +# bitkeeper tree, or to use a source .tar.gz package which already has these +# files. +ADD_LIBRARY(bdb crypto/aes_method.c btree/bt_compact.c btree/bt_compare.c + btree/bt_conv.c btree/bt_curadj.c btree/bt_cursor.c + btree/bt_delete.c btree/bt_method.c btree/bt_open.c btree/bt_put.c + btree/bt_rec.c btree/bt_reclaim.c btree/bt_recno.c + btree/bt_rsearch.c btree/bt_search.c btree/bt_split.c + btree/bt_stat.c btree/bt_upgrade.c btree/bt_verify.c + btree/btree_auto.c db/crdel_auto.c db/crdel_rec.c crypto/crypto.c + db/db.c db/db_am.c db/db_auto.c common/db_byteorder.c db/db_cam.c + common/db_clock.c db/db_conv.c db/db_dispatch.c db/db_dup.c + common/db_err.c common/db_getlong.c common/db_idspace.c + db/db_iface.c db/db_join.c common/db_log2.c db/db_meta.c + db/db_method.c db/db_open.c db/db_overflow.c db/db_ovfl_vrfy.c + db/db_pr.c db/db_rec.c db/db_reclaim.c db/db_remove.c + db/db_rename.c db/db_ret.c env/db_salloc.c db/db_setid.c + db/db_setlsn.c env/db_shash.c db/db_stati.c db/db_truncate.c + db/db_upg.c db/db_upg_opd.c db/db_vrfy.c db/db_vrfyutil.c + dbm/dbm.c dbreg/dbreg.c dbreg/dbreg_auto.c dbreg/dbreg_rec.c + dbreg/dbreg_stat.c dbreg/dbreg_util.c env/env_failchk.c + env/env_file.c env/env_method.c env/env_open.c env/env_recover.c + env/env_region.c env/env_register.c env/env_stat.c + fileops/fileops_auto.c fileops/fop_basic.c fileops/fop_rec.c + fileops/fop_util.c hash/hash.c hash/hash_auto.c hash/hash_conv.c + hash/hash_dup.c hash/hash_func.c hash/hash_meta.c + hash/hash_method.c hash/hash_open.c hash/hash_page.c + hash/hash_rec.c hash/hash_reclaim.c hash/hash_stat.c + hash/hash_upgrade.c hash/hash_verify.c hmac/hmac.c + hsearch/hsearch.c lock/lock.c lock/lock_deadlock.c + lock/lock_failchk.c lock/lock_id.c lock/lock_list.c + lock/lock_method.c lock/lock_region.c lock/lock_stat.c + lock/lock_timer.c lock/lock_util.c log/log.c log/log_archive.c + log/log_compare.c log/log_debug.c log/log_get.c log/log_method.c + log/log_put.c log/log_stat.c mp/mp_alloc.c mp/mp_bh.c mp/mp_fget.c + mp/mp_fmethod.c mp/mp_fopen.c mp/mp_fput.c mp/mp_fset.c + mp/mp_method.c mp/mp_region.c mp/mp_register.c mp/mp_stat.c + mp/mp_sync.c mp/mp_trickle.c crypto/mersenne/mt19937db.c + mutex/mut_alloc.c mutex/mut_method.c mutex/mut_region.c + mutex/mut_stat.c mutex/mut_tas.c mutex/mut_win32.c + os_win32/os_abs.c os/os_alloc.c os_win32/os_clock.c + os_win32/os_config.c os_win32/os_dir.c os_win32/os_errno.c + os_win32/os_fid.c os_win32/os_flock.c os_win32/os_fsync.c + os_win32/os_handle.c os/os_id.c os_win32/os_map.c os/os_method.c + os/os_oflags.c os_win32/os_open.c os/os_region.c + os_win32/os_rename.c os/os_root.c os/os_rpath.c os_win32/os_rw.c + os_win32/os_seek.c os_win32/os_sleep.c os_win32/os_spin.c + os_win32/os_stat.c os/os_tmpdir.c os_win32/os_truncate.c + os/os_unlink.c qam/qam.c qam/qam_auto.c qam/qam_conv.c + qam/qam_files.c qam/qam_method.c qam/qam_open.c qam/qam_rec.c + qam/qam_stat.c qam/qam_upgrade.c qam/qam_verify.c rep/rep_auto.c + rep/rep_backup.c rep/rep_elect.c rep/rep_log.c rep/rep_method.c + rep/rep_record.c rep/rep_region.c rep/rep_stat.c rep/rep_stub.c + rep/rep_util.c rep/rep_verify.c crypto/rijndael/rijndael-alg-fst.c + crypto/rijndael/rijndael-api-fst.c hmac/sha1.c clib/strcasecmp.c + txn/txn.c txn/txn_auto.c txn/txn_chkpt.c txn/txn_failchk.c + txn/txn_method.c txn/txn_rec.c txn/txn_recover.c txn/txn_region.c + txn/txn_stat.c txn/txn_util.c common/util_log.c common/util_sig.c + xa/xa.c xa/xa_db.c xa/xa_map.c) diff --git a/storage/example/Makefile.am b/storage/example/Makefile.am index efc0ede91e9..68db89ee220 100644 --- a/storage/example/Makefile.am +++ b/storage/example/Makefile.am @@ -31,7 +31,7 @@ pkglib_LTLIBRARIES = ha_example.la ha_example_la_LDFLAGS = -module noinst_HEADERS = ha_example.h ha_example_la_SOURCES = ha_example.cc - +EXTRA_DIST = cmakelists.txt LDADD = DEFS = -DMYSQL_SERVER @DEFS@ diff --git a/storage/example/cmakelists.txt b/storage/example/cmakelists.txt new file mode 100644 index 00000000000..f4579aa0c66 --- /dev/null +++ b/storage/example/cmakelists.txt @@ -0,0 +1,6 @@ +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql + ${CMAKE_SOURCE_DIR}/extra/yassl/include) +ADD_LIBRARY(example ha_example.cc) diff --git a/storage/heap/Makefile.am b/storage/heap/Makefile.am index 79e0379f9a4..fceaeec664a 100644 --- a/storage/heap/Makefile.am +++ b/storage/heap/Makefile.am @@ -30,6 +30,7 @@ libheap_a_SOURCES = hp_open.c hp_extra.c hp_close.c hp_panic.c hp_info.c \ hp_rnext.c hp_rlast.c hp_rprev.c hp_clear.c \ hp_rkey.c hp_block.c \ hp_hash.c _check.c _rectest.c hp_static.c +EXTRA_DIST = cmakelists.txt # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index 9de4bcdc995..22796b45882 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -76,7 +76,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr include/univ.i include/usr0sess.h include/usr0sess.ic include/usr0types.h \ include/ut0byte.h include/ut0byte.ic include/ut0dbg.h include/ut0lst.h \ include/ut0mem.h include/ut0mem.ic include/ut0rnd.h include/ut0rnd.ic \ - include/ut0sort.h include/ut0ut.h include/ut0ut.ic + include/ut0sort.h include/ut0ut.h include/ut0ut.ic \ + cmakelists.txt # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 7b021087163..de57f6f07b8 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -40,7 +40,9 @@ if we are compiling on Windows. */ #undef VERSION /* Include the header file generated by GNU autoconf */ +#ifndef __WIN__ #include "../ib_config.h" +#endif #ifdef HAVE_SCHED_H #include diff --git a/storage/myisam/Makefile.am b/storage/myisam/Makefile.am index e4327070997..3c6a5c22234 100644 --- a/storage/myisam/Makefile.am +++ b/storage/myisam/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -EXTRA_DIST = mi_test_all.sh mi_test_all.res +EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c cmakelists.txt pkgdata_DATA = mi_test_all mi_test_all.res INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include diff --git a/storage/myisammrg/Makefile.am b/storage/myisammrg/Makefile.am index 14e3295c1ae..0719780b366 100644 --- a/storage/myisammrg/Makefile.am +++ b/storage/myisammrg/Makefile.am @@ -23,6 +23,7 @@ libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c \ myrg_rnext_same.c +EXTRA_DIST = cmakelists.txt # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/strings/Makefile.am b/strings/Makefile.am index fcb97a071f1..1183fcae01a 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -54,7 +54,7 @@ EXTRA_DIST = ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc bmove_upp-sparc.s strappend-sparc.s strend-sparc.s \ strinstr-sparc.s strmake-sparc.s strmov-sparc.s \ strnmov-sparc.s strstr-sparc.s strxmov-sparc.s \ - t_ctype.h my_strchr.c + t_ctype.h my_strchr.c cmakelists.txt libmystrings_a_LIBADD= conf_to_src_SOURCES = conf_to_src.c xml.c ctype.c bcmp.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 131f8b1b625..ba0a7ad73d0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,7 +29,8 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \ insert_and_repair.pl \ grant.pl grant.res test_delayed_insert.pl \ pmail.pl mail_to_db.pl table_types.pl \ - udf_test udf_test.res myisam-big-rows.tst + udf_test udf_test.res myisam-big-rows.tst \ + cmakelists.txt bin_PROGRAMS = mysql_client_test noinst_PROGRAMS = insert_test select_test thread_test diff --git a/vio/Makefile.am b/vio/Makefile.am index 544639139de..b7e002a3033 100644 --- a/vio/Makefile.am +++ b/vio/Makefile.am @@ -38,6 +38,7 @@ test_sslclient_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \ ../mysys/libmysys.a ../strings/libmystrings.a \ $(openssl_libs) $(yassl_libs) libvio_a_SOURCES= vio.c viosocket.c viossl.c viosslfactories.c +EXTRA_DIST= cmakelists.txt # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/win/Makefile.am b/win/Makefile.am new file mode 100644 index 00000000000..8442214bb97 --- /dev/null +++ b/win/Makefile.am @@ -0,0 +1,21 @@ +# Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +## Process this file with automake to create Makefile.in +EXTRA_DIST = build-vs71.bat build-vs8.bat config-handlerton.js configure.js config-version.js README + +# Don't update the files from bitkeeper +%::SCCS/s.% diff --git a/win/README b/win/README index 27c7e5c5762..dcd65516abe 100644 --- a/win/README +++ b/win/README @@ -34,12 +34,25 @@ Clone your bk tree to any location you like. Step 4 ------ From the root of your bk clone, execute the command: win\configure . -The options right now are WITH_INNODB and WITH_PARTITION. So the command line -would look like: +The options right now are -win\configure WITH_INNODB WITH_PARTITION + WITH_INNOBASE_STORAGE_ENGINE Enable particular storage engines + WITH_PARTITION_STORAGE_ENGINE + WITH_ARCHIVE_STORAGE_ENGINE + WITH_BERKELEY_STORAGE_ENGINE + WITH_BLACKHOLE_STORAGE_ENGINE + WITH_EXAMPLE_STORAGE_ENGINE + WITH_FEDERATED_STORAGE_ENGINE + WITH_INNOBASE_STORAGE_ENGINE + __NT__ Enable named pipe support + MYSQL_SERVER_SUFFIX= Server suffix, default none + COMPILATION_COMMENT= Server comment, default "Source distribution" + MYSQL_TCP_PORT= Server port, default 3306 + CYBOZU -These are the only two flags supported right now. Others will come later. +So the command line could look like: + +win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro Step 5 ------ @@ -60,11 +73,5 @@ click the build solution menu option. Current issues -------------- -1. Not all configurations are currently available. i.e. Classic, Pro, Max. -Currently, only debug and release are available. This will change in the near -future. - -2. The definitions set for features (partitioning, blackhole, etc) are not -changed based on the options given with configure. This will soon be fixed -as well. - +1. After changing configuration (eg. adding or removing a storage engine), it +may be necessary to clean the build tree to remove any stale objects. diff --git a/win/config-handlerton.js b/win/config-handlerton.js index fd668fa3ec0..1c20767695a 100644 --- a/win/config-handlerton.js +++ b/win/config-handlerton.js @@ -17,16 +17,41 @@ try while (! datafile.AtEndOfStream) { var line = datafile.ReadLine(); - if (line == "WITH_INNODB") + if (line == "WITH_INNOBASE_STORAGE_ENGINE") { extern_line += ",innobase_hton"; address_line += ",&innobase_hton"; } - else if (line == "WITH_PARTITION") + else if (line == "WITH_PARTITION_STORAGE_ENGINE") { extern_line += ",partition_hton"; address_line += ",&partition_hton"; } + else if (line == "WITH_ARCHIVE_STORAGE_ENGINE") + { + extern_line += ",archive_hton"; + address_line += ",&archive_hton"; + } + else if (line == "WITH_BERKELEY_STORAGE_ENGINE") + { + extern_line += ",berkeley_hton"; + address_line += ",&berkeley_hton"; + } + else if (line == "WITH_BLACKHOLE_STORAGE_ENGINE") + { + extern_line += ",blackhole_hton"; + address_line += ",&blackhole_hton"; + } + else if (line == "WITH_EXAMPLE_STORAGE_ENGINE") + { + extern_line += ",example_hton"; + address_line += ",&example_hton"; + } + else if (line == "WITH_FEDERATED_STORAGE_ENGINE") + { + extern_line += ",federated_hton"; + address_line += ",&federated_hton"; + } } datafile.Close(); diff --git a/win/config-version.js b/win/config-version.js index 4c895bcf515..689069c3030 100644 --- a/win/config-version.js +++ b/win/config-version.js @@ -9,11 +9,91 @@ try // first we attempt to open the main configure.in file var fso = new ActiveXObject("Scripting.FileSystemObject"); + var args = WScript.Arguments + + // Find any configured MYSQL_SERVER_SUFFIX. + // Find any extra preprocessor definitions. + var datafile = fso.OpenTextFile(args.Item(0), ForReading); + var server_suffix = ''; + var server_comment = 'Source distribution'; + var server_port = ''; + var defs = ''; + var htons = ''; + var subdirs = ''; + var depends = ''; + while (! datafile.AtEndOfStream) + { + var line = datafile.ReadLine(); + if (line.indexOf("MYSQL_SERVER_SUFFIX=") == 0) + { + server_suffix = line.substring(20, line.length); + } + else if (line.indexOf("COMPILATION_COMMENT=") == 0) + { + server_comment = line.substring(20, line.length); + } + else if (line.indexOf("MYSQL_TCP_PORT=") == 0) + { + server_port = line.substring(15, line.length); + } + else if (line == "WITH_ARCHIVE_STORAGE_ENGINE") + { + defs += " -D" + line; + htons += " ha_archive.cc"; + subdirs += " storage/archive"; + depends += " archive"; + } + else if (line == "WITH_BERKELEY_STORAGE_ENGINE") + { + defs += " -D" + line; + htons += " ha_berkeley.cc"; + subdirs += " storage/bdb"; + depends += " bdb"; + } + else if (line == "WITH_BLACKHOLE_STORAGE_ENGINE") + { + defs += " -D" + line; + htons += " ha_blackhole.cc"; + } + else if (line == "WITH_EXAMPLE_STORAGE_ENGINE") + { + defs += " -D" + line; + subdirs += " storage/example"; + depends += " example"; + } + else if (line == "WITH_FEDERATED_STORAGE_ENGINE") + { + defs += " -D" + line; + htons += " ha_federated.cc"; + } + else if (line == "WITH_INNOBASE_STORAGE_ENGINE") + { + defs += " -D" + line; + htons += " ha_innodb.cc"; + subdirs += " storage/innobase"; + depends += " innobase"; + } + else if (line == "WITH_PARTITION_STORAGE_ENGINE") + { + defs += " -D" + line; + htons += " ha_partition.cc"; + } + else if (line == "__NT__" || + line == "CYBOZU" || + line.indexOf("LICENSE=") == 0) { + defs += " -D" + line; + } + } + datafile.Close(); + ConfigureMySqlVersion(); //ConfigureBDB(); fso = null; - WScript.Echo("done!"); + WScript.Echo("DEFINITIONS@" + defs + "@"); + WScript.Echo("HANDLERTONS@" + htons + "@"); + WScript.Echo("DEPENDS@" + depends + "@"); + WScript.Echo("SUBDIRS@" + subdirs + "@"); } catch (e) { @@ -63,10 +143,11 @@ function ConfigureMySqlVersion() mysqlin = mysqlin.replace("@PROTOCOL_VERSION@", GetValue(configureIn, "PROTOCOL_VERSION")); mysqlin = mysqlin.replace("@DOT_FRM_VERSION@", GetValue(configureIn, "DOT_FRM_VERSION")); - mysqlin = mysqlin.replace("@MYSQL_TCP_PORT@", GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT")); + if (server_port == '') { server_port = GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT"); } + mysqlin = mysqlin.replace("@MYSQL_TCP_PORT@", server_port); mysqlin = mysqlin.replace("@MYSQL_UNIX_ADDR@", GetValue(configureIn, "MYSQL_UNIX_ADDR_DEFAULT")); - mysqlin = mysqlin.replace("@MYSQL_SERVER_SUFFIX@", ''); - mysqlin = mysqlin.replace("@COMPILATION_COMMENT@", 'Source distribution'); + mysqlin = mysqlin.replace("@MYSQL_SERVER_SUFFIX@", server_suffix); + mysqlin = mysqlin.replace("@COMPILATION_COMMENT@", server_comment); var version = GetVersion(configureIn); diff --git a/zlib/Makefile.am b/zlib/Makefile.am index 71619ce40c1..cc3777b1e88 100644 --- a/zlib/Makefile.am +++ b/zlib/Makefile.am @@ -29,5 +29,4 @@ libz_la_SOURCES= adler32.c compress.c crc32.c deflate.c gzio.c \ infback.c inffast.c inflate.c inftrees.c trees.c \ uncompr.c zutil.c -EXTRA_DIST= README FAQ INDEX ChangeLog algorithm.txt zlib.3 - +EXTRA_DIST= README FAQ INDEX ChangeLog algorithm.txt zlib.3 cmakelists.txt