Skip to content

Change in RMySQL? DBI?

1 message · Gabor Grothendieck

#
An sqldf unit test that once worked that involves Date class with
MySQL is failing.  I can reduce it to the following which does not
involve sqldf  (assuming there exists a MySQL database called test).
Is this due to some change in RMySQL?  DBI?

library(RMySQL)

t1 <- data.frame(d = as.Date("2001-01-30"))
con <- dbConnect("MySQL", "test")
dbWriteTable(con, "t1", t1, row.names = FALSE)
dbGetQuery(con, "describe t1")

which produces:

  Field Type Null Key Default Extra
1     d text  YES        <NA>

but d should be of MySQL date type, not text.
[1] ?0.9.3?
[1] ?0.3.1?
[1] "R version 3.1.1 Patched (2014-08-21 r66456)"