1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Store schema cookies on the TEMP database. Ticket #807. (CVS 1817)

FossilOrigin-Name: c6c13dc460094e6adea2b14849edf9f485238b99
This commit is contained in:
drh
2004-07-19 17:25:24 +00:00
parent 27438cf186
commit c275b4ea91
10 changed files with 80 additions and 69 deletions

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: attach2.test,v 1.21 2004/06/21 18:14:47 drh Exp $
# $Id: attach2.test,v 1.22 2004/07/19 17:25:25 drh Exp $
#
set testdir [file dirname $argv0]
@ -177,7 +177,7 @@ do_test attach2-4.2 {
# db2 -
} {}
lock_status 4.2.1 db {main shared temp shared file2 unlocked}
lock_status 4.2.1 db {main shared temp unlocked file2 unlocked}
lock_status 4.2.2 db2 {main unlocked temp unlocked file2 unlocked}
do_test attach2-4.3 {
@ -185,7 +185,7 @@ do_test attach2-4.3 {
execsql {SELECT * FROM t1} db2
} {}
lock_status 4.3.1 db {main shared temp shared file2 unlocked}
lock_status 4.3.1 db {main shared temp unlocked file2 unlocked}
lock_status 4.3.2 db2 {main unlocked temp unlocked file2 unlocked}
do_test attach2-4.4 {
@ -196,7 +196,7 @@ do_test attach2-4.4 {
} db2
} {1 {database is locked}}
lock_status 4.4.1 db {main shared temp shared file2 unlocked}
lock_status 4.4.1 db {main shared temp unlocked file2 unlocked}
lock_status 4.4.2 db2 {main unlocked temp unlocked file2 unlocked}
do_test attach2-4.5 {
@ -208,7 +208,7 @@ do_test attach2-4.5 {
# db2 - reserved(file2)
} {}
lock_status 4.5.1 db {main shared temp shared file2 unlocked}
lock_status 4.5.1 db {main shared temp unlocked file2 unlocked}
lock_status 4.5.2 db2 {main unlocked temp reserved file2 reserved}
do_test attach2-4.6.1 {
@ -221,7 +221,7 @@ do_test attach2-4.6.1 {
# db2 - reserved(file2)
} {0 {}}
lock_status 4.6.1.1 db {main shared temp shared file2 shared}
lock_status 4.6.1.1 db {main shared temp unlocked file2 shared}
lock_status 4.6.1.2 db2 {main unlocked temp reserved file2 reserved}
do_test attach2-4.6.2 {

View File

@ -13,7 +13,7 @@
# This file implements tests for joins, including outer joins, where
# there are a large number of tables involved in the join.
#
# $Id: join3.test,v 1.1 2004/07/19 02:12:14 drh Exp $
# $Id: join3.test,v 1.2 2004/07/19 17:25:25 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -45,14 +45,8 @@ for {set N 1} {$N<=40} {incr N} {
append sql " $sep t[expr {$i+1}].x==t$i.x+1"
set sep AND
}
#if {$N==32} {btree_breakpoint}
#if {$N==33} {
#explain $sql
#execsql {PRAGMA vdbe_trace=on}
#}
execsql $sql
} $result
#if {$N==33} exit
}
finish_test

View File

@ -13,7 +13,7 @@
# This file implements tests for miscellanous features that were
# left out of other test files.
#
# $Id: misc4.test,v 1.2 2004/07/19 00:39:46 drh Exp $
# $Id: misc4.test,v 1.3 2004/07/19 17:25:25 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -41,6 +41,17 @@ do_test misc4-1.1 {
SELECT * FROM temp.t2;
}
} {1}
catch {sqlite3_finalize $stmt}
# Drop the temporary table, then rerun the prepared statement to
# recreate it again. This recreates ticket #807.
#
do_test misc4-1.2 {
execsql {DROP TABLE t2}
sqlite3_reset $stmt
sqlite3_step $stmt
} {SQLITE_ERROR}
do_test misc4-1.3 {
sqlite3_finalize $stmt
} {SQLITE_SCHEMA}
finish_test

View File

@ -15,7 +15,7 @@
# interface is pretty well tested. This file contains some addition
# tests for fringe issues that the main test suite does not cover.
#
# $Id: tclsqlite.test,v 1.26 2004/06/29 12:39:08 drh Exp $
# $Id: tclsqlite.test,v 1.27 2004/07/19 17:25:25 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -133,6 +133,7 @@ do_test tcl-1.19 {
if {[sqlite3 -tcl-uses-utf]} {
catch {unset ::result}
do_test tcl-2.1 {
execsql "CREATE TABLE t\u0123x(a int, b\u1235 float)"
execsql "PRAGMA table_info(t\u0123x)"