diff options
-rw-r--r-- | extra/yassl/include/openssl/ssl.h | 13 | ||||
-rw-r--r-- | extra/yassl/include/socket_wrapper.hpp | 6 | ||||
-rw-r--r-- | include/config-win.h | 2 | ||||
-rw-r--r-- | include/mysql.h | 2 | ||||
-rw-r--r-- | libmysqld/examples/builder-sample/emb_samples.cpp | 2 | ||||
-rw-r--r-- | server-tools/instance-manager/IMService.cpp | 2 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 3 | ||||
-rw-r--r-- | sql/lex.h | 2 | ||||
-rw-r--r-- | sql/net_serv.cc | 3 | ||||
-rw-r--r-- | sql/sql_class.cc | 12 | ||||
-rw-r--r-- | sql/sql_table.cc | 6 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 20 | ||||
-rw-r--r-- | sql/udf_example.c | 2 | ||||
-rw-r--r-- | win/README | 27 |
14 files changed, 53 insertions, 49 deletions
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 5bc4a053d51..14384f632e1 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -35,6 +35,12 @@ #define YASSL_VERSION "1.5.8" +#if defined(_WIN32) || defined(_WIN64) + #include <winsock2.h> + typedef SOCKET socket_t; +#else + typedef int socket_t; +#endif #if defined(__cplusplus) extern "C" { @@ -189,13 +195,6 @@ enum { /* ERR Constants */ EVP_R_BAD_DECRYPT = 2 }; -#if defined(_WIN32) || defined(_WIN64) - #include <winsock2.h> - typedef SOCKET socket_t; -#else - typedef int socket_t; -#endif - SSL_CTX* SSL_CTX_new(SSL_METHOD*); SSL* SSL_new(SSL_CTX*); diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index 5ac430c2318..60c00d5e6c3 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -28,9 +28,8 @@ #include <assert.h> -#if defined(_WIN32) || defined(_WIN64) - #include <winsock2.h> -#else +#include "openssl/ssl.h" /* for socket_t */ +#if !defined(_WIN32) && !defined(_WIN64) #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> @@ -38,7 +37,6 @@ #include <netinet/in.h> #include <arpa/inet.h> #endif -#include "openssl/ssl.h" /* for socket_t */ namespace yaSSL { diff --git a/include/config-win.h b/include/config-win.h index 101156596dc..6735ae1aba1 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -27,7 +27,7 @@ functions */ #endif #include <sys/locking.h> -#include <windows.h> +#include <winsock2.h> #include <math.h> /* Because of rint() */ #include <fcntl.h> #include <io.h> diff --git a/include/mysql.h b/include/mysql.h index aa54a62dca4..f76ae10ca16 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -42,7 +42,7 @@ extern "C" { #ifndef _global_h /* If not standard header */ #include <sys/types.h> #ifdef __LCC__ -#include <winsock.h> /* For windows */ +#include <winsock2.h> /* For windows */ #endif typedef char my_bool; #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) diff --git a/libmysqld/examples/builder-sample/emb_samples.cpp b/libmysqld/examples/builder-sample/emb_samples.cpp index 411de26149b..be3f1931af5 100644 --- a/libmysqld/examples/builder-sample/emb_samples.cpp +++ b/libmysqld/examples/builder-sample/emb_samples.cpp @@ -3,7 +3,7 @@ #pragma hdrstop #include "emb_samples.h" -#include <winsock.h> +#include <winsock2.h> #include <mysql.h> #include <stdarg.h> #include <stdio.h> diff --git a/server-tools/instance-manager/IMService.cpp b/server-tools/instance-manager/IMService.cpp index 7a876a5117d..679a30ec4e4 100644 --- a/server-tools/instance-manager/IMService.cpp +++ b/server-tools/instance-manager/IMService.cpp @@ -13,7 +13,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <windows.h> +#include <winsock2.h> #include <signal.h> #include "log.h" #include "options.h" diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 0cc0cc3c84d..acc522b1b46 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -25,9 +25,6 @@ #include "mysql_priv.h" #include <m_ctype.h> -#ifdef HAVE_OPENSSL -#include <openssl/des.h> -#endif /* HAVE_OPENSSL */ #include "md5.h" #include "sha1.h" #include "my_aes.h" diff --git a/sql/lex.h b/sql/lex.h index 2bf0e08c825..45155da7692 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -222,7 +222,7 @@ static SYMBOL symbols[] = { { "GLOBAL", SYM(GLOBAL_SYM)}, { "GRANT", SYM(GRANT)}, { "GRANTS", SYM(GRANTS)}, - { "GROUP", SYM(GROUP)}, + { "GROUP", SYM(GROUP_SYM)}, { "HANDLER", SYM(HANDLER_SYM)}, { "HASH", SYM(HASH_SYM)}, { "HAVING", SYM(HAVING)}, diff --git a/sql/net_serv.cc b/sql/net_serv.cc index e9533495650..2156888b8cf 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -47,9 +47,6 @@ #include <violite.h> #include <signal.h> #include <errno.h> -#ifdef __WIN__ -#include <winsock.h> -#endif #ifdef __NETWARE__ #include <sys/select.h> #endif diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 53500e3f661..039fd71d670 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2554,7 +2554,7 @@ namespace { : m_memory(0) { #ifndef DBUG_OFF - m_alloc_checked= false; + m_alloc_checked= FALSE; #endif allocate_memory(table, len1); m_ptr[0]= has_memory() ? m_memory : 0; @@ -2565,7 +2565,7 @@ namespace { : m_memory(0) { #ifndef DBUG_OFF - m_alloc_checked= false; + m_alloc_checked= FALSE; #endif allocate_memory(table, len1 + len2); m_ptr[0]= has_memory() ? m_memory : 0; @@ -2586,7 +2586,7 @@ namespace { */ bool has_memory() const { #ifndef DBUG_OFF - m_alloc_checked= true; + m_alloc_checked= TRUE; #endif return m_memory != 0; } @@ -2595,7 +2595,7 @@ namespace { { DBUG_ASSERT(s < sizeof(m_ptr)/sizeof(*m_ptr)); DBUG_ASSERT(m_ptr[s] != 0); - DBUG_ASSERT(m_alloc_checked == true); + DBUG_ASSERT(m_alloc_checked == TRUE); return m_ptr[s]; } @@ -2625,12 +2625,12 @@ namespace { table->write_row_record= (byte *) alloc_root(&table->mem_root, 2 * maxlen); m_memory= table->write_row_record; - m_release_memory_on_destruction= false; + m_release_memory_on_destruction= FALSE; } else { m_memory= (byte *) my_malloc(total_length, MYF(MY_WME)); - m_release_memory_on_destruction= true; + m_release_memory_on_destruction= TRUE; } } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 9162e160bff..36f0acd8f67 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4597,7 +4597,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, Table_ident *table_ident) { TABLE *tmp_table; - char src_path[FN_REFLEN], dst_path[FN_REFLEN], tmp_path[FN_REFLEN]; + char src_path[FN_REFLEN], dst_path[FN_REFLEN]; char src_table_name_buff[FN_REFLEN], src_db_name_buff[FN_REFLEN]; uint dst_path_length; char *db= table->db; @@ -4608,7 +4608,9 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, bool res= TRUE, unlock_dst_table= FALSE; enum legacy_db_type not_used; HA_CREATE_INFO *create_info; - +#ifdef WITH_PARTITION_STORAGE_ENGINE + char tmp_path[FN_REFLEN]; +#endif TABLE_LIST src_tables_list, dst_tables_list; DBUG_ENTER("mysql_create_like_table"); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index aa386dcf09c..9c062407921 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -556,7 +556,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token GLOBAL_SYM /* SQL-2003-R */ %token GRANT /* SQL-2003-R */ %token GRANTS -%token GROUP /* SQL-2003-R */ +%token GROUP_SYM /* SQL-2003-R */ %token GROUP_CONCAT_SYM %token GT_SYM /* OPERATOR */ %token HANDLER_SYM @@ -1505,7 +1505,7 @@ create: { Lex->sql_command = SQLCOM_CREATE_USER; } - | CREATE LOGFILE_SYM GROUP logfile_group_info + | CREATE LOGFILE_SYM GROUP_SYM logfile_group_info { Lex->alter_tablespace_info->ts_cmd_type= CREATE_LOGFILE_GROUP; } @@ -3081,11 +3081,11 @@ trg_event: ALTER TABLESPACE name CHANGE DATAFILE ... ALTER TABLESPACE name ADD DATAFILE ... ALTER TABLESPACE name access_mode - CREATE LOGFILE GROUP name ... - ALTER LOGFILE GROUP name ADD UNDOFILE .. - ALTER LOGFILE GROUP name ADD REDOFILE .. + CREATE LOGFILE GROUP_SYM name ... + ALTER LOGFILE GROUP_SYM name ADD UNDOFILE .. + ALTER LOGFILE GROUP_SYM name ADD REDOFILE .. DROP TABLESPACE name - DROP LOGFILE GROUP name + DROP LOGFILE GROUP_SYM name */ change_tablespace_access: tablespace_name @@ -3107,7 +3107,7 @@ tablespace_info: opt_logfile_group_name: /* empty */ {} - | USE_SYM LOGFILE_SYM GROUP ident + | USE_SYM LOGFILE_SYM GROUP_SYM ident { LEX *lex= Lex; lex->alter_tablespace_info->logfile_group_name= $4.str; @@ -5073,7 +5073,7 @@ alter: LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE; } - | ALTER LOGFILE_SYM GROUP alter_logfile_group_info + | ALTER LOGFILE_SYM GROUP_SYM alter_logfile_group_info { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP; @@ -7552,7 +7552,7 @@ opt_escape: group_clause: /* empty */ - | GROUP BY group_list olap_opt; + | GROUP_SYM BY group_list olap_opt; group_list: group_list ',' order_ident order_dir @@ -8016,7 +8016,7 @@ drop: LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE; } - | DROP LOGFILE_SYM GROUP logfile_group_name opt_ts_engine opt_ts_wait + | DROP LOGFILE_SYM GROUP_SYM logfile_group_name opt_ts_engine opt_ts_wait { LEX *lex= Lex; lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP; diff --git a/sql/udf_example.c b/sql/udf_example.c index 2bb4fe92d2f..d37c6505ced 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -684,7 +684,7 @@ longlong sequence(UDF_INIT *initid __attribute__((unused)), UDF_ARGS *args, ****************************************************************************/ #ifdef __WIN__ -#include <winsock.h> +#include <winsock2.h> #else #include <sys/socket.h> #include <netinet/in.h> diff --git a/win/README b/win/README index d1092c3e969..b52e8134aba 100644 --- a/win/README +++ b/win/README @@ -13,13 +13,21 @@ a variety of project systems. This tool is combined with a set of jscript files to enable building of MySQL for Windows directly out of a bk clone. The steps required are below. -Step 1 +Step 1: +------- + +Install a Windows C++ compiler. If you don't have one, you can use +the free compiler "Visual C++ 2005 express edition", which from Cmake +point of view is same as Visual studio 8: +http://msdn.microsoft.com/vstudio/express/ + +Step 2 ------ Download and install CMake. It can be downloaded from http://www.cmake.org. Once it is installed, modify your path to make sure you can execute the cmake binary. -Step 2 +Step 3 ------ Download and install bison for Windows. It can be downloaded from http://gnuwin32.sourceforge.net/packages/bison.htm. Please download using @@ -27,11 +35,15 @@ the link named "Complete package, excluding sources". This includes an installer that will install bison. After the installer finishes, modify your path so that you can execute bison. -Step 3 +(Alternative you, can take the sql_yacc.yy and sql_yacc.h files from a +matching mysql tar distribution and drop them into the sql directory just +before you start the build) + +Step 4 ------ Clone your bk tree to any location you like. -Step 4 +Step 5 ------ From the root of your bk clone, execute the command: win\configure <options>. The options right now are @@ -42,7 +54,6 @@ The options right now are WITH_BLACKHOLE_STORAGE_ENGINE WITH_EXAMPLE_STORAGE_ENGINE WITH_FEDERATED_STORAGE_ENGINE - WITH_INNOBASE_STORAGE_ENGINE __NT__ Enable named pipe support MYSQL_SERVER_SUFFIX=<suffix> Server suffix, default none COMPILATION_COMMENT=<comment> Server comment, default "Source distribution" @@ -53,17 +64,17 @@ So the command line could look like: win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro -Step 5 +Step 6 ------ From the root of your bk clone, execute one of the batch files to generate the type of project files you desire. -For Visual Studio 8, do win\build-vs8. +For Visual Studio 8 (or Visual C++ 2005 express edition), do win\build-vs8. For Visual Studio 7.1, do win\build-vs71. We will support building with nmake in the near future. -Step 6 +Step 7 ------ From the root of your bk clone, start your build. |