SQLite

Check-in [f9c54e95ec]
Login

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

Overview
Comment:Fix a problem with handling OOM errors in fts3.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f9c54e95ecf1c36c4750bb151e91d81c1d1bd596
User & Date: dan 2010-01-20 14:25:37.000
Context
2010-01-21
01:53
Redesign the string to numeric value caster so that it is more likely to work on unusual floating point hardware. (check-in: 8bb1104c6f user: drh tags: trunk)
2010-01-20
14:25
Fix a problem with handling OOM errors in fts3. (check-in: f9c54e95ec user: dan tags: trunk)
13:07
Move the Apple OS-X VFS changes into the trunk. (check-in: 571594bfbe user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeapi.c.
295
296
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311
  int rc;

  assert(p);
  if( p->magic!=VDBE_MAGIC_RUN ){
    return SQLITE_MISUSE;
  }

  /* Assert that malloc() has not failed */
  db = p->db;
  if( db->mallocFailed ){

    return SQLITE_NOMEM;
  }

  if( p->pc<=0 && p->expired ){
    if( ALWAYS(p->rc==SQLITE_OK || p->rc==SQLITE_SCHEMA) ){
      p->rc = SQLITE_SCHEMA;
    }







|


>







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
  int rc;

  assert(p);
  if( p->magic!=VDBE_MAGIC_RUN ){
    return SQLITE_MISUSE;
  }

  /* Check that malloc() has not failed. If it has, return early. */
  db = p->db;
  if( db->mallocFailed ){
    p->rc = SQLITE_NOMEM;
    return SQLITE_NOMEM;
  }

  if( p->pc<=0 && p->expired ){
    if( ALWAYS(p->rc==SQLITE_OK || p->rc==SQLITE_SCHEMA) ){
      p->rc = SQLITE_SCHEMA;
    }
Changes to test/fts3snippet.test.
130
131
132
133
134
135
136

137
138
139
140
141
142
143
  1 utf8
  1 utf16
} {

  db close
  file delete -force test.db
  sqlite3 db test.db

  db eval "PRAGMA encoding = \"$enc\""

  # Set variable $T to the test name prefix for this iteration of the loop.
  #
  set T "fts3snippet-$enc"

  ##########################################################################







>







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
  1 utf8
  1 utf16
} {

  db close
  file delete -force test.db
  sqlite3 db test.db
  sqlite3_db_config_lookaside db 0 0 0
  db eval "PRAGMA encoding = \"$enc\""

  # Set variable $T to the test name prefix for this iteration of the loop.
  #
  set T "fts3snippet-$enc"

  ##########################################################################