/ Check-in [164b1641]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:During WITHOUT ROWID table creation, if the sqlite3CreateTable() call fails due to an authorizer denying the INSERT into the sqlite_master table, then detect this fact and abort the CREATE TABLE early, to avoid an assertion fault.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:164b1641e346994f0b9f91261c3cbc86b68e1c96cc401b78e48e186e26916abe
User & Date: drh 2018-07-09 02:02:09
Context
2018-07-09
02:37
Simplification to the logic that detects misuse of the application-defined function creation interfaces. check-in: 8f21d778 user: drh tags: trunk
02:02
During WITHOUT ROWID table creation, if the sqlite3CreateTable() call fails due to an authorizer denying the INSERT into the sqlite_master table, then detect this fact and abort the CREATE TABLE early, to avoid an assertion fault. check-in: 164b1641 user: drh tags: trunk
2018-07-08
01:02
Identify specific FuncDef objects for window functions using the pointer to the function name (FuncDef.zName) rather than the pointer to the xStep method. This allows xStep method pointer to be replaced with a single noopStepFunc() procedure, and thus save having lots of different no-op step functions. check-in: 410e13b0 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

  1784   1784       pList = sqlite3ExprListAppend(pParse, 0, 
  1785   1785                     sqlite3ExprAlloc(db, TK_ID, &ipkToken, 0));
  1786   1786       if( pList==0 ) return;
  1787   1787       pList->a[0].sortOrder = pParse->iPkSortOrder;
  1788   1788       assert( pParse->pNewTable==pTab );
  1789   1789       sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0,
  1790   1790                          SQLITE_IDXTYPE_PRIMARYKEY);
  1791         -    if( db->mallocFailed ) return;
         1791  +    if( db->mallocFailed || pParse->nErr ) return;
  1792   1792       pPk = sqlite3PrimaryKeyIndex(pTab);
  1793   1793       pTab->iPKey = -1;
  1794   1794     }else{
  1795   1795       pPk = sqlite3PrimaryKeyIndex(pTab);
  1796   1796   
  1797   1797       /*
  1798   1798       ** Remove all redundant columns from the PRIMARY KEY.  For example, change