Skip to content

Commit

Permalink
version 2.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored and cran-robot committed Dec 3, 2024
1 parent e92ffae commit 50125f7
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 54 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: RSQLite
Title: SQLite Interface for R
Version: 2.3.8
Date: 2024-11-17
Version: 2.3.9
Date: 2024-12-02
Authors@R: c(
person("Kirill", "Müller", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-1416-3412")),
Expand Down Expand Up @@ -83,7 +83,7 @@ Collate: 'SQLiteConnection.R' 'SQLKeywords_SQLiteConnection.R'
'show_SQLiteConnection.R' 'sqlData_SQLiteConnection.R'
'table.R' 'transactions.R' 'utils.R' 'version.R' 'zzz.R'
NeedsCompilation: yes
Packaged: 2024-11-17 17:25:13 UTC; kirill
Packaged: 2024-12-03 17:33:18 UTC; kirill
Author: Kirill Müller [aut, cre] (<https://orcid.org/0000-0002-1416-3412>),
Hadley Wickham [aut],
David A. James [aut],
Expand All @@ -97,4 +97,4 @@ Author: Kirill Müller [aut, cre] (<https://orcid.org/0000-0002-1416-3412>),
RStudio [cph]
Maintainer: Kirill Müller <[email protected]>
Repository: CRAN
Date/Publication: 2024-11-17 18:10:02 UTC
Date/Publication: 2024-12-03 19:30:05 UTC
18 changes: 9 additions & 9 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
80eb877172b99e9ebbb79e4dd1c417aa *DESCRIPTION
3f4df090f88c4ea0bd65c4ee31a0d6b5 *DESCRIPTION
5eaa2f26ed34b86d1e7872cf95104e6e *NAMESPACE
36990823b8f6249e2adf860bc7a389a1 *NEWS.md
7f4a290c0a2ec281f0900d4cd0bdcaaf *NEWS.md
5fdb689e7a7dda14c79c050ff6363711 *R/SQLKeywords_SQLiteConnection.R
5edb5743a96659169d34c1e9029ebbef *R/SQLite.R
c54134e66615dbb412da8d95f7a8e62a *R/SQLiteConnection.R
Expand Down Expand Up @@ -71,7 +71,7 @@ c1c01db49c4eb185dd17d3c8b43f593e *R/table.R
ada001706c948b2be14fba68d19e242b *R/version.R
328597596f6a31a440a140e318502fc5 *R/zzz.R
5deb62d212bb6614eb00af62a9f759c9 *README.md
5d4853a7c4610e822d09319a5a79957f *build/vignette.rds
effba80692ca60b69a2d3969c341f2ab *build/vignette.rds
4a739b607662d3731c58f8220488df06 *inst/WORDLIST
6a6016ed370b49203dbc6e2c3f9160d3 *inst/db/datasets.sqlite
8c3e02869b417b1fa5cf7a28dafe56cd *inst/doc/RSQLite.R
Expand Down Expand Up @@ -139,7 +139,7 @@ df05e903e36267b708198af2e46cd864 *src/cpp11.cpp
cf84e2c19eeaa44b55140f924b184922 *src/ext-series.c
7625f656ebe47b09f9b3c2cfd580232f *src/ext-uuid.c
13c9aa482763430e8e56f808816f58bf *src/extensions.cpp
2b5a7110473af7366f02014061e7a8e0 *src/import-file.c
1d3bebc5927b487756ef6d95d152c604 *src/import-file.c
d3ffac86d9b0e41d8b6b7fdd3c32c251 *src/integer64.h
23ca21707062f3debc093aeb8a106f03 *src/pch.h
a0cb12918b59224d87c789587cf6f05d *src/result.cpp
Expand Down Expand Up @@ -1701,12 +1701,12 @@ c5a69cb41c3e95b5c2afec9f8dc227dd *src/vendor/boost/winapi/detail/header.hpp
5dfe9bd35d5896780a84f01e4794ef8d *src/vendor/boost/winapi/time.hpp
370aea3f8c3edfa1c1460af270b95c7d *src/vendor/extensions/csv.c
ec9e72b5b81886e0fb76b25601a31d67 *src/vendor/extensions/extension-functions.c
0e2c346023f4d3d137defc29e23ff363 *src/vendor/extensions/regexp.c
3a8d0ea90e28a9cf9f3b93c9be3cff3e *src/vendor/extensions/series.c
f70cd5833131eda2f181b0db56c7ba32 *src/vendor/extensions/regexp.c
dc794943fb3ce5b8cae454ec683282e2 *src/vendor/extensions/series.c
f2686f8ac55c3975ac6b39238a2f3e8e *src/vendor/extensions/sqlite3ext.h
5f183bf540888220e3337f5926253be9 *src/vendor/extensions/uuid.c
8c3b2455cc70fd7674c9dd07167aa339 *src/vendor/sqlite3/sqlite3.c
dc31a13caa3f3fef1edd6cc0aa689b87 *src/vendor/sqlite3/sqlite3.h
07bba914156c248aea25704c14ca5e5b *src/vendor/sqlite3/sqlite3.c
457d7b5c63ca7f6f790eb8b586abeaa5 *src/vendor/sqlite3/sqlite3.h
1e9664ef80213e1e5024128c5f8f69aa *tests/testthat.R
a068d5330949c7f13f695ca5f62e1364 *tests/testthat/dat-n.txt
d97f59133341d9a53539b8780331279b *tests/testthat/dat-rn.txt
Expand Down Expand Up @@ -1735,7 +1735,7 @@ e5465d90e6df21904aa43a816b133f6f *tests/testthat/test-extendedTypes.R
bd2abf3dc18b8dfcd8a9e812c55e3636 *tests/testthat/test-field-types.R
4495dc4e10f50b3a50c414ca604de5c9 *tests/testthat/test-json.R
002551720b8f33a1695e0d751f0e8611 *tests/testthat/test-readonly.R
aecbd9a66927eb7eaaf2c7581ccd8478 *tests/testthat/test-regularExpressions.R
f8bf253f65cd3f474833c3b0063e8d8f *tests/testthat/test-regularExpressions.R
48aeb17db2963c3d058ee069e76bfe94 *tests/testthat/test-sd.R
e20d4192e98bf2dbee79c078a8bcb29e *tests/testthat/test-sqliteCopyDatabase.R
4c06e321c9dbd4a640f9e97ad6b3058b *tests/testthat/test-sqliteQuickColumn.R
Expand Down
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<!-- NEWS.md is maintained by https://fledge.cynkra.com, contributors should not edit this file -->

# RSQLite 2.3.9 (2024-12-03)

## Features

- Upgrade bundled SQLite to 3.47.1 (#550).

## Bug fixes

- Avoid memory leak (#553).

- Fix valgrind error (#552).


# RSQLite 2.3.8 (2024-11-17)

## Bug fixes
Expand Down
Binary file modified build/vignette.rds
Binary file not shown.
18 changes: 16 additions & 2 deletions src/import-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,20 @@ RS_sqlite_import(
}
in = fopen(zFile, "rb");
if (in == 0) {
Rf_error("RS_sqlite_import: cannot open file %s", zFile);
fclose(in);
sqlite3_finalize(pStmt);
Rf_error("RS_sqlite_import: cannot open file %s", zFile);
}
azCol = malloc(sizeof(azCol[0]) * (nCol + 1));
if (azCol == 0) return 0;

while ((zLine = RS_sqlite_getline(in, eol)) != NULL) {
lineno++;
if (lineno <= skip) continue;
if (lineno <= skip) {
free(zLine);
zLine = NULL;
continue;
}
i = 0;
azCol[0] = zLine;
for (i = 0, z = zLine; *z && *z != '\n' && *z != '\r'; z++) {
Expand All @@ -105,6 +110,10 @@ RS_sqlite_import(
}
}
if (i + 1 != nCol) {
free(zLine);
free(azCol);
fclose(in);
sqlite3_finalize(pStmt);
Rf_error("RS_sqlite_import: %s line %d expected %d columns of data but found %d",
zFile, lineno, nCol, i + 1);
}
Expand All @@ -120,13 +129,18 @@ RS_sqlite_import(

rc = sqlite3_step(pStmt);
if (rc != SQLITE_DONE && rc != SQLITE_SCHEMA) {
free(zLine);
free(azCol);
fclose(in);
sqlite3_finalize(pStmt);
Rf_error("RS_sqlite_import: %s", sqlite3_errmsg(db));
}
rc = sqlite3_reset(pStmt);
free(zLine);
zLine = NULL;
if (rc != SQLITE_OK) {
free(azCol);
fclose(in);
sqlite3_finalize(pStmt);
Rf_error("RS_sqlite_import: %s", sqlite3_errmsg(db));
}
Expand Down
3 changes: 2 additions & 1 deletion src/vendor/extensions/regexp.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,8 @@ static const char *re_subcompile_string(ReCompiled *p){
** regular expression. Applications should invoke this routine once
** for every call to re_compile() to avoid memory leaks.
*/
static void re_free(ReCompiled *pRe){
static void re_free(void *pRe_){
ReCompiled *pRe = (ReCompiled*)pRe_;
if( pRe ){
sqlite3_free(pRe->aOp);
sqlite3_free(pRe->aArg);
Expand Down
8 changes: 7 additions & 1 deletion src/vendor/extensions/series.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,31 +659,37 @@ static int seriesBestIndex(
continue;
}
if( pConstraint->iColumn<SERIES_COLUMN_START ){
if( pConstraint->iColumn==SERIES_COLUMN_VALUE ){
if( pConstraint->iColumn==SERIES_COLUMN_VALUE && pConstraint->usable ){
switch( op ){
case SQLITE_INDEX_CONSTRAINT_EQ:
case SQLITE_INDEX_CONSTRAINT_IS: {
idxNum |= 0x0080;
idxNum &= ~0x3300;
aIdx[5] = i;
aIdx[6] = -1;
#ifndef ZERO_ARGUMENT_GENERATE_SERIES
bStartSeen = 1;
#endif
break;
}
case SQLITE_INDEX_CONSTRAINT_GE: {
if( idxNum & 0x0080 ) break;
idxNum |= 0x0100;
idxNum &= ~0x0200;
aIdx[5] = i;
#ifndef ZERO_ARGUMENT_GENERATE_SERIES
bStartSeen = 1;
#endif
break;
}
case SQLITE_INDEX_CONSTRAINT_GT: {
if( idxNum & 0x0080 ) break;
idxNum |= 0x0200;
idxNum &= ~0x0100;
aIdx[5] = i;
#ifndef ZERO_ARGUMENT_GENERATE_SERIES
bStartSeen = 1;
#endif
break;
}
case SQLITE_INDEX_CONSTRAINT_LE: {
Expand Down
Loading

0 comments on commit 50125f7

Please sign in to comment.