Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(875)

Unified Diff: third_party/sqlite/sqlite-src-3080704/test/fts3corrupt2.test

Issue 2363173002: [sqlite] Remove obsolete reference version 3.8.7.4. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/sqlite-src-3080704/test/fts3corrupt2.test
diff --git a/third_party/sqlite/sqlite-src-3080704/test/fts3corrupt2.test b/third_party/sqlite/sqlite-src-3080704/test/fts3corrupt2.test
deleted file mode 100644
index 78c76778f5c8bf3c1d923e6d336348014bd0f280..0000000000000000000000000000000000000000
--- a/third_party/sqlite/sqlite-src-3080704/test/fts3corrupt2.test
+++ /dev/null
@@ -1,110 +0,0 @@
-# 2010 October 30
-#
-# 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.
-#
-#***********************************************************************
-# Test that the FTS3 extension does not crash when it encounters a
-# corrupt data structure on disk.
-#
-
-set testdir [file dirname $argv0]
-source $testdir/tester.tcl
-
-# If SQLITE_ENABLE_FTS3 is not defined, omit this file.
-ifcapable !fts3 { finish_test ; return }
-
-set ::testprefix fts3corrupt2
-
-set data [list]
-lappend data {*}{
- "amxtvoo adqwroyhz auq aithtir avniqnuynvf axp ahibayfynig agbicpm"
- "ajdtebs anteaxr aieynenwmd awpl alo akxcrwow aoxftge aoqvgul"
- "amcfvdr auz apu aebelm ahuxyz aqc asyafdb agulvhvqu"
- "apepwfyz azkhdvkw aenyelxzbk aslnitbyet aycdsdcpgr aqzzdbc agfi axnypydou"
- "aaqrzzcm apcxdxo atumltzj aevvivo aodknoft aqoyytoz alobx apldt"
- "adjllxlhnmj aiuhvuj adwppceuht atvj azrsam ahkjqdhny audlqxr aotgcd"
- "aira azflsceos awj auzbobfkc awmezplr aeh awec ahndxlmv"
- "aydwnied alk auoap agihyqeix aymqxzajnl aydwnied aojkarx agbo"
- "ahajsmcl anvx amdhjm aoptsj agugzjjm apkevm acnj acjg"
- "amwtkw aogttbykvt aubwrfqnbjf ajow agsj aerkqzjdqst anenlvbalkn arfajzzgckx"
- "adqqqofkmz amjpavjuhw aqgehgnb awvvxlbtqzn agstqko akmkzehyh atagzey agwja"
- "amag ahe autkllywhr avnk atmt akn anvdh aixfrv"
- "aqdyerbws avefykly awl azaduojgzo anxfsmw axpt abgbvk ati"
- "attyqkwz aiweypiczul afy asitaqbczhh aitxisizpv auhviq aibql ajfqc"
- "aylzprtmta aiuemihqrpi awluvgsw ampbuy axlifpzfqr aems aoaxwads apianfn"
- "aodrkijelq acdb aaserrdxm aqyasgofqu aevvivo afi apmwu aeoqysl"
- "amqnk ankaotm ayfy ajcupeeoc advcbukan aucahlwnyk adbfyo azqjpeant"
- "afczpp asqrs ahslvda akhlf aiqgdp atyd aznuglxqbrg awirndrh"
- "aqhiajp amxeazb asxuehg akod axvolvsp agcz asmovmohy acmqa"
- "avvomv aafms ashuaec arevx audtq alrwqhjvao avgsgpg ajbrctpsel"
- "atxoirr ayopboobqdu ajunntua arh aernimxid aipljda aglo aefk"
- "aonxf acmnnkna abgviaswe aulvcbv axp apemgakpzo aibql acioaid"
- "axo alrwqhjvao ayqounftdzl azmoakdyh apajze ajk artvy apxiamy"
- "ayjafsraz addjj agsj asejtziqws acatvhegu aoxdjqblsvv aekdmmbs aaobe"
- "abjjvzubkwt alczv ati awz auyxgcxeb aymjoym anqoukprtyt atwfhpmbooh"
- "ajfqz aethlgir aclcx aowlyvetby aproqm afjlqtkv anebfy akzrcpfrrvw"
- "aoledfotm aiwlfm aeejlaej anz abgbvk aktfn aayoh anpywgdvgz"
- "acvmldguld asdvz aqb aeomsyzyu aggylhprbdz asrfkwz auipybpsn agsnszzfb"
-}
-
-do_test fts3corrupt2-1.0 {
- execsql BEGIN
- execsql { CREATE VIRTUAL TABLE t2 USING FTS3(a, b); }
- execsql { INSERT INTO t2(t2) VALUES('nodesize=32') }
- foreach d $data {
- execsql { INSERT INTO t2 VALUES($d, $d) }
- }
- execsql COMMIT
- execsql { SELECT count(*) FROM t2_segments }
-} {163}
-
-proc set_byte {blob byte val} {
- binary format a*ca* \
- [string range $blob 0 [expr $byte-1]] \
- $val \
- [string range $blob [expr $byte+1] end] \
-}
-
-set tn 0
-set c 256
-foreach {rowid sz blob} [
- db eval {SELECT rowid, length(block), block FROM t2_segments}
-] {
- incr tn
- set c [expr (($c+255)%256)]
- for {set i 0} {$i < $sz} {incr i} {
- set b2 [set_byte $blob $i $c]
- execsql { UPDATE t2_segments SET block = $b2 WHERE rowid = $rowid }
- do_test fts3corrupt2-1.$tn.$i {
- catchsql { SELECT * FROM t2 WHERE t2 MATCH 'a*' }
- set {} {}
- } {}
- }
- execsql { UPDATE t2_segments SET block = $blob WHERE rowid = $rowid }
-}
-
-foreach c {50 100 150 200 250} {
- foreach {rowid sz blob} [
- db eval {SELECT rowid, length(root), root FROM t2_segdir}
- ] {
- incr tn
- for {set i 0} {$i < $sz} {incr i} {
- set b2 [set_byte $blob $i $c]
- execsql { UPDATE t2_segdir SET root = $b2 WHERE rowid = $rowid }
- do_test fts3corrupt2-2.$c.$tn.$i {
- catchsql { SELECT * FROM t2 WHERE t2 MATCH 'a*' }
- set {} {}
- } {}
- }
- execsql { UPDATE t2_segdir SET root = $blob WHERE rowid = $rowid }
- }
-}
-
-
-
-
-
-
-finish_test
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/fts3corrupt.test ('k') | third_party/sqlite/sqlite-src-3080704/test/fts3cov.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698