/ Check-in [3a2c0479]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Remove the unused pColHash field from the Table object.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3a2c047989facc3461c63a2f9eed412014c951035a80da47c52a70139fb552de
User & Date: drh 2018-12-06 02:01:17
Context
2018-12-06
20:18
Experimental changes to (optionally) allow double-quoted strings to be checked against known identifiers. Leaf check-in: 73a6b8c1 user: mistachkin tags: normalize_v4
03:59
Invoking the sqlite3_trace() or sqlite3_trace_v2() interfaces cancels any sqlite3_profile() that is running. check-in: ec63d350 user: drh tags: trunk
02:08
Merge bug fixes from trunk. check-in: 1e13aaa2 user: drh tags: begin-concurrent
02:01
Remove the unused pColHash field from the Table object. check-in: 3a2c0479 user: drh tags: trunk
01:53
Fix a potential NULL pointer dereference that can occur in ALTER TABLE following an OOM. Test case in TH3. check-in: ea50815b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

   632    632     }
   633    633   
   634    634     /* Delete any foreign keys attached to this table. */
   635    635     sqlite3FkDelete(db, pTable);
   636    636   
   637    637     /* Delete the Table structure itself.
   638    638     */
   639         -#ifdef SQLITE_ENABLE_NORMALIZE
   640         -  if( pTable->pColHash ){
   641         -    sqlite3HashClear(pTable->pColHash);
   642         -    sqlite3_free(pTable->pColHash);
   643         -  }
   644         -#endif
   645    639     sqlite3DeleteColumnNames(db, pTable);
   646    640     sqlite3DbFree(db, pTable->zName);
   647    641     sqlite3DbFree(db, pTable->zColAff);
   648    642     sqlite3SelectDelete(db, pTable->pSelect);
   649    643     sqlite3ExprListDelete(db, pTable->pCheck);
   650    644   #ifndef SQLITE_OMIT_VIRTUALTABLE
   651    645     sqlite3VtabClear(db, pTable);

Changes to src/sqliteInt.h.

  1953   1953   /*
  1954   1954   ** The schema for each SQL table and view is represented in memory
  1955   1955   ** by an instance of the following structure.
  1956   1956   */
  1957   1957   struct Table {
  1958   1958     char *zName;         /* Name of the table or view */
  1959   1959     Column *aCol;        /* Information about each column */
  1960         -#ifdef SQLITE_ENABLE_NORMALIZE
  1961         -  Hash *pColHash;      /* All columns indexed by name */
  1962         -#endif
  1963   1960     Index *pIndex;       /* List of SQL indexes on this table. */
  1964   1961     Select *pSelect;     /* NULL for tables.  Points to definition if a view. */
  1965   1962     FKey *pFKey;         /* Linked list of all foreign keys in this table */
  1966   1963     char *zColAff;       /* String defining the affinity of each column */
  1967   1964     ExprList *pCheck;    /* All CHECK constraints */
  1968   1965                          /*   ... also used as column name list in a VIEW */
  1969   1966     int tnum;            /* Root BTree page for this table */