eda/sqlite: Set SQLITE_OMIT_AUTHORIZATION to work around bug in SQLite
authorJerome St-Louis <jerome@ecere.com>
Fri, 10 May 2013 19:52:52 +0000 (15:52 -0400)
committerJerome St-Louis <jerome@ecere.com>
Fri, 10 May 2013 19:52:52 +0000 (15:52 -0400)
- Code within for this authorization is causing random crashes on preparing the statement:
  UPDATE Contacts SET ROWID = ? WHERE ROWID = ?
  with a table:
  CREATE TABLE Contacts(Id INTEGER PRIMARY KEY, n TEXT, o TEXT, c TEXT, s TEXT, p TEXT, e TEXT, a INTEGER);

  This line:

  rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName, pTab->aCol[j].zName, db->aDb[iDb].zName);

  Is not within an 'else' of 'if( j>=pTab->nCol )'

  ROWID is not properly handled here.

eda/drivers/sqlite/EDASQLite.epj

index 61a9633..7dc3374 100755 (executable)
@@ -6,7 +6,8 @@
       "Warnings" : "All",
       "Optimization" : "None",
       "PreprocessorDefinitions" : [
-         "SQLITE_DEFAULT_LOCKING_MODE=1"
+         "SQLITE_DEFAULT_LOCKING_MODE=1",
+         "SQLITE_OMIT_AUTHORIZATION"
       ],
       "TargetType" : "SharedLibrary",
       "TargetFileName" : "EDASQLite",