diff --git a/DESCRIPTION b/DESCRIPTION index 02561f6..a888c8e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,9 @@ Package: RMySQL -Version: 0.7-4 -Date: 2009-04-07 +Version: 0.7-5 +Date: 2010-07-13 Title: R interface to the MySQL database Author: David A. James and Saikat DebRoy -Maintainer: Jeffrey Horner +Maintainer: Jeffrey Horner Description: Database interface and MySQL driver for R. This version complies with the database interface definition as implemented in the package DBI 0.2-2. diff --git a/configure.win b/configure.win index f0b3716..eaace13 100644 --- a/configure.win +++ b/configure.win @@ -1,10 +1,8 @@ -echo "configure.win:" -echo "" echo -n "checking for \$MYSQL_HOME... " if test -z "$MYSQL_HOME" ; then echo "not found... searching registry..." echo "" - ${R_HOME}/bin${R_ARCH_BIN}/Rscript < inst/FindMySQLhome.R + "${R_HOME}/bin${R_ARCH_BIN}/Rscript" inst/FindMySQLhome.R echo "" exit 1 else @@ -14,4 +12,9 @@ else exit 2 fi fi -echo "" +x86=`"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e 'cat(.Machine$sizeof.pointer==4)'` +if test $x86 = "TRUE"; then + cp src/Makevars.win32 src/Makevars.win +else + cp src/Makevars.win64 src/Makevars.win +fi diff --git a/man/MySQL.Rd b/man/MySQL.Rd index 91f350e..10c6d81 100644 --- a/man/MySQL.Rd +++ b/man/MySQL.Rd @@ -148,7 +148,6 @@ On meta-data: \code{\link[DBI]{dbGetStatement}} \code{\link[DBI]{dbHasCompleted}} \code{\link[DBI]{dbGetRowCount}} -\code{\link[DBI]{dbGetAffectedRows}} } \examples{\dontrun{ # create a MySQL instance and create one connection. diff --git a/man/RMySQL-package.Rd b/man/RMySQL-package.Rd index 8315802..cbefc12 100644 --- a/man/RMySQL-package.Rd +++ b/man/RMySQL-package.Rd @@ -173,7 +173,6 @@ See the documentation at the MySQL Web site \seealso{ On database managers: -\code{\link[DBI:DBI-package]{DBI}} \code{\link[DBI]{dbDriver}} \code{\link[DBI]{dbUnloadDriver}} @@ -204,7 +203,6 @@ On meta-data: \code{\link[DBI]{dbGetStatement}} \code{\link[DBI]{dbHasCompleted}} \code{\link[DBI]{dbGetRowCount}} -\code{\link[DBI]{dbGetAffectedRows}} } \examples{\dontrun{ # create a MySQL instance and create one connection. diff --git a/man/dbEscapeStrings-methods.Rd b/man/dbEscapeStrings-methods.Rd index 3d92e3d..0320c29 100644 --- a/man/dbEscapeStrings-methods.Rd +++ b/man/dbEscapeStrings-methods.Rd @@ -28,7 +28,7 @@ \code{\link[DBI]{dbSendQuery}}, \code{\link[DBI]{dbGetQuery}}, \code{\link[DBI]{fetch}}, - \code{\link[DBI]{dbNextResult}}, + \code{\link{dbNextResult}}, \code{\link[DBI]{dbCommit}}, \code{\link[DBI]{dbGetInfo}}, \code{\link[DBI]{dbReadTable}}. diff --git a/man/dbReadTable-methods.Rd b/man/dbReadTable-methods.Rd index fbd03c0..bca2ba2 100644 --- a/man/dbReadTable-methods.Rd +++ b/man/dbReadTable-methods.Rd @@ -68,13 +68,13 @@ \code{header} is a logical indicating whether the first data line (but see \code{skip}) has a header or not. If missing, it value - is determined following \code{\link[base]{read.table}} convention, + is determined following \code{\link{read.table}} convention, namely, it is set to TRUE if and only if the first row has one fewer field that the number of columns. \code{row.names} is a logical to specify whether the first column is a set of row names. If missing its default follows the - \code{\link[base]{read.table}} convention. + \code{\link{read.table}} convention. \code{col.names} a character vector with column names (these names will be filtered with \code{\link[DBI]{make.db.names}} to diff --git a/man/safe.write.Rd b/man/safe.write.Rd index 638b6e1..79b36ab 100644 --- a/man/safe.write.Rd +++ b/man/safe.write.Rd @@ -16,7 +16,7 @@ safe.write(value, file, batch, ...) \item{\dots}{any other arguments are passed to \code{write.table}.} } \details{ - The function has a while loop invoking \code{\link[base]{write.table}} + The function has a while loop invoking \code{\link{write.table}} for subsets of \code{batch} rows of \code{value}. Since this is a helper function for \code{\link[RMySQL]{mysqlWriteTable}}, it has hardcoded other arguments to \code{write.table}. @@ -26,7 +26,7 @@ safe.write(value, file, batch, ...) } \note{No error checking whatsoever is done.} -\seealso{\code{\link[base]{write.table}}} +\seealso{\code{\link{write.table}}} \examples{\dontrun{ ctr.file <- file("dump.sqloader", "w") diff --git a/src/Makevars.win b/src/Makevars.win32 old mode 100644 new mode 100755 similarity index 100% rename from src/Makevars.win rename to src/Makevars.win32 diff --git a/src/Makevars.win64 b/src/Makevars.win64 new file mode 100755 index 0000000..dae0003 --- /dev/null +++ b/src/Makevars.win64 @@ -0,0 +1,2 @@ +PKG_CPPFLAGS = -I"${MYSQL_HOME}"/include +PKG_LIBS = "${MYSQL_HOME}"/bin/libmySQL.dll diff --git a/src/RS-DBI.h b/src/RS-DBI.h index f494b80..7aca64b 100644 --- a/src/RS-DBI.h +++ b/src/RS-DBI.h @@ -31,17 +31,16 @@ extern "C" { #include "S4R.h" -/* Microsoft Visual C++ uses int _getpid() */ -#ifdef MSVC +/* WIN32 uses int _getpid() */ +#if defined WIN32 #include -#define getpid _getpid -#define pid_t int + /* #define getpid _getpid */ +#include + /* #define pid_t int */ #else #include #endif -pid_t getpid(); - /* We now define 4 important data structures: * RS_DBI_manager, RS_DBI_connection, RS_DBI_resultSet, and * RS_DBI_fields, corresponding to dbManager, dbConnection, @@ -260,7 +259,7 @@ void RS_na_set(void *ptr, Stype type); int RS_is_na(void *ptr, Stype type); extern const struct data_types RS_dataTypeTable[]; -int isalpha(int c); +/* int isalpha(int c); */ #ifdef __cplusplus } diff --git a/src/RS-MySQL.h b/src/RS-MySQL.h index 8b124ea..403720a 100644 --- a/src/RS-MySQL.h +++ b/src/RS-MySQL.h @@ -24,7 +24,7 @@ extern "C" { #endif -#ifdef WIN32 +#if defined WIN32 # include # undef ERROR #endif