SQLite

Check-in [7d58836b9d]
Login

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

Overview
Comment:Remove a completely unnecessary memset() from the INSERT code generator.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7d58836b9db1293a3a6581af4358b7c91a588efd5c9b2df384803f3855ff87a8
User & Date: drh 2017-05-31 13:27:15.732
Context
2017-05-31
13:45
Avoid allocating excess memory to the KeyInfo objects. (check-in: df78594351 user: drh tags: trunk)
13:27
Remove a completely unnecessary memset() from the INSERT code generator. (check-in: 7d58836b9d user: drh tags: trunk)
11:24
Very small performance increase in sqlite3VdbeSetNumCols(). (check-in: 8885b44610 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/insert.c.
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
#ifndef SQLITE_OMIT_TRIGGER
  int isView;                 /* True if attempting to insert into a view */
  Trigger *pTrigger;          /* List of triggers on pTab, if required */
  int tmask;                  /* Mask of trigger times */
#endif

  db = pParse->db;
  memset(&dest, 0, sizeof(dest));
  if( pParse->nErr || db->mallocFailed ){
    goto insert_cleanup;
  }

  /* If the Select object is really just a simple VALUES() list with a
  ** single row (the common case) then keep that one row of values
  ** and discard the other (unused) parts of the pSelect object







<







517
518
519
520
521
522
523

524
525
526
527
528
529
530
#ifndef SQLITE_OMIT_TRIGGER
  int isView;                 /* True if attempting to insert into a view */
  Trigger *pTrigger;          /* List of triggers on pTab, if required */
  int tmask;                  /* Mask of trigger times */
#endif

  db = pParse->db;

  if( pParse->nErr || db->mallocFailed ){
    goto insert_cleanup;
  }

  /* If the Select object is really just a simple VALUES() list with a
  ** single row (the common case) then keep that one row of values
  ** and discard the other (unused) parts of the pSelect object