At http://bazaar.launchpad.net/~maria-captains/maria/5.2/ ------------------------------------------------------------ revno: 2769 revision-id: sergii@pisem.net-20100402092009-fsk3s46z6furxi1k parent: sanja@askmonty.org-20100402100339-oxwd8hcrstv3gs1o committer: Sergei Golubchik <sergii@pisem.net> branch nick: 5.2 timestamp: Fri 2010-04-02 11:20:09 +0200 message: fixes for windows builds === modified file 'CMakeLists.txt' --- a/CMakeLists.txt 2010-04-01 14:34:51 +0000 +++ b/CMakeLists.txt 2010-04-02 09:20:09 +0000 @@ -38,6 +38,7 @@ ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Prog ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/") ADD_DEFINITIONS(-DPACKAGE=mysql) ADD_DEFINITIONS(-DSHAREDIR="share") +ADD_DEFINITIONS(-DPLUGINDIR="lib/plugin") # Set debug options SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS") === modified file 'extra/libevent/evbuffer.c' --- a/extra/libevent/evbuffer.c 2010-02-01 06:14:12 +0000 +++ b/extra/libevent/evbuffer.c 2010-04-02 09:20:09 +0000 @@ -75,8 +75,7 @@ bufferevent_add(struct event *ev, int ti */ void -bufferevent_read_pressure_cb(struct evbuffer *buf, - size_t old __attribute__((unused)), size_t now, +bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now, void *arg) { struct bufferevent *bufev = arg; /* === modified file 'extra/libevent/event.c' --- a/extra/libevent/event.c 2010-01-06 19:20:16 +0000 +++ b/extra/libevent/event.c 2010-04-02 09:20:09 +0000 @@ -394,8 +394,7 @@ event_base_get_method(struct event_base } static void -event_loopexit_cb(int fd __attribute__((unused)), - short what __attribute__((unused)), void *arg) +event_loopexit_cb(int fd, short what, void *arg) { struct event_base *base = arg; base->event_gotterm = 1; === modified file 'extra/libevent/signal.c' --- a/extra/libevent/signal.c 2010-01-06 19:20:16 +0000 +++ b/extra/libevent/signal.c 2010-04-02 09:20:09 +0000 @@ -69,7 +69,7 @@ static void evsignal_handler(int sig); /* Callback for when the signal handler write a byte to our signaling socket */ static void -evsignal_cb(int fd, short what __attribute((unused)), void *arg __attribute((unused))) +evsignal_cb(int fd, short what, void *arg) { static char signals[100]; #ifdef WIN32 === modified file 'include/m_ctype.h' --- a/include/m_ctype.h 2010-03-31 18:37:45 +0000 +++ b/include/m_ctype.h 2010-04-02 09:20:09 +0000 @@ -311,7 +311,9 @@ struct charset_info_st #define ILLEGAL_CHARSET_INFO_NUMBER (~0U) extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin; -extern struct charset_info_st my_charset_bin; +extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1; +extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename; + extern struct charset_info_st my_charset_big5_chinese_ci; extern struct charset_info_st my_charset_big5_bin; extern struct charset_info_st my_charset_cp932_japanese_ci; @@ -324,7 +326,6 @@ extern struct charset_info_st my_charset extern struct charset_info_st my_charset_gb2312_bin; extern struct charset_info_st my_charset_gbk_chinese_ci; extern struct charset_info_st my_charset_gbk_bin; -extern struct charset_info_st my_charset_latin1; extern struct charset_info_st my_charset_latin1_german2_ci; extern struct charset_info_st my_charset_latin1_bin; extern struct charset_info_st my_charset_latin2_czech_ci; @@ -341,7 +342,6 @@ extern struct charset_info_st my_charset extern struct charset_info_st my_charset_utf8_unicode_ci; extern struct charset_info_st my_charset_utf8_bin; extern struct charset_info_st my_charset_cp1250_czech_ci; -extern struct charset_info_st my_charset_filename; /* declarations for simple charsets */ extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t, === modified file 'include/my_global.h' --- a/include/my_global.h 2010-03-29 15:13:53 +0000 +++ b/include/my_global.h 2010-04-02 09:20:09 +0000 @@ -1522,6 +1522,9 @@ do { doubleget_union _tmp; \ #elif defined(HAVE_DLFCN_H) #include <dlfcn.h> #endif +#ifndef HAVE_DLERROR +#define dlerror() "" +#endif #endif /* FreeBSD 2.2.2 does not define RTLD_NOW) */ @@ -1529,7 +1532,7 @@ do { doubleget_union _tmp; \ #define RTLD_NOW 1 #endif -#ifndef HAVE_DLERROR +#ifndef HAVE_DLOPEN #define dlerror() "No support for dynamic loading (static build?)" #define dlopen(A,B) 0 #define dlsym(A,B) 0 === modified file 'server-tools/CMakeLists.txt' --- a/server-tools/CMakeLists.txt 2007-02-14 11:42:11 +0000 +++ b/server-tools/CMakeLists.txt 2010-04-02 09:20:09 +0000 @@ -27,7 +27,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc co user_management_commands.cc ../../sql/net_serv.cc ../../sql-common/pack.c ../../sql/password.c ../../sql/sql_state.c ../../sql-common/client.c ../../libmysql/get_password.c - ../../libmysql/errmsg.c) + ../../libmysql/errmsg.c ../../sql-common/client_plugin.c) ADD_DEPENDENCIES(mysqlmanager GenError) TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32) === modified file 'server-tools/instance-manager/CMakeLists.txt' --- a/server-tools/instance-manager/CMakeLists.txt 2007-12-27 17:16:02 +0000 +++ b/server-tools/instance-manager/CMakeLists.txt 2010-04-02 09:20:09 +0000 @@ -28,7 +28,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc co user_management_commands.cc ../../mysys/my_rnd.c ../../sql/net_serv.cc ../../sql-common/pack.c ../../sql/password.c ../../sql/sql_state.c ../../sql-common/client.c ../../libmysql/get_password.c - ../../libmysql/errmsg.c) + ../../libmysql/errmsg.c ../../sql-common/client_plugin.c) ADD_DEPENDENCIES(mysqlmanager GenError) TARGET_LINK_LIBRARIES(mysqlmanager debug dbug mysys strings taocrypt vio yassl zlib wsock32) === modified file 'sql-common/client.c' --- a/sql-common/client.c 2010-04-01 09:04:26 +0000 +++ b/sql-common/client.c 2010-04-02 09:20:09 +0000 @@ -2345,7 +2345,7 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_V case VIO_TYPE_SSL: { struct sockaddr addr; - socklen_t addrlen= sizeof(addr); + SOCKET_SIZE_TYPE addrlen= sizeof(addr); if (getsockname(vio->sd, &addr, &addrlen)) return; info->protocol= addr.sa_family == AF_UNIX ? @@ -2360,7 +2360,7 @@ void mpvio_info(Vio *vio, MYSQL_PLUGIN_V return; case VIO_TYPE_SHARED_MEMORY: info->protocol= MYSQL_VIO_MEMORY; - info->handle= vio->handle_client_file_map; /* or what ? */ + info->handle= vio->handle_file_map; /* or what ? */ return; #endif default: DBUG_ASSERT(0); === modified file 'sql/client_settings.h' --- a/sql/client_settings.h 2010-03-29 15:13:53 +0000 +++ b/sql/client_settings.h 2010-04-02 09:20:09 +0000 @@ -29,7 +29,6 @@ #define mysql_master_send_query(A, B, C) 1 #define mysql_slave_send_query(A, B, C) 1 #define mysql_rpl_probe(mysql) 0 -#undef HAVE_SMEM #undef _CUSTOMCONFIG_ #define mysql_server_init(a,b,c) mysql_client_plugin_init() === modified file 'sql/log_event.cc' --- a/sql/log_event.cc 2010-03-15 11:51:23 +0000 +++ b/sql/log_event.cc 2010-04-02 09:20:09 +0000 @@ -1716,8 +1716,7 @@ beg: case MYSQL_TYPE_DATETIME: { - size_t d, t; - uint64 i64= uint8korr(ptr); /* YYYYMMDDhhmmss */ + uint64 d, t, i64= uint8korr(ptr); /* YYYYMMDDhhmmss */ d= i64 / 1000000; t= i64 % 1000000; my_b_printf(file, "%04d-%02d-%02d %02d:%02d:%02d", === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2010-04-01 09:04:26 +0000 +++ b/sql/mysqld.cc 2010-04-02 09:20:09 +0000 @@ -6645,8 +6645,6 @@ Can't be set to 1 if --log-slave-updates {"shared-memory", OPT_ENABLE_SHARED_MEMORY, "Enable the shared memory.",(uchar**) &opt_enable_shared_memory, (uchar**) &opt_enable_shared_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, -#endif -#ifdef HAVE_SMEM {"shared-memory-base-name",OPT_SHARED_MEMORY_BASE_NAME, "Base name of shared memory.", (uchar**) &shared_memory_base_name, (uchar**) &shared_memory_base_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, === modified file 'sql/sql_class.cc' --- a/sql/sql_class.cc 2010-03-29 15:13:53 +0000 +++ b/sql/sql_class.cc 2010-04-02 09:20:09 +0000 @@ -924,7 +924,7 @@ void THD::update_stats(void) /* A SQL query. */ if (lex->sql_command == SQLCOM_SELECT) select_commands++; - else if (! sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) + else if (! (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND)) { /* Ignore 'SHOW ' commands */ } === modified file 'sql/sql_show.cc' --- a/sql/sql_show.cc 2010-04-01 14:34:51 +0000 +++ b/sql/sql_show.cc 2010-04-02 09:20:09 +0000 @@ -2529,8 +2529,8 @@ int send_user_stats(THD* thd, HASH *all_ table->field[j++]->store(user_stats->user, user_stats->user_name_length, system_charset_info); table->field[j++]->store((longlong)user_stats->total_connections,TRUE); - table->field[j++]->store((longlong)user_stats->concurrent_connections); - table->field[j++]->store((longlong)user_stats->connected_time); + table->field[j++]->store((longlong)user_stats->concurrent_connections, TRUE); + table->field[j++]->store((longlong)user_stats->connected_time, TRUE); table->field[j++]->store((double)user_stats->busy_time); table->field[j++]->store((double)user_stats->cpu_time); table->field[j++]->store((longlong)user_stats->bytes_received, TRUE); === modified file 'storage/maria/ma_loghandler.c' --- a/storage/maria/ma_loghandler.c 2010-04-01 09:04:26 +0000 +++ b/storage/maria/ma_loghandler.c 2010-04-02 09:20:09 +0000 @@ -1274,10 +1274,11 @@ static my_bool translog_set_lsn_for_file for (file= from_file; file <= to_file; file++) { LOGHANDLER_FILE_INFO info; - LINT_INIT(info.max_lsn); - File fd= open_logfile_by_number_no_cache(file); + LINT_INIT_STRUCT(info); + LINT_INIT(info.max_lsn); + if ((fd < 0) || ((translog_read_file_header(&info, fd) || (cmp_translog_addr(lsn, info.max_lsn) > 0 &&