Comments (7)
I added some println statements to see if maybe the db connection was null or if the statement length wasn't right. Nothing obvious is coming up. This is the query that is breaking. When I execute it from the sqlite CLI it returns nothing.
path="/home/ubuntu/test/test1" mtime=1479232483 nsec=800923063 size=0
db: 0x7fcdaad82008
len_with_nul: 84
sql: SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?
from rusqlite.
Here's the backtrace:
#0 sqlite3WhereClauseClear (pWC=0x7fffea45f560) at sqlite3.c:123127
#1 0x00007fffee1cc5b1 in whereInfoFree (db=0x7fffea582008, pWInfo=0x7fffea45f408) at sqlite3.c:125022
#2 0x00007fffee20c044 in sqlite3Select (pParse=pParse@entry=0x7fffea454808, p=<optimized out>,
pDest=pDest@entry=0x7fffffff2a30) at sqlite3.c:115416
#3 0x00007fffee237bde in yy_reduce (yyruleno=111, yypParser=0x7fffea465008) at sqlite3.c:130315
#4 sqlite3Parser (yyp=yyp@entry=0x7fffea465008, yymajor=yymajor@entry=1, yyminor=...,
pParse=pParse@entry=0x7fffea454808) at sqlite3.c:331
#5 0x00007fffee23b9f0 in sqlite3RunParser (pParse=pParse@entry=0x7fffea454808,
zSql=zSql@entry=0x7fffea589300 "SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?", pzErrMsg=pzErrMsg@entry=0x7fffffff2b60) at sqlite3.c:132342
#6 0x00007fffee23c082 in sqlite3Prepare (db=db@entry=0x7fffea582008,
zSql=zSql@entry=0x7fffea589300 "SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?", nBytes=nBytes@entry=84, saveSqlFlag=saveSqlFlag@entry=1, pReprepare=pReprepare@entry=0x0,
ppStmt=ppStmt@entry=0x7fffffff2da8, pzTail=0x0) at sqlite3.c:109991
#7 0x00007fffee23c40a in sqlite3LockAndPrepare (db=0x7fffea582008,
zSql=0x7fffea589300 "SELECT blocks FROM mtime_cache WHERE path=? AND mtime=? AND mtime_nsec=? AND size=?",
nBytes=84, saveSqlFlag=1, pOld=0x0, ppStmt=0x7fffffff2da8, pzTail=0x0) at sqlite3.c:110083
#8 0x00007fffee23c6e6 in sqlite3_prepare_v2 (db=<optimized out>, zSql=<optimized out>, nBytes=<optimized out>,
ppStmt=<optimized out>, pzTail=<optimized out>) at sqlite3.c:110159
#9 0x00005555556ae20e in rusqlite::{{impl}}::prepare (sql=..., self=<optimized out>, conn=<optimized out>)
at /home/chris/repos/rusqlite/src/lib.rs:665
from rusqlite.
Do you know which version of SQLite you are using (the one rusqlite is linked to) ?
You can call println!("{:?}", libsqlite3_sys::sqlite3_version)
or SELECT sqlite_version()
.
Thanks.
from rusqlite.
I believe it's this:
ii libsqlite3-0:amd64 3.11.0-1ubuntu1 amd64 SQLite 3 shared library
ii libsqlite3-0-dbg 3.11.0-1ubuntu1 amd64 SQLite 3 debugging symbols
ii libsqlite3-dev:amd64 3.11.0-1ubuntu1 amd64 SQLite 3 development files
from rusqlite.
Why pWC->a
is null (sqlite3.c:123127) ?
Maybe an allocation problem in whereClauseInsert
?
from rusqlite.
I'm not sure if the problem is my FFI Ceph bindings I created or the sqlite bindings. Yeah the pWC->a null is very strange. It could be that my bindings are messing something up and sqlite is blowing up because of it or maybe my stuff isn't related. I can't tell yet.
from rusqlite.
Ok we can close this issue. I tracked it down with valgrind. My library was using some bogus pointers and it was causing sqlite to blow up. There's no problem with the sqlite library :)
from rusqlite.
Related Issues (20)
- libsqlite3-sys fails to build on arm64: error[E0308]: mismatched types HOT 2
- release the latest version HOT 4
- FromSql vs TryFrom / ToSql vs TryInto HOT 1
- `sqlite3_compileoption_used` and Rust `const fn`
- called `Result::unwrap()` on an `Err` value: SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("json_object() requires an even number of arguments")) HOT 2
- Apps using `winsqlite3` feature no longer builds HOT 5
- Question: Is there any way to use SQLite 3.45 with rusqlite 0.30.0? HOT 2
- Trait for abstracting over `Connection`/`Transaction`? HOT 3
- SqlInputError { error: Error { code: Unknown, extended_code: 1 }, msg: "unrecognized token: \"{\"" HOT 1
- Release 0.31.0 with SQLite 3.45? HOT 2
- Type issue on select with digits only in a "string" colums. HOT 2
- wasm32-wasi target fails on Apple M3
- How to get "returning *" from insert HOT 2
- Stale Connection Handler on Multi-Threaded Situation HOT 1
- sqlite3_snapshot iteration HOT 2
- Creating `Value::Blob` without necessarily allocating heap HOT 5
- Using rusqlite::vtab::VTabConnection::handle() HOT 4
- Add bindings for `sqlite3_trace_v2` API HOT 4
- iOS Linker Warning: SQLite was build for newer version than being linked HOT 2
- the first query is failure due to below error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rusqlite.