RMySQL icon indicating copy to clipboard operation
RMySQL copied to clipboard

all values in a logical column are set to 0

Open stla opened this issue 9 years ago • 6 comments

Please see https://github.com/hadley/dplyr/issues/1867

stla avatar May 30 '16 20:05 stla

Can't replicate with the current development version of RMySQL, only with the CRAN version.

krlmlr avatar May 31 '16 23:05 krlmlr

This is working in RMariaDB:

    con <- dbConnect(RMariaDB::MariaDB(), group = "my-db")
    dbWriteTable(con, "test", data.frame(a=T, b=F), overwrite = T)

Since RMySQL is being phased out, it may be time to jump to RMariaDB so that logicals can be used without always converting to integer.

bdforbes avatar Jan 25 '18 04:01 bdforbes

Hi,

When I fetch the table values from mysql, me too facing the same issue like binary column all values marked as zero's

regards, Ganesan.K

ganesan611 avatar Sep 22 '18 02:09 ganesan611

Hi @ganesan611, the solution is to use the RMariaDB::MariaDB() connector instead.

bdforbes avatar Sep 22 '18 02:09 bdforbes

Thank you for your immediate response. I will try what you have suggested.

ganesan611 avatar Sep 22 '18 02:09 ganesan611

You're welcome, let me know if you have any trouble. The code I posted above should indicate whether or not logicals are converting correctly for you. Make sure to change the group and test table as appropriate for your setup.

bdforbes avatar Sep 22 '18 02:09 bdforbes