SQLite

Check-in [8abc2cca]
Login

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

Overview
Comment:Remove a NEVER that can be true if a virtual table column is declared to have a DEFAULT. See forum post 3d4de8917627d058.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8abc2ccaf8106f20243568cd7fa74174386eb85d7ea381201e97e2fd527033e0
User & Date: drh 2023-12-02 12:23:34
Context
2023-12-05
19:45
Rework the JSON functions so that they use the JSONB format internally. The original JsonNode parse tree design is removed. All JSON functions that accept text JSON also accept JSONB. New functions generate JSONB. (check-in: 7f0c79b9 user: drh tags: trunk)
2023-12-02
12:23
Remove a NEVER that can be true if a virtual table column is declared to have a DEFAULT. See forum post 3d4de8917627d058. (check-in: 8abc2cca user: drh tags: trunk)
2023-11-30
20:34
Add a basic batch-mode SQL runner for the SAH Pool VFS, for use in comparing it against WebSQL. Bring the WebSQL batch runner up to date, noting that it cannot run without addition of an "origin trial" activation key from Google because that's now the only way to enable WebSQL in Chrome (that part is not checked in because that key is private). Minor code-adjacent cleanups. (check-in: 883990e7 user: stephan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/build.c.

716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
/*
** Return the expression associated with a column.  The expression might be
** the DEFAULT clause or the AS clause of a generated column.
** Return NULL if the column has no associated expression.
*/
Expr *sqlite3ColumnExpr(Table *pTab, Column *pCol){
  if( pCol->iDflt==0 ) return 0;
  if( NEVER(!IsOrdinaryTable(pTab)) ) return 0;
  if( NEVER(pTab->u.tab.pDfltList==0) ) return 0;
  if( NEVER(pTab->u.tab.pDfltList->nExpr<pCol->iDflt) ) return 0;
  return pTab->u.tab.pDfltList->a[pCol->iDflt-1].pExpr;
}

/*
** Set the collating sequence name for a column.







|







716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
/*
** Return the expression associated with a column.  The expression might be
** the DEFAULT clause or the AS clause of a generated column.
** Return NULL if the column has no associated expression.
*/
Expr *sqlite3ColumnExpr(Table *pTab, Column *pCol){
  if( pCol->iDflt==0 ) return 0;
  if( !IsOrdinaryTable(pTab) ) return 0;
  if( NEVER(pTab->u.tab.pDfltList==0) ) return 0;
  if( NEVER(pTab->u.tab.pDfltList->nExpr<pCol->iDflt) ) return 0;
  return pTab->u.tab.pDfltList->a[pCol->iDflt-1].pExpr;
}

/*
** Set the collating sequence name for a column.