Test cases for ticket #3442. (CVS 5835)
FossilOrigin-Name: a8bb5acf708c8f7e52d3f67b85094116386f10fa
This commit is contained in:
parent
d207d8084e
commit
3ed4e64cd8
13
manifest
13
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\san\sassert()\sfailure\sthat\scan\soccur\sfollowing\sa\smalloc()\sfailure.\sTicket\s#3455.\s(CVS\s5834)
|
||||
D 2008-10-22T10:45:38
|
||||
C Test\scases\sfor\sticket\s#3442.\s(CVS\s5835)
|
||||
D 2008-10-22T16:04:43
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 4352ab12369706c793f3e8165db35b102c929998
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -571,6 +571,7 @@ F test/tkt3346.test 2f9a2be8621a87cbdb6283177dd419c7c46dd2a1
|
||||
F test/tkt3357.test b37a51a12ba5e143d6714778276438606f8f9e27
|
||||
F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
|
||||
F test/tkt3424.test 3171193ce340cff6b7ea81c03b8fa1cbc34ec36e
|
||||
F test/tkt3442.test 33722a3fa4bdc0614448044eb5e28765aea28eb7
|
||||
F test/tokenize.test ce430a7aed48fc98301611429595883fdfcab5d7
|
||||
F test/trace.test 951cd0f5f571e7f36bf7bfe04be70f90fb16fb00
|
||||
F test/trans.test 2fd24cd7aa0b879d49a224cbd647d698f1e7ac5c
|
||||
@ -649,7 +650,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P a3c810f0c80e3e9dfe60a0ffd8688d7c76a30d50
|
||||
R eb10ad551dda09e9891a5b737d1b43ef
|
||||
U danielk1977
|
||||
Z 78303c07616fabd1b430a1645d928812
|
||||
P e0d3aa75b4fa0e706185a3058b5962916e30d066
|
||||
R 59ff706943428be14662f4d5a4372928
|
||||
U shane
|
||||
Z 7e8bfbcdb85f2134260d3bc0bc1c0cf2
|
||||
|
@ -1 +1 @@
|
||||
e0d3aa75b4fa0e706185a3058b5962916e30d066
|
||||
a8bb5acf708c8f7e52d3f67b85094116386f10fa
|
73
test/tkt3442.test
Normal file
73
test/tkt3442.test
Normal file
@ -0,0 +1,73 @@
|
||||
# 2008 October 20
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file implements regression tests for SQLite library.
|
||||
#
|
||||
# This file implements tests to verify that ticket #3442 has been
|
||||
# fixed.
|
||||
#
|
||||
#
|
||||
# $Id: tkt3442.test,v 1.1 2008/10/22 16:04:43 shane Exp $
|
||||
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
|
||||
# Create a schema with some indexes.
|
||||
#
|
||||
do_test tkt3442-1.1 {
|
||||
execsql {
|
||||
CREATE TABLE listhash(
|
||||
key INTEGER PRIMARY KEY,
|
||||
id TEXT,
|
||||
node INTEGER
|
||||
);
|
||||
CREATE UNIQUE INDEX ididx ON listhash(id);
|
||||
}
|
||||
} {}
|
||||
|
||||
|
||||
# Explain Query Plan
|
||||
#
|
||||
proc EQP {sql} {
|
||||
uplevel "execsql {EXPLAIN QUERY PLAN $sql}"
|
||||
}
|
||||
|
||||
|
||||
# These tests perform an EXPLAIN QUERY PLAN on both versions of the
|
||||
# SELECT referenced in ticket #3442 (both '5000' and "5000")
|
||||
# and verify that the query plan is the same.
|
||||
#
|
||||
ifcapable explain {
|
||||
do_test tkt3442-1.2 {
|
||||
EQP { SELECT node FROM listhash WHERE id='5000' LIMIT 1; }
|
||||
} {0 0 {TABLE listhash WITH INDEX ididx}}
|
||||
do_test tkt3442-1.3 {
|
||||
EQP { SELECT node FROM listhash WHERE id="5000" LIMIT 1; }
|
||||
} {0 0 {TABLE listhash WITH INDEX ididx}}
|
||||
}
|
||||
|
||||
|
||||
# Some extra tests testing other permutations of 5000.
|
||||
#
|
||||
ifcapable explain {
|
||||
do_test tkt3442-1.4 {
|
||||
EQP { SELECT node FROM listhash WHERE id=5000 LIMIT 1; }
|
||||
} {0 0 {TABLE listhash WITH INDEX ididx}}
|
||||
}
|
||||
do_test tkt3442-1.5 {
|
||||
catchsql {
|
||||
SELECT node FROM listhash WHERE id=[5000] LIMIT 1;
|
||||
}
|
||||
} {1 {no such column: 5000}}
|
||||
|
||||
finish_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user