# config

name: css
value:
  body {
      margin: 0 auto;
      background-color: white;
      font-family: sans-serif;
      font-size:14pt;
      -moz-text-size-adjust: none;
      -webkit-text-size-adjust: none;
      -mx-text-size-adjust: none;
  }

  a {
      color: #4183C4;
      text-decoration: none;
  }
  a:hover {
      color: #4183C4;
      text-decoration: underline;
  }
  div.forumPosts a:visited {
      color: #6A7F94;
  }

  hr {
      color: #eee;
  }

  .title {
      color: #4183C4;
      float:left;
  }
  .title h1 {
      display:inline;
  }
  .title h1:after {
      content: " / ";
      color: #777;
      font-weight: normal;
  }

  .content h1 {
      font-size: 1.25em;
  }
  .content h2 {
      font-size: 1.15em;
  }
  .content h3 {
      font-size: 1.05em;
      font-weight: bold;
  }

  .section {
      font-size: 1em;
      font-weight: bold;
      background-color: #f5f5f5;
      border: 1px solid #d8d8d8;
      border-radius: 3px 3px 0 0;
      padding: 9px 10px 10px;
      margin: 10px 0;
  }

  .sectionmenu {
      border: 1px solid #d8d8d8;
      border-radius: 0 0 3px 3px;
      border-top: 0;
      margin-top: -10px;
      margin-bottom: 10px;
      padding: 10px;
  }
  .sectionmenu a {
      display: inline-block;
      margin-right: 1em;
  }

  .status {
      float:right;
      font-size:.7em;
  }

  .mainmenu {
      font-size:.8em;
      clear:both;
      background:#eaeaea linear-gradient(#fafafa, #eaeaea) repeat-x;
      border:1px solid #eaeaea;
      border-radius:5px;
      overflow-x: auto;
      white-space: nowrap;
  }

  .mainmenu a {
      text-decoration:none;
      color: #777;
      border-right:1px solid #eaeaea;
  }
  .mainmenu a.active,
  .mainmenu a:hover {
      color: #000;
      border-bottom:2px solid #D26911;
  }

  .submenu {
      font-size: .7em;
      padding: 10px;
      border-bottom: 1px solid #ccc;
  }

  .submenu a, .submenu label {
      padding: 10px 11px;
      text-decoration:none;
      color: #777;
  }

  .submenu a:hover, .submenu label:hover {
      padding: 6px 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      color: #000;
  }

  .content {
      padding-top: 10px;
      font-size:.8em;
      color: #444;
  }

  .udiff, .sbsdiff {
      font-size: .85em !important;
      overflow: auto;
      border: 1px solid #ccc;
      border-radius: 5px;
  }
  .content blockquote {
      padding: 0 15px;
  }

  table.report {
      cursor: auto;
      border-radius: 5px;
      border: 1px solid #ccc;
      margin: 1em 0;
  }
  .report td, .report th {
     border: 0;
     font-size: .8em;
     padding: 10px;
  }
  .report td:first-child {
      border-top-left-radius: 5px;
  }
  .report tbody tr:last-child td:first-child {
      border-bottom-left-radius: 5px;
  }
  .report td:last-child {
      border-top-right-radius: 5px;
  }
  .report tbody tr:last-child {
      border-bottom-left-radius: 5px;
      border-bottom-right-radius: 5px;
  }
  .report tbody tr:last-child td:last-child {
      border-bottom-right-radius: 5px;
  }
  .report th {
      cursor: pointer;
  }
  .report thead+tbody tr:hover {
      background-color: #f5f9fc !important;
  }

  td.tktDspLabel {
      width: 70px;
      text-align: right;
      overflow: hidden;
  }
  td.tktDspValue {
      text-align: left;
      vertical-align: top;
      background-color: #f8f8f8;
      border: 1px solid #ccc;
  }
  td.tktDspValue pre {
      white-space: pre-wrap;
  }

  span.timelineDetail {
      font-size: 90%;
  }

  .footer {
      border-top: 1px solid #ccc;
      padding: 10px;
      font-size:.7em;
      margin-top: 10px;
      color: #ccc;
  }
  div.timelineDate {
      font-weight: bold;
      white-space: nowrap;
  }
  span.submenuctrl, span.submenuctrl input, select.submenuctrl {
    color: #777;
  }
  span.submenuctrl {
    white-space: nowrap;
  }
  div.submenu label {
    white-space: nowrap;
  }

  @media screen and (max-width: 600px) {
    /* Spacing for mobile */
    body {
      padding-left: 4px;
      padding-right: 4px;
    }
    .title {
      padding-top: 0px;
      padding-bottom: 0px;
    }
    .status {padding-top: 0px;}
    .mainmenu a {
      padding: 10px 10px;
    }
    .mainmenu {
      padding: 10px;
    }
    .desktoponly {
      display: none;
    }
  }
  @media screen and (min-width: 600px) {
    /* Spacing for desktop */
    body {
      padding-left: 20px;
      padding-right: 20px;
    }
    .title {
      padding-top: 10px;
      padding-bottom: 10px;
    }
    .status {padding-top: 30px;}
    .mainmenu a {
      padding: 10px 20px;
    }
    .mainmenu {
      padding: 10px;
    }
  }
  @media screen and (max-width: 1200px) {
    /* Special declarations for narrow desktop or wide mobile */
    .wideonly {
      display: none;
    }
  }


name: header
value:
  <div class="header">
  <div class="title">
  <img id='sqlitelogo' src='$home/logo' style='height:50px;'> 
  <span style='vertical-align:super;'><span id='titlesep'>/</span> $<title></span>
  </div>
  <div class="status"><th1>
   if {[info exists login]} {
     html "$login — <a href='$home/login'>Logout</a>\n"
   } else {
     html "<a href='$home/login'>Login</a>\n"
   }
  </th1></div>
  </div>
  <div class="mainmenu">
  <th1>
  proc menulink {url name cls} {
    upvar current_page current
    upvar home home
    if {[string range $url 0 [string length $current]] eq "/$current"} {
      html "<a href='$home$url' class='active $cls'>$name</a>\n"
    } else {
      html "<a href='$home$url' class='$cls'>$name</a>\n"
    }
  }
  menulink $index_page Home {}
  if {[anycap jor]} {
    menulink /timeline Timeline {}
  }
  if {[hascap oh]} {
    menulink /dir?ci=tip Files desktoponly
  }
  if {[hascap o]} {
    menulink  /brlist Branches desktoponly
    menulink  /taglist Tags wideonly
  }
  if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
    menulink /forum Forum wideonly
  }
  if {[hascap r]} {
    menulink /ticket Tickets desktoponly
  }
  if {[hascap j]} {
    menulink /wiki Wiki wideonly
  }
  if {[hascap s]} {
    menulink /setup Admin {}
    menulink /sitemap More... desktoponly
  } elseif {[hascap a]} {
    menulink /setup_ulist Users {}
    menulink /sitemap More... {}
  } else {
    menulink /sitemap More... {}
  }
  </th1></div>


name: footer
value:
  <div class="footer">
  This page was generated in about
  <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by
  Fossil $release_version $manifest_version $manifest_date
  </div>


name: details
value:
  timeline-arrowheads:        1
  timeline-circle-nodes:      1
  timeline-color-graph-lines: 1
  white-foreground:           0


name: ticket-common
value:
  set type_choices {
     Code_Defect
     Build_Problem
     Documentation
     Feature_Request
     Incident
     Performance_Issue
     Portability
     Compiler_Warning
     Support_Request
     Not_A_Bug
  }
  set priority_choices {
    Immediate
    High
    Medium
    Low
    Zero
  }
  set severity_choices {
    Critical
    Severe
    Important
    Minor
    Cosmetic
  }
  set resolution_choices {
    Open
    Fixed
    Rejected
    Workaround
    Unable_To_Reproduce
    Works_As_Designed
    External_Bug
    Not_A_Bug
    Duplicate
    Overcome_By_Events
    Drive_By_Patch
    Misconfiguration
    Wont_Fix
  }
  set status_choices {
    Open
    Verified
    Review
    Deferred
    Fixed
    Tested
    Closed
  }
  set subsystem_choices {
    Unknown
    Parser
    Code_Generator
    Virtual_Machine
    B-Tree
    Pager
    VFS
    Utilities
    Extensions
    Shell
    Makefile
    Documentation
    Other
  }
  set detected_choices {
    Application_Fault
    Code_Review
    Static_Code_Analysis
    Requirement_Testing
    Structural_Testing
    Stress_Testing
    Other
    Not_Applicable
  }


name: ticket-newpage
value:
  <th1>
    if {![info exists mutype]} {set mutype {Wiki}}
    if {[info exists submit]} {
       set status Open
       if {$mutype eq "HTML"} {
         set mimetype "text/html"
       } elseif {$mutype eq "Wiki"} {
         set mimetype "text/x-fossil-wiki"
       } elseif {$mutype eq {[links only]}} {
         set mimetype "text/x-fossil-plain"
       } else {
         set mimetype "text/plain"
       }
       submit_ticket
    }
  </th1>
  <h1 style="text-align: center;">Enter A New Ticket</h1>
  <p><big><font color="red"><b>Note:</b> Discuss your concern on the
  <a href="http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users">
  SQLite users mailing list</a> before writing a ticket.
  Tickets for issues that have not been previously discussed on
  the mailing list will usually be deleted without comment.</p></font></big>
  <table cellpadding="5">
  <tr>
  <td colspan="3">
  Enter a one-line summary of the ticket:<br />
  <input type="text" name="title" size="60" value="$<title>" />
  </td>
  </tr>

  <tr>
  <td align="right">Type:</td>
  <td align="left"><th1>combobox type $type_choices 1</th1></td>
  <td align="left">What type of ticket is this?</td>
  </tr>

  <tr>
  <td align="right">Version:</td>
  <td align="left">
  <input type="text" name="foundin" size="20" value="$<foundin>" />
  </td>
  <td align="left">In what version or build number do you observe
  the problem?</td>
  </tr>

  <tr>
  <td align="right">Severity:</td>
  <td align="left"><th1>combobox severity $severity_choices 1</th1></td>
  <td align="left">How debilitating is the problem?  How badly does the problem
  affect the operation of the product?</td>
  </tr>

  <tr>
  <td align="right">EMail:</td>
  <td align="left">
  <input type="text" name="private_contact" value="$<private_contact>"
   size="30" />
  </td>
  <td align="left"><u>Not publicly visible</u>
  Used by developers to contact you with questions.</td>
  </tr>

  <tr>
  <td colspan="3">
  Enter a detailed description of the problem.
  For code defects, be sure to provide details on exactly how
  the problem can be reproduced.  Provide as much detail as
  possible.  Format:
  <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1>
  <br />
  <th1>set nline [linecount $comment 50 10]</th1>
  <textarea name="icomment" cols="80" rows="$nline"
   wrap="virtual" class="wikiedit">$<icomment></textarea><br />
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr><td colspan="3">
  Description Preview:<br /><hr />
  <th1>
  if {$mutype eq "Wiki"} {
    wiki $icomment
  } elseif {$mutype eq "Plain Text"} {
    set r [randhex]
    wiki "<verbatim-$r>[string trimright $icomment]\n</verbatim-$r>"
  } elseif {$mutype eq {[links only]}} {
    set r [randhex]
    wiki "<verbatim-$r links>[string trimright $icomment]\n</verbatim-$r>"
  } else {
    wiki "<nowiki>$icomment\n</nowiki>"
  }
  </th1>
  <hr /></td></tr>
  <th1>enable_output 1</th1>

  <tr>
  <td><td align="left">
  <input type="submit" name="preview" value="Preview" />
  </td>
  <td align="left">See how the description will appear after formatting.</td>
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr>
  <td><td align="left">
  <input type="submit" name="submit" value="Submit" />
  </td>
  <td align="left">After filling in the information above, press this
  button to create the new ticket</td>
  </tr>
  <th1>enable_output 1</th1>

  <tr>
  <td><td align="left">
  <input type="submit" name="cancel" value="Cancel" />
  </td>
  <td>Abandon and forget this ticket</td>
  </tr>
  </table>


name: ticket-editpage
value:
  <th1>
    if {![info exists mutype]} {set mutype {Wiki}}
    if {![info exists icomment]} {set icomment {}}
    if {![info exists username]} {set username $login}
    if {[info exists submit]} {
      if {$mutype eq "Wiki"} {
        set mimetype text/x-fossil-wiki
      } elseif {$mutype eq "HTML"} {
        set mimetype text/html
      } elseif {$mutype eq {[links only]}} {
        set mimetype text/x-fossil-plain
      } else {
        set mimetype text/plain
      }
      submit_ticket
      set preview 1
    }
  </th1>
  <table cellpadding="5">
  <tr><td class="tktDspLabel">Title:</td><td>
  <input type="text" name="title" value="$<title>" size="60" />
  </td></tr>

  <tr><td class="tktDspLabel">Status:</td><td>
  <th1>combobox status $status_choices 1</th1>
  </td></tr>

  <tr><td class="tktDspLabel">Type:</td><td>
  <th1>combobox type $type_choices 1</th1>
  </td></tr>

  <tr><td class="tktDspLabel">Severity:</td><td>
  <th1>combobox severity $severity_choices 1</th1>
  </td></tr>

  <tr><td class="tktDspLabel">Priority:</td><td>
  <th1>combobox priority $priority_choices 1</th1>
  </td></tr>

  <tr><td class="tktDspLabel">Resolution:</td><td>
  <th1>combobox resolution $resolution_choices 1</th1>
  </td></tr>

  <tr><td class="tktDspLabel">Subsystem:</td><td>
  <th1>combobox subsystem $subsystem_choices 1</th1>
  </td></tr>

  <th1>enable_output [hascap e]</th1>
    <tr><td class="tktDspLabel">Contact:</td><td>
    <input type="text" name="private_contact" size="40"
     value="$<private_contact>" />
    </td></tr>
  <th1>enable_output 1</th1>

  <tr><td class="tktDspLabel">Version&nbsp;Found&nbsp;In:</td><td>
  <input type="text" name="foundin" size="50" value="$<foundin>" />
  </td></tr>

  <tr><td colspan="2">
    Append Remark with format
    <th1>combobox mutype {Wiki HTML {Plain Text} {[links only]}} 1</th1>
    from
    <input type="text" name="username" value="$<username>" size="30" />:<br />
    <textarea name="icomment" cols="80" rows="15"
     wrap="virtual" class="wikiedit">$<icomment></textarea>
  </td></tr>

  <th1>enable_output [info exists preview]</th1>
  <tr><td colspan="2">
  Description Preview:<br><hr>
  <th1>
  if {$mutype eq "Wiki"} {
    wiki $icomment
  } elseif {$mutype eq "Plain Text"} {
    set r [randhex]
    wiki "<verbatim-$r>\n[string trimright $icomment]\n</verbatim-$r>"
  } elseif {$mutype eq {[links only]}} {
    set r [randhex]
    wiki "<verbatim-$r links>\n[string trimright $icomment]</verbatim-$r>"
  } else {
    wiki "<nowiki>\n[string trimright $icomment]\n</nowiki>"
  }
  </th1>
  <hr>
  </td></tr>
  <th1>enable_output 1</th1>

  <tr>
  <td align="right">
  <input type="submit" name="preview" value="Preview" />
  </td>
  <td align="left">See how the description will appear after formatting.</td>
  </tr>

  <tr>
  <td align="right">
  <input type="submit" name="submit" value="Submit" />
  </td>
  <td align="left">Apply the changes shown above</td>
  </tr>

  <tr>
  <td align="right">
  <input type="submit" name="cancel" value="Cancel" />
  </td>
  <td>Abandon this edit</td>
  </tr>

  </table>


# reportfmt

title: All Tickets
cols:
  #ffffff Key:
  #f2dcdc Active
  #e8e8e8 Review
  #cfe8bd Fixed
  #bde5d6 Tested
  #cacae5 Deferred
  #c8c8c8 Closed

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    datetime(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title
  FROM ticket
  ORDER BY mtime DESC


owner: drh
title: Open tickets
cols:
  #ffffff Key:
  #f2dcdc Active
  #e8e8e8 Review
  #cfe8bd Fixed
  #bde5d6 Tested
  #cacae5 Deferred
  #c8c8c8 Closed

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    date(tkt_mtime) AS 'mtime',
    type,
    subsystem,
    title
  FROM ticket
  WHERE status='Open' AND type!='Feature_Request'
  ORDER BY tkt_mtime DESC


owner: drh
title: Open Feature Requests
cols:
  #ffffff Key:
  #f2dcdc Active
  #e8e8e8 Review
  #cfe8bd Fixed
  #bde5d6 Tested
  #cacae5 Deferred
  #c8c8c8 Closed

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    date(tkt_mtime) AS 'mtime',
    subsystem,
    title
  FROM ticket
  WHERE status='Open' AND type='Feature_Request'
  ORDER BY tkt_mtime DESC


owner: dan
title: Open fts3 tickets.
cols:
[cell repeats an earlier one in this file: 109 characters]

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    datetime(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title
  FROM ticket

  WHERE 
  status = 'Open' AND (title LIKE '%fts3%' OR comment LIKE '%fts3%')


owner: shane
title: Open shell tickets.
cols:
[cell repeats an earlier one in this file: 109 characters]

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    datetime(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title
  FROM ticket

  WHERE 
  status = 'Open' AND (subsystem = 'Shell' OR title LIKE '%shell%' OR comment LIKE '%shell%')


owner: shane
title: Fixed tickets
cols:
[cell repeats an earlier one in this file: 109 characters]

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    date(tkt_mtime) AS 'mtime',
    type,
    subsystem,
    title
  FROM ticket
  WHERE status='Fixed' 
  ORDER BY tkt_mtime DESC


owner: drh
title: Core Crash Bugs
cols:
[cell repeats an earlier one in this file: 109 characters]

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    date(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title
  FROM ticket
  WHERE type='Code_Defect'
  AND subsystem!='Shell' AND subsystem!='Extensions'
  AND resolution NOT IN ('Not_A_Bug','External_Bug','Works_As_Designed','Duplicate')
  ORDER BY tkt_mtime DESC


owner: drh
title: Recently changed tickets
cols:
[cell repeats an earlier one in this file: 109 characters]

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    datetime(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title,
    comment AS '_comments'
  FROM ticket
  WHERE tkt_mtime>(SELECT julianday('now','-12 months'))
  ORDER BY tkt_mtime DESC


# event

type: ci
user: drh
comment:
  Fix a bug on systems where malloc(0) return NULL.
  Add code to detect this bug even on systems were it used not to
  occur. (CVS 190)


type: ci
user: drh
comment:
  The first test file for BTree added. Simple insert and delete tests pass.
  There is still a lot of work to be done, though. (CVS 228)


type: ci
user: drh
comment:
  Add index access methods to the DBBE in preparation for adding a new
  DBBE for the btree.c module. (CVS 236)


type: ci
user: drh
comment:
  The code is in place to replace GDBM with BTree.  But I have not yet
  attempted to compile it.  I am sure the code contains bugs. (CVS 238)


type: ci
user: drh
comment:
  The BTree changes are now integrated and the whole thing compiles and
  links. I have not yet tried to run it, though. (CVS 239)


type: ci
user: drh
comment:
  It runs. Simple tables can be created. INSERT and SELECT work. Much more
  testing is needed, however. (CVS 241)


type: ci
user: drh
comment:
  All tests now pass.  But there are still issues.  For example, inserts
  are way too slow.  And additional tests are needed for new features. (CVS 243)


type: ci
user: drh
comment:
  Add a new column in the SQLITE_MASTER table to record the root page
  number of primary key indices. (CVS 252)


type: ci
user: drh
comment:
  Put in a generic hash table system in place of the various ad-hoc
  hash table scattered everywhere.  Except, the page hash table in
  the pager is unchanged. (CVS 260)


type: ci
user: drh
comment:
  Added basic support for enforcement of UNIQUE on indices and primary
  keys.  Support for addition constraints is to follow. (CVS 267)


type: ci
user: drh
comment:
  The .dump output uses INSERT instead of COPY now.  Expression syntax
  of the form "expr NOT NULL" is now supported. (CVS 276)


type: ci
user: drh
comment:
  More changes prior to release 2.0.2.  Mostly comment changes.  But there
  was also a minor change to temptable.test so that it would work under
  Windows. (CVS 282)


type: ci
user: drh
comment:
  The sqlite_busy_timeout() function was interpreting its second argument
  as seconds, not milliseconds as advertised.  This patch fixes the problem. (CVS 284)


type: ci
user: drh
comment:
  Remove the P3 and label arguments from the internal sqliteVdbeAddOp()
  function.  This makes the code easier to read and perhaps smaller as
  well. (CVS 286)


type: ci
user: drh
comment:
  Added support for the COUNT_CHANGES pragma in order to help out the
  ODBC driver.  Fixed a but on count(*) when applied to empty tables. (CVS 289)


type: ci
user: drh
comment:
  Support for UTF-8 and ISO8859 characters in identifiers.  Bug fix in
  the column name generator for selects (was coreing). (CVS 290)


type: ci
user: drh
comment:
  Remove cruft: restrict the number of sorters and lists in the VDBE to one
  since no more than one was ever used anyway.  This eliminates several
  op-codes and simplifies the implementation of several others. (CVS 297)


type: ci
user: drh
comment:
  Implement indices that occur in sort order and the LIMIT...OFFSET clause
  of SELECT statements. (CVS 301)


type: ci
user: drh
comment:
  Incremental update.  We are in the middle of modifying the index system
  to support range queries without doing a complete table scan. (CVS 303)


type: ci
user: drh
comment:
  The new code for taking advantage of inequalities in WHERE clauses
  is in place.  It appears to work. (CVS 305)


type: ci
user: drh
comment:
  Fix a bug in DROP TABLE that could cause SQLITE_MASTER table corruption.
  The root problem was that the sequence of BTree operations (Delete, Next)
  would not always leave the cursor pointing at the first entry after the
  entry that was deleted.  A consequence of this error was that a DROP TABLE
  on a table with indices would not always remove every index associated
  with that table from the SQLITE_MASTER table.  Subsequent attempts to
  open the database will fail when the index for the missing table was
  parsed.  Changes have also been made to ignore extra indices in the
  SQLITE_MASTER table so that a database previously corrupted by this bug
  is once again readable. (CVS 316)


type: ci
user: drh
comment:
  Fix comparison functions so that they are consistent with the order
  of elements in indices.  Fix the handling of large integers. (CVS 317)


type: ci
user: drh
comment:
  Bug fix: sqlite_exec() would sometimes return SQLITE_PROTOCOL when it
  should have returned SQLITE_BUSY.  There was also a deadlock that the
  previous bug was masking. (CVS 322)


type: ci
user: drh
comment:
  Fix a race condition in the locking code that would sometimes cause
  SQLITE_PROTOCOL or SQLITE_CORRUPT to be returned when SQLITE_BUSY should
  have been returned. (CVS 326)


type: ci
user: drh
comment:
  Fix a bug in the sqliteBtreeFirst() function which was causing the first
  row of a table to be repeated during a scan. (CVS 328)


type: ci
user: drh
comment:
  Comment changes.  Change the use of BTree so that either the key is
  an integer or the data is empty. (CVS 337)


type: ci
user: drh
comment:
  An attempt to delete a single row using a WHERE clause that specifies
  the rowid would result in an error if the rowid did not exist.  This
  problem has been resolved. (CVS 338)


type: ci
user: drh
comment:
  Working on a bug: Dropping and recreating a table within a transaction
  causes an assertion failure. (CVS 342)


type: ci
user: drh
comment:
  Fix a bug that could cause UPDATE to fail for a table that contains
  both an INTEGER PRIMARY KEY and an index. (CVS 346)


type: ci
user: drh
comment:
  Added the last_insert_rowid API function.  Improved documentation of
  the random ROWID algorithm. (CVS 349)


type: ci
user: drh
comment:
  The right-hand side of an AS in a SELECT can be used within expressions of
  the WHERE, ORDER BY, GROUP BY, and/or HAVING clauses. (CVS 350)


type: ci
user: drh
comment:
  Bug fix: The IN operator was not working if either side derived from
  an INTEGER PRIMARY KEY. (CVS 354)


type: ci
user: drh
comment:
  The new ON CONFLICT logic is in and passes the legacy tests.  But the
  new capabilities have not been tested and are likely broken. (CVS 356)


type: ci
user: drh
comment:
  Change to five conflict resolution algorithms: ROLLBACK, ABORT, FAIL,
  IGNORE, and REPLACE.  This checkin is code only.  Documentation and
  tests are still needed.  Also, ABORT is not fully implemented. (CVS 360)


type: ci
user: drh
comment:
  Checkpoint code added to the pager.  Regression tests work but the new APIs
  have not been tested yet. (CVS 361)


type: ci
user: drh
comment:
  Bug fix: if PRAGMA full_column_names=ON is set and you do a query like this:
  "SELECT rowid,* FROM ...", then an assertion failed.  Bummer. (CVS 368)


type: ci
user: drh
comment:
  Add support for subqueries in the FROM clause of a SELECT.  Still need
  to add tests for this feature. (CVS 372)


type: ci
user: drh
comment:
  Change the name of the sanity_check PRAGMA to "integrity_check" and make
  it available on all compiles. (CVS 381)


type: ci
user: drh
comment:
  Code to implement CREATE VIEW is in place.  A quick smoke test shows that
  it works, but there are probably still many bugs. (CVS 387)


type: ci
user: drh
comment:
  Bug fix in lemon: 3-way conflicts (SHIFT/REDUCE/REDUCE) were not detected or
  resolved.  This is now fixed.  Also, table compression works a little better. (CVS 388)


type: ci
user: drh
comment:
  Modify lemon to use much less memory for its parser tables.  This reduces
  the size of the library by 50K, which is important for an embedded library. (CVS 389)


type: ci
user: drh
comment:
  Added support for user-defined normal functions.  Support for user-defined
  aggregates is pending. (CVS 390)


type: ci
user: drh
comment:
  Code for user-defined aggregates added.  Legacy tests all pass but there
  has been no testing of the new user-defined aggregate code. (CVS 392)


type: ci
user: drh
comment:
  Added a "stddev()" aggregate function for testing the new user aggregate
  function interface. (CVS 393)


type: ci
user: drh
comment:
  Try to reduce the number of malloc() for user-defined functions.  Begin
  transfering built-in functions over to the user-define function
  mechanism. (CVS 399)


type: ci
user: drh
comment:
  Completely remove the old SQL function system and replace it with the
  new user functions.  The code currently compiles but it coredumps on the
  test suite.  Do not use in its present state. (CVS 400)


type: ci
user: drh
comment:
  Change the IFNULL and NVL functions to COALESCE.  Change MIN and MAX so that
  they require at least one argument. (CVS 404)


type: ci
user: drh
comment:
  Subquery flattening is implemented and passes all regression tests.
  We still need to add addition tests to the suite to further exercise
  the flattener, however. (CVS 408)


type: ci
user: drh
comment:
  Change the btree node balancers to sort nodes into accending order.  This
  improves insert and delete speed by 25%. (CVS 409)


type: ci
user: drh
comment:
  Pager optimization: do not write or journal free pages.  This results in
  a 2x performance gain for large INSERTs and a 5x performance gain for
  large DELETEs. (CVS 410)


type: ci
user: drh
comment:
  VIEWs are bound to tables when they are used, not when they are first
  entered.  This works around the problem of what to do if a table is deleted
  that a view refers to. (CVS 415)


type: ci
user: drh
comment:
  Add the ability to turn of calls to fsync() using the "synchronous" pragma.
  Increased the default cache size from 100 to 2000 and made the "cache_size"
  pragma persistent. (CVS 418)


type: ci
user: drh
comment:
  Change the pager locking mechanism so that we don't have to write page 1
  to the journal and to the database unless it actually changes. (CVS 419)


type: ci
user: drh
comment:
  Added the default_cache_size and default_synchronous pragmas.  Added additional
  tests for pragmas.  Added a new speedtest script. (CVS 421)


type: ci
user: drh
comment:
  Added prototypes to sqlite.h for sqlite_freemem(), sqlite_libversion()
  and sqlite_libencoding(). (CVS 424)


type: ci
user: drh
comment:
  Fix bug in anonymous subquery in a join.  Parser requires a semicolon or
  end-of-input before executing. (CVS 429)


type: ci
user: drh
comment:
  Bug fix: allow ROWID as a column in SELECT statements where the FROM clause
  includes views which are flattened. (CVS 431)


type: ci
user: drh
comment:
  One more change before 2.4.2: Make the os.h header file more robust in
  detecting whether to use unix or windows. (CVS 434)


type: ci
user: drh
comment:
  Fix a bug in subquery generation when the subquery is a compound select.
  Also added new tests to cover this case. (CVS 435)


type: ci
user: drh
comment:
  The sqlite_get_table() function now returns an error if you pass in two
  or more SELECT statements that return different numbers of columns. (CVS 436)


type: ci
user: drh
comment:
  Update the documentation to refer the reader to the CVS server for the change
  log, bug lists, or the latest sources. (CVS 500)


type: ci
user: drh
comment:
  Combine the homerpm.sh file in with publish.sh.  Update the website files to
  refer to the new RPMs that are now being built.  Fix a small problem with
  the spec file. (CVS 505)


type: ci
user: drh
comment:
  When an attempt is made to insert an explicit NULL into an INTEGER
  PRIMARY KEY column, automatically convert the NULL value into a unique
  integer key.  This was already happening when an implied NULL was
  inserted - when the INTEGER PRIMARY KEY column was omitted from the
  list of columns being inserted.  Patches from Christian Werner. (CVS 510)


type: ci
user: drh
comment:
  Remove from the index page of the website hyperlinks that are not directly
  related to SQLite. (CVS 511)


type: ci
user: drh
comment:
  Fix for bug #7: Correctly display the P3 operand in a VDBE trace when the
  operand is really a pointer to a structure. (CVS 512)


type: ci
user: drh
comment:
  Fix for bug #8: Correctly handle terms of a WHERE clause in a join where the
  term does not use a comparison operator. (CVS 515)


type: ci
user: drh
comment:
  Add an fflush() call to shell.c to insure that all output has been written
  before we prompt for a new line of input. (CVS 519)


type: ci
user: drh
comment:
  Make the FROM clause on a SELECT optional.  If omitted, the result of
  the SELECT is a single row consisting of the values in the expression list. (CVS 520)


type: ci
user: drh
comment:
  Fix for bug #10: Pop the stack by the right amount on an IGNORE so that the
  stack does not grow without bound. (CVS 523)


type: ci
user: drh
comment:
  Fix for bug #15: Add the sqlite_changes() API function for retrieving the
  number of rows that changed in the previous operation. (CVS 526)


type: ci
user: drh
comment:
  Add tests to prevent a recurrance of bug #16. Also: put a hyperlink to the new
  ticket screen on the main page of the website. (CVS 527)


type: ci
user: drh
comment:
  When doing a ".dump" command in the command-line shell, make sure VIEWs
  are created after TABLEs. (CVS 529)


type: ci
user: drh
comment:
  Fix for ticket #19: Do not call sqliteOsSync() if the only changes were
  changes to TEMP tables. (CVS 530)


type: ci
user: persicom
comment:
  General:
  o Added global static chars mainPrompt and continuePrompt.
  o Moved Argv0 declaration to head of file. Needed in do_meta_command,
    previously found below that.
  o Added struct previous_mode_data to support new .explain toggle
    functionality.
  o Added nullvalue, explainPrev and outfile members to
    struct callback_data.
  o Added modeDescr array for number/text translation ofdisplay modes.
  o Modified zHelp to match new functionality.

  callback():
  o Added support for .nullvalue

  do_meta_command():
  o Output filename is now saved to callback struct. If using stdout,
    then the string "stdout" is saved.
  o Explain is now a toggle. When it is turned on, the current values of
    mode, header and colWidth are saved if not already in explain mode.
    When turned off, those values are restored.
  o Allow .mode plurals columns and lines and dot command plural
    .headers.
  o Added processing for new keywords .quit, .nullvalue, .show, .prompt.

  main():
  o Added -init as an option to override .sqliterc.
  o Added -nullvalue as a command line option.
  o Processes .sqliterc.

  main_init():
  o Genesis. Moved some initialization code here from inside main() so
    that it can be called initially by main and again if -init is
    specified.

  one_input_line():
  o Now takes prompts from settable values.

  process_sqliterc():
  o Genesis. Read .sqliterc from user's home directory and pass it to
    process_input(). File should contain meta commands for setups. (CVS 531)


type: ci
user: drh
comment:
  Change shell.c so that it will compile under windows.  Shorten the help
  command somewhat.  Add the state of ".header" to the output of ".show". (CVS 534)


type: ci
user: drh
comment:
  Fix for ticket #1: Implement the GLOB and LIKE operators as functions that
  can be overridden.  This way, a developer can change the LIKE operator to
  be case sensitive, for example. (CVS 537)


type: ci
user: drh
comment:
  Fix for ticket #21 (I think): Do not return an "out of memory" error if we
  can not find the users home directory. Instead, just report that we could
  not find the home directory. (CVS 540)


type: ci
user: drh
comment:
  Fix for ticket #22: In the code generator for compound SELECT statements, take
  care not to generate column name headers if the output is an intermediate table.
  Otherwise the column headers are not generated correctly if a compound SELECT
  statement appears as an expression in part of the WHERE clause. (CVS 543)


type: ci
user: drh
comment:
  Fix for ticket #26: Document the fact that CREATE TABLE might not be
  immediately visible to other processes that are holding the database open. (CVS 544)


type: ci
user: drh
comment:
  Added the "encode.c" source file that contains two utility subroutines that
  can be used to encode binary data for use in INSERT and UPDATE statements.
  This is just an initial checking.  The code has not yet been integrated into
  the library. (CVS 545)


type: ci
user: drh
comment:
  Fix for ticket #31: Do not attempt the flattening optimization if the
  subselect does not contain a FROM clause.  Handle the special case where
  a WHERE clause is constant. (CVS 548)


type: ci
user: drh
comment:
  Fix typos in the man-page (sqlite.1) and remove two unused files.
  Patches from Andreas Rottmann. (CVS 551)


type: ci
user: drh
comment:
  Fix for tickets #32 and #33: Generate the names of the result set early, before
  doing the flattening optimization or evaluating subqueries.  Otherwise, the
  result set column names are generated incorrectly or after they are needed. (CVS 553)


type: ci
user: drh
comment:
  Increase the version number and update the change log in preparation for
  the 2.4.11 release. (CVS 554)


type: ci
user: drh
comment:
  Attempt to detect when two or more threads try to use the same database at
  the same time and return an SQLITE_MISUSE error.  Also return this error
  if an attempt is made to use a closed database. (CVS 558)


type: ci
user: drh
comment:
  Improvements to the SQLITE_MISUSE detection logic.  Also added test cases
  for this logic, including the new test file "misuse.test". (CVS 559)


type: ci
user: drh
comment:
  Update the misuse.test script so that it will work under Windows.  Changes
  to the speed testing script to support version 2.4.12. (CVS 560)


type: ci
user: drh
comment:
  In the "lang.html" documentation file, put the CREATE TRIGGER and DROP TRIGGER
  sections in alphabetical order. (CVS 564)


type: ci
user: drh
comment:
  Remove all tabs from the beginning of source code lines.  Replace tabs with
  the appropriate number of spaces. (CVS 565)


type: ci
user: drh
comment:
  Fix for ticket #45: Allow an UPDATE statement to change the INTEGER PRIMARY KEY
  to itself without triggering a constraint error. (CVS 573)


type: ci
user: drh
comment:
  Modify the shell so that when it is doing a ".dump" it always uses single
  quotes and not double quotes for quoting literal strings.  This is for
  portability to other databases that only support single quote string literals. (CVS 574)


type: ci
user: drh
comment:
  Double-quoted strings resolve to column names if possible.  Single-quoted
  strings continue to be interpreted as string literals. (CVS 576)


type: ci
user: drh
comment:
  Fix for ticket #47: Use a cast to avoid a warning about discarding a "const"
  inside of hash.c. (CVS 577)


type: ci
user: drh
comment:
  Fix for ticket #46: Report an error if a CREATE TABLE contains two or more
  columns with the same name. (CVS 578)


type: ci
user: drh
comment:
  Partial fix for ticket #49.  The correct result is computed, but now we have
  a memory leak.  I'm not sure if the memory leak was pre-existing or a result
  of this change. (CVS 581)


type: ci
user: drh
comment:
  Change the names of the PushList and PopList opcodes to ListPush and ListPop
  so that they will appear together with the other List opcodes in the
  documentation. (CVS 583)


type: ci
user: drh
comment:
  Split the IdList structure into IdList and SrcList.  SrcList is used to
  represent a FROM clause and IdList is used for everything else.  This change
  allows SrcList to grow to support outer joins without burdening the other
  uses of IdList. (CVS 584)


type: ci
user: drh
comment:
  Add support for the full SQL join syntax.  This is just a parser enhancement.
  We now recognize all kinds of joins, but we don't actually do anything with
  them yet. (CVS 586)


type: ci
user: drh
comment:
  Initial implementation of LEFT OUTER JOIN including the expanded SQL92 join
  syntax. The basic functionality is there but there is still a lot of testing
  to do. (CVS 587)


type: ci
user: drh
comment:
  NULL values are distinct.  A comparison involving a NULL is always false.
  Operations on a NULL value yield a NULL result.  This change makes SQLite
  operate more like the SQL spec, but it may break existing applications that
  assumed the old behavior.  All the old tests pass but we still need to add
  new tests to better verify the new behavior.  Fix for ticket #44. (CVS 589)


type: ci
user: drh
comment:
  A SELECT statement inside the body of a TRIGGER uses the SRT_Discard target
  to discard the query results.  Such selects are intended to be used to call
  user-defined functions for their side-effects.  They do not return results. (CVS 594)


type: ci
user: drh
comment:
  Once it is opened, leave the checkpoint journal file open for the
  duration of a transaction, rather than closing it and reopening it
  for each statement.  (Ticket #53) (CVS 599)


type: ci
user: drh
comment:
  Refinements to NULL processing: NULLs are indistinct for DISTINCT and UNION.
  Multiplying a NULL by zero yields zero. In a CASE expression, a NULL comparison
  is considered false, not NULL.  With these changes, NULLs in SQLite now work
  the same as in PostgreSQL and in Oracle. (CVS 600)


type: ci
user: drh
comment:
  Multiplying NULL by zero gives NULL, not zero.  I misread the test data
  and coded it wrong.  This check-in fixes the problem. (CVS 601)


type: ci
user: drh
comment:
  Enhance the ORDER BY clause so that an integer term means to sort by the
  corresponding column. (CVS 602)


type: ci
user: drh
comment:
  Add the ability to parse FOREIGN KEYs.  Foreign keys are still ignored,
  but at least they now do not cause a syntax error. (CVS 603)


type: ci
user: drh
comment:
  Added the %fallback directive to the lemon parser generator and used this
  in the parser to make the parse tables much smaller.  This reduced the size
  of the library by 15K. (CVS 605)


type: ci
user: drh
comment:
  Fix for ticket #62: Do not report an SQLITE_READONLY error until the application
  actually tries to write data into a readonly file.  It is OK to start a
  transaction on a read-only file, and doing so will get you a read lock.  This
  change allows TEMP tables to be read/write even though the main database is
  readonly. (CVS 607)


type: ci
user: drh
comment:
  Fix for ticket #59: Add documentation for the || operator.  Also added
  documentation for the new SQL92 join syntax. (CVS 608)


type: ci
user: drh
comment:
  Bug fix: do not segfault if a SELECT without a FROM clause includes
  the * wildcard in the result column list. (CVS 609)


type: ci
user: drh
comment:
  Add optimizations for the IN operator in WHERE clauses.  This is a partial
  implementation of enhancement #63.  Still need to add test cases. (CVS 610)


type: ci
user: drh
comment:
  Fix for ticket #65: If an integer value is too big to be represented as a
  32-bit integer, then treat it as a string. (CVS 611)


type: ci
user: drh
comment:
  Added tests for the new IN operator optimizer and fixed a bug that the
  new tests found.  This completes the implementation of enhancement #63. (CVS 612)


type: ci
user: danielk1977
comment:
  Add RAISE() function, which allows more advanced flow-control in trigger programs (ticket #55) (CVS 614)


type: ci
user: drh
comment:
  Fix for bug #72: Make sure the file descriptors are properly closed if
  sqliteInit() fails for any reason. (CVS 617)


type: ci
user: drh
comment:
  Make the LIMIT clause work even if the destination of the SELECT is
  something other than a callback.  (Ticket #66) (CVS 619)


type: ci
user: chw
comment:
  Changed sqlite_mprintf_str to allow a NULL string parameter.
  Command template now is cmd FORMAT INT INT ?STRING?. When
  STRING omitted a NULL is passed to sqlite_mprintf. (CVS 620)


type: ci
user: chw
comment:
  Added %Q format specifier: like %q but automatic enclosing in
  single quotes, NULL pointers replaced by NULL w/o single-quotes. (CVS 621)


type: ci
user: drh
comment:
  Add preliminary logic for the eventual move to having separate TEXT and
  NUMTEXT datatypes.  Also change the version number to 2.5.0 in preparation
  for an interim release. (CVS 625)


type: ci
user: drh
comment:
  The query optimizer now attempts to satisfy an ORDER BY clause using
  an index.  Sorting is still used if there are no suitable indices. (CVS 628)


type: ci
user: drh
comment:
  Fix for ticket #75: Autoincrement INTEGER PRIMARY KEY fields on an INSERT
  even if the data is coming from a SELECT statement. (CVS 630)


type: ci
user: drh
comment:
  Fix for ticket #73: The ORDER BY clause is significant for subqueries.
  This passes all regression tests, but more testing is needed to exercise
  all paths through the new code. (CVS 631)


type: ci
user: drh
comment:
  This patch contains the beginnings of the data-typing infrastructure.
  The new build-in TypeOf() function is added.  New opcodes for doing
  pure text comparisons are added.  Most changes are disabled pending
  the 2.6.0 release. (CVS 632)


type: ci
user: drh
comment:
  Update the file-format change document to describes the changes between
  versions 2.4.12 and 2.5.0. (CVS 633)


type: ci
user: drh
comment:
  Fix for ticket #78: Avoid an assertion failure when sqlite_close() to be
  called in the middle of a transaction. (CVS 634)


type: ci
user: drh
comment:
  Fix for ticket #76: Fix a database corruption that might occur when
  dropping tables or indices. (CVS 635)


type: ci
user: drh
comment:
  Fix for bugs #77 and #80: Rework the LIMIT mechanism to be reentrant and to
  clean up the VDBE stack properly. (CVS 636)


type: ci
user: drh
comment:
  An optimization: avoid the use of an intermediate table on UNION ALL if there
  is no ORDER BY clause. (CVS 637)


type: ci
user: drh
comment:
  Fix a VDBE stack leak in LEFT OUTER JOIN.  Fix a bug in the code generator
  for JOIN ... USING(...). (CVS 638)


type: ci
user: drh
comment:
  Partial fix for a problem with LEFT OUTER JOIN.  It used to be that the test
  for the right-hand table not matching the left table occurred after all
  ON, USING, WHERE clause processing.  The test should occur after ON and
  USING clauses are checked but before the WHERE clause is check.  This fix
  works as long as the total number of "AND" separated terms in the ON, USING,
  and WHERE clause does not exceed 32.  To do: make this work for any number
  of terms and add test cases.
  that (CVS 639)


type: ci
user: drh
comment:
  Enhance the INTEGRITY_CHECK pragma to test the auxiliary database file in
  addition to the main database file. (CVS 642)


type: ci
user: drh
comment:
  Bug fix: When the database file grows in size during a transaction, make sure
  the last page of the file gets written to disk even if that page is on the
  free list and contains no data.  Otherwise the disk file will be too small
  which can lead to database corruption in subsequent transactions. (CVS 643)


type: ci
user: drh
comment:
  The datatype of the i-th column in the result set is given by the
  azColName(argc+1+i) parameter to the callback. (CVS 647)


type: ci
user: drh
comment:
  In the TCL interface, the "sqlite" command now always returns the address
  of the "sqlite*" pointer that sqlite_open() returns.  It used to do this
  only when compiled with the SQLITE_TEST macro defined. (CVS 648)


type: ci
user: drh
comment:
  Fix for ticket #84: If the WHERE clause is too complex, issue an error message
  and refuse to do the SELECT.  The cutoff is a WHERE clause with 100 terms. (CVS 650)


type: ci
user: drh
comment:
  Additional test cases added.  The following bug fixed: A segfault was occurring
  if a VIEW consisted of a join with a USING clause. (CVS 651)


type: ci
user: drh
comment:
  Fix for ticket 91: Modify the "publish.sh" script to use the new mingw
  cross-compiler installed on the development platform. (CVS 657)


type: ci
user: drh
comment:
  Fix for ticket #92: Correct the sqliteExprCompare() function so that is takes
  into account the iTable and iColumn fields of the Expr structure.  Otherwise,
  "min(a)" and "min(b)" will compare equal to each other in views. (CVS 658)


type: ci
user: drh
comment:
  All the code is now in place for SQLite to distinguish between NUMERIC and
  TEXT datatypes.  Still need to turn on the new code and test it. (CVS 659)


type: ci
user: drh
comment:
  Fix for bug #94: Be sure to journal pages that are added to the freelist then
  removed from the freelist and reused during the same transaction. (CVS 660)


type: ci
user: drh
comment:
  More rollback problems:  Fix two more errors introduced by checking (410) that
  can cause database corruption after a ROLLBACK.  Also add new tests to make
  sure everything is working this time. (CVS 663)


type: ci
user: drh
comment:
  Make the BTree balance() routine a little faster by reusing database
  pages locally rather than freeing and reallocating them. (CVS 666)


type: ci
user: drh
comment:
  In the BTree subsystem, when using pages from the freelist, attempt to select
  pages close to related pages in order to keep data structures near each other
  in the database file.  This improves access speed in some circumstances. (CVS 667)


type: ci
user: drh
comment:
  When reporting back the datatype of columns, use the text of the datatype
  as it appears in the CREATE TABLE statement, if available.  Also: removed
  the ".reindex" command from the shell. (CVS 669)


type: ci
user: drh
comment:
  Turn of the reporting of datatypes in the 4th callback argument unless the
  SHOW_DATATYPES pragma is ON.  Eliminate the NULL pointer that used to separate
  the beginning of datatypes from the end of column names so that the callback
  can test to see whether or not datatypes are provided.  This is an
  incompatible changes, but since the prior behavior was never documented, we
  will let it in. (CVS 670)


type: ci
user: drh
comment:
  Fix for ticket #95: Do not allow automatically created indices (associated
  with UNIQUE or PRIMARY KEY constraints) to be dropped. (CVS 671)


type: ci
user: drh
comment:
  Partial fix for ticket #96: Return SQLITE_MISUSE from sqlite_exec() if called
  from a child process with an active transaction that was started in the parent. (CVS 675)


type: ci
user: drh
comment:
  Fix for ticket #105: Fix the UPDATE command so that it works properly with
  indexed tables when there is a subquery in the WHERE clause.  Add tests
  to verify correct operation. (CVS 680)


type: ci
user: drh
comment:
  Fix for ticket #107: Fix a design defect in indices that was causing queries
  to fail when using an index on a column containing an empty string.  This
  fix is an incompatible file-format change. (CVS 681)


type: ci
user: drh
comment:
  Make the automatic database upgrade work even if there are triggers.  Add
  tests for automatic upgrade and for failing if reading a more advanced version
  of the database.  Ticket #107. (CVS 682)


type: ci
user: drh
comment:
  Change the name of variable "near" to "nearby" since MSVC mistakenly belieaves
  that "near" is a keyword. (CVS 685)


type: ci
user: drh
comment:
  Add static ident strings (such as picked up by the RCS "ident" command)
  containing the library version number. (CVS 689)


type: ci
user: drh
comment:
  Fix an assertion failure that occurs when attempting to delete all rows of
  a table while the "count_changes" pragma is turned on.  Up the version number
  to 2.6.1. (CVS 690)


type: ci
user: drh
comment:
  Fix for ticket #71: Correctly handle CR and CRLF line terminators in the
  input files for the COPY command. (CVS 694)


type: ci
user: drh
comment:
  Fix for ticket #111: Update the documentation to explain that you may not
  start a transaction in one thread and complete it in another thread under
  Linux Threads where each thread has its own process ID. (CVS 695)


type: ci
user: drh
comment:
  Fix for ticket #114: Correctly handle SQLITE_BUSY if it occurs during
  database initialization. (CVS 696)


type: ci
user: drh
comment:
  Fix for ticket #104: Make triggers on views work properly even after closing
  and reopening the database.  Also fixed an unrelated bug in the version
  2.6.0 database format upgrade logic.  The upgrade logic bug was found while
  testing the trigger fixes. (CVS 697)


type: ci
user: drh
comment:
  Fix for ticket #124: Fix a stack VDBE overflow problem on joins on an
  INTEGER PRIMARY KEY. (CVS 700)


type: ci
user: drh
comment:
  Remove the restriction that a transaction cannot be started by one linuxthread
  and continued by another.  Leave in the documentation the warning about not
  carrying a database connection across fork() but do not test for it any more.
  Ticket #130. (CVS 701)


type: ci
user: drh
comment:
  Fix for ticket #131: When a SELECT contains a GROUP BY clause it cannot
  use an index for sorting.  It has to sort as a separate operation after
  the GROUP BY is complete. (CVS 702)


type: ci
user: drh
comment:
  Fix for ticket #9: Add the ability to read little-endian database files
  from a big-endian machine and vice versa. (CVS 704)


type: ci
user: drh
comment:
  Fix for ticket #9 (again).  The rollback journal files should now also be
  byte-order independent. (CVS 705)


type: ci
user: drh
comment:
  Update documentation to better explain the typelessness of SQLite and to
  describe the distinction between text and numeric data. (CVS 711)


type: ci
user: drh
comment:
  Fix for ticket #132: make the working directory the last choice for where
  to write temporary files, not the first choice. (CVS 712)


type: ci
user: drh
comment:
  Implement probabilistic reader/writer locks under windows so that windows
  can have multiple simultaneous readers. (CVS 714)


type: ci
user: drh
comment:
  Fix for ticket #134: Change the lemon.c sources to work around a problem with
  the AIX C compiler. (CVS 715)


type: ci
user: drh
comment:
  Fix for ticket #110: return an error if trying to start a transaction within a
  transaction or when attempting to commit or rollback outside of a transaction. (CVS 721)


type: ci
user: drh
comment:
  This COLLATE keyword was not being parsed correctly inside CREATE TABLE
  statements - it was being included as part of the datatype.  This fixes
  the problem. (CVS 722)


type: ci
user: drh
comment:
  Change the way token memory is allocated in an effort to fix ticket #136.
  There is now a memory leak when using views of views. (CVS 725)


type: ci
user: drh
comment:
  Fix for ticket #136:  Added the OP_RenameCursor VDBE instruction and used it
  to make cursor numbers right on nested subqueries.  Also added OP_Gosub and
  OP_Return but have not actually used them for anything yet. (CVS 727)


type: ci
user: drh
comment:
  Fix for ticket #142: Make sure we get the correct sort order even when the
  columns being sorted contain NULLs. (CVS 730)


type: ci
user: drh
comment:
  Slightly faster INSERTs from a SELECT by avoiding an intermediate table.
  But it didn't make nearly as much difference as I had hoped. (CVS 732)


type: ci
user: drh
comment:
  If the database is locked when sqlite_open() is called, sqlite_exec() should
  still honor the busy callback and should return an error message together
  with the SQLITE_BUSY result code. (CVS 733)


type: ci
user: drh
comment:
  Fix for ticket #145: Include the func.c source file in the build of testfixture
  so that the "randstr()" function will be available. (CVS 734)


type: ci
user: drh
comment:
  Parse foreign key constraints and populate internal data structures
  appropriately.  Constraints are still not enforced. (CVS 738)


type: ci
user: drh
comment:
  Relax the locking requirements on BTree cursors.  Any number of read and
  write cursors can be open at the same time now, but a write cannot occur
  as long as one or more read cursors are open.

  Before this change, one or more read cursors could be open on a table,
  or a single write cursor, but not both.  Both policies have the same
  desirable effect: they prevent writes to a table while a sequential scan
  of that table is underway.  But the new policy is a little less restrictive.
  Both policies prevent an UPDATE from occurring inside a SELECT (which is
  what we want) but the new policy allows a SELECT to occur inside an
  UPDATE. (CVS 739)


type: ci
user: drh
comment:
  Detect when the test scripts are being run as root and issue an appropriate
  error message. (CVS 740)


type: ci
user: drh
comment:
  Rewind the checkpoint journal after each statement to avoid allowing
  the file to become too large. (CVS 744)


type: ci
user: drh
comment:
  Modify the build process so that the VDBE opcode numbers and the table
  that contains the opcode names are both automatically generated. This makes
  it much easier to create new VDBE opcodes. (CVS 746)


type: ci
user: drh
comment:
  Modify the build process so that the VDBE opcode numbers and the table
  that contains the opcode names are both automatically generated. This makes
  it much easier to create new VDBE opcodes. (CVS 1727)


type: ci
user: drh
comment:
  Fix for ticket #147: Honor the ORDER BY and LIMIT clauses in a SELECT even
  if the destination of that SELECT is a subroutine call. (CVS 747)


type: ci
user: drh
comment:
  Rename all tests so that the first part of the test name corresponds to the
  file that contains that test.  This makes it much easier to find a particular
  test after it fail. (CVS 749)


type: ci
user: drh
comment:
  Modify the sqlite_encode_binary() routine to return the strlen() of the
  encoded string.  Also fix a bug that occurs when attempting to encode
  a zero-length buffer. (CVS 751)


type: ci
user: drh
comment:
  Fix a bug in the OP_MemStore operator of the VDBE.  A realloc() might
  occur but pointer to the old buffer were not being moved over to
  the new buffer. (CVS 752)


type: ci
user: drh
comment:
  Make sure memory malloced() for structures is aligned on an even byte boundry.
  Solaris segfaults otherwise. (CVS 753)


type: ci
user: drh
comment:
  Bug fix: When multiple SQL statements were passed into a single sqlite_exec() call, execution speed would decrease for each statement executed because VDBE cursors were not being reused.  Now the cursors are reused and execution time is linear. (CVS 754)


type: ci
user: drh
comment:
  Remove the call to srand() and add better comments to the sqliteOsRandomSeed()
  routine.  Ticket #163. (CVS 759)


type: ci
user: drh
comment:
  Speed improvement by avoiding a call to sqliteBtreeLast() when inserting a
  new row into a table. (CVS 763)


type: ci
user: drh
comment:
  The "table_info" pragma reports unspecified column types as "numeric" instead
  of "text".  Fix for ticket #174. (CVS 767)


type: ci
user: drh
comment:
  Rework the changes for ticket #176 (check-ins (760) and (761)) to be
  more consistent with the rest of the source code. (CVS 768)


type: ci
user: drh
comment:
  Take care to track ephemeral strings in the VDBE and make copies of ephemeral
  strings that need to be preserved.  Ticket #177. (CVS 769)


type: ci
user: drh
comment:
  Improvements in threadtest.c (for Unix) and some minor bug fixes that result
  from the better testing. (CVS 776)


type: ci
user: drh
comment:
  Add support for databases larger than 2GB under Unix.  Must be compiled
  with -D_FILE_OFFSET_BITS=64 and -D_LARGEFILE_SOURCE in order to work with
  larger databases. (CVS 778)


type: ci
user: drh
comment:
  Add large file support to Windows.  Change large file support for Unix so
  that it compiles automatically - without requiring special options on the
  compiler command line. (CVS 781)


type: ci
user: drh
comment:
  Try to better detect when the library is compiled for large file support (LFS)
  but the support is not available in the host OS kernel. (CVS 782)


type: ci
user: drh
comment:
  Two optimizations to the pager: (1) Write dirty pages back to the database
  file in order and (2) Keep a separate list of in-memory pages that are in
  the checkpoint journal in order to speed a checkpoint commit. (CVS 783)


type: ci
user: drh
comment:
  Replace the atoi() library routine with a faster home-grown version in the
  VDBE.  This gives a dramatic speed improvement for some kinds of queries. (CVS 784)


type: ci
user: drh
comment:
  Back out the changes in the pager that sorted pages prior to writing them
  to the database.  Additional measurements showed no performance gains. (CVS 785)


type: ci
user: drh
comment:
  Automatically determine if pointers are 4 or 8 bytes in size during the
  compilation process.  Ticket #190. (CVS 788)


type: ci
user: drh
comment:
  Add the "space_used.tcl" script to the tools directory.  This script is used
  to measure how much disk space is used by each table and index of a database. (CVS 789)


type: ci
user: drh
comment:
  Change to the pager to avoid opening journal files unnecessarily.  This can
  sometimes results in a significant speed improvement. (CVS 791)


type: ci
user: drh
comment:
  Allow an aggregate function in the HAVING clause even if no aggregates appear
  in the result set.  Ticket #187. (CVS 793)


type: ci
user: drh
comment:
  Add the sqliteBtreePrevious() routine to the BTree module API.  This is
  in anticipation of implementing reverse order searching of a table. (CVS 794)


type: ci
user: drh
comment:
  Scan the table backwards if there is an ORDER BY ... DESC clause that can
  be satisfied by an index. (CVS 795)


type: ci
user: drh
comment:
  Fixes to the logic that decides if the ORDER BY can be ignored due to the
  use of an index.  Tests updated. (CVS 796)


type: ci
user: drh
comment:
  Fix a bug in the reverse scan logic that comes up when the table being
  scanned is empty.  Add additional tests for the reverse scan. (CVS 797)


type: ci
user: drh
comment:
  Save the full pathname of the database file so that journalling still works
  even if the user changes working directories after opening the databae.
  Ticket #200. (CVS 798)


type: ci
user: drh
comment:
  Take care not to modify the sqlite* pointer to sqlite_exec() if we suspect
  that the pointer is stale - that it has previously been passed to
  sqlite_close().  Possible fix for ticket #202.  Prior to this fix, test
  misuse-5.3 was causing a change to a buffer that had been previously free()-ed. (CVS 799)


type: ci
user: drh
comment:
  Fix an uninitialized variable in the pager.  Tickets #208 and #206.
  Bug introduced by check-in (795). (CVS 804)


type: ci
user: drh
comment:
  If compiled with the -DVDBE_PROFILE=1 option, special code is inserted that
  uses the pentium RDTSC instruction to compute very precise runtimes on all
  VDBE opcodes.  (This only works on i586 processors, of course.)  The results
  are written into the vdbe_profile.out file for analysis. Hopefully, this
  new feature will reveal hot spots that can be optimized to make the VDBE run
  faster. (CVS 807)


type: ci
user: drh
comment:
  Parameterize the number of adjacent pages that participate in the balancing
  algorithm in the BTree.  But leave the setting at the current value of 3. (CVS 812)


type: ci
user: drh
comment:
  When constructing records and index keys, use static string space rather than
  mallocing (when possible) for a small speed improvement. (CVS 817)


type: ci
user: drh
comment:
  In the VDBE, allocate space to hold column names when the VDBE first starts.
  The ColumnCount opcode now just writes the null terminator into this space. (CVS 818)


type: ci
user: drh
comment:
  Avoid calling truncate() and stat() on the checkpoint journal to improve the
  speed of a large number of UPDATEs within a transaction. (CVS 819)


type: ci
user: drh
comment:
  Document the SHOW_DATATYPES pragma and add tests for it to the test suite.
  Make sure datatypes are show even for aliased columns.
  Tickets #220 and #221. (CVS 822)


type: ci
user: drh
comment:
  Initial check-in of the code for the new sqlite_set_authorizer() API function.
  The code is mostly untested at this point. (CVS 827)


type: ci
user: drh
comment:
  The initial round of tests for the sqlite_set_authorizer() API.  More are
  needed before release.  Ticket #215. (CVS 829)


type: ci
user: drh
comment:
  Revise the sqlite_set_authorizer API to provide more detailed information
  about the SQL statement being authorized.  Only partially tested so far. (CVS 830)


type: ci
user: drh
comment:
  More tests of the sqlite_set_authorizer() API together with fixes for bugs
  that the new tests uncovered. (CVS 832)


type: ci
user: drh
comment:
  Improvements to the pager to help large updates against a large database run
  faster.  Also improved the testing of the pager rollback algorithms. (CVS 835)


type: ci
user: drh
comment:
  Add the sqlite_trace() hook for tracing the SQL that an application executes.
  The plan is to leave this API undocumented for the time being, in case we
  want to make changes to it later. (CVS 836)


type: ci
user: drh
comment:
  Fix datatype reporting and collating sequence selection so that it works
  correctly on views and with the UNION, EXCEPT, and INTERCEPT operators. (CVS 839)


type: ci
user: drh
comment:
  In the pager, cache a pointer to the first page on the freelist that does not
  need to be synced.  This makes a fetch of a page that is not in cache go a
  lot faster when the cache is full.  This check-in also adds some performance
  instrumentation to the OS layer. (CVS 842)


type: ci
user: drh
comment:
  Add asserts to btree.c that check for the correct size of various typedefs
  and structures.  Ticket #233. (CVS 845)


type: ci
user: drh
comment:
  Update the speed.html documentation.  Recent optimizations have made the
  library much faster. (CVS 846)


type: ci
user: drh
comment:
  Fix a bug in the rollback validation logic (code that only runs during
  debugging).  The problem was introduced by check-in (835). (CVS 849)


type: ci
user: drh
comment:
  First code for the new callback-free API.  All regression tests pass but the
  new API is mostly untested and is unlikely to work. (CVS 852)


type: ci
user: drh
comment:
  Better error messages on constraint violations.  Additional tests and bug fixes
  for the callback-free API. (CVS 854)


type: ci
user: drh
comment:
  Additional testing and bug fixing with the non-callback API.  Updated the
  C/C++ interface document to describe the non-callback API. (CVS 855)


type: ci
user: drh
comment:
  Allow double-quoted strings as string constants in the IN operator.  As a
  side-efffect, allow the GROUP BY clause to refer to columns by their integer
  column number.  Ticket #237. (CVS 856)


type: ci
user: drh
comment:
  When a CREATE TABLE ... AS SELECT statement fails, make sure the table name
  is removed from the internal hash tables.  Ticket #238. (CVS 858)


type: ci
user: drh
comment:
  Make the shell run much faster for inputs where a single SQL statement spans
  thousands of lines by avoiding the call to sqlite_complete() unless the
  input ends in a semicolon. (CVS 860)


type: ci
user: drh
comment:
  Modify the journal format to be more robust against garbage that might appear
  in the file after a power failure.  The changes are mostly working but more
  testing is still required.  This check-in is to checkpoint the changes so far. (CVS 861)


type: ci
user: drh
comment:
  Fix the pager so that correct rollbacks occur when synchronous is turned off.
  This check-in also included unrelated documentation updates. (CVS 866)


type: ci
user: drh
comment:
  Fix more bugs.  The new rollback journal implementation now passes all
  regression tests under Linux. (CVS 867)


type: ci
user: drh
comment:
  Added test code to check for file descriptor leaks.  All regression tests pass
  now on both win2k and linux. (CVS 868)


type: ci
user: drh
comment:
  Update the speed comparison documentation to show the improved performance
  of PostgreSQL after performance tuning. (CVS 869)


type: ci
user: drh
comment:
  Fix the parsing of the LIMIT clause when the limit and offset are separated
  by a comma.  The offset comes before the limit in that case. Ticket #245. (CVS 872)


type: ci
user: drh
comment:
  When the right table in a LEFT OUTER JOIN contains an INTEGER PRIMARY KEY
  make sure that key is NULL if there is no row in the right table that
  matches the current row in the left table.  Tickets #246 and #247. (CVS 873)


type: ci
user: drh
comment:
  Fix a memory leak associated with PRIMARY KEY in a CREATE TABLE statement
  that fails.  Ticket #249. (CVS 1730)


type: ci
user: drh
comment:
  Fix a memory leak associated with PRIMARY KEY in a CREATE TABLE statement
  that fails.  Ticket #249. (CVS 874)


type: ci
user: drh
comment:
  Get the non-callback API working with the EXPLAIN keyword and for PRAGMAs.
  Tickets #258 and #257.  Update the API documentation on the sqlite_changes()
  routine to explain how it works with the non-callback API.  Ticket #250. (CVS 875)


type: ci
user: drh
comment:
  Add more tests to make sure that sqlite_changes() works when using the
  non-callback API.  Ticket #250. (CVS 876)


type: ci
user: drh
comment:
  Record the database name in addition to the table name for DELETE, INSERT,
  and UPDATE statements. (CVS 879)


type: ci
user: drh
comment:
  Changes to the "sqlite" structure that allow simultaneous operations on
  multiple database files.  Many regession tests pass - but not all of them.
  Do not use this version except for debugging SQLite itself. (CVS 883)


type: ci
user: drh
comment:
  Changes to the "sqlite" structure that allow simultaneous operations on
  multiple database files.  Many regession tests pass - but not all of them.
  Do not use this version except for debugging SQLite itself. (CVS 1731)


type: ci
user: drh
comment:
  Regression tests now work - except for some changes in error message
  text.  The library is now safe to use for experimental work. (CVS 885)


type: ci
user: drh
comment:
  Detect when a child node of a btree page has zero entries and report that
  as a case of database corruption. (CVS 887)


type: ci
user: drh
comment:
  Remove the experimental sqlite_open_aux_file() API.  It will soon be replaced
  by ATTACH and DETACH SQL commands. (CVS 889)


type: ci
user: drh
comment:
  Remove the experimental sqlite_open_aux_file() API.  It will soon be replaced
  by ATTACH and DETACH SQL commands. (CVS 1732)


type: ci
user: drh
comment:
  Add the sqliteErrorMsg() function and use it to generate error message
  text during parsing and code generation.  This simplifies the code
  somewhat and makes it easier to handle names with a database prefix. (CVS 891)


type: ci
user: drh
comment:
  Use a intermediate table when inserting a TEMP table from a SELECT that
  reads from that same TEMP table.  Ticket #275. (CVS 895)


type: ci
user: drh
comment:
  Simplify the BTree interface by shortening names.  Added two new methods
  for accessing the current filename and for changing the name of the
  database file. (CVS 900)


type: ci
user: drh
comment:
  Change some variable names and comments in the new in-memory database file
  implementation.  Partial (non-working) implementation of the VACUUM command. (CVS 904)


type: ci
user: drh
comment:
  Change lemon to use <stdarg.h> instead of <varargs.h> because GCC no longer
  supports varargs.h.  Tickets #288 and #280.  Ironically, lemon originally
  used varargs.h because stdarg.h was not supported by the compiler I was
  using in 1989 (which was gcc if I recall correctly.) (CVS 905)


type: ci
user: drh
comment:
  Get triggers working on tables with INTEGER PRIMARY KEYs.  Ticket #291.
  This may also fix #159.  Still need to add tests so both bugs remain open
  for the time being. (CVS 908)


type: ci
user: drh
comment:
  Fix the authorizer so that it correctly interprets attempts to read the
  OLD and NEW pseudo-tables of a trigger. (CVS 911)


type: ci
user: drh
comment:
  Change the shell to use the sqliteIsNumber() routine for determining if
  values are numeric.  Modified os.c so that it should now work with DJGPP -
  though I have no way of testing this. (CVS 913)


type: ci
user: drh
comment:
  Added tests for the in-memory database backend.  Also updated some comments
  in other modules. (CVS 924)


type: ci
user: drh
comment:
  Add support for TEMPORARY triggers.  Such triggers can write temporary or
  permanent tables. (CVS 926)


type: ci
user: drh
comment:
  Update the authorizer API so that it reports the database that table and
  indices belong to and so that it reports when actions are taken in response
  to a trigger. (CVS 928)


type: ci
user: drh
comment:
  Remove the begin_hook and commit_hook APIs.  They were a bad idea.  Add a
  "trace" method to the TCL interface. (CVS 929)


type: ci
user: drh
comment:
  Add tests to insure VACUUM works in the presence of I/O errors.  Fix some
  problems that came to light by these tests. (CVS 935)


type: ci
user: drh
comment:
  Report the correct authorization context in the authorization callback
  when coding an INSTEAD OF trigger on an update or delete. (CVS 936)


type: ci
user: drh
comment:
  Do not use the return value of fcntl() to find the reason that it failed.
  Use errno instead.  Tickets #240 and #270. (CVS 938)


type: ci
user: drh
comment:
  In the test code, make several attempts to convert a pointer to a string
  and test each attempt to make sure it works before returnning, in order to
  work around incompatibilities between various systems.  Ticket #284. (CVS 941)


type: ci
user: drh
comment:
  The sqlite_complete() function should ignore carriage-return characters.
  (Oops - some unrelated edits also made it into this check-in.) (CVS 942)


type: ci
user: drh
comment:
  Allow the ASC or DESC keyword to appear after a column name in a CREATE INDEX
  statement.  SQLite indices are aways ASC (ascending) regardless of which
  keyword is used. (CVS 943)


type: ci
user: drh
comment:
  Accept a "/" or "go" on a line by itself as an SQL statement terminator
  in the command-line shell.  This allows SQL Server and Oracle scripts to
  be played into SQLite without change. (CVS 944)


type: ci
user: drh
comment:
  In the shell tool, delay opening the database until it is needed but also
  make sure it is opened before trying to use the "db" pointer.  Ticket #302. (CVS 945)


type: ci
user: drh
comment:
  Correctly create an index that uses an INTEGER PRIMARY KEY as one of columns
  to be indexed. (CVS 946)


type: ci
user: drh
comment:
  VDBE cursors numbers for tables in a join do not have to be consecutive.
  This is one step on the road to fixing ticket #272. (CVS 947)


type: ci
user: drh
comment:
  Enhance the query flattener to handle subqueries that are joins.
  All regressions pass but new tests need to be added before release.
  Ticket #272. (CVS 948)


type: ci
user: jplyon
comment:
  - added entry for ATTACH DATABASE.
  - added entry for DETACH DATABASE.
  - added soundex() function.
  - added some new TEMP modifiers.
  - added new VACUUM behavior.
  - added the Oracle8 outer join "(+)" syntax.
  - documented the modulus/remainder operator %.
  - added ALL as alternative to DISTINCT in SELECT.
  - fixed assignment list in UPDATE to use * metacharacter.
  - fixed value in PRAGMA to be optional.
  - added link from INSERT topic to REPLACE.
  - added optional CONSTRAINT <name> before column constraints.
  - skip 2 lines before each Section in the TCL source. (CVS 950)


type: ci
user: jplyon
comment:
  Added shell command ".databases" to list name and file of open ones.
  Added several missing shell commands. (CVS 954)


type: ci
user: jplyon
comment:
  - Added entries for PRAGMAs database_list, temp_store and default_temp_store.
  - Fixed missing end tags. (CVS 960)


type: ci
user: drh
comment:
  Changes to comments.  In particular, a lengthy comment was added to encode.c
  that explains how the encoder algorithm works. (CVS 966)


type: ci
user: drh
comment:
  Make sure the ON CONFLICT clause on a BEGIN overrides the conflict resolution
  specified by an index.  This fixes a bug reported on the newsgroup. (CVS 975)


type: ci
user: drh
comment:
  Fix problems with TEMP indices that lead to corrupt databases.  These
  problems were discovered while working on ticket #317.  No sure yet if
  that ticket is fixed. (CVS 981)


type: ci
user: drh
comment:
  Bump the version number and update the change log.  We are rushing out
  release 2.8.2 because of the database corruption problem fixed by
  the previous check-in. (CVS 982)


type: ci
user: drh
comment:
  Fix segfault that occurs when opening a non-existing database in the shell
  then immediately doing ".q". (CVS 986)


type: ci
user: drh
comment:
  Modify the windows locking code so that it works correctly for a database
  being shared between Win95/98/ME and WinNT/2K/XP systems.  Ticket #310. (CVS 988)


type: ci
user: drh
comment:
  Change the row-size limit back to 1MB.  It was temporarily raised to 16MB.
  We'll probably move it to 16MB eventually, but not just yet. (CVS 989)


type: ci
user: drh
comment:
  Tighter binding of views, triggers, and indices to their respective
  databases.  Ticket #323.  Much more testing needs to be done to the
  sqliteFix...() routines in attach.c. (CVS 990)


type: ci
user: drh
comment:
  Add the ability to INSERT or UPDATE using the "rowid" column even on tables
  that lack an integer primary key. (CVS 991)


type: ci
user: drh
comment:
  The OP_Checkpoint opcode is now a no-op if invoked on a database that already
  has an active checkpoint journal.  Ticket #333. (CVS 997)


type: ci
user: drh
comment:
  Additional testing of the ATTACH command with bug fixes for the new problems
  that the tests found. (CVS 998)


type: ci
user: drh
comment:
  Avoid corrupting indices when doing a REPLACE on a table with an
  INTEGER PRIMARY KEY that also has another index.  Ticket #334. (CVS 999)


type: ci
user: drh
comment:
  Disable the unreadable file test (attach-6.2) under windows because of
  problems in the OS. (CVS 1000)


type: ci
user: drh
comment:
  Change the "database_list" pragma to return a third column containing the
  filename of the underlying database file.  Always use an in-memory TEMP
  database with an in-memory main database. (CVS 1003)


type: ci
user: drh
comment:
  Fix a bug in UPDATE OR REPLACE that was introduced by check-in (999).
  Also clean up some compiler warnings for VC++. (CVS 1005)


type: ci
user: drh
comment:
  Add btree_rb.c and opcodes.c to the source built by the "target_source" target
  of the main makefile. (CVS 1009)


type: ci
user: drh
comment:
  Extend the authorization mechanism to disallow the ATTACH and DETACH commands.
  Ticket #340. (CVS 1010)


type: ci
user: drh
comment:
  Use sqliteOsFileExists() in the debugging hook in vdbe.c, instead of access().
  Ticket #341. (CVS 1014)


type: ci
user: drh
comment:
  Bug fix: sqliteFree() called twice on the same allocation during error
  handling in attach.c. (CVS 1020)


type: ci
user: a.rottmann
comment:
  * Added -version-info to shared libraries
  * Remove config.h and libtool in the distclean target (CVS 1021)


type: ci
user: drh
comment:
  Enhance the "PRAGMA integrity_check" command to verify that all indices are
  correctly constructed.  New calls to integrity_check are made in the test
  suite. These changes are intended to prevent any future problems such
  as seen in ticket #334. (CVS 1024)


type: ci
user: drh
comment:
  Update the documentation to reflect the new capabilities of PRAGMA
  integrity_check.  Rewording in the VACUUM documentation. (CVS 1025)


type: ci
user: drh
comment:
  Do not flatten a subquery which is the right term of a LEFT OUTER JOIN
  if the subquery contains a WHERE clause.  Ticket #350. (CVS 1027)


type: ci
user: drh
comment:
  In a SELECT, the rowid of a view or subquery which is really a join is
  set to NULL if the join is flattened.  Ticket #364. (CVS 1034)


type: ci
user: drh
comment:
  Fix a bug in the soundex() code.  Ticket #367.  Add tests for ticket #261
  even thought the problem could not be reproduced. (CVS 1035)


type: ci
user: drh
comment:
  The prior fix of ticket #360 was incorrect and caused a memory leak.  This
  check-in plugs the memory leak and correctly fixes ticket #360. (CVS 1040)


type: ci
user: drh
comment:
  Documentation change: refer users to the wiki for additional unsupported
  features rather than have them send me e-mail. (CVS 1042)


type: ci
user: drh
comment:
  Update the null-handling document to show how SQL Anywhere and Borland
  Interbase deal with NULLs. (CVS 1043)


type: ci
user: drh
comment:
  Correctly handle comparing an INTEGER PRIMARY KEY against a floating point
  number.  Ticket #377. (CVS 1045)


type: ci
user: drh
comment:
  Enhance the C/C++ documentation to clarify the meaning of the return value
  from sqlite_changes().  Ticket #383. (CVS 1048)


type: ci
user: drh
comment:
  Allow the output arguments in sqlite_compile and sqlite_step to be NULL
  pointers.  Tickets #384 and #385. (CVS 1049)


type: ci
user: drh
comment:
  Allow negative values for LIMIT and OFFSET.  Add tests for negative LIMITs
  and OFFSETs.  Make the OFFSET work even if LIMIT is 0 or negative. (CVS 1052)


type: ci
user: drh
comment:
  In the test scripts, do not try to delete files that are still open.
  Windows does not like it when you do.  Ticket #397. (CVS 1055)


type: ci
user: drh
comment:
  In the sqlite shell, change the name of function getline() to local_getline()
  to avoid a clash with a library function.  Ticket #400. (CVS 1056)


type: ci
user: drh
comment:
  Make sure the min() and max() optimizer works correctly when there
  is a LIMIT clause.  Ticket #396. (CVS 1057)


type: ci
user: drh
comment:
  Fix the LIMIT clause so that it applies to the entire query in a compound
  query.  Prior to this change LIMITs on compound queries did not work at
  all.  Ticket #393. (CVS 1058)


type: ci
user: drh
comment:
  Make sure temporary file names in windows have a full 15 characters of
  random text at the end. (CVS 1059)


type: ci
user: drh
comment:
  Increment the version number and update the documentation in preparation
  for the 2.8.5 release. (CVS 1061)


type: ci
user: drh
comment:
  In the VDBE, when an integer value will not fit into a 32-bit int, store it
  in a double instead.  Ticket #408. (CVS 1064)


type: ci
user: drh
comment:
  Make sure the schema loader callback can handle EMPTY_RESULT_CALLBACKS being
  on.  Ticket #406. (CVS 1065)


type: ci
user: drh
comment:
  When creating a new journal file, open a (read-only) file descriptor on the
  directory containing the journal and sync that directory once to make sure
  that the journal filename entry gets into the directory.  Ticket #410. (CVS 1066)


type: ci
user: drh
comment:
  The {quote: SrcList} object was not being expanded correctly by a call to
  sqliteSrcListAppend() if the {quote: SrcList} had previously been duplicated by
  a call to sqliteSrcListDup().  Ticket #416. This check-in fixes that problem
  by keeping a separate nAlloc field on {quote: SrcList}.  A similar change is made
  to {quote: IdList} and {quote: ExprList} to avoid future problems. (CVS 1067)


type: ci
user: drh
comment:
  Provide a more informative error message when a uniqueness constraint
  fails.  Ticket #419. (CVS 1068)


type: ci
user: drh
comment:
  Make the sqliteOsCurrentTime() function work for Windows.  Code contributed
  by "e4liberty" on the mailing list. (CVS 1071)


type: ci
user: drh
comment:
  Fix a segfault that occurs in the VACUUM command if run on an empty database
  with the EMPTY_RESULT_CALLBACKS pragma enabled.  Ticket #427. (CVS 1073)


type: ci
user: drh
comment:
  Make the compile work under cygwin.
  Tickets #327, #213, #316, #322, #349, #373, and #429. (CVS 1075)


type: ci
user: drh
comment:
  Change the CVSTrac website to www.sqlite.org.  Update change summary for
  the 2.8.6 release. (CVS 1079)


type: ci
user: drh
comment:
  Add a "pk" column to the table_info pragma which is true for each column
  that is part of the primary key.  Add a "foreign_key_list" pragma that gives
  information about all foreign keys for a table.  Both changes are experimental. (CVS 1081)


type: ci
user: drh
comment:
  Fix a bug in the new "pk" column of the table_info pragma that was added
  by check-in (1081). (CVS 1082)


type: ci
user: drh
comment:
  Remove extra backslashes from end of lines in the install target of the
  Makefile.  Ticket #435. (CVS 1083)


type: ci
user: drh
comment:
  If the database filename is an empty string, open a temporary file to hold
  the database.  Ticket #432. (CVS 1085)


type: ci
user: drh
comment:
  Fix a bug in sqliteRealloc() that only occurs if there is memory corruption
  and debugging is enabled.  Ticket #421. (CVS 1086)


type: ci
user: drh
comment:
  Try to work around a bug in VC++ by only passing unsigned characters to
  the isspace() routine.  Bug reported on the mailing list. (CVS 1087)


type: ci
user: drh
comment:
  Add locks to the in-memory database so that recursive writes will be detected
  and rejected.  Ticket #436. (CVS 1090)


type: ci
user: drh
comment:
  Add locks to the in-memory backend so that recursive writes will be detected
  and rejected.  Ticket #436. (CVS 1089)


type: ci
user: drh
comment:
  CVS missed a commit (because I pressed Ctrl-C in the middle).  This
  extra commit will hopefully help clear things up. (CVS 1091)


type: ci
user: drh
comment:
  The beginnings of changes to support pre-compiled SQL.  Mostly untested,
  though all regression tests to pass. (CVS 1093)


type: ci
user: drh
comment:
  Split almost 1300 lines of code out of vdbe.c into separate files
  vdbeInt.h and vdbeaux.c. (CVS 1094)


type: ci
user: drh
comment:
  Update Makefile.in for the new vdbeaux.c file.  Remove the experimental
  "sqlite_instantiate()" routine and replace it with "sqlite_bind()" which
  is more like ODBC and JDBC. (CVS 1095)


type: ci
user: drh
comment:
  Add initial test cases for the new sqlite_bind() API.  Fix bugs that the new
  test cases found. (CVS 1096)


type: ci
user: drh
comment:
  Add test cases that check out sqlite_get_table() on queries with results sets
  containing 100 columns. (CVS 1097)


type: ci
user: xdong
comment:
  allow -enable-releasemode as an option and allow Makefile to produce version
  independent binary like libsqlite-2.8.6.so instead of libsqlite.so.0.0.0 (CVS 1101)


type: ci
user: drh
comment:
  Do all WHERE clauses tests, even if an index is used for lookup so that
  we know the test cannot be FALSE.  The test might end up being NULL in which
  case it would need to be treated as false.  Ticket #461. (CVS 1103)


type: ci
user: drh
comment:
  Add additional backslash escapes to the COPY command for compatibility
  with PostgreSQL.  Ticket #460. (CVS 1104)


type: ci
user: drh
comment:
  Add a test case for ticket #464 but leave it commented out for now.  We
  will fix this problem when VACUUM is rewritten. (CVS 1105)


type: ci
user: drh
comment:
  Patch the spec.template file (for generating RPMs) as suggested by
  Jeremy Hinegardner.  Untested. (CVS 1107)


type: ci
user: drh
comment:
  All LIKE and GLOB operators to use function notation.  "A LIKE B" can be
  expressed as "LIKE(B,A)". (CVS 1108)


type: ci
user: drh
comment:
  Convert lemon to use a single perfect hash table for storing the actions.
  This should make the resulting parser both smaller and faster. (CVS 1112)


type: ci
user: drh
comment:
  Comment changes to the lemon parser template.  Change some sqliteMalloc() calls
  to sqliteMallocRaw() for speed.  Update the website template. (CVS 1114)


type: ci
user: drh
comment:
  Revised date/time functions - now broken out into a separate source file.
  See the DateAndTimeFunctions wiki page for additional information. (CVS 1116)


type: ci
user: drh
comment:
  Use sqlite_freemem() instead of free() in the shell.  Windows needs this.
  (Unix does not care.)  Ticket #444. (CVS 1125)


type: ci
user: drh
comment:
  Always use "(char*)0" to terminate the argument list of sqliteSetString().
  This is needed for 64-bit systems that use a 32-bit integer by default. (CVS 1126)


type: ci
user: drh
comment:
  Make the VACUUM command run out of the VDBE like all other commands.
  (Ticket #464).  Make the VACUUM command work even if there are VIEWs
  in the SQLITE_MASTER table that come before tables they reference.
  (Ticket #515) (CVS 1128)


type: ci
user: drh
comment:
  Improvements to the way PRAGMA integrity_check works.  More likely to output
  userful information when given a corrupt database. (CVS 1132)


type: ci
user: drh
comment:
  A better fix for ticket #530 - one that is likely to work on unix
  implementations in addition to linux.  Also more tests for multi-thread
  locking added. (CVS 1138)


type: ci
user: drh
comment:
  Makefile updates for the new "test4.c" module.  Also disable large file
  tests for archic TCL versions. (CVS 1139)


type: ci
user: drh
comment:
  Use a built-in atof() function instead of the one from the library to
  avoid problems with locale.  Ticket #305. (CVS 1144)


type: ci
user: drh
comment:
  Reduce the randomness in the sqliteRandomSeed() routine in order to silence
  bogus errors from valgrind.  Tickets #535 and #536. (CVS 1149)


type: ci
user: drh
comment:
  Avoid an assertion fault that can occur with invalid UTF8 on the LENGTH()
  function.  Ticket #548. (CVS 1154)


type: ci
user: drh
comment:
  Fix problem in the code generator were incorrect code was being created if
  the SQL source contained a negative integer that was too large to fit in
  a 32-bit signed integer variable.  Ticket #552. (CVS 1157)


type: ci
user: drh
comment:
  Add a typecast to work around a bug in the Metrowerks Code Warrior compiler.
  Ticket #553. (CVS 1161)


type: ci
user: drh
comment:
  Use "long double" to hold intermediate values when doing ascii to binary
  and binary to ascii conversions of floating point numbers. (CVS 1162)


type: ci
user: drh
comment:
  Defer the {quote: MoveTo}
  opcode in VDBE until the data is actually needed.  Sometimes
  the data is never needed, resulting in a performance increase.  On an indexed
  order search with a large OFFSET, queries times can be an order of magnitude
  faster. (CVS 1165)


type: ci
user: drh
comment:
  Rework the fix to ticket #461 so that we do not have to do redundant tests
  of WHERE clause terms looking for NULLs.  See also check-in (1103). (CVS 1167)


type: ci
user: drh
comment:
  Previous commit of changes to the in-memory backend was not quite right.
  This check-in should square things away. (CVS 1170)


type: ci
user: drh
comment:
  On unix, embargo close() operations until all locks have cleared from the
  file.  Ticket #561. (CVS 1171)


type: ci
user: drh
comment:
  Move some files around and bump the version number in preparation for the
  release of 2.8.10. (CVS 1173)


type: ci
user: drh
comment:
  Fix comparisons of ROWID against floating point numbers so that they work
  correctly.  Ticket #377 and #567. (CVS 1178)


type: ci
user: drh
comment:
  Access to free()ed memory problem fixed.  Found by electric fence.
  Only an issue when doing an EXPLAIN of a CREATE INDEX. (CVS 1186)


type: ci
user: jplyon
comment:
  documented pragma foreign_key_list().
  updated docs for removed behavior: Oracle join syntax and temp indexes. (CVS 1193)


type: ci
user: drh
comment:
  Add the ability to group FROM terms using parentheses.  Names of columns in
  a join no longer include the table name. (CVS 1197)


type: ci
user: drh
comment:
  Modularize the column name resolution code so that it is smaller, faster,
  and ready for some enhancements that will fix long-standing name
  resolutions problems. (CVS 1198)


type: ci
user: drh
comment:
  Rework the VDBE data structures to combine string representations into the
  same structure with integer and floating point.  This opens the door to
  significant optimizations. (CVS 1202)


type: ci
user: drh
comment:
  Fix the handling of -init option to the sqlite shell. Ticket #568.
  Also add hooks for encrypting the database. (CVS 1206)


type: ci
user: drh
comment:
  Remove undocumented extensions from sqlite_mprintf() and friends in order to
  make it about 10% smaller. (CVS 1207)


type: ci
user: drh
comment:
  Fix inaccuracies and add details to comments in the pager.  Change the name
  of one function to make its purpose clearer.  Ticket #599. (CVS 1209)


type: ci
user: drh
comment:
  Add the crashtest1.c program used to test the ability of the database to
  survive a program crash or power failure.  Ticket #599. (CVS 1210)


type: ci
user: drh
comment:
  After code is generated for a subquery, delete the Select structure in order
  to force the temporary table to be used and to prevent the subquery from
  being evaluated a second time.  Ticket #601. (CVS 1216)


type: ci
user: drh
comment:
  Fix the shells so that they always enable the codec if it is available,
  even if no key is supplied. (CVS 1226)


type: ci
user: drh
comment:
  Add hooks on each attached database connection for storing auxiliary
  information.  Add the USING clause to ATTACH. (CVS 1232)


type: ci
user: drh
comment:
  Add the SQLITE_NOTADB return code for cases when you try to open a file
  that does not even remotely resemble an SQLite database file. (CVS 1233)


type: ci
user: drh
comment:
  Fix a bug in the query flattener when trying to find the datatype of the
  rowid of a view.  Also fix a problem with sqlite_compile() and authorization
  failures. (CVS 1236)


type: ci
user: drh
comment:
  Begin the process over converting sqlite_exec() over to use sqlite_compile()
  and sqlite_step().  The new sqlite_exec() is still commented out. (CVS 1237)


type: ci
user: drh
comment:
  Fix an uninitialized variable in shell.c that would cause a crash if you
  specified SQL on the command-line. (CVS 1238)


type: ci
user: drh
comment:
  The sqlite_exec() function is now implemented using sqlite_compile() and
  sqlite_step().  This opens up lots of opportunity to remove old code. (CVS 1240)


type: ci
user: drh
comment:
  Remove the NullCallback opcode.  Handle the empty_result_set pragma inside
  the sqlite_exec() function. (CVS 1244)


type: ci
user: drh
comment:
  Add more tests of the sqlite_interrupt() logic - looking for a reported
  memory leak.  (Didn't find it.) (CVS 1246)


type: ci
user: drh
comment:
  Begin updating the architecture description to better describe how things
  are currently put together. (CVS 1247)


type: ci
user: drh
comment:
  Fix a memory leak that occurs if you call sqlite_interrupt() on a query
  using aggregate functions where the aggregate function returns a string
  longer than 32 characters. (CVS 1248)


type: ci
user: drh
comment:
  The name of a result column is now the name of column it originated from, by
  default.  This can be turned off with PRAGMA short_column_names=OFF.  This
  is to be more like PostgreSQL.  More testing needed. (CVS 1250)


type: ci
user: rdc
comment:
  Fixed behaviour of last_insert_rowid() with triggers and add last_statement_change_count() function that works correctly with triggers. (CVS 1251)


type: ci
user: rdc
comment:
  Fixed behaviour of last_insert_rowid() with triggers and add last_statement_change_count() function that works correctly with triggers. (CVS 1252)


type: ci
user: rdc
comment:
  Add sqlite.def file required for correct operation of "make implib" option in Makefile.in (CVS 1253)


type: ci
user: drh
comment:
  Flag pragmas like vdbe_trace now return their current setting if they
  are called with no arguments. (CVS 1257)


type: ci
user: drh
comment:
  Cleanup the printf code to make it smaller and more modular.
  Fix a memory leak in the new OP_ContextPush opcode. (CVS 1258)


type: ci
user: drh
comment:
  Do not sort terminal symbols by name.  The terminals remain in the same order
  that they are encountered in the grammar file.  This results in parse tables
  that are 25% smaller. (CVS 1261)


type: ci
user: drh
comment:
  Rearrange the grammar some so that tokens that are used together appear
  together in the grammar file.  This reduces the size of the parser tables
  and some of the jump tables in switch statements. (CVS 1262)


type: ci
user: drh
comment:
  Make sure BEGIN, COMMIT, and ROLLBACK are really no-ops when preceded
  by EXPLAIN.  Ticket #626. (CVS 1267)


type: ci
user: drh
comment:
  Min() and max() functions honor the distinction between TEXT and NUMERIC
  data.  Ticket #623.  typeof() is now a user function.  Some tests are
  now failing due to ticket #521. (CVS 1272)


type: ci
user: rdc
comment:
  Add comments and prototype for experimental sqlite_last_statement_changes() API function. Also, allow function to be called from tcl. (CVS 1273)


type: ci
user: a.rottmann
comment:
  Build system update:

  * Update of generated/libtoolized files: config.guess, config.sub,
     configure, ltmain.sh
  * Removal of libtool, which is generated by configure
  * Changes to Makefile.in, adding better support for newer libtools (CVS 1274)


type: ci
user: drh
comment:
  Fix some compiler warnings in LCC.  The warnings did not indicate real
  problems.  Ticket #634.  Not all warnings in ticket #634 were fixed. (CVS 1276)


type: ci
user: drh
comment:
  Allow time modifiers of the form HH:MM:SS.SSS with an option "+" or "-"
  prefix.  The specified amount of time is added into the date-time begin
  modified. (CVS 1277)


type: ci
user: drh
comment:
  Make sure a LIMIT clause on a SELECT cleans up the vdbe stack so that if it
  occurs inside a trigger, it won't cause a stack overflow.  Ticket #640. (CVS 1282)


type: ci
user: drh
comment:
  A vdbe stack element might have a string value even after a call to
  Integerify().  Ticket #641. (CVS 1283)


type: ci
user: drh
comment:
  Bump the version number to 2.8.13.  Patch up the limit test so that it works
  in spite of ticket #521 - we don't want any tests failing in an official
  release even if there are bugs. :-D (CVS 1285)


type: ci
user: drh
comment:
  The BTree layer now returns SQLITE_READONLY on an attempt to open a write
  cursor on a read-only database.  Previously, the failure would not occur
  until there was an attempt to write to the cursor. (CVS 1289)


type: ci
user: a.rottmann
comment:
  * Added rule for rebuilding Makefile from Makefile.in.
  * Fixed double-slash problem induced by adding DESTDIR support. (CVS 1290)


type: ci
user: drh
comment:
  Fix the min/max optimizer so that it works when the FROM clause is a
  subquery.  Ticket #658. (CVS 1293)


type: ci
user: drh
comment:
  The sqlite_trace() API only works for commands started by the user, not for
  SQL commands run during initialization. (CVS 1298)


type: ci
user: drh
comment:
  Fix a VDBE stack overflow that occurs when the left-hand side of an IN
  expression is NULL and the result is stored on the stack rather than used
  to control a jump.  Ticket #668. (CVS 1299)


type: ci
user: drh
comment:
  Change the ".database" command in the shell to allocate more characters to
  the database name and filename. (CVS 1300)


type: ci
user: drh
comment:
  Get the temp_store and default_temp_store pragmas working.  Update the
  documentation.  Also fix a malloc problem that popped up during the regression
  testing. (CVS 1302)


type: ci
user: drh
comment:
  Begin modifying the BTree code for the new version-3 file format.
  This is a work-in-progress.
  As of this check-in, SQLite will not build. (CVS 1306)


type: ci
user: drh
comment:
  Changes to btree for the new file format are mostly complete.  Still need
  to test and debug. (CVS 1311)


type: ci
user: danielk1977
comment:
  Add code to convert between the various supported unicode encoding schemes.
  Untested at this point. (CVS 1315)


type: ci
user: drh
comment:
  The btree.c module compiles and links and passes some tests.  Many tests
  still fail, though. (CVS 1321)


type: ci
user: danielk1977
comment:
  Change lots of internal symbols from sqliteXXX to sqlite3XXX so that the
  library links again. It doesn't work yet, due to changes in the btree layer
  calling convention. (CVS 1324)


type: ci
user: drh
comment:
  Get the code back to the point where it will compile the btree.c tests.
  Move the default key comparison routine from btree.c into vdbeaux.c.
  Commented out code in vdbe.c that will need to be fixed. (CVS 1326)


type: ci
user: drh
comment:
  All tests in btree.test now pass (but only because I commented out the
  btree_integrity_check test.) (CVS 1328)


type: ci
user: drh
comment:
  More btree.c bug fixing.  It's getting closer but still not there yet.
  Move obsolete test scripts into the attic. (CVS 1331)


type: ci
user: danielk1977
comment:
  Add a temporary sqlite2BtreeKeyCompare() function to help get
  regression tests passing again. (CVS 1332)


type: ci
user: danielk1977
comment:
  Add versions of OP_MakeRecord and OP_Column that use manifest typing (not
  activated yet). (CVS 1334)


type: ci
user: danielk1977
comment:
  Add versions of OP_MakeRecord and OP_Column that use manifest typing (not
  activated yet). (CVS 1335)


type: ci
user: drh
comment:
  Add flags values to the Mem structure to accomodate BLOBs and to show
  the representation of strings. (CVS 1341)


type: ci
user: drh
comment:
  The btree.c module now passes all the historical regression tests.  New tests
  for new functionality still need to be added. (CVS 1342)


type: ci
user: drh
comment:
  The btree.c module passes all tests and is ready for integration.
  Still need to go back and do coverage testing. (CVS 1343)


type: ci
user: danielk1977
comment:
  Internal symbols MEM_Dyn and MEM_AggCtx were defined as the same bit pattern.
  Change MEM_AggCtx to 0x1000. (CVS 1350)


type: ci
user: drh
comment:
  Btree uses signed integers for the rowid.  The intToKey() and keyToInt() macros
  are now no-ops. (CVS 1364)


type: ci
user: danielk1977
comment:
  Manifest types in indices. At the moment indices use manifest typing, but
  some other parts of the SQL engine do not, which can lead to some strange
  results. (CVS 1368)


type: ci
user: drh
comment:
  Changes to btree and pager in preparation for moving to run-time page
  size determination. (CVS 1374)


type: ci
user: drh
comment:
  Allocates VDBE cursors one by one in separate memory so that pointers to
  cursors can persist through a realloc(). (CVS 1383)


type: ci
user: danielk1977
comment:
  Fix a bug meant real numbers with a negative sign were being stored as
  strings by default (instead of IEEE floats). (CVS 1388)


type: ci
user: danielk1977
comment:
  Omit the '\0' at the end of UTF-8 strings on disk (it is implied). Also
  don't store the number of rows at the beginning of each table record. (CVS 1390)


type: ci
user: drh
comment:
  Remove dead code from vdbeaux.c.  Add comments describing desired changes
  to OP_Sort processing in select.c (CVS 1398)


type: ci
user: drh
comment:
  Really remove the OP_StrEq opcode this time - appearently I didn't save the
  file out of the editor before doing the check-in (1397). (CVS 1405)


type: ci
user: drh
comment:
  Change opcode names and comments to better describe the operation of
  the incrKey flag.  OP_MoveTo becomes OP_MoveGe. (CVS 1407)


type: ci
user: drh
comment:
  Bug fix associated with OP_SetNumColumns in insert.c.  Also changed a
  variable name in OP_Column. (CVS 1413)


type: ci
user: drh
comment:
  Default type affinity is now NUMERIC.  The affinity.html file checked into
  the doc directory. (CVS 1417)


type: ci
user: drh
comment:
  Most sorting problems are fixed.  Dead code has been removed.  3 test failures
  remain but will be fixed by the new function API once it gets implemented. (CVS 1425)


type: ci
user: drh
comment:
  Eliminate the OP_SortMakeRec and OP_SortCallback opcodes.  Sort using the
  standard record format. (CVS 1426)


type: ci
user: danielk1977
comment:
  A few bugfixes related to UTF-16 databases. sqlite3_open() still assumes a
  UTF-8 database, and sqlite3_open16() still assumes a UTF-16 db. (CVS 1434)


type: ci
user: danielk1977
comment:
  Non-aggregate SQL functions use sqlite_value* instead of const char * for
  argument values. (CVS 1449)


type: ci
user: danielk1977
comment:
  Ensure the type of an sqlite3_value* is not modified by calls to
  sqlite3_value_*() calls. (CVS 1463)


type: ci
user: drh
comment:
  Remove dataType and includeTypes flags from function definitions.  Added new
  P3_FUNCDEF type for P3 arguments on opcodes.  Fixes to several user functions.
  28 tests fail now. (CVS 1464)


type: ci
user: drh
comment:
  Refactoring of the vdbe Mem functions and the APIs that deal with them.
  The code will not compile in its current state. (CVS 1465)


type: ci
user: drh
comment:
  Change the record format to include an extra varint at the beginning to record the number of bytes in the header. (CVS 1478)


type: ci
user: danielk1977
comment:
  Add API functions sqlite3_open_varargs(), sqlite3_open16_varargs() and
  sqlite3_complete16(). (CVS 1479)


type: ci
user: drh
comment:
  Remove the encoding argument from sqlite3VdbeSerialGet.  Use the 32-bit
  version of sqlite3GetVarint for schema-level parameters. (CVS 1480)


type: ci
user: drh
comment:
  Factor common code for generating index keys into a procedure.  Other
  speed improvements and bug fixes. (CVS 1487)


type: ci
user: danielk1977
comment:
  Transform OP_HexBlob and OP_String8 to OP_Blob and OP_String the first time they are executed. (CVS 1492)


type: ci
user: drh
comment:
  Do not include the P3 parameter on OP_Integer opcodes if the integer will fit
  in 32 bits.  The P3 conversion is slow. (CVS 1494)


type: ci
user: drh
comment:
  Add 3-byte and 6-byte integer serial types.  This makes databases smaller
  and faster.  Should we go ahead and add 5- and 7-byte integer types too? (CVS 1499)


type: ci
user: drh
comment:
  Change the name of the include file to "sqlite3.h".  The names of the shell
  command and static library become "sqlite3" and "libsqlite3.a". (CVS 1510)


type: ci
user: drh
comment:
  Work toward combining the OP_MakeKey, OP_MakeIdxKey, and OP_MakeRecord
  opcodes into one.  The work is incomplete. (CVS 1524)


type: ci
user: drh
comment:
  Critical bugs fixed in btree.c.  Incompatible file format change.  Unrelated
  comment fix in select.c (CVS 1530)


type: ci
user: danielk1977
comment:
  Enhance user function API to support association of meta-data with constant
  arguments and the specification of text encoding preference. The LIKE
  operator takes advantage of both. (CVS 1534)


type: ci
user: danielk1977
comment:
  Add pragma to set/get text encoding. Also fix an obscure problem where a
  temp trigger could be accidently dropped. (CVS 1537)


type: ci
user: danielk1977
comment:
  Tables created with the CREATE TABLE <tbl> AS SELECT ... syntax now inherit
  column declaration types from the SELECT statement. (CVS 1538)


type: ci
user: drh
comment:
  More work on windows locking.  Fix some problems with unix locking.  There
  is still an assertion failure on windows locking in attach2.test. (CVS 1539)


type: ci
user: drh
comment:
  Start all transactions and verify all schema cookies near the beginning of
  of each vdbe program. (CVS 1543)


type: ci
user: drh
comment:
  Add the "lock_status" pragma - only available when SQLITE_DEBUG is defined.
  Used for testing only. (CVS 1547)


type: ci
user: drh
comment:
  Turn on the atomic multifile commit logic.  It does not work right yet, but
  it has at least stopped failing asserts. (CVS 1550)


type: ci
user: drh
comment:
  If a commit fails due to lock contention right after the COMMIT command, take
  the database back out of autocommit mode.  Do not rollback.  This gives the
  user the chance to try the COMMIT again. (CVS 1551)


type: ci
user: drh
comment:
  Check for schema updates if the parser fails to find a table.  More locking
  test updates. (CVS 1555)


type: ci
user: danielk1977
comment:
  Change the collation sequence interface to allow collation sequences that
  use UTF-16 in non-native byte order to be registered. (CVS 1559)


type: ci
user: danielk1977
comment:
  When in PAGER_RESERVED state, don't write to the main file when rolling
  back a statement transaction. (CVS 1560)


type: ci
user: danielk1977
comment:
  Add the sqlite3_collation_needed() API and fix some error handling cases
  involving unknown collation sequences. (CVS 1562)


type: ci
user: danielk1977
comment:
  Add the sqlite3_collation_needed() API and fix some error handling cases
  involving unknown collation sequences. (CVS 1563)


type: ci
user: danielk1977
comment:
  Add the sqlite3_collation_needed() API and fix some error handling cases
  involving unknown collation sequences. (CVS 1564)


type: ci
user: danielk1977
comment:
  Correctly handle the situation where a collation sequence is available, but
  not in the preferred encoding. (CVS 1565)


type: ci
user: danielk1977
comment:
  (1) Modifications to the user-function interface and (2) Internal changes
  to automatically created indices. (CVS 1575)


type: ci
user: drh
comment:
  The VDBE aggregate functions use an in-memory btree instead of a disk-based
  btree for improved performance. (CVS 1579)


type: ci
user: danielk1977
comment:
  Ensure the master journal directory is synced. Also, change the master journal
  format to store journal file names. (CVS 1583)


type: ci
user: danielk1977
comment:
  Change tests in pager.test to account for the extra cache hit in the code
  that updates file change counter. (CVS 1584)


type: ci
user: drh
comment:
  Add the sqlite3OsFileModTime() interface.  But it is still unused.  The
  change counter in page 1 is always incremented. (CVS 1594)


type: ci
user: drh
comment:
  Do not use the page containing locks for anything to avoid problems with
  the manditory file locking on windows. (CVS 1595)


type: ci
user: danielk1977
comment:
  (1) Vdbe makes a copy of column types. (2) Don't invalidate other cursors
  when a statement or transaction is rolled back. (3) Update capi2.test for
  the new API. (CVS 1597)


type: ci
user: danielk1977
comment:
  Minor bugfixes and test case adjustments for version 2 test cases to work
  with version 3. (CVS 1598)


type: ci
user: danielk1977
comment:
  Use the faster LIKE function from sqlite v2. Add special user functions to
  test builds to test the auxdata APIs. (CVS 1610)


type: ci
user: drh
comment:
  Fix typos in documentation.  Fix publish.sh so that it correctly builds the
  ZIP archive of preprocesses source code. (CVS 1620)


type: ci
user: drh
comment:
  Changes to allow libsqlite3.a and libsqlite.a to be both linked into the
  same program at the same time. (CVS 1621)


type: ci
user: drh
comment:
  Change the name of the TCL command from "sqlite" to "sqlite3" so that both
  SQLite version 2 and SQLite version 3 can be used by Tcl at the same time. (CVS 1626)


type: ci
user: drh
comment:
  Omit the sqlite3VdbeCode() routine.  Use sqlite3NameFromToken() more to
  reduce the amount of code. (CVS 1639)


type: ci
user: drh
comment:
  Fix problems with the WatCom C compiler:  Arrays must contain at least one
  element.  sqlite3FreeX declared properly.  Don't allow run-time expression
  (the SQLITE_UTF16NATIVE macro) in an array initializer. (CVS 1640)


type: ci
user: drh
comment:
  Make sure VdbeFunc entries are initialized before trying to destroy them.
  Also, unrelated comment changes in build.c. (CVS 1643)


type: ci
user: danielk1977
comment:
  Update sqlite3_column_decltype() to return NULL as the declartion type for
  an expression that is not a column reference. (CVS 1646)


type: ci
user: danielk1977
comment:
  Ensure sqlite3ErrorMsg() is used to report errors during compilation,
  sqlite3Error() during execution. Also remove unused param from
  sqlite3VdbeReset() and Finalize(). (CVS 1647)


type: ci
user: drh
comment:
  Fix an uninitialized variable.  The variable was harmless, but pedantic
  error checking in MSVC raised an exception on it. (CVS 1651)


type: ci
user: drh
comment:
  The download.tcl script used to generate download.html must run out of
  the doc subdirectory of the build. (CVS 1667)


type: ci
user: drh
comment:
  Fix signed integer problems in vxprintf.  Ticket #778.  Also remove some
  dead code from util.c. (CVS 1685)


type: ci
user: danielk1977
ecomment:
  Remove default_synchronous and temp_store pragmas. Allow the safety-level
  and cache-size to be set for attached databases. (CVS 1735)

comment:
  Remove default_synchronous and temp_store pragmas. Allow the safety-level
  and cache-size to be set for attached databases. (CVS 1735)


type: ci
user: danielk1977
comment:
  Remove default_synchronous and temp_store pragmas. Allow the safety-level
  and cache-size to be set for attached databases. (CVS 1736)


type: ci
user: danielk1977
comment:
  Allow strings that look like integers to be inserted into IPK columns in a
  UTF-16 database. (CVS 1771)


type: ci
user: drh
comment:
  Skip bigfile.test on Mac OS X.  Darwin does not handle large sparse files
  efficiently and so this test takes a really long time. (CVS 1779)


type: ci
user: drh
comment:
  Add the crashtest target to Makefile.in.  Add LL suffix to long long constants
  in the vdbe.  Comment changes to vdbeaux.c. (CVS 1780)


type: ci
user: danielk1977
comment:
  Have the debug version of sqliteRealloc() return partially uninitialised
  memory in the same way as the non-debug version can. (CVS 1783)


type: ci
user: drh
comment:
  Up the version number to 3.0.2 and make changes to the website in
  preparation for the first beta release. (CVS 1786)


type: ci
user: drh
comment:
  Implement the experimental sqlite3_bind_parameter_count() API in support
  of DBD::SQLite.  Also fix the sqlite3.def export list. (CVS 1797)


type: ci
user: drh
comment:
  Use the F_FULLFSYNC fctrl if it is available.  Record the name of files
  that are opened in the OsFile structure. (CVS 1799)


type: ci
user: drh
comment:
  The %W date specifier in strftime should be measured from the first Monday
  of the year.  Ticket #758. (CVS 1805)


type: ci
user: drh
comment:
  The OsFile under Unix records a pointer back to the pager.  This is intended
  to be used for an externalized locking patch. (CVS 1821)


type: ci
user: drh
comment:
  Simplify the where.c logic by flipping expression over so that the controlling
  variable is always on the left. (CVS 1838)


type: ci
user: drh
comment:
  Updates comments in sqlite.h.in that describe the destructor parameter
  to sqlite3_bind_.... (CVS 1842)


type: ci
user: drh
comment:
  Progress towards getting prepared statements and CREATE and DROP to play
  nicely together.  Work is incomplete.  Some tests are known to fail. (CVS 1864)


type: ci
user: drh
comment:
  Fix more problems with deferred execution of CREATE.  Still need to do DROP.
  There is now a memory leak. (CVS 1865)


type: ci
user: drh
comment:
  Honor the ORDER BY clause in a subquery that is the right-hand side of an IN
  operator.  Ticket #827. (CVS 1871)


type: ci
user: drh
comment:
  Separate P4 timing asm code out of the SQLITE_DEBUG macro so that SQLITE_DEBUG
  can be used on non-x86 machines and with compilers other than GCC.
  Ticket #838. (CVS 1876)


type: ci
user: drh
comment:
  In the command-line shell: importments to the "help" message and better
  error checking in the new .import command. (CVS 1877)


type: ci
user: drh
comment:
  Do not invoke the busy callback when trying to promote a lock from SHARED
  to RESERVED.  This avoids a deadlock. (CVS 1879)


type: ci
user: drh
comment:
  Add the ability to specify a alternative temporary file directory using the
  "sqlite_temp_directory" global variable. (CVS 1885)


type: ci
user: drh
comment:
  If meta(3)>0 then make the database readonly for now.  This allows the current
  database to interact with future releases that might include autovacuum. (CVS 1888)


type: ci
user: drh
comment:
  Be more agressive about not creating or opening the TEMP database if there
  are no TEMP tables. (CVS 1891)


type: ci
user: drh
comment:
  Make sure the database file is correctly truncated after a ROLLBACK that
  occurs after a statement abort. (CVS 1893)


type: ci
user: drh
comment:
  Enhance lemon so that a @X instead of just X in the code expands to the
  major token value rather than the minor token value.  Use this to make
  the parser a few hundred bytes smaller. (CVS 1895)


type: ci
user: drh
comment:
  Tcl interface transfers values directly between SQLite and Tcl_Objs, without
  at translation to strings. (CVS 1898)


type: ci
user: drh
comment:
  Fix a pager bug that might have made multi-database commits non-atomic
  if a power failure occurred at just the wrong moment. (CVS 1900)


type: ci
user: drh
comment:
  Protect Tcl_Obj pointers from change using Tcl_IncrRefCount() while
  executing SQL statements in the TCL bindings. (CVS 1903)


type: ci
user: drh
comment:
  Update the TCL binding documentation to describe the newly added ability
  to specify TCL variable names in the body of an SQL statement. (CVS 1904)


type: ci
user: drh
comment:
  Add the sqlite3_libversion() API (ticket #834).  Fix the build scripts to
  correctly build the shared libraries with version 8.4 of Tcl. (CVS 1908)


type: ci
user: drh
comment:
  Corrections to transient table handling in compound select statments.
  Tickets #826 and #875. (CVS 1912)


type: ci
user: drh
comment:
  Increase the version number and update the change log in preparation for
  the release of version 3.0.5. (CVS 1914)


type: ci
user: drh
comment:
  Change the name of the global variable to sqlite3_temp_directory to
  avoid a naming conflict with version 2.8. (CVS 1918)


type: ci
user: drh
comment:
  Modify the sqlite shell program so that the ".dump" command does not give up
  if it encounters an SQLITE_CORRUPT error.  It tries to keep going in order
  to extract as much information as it can from the corrupt database. (CVS 1919)


type: ci
user: drh
comment:
  Remove the \001 character that lemon inserts automatically in its
  output file.  The need for this character has expired and it creates
  confusion for users.  Ticket #877 (CVS 1920)


type: ci
user: drh
comment:
  Transactions commit on the last sqlite3_step(), not on sqlite3_finalize().
  This allows the sqlite3_step() to return SQLITE_BUSY if the commit is
  blocked by a lock.  Ticket #885. (CVS 1928)


type: ci
user: drh
comment:
  Modify btree.c so that is allocates big data structures using malloc()
  instead of allocating from the stack.  Stack allocations cause problems
  for embedded systems and pthreads implementations that only allocate a
  limited amount of stack space. (CVS 1937)


type: ci
user: drh
comment:
  Fix a naming conflict between sqlite versions 2 and 3.  An open sqlite3
  connection now *must* be called "sqlite3".  You cannot call it "sqlite".
  This might break existing code. (CVS 1941)


type: ci
user: drh
comment:
  Fix more name collisions.  Allow sqlite.h and sqlite3.h to both be included
  in the same C/C++ source file. (CVS 1942)


type: ci
user: drh
comment:
  Fix the onecolumn method in the TCL interface so that it works the same
  as the eval method in all ways except for returning just the first value
  in the result set. (CVS 1944)


type: ci
user: drh
comment:
  Wildcards with the same name map into the same variable number.  New
  api sqlite3_bind_parameter_index() added to map wildcard names into
  wildcard index numbers.  Support for "?nnn" wildcards. (CVS 1945)


type: ci
user: drh
comment:
  Add new APIs to sqlite3.def: sqlite3_bind_parameter_name and
  sqlite3_bind_parameter_index. (CVS 1947)


type: ci
user: drh
comment:
  Update the makefile so that util.c gets the -DSQLITE_DEBUG=1 flag when
  building the test fixture. (CVS 1951)


type: ci
user: drh
comment:
  Fix a segfault in the authorizer when it is given a SELECT statement with
  no FROM clause.  Ticket #896. (CVS 1954)


type: ci
user: drh
comment:
  In lemon, allows open() using the "b" option to avoid \r problems on windows.
  Ticket #897. (CVS 1956)


type: ci
user: drh
comment:
  The TCL interface responds correctly to "break", "continue", and "return"
  inside of the script of an eval statement. (CVS 1958)


type: ci
user: drh
comment:
  The callback on sqlite3_trace() is invoked the first time sqlite3_step()
  is called after sqlite3_prepare() or sqlite3_reset().  Ticket #900. (CVS 1960)


type: ci
user: drh
comment:
  The INSERT code generator does a better job of detecting if the table
  being written into is used in the SELECT on the right-hand side.
  ticket #901. (CVS 1961)


type: ci
user: drh
comment:
  Add comments to unused P3 fields of selected instructions when NDEBUG is
  not defined.  This makes VDBE program dumps more readable during debugging. (CVS 1973)


type: ci
user: drh
comment:
  Avoid a segfault in sqlite3_bind_parameter_index when there are
  unnamed parameters.  Ticket #918. (CVS 1977)


type: ci
user: drh
comment:
  Allow functions to be created when there are outstanding VMs.
  (Ticket #926)  Fix problems with sqlite3_errcode().  Add tests for
  sqlite3_errcode(). (CVS 1989)


type: ci
user: drh
comment:
  Use type i64 instead of off_t for file offsets since off_t is giving
  portability problems.  Ticket #924. (CVS 1992)


type: ci
user: drh
comment:
  Fixes to the OsUnlock() interface.  Correctly leave a SHARED lock behind
  when requested.  Honor the error code that OsUnlock() returns.
  Ticket #913 and #938. (CVS 1997)


type: ci
user: drh
comment:
  Save about 800 bytes of code space by aligning TK_ and OP_ constants so that
  we do not have to translate between them. (CVS 1998)


type: ci
user: drh
comment:
  More changes to take advantage of the TK_ and OP_ alignments to avoid
  unnecessary translations. (CVS 1999)


type: ci
user: drh
comment:
  Rearrange memory allocation in sqlite3VdbeMakeReady to try to work around
  some byte-alignment problems on Sparc. (CVS 2002)


type: ci
user: drh
comment:
  Fix the ".import" command of the command-line shell so that it ignores
  \n and \r at the end of a line.  Ticket #939. (CVS 2003)


type: ci
user: drh
comment:
  In the command-line shell in CSV move, put strings in C-style double-quotes.
  Ticket #911. (CVS 2009)


type: ci
user: drh
comment:
  Reinsert code deleted by (1998) that we thought was unused but was in fact
  needed.  Fix for ticket #966. (CVS 2025)


type: ci
user: drh
comment:
  Fix alignment problems in btree and pager and allow page sizes that are
  not a multiple of 8. (CVS 2026)


type: ci
user: drh
comment:
  Begin adding the ability to remove unused features at compile-time and still
  have all the tests pass. (CVS 2033)


type: ci
user: drh
comment:
  Insert #ifdefs that can optionally remove features at compiletime resulting
  in a database engine with a smaller footprint. (CVS 2034)


type: ci
user: danielk1977
comment:
  Code to auto-vacuum the database if all root pages happen to be in the right place. Not active by default and largely untested. (CVS 2037)


type: ci
user: danielk1977
comment:
  Fix an auto-vacuum bug that occurs when a btree cell is promoted to the parent page during a delete. (CVS 2043)


type: ci
user: drh
comment:
  The makefile now runs mkkeywordhash.c.  Keywords that are unused are
  omitted from the keyword hash table. (CVS 2045)


type: ci
user: danielk1977
comment:
  Auto-vacuum bug: Correctly manipulate page cache hash-table entries in sqlite3pager_movepage(). (CVS 2046)


type: ci
user: danielk1977
comment:
  Support root-page allocation/deallocation in auto-vacuum databases. Still a few problems. (CVS 2054)


type: ci
user: danielk1977
comment:
  When using sqlite3NestedParse() to modify the sqlite_master table, do not code OP_Callback. (CVS 2063)


type: ci
user: danielk1977
comment:
  Don't code an OP_Statement within sqlite3NestedParse(). Also a correction
  to the UPDATE statement used within destroyRootPage(). (CVS 2064)


type: ci
user: danielk1977
comment:
  Fix allocation of tables in an auto-vacuum database when the required root-page is on the free-list. (CVS 2065)


type: ci
user: danielk1977
comment:
  Make auto-vacuum a run-time option (default determined by SQLITE_DEFAULT_AUTOVACUUM macro). (CVS 2067)


type: ci
user: drh
comment:
  Create table now works with sqlite3NestedParse.  This changed uncovered
  a latent bug in xprintf which is also fixed. (CVS 2069)


type: ci
user: danielk1977
comment:
  Auto-vacuum: Ensure pages to be removed by database truncation are in the journal file. Also fix an sqlite3pager_movepage() bug. (CVS 2074)


type: ci
user: danielk1977
comment:
  Fix expr.test so that it works when the date-time functions are compiled out of the library. (CVS 2086)


type: ci
user: danielk1977
comment:
  Ensure the test suite can run with either SQLITE_OMIT_AUTOVACUUM or SQLITE_DEFAULT_AUTOVACUUM=1 defined. (CVS 2087)


type: ci
user: drh
comment:
  Autoincrement code installed.  Simple smoke-testing only.  No regression
  tests developed yet. (CVS 2091)


type: ci
user: danielk1977
comment:
  Code toward having btree cursors persist when their table is written too. Doesn't work properly yet. (CVS 2097)


type: ci
user: drh
comment:
  Fix a typo in the header comment to the MakeRecord opcode so that the
  documentation generator will actually see the opcode description.
  Ticket #1001. (CVS 2102)


type: ci
user: danielk1977
comment:
  When dropping a table, update the sqlite_sequence table first, as auto-vacuum mode may need to move sqlite_sequence when the btree table is dropped. (CVS 2113)


type: ci
user: drh
comment:
  Rig the sqliteMalloc() routine so that we can make it fail multiple times
  in a row.  Modify the malloc.test procedure to make malloc fail in this
  way and verify that the failures are still handled correctly. (CVS 2121)


type: ci
user: drh
comment:
  Omit the maximum loop count on the random name chooser in the VACUUM command.
  Add a comment to explain why this is safe and does not result in an
  infinite loop.  Ticket #1009. (CVS 2122)


type: ci
user: drh
comment:
  Fix a long-standing bug in btree.c in the sqlite3BtreePrevious() routine.
  The problem has gone unnoticed before now because it only occurs when you
  use the OP_Prev opcode on a B+Tree. (CVS 2140)


type: ci
user: drh
comment:
  Add initial infrastructure for cursors.  In where.c, optimize out clauses
  of the form "ORDER BY rowid" if a table scan is being performed.  Do a
  reverse table scan if "ORDER BY rowid DESC" is present. (CVS 2141)


type: ci
user: drh
comment:
  The configure script now automatically detects tclConfig.sh and builds the
  Tcl extension only if tclConfig.sh is present.  The Tcl extension can be
  disabled using --disable-tcl. (CVS 2152)


type: ci
user: drh
comment:
  Disable the cursors.  "make install" now builds and installs a TCL package
  for SQLite if TCL is installed on the system. (CVS 2153)


type: ci
user: drh
comment:
  Only evaluate expressions once for UPDATE and INSERT statements that
  have BEFORE triggers.  Fix for ticket #980. (CVS 2158)


type: ci
user: drh
comment:
  Enhance sqlite3_bind_parameter_index so that is does not segfault if
  you call it incorrectly by passing NULL in place of the parameter name.
  Ticket #1032. (CVS 2159)


type: ci
user: drh
comment:
  Add a -DUSE_TCL_STUBS to the standard Makefile.  This might help with
  ticket #1034.  Or maybe not. (CVS 2160)


type: ci
user: drh
comment:
  Back out the USE_TCL_STUBS changes because it breaks the build.  I think
  the strategy needs to be to abandon libtool and use tcl.m4 to figure out how
  to build our own shared libraries.  Ticket #1034. (CVS 2162)


type: ci
user: tpoindex
comment:
  Add 'copy' method for tcl interface.  Behaves similar to shell .import or COPY statment in 2.x. (CVS 2167)


type: ci
user: drh
comment:
  The optimizer now uses only the index and ignores the table if it can get
  away with doing so, thus saving a single BTree search per row of result.
  This could potentially double the speed of certain queries.  The
  code passes all regression tests but new tests to exercise the new
  functionality are yet to be added. (CVS 2170)


type: ci
user: tpoindex
comment:
  Add PRAGMA 'temp_store_directory'.  Added os_*.c function
  sqlite3OsIsDirWritable(), split pragma.c changeTempStorage() function into
  invalidateTempStorage(). (CVS 2171)


type: ci
user: drh
comment:
  Fix ticket #1046 by removing code and simplifying the query optimizer.
  Remarkably, this simplification also makes the optimizer do a better job.
  Ticket #1051 was fixed as a side-effect. (CVS 2172)


type: ci
user: drh
comment:
  Fix typos in comments in test code.
  (Oops.  This check-in also picked up some unrelated
  changes to documentation.) (CVS 2175)


type: ci
user: danielk1977
comment:
  Remove incorrect assert() and add extra option to account for non-standard 'sort' program in some linux versions. (CVS 2179)


type: ci
user: danielk1977
comment:
  Minor test script changes to allow all.test to run when SQLITE_DEFAULT_AUTOVACUUM=1 is defined. (CVS 2182)


type: ci
user: danielk1977
comment:
  Fix a problem with auto-vacuum databases and the VACUUM command. Also add "pages read" and "pages written" statistics to the pager layer. (CVS 2183)


type: ci
user: drh
comment:
  Tcl interface does as sqlite3 or as sqlite.  A compile-time option allows
  duel linking.  Also fix a bug in the pragma change from earlier today. (CVS 2186)


type: ci
user: danielk1977
comment:
  Fix an assertion failure due to interaction between the count_changes pragma and triggers. (CVS 2187)


type: ci
user: drh
comment:
  Allow '$' in the middle of identifiers.  Ticket #1066.  This is an
  experimental change.  It might be backed out at a later date. (CVS 2197)


type: ci
user: danielk1977
comment:
  Enhance the performance of auto-vacuum databases by reducing the number of pointer-map entries written during tree balancing. Also fix bugs in balance_quick(). (CVS 2216)


type: ci
user: drh
comment:
  Drop support for MAC OS9.  SQLite 3 has never worked for that OS because
  the developers do not have access to a machine running it and nobody from
  the community has stepped forward to provide a port.  By moving the
  os_mac.c file into the attic, we make the lack of support official. (CVS 2220)


type: ci
user: danielk1977
comment:
  Change some assert()s that could fail if the database is corrupt to return SQLITE_CORRUPT instead. (CVS 2223)


type: ci
user: danielk1977
comment:
  Fix a bug reported on the mailing list concerning a conflict between "INSERT INTO ... SELECT" statements and the "SELECT max(x) FROM tbl" optimization. (CVS 2227)


type: ci
user: drh
comment:
  Infrastructure changes to handle name resolution differently.  This is needed
  to fix various long-standing problems with column names in joins.  It will
  also make the implementation of correlated subqueries easier. (CVS 2228)


type: ci
user: drh
comment:
  Refinements to the name resolution logic.  Change the name of the
  keywordhash.c file to keywordhash.h. (CVS 2229)


type: ci
user: drh
comment:
  Column names coming back from a SELECT are now just the name of the
  source column without the "table." prefix. In other words,
  "PRAGMA short_column_names=ON" is now the default.
  This makes the names of columns behave more like other SQL engines.
  The old behavior can be restored by setting "PRAGMA short_column_names=OFF". (CVS 2231)


type: ci
user: drh
comment:
  Make sure USING and NATURAL work on joins even if the columns are renamed
  using an AS phrase.  Ticket #523. (CVS 2233)


type: ci
user: danielk1977
comment:
  A few test cases were failing on windows due to mandatory locking. Omit them on that platform. (CVS 2234)


type: ci
user: drh
comment:
  Added the SQLITE_OMIT_SUBQUERY compile-time option and the EXISTS operator.
  Regression tests are currently failing with an assertion fault. (CVS 2245)


type: ci
user: danielk1977
comment:
  Modify test scripts to work when SQLITE_OMIT_SUBQUERY (along with other OMIT macros) is defined. (CVS 2251)


type: ci
user: danielk1977
comment:
  Modify test scripts to work when SQLITE_OMIT_SUBQUERY (but no other OMIT macros) is defined. (CVS 2252)


type: ci
user: drh
comment:
  More documentation changes.  Allow SQLITE_DEFAULT_CACHE_SIZE to set the
  default cache size for the pager at compile-time. (CVS 2261)


type: ci
user: danielk1977
comment:
  Test script changes: Bug fix and cleanup on ioerr tests. Also, don't use TCL "file copy" command on windows. (CVS 2264)


type: ci
user: drh
comment:
  ATTACH and DETACH cause prepared statements to expire.
  sqlite3_finalize() can now be called right after sqlite3_reset(). (CVS 2265)


type: ci
user: drh
comment:
  Fix a bug in change counting that comes up when sqlite3_finalize() is
  called right after sqlite3_reset(). (CVS 2266)


type: ci
user: drh
comment:
  Change the TCL interface so that it can cache VMs and reuse them without
  recompiling.  But for now leave the cache turned off by default. (CVS 2269)


type: ci
user: danielk1977
comment:
  Modifications and bugfixes so that the test suite passes with the TCL statement cache turned on. (CVS 2271)


type: ci
user: danielk1977
comment:
  Prevent collation sequences and user functions from being deleted or changed while SQL statements are executing. (CVS 2275)


type: ci
user: danielk1977
comment:
  Test that it is ok to execute ALTER TABLE immediately after opening a database connection. (CVS 2281)


type: ci
user: danielk1977
comment:
  Modification to schema.test so that it works with SQLITE_OMIT_TRIGGER and SQLITE_OMIT_UTF16 defined. (CVS 2285)


type: ci
user: danielk1977
comment:
  Have the optimization introduced in (2170) deal with OP_NullRow as well as OP_Column and OP_Recno. Fix for #1086. (CVS 2290)


type: ci
user: drh
comment:
  Tweaks to the keyword hash generator.  Tried to make it a little faster.
  If nothing else, the keyword hash table is now a little smaller. (CVS 2297)


type: ci
user: drh
comment:
  Lemon optimization:  When doing a shift following a reduce that pops one
  or more elements off the stack, no need to check for stack overflow. (CVS 2300)


type: ci
user: danielk1977
comment:
  Space analyzer: Format integer results as integers. Also fix the calculation of average-fanout. (CVS 2304)


type: ci
user: drh
comment:
  Make sure the rc variable in OsWrite of os_win.c is always initialized.
  Also assert that the amt parameter is always greater than zero.
  Ticket #1094. (CVS 2309)


type: ci
user: drh
comment:
  Fix the ".dump" command in the shell so that it works with AUTOVACUUM.
  This is related to ticket #1095. (CVS 2310)


type: ci
user: drh
comment:
  Add the (highly experimental) omit_readlock pragma that disables the use
  of readlocks on read-only databases that are connected using ATTACH. (CVS 2317)


type: ci
user: danielk1977
comment:
  Return SQLITE_BUSY if the database is locked reading the schema within
  sqlite_prepare(). Ticket #1106. (CVS 2322)


type: ci
user: danielk1977
comment:
  Fix a problem with sub-queries and the flattening optimization. Also handle an extra case of database corruption. (CVS 2324)


type: ci
user: drh
comment:
  Make sure that when a CREATE INDEX fails, it does not leave a residue behind
  that can corrupt the database.  Ticket #1115. (CVS 2330)


type: ci
user: danielk1977
comment:
  Ensure a database file is not truncated without an exclusive lock.
  Fix for ticket #1114. (CVS 2332)


type: ci
user: drh
comment:
  Append the version number to the directory name in source code tarballs.
  Tickets #793, #855, and #1055. (CVS 2340)


type: ci
user: drh
comment:
  Move the special built-in SQL functions used by ALTER TABLE out of func.c
  and into alter.c. (CVS 2343)


type: ci
user: drh
comment:
  Get vacuum working on database that used to have autoincrement tables but
  where all such tables have been dropped.  Ticket #1121. (CVS 2344)


type: ci
user: danielk1977
comment:
  Clarify that columns are indexed from 0 when using sqlite3_column_XXX() APIs. No code changes. (CVS 2348)


type: ci
user: drh
comment:
  The script that cross-compiles the windows DLLs now exports the symbols
  Tclsqlite_Init and Sqlite_Init used to initialize the TCL extension.
  Ticket #1137. (CVS 2358)


type: ci
user: drh
comment:
  Fix an assertion fault that can occur while autovacuuming a corrupt database
  file.  Add the SQLITE_OMIT_COMPLETE compile-time parameter. (CVS 2361)


type: ci
user: drh
comment:
  Fixes so that the FULLSYNC changes will build on windows.  They do not have
  any effect, but neither do they cause errors. (CVS 2377)


type: ci
user: drh
comment:
  Fix bugs discovered in 3.1.4.  F_FULLFSYNC not F_FULLSYNC.  And a bug in
  "make doc".  Also typos in the documentation. (CVS 2379)


type: ci
user: drh
comment:
  Disable GNU readline in the build of the command-line shell for linux since
  some systems (ex: SuSE) do not support it. (CVS 2381)


type: ci
user: drh
comment:
  When creating a new database, delete any preexisting journal that might be
  left over from a prior database with the same name.  Ticket #1152. (CVS 2387)


type: ci
user: drh
comment:
  Do not attempt to read the journal file on windows because manditory locking
  on windows will not allow it.  Ticket #1166. (CVS 2404)


type: ci
user: drh
comment:
  Allow the character "T" between date and time in ISO-8601 date/time formats.
  Ticket #1170. (CVS 2408)


type: ci
user: drh
comment:
  Fix a typo in vdbeInt.h.  This was potentially a serious mistake, but we got
  lucky and it is benign. (CVS 2418)


type: ci
user: drh
comment:
  Update comments and documentation to give the true maximum page size as 32K,
  not 64K as was previously (and erroneously) reported.  Ticket #1194. (CVS 2437)


type: ci
user: drh
comment:
  Make the ORDER BY clause return equal elements in the same order they were
  seen (a stable sort).  It was returning them in exactly the reverse order. (CVS 2439)


type: ci
user: drh
comment:
  Remove the psAligned value from the BTree structure - the pageSize is now
  always aligned to an 8-byte boundary.  Add comments on a confusing bit
  of code.  Ticket #1231. (CVS 2451)


type: ci
user: drh
comment:
  Make sure all data structures have 8-byte alignment - necessary for the
  sparc architecture and helpful on other 64-bit platforms.  Ticket #1232.
  Also update some comments in build.c. (CVS 2452)


type: ci
user: drh
comment:
  In the TCL interface, user-defined functions preserve the datatype returned
  by the Tcl procedure. (CVS 2453)


type: ci
user: drh
comment:
  Change to the lemon parser suggested by Geert Janssen.  Appears to have no
  impact on SQLite. (CVS 2458)


type: ci
user: drh
comment:
  Provide a compile-time parameter to set the default file creation permissions
  under Unix.  Ticket #1247. (CVS 2461)


type: ci
user: danielk1977
comment:
  Always use a more specific type (P3_FUNCDEF) instead of P3_POINTER as the
  P3 type of a vdbe instruction. (CVS 2463)


type: ci
user: drh
comment:
  Do not allow the pagesize of :memory: databases to be changed.  Silently
  ignore PRAGMA page_size=N requests for :memory: databases.
  Ticket #1144 and #1252. (CVS 2466)


type: ci
user: drh
comment:
  Reorder structure fields to reduce code footprint.  Ticket #1253.  Need
  to do more of this. (CVS 2467)


type: ci
user: drh
comment:
  Speed improvements as described by tickets #1257 and #1258.  These changes
  help some but are nowhere near the 23% claimed in the tickets. (CVS 2469)


type: ci
user: danielk1977
comment:
  Allow schema objects beginning with sqlite_ to be created if the
  SQLITE_WriteSchema flag is set. (CVS 2470)


type: ci
user: drh
comment:
  Never user a pointer to standard library routines malloc() and free().
  This rule is to
  work around limitations of MSVC and the _fastcall calling convention.
  Ticket #1256. (CVS 2473)


type: ci
user: drh
comment:
  Make sure that the use of a double-quoted string literal does not trick
  the optimizer into using a correlated subquery when a static
  subquery would suffice. (CVS 2477)


type: ci
user: drh
comment:
  The REGEXP operator is recognized.  It tries to invoke a function named
  regexp() which does not exist in the native build.  But users who want to
  can add an appropriate regexp() function using sqlite3_create_function(). (CVS 2478)


type: ci
user: danielk1977
comment:
  If SSE is enabled, set the P1 field of OP_AggInit instructions to the
  number of arguments that will be passed to the aggregate function. (CVS 2484)


type: ci
user: drh
comment:
  Add an experimental sqlite3_get_autocommit() API used to test whether or not
  changes are committed automatically. (CVS 2486)


type: ci
user: drh
comment:
  Naming the join columns in the result set of a natural join does not result
  in an "ambiguous column name" error.  Ticket #1217. (CVS 2494)


type: ci
user: drh
comment:
  Avoid ambiguous column name errors when the column name is in the USING clause
  of a join.  Ticket #743. (CVS 2495)


type: ci
user: drh
comment:
  Return SQLITE_MISUSE when passing a NULL pointer into sqlite3_bind routines.
  Ticket #1219. (CVS 2497)


type: ci
user: drh
comment:
  Reference count Table structures so that they are not deallocated too soon.
  Ticket #1210. (CVS 2498)


type: ci
user: danielk1977
comment:
  Add "#ifndef OMIT_DISKIO" condition around sqlite3_opentemp_count variable
  in test interface code. (CVS 2501)


type: ci
user: drh
comment:
  In the documentation, amplify the fact that encodings cannot be changed
  on a database that already exists.  Ticket #1277. (CVS 2503)


type: ci
user: drh
comment:
  Do not record existance the sqlite_sequence table until it is actually
  created.  Ticket #1283. (CVS 2513)


type: ci
user: drh
comment:
  Provide the SQLITE_FILE_HEADER command-line option for changing the text
  that appears at the beginning of databases. (CVS 2515)


type: ci
user: drh
comment:
  Fix the THREADSAFE macro in Makefile.in.  We really need to rework the
  whole autoconf build system.... (CVS 2520)


type: ci
user: drh
comment:
  Change the documentation to explain that a database handle can only be
  used in the same thread in which it was created.  Ticket #1272. (CVS 2521)


type: ci
user: drh
comment:
  Fix a bug in an assert found while investigating ticket #1287 but otherwise
  unrelated to that problem. (CVS 2522)


type: ci
user: drh
comment:
  Allow parameters to be introduced by characters ':', '$' and '#'.  This
  is an experimental change. (CVS 2523)


type: ci
user: drh
comment:
  Make sure the String8 opcode always has a non-null P3 argument in
  the foreign_key_list pragma.  Ticket #1297. (CVS 2525)


type: ci
user: drh
comment:
  NULL values in a row of a unique index cause the row to be distinct.
  Ticket #1301.  More testing and optimization needs to be done on this
  before closing the ticket. (CVS 2526)


type: ci
user: drh
comment:
  Remove the blob(), text() and numeric() functions added in (2524) and
  replace them with the standard CAST operator.
  Ticket #1287. (CVS 2527)


type: ci
user: drh
comment:
  The TCL interface binds variables as BLOB only if they have a bytearray
  representation but no text representation. Ticket #1287. (CVS 2528)


type: ci
user: drh
comment:
  Tcl interface uses Tcl_Objs to implement user-defined functions, thus allowing
  BLOB values to be transferred correctly.  Ticket #1304. (CVS 2530)


type: ci
user: drh
comment:
  Allow the DEFAULT value of a column to be obtained by calling a
  function that has constant arguments, such as julianday('now'). (CVS 2534)


type: ci
user: drh
comment:
  Replace OP_List with OP_Fifo.  This is the first step toward allowing
  recursive delete triggers and later foreign keys with cascading deletes. (CVS 2538)


type: ci
user: drh
comment:
  Add the EP_OptOnly flag on expressions for WHERE clause
  terms that are added by the optimizer but should not be coded. (CVS 2540)


type: ci
user: drh
comment:
  Change the name of the OpenTemp opcode to OpenVirtual which is more
  descriptive of what it does. (CVS 2541)


type: ci
user: drh
comment:
  Allow the IN operator to take a list of arbitrary expressions on its
  right-hand side.  The expressions no longer need to be constant.  The
  current implementation seems to work but needs more testing and optimization. (CVS 2542)


type: ci
user: drh
comment:
  Use the internal sqlite3_snprintf function instead of sprintf to avoid
  cross-platform incompatibilities.  Ticket #1316. (CVS 2545)


type: ci
user: drh
comment:
  Add test instrumentation that will be needed during the development of
  forthcoming optimizer enhancements. (CVS 2548)


type: ci
user: drh
comment:
  Split the OP_Integer opcode into OP_Integer and OP_Int64.  This allows
  comments to be added to OP_Integer.  Cleanup in the optimizer.  Allow
  terms of the FROM clause to be reordered automatically. (CVS 2556)


type: ci
user: drh
comment:
  Correct the documentation to show that sqlite3_column_text() returns
  a NULL pointer (not an empty string) when the column value is NULL.
  The same goes for sqlite3_column_blob().  Ticket #1334. (CVS 2558)


type: ci
user: drh
comment:
  First code for the ANALYZE command.  Mostly untested.  The analysis is
  not loaded into the symbol tables and is not used by the optimizer. (CVS 2560)


type: ci
user: drh
comment:
  Full-coverage testing and documentation for the ANALYZE command.  The
  results of analysis are still not loaded or used, however. (CVS 2561)


type: ci
user: drh
comment:
  The results of ANALYZE are now loaded into internal data structures where
  they can be used.  But they are not actually used yet. (CVS 2562)


type: ci
user: drh
comment:
  A new optimizer that breaks a lot of tests.  But none of them critically, I
  think.  Nevertheless, there is a lot of work ahead to stabilize the code. (CVS 2564)


type: ci
user: drh
comment:
  Optimizer now converts OR-connected WHERE-clause terms into an IN operator so
  that they can be used with indices.  There are known problems with the
  ORDER BY optimization in this and in several prior check-ins.  This
  check-in is not recommended for production use. (CVS 2569)


type: ci
user: drh
comment:
  Fix problems caused by over-agressive optimization of ORDER BY in joins.
  Lots more testing needed. (CVS 2571)


type: ci
user: drh
comment:
  Make sure the .import command strips newlines off the end of the last
  field in each line imported.  Ticket #1348 (CVS 2578)


type: ci
user: drh
comment:
  Improve the error message associated with SQLITE_FULL.  Ticket #1353.
  Also remove error messages for obsolete error codes SQLITE_INTERNAL,
  SQLITE_NOTFOUND, and SQLITE_TOOBIG. (CVS 2580)


type: ci
user: drh
comment:
  Optimize LIKE and GLOB operators in the WHERE clause.  Code passes all
  regression tests but still needs additional tests. (CVS 2581)


type: ci
user: drh
comment:
  Improved error message when a #NNN parameter appears on user input.
  Additional coverage testing. (CVS 2582)


type: ci
user: drh
comment:
  3rd argument to sqlite3Error() should always be a format string, never
  user-supplied error message text.  Ticket #1354. (CVS 2583)


type: ci
user: drh
comment:
  Fix a memory leak that occurs when a CREATE TABLE that contains a
  DEFAULT VALUE fails due to a name conflict.  Tickets #1356 and #1357. (CVS 2584)


type: ci
user: drh
comment:
  Make the round() function work correctly on numbers with very large exponents.
  Ticket #1340. (CVS 2585)


type: ci
user: drh
comment:
  Add the "!" flag to the "%g" mprintf conversion parameter to force a
  decimal point.  This prevents floating point values from appearing as
  integers.  Use this flag when converting floating point to text.
  Ticket #1362. (CVS 2586)


type: ci
user: drh
comment:
  Disable an overzealous optimization the omitted sorting on a join if the first
  table gave a unique result.  The sort can only be omitted if all tables in
  the join are unique.  Ticket #1358. (CVS 2589)


type: ci
user: drh
comment:
  Split the sqlite3_complete() API out into a separate source file so that
  in static links where it is not used it will not take up space in the
  resulting binary. (CVS 2594)


type: ci
user: drh
comment:
  Null-terminate the strings array passed to Tcl_GetIndexFromObj.  Bug
  reported on the mailing list. (CVS 2596)


type: ci
user: drh
comment:
  Bring testing coverage of the analyze.c file up to 100%.  Bugs found and
  fixed in the process. (CVS 2599)


type: ci
user: drh
comment:
  Increased test coverage.  Some malloc tests now fail though this is believed
  to be an instrumentation problem not a real error. (CVS 2604)


type: ci
user: drh
comment:
  Do not overwrite small files (less than 1024 bytes) that are not databases.
  Ticket #1370. (CVS 2606)


type: ci
user: drh
comment:
  Clean up possible locking problem in multithreaded applications that take
  a malloc failure. (CVS 2611)


type: ci
user: drh
comment:
  After calling realloc() on an array to resize it, be sure not to use pointers
  into the old array.  Ticket #1376. (CVS 2617)


type: ci
user: drh
comment:
  Fix a bug in DELETE that might cause a segfault when deleting more
  than 40940 rows of data all at once. (CVS 2620)


type: ci
user: drh
comment:
  When the left-hand side of an IN operator is constant and the right-hand
  side is a SELECT, recognize that the IN operator is not constant.
  Ticket #1380. (CVS 2624)


type: ci
user: drh
comment:
  Remove the words "statically linked" from the description of the shell on
  the download page.  Ticket #1391. (CVS 2628)


type: ci
user: drh
comment:
  Disable synchronous writes to the master journal when PRAGMA synchronous=OFF
  for all database files.  Ticket #1375. (CVS 2630)


type: ci
user: drh
comment:
  Add an assert to verify that floating point values and integers use the
  same byte order.  Add a comment to the SELECT code generator. (CVS 2635)


type: ci
user: drh
comment:
  The LIKE optimization does the right thing when collating sequences are
  present.  LIKE expressions where the left-hand side has COLLATE NOCASE
  are optimized in the default case. (CVS 2637)


type: ci
user: drh
comment:
  Update the home page to brag about 150KiB code footprint when optional
  features are omitted. (CVS 2641)


type: ci
user: drh
comment:
  The CSV output mode does not sign-extend bytes where the high-order bit is set.
  Ticket #1397. (CVS 2644)


type: ci
user: drh
comment:
  Sorting is now done using a sorting index rather than loading the entire
  result set into memory and doing a merge sort.  The old merge sort technique
  was a carry-over from SQLite version 1.  The new method uses a bounded amount
  of memory and scales to much larger result sets.  There are still errors:
  some 39 regression tests fail. (CVS 2653)


type: ci
user: drh
comment:
  All regression tests now pass with the new bounded-memory sort code.
  There is still lots of opportunity for optimization, however. (CVS 2654)


type: ci
user: drh
comment:
  Make due with "sub()" instead of "gsub()" in awk scripts so that builds will
  work on Solaris which will runs an archiac version of AWK. (CVS 2658)


type: ci
user: drh
comment:
  Fix ANALYZE so that it works even if the empty_result_callbacks pragma is
  enabled. Ticket #1409. (CVS 2659)


type: ci
user: drh
comment:
  Rewrite the aggregate handling logic so that it runs in O(1) space.
  This is the first cut at the code.  Many regression tests fail. (CVS 2662)


type: ci
user: drh
comment:
  More bug fixes.  All of the "quick" tests pass.  The full test suite still
  shows problems. (CVS 2665)


type: ci
user: drh
comment:
  All regression tests now pass.  But I am sure there must still be problems.
  New tests need to be added. (CVS 2666)


type: ci
user: drh
comment:
  The SUM() aggregate function returns an integer result if all inputs are
  integers.  Any single non-integer input causes the result to be a floating
  point value. (CVS 2669)


type: ci
user: drh
comment:
  While doing a transaction comment, use fdatasync() instead of fsync() in
  cases there the file size is unchanged. (CVS 2673)


type: ci
user: drh
comment:
  A SUM() of all NULLs returns NULL.  A SUM() of nothing return 0.
  A SUM() of a mixture of NULLs and numbers returns the sum of the
  numbers.  Ticket #1413. (CVS 2677)


type: ci
user: drh
comment:
  Infrastructure for the DISTINCT keyword in aggregate functions.  But it does
  not work yet.  If you try to use it you get an error message. (CVS 2680)


type: ci
user: drh
comment:
  Avoid a memory leak and/or assertion failure when parsing a table
  declaration that contains a duplicate column name.
  Ticket #1418. (CVS 2684)


type: ci
user: drh
comment:
  The shell does not output the sqlite_stat1 table on .dump or .schema.
  The ANALYZE command now gathers statistics on tables that have only
  a single index because this sometimes helps when reordering tables
  in a join. (CVS 2686)


type: ci
user: drh
comment:
  The ".dump" command from the shell correctly saves the state of the
  sqlite_sequence and sqlite_stat1 tables, if they exist.  Ticket #1419. (CVS 2687)


type: ci
user: drh
comment:
  COUNT(DISTINCT x) is now fully functional, though it could benefit from
  additional testing. (CVS 2688)


type: ci
user: drh
comment:
  Automatically set the NDEBUG preprocessor macro unless SQLITE_DEBUG is set.
  In this way, assert() statements become opt-in rather than opt-out. (CVS 2690)


type: ci
user: drh
comment:
  Fix a memory leak: a failure to deallocate the P3 parameter on a call
  to sqlite3VdbeChangeP3. (CVS 2695)


type: ci
user: drh
comment:
  Fix a whole host of newly discovered memory leaks the occur after a
  failure of realloc(). (CVS 2696)


type: ci
user: danielk1977
comment:
  Fix an auto-vacuum problem with the PENDING_BYTE page. Also link the Tcl
  variable sqlite_pending_byte to the internal pending-byte location when in test mode. (CVS 2700)


type: ci
user: drh
comment:
  Do not journal the file locking page when doing a database copy as
  part of a VACUUM.  Ticket #1432. (CVS 2703)


type: ci
user: drh
comment:
  Do not journal the locking page which doing an autovacuum.  Similar to the
  problem of #1432 except that this one occurs on autovacuum instead of vacuum.
  An assert() has been added to catch any future incidents of this type. (CVS 2704)


type: ci
user: drh
comment:
  Make sure dependencies on the right-hand side of IN operators are checked
  correctly.  Ticket #1433. (CVS 2706)


type: ci
user: drh
comment:
  Fix up the busy test so that it can be run multiple times in a row without
  giving false errors on 2nd and subsequent runs. (CVS 2714)


type: ci
user: drh
comment:
  Do not optimize views with an ORDER BY clause if they are used in a UNION ALL
  that also has an ORDER BY clause.  Ticket #1444. (CVS 2723)


type: ci
user: drh
comment:
  ON-clause terms in a LEFT JOIN that restrict only the left table, should not
  really restrict the left table but instead rows that fail to meet the condition
  to be joined with NULL rows from the right table. (CVS 2725)


type: ci
user: drh
comment:
  Cleanup the implementation and the documentation of the new 0x200 P1 flag
  on the VDBE comparison operands. (CVS 2729)


type: ci
user: drh
comment:
  Code cleanup and simplification.  Three new Mem opcodes added.
  The sqlite3VdbeJumpHere function added. (CVS 2730)


type: ci
user: drh
comment:
  Optionally call fdatasync() instead of fsync() only if _POSIX_SYNCHRONIZED_IO
  is positive, which should only be the case on operating systems that
  actually support fdatasync(). (CVS 2732)


type: ci
user: drh
comment:
  Fix an uninitialized structure member that was causing a malfunction when
  you used deeply nested and very complex views.  Ticket #1449. (CVS 2733)


type: ci
user: drh
comment:
  Make sure the default storage for virtual tables is the disk not memory
  while running conflict.test.  Ticket #1453. (CVS 2737)


type: ci
user: drh
comment:
  The hash tables deallocate when empty in order to avoid nuisanse complaints
  from valgrind.  Added tests to verify no hash table memory leaks in os_unix.c. (CVS 2738)


type: ci
user: drh
comment:
  Automatically check for the fdatasync() function and replace it with fsync()
  if not found. (CVS 2739)


type: ci
user: drh
comment:
  Another attempt to get fdatasync to be ignored on non-conforming posix systems.
  Now a system has to opt-in for fdatasync instead of opt-out.
  Ticket #1467. (CVS 2741)


type: ci
user: drh
comment:
  Fix an assert or memory leak that occurs when trying to EXPLAIN a statement
  other than a SELECT that outputs results.  Examples of such statements
  include PRAGMA integrity_check or INSERT/DELETE/UPDATE with PRAGMA
  count_changes=ON. (CVS 2743)


type: ci
user: drh
comment:
  Make sure pragma integrity_check does not report "ok" after first finding
  a bunch of errors. (CVS 2744)


type: ci
user: drh
comment:
  Check-in (2744) as incomplete and broke pragma integrity_check.  This
  completes the change and fixes the problem. (CVS 2746)


type: ci
user: drh
comment:
  More efficient handling of the LIMIT clause.  Scalar subqueries and EXISTS
  on compound SELECT statements now working properly.  Ticket #1473. (CVS 2747)


type: ci
user: drh
comment:
  Attempt to fix the SQLite core so that no floating point operations are used
  anywhere if SQLITE_OMIT_FLOATING_POINT is defined at compile-time.  This
  is useful to people who use SQLite on embedded processors that lack
  floating point support. (CVS 2749)


type: ci
user: drh
comment:
  Omit the SQLITE_AFF_INTEGER type affinity.  All numeric values are now
  of type real, though an integer representation is still sometimes used
  internally for efficiency. (CVS 2753)


type: ci
user: drh
comment:
  First cut at supporting CHECK constraints.  Everything appears to work,
  but much more testing is needed as well as documentation. (CVS 2754)


type: ci
user: drh
comment:
  Add the ignore_check_constraints pragma.  VACUUM works even on a database
  that contains table entries that violate check constraints. (CVS 2757)


type: ci
user: drh
comment:
  sqlite3_column_int() and similar routines return 0 or 0.0 on an
  out-of-memory condition, not some mysterious error code. (CVS 2759)


type: ci
user: drh
comment:
  Remove a C++-ism that slipped into the code during the recent CHECK
  enhancements.  Ticket #1513. (CVS 2762)


type: ci
user: drh
comment:
  Reduce the number of distinct token symbols in the parser so that the parser
  can store tokens in a single byte and thus be smaller in size. (CVS 2776)


type: ci
user: drh
comment:
  Make sure sqliteInt.h is included before any system includes.
  This is required for QNX.  Ticket #1478. (CVS 2777)


type: ci
user: drh
comment:
  The --enable-cross-thread-connect configuration option or the
  -DSQLITE_ALLOW_XTHREAD_CONNECT compile-time option permits database
  connections to be moved across threads.  This will cause latch-ups
  and failures on some linux systems such as RedHat-9.  Do not use these
  options if you want a portable build. (CVS 2778)


type: ci
user: danielk1977
comment:
  Ensure a low system limit on the number of open files does not cause manydb.test to fail. (CVS 2784)


type: ci
user: drh
comment:
  Modify the OS layer so that I/O routines are called through a virtual function
  table.  The os_test.c module has been replaced by test6.c.  The crash tests
  are busted now and need to be fixed. (CVS 2785)


type: ci
user: drh
comment:
  Make sure left joins still work even when the OR clause optimization fires.
  Ticket #1537. (CVS 2788)


type: ci
user: drh
comment:
  Disable the OR-clause optimization if it does not result in an index being
  used that would not have been used otherwise.  In other words, do not
  convert OR clauses into an IN statement if it does not help the optimizer. (CVS 2789)


type: ci
user: drh
comment:
  Replace a call to sprintf() with sqlite3MPrintf() since on some embedded
  platforms, sprintf() is busted.  Need to go through and do similar replacements
  elsewhere in the code. (CVS 2790)


type: ci
user: drh
comment:
  Make the OsFile structure opaque with its internal structure known only to
  the appropriate os_*.c implementation.  Omit the os_unix.h and os_win.h
  include files.  The crash tests are broken by this patch. (CVS 2791)


type: ci
user: drh
comment:
  The crash tests now compile, at least.  But they get wrong results.  The
  problem is fundamental and suggests I need to completely rethink how the
  new OS backend should work. (CVS 2792)


type: ci
user: drh
comment:
  The crash test works now, at least on unix.  Untested on windows. But it never
  worked on windows before so if it still does not there is no big loss.  I am
  still troubled by the current design of the OS overloading mechanism.  Expect
  to see more changes. (CVS 2794)


type: ci
user: drh
comment:
  Restructure the OS interface yet again.  This time make the OsFile object
  a virtual base class which is subclassed for unix, windows, and the crash
  test simulator.  Add the new file "os.c" for common os layer code.  Move
  all OS-specific routines into the sqlite3Os structure. (CVS 2795)


type: ci
user: drh
comment:
  Add a test to verify that binding text with embedded '\000' works.  Also
  comment changes in os.h. (CVS 2797)


type: ci
user: danielk1977
comment:
  Some elements of the new malloc() failure handling. Not all cases work properly yet. Also, library is not threadsafe if malloc() fails right now. (CVS 2800)


type: ci
user: drh
comment:
  Add more stress testing to autovacuum in an (unsuccessful) attempt to
  reproduce a reported problem.  Even though these tests did not uncover
  anything amiss, extra tests never hurt... (CVS 2807)


type: ci
user: drh
comment:
  New bind tests (check-ins (2797) and (2798)) only work right on a UTF8
  database.  So make sure they are only run when the database is UTF8. (CVS 2812)


type: ci
user: drh
comment:
  Properly zero-terminate UTF-16 collation names on an
  sqlite3_collation_needed16 callback. (CVS 2815)


type: ci
user: drh
comment:
  Fix memory allocation problems on the utf-16 versions of collating function
  control routines. (CVS 2817)


type: ci
user: drh
comment:
  Fix the utf8 to utf16 conversion routine for short strings.  Bug
  introduced by check-in (2817). (CVS 2821)


type: ci
user: drh
comment:
  Initial infrastructure for recognizing DESC indices and being able to read
  and write older databases that specify DESC indices but do not really use
  them.  Nothing is close to working yet. (CVS 2822)


type: ci
user: drh
comment:
  Tentative fix for ticket #1567:  disable the sqlite3pager_dont_write()
  optimization when a statement transaction is active.  We continue to look
  for a better fix. (CVS 2827)


type: ci
user: drh
comment:
  Add serial-types 8 and 9 for integer constants of 0 and 1 that use zero
  bytes of storage.  Make the default file format 4.  Add the
  SQLITE_DEFAULT_FILE_FORMAT compile-time option to lower the default
  file format number so that newly created databases can be read and
  written by older versions of SQLite. (CVS 2845)


type: ci
user: drh
comment:
  Add the xInMutex method to the os-layer switch for testing whether or not
  mutexes are used correctly. (CVS 2851)


type: ci
user: drh
comment:
  The sqlite TCL command no longer returns the hex address of the sqlite3*
  structure.  Instead there is a new command in testfixture to find that
  information. (CVS 2852)


type: ci
user: drh
comment:
  Always case 0 to (char*) on varargs functions.  Otherwise there are problems
  on 64-bit machines. (CVS 2854)


type: ci
user: danielk1977
comment:
  Disable automatic invocation of sqlite3_release_memory() when a malloc() fails
  in those cases where the global mutex is held. (CVS 2860)


type: ci
user: danielk1977
comment:
  Fix for ticket #1582 (Double delete of invalid LIMIT clause Expr* applied to a UNION ALL query). (CVS 2861)


type: ci
user: drh
comment:
  Move TCL interface for sqlite3_release_memory() and sqlite3_soft_heap_limit()
  out of tclsqlite.c and into test1.c.  Update the TCL interface documention
  to describe the "exists" method. (CVS 2862)


type: ci
user: drh
comment:
  Enable async testing.  Modify the OS layer interface.  Add the sqlite3_aux.h include file.  Add tests for boolean value representation in file format 4. (CVS 2866)


type: ci
user: drh
comment:
  Change the OS interface layer to use traditional direct function call
  implementations instead of the more complicated virtual function table.
  Omit the asynchronous I/O demo. (CVS 2870)


type: ci
user: danielk1977
comment:
  Fix a crash caused by adding a trigger to a shared-schema and then deleting it
  using a different connection. (CVS 2873)


type: ci
user: danielk1977
comment:
  In shared-cache mode, lock all required tables before beginning to execute the body of the statement program. (CVS 2881)


type: ci
user: drh
comment:
  Make sure there is no ephemeral data on the stack before returning from
  an sqlite3_step() call.  Otherwise, if the statement is in READ UNCOMMITTED
  mode then the data might be deleted or changed out from under us. (CVS 2884)


type: ci
user: drh
comment:
  Invalidate all VDBE cursor row caches in between calls to sqlite3_step()
  since the emphemeral content that those caches point to might change if
  the statement is READ UNCOMMITTED. (CVS 2886)


type: ci
user: drh
comment:
  Added database server example code (untested).  Fixed serveral bugs including
  the autovacuum compile problem described by ticket #1593. (CVS 2897)


type: ci
user: drh
comment:
  Add the first simple tests of server mode.  Get the Makefile generated from
  the configure script working again. (CVS 2898)


type: ci
user: danielk1977
comment:
  If compiled with memory-debugging, write garbage to memory when it is freed. Fix for #1594. (CVS 2900)


type: ci
user: drh
comment:
  Updates to the C-API documentation.  Change the parameter type of
  sqlite3_soft_heap_limit to integer. (CVS 2903)


type: ci
user: danielk1977
comment:
  Ensure the database attached as part of VACUUM can be detached successfully after a malloc() failure. (CVS 2918)


type: ci
user: drh
comment:
  Automatically deallocate thread-specific data when it is no longer
  being used.  Ticket #1601.  Also implemented the suggestion of
  ticket #1603. Memory management is now off by default at compile-time.
  The sqlite3_enable_memory_management() API has been removed. (CVS 2919)


type: ci
user: drh
comment:
  Testing of the automatic TSD deallocation logic.  The sqlite3_thread_cleanup()
  API is documented.  This should close ticket #1601. (CVS 2920)


type: ci
user: drh
comment:
  Improve performance by about 10% by avoiding excess calls to get
  the thread-specific data. (CVS 2921)


type: ci
user: drh
comment:
  About a 2.5% speed improvement by reducing the number of sqlite3ThreadData
  calls in the parser. (CVS 2924)


type: ci
user: drh
comment:
  Automatically cast BLOBs to strings prior to handing them over to
  functions like LIKE that want strings.  Ticket #1605. (CVS 2928)


type: ci
user: drh
comment:
  Add support for the TOTAL() aggregate function - works like SUM() except
  that it returns 0 instead of NULL when presented with an empty list. (CVS 2930)


type: ci
user: danielk1977
comment:
  Minor modification to restoreOrClearCursorPosition() to improve efficiency. Do not allocate the extra 8-bytes if memory-management is not enabled. (CVS 2936)


type: ci
user: drh
comment:
  Make sure the authenticator does not try to authenticate columns in
  subqueries.   Ticket #1607. (CVS 2939)


type: ci
user: danielk1977
comment:
  Fixes for OMIT_SUBQUERY builds: Disable where clause OR->IN optimization. Include EXISTS keyword (for new CREATE TABLE syntax). Test file fixes. (CVS 2943)


type: ci
user: drh
comment:
  Documentation updates.  Fix to date.c.  But most importantly: database
  connections are now allowed to change threads as long as they are not
  holding a lock. (CVS 2944)


type: ci
user: drh
comment:
  Add tests and fix bugs in the new cross-thread lock resolution code.
  When an unlock fails, do not leak file descriptors (ticket #1611).
  But we really ought to report SQLITE_MISUSE or some other error instead
  of just returning SQLITE_OK. (CVS 2945)


type: ci
user: drh
comment:
  Closing a file from the wrong thread is harmless on most systems.
  (See ticket #1611)
  But on systems like RedHat9 with broken fcntl() locks, it leaks file
  descriptors.  That is better than the alternative of prematurely breaking
  locks and causing database corruption.  Nevertheless, it would be good
  if we could figure out a way to report errors when closing a file from
  the wrong thread. (CVS 2946)


type: ci
user: danielk1977
comment:
  Correctly set the length of the string in bytes when transforming an OP_String8 to OP_String in a utf-16 vdbe program. (CVS 2949)


type: ci
user: drh
comment:
  Fix the script that cross-compiles the windows DLL so that it works
  correctly with the latest interface.  Ticket #1614.  Do not strip
  the windows DLL.  Ticket #1474. (CVS 2954)


type: ci
user: danielk1977
comment:
  Correctly handle malloc() failure in GenericMalloc() and GenericRealloc(). Fix for #1617. (CVS 2958)


type: ci
user: danielk1977
comment:
  Arrange for ThreadData to be automatically deallocated even if SQLITE_MEMDEBUG is defined. Fix for #1623. (CVS 2965)


type: ci
user: drh
comment:
  Convert the unix driver to use a recusive mutex.  Similar changes to the
  windows driver are pending. (CVS 2968)


type: ci
user: danielk1977
comment:
  Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972)


type: ci
user: drh
comment:
  Modify the sqlite3OsInMutex os-layer interface to take a single parameter
  to distinguish between mutexes held by the current thread and mutexes held
  by any thread.  Part of the fix for ticket #1630. (CVS 2973)


type: ci
user: danielk1977
comment:
  Include the ThreadData structure in internal malloc() testing. Also fixes for revealed bugs. (CVS 2974)


type: ci
user: danielk1977
comment:
  Fix a bug with internally saving cursors open on index tables. Also increase coverage of util.c and btree.c. (CVS 2976)


type: ci
user: drh
comment:
  Fix and test the processing of sqlite3_result_error() withing aggregate
  functions.  Allow errors to come from the step function (a new
  capability).  Ticket #1632. (CVS 2981)


type: ci
user: drh
comment:
  More compiler warnings fixed - or in some cases comments are added to explain
  that the compiler is wrong. (CVS 2984)


type: ci
user: drh
comment:
  Do not flatten subqueries in a join where the subquery includes a LIMIT.
  Ticket #1634.  This is just an initial fix.  Many test cases need to be
  added prior to closing the ticket. (CVS 2987)


type: ci
user: drh
comment:
  Remove vestiges of the older TSD code for handling OOM exceptions.
  Prepare for the release of 3.3.2. (CVS 2991)


type: ci
user: drh
comment:
  Work around buggy malloc() implementations that cause problems on malloc(0).
  Ticket #1572. (CVS 2996)


type: ci
user: drh
comment:
  Do not name variables "operator" because some compilers do not realize that
  "operator" is not a reserved word in ANSI-C.  Ticket #1625. (CVS 2997)


type: ci
user: danielk1977
comment:
  Add "#ifndef NDEBUG" around sqlite3pager_iswriteable() (only used in assert() expressions). Also set the internal page number of a page to zero if it fails to initialise. (CVS 3005)


type: ci
user: drh
comment:
  Bug fix in the ROWID generation logic of the VDBE.  I think this
  is a benign bug - it never causes a real fault.  But I am not certain. (CVS 3008)


type: ci
user: danielk1977
comment:
  Rename some variables to avoid hiding others. Also add "static" to two function signatures that were missing it. (CVS 3024)


type: ci
user: danielk1977
comment:
  Return code was being dropped because of overridden variable in OP_IsUnique. Fix this and the test logic problem that hid it. (CVS 3025)


type: ci
user: danielk1977
comment:
  Handle errors in saving cursor positions during a rollback by aborting all active statements. (CVS 3027)


type: ci
user: drh
comment:
  Expire all prepared statements whenever there is a change to the schema
  of the TEMP database.  Ticket #1644. (CVS 3036)


type: ci
user: drh
comment:
  Clarify that the nBytes parameter to sqlite3_prepare is always the
  number of bytes and never the number of characters.  Ticket #1646. (CVS 3039)


type: ci
user: drh
comment:
  Remove support for the non-standard ON CONFLICT clause on CREATE INDEX.
  Ticket #1486.  The ON CONFLICT clause has never worked on CREATE INDEX so
  removing it should not break anything. (CVS 3042)


type: ci
user: drh
comment:
  3rd parameter to sqlite3_prepare() should be -1 if the string length is
  unknown.  Passing in zero causes a zero-length SQL statement to be
  prepared, which is a no-op.  Ticket #1651.  This bug introduced by the
  fix for ticket #1650. (CVS 3047)


type: ci
user: drh
comment:
  Add the SQLITE_THREADS_OVERRIDE_LOCKS compile-time option that disables
  the run-time test to see if threads can override each others locks on unix. (CVS 3050)


type: ci
user: drh
comment:
  In joins of the form: "A, B left C" make sure that the reordering optimization
  does not put table A after table C.  Ticket #1652. (CVS 3052)


type: ci
user: drh
comment:
  Always register BINARY collating sequences for UTF-16BE and UTF-16LE both.
  Formerly we were only registering the native byte order by default.
  Ticket #1654.  Note:  There may still be problems with collating sequence
  synthesis. (CVS 3053)


type: ci
user: danielk1977
comment:
  Update the per-thread bytes allocated counter with the number of bytes actually allocated, not the number requested. Ticket #1660. (CVS 3056)


type: ci
user: drh
comment:
  Keep correct track of the amount of outstanding memory even when the
  system memory allocator returns a different number of bytes than
  requested.  Ticket #1660. (CVS 3057)


type: ci
user: drh
comment:
  Correctly handle COLLATE clauses in tables being modified by an
  ALTER TABLE ADD COLUMN command.  Ticket #1665. (CVS 3060)


type: ci
user: drh
comment:
  Avoid overflowing the 48-bit mantissa of a floating point number when
  summing large integers in the SUM() function.  Ticket #1664. (CVS 3061)


type: ci
user: drh
comment:
  Deprecate the sqlite3_aggregate_count() API.  Make sure all aggregate counters
  are 64 bits.  Remove unused StdDev structure from func.c.  Ticket #1669. (CVS 3065)


type: ci
user: drh
comment:
  SUM never gives an error.  An integer result is returned for exact results
  and a floating point result is returned for approximate results.
  Tickets #1664, #1669, and #1670. (CVS 3066)


type: ci
user: drh
comment:
  Allow '@' to introduce host parameter names for compatibility with
  MS SQL Server.  Ticket #1671. (CVS 3067)


type: ci
user: danielk1977
comment:
  Add a symbol P3_TRANSIENT to pass to VdbeSetColName() to make it copy the string parameter up to the first 0 byte. (CVS 3070)


type: ci
user: danielk1977
comment:
  Fix the origin APIs so that they correctly handle views and subqueries that cannot be flattened. (CVS 3072)


type: ci
user: danielk1977
comment:
  Work around the case where the pending-byte page is also a a pointer-map page. Ticket #1667. (CVS 3073)


type: ci
user: drh
comment:
  Make sure pointers are always aligned to 8-bytes when creating internal
  Index structures. (CVS 3079)


type: ci
user: drh
comment:
  Add support and documentation for the fullfsync pragma.  Also include
  some other unrelated documentation updates. (CVS 3080)


type: ci
user: drh
comment:
  I give up.  SUM() now throws an error on integer overflow.  Those of us
  who think this is goofy can use TOTAL() instead.
  Tickets #1664, #1669, #1670, #1674. (CVS 3084)


type: ci
user: drh
comment:
  Fix a deadlock problem on the sqlite3async_wait test interface.  Improvements
  to tracing in test_async.c. (CVS 3089)


type: ci
user: drh
comment:
  Add in-process file locking to test_async.c.  The unix implementation of
  sqlite3OsFullPathname() now attempts to remove /./ and /../ elements from
  the path. (CVS 3090)


type: ci
user: drh
comment:
  Fix a bug in the handling of sqlite3OsTruncate by the test_async.c demo.
  Added trans.test to the suite of tests for asychronous I/O. (CVS 3091)


type: ci
user: danielk1977
comment:
  test_async.c: Writer-thread should not relinquish mutex when writing a file for which only one file handle is open (fixes bug introduced in (3093)). (CVS 3097)


type: ci
user: drh
comment:
  Or the SQLITE_UTF16_ALIGNED with the encoding field in
  sqlite3_create_collation and UTF16 strings will always be aligned
  on an even byte boundary when passed into the comparison function. (CVS 3103)


type: ci
user: danielk1977
comment:
  Ensure temp db is open before executing a pragma like "temp.cachesize = xxx". Fix for #1682. (CVS 3104)


type: ci
user: drh
comment:
  Always generate code, even if it is a no-op, for CREATE and DROP statements
  that use the IF EXISTS or IF NOT EXISTS clause. (CVS 3106)


type: ci
user: drh
comment:
  New compile-time option SQLITE_SECURE_DELETE takes care to overwrite deleted data with zeros. (CVS 3107)


type: ci
user: drh
comment:
  Detect integer overflow in the abs() function.  The random() function
  now provides 64 bits of randomness instead of just 32.  Fix bugs in
  testing logic of test4.c. (CVS 3108)


type: ci
user: drh
comment:
  Reduce the size of a memory allocation in the windows driver to the
  minimum needed.  Ticket #1690. (CVS 3115)


type: ci
user: drh
comment:
  Allow WHERE clause terms on the left table of a LEFT OUTER JOIN to
  contain aggregate subqueries.  Ticket #1697. (CVS 3117)


type: ci
user: drh
comment:
  Ignore leading spaces on text to numeric conversions.  Ticket #1662.
  Fixes to test cases broken by the recent changes to round(). (CVS 3118)


type: ci
user: drh
comment:
  The --enable-debug option on configure enables verbose explain and vdbe_trace.
  Ticket #1680. (CVS 3120)


type: ci
user: drh
comment:
  The table_info pragma shows column affinity as "" if there is no column
  affinity.  Ticket #1570. (CVS 3122)


type: ci
user: drh
comment:
  Code changes resulting from Coverity analysis.
  http://scan.coverity.com/  Found 1 potential segfault in sqlite3_mprintf().
  Also 2 failures to fclose() following a malloc() failure.  And lots of
  cases where unnecessary conditionals could be removed from the code. (CVS 3126)


type: ci
user: drh
comment:
  Fix documentation to show the correct return type from sqlite3_db_handle().
  Ticket #1716. (CVS 3132)


type: ci
user: drh
comment:
  Set and clear the full_column_name flag using direct invocation rather than
  the execsql tcl command so that the select1 test works with the serialized
  statement extension. (CVS 3136)


type: ci
user: drh
comment:
  Make provisions in the code to support Provisions to support caching of
  serialized statements in the SSE extension. (CVS 3139)


type: ci
user: drh
comment:
  Use the pread()/pwrite() interface on Posix if compiled with -DUSE_PREAD=1.
  Note that on Linux this is slower and does not work for large files. (CVS 3147)


type: ci
user: drh
comment:
  Make sure the rootpage values in the symbol table are correctly updated
  when dropping tables and indices in autocommit mode.  Ticket #1728. (CVS 3150)


type: ci
user: drh
comment:
  Add a note to the API documentation emphasizing that the filename argument
  to sqlite3_open() must be UTF-8.  Tickets #1713, #1533. (CVS 3151)


type: ci
user: drh
comment:
  Add code to report an error on a recursive trigger, but leave it
  commented out - turning it on will likely break a lot of code. (CVS 3152)


type: ci
user: drh
comment:
  SQLite now always chooses the column names for compound selects using
  the left-most select.  This makes SQLite work like other SQL database,
  but it also is a change from historical behavior and may break some
  scripts.  Ticket #1721. (CVS 3153)


type: ci
user: drh
comment:
  Do not strip windows DLLs because this prevents them from being relocatable.
  Ticket #1474. (CVS 3160)


type: ci
user: drh
comment:
  Make sure SQLITE_NOMEM is reported out on a malloc failure in an ATTACH
  even if the malloc failure reports within a nested calls to sqlite3_prepare(). (CVS 3164)


type: ci
user: drh
comment:
  Return the correct declared column type, origin column name, origin database
  name, etc. from aggregate queries.  Ticket #1726 and #1755. (CVS 3169)


type: ci
user: drh
comment:
  Follow-up to check-in (3164).  Make sure SQLITE_NOMEM is returned after
  a memory allocation failure.  It is not sufficent to return an "out of memory"
  error message.  The return code needs to be SQLITE_NOMEM. (CVS 3172)


type: ci
user: drh
comment:
  Automatically increase the size of the pager hash table as the number
  of in-memory pages increases.  Tickets #1790 and #1799. (CVS 3180)


type: ci
user: drh
comment:
  Fix error processing in Lemon.  SQLite does not use this feature of lemon
  so it is uneffected. (CVS 3181)


type: ci
user: drh
comment:
  Correctly handle multi-column indices where multiple columns are constrained
  by IN operators with subqueries on the right-hand side.  Ticket #1807. (CVS 3184)


type: ci
user: drh
comment:
  Fix documentation typo:  The name of the competing database engine is
  "Firebird", not "Firefox". (CVS 3185)


type: ci
user: drh
comment:
  Adjust the default weights on indices so that an index that matches more
  terms of the where clause wins (by default) over one that matches fewer.
  Ticket #1808. (CVS 3186)


type: ci
user: drh
comment:
  If an sqlite3_mprintf() call uses a disallowed internal-use-only conversion
  character, then abort the call with a -1 error code.  Ticket #1818. (CVS 3187)


type: ci
user: drh
comment:
  When opening a new connection on a shared cache, be careful not to
  overwrite the encoding flag on the shared cache.  Ticket #1824. (CVS 3190)


type: ci
user: drh
comment:
  Handle NULL database names in ATTACH and DETACH as if they were empty
  strings.  Ticket #1825. (CVS 3191)


type: ci
user: drh
comment:
  Allow SQL statements to be executed from within a progress callback.
  Be warned, however, that the progress callback might be called
  recursively in this case.  It is up to the program to disable the
  progress callback to prevent recursive invocations.
  Ticket #1827. (CVS 3193)


type: ci
user: drh
comment:
  The windows driver always allows other processes to write the database file
  even if it only has read permission on the file.  This is an experimental
  checkin - we still have not determined that this change is safe.  Ticket #1803. (CVS 3196)


type: ci
user: drh
comment:
  Changes to help SQLite cope with virus scanners and other programs that
  open journal files for reading and thus prevent SQLite from deleting
  them in order to commit a transaction. (CVS 3200)


type: ci
user: drh
comment:
  In joins of the form "A left B, C" make sure they are not transformed into
  "A left C, B".  Ticket #1830.  See also #1652. (CVS 3203)


type: ci
user: drh
comment:
  New shell command ".load" and the sqlite3_load_extension() API allow
  new SQL functions and collating sequences to be loaded at run-time from
  a DLL or shared library. (CVS 3207)


type: ci
user: drh
comment:
  In the shell, make sure the database is opened before trying to do
  an ".import".  Bug reported on the mailing list. (CVS 3209)


type: ci
user: danielk1977
comment:
  Incremental work on parsing/storing and invoking the xCreate callback for virtual tables. (CVS 3212)


type: ci
user: danielk1977
comment:
  Add a simple test case (and corresponding bugfix) for the virtual table xConnect and xDisconnect methods. (CVS 3214)


type: ci
user: drh
comment:
  Added code to iterate through virtual tables.  All regression tests pass
  but the new code is completely untested. (CVS 3219)


type: ci
user: danielk1977
comment:
  Bugfixes: Fix a segfault introduced as part of the new vtab code, deallocate memory in the Destroy() method of the echo module. (CVS 3221)


type: ci
user: danielk1977
comment:
  Bugfixes: Fix a segfault introduced as part of the new vtab code, deallocate memory in the Destroy() method of the echo module. (CVS 3222)


type: ci
user: drh
comment:
  Lemon correctly recognizes an empty grammar and errors out.
  Fix for a bug reported on the sqlite-users mailing list. (CVS 3226)


type: ci
user: drh
comment:
  The echo module test is now running.  Added the tclvar module test but have
  not yet done anything with it. (CVS 3234)


type: ci
user: danielk1977
comment:
  Add code to test8.c to check that the correct idxNum value is passed to the xFilter method. (CVS 3241)


type: ci
user: danielk1977
comment:
  Add the opcode OP_VUpdate and replace the xInsert/xDelete members of sqlite3_module with xUpdate. (CVS 3242)


type: ci
user: danielk1977
comment:
  Add the opcode OP_VUpdate and replace the xInsert/xDelete members of sqlite3_module with xUpdate. (CVS 3243)


type: ci
user: drh
comment:
  Better documentation on the limits of user-defined functions.  And a
  marginally better error message when those limits are exceeded.
  Ticket #1847. (CVS 3247)


type: ci
user: drh
comment:
  Added code to INSERT, DELETE and UPDATE virtual tables.  The new code is
  mostly untested. (CVS 3248)


type: ci
user: drh
comment:
  Asserts added that verify that the code works correctly
  that ticket #1849 claims is wrong. (CVS 3254)


type: ci
user: drh
comment:
  Write database pages in sorted order to reduce file fragmentation.
  This is an experimental change.  It is not clear if it will help any.
  It may well be removed in the future. (CVS 3255)


type: ci
user: danielk1977
comment:
  Add column_value, declare_vtab and create_module to the function table used by dynamic extensions. (CVS 3256)


type: ci
user: danielk1977
comment:
  Add test_schema.c, containing a module for viewing the database schema via a virtual table. (CVS 3257)


type: ci
user: danielk1977
comment:
  Add some tests (and fixes) for virtual tables and the authorization callback. Still more to come. (CVS 3260)


type: ci
user: danielk1977
comment:
  When updating a view, invoke the authorization callback for reading the view before setting the authorization-context to the view name. (CVS 3264)


type: ci
user: danielk1977
comment:
  Add tests to ensure an INSERT/UPDATE/DELETE immediately after virtual table construction does not fail. (CVS 3270)


type: ci
user: danielk1977
comment:
  Modifications so that compilation and testing with the various OMIT macros defined works. (CVS 3276)


type: ci
user: danielk1977
comment:
  Add the table name to the arguments passed to the virtual table methods xCreate/xConnect. (CVS 3281)


type: ci
user: danielk1977
comment:
  Add the database name to the parameters passed to virtual table module xCreate and xConnect methods. (CVS 3282)


type: ci
user: danielk1977
comment:
  Modify the test cases in tkt1444.test that were failing. I am convinced that the test cases were incorrect. (CVS 3288)


type: ci
user: danielk1977
comment:
  Ensure whitespace specified as part of a virtual table constructor argument is correctly passed to the constructor function. (CVS 3290)


type: ci
user: pweilbacher
comment:
  (OS/2) Armor OS/2 against accidental deletion of files, too (patch by Daniel Kruse, verified by me) (CVS 3293)


type: ci
user: drh
comment:
  Publish APIs sqlite3_malloc() and sqlite3_realloc() that use the OS-layer
  memory allocator.  Convert sqlite3_free() and sqlite3_mprintf() to also
  use the OS-layer memory allocator. (CVS 3298)


type: ci
user: drh
comment:
  Cache and reuse virtual table index information in the optimizer.
  Improved diagnostics for virtual table index selection. (CVS 3300)


type: ci
user: drh
comment:
  Make sure that MATCH terms that a virtual table says should be omitted
  really are omitted. (CVS 3302)


type: ci
user: danielk1977
comment:
  In test code, always use sqlite3_free() instead of free() to free error messages returned by sqlite3_exec(). (CVS 3303)


type: ci
user: drh
comment:
  The ability to load extensions is turned off by default.  It must be
  enabled by calling sqlite3_enable_load_extension() before it will work.
  This prevents security problems in legacy applications.  Ticket #1863. (CVS 3311)


type: ci
user: drh
comment:
  When compiling extensions in the load_extension tests, specify a path
  for finding include files. (CVS 3313)


type: ci
user: drh
comment:
  Use the -k option to sort.  This allows the build to run on newer unix
  systems, but will likely break the build on older ones.  Please address
  your complaints to the posix committee members that thought this would
  be a good idea. (CVS 3314)


type: ci
user: drh
comment:
  Off by 1 error in check-in (3314).  Note that this change is a likely
  fix for ticket #1875.  But I have not tested it for that purpose yet. (CVS 3315)


type: ci
user: drh
comment:
  Move the sqlite3_sleep() and sqlite3_clear_bindings() interfaces into the
  main library and make this official. (CVS 3316)


type: ci
user: drh
comment:
  Allow virtual table implementations to overload function that use
  a column of the virtual table as their first argument.  Untested. (CVS 3322)


type: ci
user: drh
comment:
  For infix functions (LIKE, GLOB, REGEXP, and MATCH) treat the left
  operand as the first argument for the purposes of virtual table
  function overloading, even though the left operand is really the
  the second argument. (CVS 3324)


type: ci
user: drh
comment:
  Fix a possible NULL-pointer deference following a malloc failure.
  Error discovered by Klocwork. (CVS 3327)


type: ci
user: drh
comment:
  Prevent memory leak and possible NULL pointer deference after malloc
  failure.  Ticket #1886. (CVS 3329)


type: ci
user: drh
comment:
  By default, new databases are now created in the legacy file format - the
  format that ignores DESC on indices.  If you want descending indices, you
  must either recompile with -DSQLITE_DEFAULT_FILE_FORMAT=4 or issue
  "PRAGMA legacy_file_format=OFF" prior to creating the first table in the
  database. (CVS 3330)


type: ci
user: drh
comment:
  Initial attempt at making sqlite3_interrupt() work even when called from
  a separate thread. (CVS 3335)


type: ci
user: drh
comment:
  More work toward getting sqlite3_interrupt() to work from separate
  threads.  Ticket #1897. (CVS 3336)


type: ci
user: drh
comment:
  Add a test case to trigger an assertion fault when running
  sqlite3_prepare16() with a predefined string size. (CVS 3337)


type: ci
user: adamd
comment:
  Report any error which occurs in closing the database at exit.  Free a
  couple of strings which were leaking. (CVS 3340)


type: ci
user: drh
comment:
  Reset the schema before checking for outstanding statements inside
  sqlite3_close() so that virtual tables will be disconnected. (CVS 3341)


type: ci
user: drh
comment:
  Remove most static and global variables from a pure build.  There
  are still a number of static and global variables used for testing. (CVS 3342)


type: ci
user: drh
comment:
  Make sure sufficient memory is allocated to hold the collating sequence
  pointers for all columns of an ORDER BY clause even if the ORDER BY
  clause contains more columns than where originally in the table.
  Ticket #1911. (CVS 3344)


type: ci
user: drh
comment:
  Require whitespace or punctuation between a numeric literal and an
  identifier or keyword.  Ticket #1912. (CVS 3345)


type: ci
user: drh
comment:
  Compile in test code whenever -DSQLITE_TEST=1 is present.  Do not rely
  on -DSQLITE_DEBUG=1 because somebody might try to run the tests without it. (CVS 3349)


type: ci
user: drh
comment:
  Add vdbeaux.c to the list of files that must be compiled with -DSQLITE_TEST=1
  in order to generate testfixture.  Do not require sqlit3OsDelete() to
  succeed on a multi-database commit.  (Ticket #1917) (CVS 3351)


type: ci
user: drh
comment:
  Adjust the Makefile.in so that there are no test errors when using
  the configure script.  Ticket #1918. (CVS 3352)


type: ci
user: drh
comment:
  Change the table_info pragma to show the text of the default value expression,
  not the result of evaluating the default value expression.
  Ticket #1919. (CVS 3353)


type: ci
user: drh
comment:
  Tighten an assert (ticket #1920).  Change to "sqlite3.h" from <sqlite3.h>
  on the sqlite3ext.h header (ticket #1916).  Fix a bug in the test scripts. (CVS 3354)


type: ci
user: drh
comment:
  Fix for the (unsupported) soundex algorithm so that it conforms to Knuth.
  Ticket #1925.  Test cases added. (CVS 3358)


type: ci
user: drh
comment:
  Enhance the sqlite3_set_authorizer() callback so that it provides callbacks
  on each SQL function that is invoked. (CVS 3365)


type: ci
user: shess
comment:
  Fix gcc gripe about parens in a ||/&& in mergePosList().
  Drop unused pBlob/nBlob in index_insert_term().
  Fix NULL deref in an assertion in docListUpdate() delete case.
  Minor code tightening in docListUpdate(). (CVS 3367)


type: ci
user: shess
comment:
  Make hi-bit characters delimiters.  This is a stopgap until the tokenizer
  and fulltext.c recognize UTF-8 correctly. (CVS 3370)


type: ci
user: drh
comment:
  Improved built-in help in the command-line shell.  Enable the
  fulltext search extension in the TCL interface. (CVS 3372)


type: ci
user: drh
comment:
  Document the fact that SQLite allows NULL values in PRIMARY KEY columns
  and the fact that we might design to change this in the future.
  Ticket #518. (CVS 3373)


type: ci
user: shess
comment:
  Just don't run tolower() on hi-bit characters.  This shouldn't cause
  us to break any UTF-8 code points, unless they were already broken in
  the input. (CVS 3376)


type: ci
user: drh
comment:
  Refactor the FTS1 module so that its name is "fts1" instead of "fulltext",
  so that all symbols with external linkage begin with "sqlite3Fts1", and
  so that all filenames begin with "fts1". (CVS 3377)


type: ci
user: shess
comment:
  Make tokenizer not rely on nul-terminated text.  Instead of using
  strcspn() and a nul-terminated delimiter list, I just flagged
  delimiters in an array and wrote things inline.  Submitting this for
  review separately because it's pretty standalone. (CVS 3378)


type: ci
user: shess
comment:
  Make fts1.c not rely on nul-terminated strings.  Mostly a matter of
  making sure we always pass around ptr/len, but there were a few places
  where we actually relied on nul-termination.

  An earlier change had additionally changed appropriate
  sqlite3_bind_text() calls to sqlite3_bind_blob().  I've found that
  this changes what's actually stored in the database, so backed those
  changes out.  Also (and this is weird), I found that I could no longer
  do straight-forward = queries against %_term.term at a command-line. (CVS 3379)


type: ci
user: drh
comment:
  Remove use of the "clock" command in the test suite so that the tests
  will run in Tcl8.5.  Ticket #1445. (CVS 3380)


type: ci
user: drh
comment:
  Automatically compute the sqlite3.def and tclsqlite3.def files when
  building windows DLLs.  This will (hopefully) keep the .def files in
  perfect synchronization with the DLLs.  Ticket #1951. (CVS 3381)


type: ci
user: drh
comment:
  Test for busted TCL builds that do not support 64-bit integers and print
  a warning message to users that test failures may be a result of the bad
  TCL build and not some problem with SQLite.  Ticket #1953. (CVS 3386)


type: ci
user: drh
comment:
  Do not call the xDisconnect method on a virtual table while xUpdate is
  pending.  Instead, defer the xDisconnect until after xUpdate completes. (CVS 3387)


type: ci
user: drh
comment:
  Make sure strings returned by sqlite3_value_text() and sqlite3_value_text16()
  are always '\000'-terminated. (CVS 3391)


type: ci
user: drh
comment:
  Fix a bug in the new misc6.test script.  Fix error messages when not
  compiled with memory debugging enabled.  Ticket #1957. (CVS 3392)


type: ci
user: drh
comment:
  Improvements to the documentation of the return codes for sqlite3_step().
  Tickets #1633, #1366, #1178, #906, and probably others too. (CVS 3395)


type: ci
user: drh
comment:
  Bug fix in date/time computations.  Ticket #1964.
  Some unrelated comment typos are also fixed and got accidently
  checked in at the same time. (CVS 3396)


type: ci
user: drh
comment:
  Add HAVE_GMTIME_R and HAVE_LOCALTIME_R flags and use them if defined.
  Unable to modify the configure script to test for gmtime_r and
  localtime_r, however, because on my SuSE 10.2 system, autoconf generates
  a configure script that does not work.  Bummer.  Ticket #1906 (CVS 3397)


type: ci
user: shess
comment:
  Write doclists using a segmented technique to amortize costs better.
  New items for a term are merged with the term's segment 0 doclist,
  until that doclist exceeds CHUNK_MAX.  Then the segments are merged in
  exponential fashion, so that segment 1 contains approximately
  2*CHUNK_MAX data, segment 2 4*CHUNK_MAX, and so on. (CVS 3398)


type: ci
user: drh
comment:
  Add some simple test cases for the OR and NOT logic of the fts1 module.
  Fix lots of bugs discovered while developing these test cases. (CVS 3400)


type: ci
user: drh
comment:
  Add a new zErrMsg field to the sqlite3_vtab structure to support returning
  error messages from virtual table constructors.  This change means that
  virtual table implementations compiled as loadable extensions for version
  3.3.7 will need to be recompile for version 3.3.8 and will not be usable
  by both versions at one.  The virtual table mechanism is still considered
  experimental so we feel justified in breaking backwards compatibility
  in this way.  Additional interface changes might occurs in the future. (CVS 3401)


type: ci
user: drh
comment:
  Add pzErr parameters to the xConnect and xCreate methods of virtual tables
  in order to provide better error reporting.  This is an interface change
  for virtual tables.  Prior virtual table implementations will need to be
  modified and recompiled. (CVS 3402)


type: ci
user: drh
comment:
  Add a rudimentary tokenizer and parser to FTS1 for parsing the module
  arguments during initialization.   Recognized arguments include a
  tokenizer selector and a list of virtual table columns. (CVS 3403)


type: ci
user: shess
comment:
  Re-use deleted rowids for new segments.  This has a somewhat
  surprising impact on performance, I believe because it keeps the index
  smaller (by keeping rowids smaller), and also because it improves
  locality in the table (deleting a row means we've already touched the
  pages leading to that rowid). (CVS 3405)


type: ci
user: adamd
comment:
  Answer queries for a particular rowid in a full-text table by looking up
  that rowid directly rather than by performing a table scan. (CVS 3407)


type: ci
user: adamd
comment:
  Allow virtual tables to contain multiple full-text-indexed columns.  Added a magic column "_all" which can be used for querying all columns in a table at once.

  For now, each posting list stores position/offset information for multiple columns.  We may implement separate posting lists for separate columns at some future point. (CVS 3408)


type: ci
user: drh
comment:
  Module spec parser enhancements for FTS1.  Now able to cope with column
  names in the spec that are SQL keywords or have special characters, etc.
  Also added support for additional control lines.  Column names can be
  followed by a type specifier (which is ignored.) (CVS 3410)


type: ci
user: drh
comment:
  In FTS1: Retain the Query structure as part of the cursor.  It will be used
  laster as part of snippet generation. (CVS 3414)


type: ci
user: drh
comment:
  Remove unused malloc failure test.  (Ticket #1976)
  Also include fixes for other problems
  discovered while investigating ticket #1976. (CVS 3415)


type: ci
user: drh
comment:
  Modify the ".dump" command in the command-line shell so that it works
  with virtual tables. (CVS 3416)


type: ci
user: drh
comment:
  The FTS1 tables have a new automatic column named "offset" that returns
  a string containing byte offset information for all matching terms.
  Also added a large test case based on SQLite mailing list entries. (CVS 3417)


type: ci
user: drh
comment:
  Add support for extended result codes - additional result information
  carried in the higher bits of the integer return codes.  This must be
  enabled using the sqlite3_extended_result_code() API.  Only a few extra
  result codes are currently defined. (CVS 3422)


type: ci
user: drh
comment:
  Modify FTS1 so that the "magic" column has the same name as the virtual
  table.  Offsets are retrieved using a special "offsets" function whose
  first argument is the magic column.  Snippets will ultimately be retrieved
  in the same way. (CVS 3427)


type: ci
user: drh
ecomment:
  Convert all names to lower case before sending them to the xFindFunction
  method of a virtual table.  In FTS1, use strcmp instead of strcasecmp.
  Ticket #1981. (CVS 3428)

comment:
  Convert all names to lower case before sending them to the xFindFunction
  method of a virtual table.  In FTS1, use strcmp instead of strcasecmp.
  Ticket #1981. (CVS 3428)


type: ci
user: drh
comment:
  Convert all names to lower case before sending them to the xFindFunction
  method of a virtual table.  In FTS1, use strcmp instead of strcasecmp.
  Ticket #1981. (CVS 3429)


type: ci
user: drh
comment:
  Implementation of the snippet() function for FTS1.  Includes a few
  simple test cases but more testing is needed. (CVS 3431)


type: ci
user: drh
comment:
  Be more aggressive with the SQLITE_OMIT_VACUUM macro.  Saves about 150
  bytes of code space. (CVS 3432)


type: ci
user: adamd
comment:
  When gathering a doclist for querying, don't discard empty position lists until the end; this allows empty position lists to override non-empty lists encountered later in the gathering process.  This fixes #1982, which was caused by the fact that for all-column queries we weren't discarding empty position lists at all. (CVS 3433)


type: ci
user: adamd
comment:
  Implemented UPDATE for full-text tables.

  We handle an UPDATE to a row by performing an UPDATE on the content table and by building new position lists for each term which appears in either the old or new versions of the row.  We write these position lists all at once; this is presumably more efficient than a delete followed by an insert (which would first write empty position lists, then new position lists). (CVS 3434)


type: ci
user: drh
comment:
  Be sure to ignore PRAGMA encoding pragmas if the encoding has already been
  set for a database.  Ticket #1987.  This patch also includes some cleanup
  of the schema parser and initialization logic. (CVS 3436)


type: ci
user: drh
comment:
  Fix a bug in the handling of I/O errors introduced by the addition
  of extended error codes in check-in (3422). (CVS 3438)


type: ci
user: drh
comment:
  CVS malfunctioned on the previous check-in.  Make sure the revision to
  date.c was received.  Ticket #1991. (CVS 3444)


type: ci
user: drh
comment:
  Bug fix in the FTS1 snippet generator.  Improvements in the way the snippet
  generator handles whitespace. (CVS 3448)


type: ci
user: drh
comment:
  Fix a bug in the handling of the OR operator in FTS1.  Test cases added to
  prevent a repeat. (CVS 3450)


type: ci
user: drh
comment:
  Make sure memory does not leak when patching up column names so that
  they are unique in a join or view.  Tickets #1952 and #2002. (CVS 3451)


type: ci
user: drh
comment:
  Remove one non-working test case fromthe Porter stemmer tests and add
  an acknowledgement for the source of the test data (Martin Porter himself.) (CVS 3453)


type: ci
user: drh
comment:
  Report the error SQLITE_CORRUPT instead of SQLITE_IOERR if unable
  to rollback a hot journal that was damaged (for example) by filesystem
  corruption following a power failure. (CVS 3460)


type: ci
user: drh
comment:
  Modify the makefile(s) to know about the FTS1 module - however FTS1 is
  turned off by default.  Bump the version number to 3.3.8. (CVS 3461)


type: ci
user: drh
comment:
  Make DL_POSITION the default mode in FTS1.  Remove the need to compile
  with SQLITE_CORE when SQLITE_ENABLE_FTS1 is used. (CVS 3462)


type: ci
user: shess
comment:
  Fix incorrect doclist initialization in term_select_all().
  docListRestrictColumn() generates a DL_POSITIONS doclist, which means
  that after the first doclist is processed, the second doclist is
  initialized as DL_POSITIONS, but with DL_POSITIONS_OFFSETS data.
  (Note that DL_DEFAULT is now DL_POSITIONS, which masks this bug.) (CVS 3467)


type: ci
user: drh
comment:
  VACUUM now uses a temporary file in the official TEMP folder instead of
  a file in the same directory as the original database. (CVS 3470)


type: ci
user: shess
comment:
  Copy fts1/ to fts2/, changing reference from fts1 to fts2.  For future
  reference, the source versions copied were:

  README.txt r1.1
  fts1.c r1.37
  fts1.h r1.2
  fts1_hash.c r1.1
  fts1_hash.h r1.1
  fts1_porter.c r1.1
  fts1_tokenizer.h r1.4
  fts1_tokenizer1.c r1.6 (CVS 3471)


type: ci
user: aswift
comment:
  Bug fix: named local variable lockStyle as lockingStyle in SQLITE_ENABLE_LOCKING_STYLE block in allocateUnixFile (CVS 3473)


type: ci
user: shess
comment:
  Convert fts2 to store data in a way which allows for much faster
  updates.  Groups of documents form segments which are encoded in a
  btree layered over a table of blocks, with various tricks to make
  merges fast.  This performs 20x-25x faster than fts1 when loading the
  Enron corpus, and is only slightly slower for queries. (CVS 3474)


type: ci
user: drh
comment:
  Avoid expanding %d contained in the action of a lemon parser rule.
  Ticket #1063.  This is a fix for lemon only.  It does not effect SQLite. (CVS 3476)


type: ci
user: drh
comment:
  Make sure the names of all expressions in compound SELECT statements used
  as subqueries are correctly resolved.  Ticket #2018. (CVS 3477)


type: ci
user: drh
comment:
  Fix a problems that arise if malloc() fails while compiling SELECT
  statements within a TRIGGER. (CVS 3478)


type: ci
user: drh
comment:
  When converting UTF8 or UTF16 strings, change overlong strings and other
  illegal codes to 0xFFFD.  Ticket #2029. (CVS 3479)


type: ci
user: shess
comment:
  dup fts1 tests and edit for fts2.  fts1porter.test omitted because it
  depends on being able to poke through to %_term table. (CVS 3482)


type: ci
user: shess
comment:
  Don't store empty segments.  When inserting empty strings, the code
  was writing out a segment made up of a single leaf node containing the
  \0 header.  LeafReader assumed that leaf nodes always contained at
  least one term, so assertions would fail.

  While it would be possible to support reading and merging empty
  segments, there's no reason to do so.  While this change could have
  been done in writeZeroSegment(), I put it in leafWriterFlush() so that
  it would work right if segmentMerge() created an empty segment, which
  could happen with future changes to how deleted documents are handled. (CVS 3484)


type: ci
user: shess
comment:
  Test to force edge cases in query logic.  Basically, exercise code to
  handle lack of hits correctly. (CVS 3485)


type: ci
user: shess
comment:
  Replace the DocList and DocListReader structures.  The new structures
  distinguish reading from a static buffer from writing to a dynamic
  buffer.  This allows n-way doclist merging, and in-place merging of
  segment leaf nodes, which together cut segment merge times in half. (CVS 3486)


type: ci
user: shess
comment:
  Make memset() uses less error-prone.
  http://www.sqlite.org/cvstrac/tktview?tn=2036,35 describes some cases
  where we were passing memset() a length which was the sizeof a
  pointer, rather than the structure pointed to.  Instead, wrap this
  idiom up in CLEAR() and SCRAMBLE() macros. (CVS 3488)


type: ci
user: shess
comment:
  Empty queries should get no results.  My recent change
  ( http://www.sqlite.org/cvstrac/chngview?cn=3486 ) broke test fts2a-5.3.
  This change should make the expected result more obvious. (CVS 3489)


type: ci
user: drh
comment:
  Command-line shell enhancements.  Bail out when errors are seen in
  non-interactive mode.  Override isatty() using -interactive or -batch
  command-line options.  Report line number in error messages.
  Tickets #2009, #2045. (CVS 3490)


type: ci
user: drh
comment:
  Bring CVS output into more commonly accepted practice.  Tickets #2030, #1573.
  Add command-line options -bail and ".bail" commands.  Default behavior is
  to continue after encountering an error.  Ticket #2045. (CVS 3491)


type: ci
user: drh
comment:
  Fix the ".dump" command in the command-line shell so that it shows
  TRIGGERs and VIEWs.  Ticket #2044. (CVS 3493)


type: ci
user: drh
comment:
  Make the command-line shell ".dump" command more resilient in the face of
  database corruption. (CVS 3496)


type: ci
user: shess
comment:
  Fix a pair of memory leaks.  These were turned up by running valgrind
  memcheck with various 10k doc insert, update, delete, and query tests. (CVS 3497)


type: ci
user: drh
comment:
  Change the default prefix for temporary files so that it no longer
  contains the text "sqlite".  In this way, perhaps we will not get so
  many false bug reports such as ticket #2049, #1989, and #1841. (CVS 3498)


type: ci
user: drh
comment:
  Change the default temp file prefix to be "sqlite" spelled backwards.
  Tickets #2049 et al. (CVS 3499)


type: ci
user: drh
comment:
  Use the difference between the SQLITE_IOERR_SHORT_READ and SQLITE_IOERR_READ
  returns from sqlite3OsRead() to make decisions about what to do with the
  error. (CVS 3503)


type: ci
user: drh
comment:
  First cut at adding the sqlite3_prepare_v2() API.  Test cases added, but
  more testing would be useful.  Still need to update the documentation. (CVS 3506)


type: ci
user: aswift
comment:
  The uninitialized file descriptor from the unixFile structure is passed to sqlite3DetectLockingStyle in allocateUnixFile rather than the file descriptor passed in.  This was causing the locking detection on NFS file systems to behave somewhat randomly and the result was locks were not respected and data loss could occur. (CVS 3508)


type: ci
user: shess
comment:
  Allow backing tables to be missing on dropping fts table.  Fixes
  http://www.sqlite.org/cvstrac/tktview?tn=1992,35 . (CVS 3509)


type: ci
user: shess
comment:
  Require a minimum fanout for interior nodes.  This prevents cases
  where excessively large terms keep the tree from finding a single
  root.  A downside is that this could result in large interior nodes in
  the presence of large terms, which may be prone to fragmentation,
  though if the nodes were smaller that would translate into more levels
  in the tree, which would also have that problem. (CVS 3510)


type: ci
user: shess
comment:
  Delta-encode docids.  This is good for around 22% reduction in index
  size with DL_POSITIONS.  It improves performance about 5%-6%. (CVS 3511)


type: ci
user: shess
comment:
  Refactoring groundwork for coming work on interior nodes.  Change
  LeafWriter to use empty data buffer (instead of empty term) to detect
  an empty block.  Code to validate interior nodes.  Moderate revisions
  to leaf-node and doclist validation.  Recast leafWriterStep() in terms
  of LeafWriterStepMerge(). (CVS 3512)


type: ci
user: shess
comment:
  Store minimal terms in interior nodes.  Whenever there's a break
  between leaf nodes, instead of storing the entire leftmost term of the
  rightmost child, store only that portion of the leftmost term
  necessary to distinguish it from the rightmost term of the leftmost
  child. (CVS 3513)


type: ci
user: shess
comment:
  Delta-encode terms in interior nodes.  While experiments have shown
  that this is of marginal utility when encoding terms resulting from
  regular English text, it turns out to be very useful when encoding
  inputs with very large terms. (CVS 3520)


type: ci
user: shess
comment:
  http://www.sqlite.org/cvstrac/tktview?tn=2046

  The virtual table interface allows for a cursor to field multiple
  xFilter() calls.  For instance, if a join is done with a virtual
  table, there could be a call for each row which potentially matches.
  Unfortunately, fulltextFilter() assumes that it has a fresh cursor,
  and overwrites a prepared statement and a malloc'ed pointer, resulting
  in unfinalized statements and a memory leak.

  This change hacks the code to manually clean up offending items in
  fulltextFilter(), emphasis on "hacks", since it's a fragile fix
  insofar as future additions to fulltext_cursor could continue to have
  the problem. (CVS 3521)


type: ci
user: shess
comment:
  Test that terms longer than interior nodes work correctly.  A bug
  prior to fts2.c r1.10 meant that such large terms caused an eventual
  stack overflow. (CVS 3523)


type: ci
user: drh
comment:
  Change the table_info pragma so that it returns NULL for the default
  value if there is no default value.  Ticket #2078. (CVS 3527)


type: ci
user: drh
comment:
  Fix a bug in lemon that leads to an assertion fault given an invalid
  grammar.  The bug and this fix do not effect on SQLite.  Ticket #2107. (CVS 3528)


type: ci
user: drh
comment:
  Query optimizer enhancement: In "FROM a,b,c left join d" allow the C table
  to be reordered with A and B.  This used to be the case but the capability
  was removed by (3203) and (3052) in response to ticket #1652.  This change
  restores the capability. (CVS 3529)


type: ci
user: drh
comment:
  The query optimizer does a better job of optimizing out ORDER BY clauses
  that contain the rowid or which use indices that contain the rowid.
  Ticket #2116. (CVS 3536)


type: ci
user: drh
comment:
  Move the shared-library loading routines into the OS portability layer,
  thus enabling the os_win.c code to handle the character encoding
  confusion of win95/nt/ce.  Ticket #2023. (CVS 3541)


type: ci
user: drh
comment:
  Disable extension loading by default.  At some point we should change
  the configure script to detect the presence of dlopen() automatically
  and add the appropriate library to the link.  But that requires a
  working version of autoconf, which I do not have.  Ticket #2124. (CVS 3545)


type: ci
user: pweilbacher
comment:
  OS/2 change: add safeguard to be able to use SQLite loaded into high memory on OS/2 when compiled with GCC 3.3 or later. Currently, this is only used when building within the Mozilla source tree. (CVS 3546)


type: ci
user: drh
comment:
  Update the vtab_err test to check for -DSQLITE_MEMDEBUG=1 and skip the tests
  if missing.  Pager is more careful to clear its file size cache.  Remove
  an assert() in VDBE that might fail on a corrupt database file. (CVS 3547)


type: ci
user: drh
comment:
  Make sure that the database size cache in the pager is invalidated whenever
  the database is unlocked.  A stale value in the database size cache can
  result in database corruption on a heavily loaded system running
  autovacuum. (CVS 3548)


type: ci
user: drh
comment:
  Additional changes in the pager and os interface layers to fix problems that
  might be contributing to recently observed database corruption. (CVS 3549)


type: ci
user: drh
comment:
  Clean up memory leaks and uninitialized variables detected by valgrind.
  Identify all tests where we deliberately derefence freed memory by adding
  a "-misuse" tag. (CVS 3550)


type: ci
user: drh
comment:
  Increase the version number to 3.3.9.  Documentation changes prior to the
  release of version 3.3.9. (CVS 3556)


type: ci
user: drh
comment:
  Fix the user_version and schema_version pragmas so that they set a result
  column name.  Ticket #2143. (CVS 3560)


type: ci
user: drh
comment:
  In the btree.c, when releasing the page1 lock, first make sure the
  pager has not reset and released the lock already.  This fixes a bug
  introduced by (3549). (CVS 3563)


type: ci
user: drh
comment:
  Fix a round-off error in the %W and %j conversions of the strftime() function.
  Ticket #2150. (CVS 3570)


type: ci
user: drh
comment:
  Add the $(BEXE) suffix to every mention of "lemon" in the Makefile.in,
  so that the build will work on OS/2.  Ticket #2149. (CVS 3571)


type: ci
user: drh
comment:
  Fix a critical bug in sqlite3_prepare_v2 that can lead to segfaults when
  the schema changes and the statement is recompiled automatically.
  Ticket #2154. (CVS 3576)


type: ci
user: drh
comment:
  When an automatic re-prepare occurs, take care not to reset the internal
  schema symbol table.  Ticket #2156.  This change also includes some debugging
  enhancements. (CVS 3578)


type: ci
user: drh
comment:
  Do not use the symbol "interrupt" since that is a reserved word in
  OpenWatcom.  Ticket #2159. (CVS 3579)


type: ci
user: drh
comment:
  Updates tests and documentation to justify the behavior observed in
  ticket #2158.  No changes to code. (CVS 3580)


type: ci
user: drh
comment:
  Documentation and tests to show that the cause of a parsing error is
  available on sqlite3_errmsg after sqlite3_step return SQLITE_SCHEMA. (CVS 3581)


type: ci
user: drh
comment:
  Work around win2k problems so that single-character filenames can be
  used.  Ticket #2151. (CVS 3582)


type: ci
user: drh
comment:
  Documentation updates prior to version 3.3.10.  Among the changes is a
  fix for ticket #2148 (CVS 3584)


type: ci
user: drh
comment:
  Fix a bug in lemon.  The code in which the error appears might well be
  unreachable.  The changes does not effect the code that is generated for
  the SQLite parser.  Ticket #2164. (CVS 3591)


type: ci
user: drh
comment:
  Fix a bug in sqlite3_prepare_v2() introduced by checkin (3578) and reported
  on the mailing list. (CVS 3592)


type: ci
user: drh
comment:
  Make sure the parser generated by lemon always calls destructors on
  unused symbols, even if there is no action following the rule.
  Ticket #2171. (CVS 3593)


type: ci
user: drh
comment:
  Additional memory initialization in lemon - bug reported from wireshark.
  Ticket #2172.  Note this problem only comes up with certain grammars,
  and does not impact SQLite.  On the other hand, it might cause SQLite
  to run slower.  So we might want to revisit this change at some point. (CVS 3594)


type: ci
user: drh
comment:
  Make sure the IS NULL optimization introduced by check-in (3494) correctly
  handles a LEFT JOIN where the a term from the right table of the join uses
  an IS NULL constraint.  Ticket #2177.  This check-in also adds the new test
  cases that were suppose to have been added with (3494) but which were
  mistakenly omitted. (CVS 3595)


type: ci
user: shess
comment:
  http://www.sqlite.org/cvstrac/tktview?tn=2166,35

  Calling UPDATE against an fts table in a UTF-16 database inserts
  corrupted data into the database.  The UTF-8 data is being inserted
  directly.  This appears to happen because sqlite3_ value_text()
  destructively coerces a value to UTF-8, and it's never converted back
  when updating the table. This works around the problem by rearranging
  things so that the update happens before the coercion. (CVS 3596)


type: ci
user: drh
comment:
  Fix an additional problem with the IS NULL optimization on LEFT JOINs.
  Ticket #2189.  See also ticket #2177. (CVS 3602)


type: ci
user: drh
comment:
  Work around issues with certain C++ compilers by adding a typedef
  to sqlite3.h.  Ticket #2191. (CVS 3603)


type: ci
user: drh
comment:
  Make sure the loadext.c module works even if all SQLITE_OMIT macros are
  defined.  Tickets #2184 and #2069. (CVS 3604)


type: ci
user: drh
comment:
  Fix a (harmless) assertion fault on nested views where the inner views
  are compound selects.  Ticket #2192. (CVS 3605)


type: ci
user: drh
comment:
  Add code to select.c for printing the contents of parse-tree structures.
  The code is normally omitted.  You must compile with -DSQLITE_TEST
  or -DSQLITE_DEBUG to enable it. (CVS 3606)


type: ci
user: drh
comment:
  Fix prototypes for the parser.  Syntactic change only - no effect on
  object code.  Ticket #2193. (CVS 3607)


type: ci
user: drh
comment:
  Limit the number of errors returned by PRAGMA integrity_check to 100 by
  default.  Specify an alternative limit using an argument to the pragma.
  Ticket #2176. (CVS 3609)


type: ci
user: drh
comment:
  Parser changes to allow parenthesized numerical arguments to pragmas,
  in support of the integrity_check enhancement of check-in (3609)
  and ticket #2176. (CVS 3610)


type: ci
user: pweilbacher
comment:
  Adapt returns of the os2Read() function to those of other platforms using checkin (3549) to prevent possible corruption (CVS 3617)


type: ci
user: aswift
comment:
  Fixed incorrect typecast for flock structure ptr in fcntl() call in sqlite3TestLockingStyle()
  Restored previous fullfsync behavior, try fsync() if fcntl(fd, F_FULLFSYNC, 0) returns an error. (CVS 3621)


type: ci
user: drh
comment:
  Allow up to 64 tables in a join (the number of bits in a long long int).
  The old limit was 32 tables. (CVS 3622)


type: ci
user: drh
comment:
  First cut at adding the COLLATE operator.  Regression tests pass (or at least
  the quick set does) and a few new tests have been added.  But many more
  tests are needed.  Rules for combining collations need to be worked out. (CVS 3624)


type: ci
user: drh
comment:
  Minor tweaks to collating sequences.  We'll hold of making major changes
  until 3.4.0, since we'll likely end up with some minor technical
  imcompatibilities. (CVS 3626)


type: ci
user: danielk1977
comment:
  Set the MEM_Term flag when an internal string has a nul-terminator appended to it. Fix for #2213. (CVS 3627)


type: ci
user: drh
comment:
  When optimizing out an ORDER BY clause due to uniqueness constraints, make
  sure unused terms to the right in the ORDER BY clause to not reference other
  tables in a join.  Ticket #2211.  Additional test cases needed before
  closing this ticket. (CVS 3629)


type: ci
user: shess
comment:
  http://www.sqlite.org/cvstrac/tktview?tn=2219

  When creating fts tables in an attached database, the backing tables
  are created in database 'main'.  This change propagates the
  appropriate database name to the routines which build sql statements.

  Note that I propagate the database name and table name separately.  I
  briefly considered just making the table name be "db.table", but it
  didn't fit so well in the model used to store the table name and other
  information, and having the db name passed separately seemed a bit
  more transparent. (CVS 3631)


type: ci
user: drh
comment:
  Change the coding of PRAGMA count_changes so that it uses memory cells
  of the VM rather than the stack, to avoid problems with leftovers on the
  stack interfering with other operations.  Ticket #2217. (CVS 3632)


type: ci
user: drh
comment:
  Explicit collations always override implicit collations.  This is
  backwards compatible since SQLite has not previously supported
  explicit collations. Need to add tests of this new behavior. (CVS 3633)


type: ci
user: drh
comment:
  Explanation of the "fragmentation" line is added to the help message at
  the end of the output of sqlite3_analyzer. (CVS 3636)


type: ci
user: drh
comment:
  Expand the cursor index in SrcList_item to 32-bits to accomodate really
  huge VDBE programs resulting from deeply nested triggers.  This is an
  interim fix until we rework triggers to use subroutines. (CVS 3640)


type: ci
user: drh
comment:
  Add a new algorithm for handling INSERT which reduces fragmentation on
  a VACUUM.  Ticket #2075.  More testing needed. (CVS 3643)


type: ci
user: danielk1977
comment:
  Use OP_VColumn instead of OP_Column when querying virtual tables for values to save in aggregate context records. #2230. (CVS 3644)


type: ci
user: drh
comment:
  In the corrupt2.test script,
  change uses of (open ... a) to (open ... RDWR) to work around
  inconsistencies in behavior across various platforms. (CVS 3645)


type: ci
user: vapier
comment:
  punt custom handling of cross-compile logic and move towards the standard autotool way of things (CVS 3647)


type: ci
user: drh
comment:
  Enhance the documentation to clarify that SQLite is not reentrant through
  the authorization callback function.  Ticket #2242. (CVS 3650)


type: ci
user: danielk1977
comment:
  Fix for an UPDATE on a virtual table when the WHERE clause matches zero rows.
  Ticket #2244. (CVS 3652)


type: ci
user: drh
comment:
  Make the depth of the pushdown automaton stack generated by lemon
  changable at compile-time using -DYYSTACKDEPTH=<number>. (CVS 3654)


type: ci
user: drh
comment:
  Clarify the documentation on how comparisons occur in an IN operator.
  Fix the comparison operators when both sides of an IN operator are
  expressions (ticket #2248).
  Changes to main.mk for adding FTS2 into the standard build also
  got mixed in with this check-in by mistake. (CVS 3656)


type: ci
user: drh
comment:
  Disable the OR optimization if it would conflict with column
  affinity coercions.  Ticket #2249.  Additional cleanup and testing
  of the OR optimization. (CVS 3658)


type: ci
user: drh
comment:
  Make sure that integer values are converted to real when pulled from
  a REAL table column by GROUP BY.  Ticket #2251.  Also make sure default
  values are correctly expanded.  There may be other places in the code
  where this issue comes up - we need to look further. (CVS 3659)


type: ci
user: drh
comment:
  Make sure the INSERT xfer optimization does not trigger if the CHECK
  constraints on the two tables are not identical.  Ticket #2252. (CVS 3660)


type: ci
user: drh
comment:
  Additional tests and some improvements to the INSERT transfer
  optimization.  More testing is needed. (CVS 3661)


type: ci
user: drh
comment:
  Add the undocumented and experimental I/O tracing interface.  This
  interface is likely to change and may be completely abandoned in the
  near future. (CVS 3665)


type: ci
user: drh
comment:
  Work around incompatibilities in the windows printf() routine within the
  new I/O tracing logic. (CVS 3666)


type: ci
user: danielk1977
comment:
  Handle the case where the estimated cost of a virtual table scan is larger than SQLITE_BIG_DBL. Ticket #2253. (CVS 3670)


type: ci
user: drh
comment:
  Changes to the btree and pager that reduce the amount of I/O when dealing
  with the freelist.  (1) Avoid journaling pages of a table that is being
  deleted.  (2) Do not read the original content of pages being pulled off
  of the freelist. (CVS 3671)


type: ci
user: drh
comment:
  Do not read the last page of a overflow chain when deleting that chain.
  Just add the page to the freelist.  This reduces I/O. (CVS 3672)


type: ci
user: drh
comment:
  Change the documentation to be more specific about the restriction on
  the use of keywords.  Ticket #2264. (CVS 3676)


type: ci
user: danielk1977
comment:
  Add a few "class" attributes to the html generated by lang.tcl to support conversion to pdf. (CVS 3677)


type: ci
user: drh
comment:
  Updates to the copyright.html page to address concerns some users have
  SQLite have about copyright issues.  A links to the wikipedia article
  on public domain and a public domain icon. (CVS 3679)


type: ci
user: drh
comment:
  Enhanced temp-file security under unix.  There are no known attacks against
  prior versions - this check-in is just an added precaution. (CVS 3687)


type: ci
user: drh
comment:
  Fix the pager so that it handles persistent I/O errors correctly.
  Update the testing infrastructure so that it tests for persistent
  I/O errors instead of just transient errors. (CVS 3690)


type: ci
user: danielk1977
comment:
  Check for multiple calls to sqlite3FailedMalloc(). Ignore the second and subsequent calls. (CVS 3691)


type: ci
user: shess
comment:
  Out-of-memory cleanup in tokenizers.  Handle NULL return from
  malloc/calloc/realloc appropriately, and use sizeof(var) instead of
  sizeof(type) to make certain that we don't get a mismatch between
  them as the code rots. (CVS 3693)


type: ci
user: drh
comment:
  First cut at an implementation of the REPLACE() function.  We might yet
  make this a compile-time option or move it into a separate source file. (CVS 3697)


type: ci
user: danielk1977
comment:
  Add new OS file method to return the sector-size of the underlying storage: sqlite3OsSectorSize() (CVS 3700)


type: ci
user: danielk1977
comment:
  Fix some problems with test cases in shared_err.test. Also a real bug causing a segfault after an IO error in pager.c. (CVS 3703)


type: ci
user: danielk1977
comment:
  Modify the interface to the pager sub-system in preparation for performing IO in blocks based on sector-size, not database page-size. (CVS 3705)


type: ci
user: shess
comment:
  Refactor PLWriter in preparation for buffered-document change.
  Currently, PLWriter (Position List Writer) creates a locally-owned
  DataBuffer to write into.  This is necessary to support doclist
  collection during tokenization, where there is no obvious buffer to
  write output to, but is not necessary for the other users of PLWriter.
   This change adds a DLCollector (Doc List Collector) structure to
  handle the tokenization case.

  Also fix a potential memory leak in writeZeroSegment().  In case of
  error from leafWriterStep(), the DataBuffer dl was being leaked. (CVS 3706)


type: ci
user: shess
comment:
  Refactor PLWriter to remove owned buffer.  DLCollector (Document List
  Collector) now handles the case where PLWriter (Position List Writer)
  needed a local buffer.  Change to using the associated DLWriter
  (Document List Writer) buffer, which reduces the number of memory
  copies needed in doclist processing, and brings PLWriter operation in
  line with DLWriter operation. (CVS 3707)


type: ci
user: danielk1977
comment:
  Call sqlite3_free() instead of free() to release a buffer allocated by sqlite3_vmprintf() in test_async.c (test suite bug only). (CVS 3708)


type: ci
user: drh
comment:
  In os_unix.c, make a distinction between pread() and pread64().  Add a new
  compile-time macro USE_PREAD64 to select the latter. (CVS 3709)


type: ci
user: danielk1977
comment:
  Discard the contents of the pager-cache only when the change-counter indicates that it is stale. (CVS 3711)


type: ci
user: drh
comment:
  Add the sqlite3_prepare_v2 and sqlite3_prepare16_v2 APIs to the loadable
  extension interface. (CVS 3713)


type: ci
user: drh
comment:
  Avoid unnecessary calls to pager_unwritelock() when in exclusive-access mode.
  Add the speed2.test script to the test suite. (CVS 3718)


type: ci
user: drh
comment:
  Modify sources to that they can be combined into a single sqlite3.c source
  file.  Eliminate all type-pruned pointer warnings. (CVS 3722)


type: ci
user: drh
comment:
  Get the -DSQLITE_OMIT_XFER_OPT option working.  Run speed tests on a full
  regression.  Add the script for generating sqlite3.c. (CVS 3723)


type: ci
user: drh
comment:
  Get the -DSQLITE_OMIT_XFER_OPT option working.  Run speed tests on a full
  regression.  Add the script for generating sqlite3.c. (CVS 3724)


type: ci
user: drh
comment:
  More strict aliasing fixes.  The single source file library now runs
  successfully with -fstrict-alias. (CVS 3725)


type: ci
user: drh
comment:
  The -DSQLITE_OMIT_ATTACH=1 option now omits both the ATTACH and VACUUM
  commands. Ticket #2268.
   The regression test suite depends on both of these commands
  and will not run if compiled with this option. (CVS 3727)


type: ci
user: danielk1977
comment:
  Test handling of IO errors that occur in OsDelete() or OsTruncate() operations. Also use an anonymous file for temporary storage during a VACUUM. (CVS 3729)


type: ci
user: drh
comment:
  The SQLITE_ENABLE_LOAD_EXTENSION macro enables the load_extension() SQL
  function by default without having to invoke sqlite3_enable_load_extension()
  first. (CVS 3732)


type: ci
user: drh
comment:
  Correctly handle NULLs in IN operators.  Ticket #2273.
  The changes in where.c and in the WhereLevel.aInLoop structure are
  not strictly necessary to fix this problem - they just make the code
  easier to read.  Only the change in OP_Next/OP_Prev operator of vdbe.c
  is required. (CVS 3735)


type: ci
user: drh
comment:
  Lemon change: compile the resulting parser with -DYYSTACKDEPTH=0 or set
  the "%stack_size" parameter to 0 in the grammar and the parser stack
  will be dynamically allocated using realloc() and free().  The default
  behavior is to have a finite depth stack. (CVS 3738)


type: ci
user: drh
comment:
  Bias the b-tree binary search toward the high end.  The common case is to
  append data and this heuristic makes append run much faster because there
  are fewer comparisons. (CVS 3740)


type: ci
user: drh
comment:
  Change BtreeMoveto so that it can be biased to the right or to the center.
  Use a right bias when appending and a center bias when searching.  This
  gives about a 15% reduction in calls to sqlite3VdbeRecordCompare. (CVS 3741)


type: ci
user: shess
comment:
  Don't call ctype functions on hi-bit chars.  Some platforms raise
  assertions when this occurs, and it's almost certainly not the right
  thing to do in the first place. (CVS 3746)


type: ci
user: danielk1977
comment:
  Avoid calling OsDelete() on journal files when they are opened for temporary databases. Fix for #2255. (CVS 3748)


type: ci
user: drh
comment:
  Change the name of PAGER_SECTOR_SIZE to SQLITE_DEFAULT_SECTOR_SIZE.  Make
  the new OS-layer interface routine for finding sector size optional. (CVS 3750)


type: ci
user: shess
comment:
  Buffer updates per-transaction rather than per-update.  If lots of
  updates happen within a single transaction, there was a lot of wasted
  encode/decode overhead due to segment merges.  This code buffers
  updates in memory and writes out larger level-0 segments.  It only
  works when documents are presented in ascending order by docid.
  Comparing a test set running 100 documents per transaction, the total
  runtime is cut almost in half. (CVS 3751)


type: ci
user: drh
comment:
  Assume any return code from fcntl() other than -1 is success.  Formerly we
  only assumed that 0 was success.  Ticket #2173. (CVS 3754)


type: ci
user: drh
comment:
  Remove the anonymous union from the sqlite3_value structure since some
  compilers are unable to deal with it. (CVS 3758)


type: ci
user: drh
comment:
  Move the sqlite3_temp_directory global variable out of the OS porting layer
  and into main.c so that it is more accessible to non-standard OS porting
  layers. (CVS 3759)


type: ci
user: drh
comment:
  Avoid using the "clock" command in test scripts since it is a proc in Tcl8.5
  and is thus not available to testfixture. (CVS 3760)


type: ci
user: drh
comment:
  Make yypMinor available to the stack overflow callbacks in lemon
  generated parsers.  This does not effect SQLite. (CVS 3761)


type: ci
user: drh
comment:
  Refactoring the btree and pager routines into distinct two-phase commit
  routines.  We've always done a two-phase commit - this change is just
  making that more apparent in the code. (CVS 3762)


type: ci
user: drh
comment:
  Always enable exclusive access mode for TEMP databases.  This cannot be
  changed.  The locking_mode pragma has not effect on the TEMP database. (CVS 3766)


type: ci
user: drh
comment:
  Remove asserts on the existing of journal files in pager - asserts that
  are not valid for certain kinds of simulated I/O errors or for async I/O. (CVS 3769)


type: ci
user: drh
comment:
  Fix a memory leak in multi-database commit.  Also enhance a comment that
  explains why a particular valgrind error is harmless. (CVS 3771)


type: ci
user: drh
comment:
  Fix a large memory leak in the btree layer
  that occurs following an I/O error when in shared cache mode. (CVS 3776)


type: ci
user: drh
comment:
  Fix a long-standing memory leak in the hash table.  The leak only appears
  following a malloc failure of a hash that copies its keys, which rarely
  happens and so we have not previously noticed it. (CVS 3777)


type: ci
user: drh
comment:
  The XFER optimization works if the target table lacks an integer primary
  key and is not empty as long as it has no indices.  It always has and
  continues to work if the target table was empty. (CVS 3779)


type: ci
user: drh
comment:
  Increase test coverage by statically defining SQLITE_BIGENDIAN and related
  macros for ix86 platforms.  Still a run-time test for other architectures.
  Need to add additional cases to cover other popular processors. (CVS 3781)


type: ci
user: danielk1977
comment:
  Fix a resource leak introduced by the change-counter optimisation. Also add some test coverage. (CVS 3790)


type: ci
user: drh
comment:
  If an IO error is encountered on a commit, close the journal so that it
  persists and can (hopefully) rollback the failed transaction later. (CVS 3792)


type: ci
user: drh
comment:
  In the amalgamation, put date.c before os.c so that the time_t typedef
  can be correctly resolved by windows compilers. (CVS 3793)


type: ci
user: drh
comment:
  If preprocessor macro OS_OTHER is defined, then ignore OS_UNIX, OS_WIN, and
  OS_OS2.  This makes it easier to add proprietary backends.. (CVS 3801)


type: ci
user: danielk1977
comment:
  Add Tcl (flush) commands to exclusive2.test, which is failing on some systems but not others. (CVS 3806)


type: ci
user: danielk1977
comment:
  Zero cached pages located beyond the end of the file before returning them. Ticket #2285. (CVS 3808)


type: ci
user: danielk1977
comment:
  Always truncate the pager cache when truncating the database file. Also reorganize the code to check the change-counter after first obtaining a shared lock. (CVS 3814)


type: ci
user: drh
comment:
  New testfixture command: sqlite3_pager_refcounts.  Returns a list of
  integers which is the pager refcount for each pager in the database. (CVS 3815)


type: ci
user: drh
comment:
  Fix the amalgamation so that it works with -DSQLITE_ENABLE_REDEF_IO.  Change
  tclsqlite.c so that it can be appended to the amalgamation.  Create a new
  amalgamation of header files for use by projects that want to redefine their
  own I/O interface using -DSQLITE_ENABLE_REDEF_IO. (CVS 3817)


type: ci
user: drh
comment:
  Make sure the sqlite3BtreePrevious() routine terminates properly if the
  table is deleted out from under it.  Ticket #2286.  This bug was discovered
  while trying to increase test coverage from 98.5% to 99% - once again
  showing the value of full coverage testing. (CVS 3818)


type: ci
user: drh
comment:
  The FOR EACH STATEMENT clause in a trigger is now a syntax error.  It used
  to be silently ignored.  STATEMENT is no longer a keyword. (CVS 3821)


type: ci
user: drh
comment:
  Binary file I/O infrastructure added and used to increase test coverage
  for detection of corrupt database files. (CVS 3822)


type: ci
user: danielk1977
comment:
  For filesystem databases, do not store a list of pages in the statement journal in main memory. (CVS 3825)


type: ci
user: danielk1977
comment:
  Have the pager call xReiniter() instead of xDestructor() to restore btree level state after rolling back a page. (CVS 3828)


type: ci
user: shess
comment:
  Fix crash in delete when existing row has null fields.  Previous code
  assumed that the row had values in all columns, sigh.  Fixes bug
  http://www.sqlite.org/cvstrac/tktview?tn=2289 . (CVS 3833)


type: ci
user: drh
comment:
  Be careful not to use the result of sqlite3_value_blob() after changing
  the representation of an object.  Ticket #2290. (CVS 3834)


type: ci
user: drh
comment:
  Preliminary fix for ticket #2291.  This fixes the immediate problem.  But
  we really need to write more tests for the xfer optimization in order to
  look for other related problems before closing this ticket. (CVS 3835)


type: ci
user: drh
comment:
  Blind check-in of changes to fix #2294 - I have no ability to test.
  Gentle wince users: please test this change and if it works leave a remark
  on the #2294 ticket.  Tnx. (CVS 3836)


type: ci
user: drh
comment:
  Get the column affinities right when processing an IN operator where
  the right-hand side is a subquery with an ORDER BY clause.  Ticket #2295.
  This bug has likely been present since version 3.0.0 and it has just now
  been noticed, so it seems to be a obscure case. (CVS 3837)


type: ci
user: drh
comment:
  Fix multiple performance regressions (ticket #2298 among them)
  and add tests to make sure they do not come back. (CVS 3839)


type: ci
user: drh
comment:
  Match ORDER BY terms to columns using names in compound queries.  Make sure
  this works for subqueries, especially in the right-hand side of an IN
  operator. Ticket #2296. (CVS 3842)


type: ci
user: drh
comment:
  Update the whentouse.html document to mention that less bitmap memory
  is used for larger page sizes. (CVS 3843)


type: ci
user: drh
comment:
  Detect database file changes using a 128-bit segment of the file header
  that includes the change counter.  Ticket #2303. (CVS 3844)


type: ci
user: danielk1977
comment:
  Ensure sqlite3_finalize() can be called from within the xDisconnect() method of virtual tables. (CVS 3845)


type: ci
user: drh
comment:
  Make it clear in the docs that virtual tables and shared cache do not
  play well together. (CVS 3846)


type: ci
user: danielk1977
comment:
  Avoid reloading the db schema after a failed OP_VerifyCookie if the in-memory schema cookie already matches the database file. (CVS 3849)


type: ci
user: drh
comment:
  The sqlite3_step() routine reports SQLITE_ERROR after a commit failure,
  not SQLITE_DONE.  This fix only effects the legacy sqlite3_prepare()
  interface.  It already worked correctly with sqlite3_prepare_v2(). (CVS 3854)


type: ci
user: drh
comment:
  Fix a && where & was intended.  This is a real problem, but it would be
  very difficult to devise a test case where it might lead to an unexpected
  result.  Ticket #2306. (CVS 3856)


type: ci
user: danielk1977
comment:
  Fix a bug whereby sqlite3_prepare_v2() could return both an out-of-memory error and a valid statement handle. (CVS 3858)


type: ci
user: danielk1977
comment:
  Better fix than (3860) for the same problem. (3860) could leave file-handles open in some circumstances. (CVS 3861)


type: ci
user: shess
comment:
  Fix bug in fts2 handling of OR queries.  When one doclist ends before
  the other, the code potentially tries to read past the end of the
  doclist.  http://www.sqlite.org/cvstrac/tktview?tn=2309 (CVS 3862)


type: ci
user: drh
comment:
  Remove the ARRAYSIZE macro from where.c to avoid a name conflict with
  microsoft header files.  Ticket #2311 (CVS 3863)


type: ci
user: drh
comment:
  When the write_version flag in the database header is larger than what
  the library understands, make the database read-only.  The old behavior
  was to make the database unreadable. (CVS 3866)


type: ci
user: drh
comment:
  This fixes a missed case in check-in (3866).  Do not apply patch (3866)
  without also applying this patch. (CVS 3867)


type: ci
user: drh
comment:
  Disable tests in misc7 that do not work on windows due to limitations of
  the windows file system. (CVS 3873)


type: ci
user: drh
comment:
  Fix segfaults that can occur if a malloc failure happens just before
  a built-in function calls sqlite3_value_text(). (CVS 3874)


type: ci
user: drh
comment:
  In the pager, load the content of pages which were initialized with
  noContent==1 if they are subsequently requested with noContent==0. (CVS 3875)


type: ci
user: drh
comment:
  The replace() function should return NULL if the second argument is an
  empty string.  Ticket #2324. (CVS 3877)


type: ci
user: danielk1977
comment:
  Modifications to btree integrity check so that it can be run inside a transaction after an incr vacuum. (CVS 3878)


type: ci
user: drh
comment:
  Make sure sqlite3_value_bytes() does not reformat the content after a
  call to sqlite3_value_blob().  Add documentation to explain this hazard.
  Add many new tests.  Ticket #2321. (CVS 3880)


type: ci
user: shess
comment:
  Refactor fts2 loadSegmentLeaf() in preparation for prefix-searching.
  Prefix-searching will want to accumulate data across multiple leaves
  in the segment, using LeavesReader instead of LeafReader is the first
  step in that direction. (CVS 3881)


type: ci
user: shess
comment:
  Lift code to traverse interior nodes out of loadSegment().
  Refactoring towards prefix searching. (CVS 3882)


type: ci
user: shess
comment:
  Break interior-node and leaf-node readers apart in loadSegment().
  Previously, the code looped until the block was a leaf node as
  indicated by a leading NUL.  Now the code loops until it finds a block
  in the range of leaf nodes for this segment, then reads it using
  LeavesReader.  This will make it easier to traverse a range of leaves
  when doing a prefix search. (CVS 3884)


type: ci
user: shess
comment:
  Lift docListMerge() call out of loadSegmentLeavesInt() for prefix
  search.  Doclists from multiple prefix matches will need a union merge
  function, which will have to logically happen across a segment before
  doclists are merged between segments. (CVS 3887)


type: ci
user: drh
comment:
  Fix a potential segfault following a malloc() failure during a call
  to sqlite3_prepare() where the nBytes parameter is positive but less than
  the length of the input SQL string. (CVS 3888)


type: ci
user: shess
comment:
  Propagate prefix flag through implementation of doclist query code.
  Also implement correct prefix-handling for traversal of interior nodes
  of segment tree.  A given prefix can span multiple children of an
  interior node, and from there the branches need to be followed in
  parallel. (CVS 3889)


type: ci
user: drh
comment:
  The pager takes the sector size to be the larger of the sector size
  reported by sqlite3OsSectorSize() and the page size. (CVS 3890)


type: ci
user: shess
comment:
  Modify loadSegmentLeavesInt() to correctly handle prefix searching.
  The new function docListUnion() is used to accumulate a union of the
  hits for the matching terms, which will be merged across segments
  using docListMerge(). (CVS 3891)


type: ci
user: shess
comment:
  Enable prefix-search in query-parsing and snippet generation.  If the
  character immediately after the end of a term is '*', that term is
  marked for prefix matching.  Modify term comparison in
  snippetOffsetsOfColumn() to respect isPrefix.  fts2n.test runs prefix
  searching through some obvious test cases. (CVS 3893)


type: ci
user: drh
comment:
  Add support for zero-blobs to the OP_MakeRecord opcode.
  First test cases of zeroblob functionality. (CVS 3897)


type: ci
user: drh
comment:
  Allow CREATE TABLE to occur while other queries are running.  DROP TABLE is
  still prohibited, however, since we do not want to delete a table out
  from under an running query. (CVS 3902)


type: ci
user: drh
comment:
  Use memmove() instead of memcpy() when moving between memory regions that
  might overlap.  Ticket #2334. (CVS 3905)


type: ci
user: danielk1977
comment:
  Fix a bug where accessPayload() was calling PagerWrite() on the wrong page handle. Ticket #2332. (CVS 3906)


type: ci
user: drh
comment:
  Improvements to I/O tracing output.  Require -DSQLITE_ENABLE_IOTRACE when
  compiling shell.c in order to link in the I/O tracing capability. (CVS 3909)


type: ci
user: drh
comment:
  Add compile-time option -DSQLITE_MIXED_ENDIAN_64BIT_FLOAT=1 that uses
  mixed-endian doubles.  This is needed on ARM7 to make database file
  formats compatible with all other processors.  Tickets #2278 and #2335. (CVS 3913)


type: ci
user: danielk1977
comment:
  Test cases and corrections to IO and malloc() error handling in incremental blob IO functions. (CVS 3915)


type: ci
user: drh
comment:
  Eliminate all uses of sprintf() and strcpy().  These were not being
  misused.  But getting rid of them removes a library dependency.  And
  it avoids warnings from the OpenBSD compiler.  Ticket #2336. (CVS 3916)


type: ci
user: drh
comment:
  Make "incremental" a fallback token so that you can set
  "auto_vacuum=incremental"
  without having to quote the "incremental". (CVS 3917)


type: ci
user: drh
comment:
  Optional parameter in the INCREMENTAL VACUUM statement specifies how many
  pages to vacuum from the database. (CVS 3919)


type: ci
user: drh
comment:
  Change incremental vacuum to be triggered by a pragma rather than a command.
  We have a lot to learn about this yet and we do not want to paint ourselves
  into a corner by commiting to specific syntax too early. (CVS 3921)


type: ci
user: drh
ecomment:
  Refactoring.  Split btreeInt.h off from btree.c.  Split malloc.c off from
  util.c.  Expect much more to follow. (CVS 3925)

comment:
  Refactoring.  Split btreeInt.h off from btree.c.  Split malloc.c off from
  util.c.  Expect much more to follow. (CVS 3925)


type: ci
user: drh
comment:
  Refactoring.  Split btreeInt.h off from btree.c.  Split malloc.c off from
  util.c.  Expect much more to follow. (CVS 3926)


type: ci
user: drh
comment:
  Do not flatten subqueries that are part of a compound SELECT and which
  have both an ORDER BY and a LIMIT clause.  Ticket #2339. (CVS 3932)


type: ci
user: drh
comment:
  Change sqlite3_snprintf() so that it does not write a zero-terminator if
  the buffer size argument is less than 1.  Ticket #2341.  Added documentation
  about the sqlite3_snprintf() function. (CVS 3935)


type: ci
user: danielk1977
comment:
  Change the name of create_collation_x() to create_collation_v2(). Also add some tests for it. (CVS 3938)


type: ci
user: drh
comment:
  Begin implementing a new system of upper bounds on the capabilities
  of SQLite.  By clearly defining the upper bounds, we make those
  upper bounds explicitly testable.  This check-in is just infrastructure.
  The upper bounds are not yet enforced. (CVS 3941)


type: ci
user: danielk1977
comment:
  Do not crash in the internal functions sqlite_rename_table() or sqlite_rename_trigger() if they are somehow passed unexpected input. (CVS 3944)


type: ci
user: drh
comment:
  Add the max_page_count pragma used to limit the maximum size of a database
  file.  Untested. (CVS 3948)


type: ci
user: drh
comment:
  Introduce the (experimental) sqlite3_result_error_toobig() API that
  function implementations can use to signal SQLite that the function
  result is too big to represent. (CVS 3949)


type: ci
user: drh
comment:
  Limit the length of the patterns on LIKE and GLOB to avoid problems with
  deep recursion and N^2 behavior. (CVS 3950)


type: ci
user: drh
comment:
  Disable tracing pragmas when not in debug mode.  This eliminates an external
  dependency on stdout. (CVS 3959)


type: ci
user: drh
comment:
  Make sure compound queries inside a subquery only return a single result
  column.  Ticket #2347. (CVS 3967)


type: ci
user: drh
comment:
  Add some UTF-8 test infrastructure.  Treat NaN as NULL.  The printf routines
  print infinity as "Inf" not as "NaN".  Ticket #2345. (CVS 3972)


type: ci
user: drh
comment:
  When converting literal BLOBs to text using the encoding of the main
  database.  Ticket #2349. (CVS 3975)


type: ci
user: drh
comment:
  Make sure that the REGISTER token generates a valid Expr.  REGISTER will
  cause the tokenizer to abort, but the parser might do several reduce
  actions prior to that abort and those reduce actions sometimes need a
  valid Expr. (CVS 3980)


type: ci
user: drh
comment:
  In the windows driver, reacquire the shared lock if an exclusive lock
  fails.  Ticket #2354. (CVS 3992)


type: ci
user: danielk1977
comment:
  Prevent sub-queries with "LIMIT 0" from leaving an extra value on the vdbe stack. Also updates to fuzz.test. (CVS 3993)


type: ci
user: danielk1977
comment:
  Fix a bug in "flattening" optimization. Occured if the parent of the flattened sub-query is also the parent of a sub-query that uses a compound op (i.e. UNION, INTERSECT etc.). (CVS 3994)


type: ci
user: drh
comment:
  Fix a bug in sqlite3_mprintf() which could have caused a buffer
  overrun if malloc() failed. (CVS 3998)


type: ci
user: drh
comment:
  Fix problems in ALTER TABLE that occur when column or table names are
  invalid UTF encodings. (CVS 4000)


type: ci
user: danielk1977
comment:
  A fix for queries that used correlated, compound sub-queries in the HAVING clause. Also update fuzz.test some more. (CVS 4001)


type: ci
user: drh
comment:
  Do not allow bytes 0x80 through 0xBF to be the first character of an
  identifer because no valid UTF-8 character can begin with those bytes.
  If we allowed an identifier to begin with one of those bytes, then the
  substr() function in ALTER TABLE will not work correctly. (CVS 4003)


type: ci
user: drh
comment:
  Clarification on the best practices for using the _bytes() APIs.
  Change sqlite3_value_blob() to force the representation to be purely
  a BLOB and not a dual BLOB/String.  Ticket #2360. (CVS 4005)


type: ci
user: drh
comment:
  Fix to check-in (4005).  A call to sqlite3_column_blob() should not make
  subsequent calls to sqlite3_column_type() return SQLITE_BLOB.
  Sqlite3_column_type() returns the initial type. (CVS 4006)


type: ci
user: drh
comment:
  Change the documentation to clearly state that the result of
  sqlite3_column_type() is undefined following a type conversion. (CVS 4007)


type: ci
user: drh
comment:
  Relax the restriction on using bytes 0x80 through 0xbf as the first
  character of an identifier.  Enhancements to ALTER TABLE tests for
  tables with strange names or stange column names. (CVS 4008)


type: ci
user: drh
comment:
  Remove the alternative UTF-16 implementation of SUBSTR().  It does not
  work anymore and the UTF-8 version can do everything that the UTF-16
  version does. (CVS 4009)


type: ci
user: drh
comment:
  Make sure pParse->rc gets set whenever sqlite3ErrorMsg() is called.  This is
  added insurance that parsing will stop quickly after an error.  This change
  did make the parser stop faster in some cases, which required some revisions
  to tests. (CVS 4010)


type: ci
user: drh
comment:
  Add a --nostatic option to mksqlite3c.tcl.  With this option turned on,
  the extra "static" storage class markers are not inserted into the
  amalgamation. (CVS 4013)


type: ci
user: danielk1977
comment:
  Modify test scripts to allow for the fact that zeroblob() is not available when compiled with OMIT_INCRBLOB. Ticket #2365. (CVS 4019)


type: ci
user: danielk1977
comment:
  Bring the autoconf based build system up to date with the recent changes. #2366, #2367 and #2368. (CVS 4022)


type: ci
user: danielk1977
comment:
  Change the way overflow pages are allocated from the free-list to increase the chance that they are a contiguous block. Much more can still be done. (CVS 4023)


type: ci
user: shess
comment:
  Fix overzealous fts2 assertions WRT rowid 0 or lower.  Only check that
  docids are ascending if there was a prior docid set for the doclist,
  ignore the initial docid of 0. (CVS 4026)


type: ci
user: danielk1977
comment:
  Fix a database corrupting bug in the optimistic overflow chain. Exposed by running bigrow.test with auto-vacuum enabled. (CVS 4030)


type: ci
user: danielk1977
comment:
  Fix a leaked page reference that could occur after an IO error in auto-vacuum databases. Also modify incrvacuum.test to work with DEFAULT_AUTOVACUUM=1 builds. (CVS 4031)


type: ci
user: danielk1977
comment:
  Make sure the database schema has been read before compiling an incrmental_vacuum pragma. (CVS 4032)


type: ci
user: danielk1977
comment:
  Add some code to MemTranslate() to prevent the READ_UTF8() macro from overreading a buffer. (CVS 4033)


type: ci
user: danielk1977
comment:
  Remove an incorrect assert() statement that was being triggered by ioerr tests run in utf-16 mode. (CVS 4035)


type: ci
user: danielk1977
comment:
  Add some tests to verify that the parameter to the incremental_vacuum pragma is working. It is. (CVS 4039)


type: ci
user: danielk1977
comment:
  Consider explicit collate clauses when matching WHERE constraints to indices. Fix for #2391. (CVS 4040)


type: ci
user: danielk1977
comment:
  Fix a problem with zeroblob() and CAST(...) expressions that could cause an assert() to fail. (CVS 4041)


type: ci
user: danielk1977
comment:
  Add some extra tests for malloc failure during expression parsing and execution using fuzzily generated SQL. (CVS 4043)


type: ci
user: danielk1977
comment:
  Extend out-of-memory testing with fuzzily generated sql some. One fix for a problem found by the same. (CVS 4044)


type: ci
user: danielk1977
comment:
  Fix a vdbe stack leak that could occur where one side of a WHERE clause inequality evaluated to SQL null. (CVS 4045)


type: ci
user: drh
comment:
  Add the SQLITE_MAX_COMPOUND_SELECT compile-time parameter for limiting
  the number of terms in a compound select statement.  Set the default limit
  to 100. (CVS 4046)


type: ci
user: danielk1977
comment:
  Fix an error in test file sqllimits1.test that was causing a test to fail when SQLITE_MAX_EXPR_DEPTH was defined. (CVS 4047)


type: ci
user: drh
comment:
  Make sure zeroblob does reasonable things with a negative argument or
  an argument that is larger than the maximum blob size. (CVS 4048)


type: ci
user: drh
comment:
  Fix the query optimizer so that it correctly handles constant expressions
  in the ON clause of a LEFT JOIN.  Ticket #2403. (CVS 4049)


type: ci
user: drh
comment:
  Additional test cases for comparisons against NULL in the WHERE clause
  and elsewhere in a SELECT. (CVS 4051)


type: ci
user: drh
comment:
  Fix a bug in the LIKE optimization that was causing the pattern string
  to be dequoted twice.  Ticket #2407. (CVS 4056)


type: ci
user: drh
comment:
  In the "transaction" command of the TCL interface, if a COMMIT fails finish
  it with a rollback. (CVS 4059)


type: ci
user: danielk1977
comment:
  Fix for #2409. Return SQLITE_IOERR_BLOCKED instead of SQLITE_BUSY in cases where failure to obtain a database lock leaves the cache in an inconsistent state.
  See additional information at CorruptionFollowingBusyError. (CVS 4060)


type: ci
user: danielk1977
comment:
  Have queries interrupted by the progress-handler return SQLITE_INTERRUPT. Rollback any active transaction if a DML statement returns SQLITE_INTERRUPT. (CVS 4061)


type: ci
user: drh
comment:
  The C-api reference documentation is now generated directly from
  comments in the sqlite3.h header file. (CVS 4062)


type: ci
user: danielk1977
comment:
  Fix for #2415. The progress handler should abandon only the current query, not all active queries. (CVS 4067)


type: ci
user: danielk1977
comment:
  Fix a test suite bug. To accommadate the fact that handles returned by (db incrblob) change for the second test suite iteration of full.test. (CVS 4068)


type: ci
user: drh
comment:
  Fix a memory leak that was discovered by the tests that were added to
  cover ticket #2339. (CVS 4069)


type: ci
user: drh
comment:
  Remove a C++ism from the test harness.  Get the TCL interface working with
  older versions of TCL. (CVS 4075)


type: ci
user: drh
comment:
  Make arrangements to optionally print a debug message at the point
  of a simulated malloc() failure when SQLITE_MEMDEBUG is defined. (CVS 4077)


type: ci
user: drh
comment:
  Fix a database corruption problem that can occur in auto-vacuum mode when
  a malloc() failure causes a statement rollback, additional statements
  are run in the same transaction, then the total transaction rolls back. (CVS 4079)


type: ci
user: drh
comment:
  A minor logic correction in the previous check-in.  Also added a lengthy
  comment describing the meanings of various flags in the 
  {quote: PgHdr} structure. (CVS 4080)


type: ci
user: danielk1977
comment:
  Modify the tests in exclusive2.test to account for the fact that the pager cache may be very small by default. These tests are only valid if the entire database fitting in the cache. (CVS 4082)


type: ci
user: drh
comment:
  Documentation updates prior to release 3.4.0.  Enhanced support for
  soak testing in the test scripts. (CVS 4084)


type: ci
user: drh
comment:
  Cast the 2nd parameter of ftruncate to off_t to work around bugs in
  some unix implementations.  Ticket #2425. (CVS 4089)


type: ci
user: drh
comment:
  Do not segfault even if sqlite is misused by requesting query results
  after the query has been reset.  ticket #2426. (CVS 4090)


type: ci
user: drh
comment:
  In the TCL bindings, if a TCL variable has a bytearray representation and
  the host parameter starts with @ instead of $, then always store the
  content as a BLOB not as a string even if a string representation is also
  available. (CVS 4092)


type: ci
user: drh
comment:
  Cleanup the TCL interface source code and add documentation for recently
  added methods on the SQLite object of TCL. (CVS 4093)


type: ci
user: drh
comment:
  Change the TCL bindings so that @aaa always treats the variable aaa as
  a bytearray and binds the value as a BLOB.  This change is backwards
  compatible since the $ behavior is unchanged and @ was not accepted
  until the current round of changes. (CVS 4094)


type: ci
user: danielk1977
comment:
  Fix snippet generation when the left-most column of an fts2 table is used in the MATCH clause. Fix for ticket #2429. (CVS 4095)


type: ci
user: danielk1977
comment:
  Change main.mk to make it easier to build testfixture and sqlite3 with the icu or fts2 extensions linked in. (CVS 4096)


type: ci
user: drh
comment:
  Fix a bug in the command-line shell that prevents the
  reading of the ".sqliterc" file.  Ticket #2433. (CVS 4100)


type: ci
user: drh
comment:
  A column name preceded by a unary "+" operator is considered to be
  a column name when computing the collating sequence to be used by
  a comparison operator or ORDER BY clause. (CVS 4104)


type: ci
user: drh
comment:
  Clarify documentation of the column metadata APIs.  Make sure that the
  new documentation claims are tested. (CVS 4107)


type: ci
user: danielk1977
comment:
  Extend fts2 so that user defined tokenizers may be added. Add a tokenizer that uses the ICU library if available. Documentation and tests to come. (CVS 4108)


type: ci
user: pweilbacher
comment:
  fix linking failure on OS/2 that happens with the amalgamation and the high memory option enabled (CVS 4110)


type: ci
user: danielk1977
comment:
  When expanding '*' in the result set of a SELECT, quote the expanded identifiers. Fix for #2450. (CVS 4111)


type: ci
user: danielk1977
comment:
  Add the "(database.)freelist_count" PRAGMA. For querying the size of the
  database free-list. (CVS 4112)


type: ci
user: danielk1977
comment:
  Make setting "PRAGMA auto_vacuum = incremental" persistent if it is executed before the database file is created. (CVS 4113)


type: ci
user: drh
comment:
  Put #ifdefs in fts2_tokenizer so that the build works even when FTS2
  is omitted.  Add the SQLite blessing to the header comments on all FTS2
  source files. (CVS 4120)


type: ci
user: danielk1977
comment:
  Modify the non-configure build system to make it easier to build the library with the fts2 or icu extensions linked in. (CVS 4121)


type: ci
user: danielk1977
comment:
  Fix for #2445. A bug in the lookupName() logic that could cause a crash when a WHERE clause used an alias to refer to an expression in the result-set of the SELECT, and that expression was itself a reference to a table column. (CVS 4122)


type: ci
user: drh
comment:
  Change the name of sqlite3_atoi64 back to sqlite3Atoi64 so that it is clearly
  and internal API.  Modify the amalgamation to use a macro SQLITE_PRIVATE
  instead of the keyword "static" so the macro can be overridden to by nothing. (CVS 4124)


type: ci
user: drh
comment:
  Modify the amalgamation generator to identify every API using the
  SQLITE_API macro which is normally defined to nothing but which can
  be overridden on the compiler command-line to be "static" if desired.
  Ticket #2453. (CVS 4125)


type: ci
user: danielk1977
comment:
  Allow virtual tables to mark columns as 'hidden'. Hidden columns do not show
  up in "*" expansion, the implicit column list of an INSERT statement, or the results of a "PRAGMA table_info" statement. (CVS 4127)


type: ci
user: danielk1977
comment:
  Fix for #2444: Avoid SIGFPE on 64-bit platforms when evaluating expressions like ((1<<63)/-1). (CVS 4130)


type: ci
user: drh
comment:
  Make sure the TCL bindings always use Tcl_GetWideIntFromObj() even if the
  reported type is "int" because on x86-64 and "int" type is 64-bits.
  Ticket #2465. (CVS 4135)


type: ci
user: drh
comment:
  Update the FAQ to describe how moving sqlite3 handles across threads is
  not safe with SQLITE_ENABLE_MEMORY_MANAGEMENT.  Tickets #2357 and #2463. (CVS 4136)


type: ci
user: drh
comment:
  Set the connection error code when sqlite3_blob_read() or
  sqlite3_blob_write() fail.  Ticket #2464. (CVS 4137)


type: ci
user: drh
comment:
  Fix typo in comments of the sqlite.h.in header file - comments from which
  documentation is automatically extracted and generated.  Ticket #2468. (CVS 4139)


type: ci
user: pweilbacher
comment:
  Including os2safe.h from os_os2.c is no longer necessary (now that it's including from os.h) (CVS 4148)


type: ci
user: pweilbacher
comment:
  Change OS/2 version of sqlite3Os2FullPathname() for cross-compiler compatibility:
  - allocate zBuff on demand (restricted stack space on old compilers)
  - 2 bytes in zDrive in include '\0'
  - pass drive number to DosQueryCurrentDir() instead of 0 to make EMX work
  - zFull does not need to be preallocated (CVS 4149)


type: ci
user: drh
comment:
  Remove an unnecessary temporary variable for clarity of presentation in
  a loop that GCC 4.2.0 is miscompiling.  Ticket #2469.  GCC 4.2.0 miscompiles
  this loop regardless of whether or not the temporary variable is used, but
  by removing the variable, we hope to make it easier to explain the problem
  to GCC maintainers.  The error only appears if -ftree-vrp is used (which
  is turned on by -O2). (CVS 4150)


type: ci
user: danielk1977
comment:
  Modify handling of SQLITE_SCHEMA in fts2 code. An SQLITE_SCHEMA error may cause SQLite to reload the internal schema, deleting and recreating v-table objects. So the sqlite3_vtab structure can be deleted out from under a v-table implementation. (CVS 4151)


type: ci
user: danielk1977
comment:
  Fix a memory leak in shell.c. Reported on the mailing list. This has only been informally tested. (CVS 4153)


type: ci
user: drh
comment:
  "extern" prototypes cause problems for the Digital Mars compiler.  So
  remove them.  Ticket #2502. (CVS 4156)


type: ci
user: drh
comment:
  Update documentation to make it clear that VACUUM is free to
  change implicit rowids.  Ticket #2382. (CVS 4157)


type: ci
user: shess
comment:
  Fix annoying emacs warning about suspicious line.  The change removes
  a leading space (emacs wants Makefiles to use leading tabs there). (CVS 4159)


type: ci
user: drh
comment:
  Clarify the documentation on the nByte parameter to sqlite3_prepare().
  Make it clear that nByte is a maximum string length.  Ticket #2516. (CVS 4162)


type: ci
user: drh
comment:
  Preliminary fix for ticket #2518.  Make sure the VACUUM command
  increments the change counter. (CVS 4163)


type: ci
user: drh
comment:
  Disable tests that use the progress handler when the progress handler
  is disabled at compile-time.  Followup to ticket #2497. (CVS 4164)


type: ci
user: drh
comment:
  Cleanup unused function in pager.c.  This is the conclusion of the fix
  to ticket #2518. We believe the fix is complete and correct. (CVS 4165)


type: ci
user: drh
comment:
  Fix a memory leak in the Rename method of the echo test virtual table.
  No changes to the core. (CVS 4166)


type: ci
user: drh
comment:
  Add new APIs to the end of the sqlite3_apis structure in loadext.c, in order
  to preserve backwards compatibility.  Fix an incompatibility introduced
  by (4108). (CVS 4168)


type: ci
user: drh
comment:
  Keep sqlite3ext.h backwards compatible.  This really should have been part
  of the previous check-in. (CVS 4169)


type: ci
user: aswift
comment:
  Work around an AFP file system byte-range locking error caused by opening and closing a second file descriptor on the database file as RDWR which clears the exclusive byte-range lock and results in an fcntl error when the AFP locking code attempts to clear it afterwards.  This error is caused by the test harness and isn't a flaw in the sqlite or its implementation of AFP file locking. (CVS 4172)


type: ci
user: drh
comment:
  The REPLACE conflict resolution falls back to FAIL when on a
  CHECK constraint violation.  Ticket #2525. (CVS 4178)


type: ci
user: drh
comment:
  Detect nested aggregate functions even if the inner aggregate function is
  aliased using an AS clause.  Ticket #2526. (CVS 4179)


type: ci
user: drh
comment:
  Remove the comment in the documentation that says that incremental vacuum
  mode is not persistent because as of 3.4.1 it is persistent.  Ticket #2528. (CVS 4180)


type: ci
user: shess
comment:
  Apply change 4095 to fts1.  Fix snippet generation when the left-most
  column of an fts table is used in the MATCH clause. Fix for ticket
  #2429. (CVS 4181)


type: ci
user: shess
comment:
  Replicates http://www.sqlite.org/cvstrac/chngview?cn=4151 which
  modified fts2:

  Modify handling of SQLITE_SCHEMA in fts2 code. An SQLITE_SCHEMA error
  may cause SQLite to reload the internal schema, deleting and
  recreating v-table objects. So the sqlite3_vtab structure can be
  deleted out from under a v-table implementation. (CVS 4183)


type: ci
user: shess
comment:
  Implement xRename() for fts1 so that it is possible to rename fts1 tables.
  See http://www.sqlite.org/cvstrac/chngview?cn=4143 (CVS 4184)


type: ci
user: danielk1977
comment:
  Fix two obscure memory leaks that can follow a malloc() failure in sqlite3_set_auxdata(). Ticket #2534. (CVS 4185)


type: ci
user: danielk1977
comment:
  Test that an explicit collation sequence overrides an implicit one attached to a 'new' reference (it does). No code changes. (CVS 4186)


type: ci
user: danielk1977
comment:
  Fix a bug with explicit collation sequences attached to a column reference expression that is on the right-hand-side of a binary comparison operator. (CVS 4187)


type: ci
user: rse
comment:
  Get rid of the following compile-time warning:
  "src/shell.c:112: warning: 'iotracePrintf' defined but not used" (CVS 4188)


type: ci
user: rse
comment:
  Get rid of the following compile-time warnings:
  tool/mkkeywordhash.c:353: warning: array subscript has type 'char'
  tool/mkkeywordhash.c:354: warning: array subscript has type 'char' (CVS 4189)


type: ci
user: rse
comment:
  "extern" declarations inside function bodies are not every compiler's
  favorite, so move to global scope. Additionally, at least under Unix
  environment use <unistd.h> to get the proper prototype instead of using
  a K&R-style own declaration. (CVS 4190)


type: ci
user: rse
comment:
  Fix ticket #2439: the FTS1 and FTS2 extensions use the non-standard,
  unportable and highly deprecated <malloc.h> header on all platforms
  except Apple Mac OS X. The <malloc.h> actually is never required on
  any OS with an at least partly POSIX-conforming API as the malloc(3) &
  friends functions officially live in <stdlib.h> since over 10 years.
  Under some platform like FreeBSD the inclusion of <malloc.h> since a few
  years even causes an "#error" and this way a build failure. So, just get
  rid of the bad <malloc.h> usage in FTS1 and FTS2 extensions at all and
  stick with <stdlib.h> there only. (CVS 4191)


type: ci
user: drh
comment:
  Make excess output from the CLI appear inside SQL comments so as not
  to interfere with generated SQL.  Ticket #2544. (CVS 4192)


type: ci
user: danielk1977
comment:
  Avoid reloading the schema when an expired statement is finalized or reset.
  This is only necessary when the in-memory schema does not match the file-system schema. (CVS 4194)


type: ci
user: drh
comment:
  Revise the amalgamation so that all symbols have file scope except those
  that begin with "sqlite3_".  Ticket #2554. (CVS 4197)


type: ci
user: drh
comment:
  Additional refinements on the amalgamation:  Give a couple of constants
  file scope and add the SQLITE_API prefix to some interfaces that need it.
  Ticket #2554. (CVS 4199)


type: ci
user: drh
comment:
  Add the --soft-heap-limit=N option to the test scripts.  Set this value to
  enforce a soft heap limit across all tests.  This changes exposes several
  new bugs. (CVS 4202)


type: ci
user: shess
comment:
  Convert fts2 to use sqlite3_prepare_v2() to prevent certain logic
  errors around SQLITE_SCHEMA handling.  This also allows
  sql_step_statement() and sql_step_leaf_statement() to be replaced with
  sqlite3_step().

  Also fix a logic error in flushPendingTerms() which was clearing the
  term table in case of error.  This was wrong in the face of
  SQLITE_SCHEMA.  Even though the change to sqlite3_prepare_v2() should
  cause us not to see SQLITE_SCHEMA any longer, it was still a logic
  error... (CVS 4205)


type: ci
user: drh
comment:
  Fix the corruption problem of ticket #2565 as demonstrated by the test added
  in (4204).  There may yet be other instances of similar problems lurking in
  the code. (CVS 4206)


type: ci
user: drh
comment:
  Fix some incorrect asserts() in the pager - problems brought to light by
  the new soft-heap-limit testing apparatus of check-in (4202). (CVS 4207)


type: ci
user: drh
comment:
  Backout check-in (4206) and replace it with a much better and more
  general fix for the problem identified in ticket #2565. (CVS 4208)


type: ci
user: drh
comment:
  Remove a memory allocation from sqlite3VdbeIOTraceSql().  This means that
  when doing I/O tracing, the text of an SQL statement is truncated to the
  first 1000 characters.  But it also means tracing works in an out-of-memory
  situation. (CVS 4210)


type: ci
user: drh
comment:
  Add a new test cases for a problem with malloc failure during the parsing
  of CREATE TABLE statements in autovacuum mode. (CVS 4211)


type: ci
user: danielk1977
comment:
  When loading a database schema, do not clear the SQLITE_InternChanges flag. This fixes the problem illustrated by (4211). (CVS 4213)


type: ci
user: drh
comment:
  Fix a page leak in btree balance routines that follows a malloc failure.
  This problem detected by the new soft-heap-limit testing. (CVS 4214)


type: ci
user: drh
comment:
  Disable tests that require 80-bit long doubles when the host only
  provides 64-bit long doubles.  Ticket #2570. (CVS 4215)


type: ci
user: danielk1977
comment:
  Invalidate prepared SQL statements when rolling back a transaction that includes schema modifications. (CVS 4216)


type: ci
user: danielk1977
comment:
  Add comments describing upcoming changes to crash-test module (test6.c). No code
  changes. (CVS 4223)


type: ci
user: danielk1977
comment:
  Modify the crash-recovery test code in test6.c for 3.5. Also change some other code to use the new sqlite3_io_methods interface. Lots of things are broken now. (CVS 4228)


type: ci
user: drh
comment:
  Enhancements and smoke testing of the new memory allocation subsystem.
  Have not yet cut it over to the core, though. (CVS 4230)


type: ci
user: drh
comment:
  Half-way through a major refactoring of the memory allocation.
  I have not even attempted to compile so I am certain there are
  countless errors. (CVS 4231)


type: ci
user: danielk1977
comment:
  Add a test for malloc() failure when compiling a trigger step of the form "INSERT INTO ... SELECT ...". Currently causes a segfault. (CVS 4232)


type: ci
user: drh
comment:
  Remove the thread specific data subsystem from the unix build.  Remove
  legacy cruft from sqliteInt.h.  Use the new mutex subsystem in the PRNG. (CVS 4237)


type: ci
user: drh
comment:
  Change the design of the  mutex interface to allow for
  both "fast" and "recursive" mutexes. (CVS 4238)


type: ci
user: drh
comment:
  Begin adding mutexes.  Compiles without SQLITE_OMIT_SHARED_CACHE but we
  get an assertion fault on the shared cache testing. (CVS 4239)


type: ci
user: danielk1977
comment:
  Changes to crash-test io backend (test6.c) so that it works with the sqlite3_vfs interface. (CVS 4247)


type: ci
user: shess
comment:
  Copy fts2 to fts3, renaming, and replacing references to fts2 with
  fts3, including capitalization variants. (CVS 4249)


type: ci
user: shess
comment:
  Replicate the fts2*.test files as fts3a*.test, and convert fts2 to
  fts3 in the text of the files. (CVS 4251)


type: ci
user: drh
comment:
  The quick test runs again with a handfull of errors after adding the
  mutex locks to btree, the VFS registration interfaces, and FTS3. (CVS 4254)


type: ci
user: danielk1977
comment:
  Avoid journalling an extra page when a btree insert operation uses the 'quick-balance' trick. (CVS 4257)


type: ci
user: drh
comment:
  Readded the sqlite3_open_v2() interface.  No test cases yet.
  Additional progress toward adding mutexes to all interfaces. (CVS 4261)


type: ci
user: drh
comment:
  The sqlite3_value object now carries an sqlite3* pointer to use for
  recording malloc failures.  This eliminates the need to pass sqlite3*
  pointers into many internal interfaces.  Also added more mutexing. (CVS 4263)


type: ci
user: drh
comment:
  All mutexing and locking appears to be in place.  Now we just have to
  test it and make it all work. (CVS 4264)


type: ci
user: drh
comment:
  Reenable the memory management logic.  The quick.test script now runs with
  SQLITE_MEMDEBUG and SQLITE_ENABLE_MEMORY_MANAGEMENT. 7 minor errors. (CVS 4265)


type: ci
user: danielk1977
comment:
  Fix a bug in the logic for journaling pages when the device sector-size is greater than the page size. (CVS 4270)


type: ci
user: drh
comment:
  Improvements to memory leak detection.  The --backtrace=NNN option is now
  recognized by tester.tcl.  Memory leak summaries are automatically written
  to the file ./memleak.txt and each leak is tagged with the test in which
  it occurred.  The quick.test script runs on Linux with no errors and
  no leaks. (CVS 4273)


type: ci
user: drh
comment:
  Change names of constants in lemon.c to work around name conflicts
  on Solaris.  Ticket #2583. (CVS 4274)


type: ci
user: shess
comment:
  Fix fts3 to not have the VACUUM bug from fts2.  %_content.docid is an
  alias to fix the rowid for documents, %_segments.blockid is an alias
  to fix the rowid for segment blocks.  Unit test for the problem. (CVS 4280)


type: ci
user: shess
comment:
  Make comments and variable naming more consistent WRT rowid versus
  docid/blockid.  This should have no code impact. (CVS 4281)


type: ci
user: danielk1977
comment:
  Add tests to simulate power-failure on devices that support IOCAP_SEQUENTIAL or IOCAP_SAFE_APPEND. (CVS 4284)


type: ci
user: drh
comment:
  Remove nRef and vfsMutex from the sqlite3_vfs structure.  Omit the
  sqlite3_vfs_release() interface.  Less memory allocated for a pager
  in the common case where the size of the pathname is less than MAX_PATH. (CVS 4287)


type: ci
user: drh
comment:
  Rework the win32 OS driver to use malloc()/free() directly rather than
  going through the SQLite memory allocation layer.  With this change, the
  complete quick.test script now runs on windows.  There are a few errors,
  but no segfaults.  Progress. (CVS 4289)


type: ci
user: drh
comment:
  Bug fix in the implementation of recursive mutexes using non-recursive
  pthreads mutexes.  Ticket #2588. (CVS 4292)


type: ci
user: drh
comment:
  Use recursive mutexes in pthreads.  If the pthreads implementation does not
  support recursive mutexes, then you cannot compile SQLite with
  SQLITE_THREADSAFE=1.  Ticket #2588. (CVS 4297)


type: ci
user: drh
comment:
  Clarification in the documentation of the sqlite3_mutex_held() and
  sqlite3_mutex_notheld() interfaces.  Make it clear that these routines
  are only for use inside assert(). (CVS 4298)


type: ci
user: drh
comment:
  Create a fresh pthread_mutexattr_t every time a recursive mutex is
  allocated.  Ticket #2588. (CVS 4300)


type: ci
user: drh
comment:
  Added the 34to35.html document describing the changes between 3.4.2 and
  3.5.0.  Minor interface cleanups. (CVS 4302)


type: ci
user: drh
comment:
  Bring the amalgamation builder up to date with the latest changes.
  Remove some vestigial code. (CVS 4303)


type: ci
user: drh
comment:
  Work around problem with forward declarations of constants in MSVC
  in the amalgamation.  Ticket #2574. (CVS 4304)


type: ci
user: danielk1977
comment:
  Add some comments and test-cases for the global lru page list (used by sqlite3_release_memory()). (CVS 4308)


type: ci
user: drh
comment:
  Update the sqlite3_vfs_register() documentation to make
  the behavior undefined for VFSes with a NULL or empty string
  as the name or with duplicate names. (CVS 4310)


type: ci
user: drh
comment:
  Updates to the sqlite3_open() documentation.  Method the magic
  :memory: filename.  Ticket #2591. (CVS 4311)


type: ci
user: drh
comment:
  Break up the mutex implementation into separate source files, one
  each for unix, w32, and os2. (CVS 4312)


type: ci
user: shess
comment:
  Fix memory leak of InteriorReader.term.  Comes up when doing queries
  against large segments. (CVS 4315)


type: ci
user: drh
ecomment:
  The shared_err test runs with no errors.  But a potential deadlock has been
  discovered and is still unfixed. (CVS 4317)

comment:
  The shared_err test runs with no errors.  But a potential deadlock has been
  discovered and is still unfixed. (CVS 4317)


type: ci
user: drh
comment:
  The shared_err test runs with no errors.  But a potential deadlock has been
  discovered and is still unfixed. (CVS 4318)


type: ci
user: drh
comment:
  More locking fixes.  Now makes it all the way through quick.test.  There
  are errors but no assertion faults.  Progress. (CVS 4319)


type: ci
user: drh
comment:
  Be careful to verify the schema cookie when running the xfer optimization
  on INSERT statements. (CVS 4322)


type: ci
user: drh
comment:
  Improvements to mutex asserts.  The quick test runs to completion without
  assertion faults. (CVS 4324)


type: ci
user: drh
comment:
  Fix a bug in test_server.c that resulted from the change in semantics
  of sqlite3_enable_shared_cache().  All quick tests now pass. (CVS 4326)


type: ci
user: drh
comment:
  Fix minor problems on various tests.  This is a snapshot prior to possible
  major changes in order to fix the sqlite3AbortOtherActiveVdbes problem. (CVS 4327)


type: ci
user: danielk1977
comment:
  Add tests for malloc() failure when the atomic-write optimization is being used. Also fix things so that rollback can occur without a malloc(), even if there is a master journal file. (CVS 4330)


type: ci
user: drh
comment:
  Fix the SQLITE_MIXED_ENDIAN_64BIT_FLOAT option so that it works on
  goofy linux kernels that employ CONFIG_FPE_FASTFPE.  Patch from
  Frank van Vugt. (CVS 4339)


type: ci
user: danielk1977
comment:
  Prevent sqlite from opening directories as databases under unix. Fix for test cae in misc7.test. (CVS 4342)


type: ci
user: danielk1977
comment:
  Fix the "test_destructor" test function in utf-16 mode. Fix for test failure in utf16 version of func.test. (CVS 4344)


type: ci
user: drh
comment:
  Make mutex functions available to loadable extensions.  Fix the
  amalgamation generator to include the latest source files. (CVS 4346)


type: ci
user: drh
comment:
  Initial implementation of the sqlite3_file_control() interface.
  Compiles and passes all historical tests but the new method is itself
  untested. (CVS 4353)


type: ci
user: danielk1977
comment:
  Allow sqllimits1.test to be run from a regular build of testfixture. Add the 'amalgamation-testfixture' target to main.mk - to build testfixture via sqlite3.c. (CVS 4354)


type: ci
user: drh
comment:
  Remove the xLockState method for sqlite3_io_methods.  Replace it with
  a defined call to xFileControl().  This simplifies the interface and
  also gives us coverage testing of sqlite3_file_control(). (CVS 4355)


type: ci
user: drh
comment:
  Change the windows tempfile name generator so that it uses 119 bits
  of randomness and does not bother to check to see if the file already
  exists.  Ticket #2608.  (Unable to test from this machine, but the
  changes are simple and isolated.  Hope it works.) (CVS 4357)


type: ci
user: danielk1977
comment:
  Fix a problem handling a malloc() failure in printf.c. Also some other things to improve test coverage. (CVS 4361)


type: ci
user: danielk1977
comment:
  Test sqlite3_bind_zeroblob(). Only include sqlite3Utf8To8 in builds if SQLITE_DEBUG is defined. (CVS 4363)


type: ci
user: danielk1977
comment:
  Remove the syncOk argument to pager_recycle. Now that sqlite3_memory_release uses a global lru list of page, it is no longer required. (CVS 4364)


type: ci
user: danielk1977
comment:
  Remove code for calling the SQL function randstr() with 0 or 1 argument, as it is registered with sqlite as requiring exactly 2. Also test io errors in sqlite3_release_memory(). (CVS 4365)


type: ci
user: drh
comment:
  Fix function name typo in mem1.c.  This bug managed to make it into
  the tree because the code in mem1.c is only compiled when the
  -DSQLITE_MEMDEBUG compile-time option is omitted.  But
  pre-checkin tests usually include this option.  Ticket #2612. (CVS 4368)


type: ci
user: drh
comment:
  The sqlite3_vfs_register() interface now calls sqlite3_vfs_find(0) to make
  sure the VFS subsystem is initialized.  Ticket #2611. (CVS 4369)


type: ci
user: drh
comment:
  Document the fact that xRandomness is only called once from the default VFS.
  Ticket #2614. (CVS 4373)


type: ci
user: drh
comment:
  Honor the SQLITE_OPEN_ flags passed into sqlite3_open_v2().  Some
  test cases added but more are needed.  Ticket #2616. (CVS 4376)


type: ci
user: drh
comment:
  Test script fixes to get things running under varying configurations.
  No changes to code. (CVS 4378)


type: ci
user: drh
comment:
  Enable threadsafe builds by default in configure.  Ticket #2606.
  Changes to test scripts to do better testing under all configurations. (CVS 4379)


type: ci
user: danielk1977
comment:
  Remove an unreachable case from xferOptimization(). Also other minor test coverage improvements. (CVS 4383)


type: ci
user: drh
comment:
  Fix Makefile.in so that it rebuilds all source files that use SQLITE_TEST
  when constructing the testfixture. (CVS 4388)


type: ci
user: drh
comment:
  Fix the malloc-10 test in malloc.test so that it will run on windows when
  invoked from exclusive3.test. (CVS 4389)


type: ci
user: drh
comment:
  Clarify documentation on the return value from sqlite3_column_blob() for
  a zero-length BLOB.  Clarify the documentation on what happens when you
  have a zeroblob() with a negative length.  Additional test cases but no
  changes to code.  Ticket #2623. (CVS 4395)


type: ci
user: danielk1977
comment:
  Add internal locking to the test_async.c backend. So that more than one connection may be used from within a single process. (CVS 4396)


type: ci
user: danielk1977
comment:
  Fix a problem whereby the *ppVtab output buffer passed to sqlite3_module.xConstruct() could be invalidated (freed) if a malloc() failure occured within a call to sqlite3_declare_vtab(). (CVS 4397)


type: ci
user: drh
comment:
  Do not use the TryEnterCriticalSection API on windows since it is
  unavailable on some platforms. (CVS 4399)


type: ci
user: danielk1977
comment:
  Test that the asynchronous backend works with components like "." or ".." in the path to the database file. (CVS 4403)


type: ci
user: pweilbacher
comment:
  Fix temp file handling for OS/2 so that trailing slashes or backslashes
  are stripped off the path gotten from the environment. Otherwise full
  paths might contain multiple slashes which causes opening of files to
  fail. (CVS 4406)


type: ci
user: drh
comment:
  Allocate page cache headers and page cache data buffers separately.
  The data buffer will be a power of two in size and this gives some
  malloc implementation additional optimization opportunitites. (CVS 4409)


type: ci
user: drh
comment:
  Base the name of the statement journal on the original database filename.
  Remember the statement journal name for the lifetime of the Pager so
  that the name pointer passed to xOpen persists as long as the file
  exists. (CVS 4410)


type: ci
user: drh
comment:
  Throw an error on an attempt to open a database where the page
  size is larger than SQLITE_MAX_PAGE_SIZE.  Ticket #2628. (CVS 4411)


type: ci
user: drh
comment:
  Fix a segfault that could occur while attempting to add new pages
  to the freelist in a corrupt database. (CVS 4414)


type: ci
user: drh
comment:
  In the query optimizer, make sure table dependencies from all terms
  of a compound SELECT statement are recognized so that subqueries in
  a WHERE clause are not evaluated too early.  Fix for ticket #2640. (CVS 4422)


type: ci
user: shess
comment:
  Add an implicit (HIDDEN) docid column.  This works as an alias to
  rowid, similar to how things work in SQLite tables with INTEGER
  PRIMARY KEY.  Add tests to verify operation. (CVS 4426)


type: ci
user: danielk1977
comment:
  Change the names of xGetTempName and sqlite3OsGetTempName to xGetTempname. To be consistent with xFullPathname and sqlite3OsFullPathname. (CVS 4432)


type: ci
user: danielk1977
comment:
  Add a parameter to specify the size of the output buffer passed to xGetTempname() and xFullPathname(). This, and the previous commit, are changes to the public vfs API introduced in 3.5.0. (CVS 4433)


type: ci
user: drh
comment:
  Add disabled test cases for ticket #2652.  We will enable these test cases
  after #2652 is fixed.  The fix will be difficult and will probably take
  a while.  On the other hand, correlated aggregate queries have never
  worked in SQLite and the problem is just now coming to light, so it is
  probably not a pressing issue. (CVS 4435)


type: ci
user: rse
comment:
  The code is correct as it contains an assert(3) in the "default" switch
  case, but GCC 4.3 is not able to detect this and instead complains
  with "warning: 'amode' may be used uninitialized in this function".
  Hence, although the assert(3) already protects the code here, get rid of
  this compiler warning by doing a simple initialization of the "amode"
  variable. (CVS 4436)


type: ci
user: rse
comment:
  get rid of remaining GCC 4.3 -Wall compiler warnings by initializing two variables and one structure properly (although the code path was already rather safe) (CVS 4439)


type: ci
user: pweilbacher
comment:
  Initial attempt of the new OS/2 mutex implementation. (Compiles and an attempt to create a new table does not crash in mutex_os2 any more.) (CVS 4442)


type: ci
user: drh
comment:
  Remove "const" keywords from the sqlite3_index_info structure definition.
  The use of this keyword is suspected to be causing problems for some
  compilers. (CVS 4445)


type: ci
user: drh
comment:
  Add text to the load_extension SQL function documentation that
  explains limitations in the use of that function.  Ticket #2672. (CVS 4446)


type: ci
user: drh
comment:
  Update the build process so that it includes sqlite3ext.h with the
  amalgamation ZIP archive.  Ticket #2678. (CVS 4449)


type: ci
user: pweilbacher
comment:
  Use local variables instead of #defines for the mutex name and length in OS/2's sqlite3_mutex_alloc(). (CVS 4453)


type: ci
user: danielk1977
comment:
  Add automatic recovery from the pager "error-state". Also add a new error code - SQLITE_IOERR_NOMEM. (CVS 4454)


type: ci
user: drh
comment:
  Rollback the transaction if an SQLITE_FULL error is encountered.
  This is a preliminary fix for ticket #2686.  More testing and
  analysis is needed before we close the ticket. (CVS 4458)


type: ci
user: drh
comment:
  Update documentation to talk about the response to errors
  within an explicit transaction. (CVS 4460)


type: ci
user: drh
comment:
  Get io.test to work even if auto_vacuum is on by default and we are
  running with a reduced maximum page size. (CVS 4463)


type: ci
user: drh
comment:
  The sqlite3internal.h file obsolete as of version 3.5.0.  Remove
  legacy procedures and makefile targets for building this file.
  Tickets #2693 and #2694. (CVS 4469)


type: ci
user: drh
comment:
  Do not attempt to use TryEnterCriticalSection() under win32.  It causes
  too many compiler problems.  Ticket #2685. (CVS 4471)


type: ci
user: danielk1977
comment:
  Changes to a couple of test scripts to handle the tcl 8.5 version of (file attributes -readonly) on mac. (CVS 4472)


type: ci
user: drh
comment:
  Changes lemon so that the generated parser does not accept prior to
  seeing the EOF token.  This is a lemon change only and does not
  effect SQLite.  Ticket #2550. (CVS 4473)


type: ci
user: drh
comment:
  Remove #include <math.h> from all source files.  It is no longer needed but
  causes compile problems when -DSQLITE_OMIT_FLOATING_POINT is defined.
  Ticket #2696. (CVS 4474)


type: ci
user: drh
comment:
  Fix a memory leak in the sqlite3_realloc() implementation of the
  non-debugging memory allocator. (CVS 4475)


type: ci
user: drh
comment:
  Reverting check-in (3836) at the request of winCE users.  We no ability
  to test this change.  Presumably this is a fix for tickets #2698, #2533,
  and #2598.  It is unclear if this causes #2294 to be reopened or not. (CVS 4478)


type: ci
user: danielk1977
comment:
  Fixes to the test suite (no code changes) so that quick.test runs with OMIT_ATTACH builds. #2706. (CVS 4480)


type: ci
user: drh
comment:
  Update documentation to talk about the SQLITE_UTF16_ALIGNED option
  for sqlite3_create_collation(). Ticket #2722 (CVS 4484)


type: ci
user: drh
comment:
  Add an explicit type conversion in an AWK script to work around
  bugs in cygwin.  Ticket #2713. (CVS 4485)


type: ci
user: drh
comment:
  Do not invoke the authorizer when reparsing the schema after a schema
  change or when trying to figure out the result set of a view. (CVS 4488)


type: ci
user: drh
comment:
  Reorder some tests at the beginning of sqlite3_step() to work around
  misuse by python.  Ticket #2732. (CVS 4492)


type: ci
user: drh
comment:
  Added an experimental malloc-free memory allocation subsystem, intended
  for use on embedded systems.  Runs 7% faster than when using system
  malloc() on Linux. (CVS 4493)


type: ci
user: drh
comment:
  Go back to allocating each page and its header with a single memory
  allocation.  This undoes the change of (4409). (CVS 4495)


type: ci
user: drh
comment:
  Simplify the mem3.c memory allocator.  Have it call sqlite3_release_memory()
  automatically, without having to specify the soft heap limit. (CVS 4496)


type: ci
user: drh
comment:
  Add the new memory allocator to the amalgamation.  Improvements to
  out-of-memory handling. (CVS 4498)


type: ci
user: drh
comment:
  Use the 2-argument version of substr() in the SQL contained in the
  VACUUM and ALTER TABLE commands.  Ticket #2737. (CVS 4499)


type: ci
user: pweilbacher
comment:
  Finally bring OS/2 to the 3.5 level. This at least is a first draft version that survives very basic tests. It still contains a lot of debugging stuff... (CVS 4500)


type: ci
user: drh
comment:
  Make sure the sqlite3_vfs_register() and sqlite3_vfs_unregister() APIs
  work right even if not VFS is currently registered.  Ticket #2738. (CVS 4505)


type: ci
user: drh
comment:
  Floating point and 64-bit integer constants store in the virtual
  machine opcodes in binary, not as text.  Performance improvement.
  Ticket #2733. (CVS 4507)


type: ci
user: drh
comment:
  Add comments to the code warning that _XOPEN_SOURCE might need to be
  defined manually if using USE_PREAD or USE_PREAD64. (CVS 4509)


type: ci
user: drh
comment:
  Add comments, assertions, and test cases to demonstrate that the
  problem described in ticket #2742 is not a real problem. (CVS 4510)


type: ci
user: pweilbacher
comment:
  Fix os2GetTempname() to actually work: DosScanEnv() wants an empty PSZ as argument and we obviously don't need to test for file existence any more. (CVS 4512)


type: ci
user: drh
comment:
  Add a prototype "group_concat()" aggregate function to func.c.
  Disabled by default.  No documentation nor test cases.  No effort
  to make it efficient. (CVS 4519)


type: ci
user: danielk1977
comment:
  Add some assert() statements to the asychronous backend demo to enforce the strategy used to avoid deadlock. Also a minor change to avoid a potential deadlock. (CVS 4520)


type: ci
user: danielk1977
comment:
  Handle "IS NULL" constraints on virtual table scans. IS NULL constraints are not passed to the virtual table layer. Ticket #2759. (CVS 4523)


type: ci
user: drh
comment:
  In the windows VFS, make sure we do not return an error if attempting
  to delete a file that does not exist. (CVS 4532)


type: ci
user: drh
comment:
  Changes the asynchronous I/O test module so that it can be appended to the
  end of the amalgamation. (CVS 4533)


type: ci
user: drh
comment:
  Add asserts on sqlite3_mutex_held() to the zero-malloc memory allocator,
  in order to prove that the mutex is held when it is needed. (CVS 4534)


type: ci
user: drh
comment:
  Fix the code generation for UPDATE and DELETE so that
  BEFORE triggers that use RAISE(IGNORE) do not leave extra
  values on the stack.  Ticket #2767 (CVS 4535)


type: ci
user: danielk1977
comment:
  Where possible, transform the DISTINCT qualifier to a GROUP BY clause. GROUP BY clauses may be optimized by indices, DISTINCT qualifiers cannot. (CVS 4538)


type: ci
user: drh
comment:
  Another attempt at fixing a memory leak in the TCL interface.
  See check-in (4338) for the first attempt.  Ticket #2597. (CVS 4540)


type: ci
user: chw
comment:
  Various changes to enable compilation of SQLite library and command
  line shell with the Windows CE cross compiler from cegcc.sourceforge.net (CVS 4541)


type: ci
user: danielk1977
comment:
  Add an experimental API for retrieving the SQL source from a compiled statement: sqlite3_sql(). Ticket #2769. (CVS 4543)


type: ci
user: danielk1977
comment:
  Fix a segfault that can occur after a malloc failure in an ANALYZE statement. Ticket #2772. (CVS 4544)


type: ci
user: danielk1977
comment:
  Return SQLITE_MISUSE instead of crashing if NULL is (incorrectly) passed to sqlite3_step(). Ticket #2773. (CVS 4545)


type: ci
user: drh
comment:
  Fix a bug in the grammar.  We were giving the ones-complement operator ~
  the same precedence as the NOT operator, which is incorrect. (CVS 4548)


type: ci
user: drh
comment:
  Avoid a double-free in an out-of-memory situation with a USING
  clause or NATURAL JOIN.  Ticket #2789. (CVS 4551)


type: ci
user: drh
comment:
  Make sure that INSERT INTO ... SELECT ... always uses an ephemeral
  intermediate table if the SELECT clause refers to the destination table,
  even if the SELECT clause is compound or uses the destination table
  in a subquery.  This fixes a long-standing bug that can cause an
  infinite loop for some SQL statements. (CVS 4552)


type: ci
user: drh
comment:
  Remove most documentation from the source code repository.
  Documentation configuration management is now handled by a
  separate repository at http://www.sqlite.org/docsrc. (CVS 4553)


type: ci
user: drh
comment:
  Do not require SQLITE_ENABLE_BROKEN_FTS2 if FTS2 is not enabled.
  The same for FTS1.  Ticket #2777. (CVS 4556)


type: ci
user: drh
comment:
  The FTS3 amalgamation can now be appended to the SQLite amalgamation to
  generate a single source file that contains both components. (CVS 4558)


type: ci
user: drh
comment:
  Additional out-of-memory testing.  Fix bugs caused by malloc failures in
  where.c.  Tickets #2794, #2795, #2796, and #2797. (CVS 4560)


type: ci
user: drh
comment:
  Use macro __DARWIN__ rather than __MACOS__ for conditional
  compilation of MacOSX specific features.  Ticket #2780. (CVS 4561)


type: ci
user: drh
comment:
  Add likely() and unlikely() macros to the header file.  They are not
  yet used for anything. (CVS 4562)


type: ci
user: drh
comment:
  Bug fix in the configure script.  Ticket #2799.
  The configure script is a real mess and
  needs to be completely rewritten. (CVS 4564)


type: ci
user: drh
comment:
  Use the hexio test utility rather than TCL's binary I/O to avoid
  32/64-bit problems in io.test.  Ticket #2803.  (This is a change
  to the test harness only - not to SQLite.) (CVS 4571)


type: ci
user: drh
comment:
  Add an implementation of recursive mutexes for unix systems that
  lack pthreads recursive mutexes (ex: Solaris 2.6).  Modern unix
  systems continue to use the recursive mutexes provided by pthreads. (CVS 4573)


type: ci
user: drh
comment:
  Preset the legacy_file_format pragma to the value of the primary
  database so that a VACUUM will not unknowingly alter the setting.
  Ticket #2804. (CVS 4574)


type: ci
user: drh
comment:
  Clarify the conditions under which homegrown recursive mutexes work
  (they require a coherent cache) and only enable them if there is an
  explicit #define so as to avoid accidental use on platforms that do
  not meet the constraints.  Ticket #2805. (CVS 4575)


type: ci
user: drh
comment:
  Reorganize the code for the homegrown recursive mutexes.  Fix a place
  in the previous check-in where the #ifdef label was incorrect.
  Ticket #2804. (CVS 4576)


type: ci
user: drh
comment:
  Change the BTree so that it uses the Pagers temporary page space when
  reorganizing the rows on a page, rather than mallocing for space of
  its own.  In this way, we avoid having to deal with a malloc failure
  deep down inside the page reorganizer.  Ticket #2806 (CVS 4577)


type: ci
user: drh
comment:
  Add the {quote: StrAccum} object
   for accumulating strings.  Revamp xprintf to use
  the new object.  Rewrite the group_concat() function to use the new object.
  Productize and test the group_concat() function. (CVS 4578)


type: ci
user: danielk1977
comment:
  When using an index to scan a database table, read column data from the index in preference to the table. This increases the likelihood that the table will not be required at all. (CVS 4580)


type: ci
user: drh
comment:
  Add a few function requirements numbers to interfaces in the comments
  of sqlite3.h.in.  This is experimental. (CVS 4583)


type: ci
user: danielk1977
comment:
  When parsing CREATE INDEX statements from the sqlite_master table, do not search the temp database schema for the corresponding table. Only consider the database for which the schema is being parsed. Ticket #2817. (CVS 4587)


type: ci
user: drh
comment:
  Make sure statement journals are initiated when doing DROP operations
  (since the DROP might fail after sqlite_master changes).  Also make
  sure statement journals are initiated if there are pending SELECT
  statements.  Ticket #2820. (CVS 4591)


type: ci
user: drh
comment:
  Add the ability to change the autovacuum status of an existing database
  by setting the auto_vacuum pragma then running the VACUUM command. (CVS 4592)


type: ci
user: drh
comment:
  Continuing work on the C/C++ interface requirements that appears as
  comments in sqlite.h.in. (CVS 4594)


type: ci
user: drh
comment:
  Use the specified buffer length, not the maximum buffer length in
  unixFullPathname() and related functions. (CVS 4595)


type: ci
user: drh
comment:
  In shared-cache mode, make sure the busy hander invoked is the
  busy handler associated with the database connection that caused
  the lock contention in the first place. (CVS 4598)


type: ci
user: shess
comment:
  Change prefix search from O(N*M) to O(NlogM).  The previous code
  linearly merged the doclists, so as the accumulated list got large,
  things got slow (the M term, a fucntion of the number of documents in
  the index).  This change does pairwise merges until a single doclist
  remains.  A test search of 't*' against a database of RFC text
  improves from 1m16s to 4.75s. (CVS 4599)


type: ci
user: drh
comment:
  Strengthen the tests for aggregate functions in GROUP BY clauses.
  Changes to test cases only.  No changes to code. (CVS 4601)


type: ci
user: drh
comment:
  Better resolution of ORDER BY terms in compound queries.  Candidate
  solution for ticket #2822.  Needs more testing and documentation
  before going final. (CVS 4602)


type: ci
user: drh
comment:
  Fix a bug in the compilation procedures for the Linux shared library
  that includes the TCL bindings. (CVS 4604)


type: ci
user: danielk1977
comment:
  Further modifications to do with ORDER BY and compound SELECT queries. Related to ticket #2822. (CVS 4606)


type: ci
user: drh
comment:
  Make sure the windows driver responds correctly to the
  SQLITE_OPEN_DELETEONCLOSE flag.  Ticket #2829. (CVS 4607)


type: ci
user: drh
comment:
  Build the CLI using the amalgamation.  Relax the limit on SQL statement
  length when building the CLI. (CVS 4609)


type: ci
user: drh
comment:
  Add a new OP_StackDepth opcode to help detect VDBE stack leaks early,
  before they cause damage.  For diagnostics in ticket #2832. (CVS 4612)


type: ci
user: drh
comment:
  Fix database corrupting code generation error for UPDATE OR REPLACE.
  ticket #2832.  Still need to add test cases and additional defensive
  logic to avoid future occurrences of similar problems. (CVS 4613)


type: ci
user: danielk1977
comment:
  Fix some problems similar to #2832, but caused by triggers instead of an OR REPLACE clause. (CVS 4615)


type: ci
user: danielk1977
comment:
  Try to find some more stack leaks by adding OP_StackDepth to loops in DML statements. None were found. (CVS 4617)


type: ci
user: drh
comment:
  Minor cleanup changes on the OP_StackDepth opcode.  Added the
  sidedelete test for additional testing of ticket #2832. (CVS 4619)


type: ci
user: drh
comment:
  Towards getting ORDER BY to match against the correctin columns.
  This version only looks at the left-most column in a compound SELECT.
  That is the correct thing to do, but not what SQLite has historically done. (CVS 4620)


type: ci
user: drh
comment:
  ORDER BY in a compound SELECT will first match against the left-most SELECT.
  If there is no match there, it begins working its way to the right. (CVS 4621)


type: ci
user: danielk1977
comment:
  Adjust the test suite to account for recent changes related to #2822. Most changes are related to English language error messages only. (CVS 4622)


type: ci
user: danielk1977
comment:
  Return an error if the user attempts to rename a view. Related to (but not a fix for) #2831. (CVS 4623)


type: ci
user: drh
comment:
  Add new makefile target for "testcli" that builds a CLI using individual
  source files instead of the amalgamation.  Ticket #2838. (CVS 4625)


type: ci
user: danielk1977
comment:
  Add test cases for errors in "IN(SELECT ...)" expressions where the SELECT statement is a compound SELECT. No faults found. (CVS 4626)


type: ci
user: drh
comment:
  Change all instances of "it's" in comments to either "its" or "it is",
  as appropriate, in case the comments are ever again read by a pedantic
  grammarian.  Ticket #2840. (CVS 4629)


type: ci
user: drh
comment:
  Change to the crash simulator to give better diagnostics in case it
  runs out of memory while using the mem3.c allocator. (CVS 4632)


type: ci
user: drh
comment:
  When SQLITE_MAX_SQL_LENGTH is 0, disable the limit.  Make the default 0.
  Once again build the sqlite3 CLI from individual source files so that
  it can be built on systems that lack tclsh.  Tickets #2845 and #2846. (CVS 4636)


type: ci
user: danielk1977
comment:
  Add the ioerr3.test file, that found an error in br3317. The error is not present in this branch. (CVS 4640)


type: ci
user: danielk1977
comment:
  Fix for #2854. "BEGIN EXCLUSIVE" excludes other shared cache users from using the database. (CVS 4642)


type: ci
user: danielk1977
comment:
  Fix a race condition that can occur when reloading the database schema in shared-cache mode. (CVS 4643)


type: ci
user: drh
comment:
  Mem3.c enhanced so that an allocation of N bytes only requires (N+11)&~7 bytes
  instead of (N+15)&~7 bytes of heap storage.  Minimum heap usage per
  allocation is still 16 bytes.  8-byte alignment is preserved. (CVS 4644)


type: ci
user: danielk1977
comment:
  Add experimental pragma "quick_check", a reduced version of integrity_check that runs without most of the overhead of the full integrity_check. (CVS 4645)


type: ci
user: pweilbacher
comment:
  move variable declaration to be able to compile sqlite3_mutex_alloc() with older compilers (like EMX/gcc 2.8.1) (CVS 4646)


type: ci
user: pweilbacher
comment:
  fix case in os2GetTempname() where none of the usual environment variables are set to not overwrite two unrelated bytes (CVS 4648)


type: ci
user: danielk1977
comment:
  Define SQLITE_CORE=1 at the start of the amalgamation file for the benefit of any extension source code (i.e. fts3) appended to it. Ticket #2858. (CVS 4649)


type: ci
user: danielk1977
comment:
  Optimize trigger compilation to avoid populating the OLD.* and NEW.* pseudo-tables with data that will never be used. Some testing to come. (CVS 4651)


type: ci
user: drh
comment:
  Begin setting a foundation on which to convert the VM from a stack-based
  to a register-based machine.  Everything is still mostly stack based with
  this check-in.  This change merely begins adding infrastructure to support
  a register-based architecture. (CVS 4652)


type: ci
user: danielk1977
comment:
  Take advantage of the fact that b-tree cursors need not be closed while other cursors modify their tables to simplify trigger program generation code. (CVS 4654)


type: ci
user: drh
comment:
  Add opcodes OP_ResultRow and OP_RegMakeRec which are register-based
  equivalents to OP_Callback and OP_MakeRecord.  Use the new opcodes. (CVS 4656)


type: ci
user: danielk1977
comment:
  Combine the eDest and iParm arguments to sqlite3Select() into a single type - "SelectDest". (CVS 4657)


type: ci
user: danielk1977
comment:
  Minor optimizations for sub-selects in EXISTS(...) expressions: Discard any DISTINCT or ORDER BY clauses and do not calculate any column values. (CVS 4658)


type: ci
user: drh
comment:
  Refactoring the VM.  The P3 parameter is changed to P4.  A P5 parameter is
  added (though not currently used.)  Add routines sqlite3VdbeAddOpX() where
  X is one of 0, 1, 2, 3, or 4. (CVS 4660)


type: ci
user: drh
comment:
  Revamp sqlite3VdbeAddOpList() so that the structure holds integer values
  for P1, P2, and P3. (CVS 4661)


type: ci
user: danielk1977
comment:
  Change OP_OpenRead and OP_OpenWrite so that the database number is read from the P3 operand, not the stack. (CVS 4663)


type: ci
user: danielk1977
comment:
  Change the OP_Insert opcode to read the key and data to insert from memory cells, not the stack. (CVS 4666)


type: ci
user: danielk1977
comment:
  Change the VdbeOp.p4 union to include specific pointer types for the various values of VdbeOp.p4type. (CVS 4667)


type: ci
user: danielk1977
comment:
  Modify OP_VUpdate to read arguments from a range of memory cells instead of from the stack. (CVS 4668)


type: ci
user: drh
comment:
  Registers (aka memory cells) in the VM are now numbered starting with 1
  instead of 0.  A register number of 0 means "no such register". (CVS 4669)


type: ci
user: drh
comment:
  Change the sqlite3ExprCode() function so that callers can request that
  the result of the expression be left on the stack or in a register. (CVS 4673)


type: ci
user: drh
comment:
  Replace the NOPUSH_MASKs with a bit-vector mechanism that can contain
  several different properties about each opcode. (CVS 4677)


type: ci
user: drh
comment:
  Get rid of OP_Dup, OP_MemStore, OP_MemLoad, and OP_MemMove.  Replace
  with OP_Copy, OP_SCopy, and OP_Move.  Add the infrastructure for
  operation properties in1, in2, in3, out2, and out3 but do not yet
  use any of these. (CVS 4682)


type: ci
user: drh
comment:
  Modify OP_RegMakeRec to take a base register and count and optionally
  store results in the register specified by P3. (CVS 4689)


type: ci
user: drh
comment:
  Progress toward registerification of the constraint checking logic for
  INSERT and UPDATE. (CVS 4693)


type: ci
user: drh
comment:
  All essential opcodes can now operate out of registers and completely
  avoid the stack.  Many still optionally use the stack to support legacy
  code generation, but the stack is not required.  The next step is to
  update all code generation to avoid using the stack. (CVS 4700)


type: ci
user: drh
comment:
  Do explicit range tests before attempting to convert a 64-bit float
  into a 64-bit integer.  Some systems (windows) seem to throw exceptions
  if the conversion is out of range.  Ticket #2880. (CVS 4706)


type: ci
user: drh
comment:
  The sqlite3_trace() callback now prints a message as each trigger fires
  within a statement. (CVS 4709)


type: ci
user: danielk1977
comment:
  Work around using (regexp) in the (ifcapable) function of the test suite. So that simpler versions of tcl can call it. (CVS 4713)


type: ci
user: drh
comment:
  Registerification of the VDBE is complete.  The operand stack has been
  removed from the code.  All instructions operate out of registers only. (CVS 4718)


type: ci
user: drh
comment:
  Fix a bug in the test scripts that was preventing many scripts from
  running with all.test.  Lots of hidden failures now come to light. (CVS 4723)


type: ci
user: danielk1977
comment:
  Add a test (and fix) for possible corruption if malloc() fails during a CREATE INDEX statement, the application continues with the transaction, then crashes. (CVS 4725)


type: ci
user: drh
comment:
  Remove the OP_HexBlob instruction and code OP_Blob directly.  Reduce
  the amount of memory allocation required to encode blob literals.
  Remove the "out2" instruction type.  Other minor optimizations. (CVS 4726)


type: ci
user: drh
comment:
  Cleanup and simplification of constraint processing.  Simplifications
  to the VM for better test coverage. (CVS 4729)


type: ci
user: drh
comment:
  Add the RTRIM collating sequence.  Only implemented for UTF8.  Still
  considered experimental and may be removed if we find adverse impact
  elsewhere in the system. (CVS 4732)


type: ci
user: drh
comment:
  Changes to lemon to generate additional comments in the output file and
  to remove unreachable code.  Additional test cases for improved test
  coverage. (CVS 4736)


type: ci
user: danielk1977
comment:
  Move the test (sqlite3_simulate_device) functionality out of the main code and into a test vfs. (CVS 4737)


type: ci
user: drh
comment:
  Remove dead code from the lemon-generated parser.  Better testing
  of the sqlite3_file_control() interface, and in particular make sure
  the interface works on :memory: databases. (CVS 4738)


type: ci
user: drh
ecomment:
  Detect and report a particular type of database corruption that would
  formerly cause a segfault. (CVS 4739)

comment:
  Detect and report a particular type of database corruption that would
  formerly cause a segfault. (CVS 4739)


type: ci
user: drh
comment:
  Detect and report a particular type of database corruption that would
  formerly cause a segfault. (CVS 4740)


type: ci
user: drh
comment:
  Add the fault injector module in fault.c.  Use it as a basis for memory
  allocation failure testing. (CVS 4742)


type: ci
user: drh
comment:
  Improved test coverage for the tokenizer and sqlite3_complete() interface.
  Fix bugs in parsing blob literals and SQL variables beginning with $. (CVS 4743)


type: ci
user: drh
comment:
  Make sqlite3SafetyOn() and sqlite3SafetyOff() macros which disappear when
  compiling without -DSQLITE_DEBUG=1. (CVS 4744)


type: ci
user: drh
comment:
  Improvements to test coverage in the lemon-generated parser and in the
  sqlite3_get_table() interface. (CVS 4745)


type: ci
user: danielk1977
comment:
  Fix a segfault that may follow a malloc failure during compilation of an INSTEAD OF trigger. (CVS 4749)


type: ci
user: drh
comment:
  Error messages says "no such view" instead of "no such table" when
  trying to DROP a VIEW that does not exist. (CVS 4750)


type: ci
user: drh
comment:
  Disable the likely() and unlikely() macros as they do not work some
  older versions of GCC. (CVS 4754)


type: ci
user: drh
comment:
  Version number to 3.5.5.  Include FTS3 in the amalgamation by default
  (but disabled unless compiled with -DSQLITE_ENABLE_FTS3).  Fix a memory
  allocation problem. (CVS 4757)


type: ci
user: drh
comment:
  Fix assertion fault in sqllimits1.test encountered when auto_vacuum is
  enabled.  Correct the sqllimit1 tests to account for extra pages inserted
  by auto_vacuum. (CVS 4759)


type: ci
user: drh
comment:
  Make sure virtual table interfaces are not invoked after EOF when
  the virtual table appears in an outer join.  Ticket #2894. (CVS 4761)


type: ci
user: drh
comment:
  Fixes to API definition comments in sqlite.h.in.  Updates to the
  build script - ticket #2874. (CVS 4762)


type: ci
user: drh
comment:
  Fix a problem with virtual tables and left joins introduced by
  check-in (4761).  Ticket #2894 and #2913. (CVS 4765)


type: ci
user: pweilbacher
comment:
  make os2Truncate() actually do something and fix os2FullPathname() to be more elegant and work more correctly in all cases (Ticket #2904) (CVS 4766)


type: ci
user: drh
comment:
  Modify the printf test script so that it does not depend on the platform
  printf, so that we do not spurious test failures when moving from one
  platform to another. (CVS 4767)


type: ci
user: drh
comment:
  Minor fixes to FTS3 so that it works better when appended to the end
  of the amalgamation. (CVS 4769)


type: ci
user: pweilbacher
comment:
  Use the buffer size as limit for temp file names. This is done for windows too, see check-in (4595). (CVS 4771)


type: ci
user: drh
comment:
  Add more test cases to prove that ticket #2920 does not exist in
  CVS HEAD.  The problem was previously fixed by the changes to
  ticket #2686.  Ticket #2920 is a duplicate of #2686. (CVS 4772)


type: ci
user: danielk1977
comment:
  When OMIT_TRIGGER is defined, provide a no-op macro for sqlite3SelectMask(). Fix for #2918. (CVS 4773)


type: ci
user: drh
comment:
  Delete unused "pager3_refinfo_enable" flag and its associated debugging
  macros.  Ticket #2923. (CVS 4774)


type: ci
user: drh
comment:
  Add the sqlite3_result_error_code() application interface.  Use it in the
  ATTACH function so that a failed attach returns a proper error code.
  Ticket #2914. (CVS 4775)


type: ci
user: drh
comment:
  Do not release registers used to hold the results of a compound select
  after just the first select has run.  Ticket #2927.  For now, we will
  never release the registers used to hold the result set, since the same
  register set will be used for each select.  This is not an unacceptable
  register leak and it is the safest approach. (CVS 4778)


type: ci
user: danielk1977
comment:
  Change the test code used for speed tests so that it does not throw an exception if the time command returns "0 microseconds per iteration". (CVS 4779)


type: ci
user: danielk1977
comment:
  Modify shared.test to do case independent comparison of filenames. To account for the fact that "c:/test.db" and "C:/test.db" are the same file. (CVS 4780)


type: ci
user: drh
comment:
  When materializing a view for an UPDATE or DELETE make use of the WHERE
  clause to limit the number of rows materialized.  Ticket #2938. (CVS 4782)


type: ci
user: danielk1977
comment:
  Where possible, avoid freeing buffers allocated for vdbe memory cells in case they can be reused. (CVS 4783)


type: ci
user: drh
comment:
  Add the experimental mem5.c memory allocator.  Allocate the content part
  of cache pages separately from the header.  (See check-ins (4495) and (4409)). (CVS 4789)


type: ci
user: drh
comment:
  Do not apply the query flattening optimization when the outer query is an
  aggregate and the inner query contains an ORDER BY clause.  Ticket #2943. (CVS 4791)


type: ci
user: drh
comment:
  Add the Bitvec object for tracking which pages have been journalled.
  This reduces memory consumption and runs faster than the bitmap approach
  it replaced. (CVS 4794)


type: ci
user: drh
comment:
  Add the memory fault simulator to mem5.c.  Enable soft heap limit on mem5.c.
  Limit the size of hash tables and the vdbefifo when using mem5.c. (CVS 4795)


type: ci
user: drh
comment:
  Use 16-bit integers for indexing within a page in btree.  Tighter
  bounds on the maximum number of cells within one page. (CVS 4796)


type: ci
user: drh
comment:
  Avoid the use of UTF16 functions in code that is part of a build when
  UTF16 support is omitted.  Ticket #2949. (CVS 4799)


type: ci
user: drh
comment:
  Remove an instance of sprintf() from the VM implementation.  SQLite should
  not use sprintf() from the C library - it has its own implementation. (CVS 4800)


type: ci
user: drh
comment:
  Make multiple attempts to delete files marked DELETE_ON_CLOSE under
  WinCE.  Ticket #2950. (CVS 4802)


type: ci
user: drh
comment:
  Fix a bug in the LIKE optimizer that occurs when the last character
  before the wildcard is an upper-case 'Z'.  Ticket #2959. (CVS 4807)


type: ci
user: drh
comment:
  Add an assert() to verify that the dirty-page list in the pager is
  valid before using it. (CVS 4810)


type: ci
user: drh
comment:
  Add commentary to clarify what is happening when an I/O error occurs while
  writing dirty pages to the database file. (CVS 4811)


type: ci
user: drh
comment:
  Additional documentation and tests making it clear that whenever
  sqlite3_prepare() fails it sets *ppStmt to NULL. (CVS 4818)


type: ci
user: mlcreech
comment:
  Build amalgamation by default on autoconf-driven builds, add
  --disable-amalgamation option to configure script (CVS 4820)


type: ci
user: drh
comment:
  Correctly handle I/O errors that occur during OsUnlock().  Before this
  fix, an I/O error during OsUnlock() could lead to database corruption.
  That is not a serious problem, though, since errors during OsUnlock()
  are not possible on most systems. (CVS 4838)


type: ci
user: drh
comment:
  Make sure all necessary mutexes are held prior to initializing the
  schema in sqlite3_table_column_metadata(). (CVS 4841)


type: ci
user: danielk1977
comment:
  Move a comment within the Parse structure to make it more accurate. No actual code changes. (CVS 4842)


type: ci
user: mlcreech
comment:
  Replace SQLITE_EXTERN with SQLITE_API in exported variables when generating
  the amalgamation.  Should fix #2982 (CVS 4845)


type: ci
user: drh
comment:
  Remove the #includes of stdlib.h and sys/types.h from sqliteInt.h since
  they are never used and because they broke the build. (CVS 4851)


type: ci
user: danielk1977
comment:
  Do not segfault after a parse error in a sub-select in a statement of the form "DELETE WHERE ... IN(sub-select)". Ticket #2991. (CVS 4854)


type: ci
user: drh
comment:
  Skip tests that require setting detailed unix permissions on files when
  running on filesystems such as AFP that do not support that capability. (CVS 4866)


type: ci
user: danielk1977
comment:
  Return an error when an xBestIndex() method indicates that it intends to use the value of an unusable constraint. Related to #2998. (CVS 4867)


type: ci
user: drh
comment:
  Put the statement journal in the temp-file directory since that
  directory is often on optimized storage such as RAM disk and because
  unlike the main journal, the statement journal does not need to
  be colocated with the database file. (CVS 4868)


type: ci
user: drh
comment:
  Abandon the OR optimization following a memory allocation failure,
  to avoid referencing uninitialized memory. (CVS 4872)


type: ci
user: drh
comment:
  Add the ability to simulate out-of-memory errors when using the default
  memory allocator, mem1.c.  Fix a bug that this enhancement revealed. (CVS 4875)


type: ci
user: drh
comment:
  Update the documentation to distinguish between protected and unprotected
  sqlite3_value objects. (CVS 4879)


type: ci
user: drh
comment:
  Remove the dependency on the direct btree interface from as many test
  scripts as is practical.  Fix a bug in the output limiter of the
  integrity_check pragma that came up while making this change. (CVS 4880)


type: ci
user: drh
comment:
  When a parse of the sqlite_master table fails, include the name of the
  object being parsed as part of the error message. (CVS 4881)


type: ci
user: drh
comment:
  Add a new api sqlite3_randomness() for providing access to SQLite's
  internal PRNG.  Add sqlite3_test_control() verbs for controlling the PRNG. (CVS 4882)


type: ci
user: drh
comment:
  Move SQL functions used for testing only out of func.c and into a new
  test file named test_func.c.  Use sqlite3_auto_extension() to make sure
  the test functions appear in every database connection. (CVS 4883)


type: ci
user: drh
comment:
  Create the test_destructor16() test SQL function to enhance test coverage.
  Prior to check-in (4883), the test_destructor() function was sufficient,
  but we now need separate functions since the implementation is restricted
  to using the published API. (CVS 4884)


type: ci
user: drh
comment:
  Initialize the MD5 SQL functions from test_func.c instead of using
  conditional compilation in tclsqlite.c. (CVS 4885)


type: ci
user: drh
comment:
  Use the xCurrentTime method of the default VFS instead of stdlib time() to
  get the current time when compiling with SQLITE_OMIT_DATETIME_FUNCS. (CVS 4887)


type: ci
user: drh
comment:
  Undefine the "isView" macro when compiling with SQLITE_OMIT_VIEW so that
  the macro does not interfer with subsequent modules in the amalgamation. (CVS 4888)


type: ci
user: drh
comment:
  Add a new interface, sqlite3_context_db_handle(), that returns the database
  connection pointer for an application-defined function. (CVS 4889)


type: ci
user: drh
comment:
  Fix the load-extension mechanism so that tests build with or without it.
  This check-in also includes prototypes for the new sqlite3_limit()
  interface, but no implementation. (CVS 4892)


type: ci
user: danielk1977
comment:
  Allow a VACUUM operation to change the page-size in the same way as it can be used to change a database between auto-vacuum and normal mode. (CVS 4896)


type: ci
user: drh
comment:
  Initial implementation of per-connection limits and the sqlite3_limit() API.
  The sqllimits1.test script crashes.  SQLITE_LIMIT_PAGE_COUNT and
  SQLITE_LIMIT_VDBE_OP are currently ignored. (CVS 4897)


type: ci
user: drh
comment:
  Reinstate test cases for the limit tests.  The sqlite3_limit() API is now
  tested and working. (CVS 4899)


type: ci
user: drh
comment:
  In the sqlite3_limit() interface, take out the feature where zero means
  use the hard upper bound.  If an application wants the hard upper bound,
  it can set the limit to 0x7fffffff and the bound will be automatically
  truncated. (CVS 4900)


type: ci
user: drh
comment:
  Add a completely new testing system for the Bitvec object.  The new
  testing system uses sqlite3_test_control() instead of unpublished
  APIs.  Now provides 100% condition/decision coverage.  Obscure bugs
  in Bitvec found and fixed as a result of the enhanced coverage. (CVS 4902)


type: ci
user: drh
comment:
  Make sure the text result of an aggregate function has the correct
  encoding.  Ticket #3009. (CVS 4903)


type: ci
user: drh
comment:
  Defer allocating memory space to hold the array of column values and
  names in sqlite3_exec() until there is a need to use the array.  In
  the common case where there is no callback, this avoids a malloc() call. (CVS 4905)


type: ci
user: drh
comment:
  Add the SQLITE_OMIT_DECLTYPE compile-time option.  Remove more code when
  SQLITE_ENABLE_COLUMN_METADATA is not defined. (CVS 4906)


type: ci
user: drh
comment:
  Add the speed1p.test script.  Like speed1.test except that it tries to take
  advantage of prepared statements. (CVS 4907)


type: ci
user: drh
comment:
  Removed the direct btree tests - part of the ongoing effort to test by
  calling only public interfaces.  Modify the sqlite3VdbeRecordCompare
  interface to used a pre-parsed second key - resulting in a 13%
  performance improvement on speed1p.test. (CVS 4911)


type: ci
user: danielk1977
comment:
  Have each {quote: BtShared} structure hang on to a buffer of just under page-size bytes for temporary use. This reduces the number of calls to malloc(). (CVS 4914)


type: ci
user: drh
comment:
  Modify the {quote: IdxDelete} opcode so that it takes an array of registers rather
  than a record formed using {quote: MakeRecord.}  This avoids a needless packing
  and unpacking of the record to be deleted. (CVS 4916)


type: ci
user: drh
comment:
  Make sure an imbalance in the number of columns on a compound SELECT is
  detected and reported as an error before it can cause an assertion fault
  or array-bounds overflow in the code generator.
  Oops: part of the fix for ticket #3015 got included with this
  check-in by mistake. (CVS 4917)


type: ci
user: drh
comment:
  Make sure ON clause terms of a LEFT JOIN are not used with an index on the
  right table of the join.  Ticket #3015. (CVS 4919)


type: ci
user: drh
comment:
  Change comment in sqliteLimit.h to correctly describe the
  SQLITE_MAX_ATTACHED #define.  Ticket #3016. (CVS 4920)


type: ci
user: drh
comment:
  Work around problems with compilers that do not allow C preprocessor
  macros with empty arguments. (CVS 4921)


type: ci
user: danielk1977
comment:
  Changes to delay freeing buffers associated with vdbe memory cells until either sqlite3_finalize() or sqlite3_release_memory() is called. (CVS 4922)


type: ci
user: danielk1977
comment:
  Allow creation of ephemeral pseudo-tables - pseudo-tables that copy a pointer to a row when inserted instead of copying the row data. (CVS 4924)


type: ci
user: drh
comment:
  Allow the xAccess method in the VFS to return -1 to signal an I/O
  error, and in particular an SQLITE_IOERR_NOMEM. (CVS 4925)


type: ci
user: danielk1977
comment:
  If memory is leaked when running a test script with the --malloctrace option, write out a file called leaks.sql in the same format as mallocs.sql containing th e leaked applications. The same tools can then be used to examine the stack traces associated with leaked allocations. (CVS 4926)


type: ci
user: drh
comment:
  Patch to the new memory tracing logic that allows it to build even if
  memory debugging is turned off. (CVS 4927)


type: ci
user: danielk1977
comment:
  Changes to the Mem structure to reduce the frequency of freeing and reallocating the dynamic buffer. (CVS 4928)


type: ci
user: drh
comment:
  Change the pager's sector size algorithm to the maximum of the size
  reported by xSectorSize() from the VFS and 512.  It was using the
  maximum of xSectorSize() and the current page size, but that was adding
  an extra 512 bytes to the size of the journal file in the common case. (CVS 4929)


type: ci
user: danielk1977
comment:
  Fix for #3022. Handle queries like "SELECT min(b) FROM T WHERE a = X AND b > X" when there is an index on (a,b). (CVS 4930)


type: ci
user: danielk1977
comment:
  Do not incorrectly report a malloc() failure when allocating 0 bytes. Fixes a problem in bind.test. (CVS 4931)


type: ci
user: drh
comment:
  Make the sqlite3BtreeMoveto routine a no-op if the cursor is already pointing
  at the cell we are trying to move to. (CVS 4938)


type: ci
user: danielk1977
comment:
  In setQuotedToken(), only make a malloced copy if the argument contains one or more " characters. (CVS 4941)


type: ci
user: drh
comment:
  Avoid duplicate OP_Column opcodes by remembering prior results.
  This is similar to CSE, but only applies to columns. (CVS 4943)


type: ci
user: drh
comment:
  Add the veryquick.test script for a very fast overview test that omits
  all i/o and malloc testing. (CVS 4944)


type: ci
user: drh
comment:
  Break up the implementation of OP_Move, OP_Copy, and OP_SCopy to reduce
  the number of branch instructions. (CVS 4945)


type: ci
user: mlcreech
comment:
  Add a configure option for using gcov (makes things easier for versions of
  GCC that fail to build otherwise) (CVS 4947)


type: ci
user: drh
comment:
  Fix the CSE mechanism so that it takes into account column affinity
  changes that might be imposed by comparison operators. (CVS 4949)


type: ci
user: drh
comment:
  Avoid factoring single-instruction constants that end up getting replaced
  by an SCopy instruction. (CVS 4952)


type: ci
user: danielk1977
comment:
  Change the allocator in mem2.c (used when SQLITE_MEMDEBUG is defined) so that allocations are not rounded up to the nearest 4 byte boundary. Fix a couple of errors in malloc.test related to sqlite3OsAccess() returning -1. (CVS 4956)


type: ci
user: danielk1977
comment:
  Avoid an out-of-bounds read in sqlite3_prepare() and fix a case where the output variable *pzTail was being set incorrectly. Fix for #3027. (CVS 4957)


type: ci
user: danielk1977
comment:
  Instead of calling sqlite3_exec() to evaluate "PRAGMA encoding = UTF16" in sqlite3_open16(), set the connection encoding flag directly. (CVS 4959)


type: ci
user: drh
comment:
  Changes speedtest8 and speedtest16 so that the database file can be specified
  on the command-line.  Allows speed testing against a :memory: database. (CVS 4960)


type: ci
user: drh
comment:
  Make sure the zTail return from sqlite3_prepare() is initialized even
  if there is a malloc failure. (CVS 4963)


type: ci
user: drh
comment:
  Add the sqlite3PutVarint32 routine as an alternative to sqlite3PutVarint.
  Gives 0.5% speed increase. (CVS 4968)


type: ci
user: drh
comment:
  Add three new test cases to speed4p.test.  Two of the three do single-row
  updates based on rowid and on primary key. (CVS 4972)


type: ci
user: drh
comment:
  Document the fast that the result flag combinations to
  sqlite3_open_v2() that are not defined in the documentation results
  in undefined behavior.  Ticket #3037. (CVS 4974)


type: ci
user: drh
comment:
  Make sure all memory allocations are 8-byte aligned.  Ticket #3040.
  Note that the mem3.c memory allocator returns 4-byte aligned memory
  allocations.  But as mem3.c is intended for use in 32-bit embedded
  systems, we are not going to change that. (CVS 4978)


type: ci
user: drh
comment:
  Verify that a RAISE(ROLLBACK,...) works like RAISE(FAIL,...) when not
  inside a transaction.  Ticket #3035. (CVS 4979)


type: ci
user: danielk1977
comment:
  Add the --ostrace and --ossummary options to tester.tcl. To log calls the vfs layer from within test scripts. (CVS 4984)


type: ci
user: drh
comment:
  Correctly handle virtual tables that are created and dropped all within
  a single transaction.  Ticket #2994. (CVS 4985)


type: ci
user: drh
comment:
  Speed improvements by removing unnecessary memset() operations.
  Also: do not resize the opcode array of a virtual machine to its
  minimum size after code generation completes.  The extra resize
  merely uses time. (CVS 4987)


type: ci
user: danielk1977
comment:
  Remove entries from the sqlite_stat1 table whenever an index is dropped. Related to #3033. (CVS 4989)


type: ci
user: danielk1977
comment:
  Remove a recently added assert() that is failing with certain compilers on 32-bit platforms. Ticket #3043. (CVS 4990)


type: ci
user: danielk1977
comment:
  Modify speedtest8.c so that it can use the logging from test_osinst.c when HAVE_OSINST is defined. (CVS 4997)


type: ci
user: drh
comment:
  Add out-of-range tests on the first parameter to sqlite3_limit().
  Add the ability to record tests that have been skipped due to
  configuration limitations. (CVS 5009)


type: ci
user: drh
comment:
  Fix a bug in the RTRIM collating sequence discovered while working
  on condition/decision branch coverage.  Increase test coverage of
  the date/time functions. (CVS 5010)


type: ci
user: drh
comment:
  Fix a code generator bug caused by the new CSE optimization.  Add test cases
  to prevent a recurrence. (CVS 5011)


type: ci
user: drh
comment:
  Do not attempt to omit unused columns of a view in an instead-of trigger
  since sometimes those columns can be used in ways that we do not expect.
  Ticket #3055. (CVS 5012)


type: ci
user: pweilbacher
comment:
  Support UTF-8 filenames on OS/2 by converting them to and from the local codepage. Ticket 3052. (CVS 5014)


type: ci
user: drh
comment:
  Make sure the database connection mutex is held before calling
  sqlite3SafetyOn() or sqlite3SafetyOff().  Ticket #3059. (CVS 5016)


type: ci
user: drh
comment:
  Fix the bind.test test script so that the tests for zeros embedded in
  strings work correctly for UTF-16 encoded databases. (CVS 5020)


type: ci
user: drh
comment:
  In exclusive locking mode, commit by zeroing the first 28 bytes of the
  journal file, not by truncating the journal.  Overwriting is much faster
  than truncating. (CVS 5023)


type: ci
user: drh
comment:
  Additional work on ticket #3015.  The previous fix (check-in (4919)) did
  not appear to work in all cases and it disabled indexing in some places
  where it should not have.  New test cases added to help insure that the
  current fix is better. (CVS 5026)


type: ci
user: danielk1977
comment:
  Allow OP_MoveGt and similar to use an array of registers instead of a serialized record. Modify one type of index range scan to use this. (CVS 5028)


type: ci
user: drh
comment:
  Comment and variable-name cleanup in where.c.  Add testcase() macros to
  insure adequate test coverage of table-driven logic. (CVS 5032)


type: ci
user: drh
comment:
  Continuing work on journal_mode.  Journal_mode=persist now appears to be
  working, though additional testing would be welcomed. (CVS 5033)


type: ci
user: drh
comment:
  Add some tests for journal_mode=off.  Need to come up with a way of handling
  rollback attempts when there is no journal. (CVS 5034)


type: ci
user: pweilbacher
comment:
  We should better not pass open file handles to child processes, so add respective flag for DosOpen(). (CVS 5037)


type: ci
user: danielk1977
comment:
  Ensure that it is not possible to open either virtual table or view columns using the blob API. Ticket #3078. (CVS 5041)


type: ci
user: danielk1977
comment:
  Fix an assert() failure that can occur if "journal_mode=off" is used in a build with the atomic-write optimization enabled. (CVS 5043)


type: ci
user: shane
comment:
  Consolidated varint macro usage from btreeInt.h, vdbe.c, and vdbeaux.c into sqliteInt.h and made their use consistent.   Slight improvements to varint32 macros. (CVS 5045)


type: ci
user: drh
comment:
  Use "(void)" function arguments in declarations instead of "()".  Both are
  legal but some pedantic compilers complain about the latter.  Ticket #3086. (CVS 5050)


type: ci
user: drh
comment:
  Fix the lemon parser generator so that it works again with the "error"
  symbol.  Ticket #3079 (CVS 5052)


type: ci
user: drh
comment:
  Fix the documentation to agree with long-standing behavior for the
  sqlite3_bind_parameter_name() interface on an ?NNN parameter.
  Ticket #2975. (CVS 5054)


type: ci
user: drh
comment:
  Delete requirement F12764 as it has never been implemented and the
  same effect can be easily achieved by other means.  Ticket #3085. (CVS 5055)


type: ci
user: drh
comment:
  Changes to test scripts to accommodate different architectures and different
  versions of Tcl. (CVS 5057)


type: ci
user: danielk1977
comment:
  Fix a shared-cache mode problem triggered when sqlite3_open16() was used to open the second or subsequent connections to a utf-8 database. (CVS 5059)


type: ci
user: drh
comment:
  Change the implementation of the NaN recognition to be more cross-platform.
  Ticket #3089. (CVS 5060)


type: ci
user: drh
comment:
  Add tests to create and drop a virtual table during a recursive call from
  an application-defined function.  Ticket #3080. (CVS 5061)


type: ci
user: shane
comment:
  Modified Varint32 functions to disable code for single-byte handling as it is already handled by their respective macro forms. (CVS 5062)


type: ci
user: drh
comment:
  Make sure that transactions are started on all virtual tables that
  changes in a single statement, not just the first.  Ticket #3083.
  Need to add test cases. (CVS 5063)


type: ci
user: drh
comment:
  Add test cases to verify that multiple virtual tables can be updated
  within a trigger and that xSync, xCommit, and xRollback are never called
  except following xBegin or xCreate.  Ticket #3083. (CVS 5064)


type: ci
user: drh
comment:
  Allow SQLITE_MAX_COLUMN to be set to zero at compile-time in order to
  disable the checks.  Also SQLITE_MAX_EXPR_DEPTH.  Ticket #3069. (CVS 5065)


type: ci
user: drh
comment:
  Always convert IEEE NaN into NULL.  Ticket #3060.  Add test cases to verify
  that this is happening. (CVS 5066)


type: ci
user: drh
comment:
  Fix a potential buffer overrun in sqlite3_mprintf() when a non-terminated
  string is passed to a "%s" format with a precision specifying the number
  of bytes to copy. (CVS 5067)


type: ci
user: shane
comment:
  Improved option handling in speedtest8.c.  Added -quiet and -priority options.  Added reporting of total user and system time. (CVS 5070)


type: ci
user: drh
comment:
  Add comment to speculate when setting journal_mode=OFF on VACUUM does not
  help performance.  No changes to code. (CVS 5071)


type: ci
user: shane
comment:
  Test versions of getVarint functions. The updates essentially utilize loop unrolling and some shifting/anding tricks to minimize the number of logical operations required. (CVS 5072)


type: ci
user: drh
comment:
  Fix a problem with journal files being created unnecessarily when doing
  an atomic write in exclusive access locking mode.  Fix a test script problem. (CVS 5075)


type: ci
user: drh
comment:
  Make sure that when a connection is blocking on a RESERVED lock that it
  continues after the lock is released.  Ticket #3093. (CVS 5078)


type: ci
user: danielk1977
comment:
  If an IO error occurs while locking the database and checking the cache validity, unlock the database before returning. Ticket #3030. (CVS 5083)


type: ci
user: drh
comment:
  Do not segfault in the CLI if sqlite3_open() fails to create a
  database connection object.  Ticket #3096. (CVS 5084)


type: ci
user: drh
comment:
  Better error messages when trying to open a large file using a version
  of SQLite that omits large file support.  Tickets #3096 and #3094. (CVS 5085)


type: ci
user: mlcreech
comment:
  Add AC_SYS_LARGEFILE to ensure large file support, update autotools-related files.
  Ticket #3094. (CVS 5087)


type: ci
user: mlcreech
comment:
  Add defines for _FILE_OFFSET_BITS and _LARGE_FILES if needed for large file support.
  Ticket #3094. (CVS 5088)


type: ci
user: danielk1977
comment:
  Fix a bug whereby the database file was not always being extended to its original size when rolling back an incremental-vacuum operation. (CVS 5089)


type: ci
user: pweilbacher
comment:
  The pathToDel element of the os2File structure should be in the local codepage instead of UTF-8 to make DosForceDelete() work. (CVS 5091)


type: ci
user: pweilbacher
comment:
  Fix most remaining testsuite failures on OS/2 by switching to exclusive locks that we meant to use from the start. (CVS 5092)


type: ci
user: mlcreech
comment:
  Only look for config.h if the autoconf-based build is being used, and don't inline it into the amalgamation. (CVS 5093)


type: ci
user: danielk1977
comment:
  Fix a problem causing the database to be truncated to the wrong size after an incremental-vacuum is performed on a database in full auto-vacuum mode. (CVS 5094)


type: ci
user: drh
comment:
  Fix a null-pointer dereference that can occur following a DISKFULL error
  while running VACUUM. (CVS 5096)


type: ci
user: danielk1977
comment:
  If an error occurs within xAccess(), it should return -1. Remove an assert()
  that was preventing it from doing so. (CVS 5098)


type: ci
user: shane
comment:
  Added test cases for corrupt SerialTypeLen header values, and additional check to improve detection of corrupt values. (CVS 5101)


type: ci
user: drh
comment:
  Use a 6-byte rather than an 8-byte encoding for integers between
  17592186044416 and 140737488355327.  Ticket #3100. (CVS 5105)


type: ci
user: danielk1977
comment:
  Add extra instrumentation to test_osinst.c. Also the --binarylog option to the test scripts. (CVS 5106)


type: ci
user: drh
comment:
  Change the implementation of sqlite3IsNaN() so that it works even if
  compiled using -ffinite-math-only.  Tickets #3101 and #3060. (CVS 5108)


type: ci
user: drh
comment:
  Back out check-in (5108).  The original isnan() implementation is preferred.  Ticket #3101 and #3060. (CVS 5109)


type: ci
user: drh
comment:
  Fix the ALTER TABLE RENAME algorithm so that it is not confused
  by comments in the CREATE TABLE statement.  Ticket #3102. (CVS 5110)


type: ci
user: drh
comment:
  Reformulate the constants for the minimum and maximum 64-bit signed
  integer to work better with some compilers.  Ticket #3105. (CVS 5113)


type: ci
user: drh
comment:
  New test cases to verify that SQLite handles bound NaN, +Inf, and -Inf
  floating point values correctly.  Improvements to the text->real conversion
  routine so that it generates +Inf and -Inf at appropriate times.
  Tickets #3101 and #3060. (CVS 5116)


type: ci
user: drh
comment:
  Use memcpy() instead of casting to copy the content of a long long int
  into a double.  Ticket #3101. (CVS 5117)


type: ci
user: pweilbacher
comment:
  Use short timeout for locking operations by default to be more in sync with the other platforms. (CVS 5119)


type: ci
user: drh
comment:
  Add "b" to fopen() in the hexio tests so that extra carriage returns are
  not inserted on win32 and OS/2.  Test harness change only - no changes
  to the core SQLite code. (CVS 5124)


type: ci
user: drh
comment:
  Update the pager so that it does not try to commit a transaction if there
  have been no changes to the database. (CVS 5127)


type: ci
user: drh
comment:
  Make the benign-fault setting recursive.  Make all malloc failures
  during a rollback benign since there is nothing we can do about them. (CVS 5128)


type: ci
user: drh
comment:
  Do a slow-path in GetVarint32() for varints that do not fit in 32 bits.
  This will only happen when trying to interpret a corrupt database file
  so speed is not critical. (CVS 5129)


type: ci
user: shane
comment:
  On instruction from DRH, only do malloc failure tests for O/S ops on non-Windows systems.  Better test fixture code will be introduced in 3.6.0 to add this coverage back in for Windows. (CVS 5130)


type: ci
user: danielk1977
comment:
  Add the "page_count" pragma. Returns a single integer - the number of pages in the specified database file. (CVS 5135)


type: ci
user: danielk1977
comment:
  Check that the encoding of values passed to sqlite3_bind_value() matches that of the database. (CVS 5138)


type: ci
user: danielk1977
comment:
  Disable the column cache when coding values that will be passed to the xFilter() method of a virtual table, in case the xFilter() implementation modifies the type or encoding of the value. Ticket #3121. (CVS 5139)


type: ci
user: drh
comment:
  Fix sqlite3Atoi64 to return true if handed a number of all zeros.  The
  failure to do this is benign as sqlite3Atoi64() is current used, but that
  might change in the future so it is good to go ahead and fix the function
  to return the correct result. (CVS 5142)


type: ci
user: shane
comment:
  SQLite stores native file names and paths for the database file.  Under Windows, (file normalize test.db) is expanded using UNIX type path separators which TCL recognizes interchangeably.   However, this means that the path reported by sqlite3_shared_cache_report doesn't match which causes the test case to fail.  Made minor change to test case to hopefully correct this on all platforms. (CVS 5143)


type: ci
user: drh
comment:
  Improvements to API documentation.  The sqlite3_exec() function now
  sets the result returned by sqlite3_errcode() when it receives an SQLITE_ABORT. (CVS 5144)


type: ci
user: danielk1977
comment:
  Do not attempt to write a master journal name to the (non-existent) journal file in "no-journal" mode. Fix for #3127. (CVS 5145)


type: ci
user: shane
comment:
  Added more DST boundary checks for 2006 and 2007.  Added check for suspect Windows DST implementations and warning about them.  Ticket #2322. (CVS 5147)


type: ci
user: drh
comment:
  Changes to the error handling policies of sqlite3_exec() to make them
  more consistent.  Changes to the documentation on the error handling
  polices of sqlite3_exec() so that the documentation and code agree. (CVS 5148)


type: ci
user: drh
comment:
  Corrections to the documented behavior of sqlite3_last_insert_rowid().
  (This change is unrelated to the problem reported by Bram de Jong.  That
  comes next.) (CVS 5149)


type: ci
user: drh
comment:
  Fix the VACUUM command so that it does not modify the changes counts
  reported by sqlite3_changes() or sqlite3_total_changes().  Update documentation
  on sqlite3_changes() and sqlite3_total_changes() to state that
  "DELETE FROM table" records a change count of zero. (CVS 5151)


type: ci
user: shane
comment:
  Update sqlite3_open*() documentation on shared cache/filename matching relationship.  Ticket #3132. (CVS 5152)


type: ci
user: drh
comment:
  Add the "volatile" keyword to variables in the Pager structure used for
  synchronization when memory management is enabled. (CVS 5153)


type: ci
user: drh
comment:
  Add a test case of preparing a statement with an nBytes parameter of 0
  and where the previous byte of the string is zero.  Ticket #3134. (CVS 5156)


type: ci
user: drh
comment:
  Fix the LIKE query optimizer so that it works with LIKE patterns
  ending in '@%' on NOCASE columns.  Ticket #3139. (CVS 5158)


type: ci
user: shane
comment:
  Explicitly typedef Pgno as 'u32' instead of 'unsigned int' to remove a few warnings/errors from native x86_64 compile. (CVS 5163)


type: ci
user: shane
comment:
  Updated to use localtime_s() in Windows build environments that support it.  Ticket #3126. (CVS 5164)


type: ci
user: shane
comment:
  In test3.c, use type 'u32' instead of 'unsigned int' to remove a warning/error from native x86_64 compile. (CVS 5165)


type: ci
user: drh
comment:
  Allow the SQLITE_MAX_EXPR_DEPTH compile-time parameter to be set to 0 in
  order to disable expression depth checking.  Ticket #3143. (CVS 5166)


type: ci
user: danielk1977
comment:
  Add a test to vacuum3.test to try to trick sqlite into using the wrong database page-size. Turns out there was no problem. (CVS 5167)


type: ci
user: shane
comment:
  Update makefile.in so that makefiles generated by configure correctly copy in rtree source files to tsrc. (CVS 5169)


type: ci
user: shane
comment:
  Omit declaration for functions that are only used by asserts if asserts aren't being used (NDEBUG). (CVS 5173)


type: ci
user: drh
comment:
  When initializing the sqlite_sequence entry for an AUTOINCREMENT table,
  make sure the value is an reasonable integer even if the initial insert
  failed.  Ticket #3148. (CVS 5175)


type: ci
user: shane
comment:
  Moved check and define for OS_WINCE from os_win.c to os.h (with the other OS_* defines).  This allows OS_WINCE to be available for mutex_w32.c which is included earlier than os_win.c in the almagamation. (CVS 5176)


type: ci
user: shane
comment:
  Consolidated inline assembly versions of "hwtime()" into hwtime.h.  Provided MSVC version.  Modified code for consistent use of hwtime().  Changed implementation to use sqlite_uint64 and sqlite_int64 instead of unsigned long long int and long long int for MSVC compiler support. (CVS 5178)


type: ci
user: shane
comment:
  Consolidated inline assembly versions of "hwtime()" into hwtime.h.  Provided MSVC version.  Modified code for consistent use of hwtime().  Changed implementation to use sqlite_uint64 and sqlite_int64 instead of unsigned long long int and long long int for MSVC compiler support. (CVS 5179)


type: ci
user: danielk1977
comment:
  Add "pragma journal_size_limit", used to limit the space consumed by persistent journal files left in the file-system after a transaction has concluded in exclusive (or journal_mode=persist) mode. (CVS 5185)


type: ci
user: danielk1977
comment:
  Modify the signatures of the sqlite3_vfs.xAccess and sqlite3_vfs.xCheckReservedLock functions. (CVS 5188)


type: ci
user: danielk1977
comment:
  Reorganize some of the code that detects expression trees with a depth greater than EXPR_MAX_DEPTH so that they are detected earlier. This further reduces the opportunities for stack overflow. (CVS 5189)


type: ci
user: danielk1977
comment:
  Remove the xGetTempname() method from the vfs structure. Temp files are now opened by passing a NULL pointer as the filename to xOpen(). (CVS 5190)


type: ci
user: drh
comment:
  Remove the subroutine return stack from the VDBE.  Return addresses
  for subroutines are now stored in registers. (CVS 5191)


type: ci
user: danielk1977
comment:
  Add the xGetLastError() member function to the sqlite3_vfs structure. It is neither called nor implemented at this point. (CVS 5192)


type: ci
user: danielk1977
comment:
  Avoid attempting to delete the journal file of a temporary pager when closing the pager. It will be deleted automatically by the OS layer. (CVS 5193)


type: ci
user: danielk1977
comment:
  Do not call xSync() from zeroJournalHdr() if the Pager.noSync flag is set (i.e. for temp files). (CVS 5194)


type: ci
user: danielk1977
comment:
  Invalidate sqlite3_blob* handles whenever an SQL statement is used to delete or modify the rows containing the open blob. Previously, modifying the table containing the open blob in any way invalidated the handle. This was too restrictive. (CVS 5199)


type: ci
user: drh
comment:
  Add a test case for the database corruption in the form of cell offsets
  out of range in an otherwise valid btree page. (CVS 5202)


type: ci
user: danielk1977
comment:
  Check that the offsets in the cell-offset array of a b-tree page are within range in sqlite3BtreeInit(). (CVS 5203)


type: ci
user: shane
comment:
  Added additional testcases for julianday calculations with midnight boundary for UTC time. (CVS 5209)


type: ci
user: drh
comment:
  Copy the latest VFS changes into the OS/2 implementation.  This is a blind
  edit - I have no way to compile or test OS/2. (CVS 5210)


type: ci
user: drh
comment:
  Add the ability to disable the "localtime" modifier in the date/time
  functions.  This might be necessary for systems that do not support
  localtime_r() or localtime_s(). (CVS 5212)


type: ci
user: drh
comment:
  Avoid unnecessary float->text->float conversions in date/time processing.
  This change necessary to reproduce the problem reported by BareFoot. (CVS 5213)


type: ci
user: drh
comment:
  Convert the date/time functions to work with milliseconds since the
  julian epoch internally (instead of days since the epoch) in order to avoid
  problems with floating-point roundoff error.  The interface is unchanged. (CVS 5215)


type: ci
user: drh
comment:
  Fix a typo in the date/time function tests.  Add additional cases to
  the zeroblob tests to make sure sqlite3_bind_zeroblob() does not use
  excess memory. (CVS 5216)


type: ci
user: drh
comment:
  Enhance zeroblob tests to use the sqlite3_memory_highwater in order to
  double-check that no large allocations are occurring. (CVS 5217)


type: ci
user: drh
comment:
  Progress toward implementation of sqlite3_config() and a rework of the
  mutex and memory allocation subsystems.  This is an incremental check-in. (CVS 5218)


type: ci
user: drh
comment:
  Continuing progress on the new memory allocation subsystem.  Added the
  sqlite3_mem_methods structure for defining new memory allocators at
  run-time. (CVS 5219)


type: ci
user: drh
comment:
  Continuing work on the new memory allocation subsystem.
  Added routines for temporary memory allocation.  Right the btree
  balance mechanism to only do one temporary allocation at a time. (CVS 5220)


type: ci
user: danielk1977
comment:
  Add a test to verify that IN(...) WHERE clause terms are not handled by virtual table implemetations. (CVS 5221)


type: ci
user: danielk1977
comment:
  Fix a problem with the incremental blob API. sqlite3_blob_open() was always reading the data for the leftmost column of the row that the opened blob was stored in. If this column happened to contain a (the) large blob, sqlite would make a large memory allocation to read the data into. Which defeats the purpose of using incremental blobs. (CVS 5222)


type: ci
user: danielk1977
comment:
  Fix a recently introduced resource leak in test file incrblob2.test (forgot to close a blob handle). (CVS 5223)


type: ci
user: drh
comment:
  Clean up obfuscated code in sqlite3_table_column_meta_data().
  Be sure to invoke sqlite3_initialize() within sqlite3_mprintf(). (CVS 5224)


type: ci
user: danielk1977
comment:
  Change the mutex interface to be pluggable. This is an incremental checkin, there are still changes to come. (CVS 5227)


type: ci
user: drh
comment:
  Remove mem3.c and mem5.c from the amalgamation for the time being, since
  they do not currently work.  We will add them back later once they are fixed. (CVS 5229)


type: ci
user: drh
comment:
  Added new configuration options to query the low-level malloc interface
  and to provide memory buffers for scratch, page-cache, and heap memory
  allocators. (CVS 5231)


type: ci
user: drh
comment:
  Make sure aggregate functions can take any number of arguments up to the
  limit imposed by SQLITE_LIMIT_FUNCTION_ARGS.  Ticket #3179.  Modify
  the group_concat() function to take an unlimited number of arguments in
  order to facilitate testing this behavior. (CVS 5233)


type: ci
user: danielk1977
comment:
  Fix a test case in mutex1.test that was failing when sqlite was compiled with SQLITE_THREADSAFE=0. (CVS 5235)


type: ci
user: drh
comment:
  Added support for scratch-memory lookaside allocations.  Largely untested.
  Added calls to sqlite3_initialize() within malloc APIs. (CVS 5237)


type: ci
user: danielk1977
comment:
  Remove public APIs sqlite3_mutex_init() and sqlite3_mutex_end(). This commit only changes the code, documentation is not updated yet. (CVS 5238)


type: ci
user: drh
comment:
  Add some test logic to the new memory allocation subsystem.  (Lots more needed.)
  The test suite is currently indicating memory leaks, though it is unclear if
  this is a true code problem or just an instrumentation problem. (CVS 5240)


type: ci
user: drh
comment:
  Bug fixes:  Plug a memory leak introduced by the previous check-in.  Get
  the amalgamation to the point where it will compile. (CVS 5241)


type: ci
user: danielk1977
comment:
  Shuffle some of the mutex related documentation in sqlite.h.in to match the new sqlite3_mutex_methods based API. (CVS 5244)


type: ci
user: danielk1977
comment:
  Move the malloc() failure simulation out of malloc.c and into a separate sqlite3_mem_methods interface. Still some related changes to come. (CVS 5250)


type: ci
user: drh
comment:
  Unset global TCL variables in the func.test script prior to use to avoid
  conflicts from other scripts. (CVS 5251)


type: ci
user: danielk1977
comment:
  Add a mode to the sqlite3_test_control() interface to register hooks called at the beginning and end of "benign malloc failure" blocks. This allows malloc() failure testing to be done using public APIs only. (CVS 5254)


type: ci
user: drh
comment:
  Change the SRT_Subroutine mode into SRT_Coroutine.  Use co-routines in
  the INSERT processing logic. (CVS 5255)


type: ci
user: danielk1977
comment:
  Add a test to check that opening a second connection to a shared cache does not reset the cache size to its default value. (CVS 5256)


type: ci
user: drh
comment:
  Add new Compare and Jump codes to the virtual machine.  Use them in the
  implementation of aggregate queries. (CVS 5257)


type: ci
user: danielk1977
comment:
  Fix a problem in the test suite that could cause a crash if using a pre-allocated block of memory for pages (the problem was that sqlite3_shutdown() was being called while there were still open database connections). (CVS 5259)


type: ci
user: danielk1977
comment:
  Add test file permutations.test, which runs various other test files with sqlite configured in various ways. This adds a few new tests and replaces test files autovacuum_crash.test, autovacuum_ioerr.test, exclusive3.test, jrnlmode2.test, jrnlmode3.test, jrnlmode4.test, mutex2 and onefile.test. (CVS 5265)


type: ci
user: mihailim
comment:
  Readded erroneously deleted {END} tag and doublechecked {(F,U,X)*}-{END} tag balancing. Minor documentation cleanup. No changes to code. (CVS 5271)


type: ci
user: drh
comment:
  Fix a bug in the KEYINFO handling within select.c.  Change the OP_Move
  opcode to take a count and to move multiple registers.  Initial code for
  the compound-select merge optimization is added but is incomplete
  and is commented out. (CVS 5272)


type: ci
user: mihailim
comment:
  Removed INVARIANTS sections in the experimental extension loading API that I should not have added in the first place. No changes to code. (CVS 5273)


type: ci
user: danielk1977
comment:
  Fix a bug whereby opening a connection to an existing shared-cache caused the cache-size (the value configured by "PRAGMA cache_size") to revert to its default value. (CVS 5274)


type: ci
user: danielk1977
comment:
  Correct comments above sqlite3_release_memory() and sqlite3_soft_heap_limit(). Ticket #3138. (CVS 5275)


type: ci
user: mihailim
comment:
  Fixed wrong type in sqlite3_create_collation16 declaration and definition (UTF-16 string had been passed as const char* instead of const void*) (CVS 5276)


type: ci
user: danielk1977
comment:
  Remove a non-ansi construct from mem1.c - an assert() statement before the variable declarations in a function. (CVS 5280)


type: ci
user: danielk1977
comment:
  Fix a bug causing the pager-cache size to be reset to its default value whenever the database schema was reloaded. (CVS 5283)


type: ci
user: danielk1977
comment:
  Fix a bug in handling queries on the sqlite_master table with an empty (0 bytes in size) database file. (CVS 5286)


type: ci
user: mihailim
comment:
  Added ldconfig invocations for postinstall and postuninstall. Updated package URL and description to match the current website. (CVS 5287)


type: ci
user: mihailim
comment:
  Changed HTML mode output to use lowercase tags making good on the XHTML output promise (the DTDs indeed mandate lowercase) and closing #450. (CVS 5288)


type: ci
user: mihailim
comment:
  Reverted previous checkin (on second thought, changing case could break badly written homegrown parsers such as sometimes encountered in embedded firmware.) (CVS 5289)


type: ci
user: pweilbacher
comment:
  Update OS/2 mutex implementation: make methods static and don't use them by the old names any more. Held/Notheld should be debug only. (CVS 5290)


type: ci
user: drh
comment:
  The compound-select merge optimization is mostly working with this check-in.
  But there are still a few problems and so the optimization is disabled by
  and "#if 0".  This check-in is to synchronize with the other changes happening
  in parallel. (CVS 5291)


type: ci
user: danielk1977
comment:
  Add start of new test file "select9.test". To test LIMIT, OFFSET and ORDER BY on compound SELECT statements. (CVS 5293)


type: ci
user: drh
comment:
  Fix a problem in sqlite3ExprIsInteger() causing failures on select1-4.9.2.
  Other bug fixes in compound-merge.  The compound-merge is still disabled
  in this check-in using "#if 0" due to additional bugs. (CVS 5295)


type: ci
user: danielk1977
comment:
  Modify the memory allocation system in mem3.c so to fit in with the new sqlite3_mem_methods scheme. At this point it only "mostly" works. (CVS 5297)


type: ci
user: drh
comment:
  If a unique index covers any prefix of the ORDER BY clause then let it
  satisfy the ORDER BY clause. (CVS 5301)


type: ci
user: danielk1977
comment:
  Fix up some details to do with the mem3.c (memsys3) allocator. If the library is compiled with SQLITE_ENABLE_MEMSYS3, the memsys3 allocator can be selected at runtime. (CVS 5303)


type: ci
user: danielk1977
comment:
  Fix the allocator in mem5.c so that it can be enabled at run time using the sqlite3_config() function. (CVS 5304)


type: ci
user: danielk1977
comment:
  Have mem3.c and mem5.c grab a mutex when required. Include them both in the amalgamation again. (CVS 5306)


type: ci
user: danielk1977
comment:
  Remove internal function sqlite3OsDefaultVfs(). The built-in VFS layers now register their VFS implementations by calling sqlite3_vfs_register() from within sqlite3_os_init(). (CVS 5307)


type: ci
user: danielk1977
comment:
  Change the makefiles so that "make test" now runs the veryquick.test script instead of quick.test. Also modify veryquick.test to reuse the code in quick.test. veryquick.test is now the same as quick.test except that it omits all testing related to malloc and IO error simulation. (CVS 5308)


type: ci
user: danielk1977
comment:
  Change the OS_XXX pre-processor symbols to SQLITE_OS_XXX. Symbols "OS_UNIX", "OS_WIN", "OS_WINCE", "OS_OS2" and "OS_OTHER" are now "SQLITE_OS_UNIX", "SQLITE_OS_WIN", "SQLITE_OS_WINCE", "SQLITE_OS_OS2" and "SQLITE_OS_OTHER", respectively. (CVS 5311)


type: ci
user: danielk1977
comment:
  Fix handling of "x IN (...)" and "x NOT IN (...)" expressions when the set contains an SQL NULL value. (CVS 5314)


type: ci
user: drh
comment:
  Avoid generating unnecessary SCopy instructions with the RHS of an IN
  operator is a list of values. (CVS 5316)


type: ci
user: drh
comment:
  Fix a bug introduced by check-in (5316).  Add some VDBE comments to
  the IN expression code generator. (CVS 5317)


type: ci
user: drh
comment:
  Tweaks to the IN expression code generator.  Fix an an unrelated bug
  in the compound SELECT code generator. (CVS 5318)


type: ci
user: mihailim
comment:
  Added reminder message to terminate SQL statements with a semicolon on shell startup. This closes #3099. (CVS 5325)


type: ci
user: danielk1977
comment:
  Remove an assert() that was failing if there were any open incremental blob handles when a statement transaction was rolled back. (CVS 5326)


type: ci
user: danielk1977
comment:
  Add a couple of tests to see if the new compound select optimizations work when the compound select is hidden inside a view. (CVS 5327)


type: ci
user: danielk1977
comment:
  Call the query flattener while processing the parent query. Previously, it was called while processing the sub-queries. (CVS 5330)


type: ci
user: danielk1977
comment:
  Optimize sub-selects and views that use UNION ALL. This optimization isn't very well tested yet. (CVS 5331)


type: ci
user: danielk1977
comment:
  Fix a problem with LIMIT and OFFSET clauses on the parent query when optimizing a UNION ALL sub-select. (CVS 5332)


type: ci
user: drh
comment:
  In Lemon, if a non-terminal has the same type as a terminal, then reuse the
  terminal type in the YYMINORTYPE union for the non-terminal.  This gives
  better table compression. (CVS 5334)


type: ci
user: danielk1977
comment:
  Call the authorizer callback the same number of times whether or not the query flattening occurs. (CVS 5338)


type: ci
user: shess
comment:
  fts3 functions for testing scripts.  These are a first step towards
  being able to write test script which verify that fts3 is internally
  building indices in the expected way.  Both new functions are only
  defined if fts3.c is compiled with SQLITE_TEST defined, as when
  building testfixture.  These functions are not intended to be part of
  the exposed fts3 API.

  dump_terms() generates a TEXT result of all the terms in the index (or
  a specified segment), sorted and joined with spaces.

  dump_doclist() generates a TEXT representation of the doclist
  associated with a given term in the index (or a specified segment). (CVS 5340)


type: ci
user: danielk1977
comment:
  Remove references to temporary registers from the compiler column-cache when such registers are released. Fix for #3201. (CVS 5341)


type: ci
user: drh
comment:
  Fix a bug in btree.c that caused it to report a database as being
  corrupt if it used one of the last 6 slots in a freelist trunk page.
  Continue to never use those last 6 slots so that databases from newer
  versions are still readable with older versions. (CVS 5344)


type: ci
user: danielk1977
comment:
  Make the Pager.pAll linked-list doubly linked when ENABLE_MEMORY_MANAGEMENT is defined. This is used to speed up sqlite3_release_memory(). (CVS 5346)


type: ci
user: drh
comment:
  Add the vfs_unregister_all and vfs_reregister_all test commands.  Use them
  to test the sqlite3_sleep() interface when no VFSes are registered. (CVS 5348)


type: ci
user: danielk1977
comment:
  Fix a problem in shared_err.test preventing it from running properly and add a test to corrupt2.test to cover another corruption detection case. (CVS 5355)


type: ci
user: danielk1977
comment:
  Fix an error introduced by (5346). The list could become corrupted when the database was truncated. (CVS 5356)


type: ci
user: drh
comment:
  Make check-in (5356) compatible with builds that do not enable memory
  management.  Remove unnecessary code from main.c.  Add out-of-memory
  tests for sqlite3_complete16(). (CVS 5357)


type: ci
user: danielk1977
comment:
  Prohibit the user from changing the temporary storage medium (pragma temp_store) while there is a read transaction open on the temporary database. Add tests to shared.test to cover a few more lines in btree.c. (CVS 5362)


type: ci
user: danielk1977
comment:
  Prevent the flattening optimization from transforming a to a query with an illegal ORDER BY clause. (CVS 5372)


type: ci
user: drh
comment:
  Completely rework the sqlite3SetString() primitive so that it honors the
  SQLITE_LIMIT_LENGTH and avoids the use of strlen(). (CVS 5374)


type: ci
user: drh
comment:
  Remove obsolete code from select.c, including the "affinity" parameter
  to the sqlite3Select() module. (CVS 5380)


type: ci
user: drh
comment:
  Remove unused code.  Test coverage enhancements.  Modify the algorithm used
  to select column names for VIEWs of joins so that the constructed column
  names omits the underlying table names. (CVS 5386)


type: ci
user: danielk1977
comment:
  Add the SQLITE_OPEN_NOMUTEX flag. Used for opening connections that are not protected by an internal mutex. (CVS 5387)


type: ci
user: drh
comment:
  Enhancements to the testing logic for malloc and mutex.  Only permit one
  of MEMSYS3/5 to be compiled-in at a time.  Omit the SQLITE_CONFIG_MEMSYS3/5
  configuration options. (CVS 5389)


type: ci
user: drh
comment:
  Additional test coverage in btree.c.  Added corruption tests for
  the ptrmap pages of an autovacuumed database (corrupt8.test). (CVS 5391)


type: ci
user: drh
comment:
  Make the btree layer robust when faced with a corrupt database that
  contains duplicate entries on the freelist.  Ticket #3209. (CVS 5392)


type: ci
user: drh
comment:
  Remove an extra zeroPage() call that was left in the previous check-in
  by mistake.  Ticket #3209. (CVS 5393)


type: ci
user: drh
comment:
  Additional test coverage for the btree module.  Remove the failsafe() macro
  and replace it with ALWAYS() and NEVER(). (CVS 5395)


type: ci
user: drh
comment:
  Detect and handles the case where a row is modified or deleted while it
  is being read during SELECT processing. (CVS 5399)


type: ci
user: drh
comment:
  Write sqlite3_initialize() calls in sqlite3_malloc() within
  SQLITE_OMIT_AUTOINIT.  Ticket #3217. (CVS 5408)


type: ci
user: drh
comment:
  Remove the malloc2.test script since it was designed for use in versions
  of SQLite that predate SQLite's ability to recover from out-of-memory
  errors automatically.  Removing this script causes no reduction in
  test coverage and removes potential problems reported by ticket #3213. (CVS 5409)


type: ci
user: danielk1977
comment:
  Have the rtree extension publish two virtual table types: "rtree" and "rtree_i32". rtree_i32 stores coordinate data as 32-bit signed integers. rtree uses 32-bit real (floating point) values. (CVS 5410)


type: ci
user: shess
comment:
  Delete all fts3 index data the table becomes empty.  Previously,
  deleting all rows from an fts3 table would leave a bunch of index data
  describing the terms of the original data, plus deletions of those
  terms, perhaps with some amount of it merged together so the deletions
  knocked out the originals.  Even when all rows were deleted that
  original data would hang out, though eventually it would mostly be
  overwritten if new data contained the same set of terms. (CVS 5413)


type: ci
user: drh
comment:
  Update column naming rules.  Ticket #3221.  Rules for column naming
  are still subject to change (except for the AS rule which we promise to
  keep the same) but are more consistent now.  And the rules are tested
  using a new test script. (CVS 5416)


type: ci
user: shess
comment:
  Implement optimize() function.  This merges all segments in the fts
  index into a single segment, including dropping delete cookies. (CVS 5417)


type: ci
user: pweilbacher
comment:
  Work around bugs in older versions of the OS/2 conversion library by trying to minimize calls to UniCreateUconvObject() etc. Use global uconv objects instead. (CVS 5418)


type: ci
user: drh
comment:
  Activate testing of mem3 and mem5.  Fix problems found.  Tickets #3223
  and #3225.  Other test configuration changes. (CVS 5419)


type: ci
user: pweilbacher
comment:
  Get rid of the debug output, and make pre-C99 compilers happy with sqlite3_os_init() on OS/2. (CVS 5429)


type: ci
user: drh
comment:
  Fix the test harness so that it does not try to link against
  sqlite3_mutex_alloc() if compiled with -DSQLITE_THREADSAFE=0. (CVS 5430)


type: ci
user: drh
comment:
  Simplify the b-tree logic by taking advantage of the fact that all b-trees
  are either intkey+leafdata or zerodata. (CVS 5431)


type: ci
user: drh
comment:
  Omit the check for cell-pointer consistency in sqlite3BtreeInitPage()
  for a 2.5% performance gain. (CVS 5433)


type: ci
user: drh
comment:
  The zeroPage() routine in btree.c need not actually zero the whole page,
  just the header. (CVS 5434)


type: ci
user: danielk1977
comment:
  Performance improvement: reduce the number of calls to ptrmapPageno() made by ptrmapPut() and ptrmapGet(). (CVS 5437)


type: ci
user: drh
comment:
  Make sure expression spans are set correctly for "x.*" expressions in
  the result set of a SELECT.  Ticket #3229. (CVS 5438)


type: ci
user: drh
comment:
  Use the actual size of memory allocations to update the memory status
  counters.  Fix the roundup() function of mem3 to be much closer to the
  actual allocation size.  Ticket #3226. (CVS 5440)


type: ci
user: danielk1977
comment:
  Improve the performance of balance_nonroot() on auto-vacuum databases by reducing the number of calls to ptrmapPut(). (CVS 5442)


type: ci
user: danielk1977
comment:
  Reduce the number of "#ifndef SQLITE_OMIT_AUTOVACUUM" conditions in btree.c by using the ISAUTOVACUUM macro instead. (CVS 5444)


type: ci
user: shane
comment:
  "configure" support updated.  Removed unused features.  Added parsing of CFLAGS and CPPFLAGS to extract OMIT options to pass to lemon and mkkeywordhash. (CVS 5446)


type: ci
user: shane
comment:
  winGetLastError support added.  Consolidated getLastErrorMsg() support.  Removed some more WINCE dead code similar to instance in ticket #3232.   Added error return on SystemTimeToFileTime() failure. (CVS 5450)


type: ci
user: shess
comment:
  Changes fts2 to use only sqlite3_malloc() and not system malloc.
  Backports (4554) and (4555) from fts3. (CVS 5454)


type: ci
user: shess
comment:
  Delete all fts2 index data the table becomes empty.
  Backports check-in (5413) from fts3. (CVS 5457)


type: ci
user: shess
comment:
  Be a bit more susicious of invalid results from the tokenizer.
  Backports check-in (4514) from fts3. (CVS 5459)


type: ci
user: drh
comment:
  Read the sqlite3_vtab.zErrMsg after each call to a virtual table
  method and transfer any error into the database connection.
  Fix the fts2.test and fts3.test scripts to that they return
  silently rather than failing the test sequence if the appropriate
  FTS implementation is unavailable. (CVS 5463)


type: ci
user: drh
comment:
  Clarify in the documentation that the database connection pointer to
  sqlite3_next_stmt() must not be NULL.  Ticket #3244. (CVS 5464)


type: ci
user: drh
comment:
  Error messages from virtual tables store on the sqlite3_vtab->zErrMsg field
  are reported back up to the application interface and memory is reclaimed. (CVS 5466)


type: ci
user: drh
comment:
  Update the implementation of sqlite3ResultSetOfSelect() to (hopefully) make
  it clearer that malloc failures cannot possibly result in a crash.
  Ticket #3247. (CVS 5470)


type: ci
user: drh
comment:
  Use a new algorithm for sqlite3Strlen that is slightly slower but is more
  like to work on a mixture of 32- and 64-bit systems.  Ticket #3237, #3248. (CVS 5471)


type: ci
user: drh
comment:
  Reduce the size of the parser allocation.  Add additional instrumentation
  to mem2.  speed1*.test uses scratch malloc. (CVS 5472)


type: ci
user: danielk1977
comment:
  Change mem6.c to use the malloc() and free() functions directly, instead of going via another sqlite3_mem_methods structure. (CVS 5474)


type: ci
user: danielk1977
comment:
  Speed up the xFree() method of the mem6.c allocator by storing the offset from the pointer to the start of its chunk in a header field. (CVS 5475)


type: ci
user: drh
comment:
  Make the libtclsqlite3.la shared library depend on a separate
  libsqlite3.la shared library.  I think this flies in the face of the
  whole SQLite philosophy of minimal dependencies, but on the other hand,
  few people use that shared library and the capability has been requested
  from the SuSE team. (CVS 5477)


type: ci
user: drh
comment:
  Require the SQLITE_ENABLE_INSTVFS symbol in order to compile testfixture
  with sqlite3_instvfs enabled.  This allows fulltest to run on platforms
  for which we do not have a working hwtime.h (ex: ppc, s390).  Change
  requested from the SuSE team. (CVS 5478)


type: ci
user: drh
comment:
  Increase limits on memsubsys1 tests to accomodate the larger structure
  sizes on 64-bit platforms. (CVS 5479)


type: ci
user: drh
comment:
  Add the capability to track the maximum depth of the LALR(1) parser stack
  so that critical applications can check to see if they are getting close
  to limits. (CVS 5481)


type: ci
user: danielk1977
comment:
  In the documentation for SQLITE_CONFIG_MEMSTATUS, make it clear that the 'boolean' argument passed to sqlite3_config() is actually of type int. Ticket #3252. (CVS 5486)


type: ci
user: drh
comment:
  Implement the "lookaside" memory allocation cache.  Use of this cache makes
  the speed1.test script run about 15% faster.  Added new interfaces to
  control the cache. (CVS 5488)


type: ci
user: shess
comment:
  Re-used prepared statement from fts3 cursor.  Previously, each call to
  fulltextFilter() finalized any existing prepared statement and
  prepared a new one.  In the case where idxNum has not changed, simply
  reseting the statement suffices.  This provides an order of magnitude
  speedup in incoming joins against docid. (CVS 5489)


type: ci
user: danielk1977
comment:
  Use a macro to make sure that the calls to sqlite3Utf8Read() from MemTranslate() are inlined. This speeds up converting from utf8 to utf16. (CVS 5492)


type: ci
user: drh
comment:
  Enhancements to the pagecache malloc test configuration.  Changes to the
  speed test scripts to use the new test enhancements. (CVS 5494)


type: ci
user: pweilbacher
comment:
  recursively call os2Open() with the incoming VFS pointer, in case it gets used in the future (CVS 5496)


type: ci
user: shess
comment:
  Add some simple tests to make sure that the different fulltextFilter
  query paths are being exercised. (CVS 5498)


type: ci
user: shess
comment:
  Backport http://www.sqlite.org/cvstrac/chngview?cn=5489 from fts3.
  Re-used prepared statement from fts2 cursor. (CVS 5499)


type: ci
user: drh
comment:
  Implicit string->numeric conversion should go to an integer value when
  possible.  Ticket #3257. (CVS 5502)


type: ci
user: drh
comment:
  When opening a zero-size database on unix, write one byte into the file before
  interrogating the inode number.  This works around issues with msdos
  filesystems mounted on OS-X.  Ticket #3260. (CVS 5504)


type: ci
user: shane
comment:
  Omit calls to sqlite3Pragma() if SQLITE_OMIT_PARSER defined.  Not technically needed, as the entire generated parse.c file should not be included. (CVS 5506)


type: ci
user: shane
comment:
  Fixed comment to use right function names for sqlite3VdbeSerialPut() and sqlite3VdbeSerialGet(). (CVS 5507)


type: ci
user: drh
comment:
  Change the definition of SQLITE_CONFIG_PAGECACHE and
  SQLITE_CONFIG_SCRATCH to omit the magic "+4" in the buffer size
  calculation. (CVS 5512)


type: ci
user: drh
comment:
  Update the memsubsys1 test script to take into account the buffer size
  changes of the previous check-in. (CVS 5513)


type: ci
user: danielk1977
comment:
  If xAccess() fails while attempting to detect a hot-journal file, do not assume that the error was an out-of-memory condition. (CVS 5515)


type: ci
user: shane
comment:
  Applied patch to fix failure with build on gcc-powerpc (provide sqlite3Hwtime). Ticket #3256. (CVS 5516)


type: ci
user: danielk1977
comment:
  Test that virtual table methods xBestIndex, xOpen, xFilter, xNext, xColumn, xRowid, xUpdate, xSync and xBegin can all return error messages using the sqlite3_vtab.zErrMsg variable. (CVS 5519)


type: ci
user: danielk1977
comment:
  Increase the ref-count on the sqlite3_vtab structure before calling either the xNext or xFilter methods. (CVS 5524)


type: ci
user: danielk1977
comment:
  Fix a bug introduced by (5519) causing builds with SQLITE_OMIT_VIRTUALTABLE to malfunction. (CVS 5525)


type: ci
user: danielk1977
comment:
  Add an assert() statement that will alert us if the potential problem identified by #3243 ever becomes a reality. (CVS 5532)


type: ci
user: danielk1977
comment:
  Make it easier to build with the icu extension enabled. Include icu.c in the amalgamation source. Ticket #3245. (CVS 5533)


type: ci
user: drh
comment:
  Separate verbs of sqlite3_config() and sqlite3_db_config() into their
  own namespaces.  Allow SQLITE3_DBCONFIG_LOOKASIDE to specific an external
  memory buffer. (CVS 5536)


type: ci
user: drh
comment:
  Disallow the ON CONFLICT clause on CHECK constraints.  The syntax used to be
  allowed but never worked, so this should not present compatibility problems.
  Other internal grammar simplifications. (CVS 5546)


type: ci
user: drh
comment:
  Back out part of (5546):  Even though ON CONFLICT clauses on CHECK constraints
  are no-ops, if a schema includes them, the database will be unreadable if
  we do not at least parse and ignore the clause. (CVS 5548)


type: ci
user: drh
comment:
  Disallow empty triggers.  Ticket #3283.  This does not present a backwards
  compatibility problem because prior to this change, an empty trigger would
  segfault. (CVS 5550)


type: ci
user: shane
comment:
  Added SQLITE_EXPERIMENTAL and SQLITE_DEPRECATED tags to APIs to take advantage of compiler warnings (with the necessary function attributes.)  Ticket #3142. (CVS 5551)


type: ci
user: drh
comment:
  The GCC magic to warn about experimental interfaces does not work
  on gcc version 4.1.0.  Add #ifdefs to work around this. (CVS 5552)


type: ci
user: drh
comment:
  Do not allow indexing of any table whose name begins with "sqlite_".
  Ticket #3284.  Improve handling of databases with malformed schemas -
  just in case somebody has actually indexed a system table. (CVS 5553)


type: ci
user: drh
comment:
  Make the CLI more tolerant of malformed schemas by setting the
  writable_schema pragma prior to running the ".dump" command. (CVS 5554)


type: ci
user: shane
comment:
  GCC attribute warning first appears in the 4.3.0 docs, so updated #if to specify at least that version. (CVS 5555)


type: ci
user: drh
comment:
  Revise the initialization and shutdown logic so that it no longer keeps
  a recursive mutex allocated for the whole interval but instead releases
  the mutex as soon as possible.  Do not reset status values upon initialization. (CVS 5559)


type: ci
user: drh
comment:
  Make sure the lookaside test script saturates the lookaside buffer even
  when SQLITE_DEBUG is off.  Ticket #3289 (CVS 5560)


type: ci
user: drh
comment:
  A partial fix for ticket #3292.  This fixes the original problem but there
  are other similar problems lurking in the code still. (CVS 5561)


type: ci
user: drh
comment:
  Explicit casts of the return from strlen() to int in lemon.  This has
  no effect on SQLite.  It has no effect on any lemon-generated parser
  with a grammar that is less than 2GB in size.  Ticket #3293. (CVS 5564)


type: ci
user: danielk1977
comment:
  Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566)


type: ci
user: danielk1977
comment:
  When a "pragma main.table_info(...)" is issued, consider only tables from the main database, not the temp db. Ticket #3320. (CVS 5568)


type: ci
user: danielk1977
comment:
  Fix a problem in Makefile.in causing the static function hash-table to be constructed incorrectly (segfault). (CVS 5570)


type: ci
user: drh
comment:
  Modify the lemon parser template to avoid using zero-initialized constants
  when compiled with C++.  Ticket #3288. (CVS 5571)


type: ci
user: drh
comment:
  Modify the sqlite3VdbeUnpackRecord() interface to force the temporary
  space to be 8-byte aligned.  This might be important for Sparc.
  Ticket #3318. (CVS 5573)


type: ci
user: danielk1977
comment:
  Move an assert() in sqlite3PcacheDirtyPage() so that it does not occur before local variable declarations. Ticket #3325. (CVS 5575)


type: ci
user: danielk1977
comment:
  Fix the functionality associated with sqlite3_release_memory() and sqlite3_soft_heap_limit(). It is automatically disabled if the SQLITE_CONFIG_PAGECACHE option is used. (CVS 5576)


type: ci
user: drh
comment:
  Patch to mkfunction to try and detect miscompiles.  Add an unimportant
  assert back to pcache.c. (CVS 5577)


type: ci
user: drh
comment:
  Reinsert an SCopy operation that was removed in (5523) because coverage
  testing indicated that it was dead code.  Ticket #3324 shows that the
  code was not as dead as we thought it was. (CVS 5578)


type: ci
user: drh
comment:
  Initialize the global built-in function table at start-time
  instead of at compile-time.  This is less prone to malfunction when
  compile-time parameters very. (CVS 5583)


type: ci
user: drh
comment:
  Remove references to OP_MoveTo in comments of vdbe.c - that opcode no
  longer exists.  Ticket #3327. (CVS 5584)


type: ci
user: drh
comment:
  Move date+time functions to start-time initialization.  Additional
  start-time function cleanup. (CVS 5585)


type: ci
user: aswift
comment:
  Added SQLITE_IOERR_LOCK extended error code and support for detecting and returning errors in the os_unix lock, unlock and check reserved lock variants, also added support for populating and returning system error codes so that they can be accessed via xGetLastError, unfortunately xGetLastError can't seem to access the unixFile structure where the lastErrno is recorded. (CVS 5586)


type: ci
user: aswift
comment:
  Deferring file descriptor closing to avoid trashing locks when directly manipulating sqlite db file contents (causes errors on AFP testing) (CVS 5587)


type: ci
user: drh
comment:
  Allow the WHERE clause in an UPDATE or DELETE against a view with an
  INSTEAD OF trigger to refer to the view by name.  Ticket #3298. (CVS 5589)


type: ci
user: pweilbacher
comment:
  Hide (for non-debugging builds) and remove DELETEONCLOSE files on OS/2, following the Windows example. Ticket #3328. (CVS 5592)


type: ci
user: drh
comment:
  Make sure the function context is fully initialized before invoking the
  function finalizer.  Ticket #3326. (CVS 5596)


type: ci
user: danielk1977
comment:
  When recycling a page, try to find one that does not require a call to xSync() on the journal file. Also simplify some of the mutex related things in pcache. (CVS 5597)


type: ci
user: danielk1977
comment:
  Relinquish the pcache mutex before calling an xStress callback. This ensures that the pcache mutex is never held while IO is performed. (CVS 5599)


type: ci
user: danielk1977
comment:
  Do not incorrectly detect corruption when an auto-vacuum database is converted to a non-auto-vacuum database within a vacuum. Ticket #3332. (CVS 5603)


type: ci
user: danielk1977
comment:
  Instead of marking a page as clean when sqlite3PagerDontWrite() is called, set a dedictated flag - PGHDR_DONT_WRITE. (CVS 5604)


type: ci
user: danielk1977
comment:
  If the sector size is greater than the database page size, SQLite journals all pages that lie within a sector before writing to any of them. This change ensure that a journal sync does not occur halfway through journalling the set of pages that belong to a single sector. (CVS 5605)


type: ci
user: drh
comment:
  Two if statements should be asserts.  GCC was silently ignoring them,
  hence the problem did not show up in coverage testing.
  Ticket #3333. (CVS 5607)


type: ci
user: drh
comment:
  Fix bug in the premutation testing that was causing many permutations from
  begin skipped.  There are now 16 errors reported by the permutation test. (CVS 5610)


type: ci
user: drh
comment:
  Add the SQLITE_OPEN_FULLMUTEX definition to sqlite3.h.  It currently is not
  valid for anything.  This is merely to reserve the number. (CVS 5612)


type: ci
user: drh
comment:
  Do not flatten subqueries where the subquery has a LIMIT and the outer
  query has a WHERE clause.  Ticket #3334. (CVS 5613)


type: ci
user: drh
comment:
  Implement a "counter" SQL function that can be used to insert a sequence
  number each row of a result set.  Currently in the test harness only, but
  a candidate to move into the core. (CVS 5614)


type: ci
user: danielk1977
comment:
  Simplify the pcache module by only recycling clean pages from 'other' caches. This commit causes errors in test files ioerr5.test and malloc5.test because they test recycling dirty pages from other caches. (CVS 5615)


type: ci
user: drh
comment:
  All the page_size pragma to change the page size on a new :memory: database,
  but not a vacuumed :memory: database.  Ticket #3335 (CVS 5617)


type: ci
user: drh
comment:
  In the TCL interface, disable the authorizer when during a BEGIN, COMMIT,
  or ROLLBACK associated with the transaction method. Ticket #3336. (CVS 5618)


type: ci
user: drh
comment:
  Remove obsolete file: md5.c.  This file had been removed years ago.  It is
  unclear how it got back into the repository. (CVS 5621)


type: ci
user: danielk1977
comment:
  Use a bitvec object to store the set of pages with the 'always-rollback' property for a transaction. (CVS 5622)


type: ci
user: danielk1977
comment:
  Modifications to malloc5.test to account for the fact that sqlite3_release_memory() no longer reclaims dirty pages. (CVS 5625)


type: ci
user: drh
comment:
  Add the trans2.test script designed to stress statement rollback and
  no-write optimizations on large transactions with a small cache. (CVS 5627)


type: ci
user: danielk1977
comment:
  If any error occurs during sqlite3_open(), move the database handle into "sick" state. When in the sick state the user can use sqlite3_errcode() and sqlite3_errmsg(), but not much else. (CVS 5628)


type: ci
user: danielk1977
comment:
  Enable the disabled asserts added by (5629). Add extra tests to thread003.test. And the required modifications to pcache.c. (CVS 5631)


type: ci
user: danielk1977
comment:
  Use ckfree() instead of sqlite3_free() to free an allocation made by ckalloc() in test_thread.c (test code only). (CVS 5633)


type: ci
user: danielk1977
comment:
  Avoid using (clock seconds) in thread003.test. It is not available if testfixture is linked to tcl 8.5. (CVS 5634)


type: ci
user: drh
comment:
  Avoid reevaluating WHERE and ORDER BY expressions that alias terms in the
  result set.  Ticket #3343.  Note that aliased GROUP BY expressions are still
  evaluated twice. (CVS 5637)


type: ci
user: danielk1977
comment:
  If a page is made eligible for recycling when more than the configured maximum number of pages are allocated, free it immediately instead of adding it to the LRU list. (CVS 5638)


type: ci
user: danielk1977
comment:
  In permutations.test, disable tests that depend on soft-heap-limit functionality when running the memsubsys2 variant. It disables the soft-heap-limit. (CVS 5639)


type: ci
user: danielk1977
comment:
  Move a call to sqlite3_mutex_leave() to protect calls to sqlite3StatusAdd() related to scratch (SQLITE_CONFIG_SCRATCH) memory. (CVS 5641)


type: ci
user: rse
comment:
  remove private declaration of sqlite3_snprintf() in sqliteInt.h as there is already a public declaration in sqlite3.h (CVS 5643)


type: ci
user: danielk1977
comment:
  Add some code to permutations.test to make sure no test file modifies the shared-cache setting. (CVS 5645)


type: ci
user: drh
comment:
  Defer deleting Table objects associated with flattened subqueries until
  all code has been generated, in case some expression node still references
  the Table object.  Ticket #3346. (CVS 5650)


type: ci
user: danielk1977
comment:
  Begin adding support for the SQLITE_OMIT_WSD macro. Some (many) WSD variables still need wrappers added to them. (CVS 5652)


type: ci
user: shane
comment:
  Omit prototype for and calls to sqlite3MaterializeView() if  !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER). (CVS 5655)


type: ci
user: shane
comment:
  Added  (_MSC_VER>1200) to SQLITE_DEPRECATED and SQLITE_EXPERIMENTAL defines since __declspec(deprecated) isn't supported by VC 6 or earlier.  Ticket #3347. (CVS 5656)


type: ci
user: shane
comment:
  Add define for INVALID_FILE_ATTRIBUTES if it is not already defined, as some older Windows compilers do not define it. (CVS 5657)


type: ci
user: danielk1977
comment:
  Move the sqlite3SharedCacheEnabled global and the inProgress static variable (function sqlite3_initialize()) into the global sqlite3Config structure. This is required for the OMIT_WSD feature to work on some platforms. (CVS 5662)


type: ci
user: danielk1977
comment:
  Add an extra 'const' qualifier to two arrays (in func.c and pragma.c) to ensure that they do not consume space in the data segment of the compiled object files. (CVS 5663)


type: ci
user: danielk1977
comment:
  Explicitly initialize at least the first field of every struct. This is to work around compilers that don't like the syntax "struct XXX { ... } yyy = {};". (CVS 5666)


type: ci
user: shane
comment:
  Modified core to not call deprecated functions sqlite3_memory_alarm() and sqlite3_transfer_bindings() by adding sqlite3MemoryAlarm() and sqlite3TransferBindings().  sqlite3_memory_alarm() and sqlite3_transfer_bindings() are now simple wrappers for the new functions.  In prep for adding SQLITE_OMIT_DEPRECATED. (CVS 5672)


type: ci
user: danielk1977
comment:
  If SQLITE_ENABLE_LOCKING_STYLE is defined, have the os_unix.c module offer the following extra VFS implementations for explicitly selecting a locking-style: "unix-none", "unix-afp", "unix-posix", "unix-flock" and "unix-dotfile". (CVS 5674)


type: ci
user: danielk1977
comment:
  Add support for the SQLITE_THREADSAFE=2 and SQLITE_DEFAULT_MEMSTATUS compilation options. (CVS 5676)


type: ci
user: danielk1977
comment:
  Change pcache.test so that it works if sqlite is configured to create auto-vacuum databases by default. (CVS 5678)


type: ci
user: danielk1977
comment:
  Deallocate a temp register allocated by codeEqualityTerm() in where.c. If it is not deallocated, its value may be reused by the column-cache mechanism. However, by the time it is used, the value may have been clobbered by a sub-routine that also uses the same temp register. Fix for #3357. (CVS 5679)


type: ci
user: danielk1977
comment:
  Add header file sqliteicu.h to the ICU extension. This is analogous to the rtree.h and fts3.h headers used by other extensions to declare their entry points. Fix for ticket #3361. (CVS 5680)


type: ci
user: danielk1977
comment:
  If the 'rootpage' column of the sqlite_master table contains a NULL value, return SQLITE_CORRUPT to the caller. (CVS 5681)


type: ci
user: danielk1977
comment:
  Fix a bug in r-tree related to internal nodes with one or more dimensions of size zero. Ticket #3363. (CVS 5682)


type: ci
user: drh
comment:
  Calling sqlite3_create_function with nArg==(-1) does not override prior
  calls on the same function name with nArg>=0.  Ticket #3345.  Add the
  new -argcount option to the "function" method in the TCL interface. (CVS 5684)


type: ci
user: danielk1977
comment:
  Fix some test script details so that the test suite runs with an SQLITE_DEFAULT_AUTOVACUUM=2 build. (CVS 5686)


type: ci
user: danielk1977
comment:
  Avoid deleting a file while it is still open in corrupt2.test. Not all platforms support this. (CVS 5687)


type: ci
user: danielk1977
comment:
  Fix for handling database files corrupted in such a was as to make a b-tree page a direct or indirect descendant of itself. (CVS 5689)


type: ci
user: danielk1977
comment:
  Fix some trivial cases where database corruption was causing an error code other than SQLITE_CORRUPT to be returned. (CVS 5690)


type: ci
user: danielk1977
comment:
  Add a couple of (fconfigure) commands to configure the incremental blob channels used by test file incrblob.test. This is required so that the tests work on windows and other platforms that have a default -translation mode other than 'lf'. (CVS 5692)


