/ Check-in [dcdf0913]
Login

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

Overview
Comment:Preserve the error code from xConnect or xCreate methods in virtual table implementations when they are encountered during parsing.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:dcdf091388251292ff9939bdff920708320bc64dacfe0fa1878c5ffd11b679c9
User & Date: drh 2017-08-09 22:55:09
Context
2017-08-10
03:27
Add a first draft of the "vtablog" extensions that implements a generic virtual table useful for experimentation using the command-line shell. check-in: e49279e6 user: drh tags: trunk
2017-08-09
22:55
Preserve the error code from xConnect or xCreate methods in virtual table implementations when they are encountered during parsing. check-in: dcdf0913 user: drh tags: trunk
19:27
Various bug fixes for the new LSM1 virtual table design. check-in: 94434a25 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtreeA.test.

224
225
226
227
228
229
230




231
232
233
sqlite3 db test.db
do_execsql_test rtreeA-7.100 { 
  UPDATE t1_node SET data=x'' WHERE rowid=1;
} {}
do_catchsql_test rtreeA-7.110 {
  SELECT * FROM t1 WHERE x1>0 AND x1<100 AND x2>0 AND x2<100;
} {1 {undersize RTree blobs in "t1_node"}}






finish_test







>
>
>
>



224
225
226
227
228
229
230
231
232
233
234
235
236
237
sqlite3 db test.db
do_execsql_test rtreeA-7.100 { 
  UPDATE t1_node SET data=x'' WHERE rowid=1;
} {}
do_catchsql_test rtreeA-7.110 {
  SELECT * FROM t1 WHERE x1>0 AND x1<100 AND x2>0 AND x2<100;
} {1 {undersize RTree blobs in "t1_node"}}
do_test rtreeA-7.120 {
  sqlite3_extended_errcode db
} {SQLITE_CORRUPT}



finish_test

Changes to src/vtab.c.

640
641
642
643
644
645
646

647
648
649
650
651
652
653
    sqlite3ErrorMsg(pParse, "no such module: %s", zModule);
    rc = SQLITE_ERROR;
  }else{
    char *zErr = 0;
    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xConnect, &zErr);
    if( rc!=SQLITE_OK ){
      sqlite3ErrorMsg(pParse, "%s", zErr);

    }
    sqlite3DbFree(db, zErr);
  }

  return rc;
}
/*







>







640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
    sqlite3ErrorMsg(pParse, "no such module: %s", zModule);
    rc = SQLITE_ERROR;
  }else{
    char *zErr = 0;
    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xConnect, &zErr);
    if( rc!=SQLITE_OK ){
      sqlite3ErrorMsg(pParse, "%s", zErr);
      pParse->rc = rc;
    }
    sqlite3DbFree(db, zErr);
  }

  return rc;
}
/*