Ticket Change Details
Not logged in

Artifact ID: 7538663d87c2b326248d9063db13ca08ef6da208
Ticket: b4795f3011238fb1af0737e1195bd327ce7b3897
Database Schema Changed Error
User & Date: anonymous 2020-05-18 09:27:05

  1. foundin changed to: ""
  2. icomment:
    We are using System.Data.SQLite dll with version for one of the database operation.
    In this operation, we are creating a new sqlite connection with following properties.
    var connectionStringBuilder = new SQLiteConnectionStringBuilder
                    SyncMode = SynchronizationModes.Normal,
                    Version = 3,
                    DataSource = fileInfo.FullName,
                    ReadOnly = false,
    Once we create a new instance of connection, opening the connection and creating a simple table with following query within a transaction.
    Successfully able to create the table.
    In our next business logic, we need to query this table to read some data and this call is happening in a another thread using a same connection which is already created during creation of table. This operation is still a synchronous operation.
    SELECT Increment FROM TestTable WHERE Guid = @Guid
    Problem Statement:
    Whenever while executing the above mentioned select statement we are getting following error in Application Console:
    "SQLite error <17>: Statement aborts at 9: [SELECT Increment FROM TestTable WHERE Guid = @Guid] Database schema has changed"
    Our Analysis on this issue:
    1. Whenever this error logs in our console, not getting SQLite Exception or any base exception(verified through our logging mechanism).
    2. This error not causing any issues to our workflows. Hence not seeing any side effects or application crash.
    3. This error not occurring when we do the SELECT operation second time. Hence error is coming during first SELECT operation only. 
    4. We are able to see the same error with earlier version of System.Data.SQLite(
    Workaround we found to avoid this error in console:
    1. Create new SQLite connection during SELECT operation. Hence avoiding using the same connection created during table creation.
    Our Questions:
    1. Why we are seeing this error in Console?
    2. Is there any retrying mechanism to prepare the SQL statement in SQLite whenever this error occurs? That's the reason still our application behaving as per the expectation.
    3. How critical this error?Do we need to ignore this error?User feels bad to see this error in his console.
  3. login: "anonymous"
  4. mimetype: "text/x-markdown"
  5. private_contact changed to: "525a262cbcf6f199b6f840881eed74260c051d35"
  6. severity changed to: "Important"
  7. status changed to: "Open"
  8. title changed to: "Database Schema Changed Error"
  9. type changed to: "Question"