Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

R crashing when trying to establish connection to existing database #28

@BillPetti

Description

@BillPetti

I recently updated to R 3.5.1 and when I try to connect to my existing database it causes R to crash.

I can create a new database without a problem:

require(DBI)
require(RMySQL)
require(MonetDBLite)

test_db <- src_monetdblite("test_db_Monet", create = TRUE)

str(test_db)
List of 1
 $ con:Formal class 'MonetDBEmbeddedConnection' [package "MonetDBLite"] with 1 slot
  .. ..@ connenv:<environment: 0x7f9d6c79ab00> 
 - attr(*, "class")= chr [1:3] "src_monetdb" "src_sql" "src"

dbDisconnect(test_db$con, shutdown = TRUE)
rm(test_db)

I can reconnect to it as well without crashing:

test_db <- src_monetdblite("test_db_Monet", create = FALSE)
str(test_db)
List of 1
 $ con:Formal class 'MonetDBEmbeddedConnection' [package "MonetDBLite"] with 1 slot
  .. ..@ connenv:<environment: 0x7f9d6b30e270> 
 - attr(*, "class")= chr [1:3] "src_monetdb" "src_sql" "src"

The only thing that seems to work is to establish a connection to another MonetDBLite database first, and then try connecting to my existing database:

require(DBI)
require(RMySQL)
require(MonetDBLite)

test_db <- src_monetdblite("test_db_Monet", create = FALSE)
dbDisconnect(test_db$con, shutdown = TRUE)
rm(test_db)

statcast_db <- src_monetdblite("/Users/williampetti/statcast_database/statcast_db_Monet", create = FALSE)

dbListTables(statcast_db$con)

[1] "boxscore_gameday_info" "player_info"           "statcast_17"          
[4] "temp"                  "umpires_games"   

I should note the crash only occurs if I run the code in RStudio or from the R GUI. If I source a file, for example, the issue does not seem to occur.

The old database was created with a prior version of MonetDBLite and R.

Any idea what may be causing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions