Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[db executeUpdate:@"PRAGMA journal_mode=OFF"] crashes #36

Closed
trasch opened this issue Oct 11, 2011 · 1 comment
Closed

[db executeUpdate:@"PRAGMA journal_mode=OFF"] crashes #36

trasch opened this issue Oct 11, 2011 · 1 comment

Comments

@trasch
Copy link

trasch commented Oct 11, 2011

When I use [db executeUpdate:@"PRAGMA journal_mode=OFF"]; the app crashes, in FMDatabase.m:

Assertion failed: (rc!=SQLITE_ROW), function -[FMDatabase executeUpdate:error:withArgumentsInArray:orVAList:], file /Users/trasch/Projects/route-me/MapView/Map/FMDB/FMDatabase.m, line 744.

Using executeQuery, it works:
[db executeQuery:@"PRAGMA journal_mode=OFF"];

(at least, it doesn't crash...)

@ccgus
Copy link
Owner

ccgus commented Oct 11, 2011

This is because setting pragmas are considered a query by sqlite- and executeUpdate: doesn't like it when it's handed one. I just committed a fix in a branch for this (it'll throw an exception with a reason) so it should make more sense in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants