/ Check-in [a8c984c1]
Login

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

Overview
Comment:Fix an incorrect ALWAYS() macro in vdbeapi.c. Fix the output of a few test cases that changed due to better error propagation out of reprepare.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a8c984c1d6cb6e2fc95a07eb32befeea122e8ed3
User & Date: drh 2010-02-24 18:40:39
References
2010-02-25
02:32
Merge in all of the logging enhancements. This is a cherrypick merge of the following check-ins: [103321e37a], [a8076aede3], [6d910245ad], [7c4cca6d1a], [edea3bb740], [1a6d4bb130], [a8c984c1d6], [69a493182f], and [1168763d2c]. check-in: 46f406b2 user: drh tags: branch-3.6.22
Context
2010-02-24
19:23
Add a sqlite3_log() call on anonymous constraint failures. Fix the output of test cases having to do with improved reprepare reporting. Fix the VACUUM command to report more helpful error messages when things go wrong. check-in: 69a49318 user: drh tags: trunk
18:40
Fix an incorrect ALWAYS() macro in vdbeapi.c. Fix the output of a few test cases that changed due to better error propagation out of reprepare. check-in: a8c984c1 user: drh tags: trunk
18:25
Remove an unused variable from rtree. check-in: 8e60d399 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
  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;
    }
    rc = SQLITE_ERROR;
    goto end_of_step;
  }
  if( p->pc<0 ){
    /* If there are no other statements currently running, then







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
  db = p->db;
  if( db->mallocFailed ){
    p->rc = SQLITE_NOMEM;
    return SQLITE_NOMEM;
  }

  if( p->pc<=0 && p->expired ){
    if( p->rc==SQLITE_OK ){
      p->rc = SQLITE_SCHEMA;
    }
    rc = SQLITE_ERROR;
    goto end_of_step;
  }
  if( p->pc<0 ){
    /* If there are no other statements currently running, then

Changes to test/capi3c.test.

1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
do_test capi3c-19.3 {
  sqlite3_step $STMT
} SQLITE_DONE
do_test capi3c-19.4 {
  sqlite3_reset $STMT
  db eval {DROP TABLE t3}
  sqlite3_step $STMT
} SQLITE_SCHEMA
do_test capi3c-19.4.1 {
  sqlite3_errmsg $DB
} {no such table: t3}
ifcapable deprecated {
  do_test capi3c-19.4.2 {
    sqlite3_expired $STMT
  } 1







|







1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
do_test capi3c-19.3 {
  sqlite3_step $STMT
} SQLITE_DONE
do_test capi3c-19.4 {
  sqlite3_reset $STMT
  db eval {DROP TABLE t3}
  sqlite3_step $STMT
} SQLITE_ERROR
do_test capi3c-19.4.1 {
  sqlite3_errmsg $DB
} {no such table: t3}
ifcapable deprecated {
  do_test capi3c-19.4.2 {
    sqlite3_expired $STMT
  } 1

Changes to test/schema.test.

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
  db function hello {}
  db auth auth
  proc auth {args} {
    if {[lindex $args 0] == "SQLITE_READ"} {return SQLITE_DENY}
    return SQLITE_OK
  }
  sqlite3_step $S
} {SQLITE_SCHEMA}

do_test schema-13.2 {
  sqlite3_step $S
} {SQLITE_SCHEMA}

do_test schema-13.3 {
  sqlite3_finalize $S
} {SQLITE_SCHEMA}

}

finish_test







|



|



|




372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
  db function hello {}
  db auth auth
  proc auth {args} {
    if {[lindex $args 0] == "SQLITE_READ"} {return SQLITE_DENY}
    return SQLITE_OK
  }
  sqlite3_step $S
} {SQLITE_AUTH}

do_test schema-13.2 {
  sqlite3_step $S
} {SQLITE_AUTH}

do_test schema-13.3 {
  sqlite3_finalize $S
} {SQLITE_AUTH}

}

finish_test