-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
"DROP VIEW IF EXISTS" not working #267
Comments
Hello @polant, No, you are not missing anything, and you have found a bug. It will be fixed shortly: stay tuned. You may wonder how it is possible that DROP VIEW statements could fail. I would raise an eyebrow as well... Well, in order to notify transaction observers of deleted rows, GRDB has to prevent the SQLite truncate optimization. This requires a funny little dance with SQLite Compile-Time Authorization Callbacks. When misused, SQLite doesn't drop table, and views. The missing tests have been added in a0e3d4a: there won't be any regression once the fix has shipped. Thanks for the report! |
Thanks! |
The bug is fixed. Until a new version is shipped, you can use the development branch. |
Version 2.2.0 has shipped with the fix. Happy GRDB! |
I try to get a list of all views in my database:
But I can't drop the view:
In trace I see the following SQL:
DROP VIEW IF EXISTS EMAIL_TABLE;
The error did not throw, but the view actually did not delete from the database file on the disk.
But then when I try to create a view with this name (EMAIL_TABLE), I receive an error:
[logging] table EMAIL_TABLE already exists
Maybe I missing something?
GRDB version 2.1.0
Tested on simulator and iPhone 5 (iOS 10.3.3)
Thanks!
The text was updated successfully, but these errors were encountered: