-C Progress\stoward\sgetting\sthe\svirtual-table\scode\sgenerator\sto\swork.\s(CVS\s3220)
-D 2006-06-13T01:04:52
+C Bugfixes:\sFix\sa\ssegfault\sintroduced\sas\spart\sof\sthe\snew\svtab\scode,\sdeallocate\smemory\sin\sthe\sDestroy()\smethod\sof\sthe\secho\smodule.\s(CVS\s3221)
+D 2006-06-13T04:11:44
F Makefile.in 56fd6261e83f60724e6dcd764e06ab68cbd53909
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/date.c cd2bd5d1ebc6fa12d6312f69789ae5b0a2766f2e
F src/delete.c f9a8c7837adb4bb4810a698a041a88d5ec7bfa9a
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
-F src/expr.c 896f642936e9248b50c1449fd4b3924bcb149632
+F src/expr.c 8c873e05436ca8ee0ac4c7825d35ff898abb9c89
F src/func.c acbbf533b55221f26760798d99b37de3ac5678fe
F src/hash.c 449f3d6620193aa557f5d86cbc5cc6b87702b185
F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
F src/test5.c 7162f8526affb771c4ed256826eee7bb9eca265f
F src/test6.c 60a02961ceb7b3edc25f5dc5c1ac2556622a76de
F src/test7.c 03fa8d787f6aebc6d1f72504d52f33013ad2c8e3
-F src/test8.c 2a8676c42f20a34371244259a0bfad7a1dbfc419
+F src/test8.c c85eba7e98405e6c3d22ece241ee4e9ea4d154f8
F src/test_async.c e3deaedd4d86a56391b81808fde9e44fbd92f1d3
F src/test_md5.c 6c42bc0a3c0b54be34623ff77a0eec32b2fa96e3
F src/test_server.c a6460daed0b92ecbc2531b6dc73717470e7a648c
F test/vacuum2.test 5aea8c88a65cb29f7d175296e7c819c6158d838c
F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
F test/view.test 16e2774fe35e47a07ac4471b7f0bcc948b1aa6d5
-F test/vtab1.test d3d4d38bd6fccb2ecec25357d9696bfea38d61e4
+F test/vtab1.test b3a93d0b4667bf27adfbb555154086c7e25ee597
F test/where.test ee7c9a6659b07e1ee61177f6e7ff71565ee2c9df
F test/where2.test a16476a5913e75cf65b38f2daa6157a6b7791394
F test/where3.test 3b5ad2c58069e12be2bd86bc5e211a82810521aa
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 010965433140fbe508a907d861dbad79343bf7c2
-R 764c40e62a8b536cdb57327045ebbc4d
-U drh
-Z b3815508f49a0543b1d64dd34c187512
+P 3532f1340f939b0231c1d82a7b2d186cb096fb29
+R b50ded4b4061c3fa2b3bc042599da575
+U danielk1977
+Z d664bf5f89df9a39843ed66a526c4f5a
-3532f1340f939b0231c1d82a7b2d186cb096fb29
\ No newline at end of file
+f9ea9704755eee3fd29af7a47be1d41620be8835
\ No newline at end of file
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.260 2006/06/13 01:04:52 drh Exp $
+** $Id: expr.c,v 1.261 2006/06/13 04:11:44 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
}else if( pExpr->iColumn>=0 ){
Table *pTab = pExpr->pTab;
int iCol = pExpr->iColumn;
- sqlite3VdbeAddOp(v, pTab->isVirtual ? OP_VColumn : OP_Column,
- pExpr->iTable, iCol);
+ int op = (pTab && pTab->isVirtual) ? OP_VColumn : OP_Column;
+ sqlite3VdbeAddOp(v, op, pExpr->iTable, iCol);
sqlite3ColumnDefault(v, pTab, iCol);
#ifndef SQLITE_OMIT_FLOATING_POINT
if( pTab && pTab->aCol[iCol].affinity==SQLITE_AFF_REAL ){
}
#endif
}else{
- sqlite3VdbeAddOp(v, pExpr->pTab->isVirtual ? OP_VRowid : OP_Rowid,
- pExpr->iTable, 0);
+ Table *pTab = pExpr->pTab;
+ int op = (pTab && pTab->isVirtual) ? OP_VRowid : OP_Rowid;
+ sqlite3VdbeAddOp(v, op, pExpr->iTable, 0);
}
break;
}
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test8.c,v 1.6 2006/06/13 01:04:53 drh Exp $
+** $Id: test8.c,v 1.7 2006/06/13 04:11:44 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
Tcl_SetVar(interp, "echo_module", zArg, flags);
}
-static void appendToEchoTable(Tcl_Interp *interp, const char *zArg){
- int flags = (TCL_APPEND_VALUE | TCL_LIST_ELEMENT | TCL_GLOBAL_ONLY);
- Tcl_SetVar(interp, "echo_module", zArg, flags);
-}
-
/*
** This function is called from within the echo-modules xCreate and
** xConnect methods. The argc and argv arguments are copies of those
*ppVtab = &pVtab->base;
pVtab->base.pModule = pModule;
pVtab->interp = pModule->pAux;
- Tcl_SetVar(interp, "echo_module", "xConnect", TCL_GLOBAL_ONLY);
+ appendToEchoModule(pVtab->interp, "xConnect");
for(i=0; i<argc; i++){
- Tcl_SetVar(interp, "echo_module", argv[i],
- TCL_APPEND_VALUE | TCL_LIST_ELEMENT | TCL_GLOBAL_ONLY);
+ appendToEchoModule(pVtab->interp, argv[i]);
}
echoDeclareVtab(db, argc, argv);
}
static int echoDisconnect(sqlite3_vtab *pVtab){
echo_vtab *p = (echo_vtab*)pVtab;
- appendToEchoTable(p->interp, "xDisconnect");
+ appendToEchoModule(p->interp, "xDisconnect");
sqliteFree(pVtab);
return 0;
}
static int echoDestroy(sqlite3_vtab *pVtab){
echo_vtab *p = (echo_vtab*)pVtab;
- Tcl_SetVar(p->interp, "echo_module", "xDestroy",
- TCL_APPEND_VALUE | TCL_LIST_ELEMENT | TCL_GLOBAL_ONLY);
+ appendToEchoModule(p->interp, "xDestroy");
+ sqliteFree(pVtab);
return 0;
}
# This file implements regression tests for SQLite library. The
# focus of this file is creating and dropping virtual tables.
#
-# $Id: vtab1.test,v 1.6 2006/06/12 16:01:23 danielk1977 Exp $
+# $Id: vtab1.test,v 1.7 2006/06/13 04:11:44 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set echo_module
} [list xDisconnect xDisconnect]
+ set echo_module [list]
# Re-open the database. Check that the schema of the virtual
# table is still correct.
do_test vtab1-2.4 {
}
set echo_module
} [list xDestroy]
+
+finish_test
+
do_test vtab1-2.6 {
execsql {
PRAGMA table_info(t2);
} [list {CREATE VIRTUAL TABLE t1 USING echo} \
{CREATE TABLE template(a, b, c)} \
]
+do_test vtab1-2.8 {
+ set echo_module [list]
+ execsql {
+ DROP TABLE t1;
+ DROP TABLE template;
+ }
+ set echo_module
+} [list]
+do_test vtab1-2.9 {
+ execsql {
+ SELECT sql FROM sqlite_master;
+ }
+} [list]
finish_test