Skip to content

dbIsValid fails #217

Description

@dmurdoch

Not sure if this is RSQLite specific or a DBI issue, but I see it in RSQLite.

If I have a stale database connection con (e.g. left over from a previous R session), then dbIsValid(con) used to return FALSE, but since a recent update it signals an error,

> dbIsValid(con)
Error in rsqlite_connection_valid(dbObj@ptr) : 
  external pointer is not valid

I can work around this, but shouldn't it just work?

To reproduce:

library(RSQLite)
con <- dbConnect(SQLite(), ":memory:")
dbDisconnect(con)
f <- tempfile()
saveRDS(con, f)
con <- readRDS(f)
dbIsValid(con)

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