From 66e6453e2a6e32ac00b8300e8c6b76ba628e5e9c Mon Sep 17 00:00:00 2001 From: "reggie@fedora.(none)" <> Date: Thu, 15 Sep 2005 14:32:01 -0500 Subject: [PATCH] some last minute Windows compile fixes and makefile corrections --- VC++Files/libmysqld/libmysqld.vcproj | 2 +- VC++Files/libmysqltest/myTest.vcproj | 6 +++--- VC++Files/mysql.sln | 2 -- VC++Files/mysqlserver/dummy.cpp | 0 VC++Files/mysqlserver/mysqlserver.vcproj | 11 +++++++---- server-tools/instance-manager/mysqlmanager.vcproj | 4 ++-- sql/ha_federated.cc | 10 ++++++---- sql/sql_acl.cc | 2 +- sql/table.cc | 2 +- sql/unireg.cc | 4 ++-- 10 files changed, 23 insertions(+), 20 deletions(-) create mode 100755 VC++Files/mysqlserver/dummy.cpp diff --git a/VC++Files/libmysqld/libmysqld.vcproj b/VC++Files/libmysqld/libmysqld.vcproj index 187a63ece38..f1de8649fc7 100755 --- a/VC++Files/libmysqld/libmysqld.vcproj +++ b/VC++Files/libmysqld/libmysqld.vcproj @@ -24,7 +24,7 @@ AdditionalIncludeDirectories="../include,../libmysqld,../sql,../regex,../extra/yassl/include,../bdb/build_win32,../zlib" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;SAFEMALLOC;HAVE_BERKELEY_DB;USE_SYMDIR;SIGNAL_WITH_VIO_CLOSE;HAVE_DLOPEN;EMBEDDED_LIBRARY;HAVE_INNOBASE_DB;USE_TLS;__WIN__" BasicRuntimeChecks="3" - RuntimeLibrary="0" + RuntimeLibrary="1" PrecompiledHeaderFile=".\debug/libmysqld.pch" AssemblerListingLocation=".\debug/" ObjectFile=".\debug/" diff --git a/VC++Files/libmysqltest/myTest.vcproj b/VC++Files/libmysqltest/myTest.vcproj index 06ce20bf021..afc44b482c9 100755 --- a/VC++Files/libmysqltest/myTest.vcproj +++ b/VC++Files/libmysqltest/myTest.vcproj @@ -40,7 +40,7 @@ @@ -63,7 +63,7 @@ @@ -117,6 +117,9 @@ + + diff --git a/server-tools/instance-manager/mysqlmanager.vcproj b/server-tools/instance-manager/mysqlmanager.vcproj index a5ef7cb21e3..ef8b2dd017e 100644 --- a/server-tools/instance-manager/mysqlmanager.vcproj +++ b/server-tools/instance-manager/mysqlmanager.vcproj @@ -12,7 +12,7 @@ @@ -63,7 +63,7 @@ diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index 2590e7881a4..6230fa7bb3c 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -591,9 +591,10 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, DBUG_PRINT("info", ("Length %d \n", table->s->connect_string.length)); DBUG_PRINT("info", ("String %.*s \n", table->s->connect_string.length, table->s->connect_string.str)); - share->scheme= my_strdup_with_length(table->s->connect_string.str, - table->s->connect_string.length+1, - MYF(0)); + share->scheme= my_strdup_with_length( + (const byte*)table->s->connect_string.str, + table->s->connect_string.length+1, MYF(0)); + // Add a null for later termination of table name share->scheme[table->s->connect_string.length]= 0; DBUG_PRINT("info",("parse_url alloced share->scheme %lx", share->scheme)); @@ -2626,7 +2627,8 @@ int ha_federated::stash_remote_error() { DBUG_ENTER("ha_federated::stash_remote_error()"); remote_error_number= mysql_errno(mysql); - snprintf(remote_error_buf, FEDERATED_QUERY_BUFFER_SIZE, mysql_error(mysql)); + my_snprintf(remote_error_buf, FEDERATED_QUERY_BUFFER_SIZE, + mysql_error(mysql)); DBUG_RETURN(HA_FEDERATED_ERROR_WITH_REMOTE_SYSTEM); } diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 5e2fd17377a..195d032b91a 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1473,7 +1473,7 @@ bool is_acl_user(const char *host, const char *user) { bool res; VOID(pthread_mutex_lock(&acl_cache->lock)); - res= find_acl_user(host, user, TRUE); + res= find_acl_user(host, user, TRUE) != NULL; VOID(pthread_mutex_unlock(&acl_cache->lock)); return res; } diff --git a/sql/table.cc b/sql/table.cc index 74ffe58e42e..c0d599bd8b4 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -351,7 +351,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat, char *buff; if (!(buff= alloc_root(&outparam->mem_root, n_length))) goto err; - if (my_pread(file, buff, n_length, record_offset + share->reclength, + if (my_pread(file, (byte*)buff, n_length, record_offset + share->reclength, MYF(MY_NABP))) goto err; share->connect_string.length= uint2korr(buff); diff --git a/sql/unireg.cc b/sql/unireg.cc index 1ac8be0f49a..d297b143d3b 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -153,8 +153,8 @@ bool mysql_create_frm(THD *thd, my_string file_name, { char buff[2]; int2store(buff,create_info->connect_string.length); - if (my_write(file, buff, sizeof(buff), MYF(MY_NABP)) || - my_write(file, create_info->connect_string.str, + if (my_write(file, (const byte*)buff, sizeof(buff), MYF(MY_NABP)) || + my_write(file, (const byte*)create_info->connect_string.str, create_info->connect_string.length, MYF(MY_NABP))) goto err; }