SQLite

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 Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
    pList = sqlite3ExprListAppend(pParse, 0, 
                  sqlite3ExprAlloc(db, TK_ID, &ipkToken, 0));
    if( pList==0 ) return;
    pList->a[0].sortOrder = pParse->iPkSortOrder;
    assert( pParse->pNewTable==pTab );
    sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0,
                       SQLITE_IDXTYPE_PRIMARYKEY);
    if( db->mallocFailed ) return;
    pPk = sqlite3PrimaryKeyIndex(pTab);
    pTab->iPKey = -1;
  }else{
    pPk = sqlite3PrimaryKeyIndex(pTab);

    /*
    ** Remove all redundant columns from the PRIMARY KEY.  For example, change







|







1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
    pList = sqlite3ExprListAppend(pParse, 0, 
                  sqlite3ExprAlloc(db, TK_ID, &ipkToken, 0));
    if( pList==0 ) return;
    pList->a[0].sortOrder = pParse->iPkSortOrder;
    assert( pParse->pNewTable==pTab );
    sqlite3CreateIndex(pParse, 0, 0, 0, pList, pTab->keyConf, 0, 0, 0, 0,
                       SQLITE_IDXTYPE_PRIMARYKEY);
    if( db->mallocFailed || pParse->nErr ) return;
    pPk = sqlite3PrimaryKeyIndex(pTab);
    pTab->iPKey = -1;
  }else{
    pPk = sqlite3PrimaryKeyIndex(pTab);

    /*
    ** Remove all redundant columns from the PRIMARY KEY.  For example, change