Bug#850037: r-cran-rsqlite: Row value IN queries give syntax errors.
Thanks. I'm not sure why this was removed, I asked the person who changed this. From a maintainer's perspective, using a bundled version of SQLite certainly simplifies the replication of problems. I'm in favor of keeping things as they are, but I see the benefit of giving the user the same SQLite versions for both R and the command line. Using a system version of SQLite is currently difficult because I'm using a patched version of sqlite.h, I might be able to get rid of this (https://github.com/rstats-db/RSQLite/issues/198). -Kirill On 11.01.2017 09:44, Andreas Tille wrote: Hi, I've checked version 1.1-2 but the described problem persists. I think Charles solution for the issue sounds quite promissing. Kind regards Andreas. On Sun, Jan 08, 2017 at 11:45:58PM +0900, Charles Plessy wrote: After the upgrade from 1.0.0-2 to 1.1-1-1, row value subqueries using IN no longer appear to work. Here is an example (taken from https://www.sqlite.org/rowvalue.html) Hi Andreas and Kirill, I was puzzled why version 1.0.0-2 worked, while it was built againt an even older version of sqlite3, and figured out that until commit 8cdf941 in RSQLite's repository on GitHub, there was a configure script that accepted the parameter --with-sqlite-dir, which we pass when we build the r-cran-rsqlite package on Debian to dynamically link the package against the system's sqlite library. https://github.com/rstats-db/RSQLite/commit/8cdf941f4e0860be0c0dbafde0a64d1c5e75af72 Would it be possible to have this facility back ? Have a nice day, Charles Plessy PS: Andreas, to make it further complicated, the conversion from CDBS to dh_r caused the parameter to not be passed... To correct this, one needs do delete the dh override and instead add the following line: export RExtraInstallFlags=--configure-args=--with-sqlite-dir=/usr -- Charles Plessy Debian Med packaging team, http://www.debian.org/devel/debian-med Tsurumi, Kanagawa, Japan ___ Debian-med-packaging mailing list debian-med-packag...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging
Bug#850037: r-cran-rsqlite: Row value IN queries give syntax errors.
On 07.01.2017 22:02, Andreas Tille wrote: Hi, On Sat, Jan 07, 2017 at 07:56:24PM +0100, Kirill Müller wrote: After upgrading the embedded SQLite sources to 3.16.2, the query now works. Please install the branch that contains the upgrade with #install.packages("remotes") remotes::install_github("rstats-db/RSQLite@f-upgrade") (not recommended for production!) Hmmm, this does not really help. We want to release rsqlite with the next Debian stable release so this is definitely for production. The version that was used once this bug report was created was 3.15.2 but we expect to release with sqlite version 3.16.2. Do you think you can release some stable version ready for production soon? Thanks. The only issue I see is that RSQLite (that comes in r-cran-rsqlite) is bundled with a version of the SQLite library that is older than the one of the command line. Users who want to use RSQLite with a more recent version of the SQLite library will be able to do so by installing the development version of RSQLite from source. This is currently in a branch, therefore not recommended for production, but will be soon merged to master -- I'm afraid this is as stable as I can make it in the nearest future. We decided to bundle the SQLite library (and not to use the system version) to simplify installation on other platforms and to simplify troubleshooting. -Kirill Kind regards Andreas.
Bug#850037: r-cran-rsqlite: Row value IN queries give syntax errors.
After upgrading the embedded SQLite sources to 3.16.2, the query now works. Please install the branch that contains the upgrade with #install.packages("remotes") remotes::install_github("rstats-db/RSQLite@f-upgrade") (not recommended for production!) -Kirill On 03.01.2017 21:36, Andreas Tille wrote: Hi Kirill, I'm hereby forwarding a bug from a Debian user. Kind regards Andreas. On Tue, Jan 03, 2017 at 12:12:48PM +, Andy Wood wrote: Package: r-cran-rsqlite Version: 1.1-1-1 Severity: important Dear Maintainer, After the upgrade from 1.0.0-2 to 1.1-1-1, row value subqueries using IN no longer appear to work. Here is an example (taken from https://www.sqlite.org/rowvalue.html) 1. create a database and populate. The file create_db.sql contains: CREATE TABLE t2(x,y,z); INSERT INTO t2(x,y,z) VALUES(1,2,3),(2,3,4),(1,NULL,5); # sqlite3 test.db < create_db.sql 2. query the database with sqlite3. The file query_db.sql contains: select (1,2,3) in (select x,y,z from t2), (7,8,9) in (select x,y,z from t2), (1,3,5) in (select x,y,z from t2); # sqlite3 test.db < query_db.sql 1|0| 3. query the database with RSQLite. The file query_db.r contains: library(DBI) library(RSQLite) dbd <- dbDriver("SQLite") dbf <- "test.db" con <- dbConnect(dbd, dbf) qry <- dbSendQuery(con, statement = paste( "select", " (1,2,3) in (select x,y,z from t2),", " (7,8,9) in (select x,y,z from t2),", " (1,3,5) in (select x,y,z from t2)")) dbFetch(qry, n=-1) dbClearResult(qry) dbDisconnect(con) quit() # R --quiet --no-save < query_db.r library(DBI) library(RSQLite) # dbd <- dbDriver("SQLite") dbf <- "test.db" con <- dbConnect(dbd, dbf) qry <- dbSendQuery(con, statement = paste( +"select", +" (1,2,3) in (select x,y,z from t2),", +" (7,8,9) in (select x,y,z from t2),", +" (1,3,5) in (select x,y,z from t2)")) Error in rsqlite_send_query(conn@ptr, statement) : near ",": syntax error Calls: dbSendQuery ... initialize -> initialize -> rsqlite_send_query -> .Call Execution halted -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (900, 'testing'), (300, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages r-cran-rsqlite depends on: ii libc6 2.24-8 ii libgcc11:6.2.1-5 ii libstdc++6 6.2.1-5 ii r-base-core [r-api-3] 3.3.2-1 ii r-cran-dbi 0.5-1-1 ii r-cran-memoise 1.0.0-1 ii r-cran-rcpp0.12.8-1 r-cran-rsqlite recommends no packages. Versions of packages r-cran-rsqlite suggests: pn r-cran-dbitest ii r-cran-knitr 1.15.1-1 ii r-cran-testthat 1.0.2-2 -- no debconf information ___ Debian-med-packaging mailing list debian-med-packag...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging
Bug#850037: r-cran-rsqlite: Row value IN queries give syntax errors.
Thanks. I'm getting the following error when running the query from the sqlite3 command line (package version 3.14.1-1build1 on Ubuntu 16.10): > sqlite3 test.db SQLite version 3.14.1 2016-08-11 18:53:32 Enter ".help" for usage hints. sqlite> select ...> (1,2,3) in (select x,y,z from t2), ...> (7,8,9) in (select x,y,z from t2), ...> (1,3,5) in (select x,y,z from t2); Error: near ",": syntax error What's the version of sqlite3 on your system? Anyway, I'm upgrading the packaged sqlite3 library in the development version [1] soon, you may have better luck after the upgrade. -Kirill [1] https://github.com/rstats-db/RSQLite On 03.01.2017 21:36, Andreas Tille wrote: Hi Kirill, I'm hereby forwarding a bug from a Debian user. Kind regards Andreas. On Tue, Jan 03, 2017 at 12:12:48PM +, Andy Wood wrote: Package: r-cran-rsqlite Version: 1.1-1-1 Severity: important Dear Maintainer, After the upgrade from 1.0.0-2 to 1.1-1-1, row value subqueries using IN no longer appear to work. Here is an example (taken from https://www.sqlite.org/rowvalue.html) 1. create a database and populate. The file create_db.sql contains: CREATE TABLE t2(x,y,z); INSERT INTO t2(x,y,z) VALUES(1,2,3),(2,3,4),(1,NULL,5); # sqlite3 test.db < create_db.sql 2. query the database with sqlite3. The file query_db.sql contains: select (1,2,3) in (select x,y,z from t2), (7,8,9) in (select x,y,z from t2), (1,3,5) in (select x,y,z from t2); # sqlite3 test.db < query_db.sql 1|0| 3. query the database with RSQLite. The file query_db.r contains: library(DBI) library(RSQLite) dbd <- dbDriver("SQLite") dbf <- "test.db" con <- dbConnect(dbd, dbf) qry <- dbSendQuery(con, statement = paste( "select", " (1,2,3) in (select x,y,z from t2),", " (7,8,9) in (select x,y,z from t2),", " (1,3,5) in (select x,y,z from t2)")) dbFetch(qry, n=-1) dbClearResult(qry) dbDisconnect(con) quit() # R --quiet --no-save < query_db.r library(DBI) library(RSQLite) # dbd <- dbDriver("SQLite") dbf <- "test.db" con <- dbConnect(dbd, dbf) qry <- dbSendQuery(con, statement = paste( +"select", +" (1,2,3) in (select x,y,z from t2),", +" (7,8,9) in (select x,y,z from t2),", +" (1,3,5) in (select x,y,z from t2)")) Error in rsqlite_send_query(conn@ptr, statement) : near ",": syntax error Calls: dbSendQuery ... initialize -> initialize -> rsqlite_send_query -> .Call Execution halted -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (900, 'testing'), (300, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages r-cran-rsqlite depends on: ii libc6 2.24-8 ii libgcc11:6.2.1-5 ii libstdc++6 6.2.1-5 ii r-base-core [r-api-3] 3.3.2-1 ii r-cran-dbi 0.5-1-1 ii r-cran-memoise 1.0.0-1 ii r-cran-rcpp0.12.8-1 r-cran-rsqlite recommends no packages. Versions of packages r-cran-rsqlite suggests: pn r-cran-dbitest ii r-cran-knitr 1.15.1-1 ii r-cran-testthat 1.0.2-2 -- no debconf information ___ Debian-med-packaging mailing list debian-med-packag...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging