Implement type affinity for table and index records (CVS 1375)
FossilOrigin-Name: dbfe6e93166d9557d66cab9dca7977baa3501e5e
This commit is contained in:
+5
-8
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the SELECT statement.
|
||||
#
|
||||
# $Id: select2.test,v 1.19 2004/05/13 05:16:17 danielk1977 Exp $
|
||||
# $Id: select2.test,v 1.20 2004/05/14 11:00:53 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -83,26 +83,23 @@ do_test select2-3.1 {
|
||||
execsql {SELECT f1 FROM tbl2 WHERE 1000=f2}
|
||||
} {500}
|
||||
|
||||
# SQLite v3: Change the expressions in the following four test cases
|
||||
# from 1000=f2 to '1000'=f2. This is because fields read in using
|
||||
# the COPY command have manifest type TEXT.
|
||||
do_test select2-3.2a {
|
||||
execsql {CREATE INDEX idx1 ON tbl2(f2)}
|
||||
} {}
|
||||
do_test select2-3.2b {
|
||||
execsql {SELECT f1 FROM tbl2 WHERE '1000'=f2}
|
||||
execsql {SELECT f1 FROM tbl2 WHERE 1000=f2}
|
||||
} {500}
|
||||
do_test select2-3.2c {
|
||||
execsql {SELECT f1 FROM tbl2 WHERE f2='1000'}
|
||||
execsql {SELECT f1 FROM tbl2 WHERE f2=1000}
|
||||
} {500}
|
||||
do_test select2-3.2d {
|
||||
set sqlite_search_count 0
|
||||
execsql {SELECT * FROM tbl2 WHERE '1000'=f2}
|
||||
execsql {SELECT * FROM tbl2 WHERE 1000=f2}
|
||||
set sqlite_search_count
|
||||
} {3}
|
||||
do_test select2-3.2e {
|
||||
set sqlite_search_count 0
|
||||
execsql {SELECT * FROM tbl2 WHERE f2='1000'}
|
||||
execsql {SELECT * FROM tbl2 WHERE f2=1000}
|
||||
set sqlite_search_count
|
||||
} {3}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user