From: dan Date: Tue, 2 Aug 2016 20:45:56 +0000 (+0000) Subject: Add new test file rowvaluefault.test. X-Git-Tag: version-3.15.0~110^2~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78f9bb6c717275422a25dadd67df1bb3a2e3f971;p=thirdparty%2Fsqlite.git Add new test file rowvaluefault.test. FossilOrigin-Name: e496b2d63984311e6ae117677e6c2417ae24b6bc --- diff --git a/manifest b/manifest index b7b01adb06..0b758663bc 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\stests\sand\sfixes\sfor\svector\soperations\sthat\suse\ssub-queries\swith\sdifferent\scombinations\sof\sLIMIT,\sOFFSET\sand\sORDER\sBY\sclauses. -D 2016-08-02T18:50:15.542 +C Add\snew\stest\sfile\srowvaluefault.test. +D 2016-08-02T20:45:56.795 F Makefile.in 6c20d44f72d4564f11652b26291a214c8367e5db F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 3340e479e5221f06c3d61726f8f7efff885e4233 @@ -1022,6 +1022,7 @@ F test/rowvalue.test 56b34d31d91340a6e922e753b798880170cc1aa7 F test/rowvalue2.test 8d5dfe75b8f4d1868a2f91f0356f20d36cba64ff F test/rowvalue3.test dbe935260851b197dfbbbcb0ac2a15cb5f324fd4 F test/rowvalue4.test 9aa6a5efe6069b34bcbefe004bb481cdaaca0dc5 +F test/rowvaluefault.test 7b16485e3f2b371f3e3d05455b8ded6d0c090244 F test/rtree.test 0c8d9dd458d6824e59683c19ab2ffa9ef946f798 F test/run-wordcount.sh 891e89c4c2d16e629cd45951d4ed899ad12afc09 F test/savepoint.test c671fdbd34cd3bfe1518a777526ada595180cf8d @@ -1513,7 +1514,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 339f85f414a484e44d2502d1ff7281caf9b7c838 -R c52410c242ecf248d644374975097b8c +P 092b1c5ff53c9f3cfed079c46e3353d93f99303e +R 7575cd5084e4e0e048e98a52c8b1c879 U dan -Z 38a047c096aac032ca966b61ad2f4616 +Z 1ac631fd43d573ba36f8f7688c8dc1d7 diff --git a/manifest.uuid b/manifest.uuid index eacf0abe20..4cf8fbb9bc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -092b1c5ff53c9f3cfed079c46e3353d93f99303e \ No newline at end of file +e496b2d63984311e6ae117677e6c2417ae24b6bc \ No newline at end of file diff --git a/test/rowvaluefault.test b/test/rowvaluefault.test new file mode 100644 index 0000000000..0a4da6ba47 --- /dev/null +++ b/test/rowvaluefault.test @@ -0,0 +1,72 @@ +# 2016 June 17 +# +# 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. +# + + +set testdir [file dirname $argv0] +source $testdir/tester.tcl +source $testdir/malloc_common.tcl +set ::testprefix rowvaluefault + +do_execsql_test 1.0 { + CREATE TABLE xyz(one, two, thr, fou); + INSERT INTO xyz VALUES('A', 'A', 'A', 1); + INSERT INTO xyz VALUES('B', 'B', 'B', 2); + INSERT INTO xyz VALUES('C', 'C', 'C', 3); + INSERT INTO xyz VALUES('D', 'D', 'D', 4); + + CREATE UNIQUE INDEX xyz_one_two ON xyz(one, two); +} + +do_faultsim_test 1 -faults oom* -body { + execsql { SELECT fou FROM xyz WHERE (one, two, thr) = ('B', 'B', 'B') } +} -test { + faultsim_test_result {0 2} +} + +do_faultsim_test 2 -faults oom* -body { + execsql { SELECT fou FROM xyz WHERE (two, thr) IS ('C', 'C') } +} -test { + faultsim_test_result {0 3} +} + +do_faultsim_test 3 -faults oom* -body { + execsql { SELECT fou FROM xyz WHERE (one, two, thr) > ('B', 'B', 'B') } +} -test { + faultsim_test_result {0 {3 4}} +} + +do_faultsim_test 4 -faults oom* -body { + execsql { SELECT fou FROM xyz WHERE (one, two) IN (SELECT one, two FROM xyz) } +} -test { + faultsim_test_result {0 {1 2 3 4}} +} + +do_faultsim_test 5 -faults oom* -body { + execsql { + SELECT fou FROM xyz + WHERE (one, two, thr) IN (SELECT one, two, thr FROM xyz) + } +} -test { + faultsim_test_result {0 {1 2 3 4}} +} + +do_faultsim_test 6 -faults oom* -body { + execsql { + SELECT fou FROM xyz + WHERE (one, two, thr) BETWEEN ('B', 'B', 'B') AND ('C', 'C', 'C') } +} -test { + faultsim_test_result {0 {2 3}} +} + +finish_test +