Version 0.5-7 * Added a method for dbWriteTable to write a table from a text file, e.g., dbWriteTable(con, "tablename", "filename") * Added the argument "default.file" to dbConnect's method to allow parsing options from an alternate mysql options file. If specified only this file is read, as per the MySQL C API. * Re-use RSQLite's helper function "dbBuildTableDefinition" that builds an SQL string with a simple "CREATE TABLE" definition appropriate for exporting a specified data.frame. * Fixed default in dbReadTable's method to used a table field "row_names" (if it exists) as the row.names() of the output. * Modified the configure.win to create windows binaries a bit easier. * Fixed documentation typos. Version 0.5-6 * Fixed a (potential) bug in the safe.write() where it would use the current options(digits), possibly losing precision on double precision data. It now uses digits=17, regardless of option("digits"). * Added a simple configure.win to simplify building the package on windows; removed the inst/libs directory and now provide the MySQL windows binary library in the src/windows directory. Version 0.5-5 * Fixed documentation typos. Version 0.5-4 * Fixed 2 problems in configure.in: Since the MySQL client library requires libz, but now explicitly check for it ourselves; also we now explicitly check for the GNU getopt_long in the C library and set the C preprocessor macro HAVE_GETOPT_LONG accordingly, which we use to conditionally include or exclude the appropriate C code. Version 0.5-3 * Fixed a data.frame subsetting problem introduced (uncovered?) with the new R 1.8.0 data.frame subsetting semantics. (The code was in safe.write(), to be precise). * Fixed the vector .MySQLKeywords of reserved words (it was no 100% accurate). * Yet many more changes to the documentation structure (not the contents) due to yet more changes in the R help system. * Updated S4R.h to include changes to the .Call API in S-Plus 6.x (untested). * Built a Windows binary against MySQL 4.0.16 (see inst/libs). Version 0.5-2 * Added a test to verify whether the MySQL runtime version is different from the version used during compilation. Only a warning is printed if the versions differ. Version 0.5-1 Bug fixes only. * Fixed the bug in dbWriteTable() incorrectly exporting logicals (thanks to christian.ritter@shell.com). A general mechanism for data conversion is still lacking. * Fixed a problem with issuing mysql_options() with MYSQ_OPT_LOCAL_INFILE in version prior to 3.23.49, which is the one introducing this option. This bug only appeared when compiling against MySQL 3.23.39 thru 3.23.48 Version 0.5-0 Made the package DBI-compliant (as of DBI 0.1-4) using version S4 style classes. Simplified quite a bit the MySQLSupport.R file where most of the workhorse functions are. No new functionality in this version. Version 0.4-6 Ported to Windows with some very nasty porting problems beatifully solved by BDR (thanks!) * Added Makevars.win for Windows' sake. * ifdef the code that parses group default (problems with getop.c). The issue is that MySQL C function load_defaults() is not defined in libMySQL.lib, only mysqlclient.lib. Unfortunately the client library is only for static, thread-safe applications. (Need to solve this thread-safty issue). * Need to re-import the libMySQL.lib (see README.windows). Version 0.4-5 A transitional, internal version. * Synchronized the RS-DBI.c and RS-DBI.h with ROracle_0.3-3. * Fixed a bug in getopt_long (being assigned to a char, instead of an int). Apparently this cause problems only on Yellow Dog Linux versions (thanks to DTL for reporting this). * Commented out the S4's idiom "if(IS_LIST(x)) x = AS_LIST(x) in the C code when compiled for R (could this idiom introduce memory protection or garbage collection problems in R?) Version 0.4-4 All but one changes for this point release should be transparent to all users, and were done for compatibility with version 4 classes. * Added compatibility for Version 4 style classes and methods. Namely don't re-define functions such as as(), new(), show(), etc. when running with R 1.4.0 library(methods). Added a function usingV4() that tells us whether we're running with version 4 classes or not (works with R and Splus). * Moved the vector of SQL keywords to .SQL92Keywords in DBI.R. Also, modified make.SQL.names() to use a "keyword" argument (.SQL92Keywords by default). (This will allow us to use the same function with simultaneous drivers, MySQL, Oracle, SQLite, etc). Defined a vector of .MySQLKeywords that we pass to make.SQL.names() in assignTable.MySQLConnection. * Define a new print/show method for MySQLObjects. Version 0.4-3 NOTE: Next release will most likely implement the emerging R/S DBI interface, so I anticipate that the functions will have very different names, although the core functionality will be pretty much the same.) Stay tuned. * Added an *experimental* dbApply() that applies a function to groups of rows, one group at a time, avoiding having to hold the data from all the groups in R/S. It takes a result set, a grouping field, plus one or more functions and invokes them when certain "fetching events" occur (e.g., at the beginning/end of groups). See help(dbApply) for more details. [I must have(?) a bizarre bug in the my C code that causes an R core dump when quantile(x, ..., names=T) is invoked inside the R callback function, but works fine with quantile(x, ..., names=F) -- any hints will be greatly appreciated!] * Fixed the unimplemented append=T in assignTable() (thanks to Jens Nieschulze for the patch). Also, assignTable() now explicitly sets the end-of-line to be '\n' in the call to LOAD DATA -- this should fix the incompatibility in Windows that Brian Ripley alerted me to (thanks!) Also fixed the treatment of NA's when exporting a data.frame to MySQL. (On input MySQL interprets '\N' as an SQL NULL, which is what we use in SQL to denote an NA in R/S.) Re-named the argument from "rownames" to "row.names" for consitancy with getTable (see below). * Added row.names= argument to getTable(). The semantics is similar (but not identical) to read.table(), namely if row.names is a column name or index, the corresponding column is used as row.names (provided the column has no duplicate values, of course); a NULL or 0 value mean "don't use any field to set the row.names of the output data.frame." * The getTables() method now returns a character vector, instead of a data.frame. * There have been 2 reports of NULL's in MySQL double fields being incorrectly mapped to non-NA's, random (very small) numbers; in both cases on Solaris (we couldn't reproduce it on Linux nor our local Sun servers). In one case the problem was traced back to multiple versions of the libmysqlclient.so library. We still need to get to the bottom of this:-( * Fixed a bug when converting from NULL in a float dbms field to a numeric (i.e., double) NA. * Fixed a bug that core dumped somewhat randomly when fetching a large result set that required extending the receiving vectors of the output list. The cause was not PROTECTing the code expanded by SET_LENGTH. [Somewhat counter to my (buggy) intuition, an element *inside* a protected list loses its protection when we use SET_LENGTH on it. See the function RS_DBI_allocOutput in RS-DBI.c for the gory details.] (This problems occurred with R 1.2.3 and previous versions.) * Fixed a bug in the data conversions of FIELD_TYPE_LONG into R/S integers that erroneously map them to numeric/double when their length was greater than sizeof(Sint). The current logic (only applies to BIGINTs) is that if R's integers, sizeof(Sint), have less then BIGINT's 8 bytes then we convert BIGINT to double to avoid overflow. This is clearly platform specific. Grrr! * Fixed a typo (PKG_CPPFLAG, sic) in the instructions generated when configure couldn't find the MySQL header files and libraries. * Fixed an unobservable bug in the LST_CHR_EL macro in S4R.h. Version 0.4-2 * (R version) We fixed a problem with load() --- we had correctly elevated this function to generic, but failed to define load.default as the load() in package:base; this problem only manifested when using load from inside other packages (thanks to Prof. Brian Ripley for catching this one.) * We now include the GNU files "getopt.h" and "getopt.c" under the "gnu" directory -- this is for the sake of non GNU systems (note that these files are also included in the MySQL source distributions). We also have a copy of "getopt.h" in the "src" directory (this simplifies installation for users of gcc on Solaris and possibly other non-GNU systems). We still need to code this into the R configure script -- see below. * Updated dbExec documentation, various typos, etc. Version 0.4-1 * A manual in the Adobe PDF file "RS-MySQL.pdf" * A lot of changes to the internal C code to have a common source for R and Splus 5.x and 6.x * A better configure.in (thanks to Torsten Hothorn). I still need to add code to check for the GNU getopt.c and getopt.h (as required by MySQL) on systems with no GNU tools (e.g., solaris/irix/hpux/aix). * Added a convenience RS-DBI dbConnect method dbConnect(mgr="character"), e.g., dbConnect("MySQL", ...) to invoke the dbManager("MySQL") prior to opening the actual connection. * added (almost) trivial convenience RS-DBI functions getTable(), assignTable(), existsTable(), and removeTable(). They all mimic the corresponding R/S get(), assign(), exists(), and remove(), and they all work with a connection object and an sql table name (NOT generic SQL queries); assignTable() assigns a data.frame object (or coerceable) to the database. (These functions provide the basis for "user-defined databases in S -- see below.) * Added support RS-DBI functions make.SQL.names() and isSQLKeyword() to create legal SQL identifiers and to test for SQL keywords. * Similarly, added a new RS-DBI generic function SQLDataType(dbObjectId, obj) that returns the DBMS data type that most closely can represent the R/S object "obj". Added the corresponding MySQL method for SQLDataType(MySQLObject, obj). * (Splus only) Added RS-DBI methods to be able to attach a relational DBMS as an S user-defined S database, e.g., con <- dbConnect("MySQL", group = "vitalAnalysis") attach(con, translate = T, max.rows = 10000) ls(pos=2) x <- CLIENTMAPTABLE See ?attach.dbConnection for details. Note: *DO NOT* use this facility on large tables --- see the "proxyDBMS" library for a more efficient/ambitious interface. (I'm not sure this facility belongs in the RS-DBI, but it sure is easiest to be bundled here.) * (Splus only) Added a MySQLObject virtual class that extends dbObjectId. dbObjectId is now the virtual class for generic remote (DBMS) database objects; each driver then extends it through its own virtual class, e.g., MySQLObject -> dbObjectId. MySQLObject is virtual and the base class for all MySQL objects (dbManager, dbConnection, etc.); this is cleaner, and besides, it simplifies some "mixin" helper classes, e.g., show() for remote objects, SQLDataType(), and so on.) Version 0.4.0 * Parses $HOME/.my.cnf file. Added an "rs-dbi" stanza, and the S code parses for other stanzas, as specified in the argument "group=" in the call to dbConnect. For details, see help(MySQL) and the MySQL manual.