Skip to content

error code 284 msg = automatic index on [tbl_name] #138

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

Closed
fahrenheitsql opened this issue Aug 27, 2014 · 3 comments
Closed

error code 284 msg = automatic index on [tbl_name] #138

fahrenheitsql opened this issue Aug 27, 2014 · 3 comments

Comments

@fahrenheitsql
Copy link

Came across the above error. The error comes up in the console. There are no failures of any kind and the db works as designed. Only concern is that it is coming up with the table names the columns which it automatically indexing.
SQLCipher version is 3.1.0.

Any pointers that you could give me would be greatly appreciated :)

PS: Love the work you have done on this project.. :)

@developernotes
Copy link
Member

Hello @fahrenheitsql

It would be helpful if you could share what database operations are occurring when you see this message, can you debug your application and share what you see? Thanks!

@fahrenheitsql
Copy link
Author

Hi.
Thank you for the quick response.
Did a bit of digging on where the errors were coming up.
a. Any Select on a View. Error is consistent regardless of how many tables (2 or more) are in the view and how they are joined (Inner join, outer joins or sub-queries).
b. Any Select using joins.

Error does NOT come up when.
a. A select is performed on a base tables.
b. A select is performed on a View which has only 1 table. (No Joins)

Sadly, the error message is listing out all the names of the tables that are used in the select or the tables that are within the view.

Something else that I have noticed is that if a check is done on a table exists then i get the following message.
sqlite returned : error code = 17, msg = statement aborted at 16: [SELECT EXISTS(SELECT 1 FROM sqlite_master where tbl_name = 'tblRigit');] database schema has changed.

Am dynamically creating the DB at runtime. So the first time that the process runs there are no errors. But the next time onward each table that I check using the above I get the same error. I have tried using a try-catch to check if a table exists. The try-catch will display the entire create table query.

Thank you for your assistance.
Regards

@sjlombardo
Copy link
Member

Hello @fahrenheitsql

Since you don't actually see any exceptions raised, the log messages you are seeing are most likely the result of the custom logger attached by the android database wrapper (https://github.com/sqlcipher/android-database-sqlcipher/blob/master/jni/net_sqlcipher_database_SQLiteDatabase.cpp#L84). SQLite / SQLCipher internally detect and recover from a variety of expected "internal" errors that don't bubble up to the application, but are logged anyway.

You could try to suppress these log messages by adjusting the custom logger or removing the callback entirely, however, either of these options would require a custom build.

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

3 participants