Index: src/pragma.c ================================================================== --- src/pragma.c +++ src/pragma.c @@ -9,11 +9,11 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* ** This file contains code used to implement the PRAGMA command. ** -** $Id: pragma.c,v 1.125 2006/11/30 13:06:37 drh Exp $ +** $Id: pragma.c,v 1.126 2007/01/04 22:13:42 drh Exp $ */ #include "sqliteInt.h" #include "os.h" #include @@ -892,10 +892,11 @@ }; int addr = sqlite3VdbeAddOpList(v, ArraySize(readCookie), readCookie); sqlite3VdbeChangeP1(v, addr, iDb); sqlite3VdbeChangeP2(v, addr, iCookie); sqlite3VdbeSetNumCols(v, 1); + sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLeft, P3_TRANSIENT); } } #endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */ #if defined(SQLITE_DEBUG) || defined(SQLITE_TEST) Index: test/pragma.test ================================================================== --- test/pragma.test +++ test/pragma.test @@ -10,11 +10,11 @@ #*********************************************************************** # This file implements regression tests for SQLite library. # # This file implements tests for the PRAGMA command. # -# $Id: pragma.test,v 1.45 2006/11/30 13:06:37 drh Exp $ +# $Id: pragma.test,v 1.46 2007/01/04 22:13:42 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Test organization: @@ -40,11 +40,12 @@ # Delete the preexisting database to avoid the special setup # that the "all.test" script does. # db close -file delete test.db +file delete test.db test.db-journal +file delete test3.db test3.db-journal sqlite3 db test.db; set DB [sqlite3_connection_pointer db] ifcapable pager_pragmas { do_test pragma-1.1 { execsql { @@ -444,14 +445,14 @@ execsql { PRAGMA schema_version = 105; } } {} do_test pragma-8.1.2 { - execsql { + execsql2 { PRAGMA schema_version; } -} 105 +} {schema_version 105} do_test pragma-8.1.3 { execsql { PRAGMA schema_version = 106; } } {} @@ -546,24 +547,24 @@ } {} # Now test that the user-version can be read and written (and that we aren't # accidentally manipulating the schema-version instead). do_test pragma-8.2.1 { - execsql { + execsql2 { PRAGMA user_version; } -} {0} +} {user_version 0} do_test pragma-8.2.2 { execsql { PRAGMA user_version = 2; } } {} do_test pragma-8.2.3.1 { - execsql { + execsql2 { PRAGMA user_version; } -} {2} +} {user_version 2} do_test pragma-8.2.3.2 { db close sqlite3 db test.db execsql { PRAGMA user_version;