RMySQL
RMySQL copied to clipboard
dbColumnInfo causes a crash
R crashes if one applies the function dbColumnInfo
to a request like ALTER
:
library(RMySQL)
DB <- dbConnect(MySQL(), user="root", host="localhost", password="xxx", dbname="rmysql0")
# write a data frame to the database
dat1 <- data.frame(
Name = c("Joe", "Joe", "Bill", "Jim", "Kate"),
Value = c(10.1, 13, 9, 7.7, -3),
Indic = c(0L, 1L, 1L, 2L, 2L),
Status = c(TRUE, TRUE, TRUE, FALSE, FALSE)
)
dbWriteTable(DB, "dat1", dat1, row.names=FALSE)
# send query
res <- dbSendQuery(DB, "ALTER TABLE `dat1` DROP COLUMN `Name`")
dbGetStatement(res) # works fine
dbColumnInfo(res) # crash
Thanks, and sorry for the slow reply. Have you installed RMySQL from CRAN or from GitHub?
Hmm, that's old. I didn't remember that. I don't use RMySQL
anymore, this was just to write an article on my blog. But this was the CRAN version.