Add file tkt-3a77c9714e.test, containing tests to verify that the problem documented by ticket [3a77c9714e] has been fixed.

FossilOrigin-Name: 162421dadf93e9201c3290d800c597cbeeacdb40
This commit is contained in:
dan 2011-12-06 13:46:54 +00:00
parent cdc6955716
commit ed51f29774
3 changed files with 76 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Do\snot\sreuse\stemp\sregisters\soriginally\sallocated\sto\sa\ssubroutine\swithin\nthe\smain\sbody\sof\sthe\sprogram\slogic,\ssince\sif\sthe\ssubroutine\sis\scalled\nwhile\sthe\sreused\stemp\sregisters\sare\sin\suse,\stheir\svalues\swill\sget\sclobbered.\nCandidate\sfix\sfor\sticket\s[3a77c9714e63330]
D 2011-12-06T13:24:59.067
C Add\sfile\stkt-3a77c9714e.test,\scontaining\stests\sto\sverify\sthat\sthe\sproblem\sdocumented\sby\sticket\s[3a77c9714e]\shas\sbeen\sfixed.
D 2011-12-06T13:46:54.313
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -728,6 +728,7 @@ F test/tkt-31338dca7e.test 1f714c14b6682c5db715e0bda347926a3456f7a9
F test/tkt-313723c356.test c47f8a9330523e6f35698bf4489bcb29609b53ac
F test/tkt-38cb5df375.test 9e9b19857dba0896a8efdaf334d405ba423492f2
F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
F test/tkt-3a77c9714e.test 1675c22a5be71d7fa026e5db5daeeb4dd64f7824
F test/tkt-3fe897352e.test 10de1a67bd5c66b238a4c96abe55531b37bb4f00
F test/tkt-4a03edc4c8.test 2865e4edbc075b954daa82f8da7cc973033ec76e
F test/tkt-54844eea3f.test a12b851128f46a695e4e378cca67409b9b8f5894
@ -976,7 +977,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P 5b03ba9db0d23a8597b45e00ad5892c8065ce1cd
R 9fd2e18e31f5993e2a2417d0bd31fbb8
U drh
Z 6b588a9e7cf08c9f198f7cca1fb8c358
P 092d53315e50be42b51ef7b3069c82c32a129b6a
R 8d2fc7565d4aa525192ff0541b1c9cf2
U dan
Z d04d6b5cb95ec0b64c1e1542ea707494

View File

@ -1 +1 @@
092d53315e50be42b51ef7b3069c82c32a129b6a
162421dadf93e9201c3290d800c597cbeeacdb40

68
test/tkt-3a77c9714e.test Normal file
View File

@ -0,0 +1,68 @@
# 2011 December 06
#
# 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 [3a77c9714e] has been
# fixed.
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix "tkt-3a77c9714e"
do_execsql_test 1.1 {
CREATE TABLE t1(t1_id INTEGER PRIMARY KEY, t1_title TEXT);
CREATE TABLE t2(t2_id INTEGER PRIMARY KEY, t2_title TEXT);
CREATE TABLE t3(t3_id INTEGER PRIMARY KEY, t3_title TEXT);
INSERT INTO t1 (t1_id, t1_title) VALUES (888, 'ABCDEF');
INSERT INTO t2 (t2_id, t2_title) VALUES (999, 'ABCDEF');
INSERT INTO t3 (t3_id, t3_title) VALUES (999, 'ABCDEF');
}
do_execsql_test 1.2 {
SELECT t1_title, t2_title
FROM t1 LEFT JOIN t2
WHERE
t2_id = (SELECT t3_id FROM
( SELECT t3_id FROM t3 WHERE t3_title=t1_title LIMIT 500 )
)
} {ABCDEF ABCDEF}
do_execsql_test 2.1 {
CREATE TABLE [Beginnings] (
[Id] INTEGER PRIMARY KEY AUTOINCREMENT,[Title] TEXT, [EndingId] INTEGER
);
CREATE TABLE [Endings] (Id INT,Title TEXT,EndingId INT);
INSERT INTO Beginnings (Id, Title, EndingId) VALUES (1, 'FACTOR', 18);
INSERT INTO Beginnings (Id, Title, EndingId) VALUES (2, 'SWIMM', 18);
INSERT INTO Endings (Id, Title, EndingId) VALUES (1, 'ING', 18);
}
do_execsql_test 2.2 {
SELECT
SrcWord, Beginnings.Title
FROM
(SELECT 'FACTORING' AS SrcWord UNION SELECT 'SWIMMING' AS SrcWord )
LEFT JOIN
Beginnings
WHERE Beginnings.Id= (
SELECT BeginningId FROM (
SELECT SrcWord, B.Id as BeginningId, B.Title || E.Title As Connected
FROM Beginnings B LEFT JOIN Endings E ON B.EndingId=E.EndingId
WHERE Connected=SrcWord LIMIT 1
)
)
} {FACTORING FACTOR SWIMMING SWIMM}
finish_test