fts5corrupt5.test 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457
  1. # 2015 Apr 24
  2. #
  3. # The author disclaims copyright to this source code. In place of
  4. # a legal notice, here is a blessing:
  5. #
  6. # May you do good and not evil.
  7. # May you find forgiveness for yourself and forgive others.
  8. # May you share freely, never taking more than you give.
  9. #
  10. #***********************************************************************
  11. #
  12. # This file tests that FTS5 handles corrupt databases (i.e. internal
  13. # inconsistencies in the backing tables) correctly. In this case
  14. # "correctly" means without crashing.
  15. #
  16. source [file join [file dirname [info script]] fts5_common.tcl]
  17. set testprefix fts5corrupt5
  18. # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
  19. ifcapable !fts5 {
  20. finish_test
  21. return
  22. }
  23. sqlite3_fts5_may_be_corrupt 1
  24. database_may_be_corrupt
  25. #-------------------------------------------------------------------------
  26. # dbsqlfuzz crash-0f47112aa7520cf08c6a835a88fdff8c2a32a188
  27. #
  28. reset_db
  29. do_test 1.0 {
  30. sqlite3 db {}
  31. db deserialize [decode_hexdb {
  32. .open --hexdb
  33. | size 24576 pagesize 4096 filename crash-0f47112aa7520c.db
  34. | page 1 offset 0
  35. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  36. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 00 .....@ ........
  37. | 96: 00 00 00 00 0d 00 00 00 06 0e 0f 00 0f aa 0f 53 ...............S
  38. | 112: 0e e8 0e 8b 0e 33 0e 0f 00 00 00 00 00 00 00 00 .....3..........
  39. | 3584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 ................
  40. | 3600: 06 06 17 11 11 01 31 74 61 62 6c 65 62 62 62 62 ......1tablebbbb
  41. | 3616: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 62 62 .CREATE TABLE bb
  42. | 3632: 28 61 29 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 (a)V.......table
  43. | 3648: 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 6f 6e 66 t1_configt1_conf
  44. | 3664: 69 67 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 ig.CREATE TABLE
  45. | 3680: 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 't1_config'(k PR
  46. | 3696: 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 20 57 49 IMARY KEY, v) WI
  47. | 3712: 54 48 4f 55 54 20 52 4f 57 49 44 5b 04 07 17 21 THOUT ROWID[...!
  48. | 3728: 21 01 81 01 74 61 62 6c 65 74 31 5f 64 6f 63 73 !...tablet1_docs
  49. | 3744: 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 04 43 52 izet1_docsize.CR
  50. | 3760: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 EATE TABLE 't1_d
  51. | 3776: 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 54 45 47 ocsize'(id INTEG
  52. | 3792: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
  53. | 3808: 73 7a 20 42 4c 4f 42 29 69 03 07 17 19 19 01 81 sz BLOB)i.......
  54. | 3824: 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 -tablet1_idxt1_i
  55. | 3840: 64 78 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 dx.CREATE TABLE
  56. | 3856: 27 74 31 5f 69 64 78 27 28 73 65 67 69 64 2c 20 't1_idx'(segid,
  57. | 3872: 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d term, pgno, PRIM
  58. | 3888: 41 52 59 20 4b 45 59 28 73 65 67 69 64 2c 20 74 ARY KEY(segid, t
  59. | 3904: 65 72 6d 29 29 20 57 49 54 48 4f 55 54 20 52 4f erm)) WITHOUT RO
  60. | 3920: 57 49 44 55 02 07 17 1b 1b 01 81 01 74 61 62 6c WIDU........tabl
  61. | 3936: 65 74 31 5f 64 61 74 61 74 31 5f 64 61 74 61 02 et1_datat1_data.
  62. | 3952: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  63. | 3968: 5f 64 61 74 61 27 28 69 64 20 49 4e 54 45 47 45 _data'(id INTEGE
  64. | 3984: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 R PRIMARY KEY, b
  65. | 4000: 6c 6f 63 6b 20 42 4c 4f 42 29 54 01 07 17 11 11 lock BLOB)T.....
  66. | 4016: 08 81 15 74 61 62 6c 65 74 31 74 31 43 52 45 41 ...tablet1t1CREA
  67. | 4032: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 TE VIRTUAL TABLE
  68. | 4048: 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 28 61 t1 USING fts5(a
  69. | 4064: 2c 62 2c 70 72 65 66 69 78 3d 22 31 2c 32 2c 33 ,b,prefix=.1,2,3
  70. | 4080: 2c 34 22 2c 20 63 6f 6e 74 65 6e 74 3d 22 22 29 ,4., content=..)
  71. | page 2 offset 4096
  72. | 0: 0d 0b 6a 00 37 09 4c 02 0f e7 09 4c 0f c6 0f a4 ..j.7.L....L....
  73. | 16: 0f 88 0f 6d 0f 4b 0f 2c 0f 0e 0e ec 0e cd 0e ad ...m.K.,........
  74. | 32: 0e 8e 0e 6c 0e 4b 0e 29 0e 08 0d e6 0d c4 0d b5 ...l.K.)........
  75. | 48: 0d 97 0d 76 0d 54 0d 31 0d 15 0c f3 0c d3 0c b5 ...v.T.1........
  76. | 64: 0c 95 0c 73 0c 54 0c 32 0c 10 0b ee 0b cc 0b b0 ...s.T.2........
  77. | 80: 0b 8d 0b 7e 0b 48 0b 2e 0b 0b 0a ef 00 00 00 00 ...~.H..........
  78. | 2368: 00 00 00 00 00 00 00 00 00 00 00 00 15 0a 03 00 ................
  79. | 2384: 30 00 00 00 01 01 03 35 00 03 01 11 12 02 01 12 0......5........
  80. | 2400: 03 01 11 1c 8c 80 80 80 80 10 03 00 3e 00 00 00 ............>...
  81. | 2416: 17 01 05 05 34 74 61 62 6c 03 02 03 01 04 77 68 ....4tabl.....wh
  82. | 2432: 65 72 03 02 06 09 1b 8c 80 80 80 80 0f 03 00 3c er.............<
  83. | 2448: 00 00 00 16 05 34 66 74 73 34 03 02 02 01 04 6e .....4fts4.....n
  84. | 2464: 75 6d 62 03 06 01 04 09 1b 8c 80 80 80 80 0e 03 umb.............
  85. | 2480: 00 3c 00 00 00 16 04 33 74 68 65 03 06 01 01 04 .<.....3the.....
  86. | 2496: 01 03 77 68 65 03 02 04 04 0a 1b 8c 80 80 80 80 ..whe...........
  87. | 2512: 0d 03 00 3c 00 00 00 16 04 33 6e 75 6d 03 06 01 ...<.....3num...
  88. | 2528: 01 05 01 03 74 61 62 03 02 03 04 0a 19 8c 80 80 ....tab.........
  89. | 2544: 80 80 0c 03 00 38 00 00 00 14 03 32 77 68 03 02 .....8.....2wh..
  90. | 2560: 04 00 04 33 66 74 73 03 02 02 04 07 18 8c 80 80 ...3fts.........
  91. | 2576: 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 03 02 .....6.....2ta..
  92. | 2592: 03 02 01 68 03 06 01 01 04 04 07 1b 8c 80 80 80 ...h............
  93. | 2608: 80 0a 03 00 3c 00 00 00 16 03 32 6e 75 03 06 01 ....<.....2nu...
  94. | 2624: 01 05 01 02 6f 66 03 06 01 01 06 04 09 19 8c 80 ....of..........
  95. | 2640: 80 80 80 09 03 00 38 00 00 00 14 03 32 66 74 03 ......8.....2ft.
  96. | 2656: 02 02 01 02 69 73 03 06 01 01 03 04 07 18 8c 80 ....is..........
  97. | 2672: 80 80 80 08 03 00 36 00 00 00 13 02 31 74 03 08 ......6.....1t..
  98. | 2688: 03 01 01 04 01 01 77 03 02 04 04 09 1a 8c 80 80 ......w.........
  99. | 2704: 80 80 07 03 00 3a 00 00 00 15 02 31 6e 03 08 01 .....:.....1n...
  100. | 2720: 01 02 05 01 00 6f 03 06 01 01 06 04 09 18 8c 80 .....o..........
  101. | 2736: 80 80 80 06 03 00 36 00 00 00 03 04 02 31 66 03 ......6......1f.
  102. | 2752: 02 02 01 01 69 03 06 01 01 03 04 f6 1c 8c 80 80 ....i...........
  103. | 2768: 80 80 05 03 00 3e 00 00 00 17 04 30 74 68 65 03 .....>.....0the.
  104. | 2784: f6 01 01 04 01 05 77 68 65 72 65 03 02 04 0a 15 ......where.....
  105. | 2800: 8c 80 80 80 80 04 03 00 30 00 00 00 11 01 01 06 ........0.......
  106. | 2816: 06 30 74 61 62 6c 65 0f 42 03 07 1c 8c 81 80 80 .0table.B.......
  107. | 2832: 80 03 03 00 3e 00 00 00 17 07 30 6e 75 6d 62 65 ....>.....0numbe
  108. | 2848: 72 03 06 01 01 05 01 02 6f 66 03 06 04 0d 13 8c r.......of......
  109. | 2864: 80 80 80 80 02 03 00 2c 00 00 00 0f 01 01 03 02 .......,........
  110. | 2880: 30 6e 03 06 01 01 02 07 1b 8c 80 80 80 80 01 03 0n..............
  111. | 2896: 00 3c 00 00 00 16 08 30 66 74 73 34 61 75 78 03 .<.....0fts4aux.
  112. | 2912: 02 02 01 02 69 73 03 06 04 0c 00 00 00 14 2a 00 ....is........*.
  113. | 2928: 00 00 01 01 02 24 00 02 01 01 12 02 01 12 08 88 .....$..........
  114. | 2944: 80 80 80 80 12 03 00 16 00 00 00 05 02 1c 88 80 ................
  115. | 2960: 80 80 80 11 03 00 3e 00 00 00 17 05 34 72 6f 77 ......>.....4row
  116. | 2976: 73 02 06 01 01 05 01 04 74 68 65 72 02 02 04 0b s.......ther....
  117. | 2992: 15 88 80 80 80 80 10 03 00 30 00 00 00 11 02 01 .........0......
  118. | 3008: 01 07 05 34 62 65 74 77 02 02 04 08 1b 88 80 80 ...4betw........
  119. | 3024: 80 80 0f 03 00 3c 00 00 00 16 04 04 33 72 6f 77 .....<......3row
  120. | 3040: 02 06 01 01 05 01 03 74 68 65 02 08 05 0a 1b 88 .......the......
  121. | 3056: 80 80 80 80 0e 03 00 3c 00 00 00 16 01 01 02 04 .......<........
  122. | 3072: 33 61 72 65 02 02 03 01 03 62 65 74 02 02 07 08 3are.....bet....
  123. | 3088: 1b 88 80 80 80 80 0d 03 00 3c 00 00 00 16 13 32 .........<.....2
  124. | 3104: 74 68 02 08 02 01 01 07 00 04 33 61 6e 64 02 06 th........3and..
  125. | 3120: 04 0a 1b 88 80 80 80 80 0c 03 00 3c 00 00 00 16 ...........<....
  126. | 3136: 03 32 69 6e 02 06 01 01 06 01 02 72 6f 02 06 01 .2in.......ro...
  127. | 3152: 01 05 04 09 18 88 80 80 80 80 0b 03 00 36 00 00 .............6..
  128. | 3168: 00 13 02 03 32 61 72 02 02 03 01 02 62 65 02 02 ....2ar.....be..
  129. | 3184: 04 05 07 1b 88 80 80 80 80 0a 03 00 3c 00 9e 00 ............<...
  130. | 3200: 16 02 31 74 02 08 02 01 01 07 00 03 32 61 6e 02 ..1t........2an.
  131. | 3216: 06 01 01 04 09 19 88 80 80 80 80 09 03 00 38 00 ..............8.
  132. | 3232: 00 00 14 02 31 6e 02 06 01 01 03 01 01 72 02 06 ....1n.......r..
  133. | 3248: 01 01 05 04 08 17 88 80 80 80 80 08 03 00 34 00 ..............4.
  134. | 3264: 00 00 12 02 31 62 02 02 04 01 01 69 02 06 01 01 ....1b.....i....
  135. | 3280: 06 04 06 19 88 80 80 80 80 07 03 00 38 00 00 00 ............8...
  136. | 3296: 14 04 02 31 32 02 02 05 01 01 61 02 08 03 01 01 ...12.....a.....
  137. | 3312: 02 05 06 1b 88 80 80 80 80 06 03 00 3c 00 00 00 ............<...
  138. | 3328: 16 06 30 74 68 65 72 65 02 02 02 00 02 31 31 02 ..0there.....11.
  139. | 3344: 06 01 01 04 0a 15 88 80 80 80 80 05 03 00 30 00 ..............0.
  140. | 3360: 00 00 11 01 01 05 04 30 74 68 65 02 06 01 01 07 .......0the.....
  141. | 3376: 07 1c 88 80 80 80 80 04 03 00 3e 00 00 00 17 01 ..........>.....
  142. | 3392: 01 06 02 30 6e 02 06 01 01 03 01 04 72 6f 77 73 ...0n.......rows
  143. | 3408: 02 06 07 08 1b 88 80 80 80 80 03 03 00 3c 00 00 .............<..
  144. | 3424: 00 16 08 30 62 65 74 77 65 65 6e 02 02 04 01 02 ...0between.....
  145. | 3440: 69 6e 02 06 04 0c 1a 88 80 80 80 80 02 03 00 3a in.............:
  146. | 3456: 00 00 00 15 04 30 61 6e 64 02 06 01 01 02 02 02 .....0and.......
  147. | 3472: 72 65 02 02 03 04 0a 17 88 80 80 80 80 01 03 00 re..............
  148. | 3488: 34 00 00 00 12 02 30 31 02 06 01 01 04 01 01 32 4.....01.......2
  149. | 3504: 02 02 05 04 08 08 84 80 80 80 80 12 03 00 16 00 ................
  150. | 3520: 00 00 05 04 1b 84 80 80 80 80 11 03 00 3c 00 00 .............<..
  151. | 3536: 00 16 05 34 74 61 62 6c 01 06 01 01 05 02 03 65 ...4tabl.......e
  152. | 3552: 72 6d 01 02 04 0b 1b 84 80 80 80 80 10 03 00 3c rm.............<
  153. | 3568: 00 00 00 16 05 34 65 61 63 68 01 02 03 01 04 70 .....4each.....p
  154. | 3584: 72 65 73 01 02 05 04 08 1a 84 80 80 80 80 0f 03 res.............
  155. | 3600: 00 3a 00 00 00 15 04 33 74 65 72 01 02 04 02 02 .:.....3ter.....
  156. | 3616: 68 65 01 06 01 01 03 04 08 1b 84 80 80 80 80 0e he..............
  157. | 3632: 03 00 3c 00 00 00 16 04 33 80 72 65 01 02 05 01 ..<.....3.re....
  158. | 3648: 03 74 61 62 01 06 01 01 05 04 08 1a 84 80 80 80 .tab............
  159. | 3664: 80 0d 03 00 3a 00 00 00 15 04 33 66 6f 72 01 02 ....:.....3for..
  160. | 3680: 02 02 02 74 73 01 06 01 01 04 04 08 1b 84 80 80 ...ts...........
  161. | 3696: 80 80 0c 03 00 3c 00 00 00 17 03 32 74 68 01 06 .....<.....2th..
  162. | 3712: 01 01 03 00 04 33 65 61 63 01 02 03 04 09 18 84 .....3eac.......
  163. | 3728: 80 80 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 .......6.....2ta
  164. | 3744: 01 06 01 01 05 02 01 65 01 02 04 04 09 19 84 80 .......e........
  165. | 3760: 80 80 80 0a 03 00 38 00 00 00 14 03 32 69 6e 01 ......8.....2in.
  166. | 3776: 06 01 01 02 01 02 70 72 01 02 05 04 09 18 84 80 ......pr........
  167. | 3792: 80 80 80 09 03 00 36 00 00 00 13 03 32 66 6f 01 ......6.....2fo.
  168. | 3808: 02 02 02 01 74 01 06 01 01 04 04 07 1b 84 80 80 ....t...........
  169. | 3824: 80 80 08 03 00 3c 00 00 00 16 02 31 74 01 0a 04 .....<.....1t...
  170. | 3840: 01 01 03 04 00 03 32 65 61 01 02 03 04 0a 17 84 ......2ea.......
  171. | 3856: 80 80 80 80 07 03 00 34 00 00 00 12 02 31 69 01 .......4.....1i.
  172. | 3872: 06 01 01 02 01 01 70 01 02 05 04 08 18 84 80 80 ......p.........
  173. | 3888: 80 80 06 03 00 36 00 00 00 13 02 31 65 01 02 03 .....6.....1e...
  174. | 3904: 01 01 66 01 08 02 01 01 04 04 06 1b 84 80 80 80 ..f.............
  175. | 3920: 80 05 03 00 3c 00 00 00 16 05 30 74 65 72 6d 01 ....<.....0term.
  176. | 3936: 02 04 02 02 68 65 01 06 01 01 03 04 09 14 84 80 ....he..........
  177. | 3952: 80 80 80 04 03 00 2e 00 00 00 10 06 30 64 61 62 ............0dab
  178. | 3968: 6c 65 01 06 01 01 05 04 15 84 80 80 80 80 03 03 le..............
  179. | 3984: 00 30 00 00 00 11 02 08 30 70 72 65 73 65 6e 74 .0......0present
  180. | 4000: 01 02 05 05 1b 84 80 80 80 80 02 03 00 3c 00 00 .............<..
  181. | 4016: 00 16 04 30 66 74 73 01 06 01 01 04 01 02 69 6e ...0fts.......in
  182. | 4032: 01 06 01 01 04 0a 1a 84 80 80 80 80 01 03 00 3a ...............:
  183. | 4048: 00 00 00 15 05 30 65 61 63 68 01 02 03 01 13 66 .....0each.....f
  184. | 4064: 6f 72 01 02 02 04 09 06 01 03 00 12 03 0b 0f 00 or..............
  185. | 4080: 00 08 8c 80 80 80 80 11 03 00 16 00 00 00 05 04 ................
  186. | page 3 offset 8192
  187. | 0: 0a 00 00 00 32 0e 4f 00 0f fa 0f f1 0f e9 0f e1 ....2.O.........
  188. | 16: 0f d8 0f d1 0f c9 0f c1 0f b9 0f b1 0f a9 0f a0 ................
  189. | 32: 0f 98 0f 90 0f 87 0f 80 0f 78 0f 71 0f 68 0f 5f .........x.q.h._
  190. | 48: 0f 56 0f 4d 0f 41 0f 38 0f 2f 0f 26 0f 1d 0f 13 .V.M.A.8./.&....
  191. | 64: 0f 0a 0f 01 0e f7 0e ee 0e e6 0e dd 0e d6 0e cd ................
  192. | 80: 0e c3 0e ba 0e 00 00 00 00 00 00 00 00 00 00 00 ................
  193. | 3648: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ................
  194. | 3664: 04 01 10 01 03 34 74 20 07 04 01 0e 01 03 34 1e .....4t ......4.
  195. | 3680: 09 04 01 12 01 03 33 74 68 1c 08 04 01 10 01 03 ......3th.......
  196. | 3696: 33 6e 1a 08 04 01 10 01 03 32 77 18 08 04 01 10 3n.......2w.....
  197. | 3712: 01 03 32 74 16 08 04 01 10 01 03 32 6e 14 07 04 ..2t.......2n...
  198. | 3728: 01 0e 01 03 32 12 08 04 01 10 01 03 31 74 10 08 ....2.......1t..
  199. | 3744: 04 01 10 01 03 31 6e 0e 07 04 01 0e 01 03 31 0c .....1n.......1.
  200. | 3760: 09 04 01 12 01 03 30 74 68 0a 08 04 01 10 01 03 ......0th.......
  201. | 3776: 30 74 08 09 04 01 12 01 03 30 6e 75 06 08 04 01 0t.......0nu....
  202. | 3792: 10 01 03 30 6e 04 06 04 01 0c 01 03 02 08 04 01 ...0n...........
  203. | 3808: 10 01 02 34 72 22 07 04 01 0e 01 02 34 20 08 04 ...4r.......4 ..
  204. | 3824: 01 10 01 02 33 72 1e 09 04 01 12 01 02 33 61 72 ....3r.......3ar
  205. | 3840: 1c 08 04 01 10 01 02 32 74 1a 08 04 01 10 01 02 .......2t.......
  206. | 3856: 32 69 18 09 04 01 12 01 02 32 61 72 16 08 04 01 2i.......2ar....
  207. | 3872: 10 01 02 31 74 14 08 04 01 10 01 02 31 6e 12 08 ...1t.......1n..
  208. | 3888: 04 01 10 01 02 31 62 10 08 04 01 10 01 02 31 32 .....1b.......12
  209. | 3904: 0e 0b 04 01 16 01 02 30 74 68 65 72 0c 08 04 01 .......0ther....
  210. | 3920: 10 01 02 30 74 0a 08 04 01 10 01 02 30 6e 08 08 ...0t.......0n..
  211. | 3936: 14 01 10 01 02 30 62 06 08 04 01 10 01 02 30 61 .....0b.......0a
  212. | 3952: 04 06 04 01 0c 01 02 02 07 04 09 10 01 34 74 22 .............4t.
  213. | 3968: 06 04 09 0e 01 34 20 08 04 09 12 01 33 74 65 1e .....4 .....3te.
  214. | 3984: 07 04 09 10 01 33 70 1c 07 04 09 10 01 33 66 1a .....3p......3f.
  215. | 4000: 08 04 09 12 01 32 74 68 18 07 04 09 10 01 32 74 .....2th......2t
  216. | 4016: 16 01 64 09 10 01 32 69 14 07 04 09 10 01 32 66 ..d...2i......2f
  217. | 4032: 12 07 04 09 10 01 31 74 10 07 04 09 10 01 31 69 ......1t......1i
  218. | 4048: 0e 06 04 09 0e 01 31 0c 08 04 09 12 01 30 74 65 ......1......0te
  219. | 4064: 0a 06 04 09 10 01 30 74 08 07 04 09 10 01 30 70 ......0t......0p
  220. | 4080: 06 08 04 09 12 00 00 00 00 00 00 00 00 00 00 00 ................
  221. | page 4 offset 12288
  222. | 4064: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
  223. | 4080: 03 05 05 02 03 00 10 04 06 05 01 03 00 10 04 04 ................
  224. | page 5 offset 16384
  225. | 0: 0a 00 00 00 02 0f eb 00 0f eb 0f f4 00 00 00 00 ................
  226. | 4064: 00 00 00 00 00 00 00 00 00 00 00 08 03 15 01 70 ...............p
  227. | 4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04 gsz.....version.
  228. | page 6 offset 20480
  229. | 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  230. | 4080: 00 00 03 03 02 01 03 03 02 02 01 00 00 00 00 00 ................
  231. | end crash-0f47112aa7520c.db
  232. }]
  233. } {}
  234. do_catchsql_test 1.1 {
  235. SELECT * FROM t1('R*') WHERE (a,b)<=(current_date,0) ORDER BY rowid DESC;
  236. } {1 {database disk image is malformed}}
  237. #-------------------------------------------------------------------------
  238. #
  239. reset_db
  240. do_test 2.0 {
  241. sqlite3 db {}
  242. db deserialize [decode_hexdb {
  243. .open --hexdb
  244. | size 24576 pagesize 4096 filename sql047467.txt.db
  245. | page 1 offset 0
  246. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  247. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 00 .....@ ........
  248. | 96: 00 00 00 00 0d 00 00 00 06 0e 0f 00 0f aa 0f 53 ...............S
  249. | 112: 0e e8 0e 8b 0e 33 0e 0f 01 00 00 00 00 00 00 00 .....3..........
  250. | 3584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 ................
  251. | 3600: 06 06 17 11 11 01 31 74 61 62 6c 65 62 62 62 62 ......1tablebbbb
  252. | 3616: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 62 62 .CREATE TABLE bb
  253. | 3632: 28 61 29 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 (a)V.......table
  254. | 3648: 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 6f 6e 66 t1_configt1_conf
  255. | 3664: 69 67 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 ig.CREATE TABLE
  256. | 3680: 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 't1_config'(k PR
  257. | 3696: 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 20 57 49 IMARY KEY, v) WI
  258. | 3712: 54 48 4f 55 54 20 52 4f 57 49 44 5b 04 07 17 21 THOUT ROWID[...!
  259. | 3728: 21 01 81 01 74 61 62 6c 65 74 31 5f 64 6f 63 73 !...tablet1_docs
  260. | 3744: 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 04 43 52 izet1_docsize.CR
  261. | 3760: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 EATE TABLE 't1_d
  262. | 3776: 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 54 45 47 ocsize'(id INTEG
  263. | 3792: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
  264. | 3808: 73 7a 20 42 4c 4f 42 29 69 03 07 17 19 19 01 81 sz BLOB)i.......
  265. | 3824: 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 -tablet1_idxt1_i
  266. | 3840: 64 78 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 dx.CREATE TABLE
  267. | 3856: 27 74 31 5f 69 64 78 27 28 73 65 67 69 64 2c 20 't1_idx'(segid,
  268. | 3872: 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d term, pgno, PRIM
  269. | 3888: 41 52 59 20 4b 45 59 28 73 65 67 69 64 2c 20 74 ARY KEY(segid, t
  270. | 3904: 65 72 6d 29 29 20 57 49 54 48 4f 55 54 20 52 4f erm)) WITHOUT RO
  271. | 3920: 57 49 44 55 02 07 17 1b 1b 01 81 01 74 61 62 6c WIDU........tabl
  272. | 3936: 65 74 31 5f 64 61 74 61 74 31 5f 64 61 74 61 02 et1_datat1_data.
  273. | 3952: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  274. | 3968: 5f 64 61 74 61 27 28 69 64 20 49 4e 54 45 47 45 _data'(id INTEGE
  275. | 3984: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 R PRIMARY KEY, b
  276. | 4000: 6c 6f 63 6b 20 42 4c 4f 42 29 54 01 07 17 11 11 lock BLOB)T.....
  277. | 4016: 08 81 15 74 61 62 6c 65 74 31 74 31 43 52 45 41 ...tablet1t1CREA
  278. | 4032: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 TE VIRTUAL TABLE
  279. | 4048: 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 28 61 t1 USING fts5(a
  280. | 4064: 2c 62 2c 70 72 65 66 69 78 3d 22 31 2c 32 2c 33 ,b,prefix=.1,2,3
  281. | 4080: 2c 34 22 2c 20 63 6f 6e 74 65 6e 74 3d 22 22 29 ,4., content=..)
  282. | page 2 offset 4096
  283. | 0: 0d 0b 6a 00 37 09 4c 02 0f e7 09 4c 0f c6 0f a4 ..j.7.L....L....
  284. | 16: 0f 88 0f 6d 0f 4b 0f 2c 0f 0e 0e ec 0e cd 0e ad ...m.K.,........
  285. | 32: 0e 8e 0e 6c 0e 4b 0e 29 0e 08 0d e6 0d c4 0d b5 ...l.K.)........
  286. | 48: 0d 97 0d 76 0d 54 0d 31 0d 15 0c f3 0c d3 0c b5 ...v.T.1........
  287. | 64: 0c 95 0c 73 0c 54 0c 32 0c 10 0b ee 0b cc 0b b0 ...s.T.2........
  288. | 80: 0b 8d 0b 7e 0b 48 0b 2e 0b 0b 0a ef 00 00 00 00 ...~.H..........
  289. | 2368: 00 00 00 00 00 00 00 00 00 00 00 00 15 0a 03 00 ................
  290. | 2384: 30 00 00 00 01 01 03 35 00 03 01 11 12 02 01 12 0......5........
  291. | 2400: 03 01 11 1c 8c 80 80 80 80 10 03 00 3e 00 00 00 ............>...
  292. | 2416: 17 01 05 05 34 74 61 62 6c 03 02 03 01 04 77 68 ....4tabl.....wh
  293. | 2432: 65 72 03 02 06 09 1b 8c 80 80 80 80 0f 03 00 3c er.............<
  294. | 2448: 00 00 00 16 05 34 66 74 73 34 03 02 02 01 04 6e .....4fts4.....n
  295. | 2464: 75 6d 62 03 06 01 04 09 1b 8c 80 80 80 80 0e 03 umb.............
  296. | 2480: 00 3b ff f0 00 16 04 33 74 68 65 03 06 01 01 04 .;.....3the.....
  297. | 2496: 01 03 77 68 65 03 02 04 04 0a 1b 8c 80 80 80 80 ..whe...........
  298. | 2512: 0d 03 00 3c 00 00 00 16 04 33 6e 75 6d 03 06 01 ...<.....3num...
  299. | 2528: 01 05 01 03 74 61 62 03 02 03 04 0a 19 8c 80 80 ....tab.........
  300. | 2544: 80 80 0c 03 00 38 00 00 00 14 03 32 77 68 03 02 .....8.....2wh..
  301. | 2560: 04 00 04 33 66 74 73 03 02 02 04 07 18 8c 80 80 ...3fts.........
  302. | 2576: 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 03 02 .....6.....2ta..
  303. | 2592: 03 02 01 68 03 06 01 01 04 04 07 1b 8c 80 80 80 ...h............
  304. | 2608: 80 0a 03 00 3c 00 00 00 16 03 32 6e 75 03 06 01 ....<.....2nu...
  305. | 2624: 01 05 01 02 6f 66 03 06 01 01 06 04 09 19 8c 80 ....of..........
  306. | 2640: 80 80 80 09 03 00 38 00 00 00 14 03 32 66 74 03 ......8.....2ft.
  307. | 2656: 02 02 01 02 69 73 03 06 01 01 03 04 07 18 8c 80 ....is..........
  308. | 2672: 80 80 80 08 03 00 36 00 00 00 13 02 31 74 03 08 ......6.....1t..
  309. | 2688: 03 01 01 04 01 01 77 03 02 04 04 09 1a 8c 80 80 ......w.........
  310. | 2704: 80 80 07 03 00 3a 00 00 00 15 02 31 6e 03 08 01 .....:.....1n...
  311. | 2720: 01 02 05 01 00 6f 03 06 01 01 06 14 09 18 8c 80 .....o..........
  312. | 2736: 80 80 80 06 03 00 36 00 00 00 03 04 02 31 66 03 ......6......1f.
  313. | 2752: 02 02 01 01 69 03 06 01 01 03 04 f6 1c 8c 80 80 ....i...........
  314. | 2768: 80 80 05 03 00 3e 00 00 00 17 04 30 74 68 65 03 .....>.....0the.
  315. | 2784: f6 01 01 04 01 05 77 68 65 72 65 03 02 04 0a 15 ......where.....
  316. | 2800: 8c 80 80 80 80 04 03 00 30 00 00 00 11 01 01 06 ........0.......
  317. | 2816: 06 30 74 61 62 6c 65 0f 42 03 07 1c 8c 81 80 80 .0table.B.......
  318. | 2832: 80 03 03 00 3e 00 00 00 17 07 30 6e 75 6d 62 65 ....>.....0numbe
  319. | 2848: 72 03 06 01 01 05 01 02 6f 66 03 06 04 0d 13 8c r.......of......
  320. | 2864: 80 80 80 80 02 03 00 2c 00 00 00 0f 01 01 03 02 .......,........
  321. | 2880: 30 6e 03 06 01 01 02 07 1b 8c 80 80 80 80 01 03 0n..............
  322. | 2896: 00 3c 00 00 00 16 08 30 66 74 73 34 61 75 78 03 .<.....0fts4aux.
  323. | 2912: 02 02 01 02 69 73 03 06 04 0c 00 00 00 14 2a 00 ....is........*.
  324. | 2928: 00 00 01 01 02 24 00 02 01 01 12 02 01 12 08 88 .....$..........
  325. | 2944: 80 80 80 80 12 03 00 16 00 00 00 05 02 1c 88 80 ................
  326. | 2960: 80 80 80 11 03 00 3e 00 00 00 17 05 34 72 6f 77 ......>.....4row
  327. | 2976: 73 02 06 01 01 05 01 04 74 68 65 72 02 02 04 0b s.......ther....
  328. | 2992: 15 88 80 80 80 80 10 03 00 30 00 00 00 11 02 01 .........0......
  329. | 3008: 01 07 05 34 62 65 74 77 02 02 04 08 1b 88 80 80 ...4betw........
  330. | 3024: 80 80 0f 03 00 3c 00 00 00 16 04 04 33 72 6f 77 .....<......3row
  331. | 3040: 02 06 01 01 05 01 03 74 68 65 02 08 05 0a 1b 88 .......the......
  332. | 3056: 80 80 80 80 0e 03 00 3c 00 00 00 16 01 01 02 04 .......<........
  333. | 3072: 33 61 72 65 02 02 03 01 03 62 65 74 02 02 07 08 3are.....bet....
  334. | 3088: 1b 88 80 80 80 80 0d 03 00 3c 00 00 00 16 13 32 .........<.....2
  335. | 3104: 74 68 02 08 02 01 01 07 00 04 33 61 6e 64 02 06 th........3and..
  336. | 3120: 04 0a 1b 88 80 80 80 80 0c 03 00 3c 00 00 00 16 ...........<....
  337. | 3136: 03 32 69 6e 02 06 01 01 06 01 02 72 6f 02 06 01 .2in.......ro...
  338. | 3152: 01 05 04 09 18 88 80 80 80 80 0b 03 00 36 00 00 .............6..
  339. | 3168: 00 13 02 03 32 61 72 02 02 03 01 02 62 65 02 02 ....2ar.....be..
  340. | 3184: 04 05 07 1b 88 80 80 80 80 0a 03 00 3c 00 94 50 ............<..P
  341. | 3200: 16 02 31 74 02 08 02 01 01 07 00 03 32 61 6e 02 ..1t........2an.
  342. | 3216: 06 01 01 04 09 19 88 80 80 80 80 09 03 00 38 00 ..............8.
  343. | 3232: 00 00 14 02 31 6e 02 06 01 01 03 01 01 72 02 06 ....1n.......r..
  344. | 3248: 01 01 05 04 08 17 88 80 80 80 80 08 03 00 34 00 ..............4.
  345. | 3264: 00 00 12 02 31 62 02 02 04 01 01 69 02 06 01 01 ....1b.....i....
  346. | 3280: 06 04 06 19 88 80 80 80 80 07 03 00 38 00 00 00 ............8...
  347. | 3296: 14 04 02 31 32 02 02 05 01 01 61 02 08 03 01 01 ...12.....a.....
  348. | 3312: 02 05 06 1b 88 80 80 80 80 06 03 00 3c 00 00 00 ............<...
  349. | 3328: 16 06 30 74 68 65 72 65 02 02 02 00 02 31 31 02 ..0there.....11.
  350. | 3344: 06 01 01 04 0a 15 88 80 80 80 80 05 03 00 30 00 ..............0.
  351. | 3360: 00 00 11 01 01 05 04 30 74 68 65 02 06 01 01 07 .......0the.....
  352. | 3376: 07 1c 88 80 80 80 80 04 03 00 3e 00 00 00 17 01 ..........>.....
  353. | 3392: 01 06 02 30 6e 02 06 01 01 03 01 04 72 6f 77 73 ...0n.......rows
  354. | 3408: 02 06 07 08 1b 88 80 80 80 80 03 03 00 3c 00 00 .............<..
  355. | 3424: 00 16 08 30 62 65 74 77 65 65 6e 02 02 04 01 02 ...0between.....
  356. | 3440: 69 6e 02 06 04 0c 1a 88 80 80 80 80 02 03 00 3a in.............:
  357. | 3456: 00 00 00 15 04 30 61 6e 64 02 06 01 01 02 02 02 .....0and.......
  358. | 3472: 72 65 02 02 03 04 0a 17 88 80 80 80 80 01 03 00 re..............
  359. | 3488: 34 00 00 00 12 02 30 31 02 06 01 01 04 01 01 32 4.....01.......2
  360. | 3504: 02 02 05 04 08 08 84 80 80 80 80 12 03 00 16 00 ................
  361. | 3520: 00 00 05 04 1b 84 80 80 80 80 11 03 00 3c 00 00 .............<..
  362. | 3536: 00 16 05 34 74 61 62 6c 01 06 01 01 05 02 03 65 ...4tabl.......e
  363. | 3552: 72 6d 01 02 04 0b 1b 84 80 80 80 80 10 03 00 3c rm.............<
  364. | 3568: 00 00 00 16 05 34 65 61 63 68 01 02 03 01 04 70 .....4each.....p
  365. | 3584: 72 65 73 01 02 05 04 08 1a 84 80 80 80 80 0f 03 res.............
  366. | 3600: 00 3a 00 00 00 15 04 33 74 65 72 01 02 04 02 02 .:.....3ter.....
  367. | 3616: 68 65 01 06 01 01 03 04 08 1b 84 80 80 80 80 0e he..............
  368. | 3632: 03 00 3c 00 00 00 16 04 33 80 72 65 01 02 05 01 ..<.....3.re....
  369. | 3648: 03 74 61 62 01 06 01 01 05 04 08 1a 84 80 80 80 .tab............
  370. | 3664: 80 0d 03 00 3a 00 00 00 15 04 33 66 6f 72 01 02 ....:.....3for..
  371. | 3680: 02 02 02 74 73 01 06 01 01 04 04 08 1b 84 80 80 ...ts...........
  372. | 3696: 80 80 0c 03 00 3c 00 00 00 17 03 32 74 68 01 06 .....<.....2th..
  373. | 3712: 01 01 03 00 04 33 65 61 63 01 02 03 04 09 18 84 .....3eac.......
  374. | 3728: 80 80 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 .......6.....2ta
  375. | 3744: 01 06 01 01 05 02 01 65 01 02 04 04 09 19 84 80 .......e........
  376. | 3760: 80 80 80 0a 03 00 38 00 00 00 14 03 32 69 6e 01 ......8.....2in.
  377. | 3776: 06 01 01 02 01 02 70 72 01 02 05 04 09 18 84 80 ......pr........
  378. | 3792: 80 80 80 09 03 00 36 00 00 00 13 03 32 66 6f 01 ......6.....2fo.
  379. | 3808: 02 02 02 01 74 01 06 01 01 04 04 07 1b 84 80 80 ....t...........
  380. | 3824: 80 80 08 03 00 3c 00 00 00 16 02 31 74 01 0a 04 .....<.....1t...
  381. | 3840: 01 01 03 04 00 03 32 65 61 01 02 03 04 0a 17 84 ......2ea.......
  382. | 3856: 80 80 80 80 07 03 00 34 00 00 00 12 02 31 69 01 .......4.....1i.
  383. | 3872: 06 01 01 02 01 01 70 01 02 05 04 08 18 84 80 80 ......p.........
  384. | 3888: 80 80 06 03 00 36 00 00 00 13 02 31 65 01 02 03 .....6.....1e...
  385. | 3904: 01 01 66 01 08 02 01 01 04 04 06 1b 84 80 80 80 ..f.............
  386. | 3920: 80 05 03 00 3c 00 00 00 16 05 30 74 65 72 6d 01 ....<.....0term.
  387. | 3936: 02 04 02 02 68 65 01 06 01 01 03 04 09 14 84 80 ....he..........
  388. | 3952: 80 80 80 04 03 00 2e 00 00 00 10 06 30 64 61 62 ............0dab
  389. | 3968: 6c 65 01 06 01 01 05 04 15 84 80 80 80 80 03 03 le..............
  390. | 3984: 00 30 00 00 00 11 02 08 30 70 72 65 73 65 6e 74 .0......0present
  391. | 4000: 01 02 05 05 1b 84 80 80 80 80 02 03 00 3c 00 00 .............<..
  392. | 4016: 00 16 04 30 66 74 73 01 06 01 01 04 01 02 69 6e ...0fts.......in
  393. | 4032: 01 06 01 01 04 0a 1a 84 80 80 80 80 01 03 00 3a ...............:
  394. | 4048: 00 00 00 15 05 30 65 61 63 68 01 02 03 01 13 66 .....0each.....f
  395. | 4064: 6f 72 01 02 02 04 09 06 01 03 00 12 03 0b 0f 00 or..............
  396. | 4080: 00 08 8c 80 80 80 80 11 03 00 16 00 00 00 05 04 ................
  397. | page 3 offset 8192
  398. | 0: 0a 00 00 00 32 0e 4f 00 0f fa 0f f1 0f e9 0f e1 ....2.O.........
  399. | 16: 0f d8 0f d1 0f c9 0f c1 0f b9 0f b1 0f a9 0f a0 ................
  400. | 32: 0f 98 0f 90 0f 87 0f 80 0f 78 0f 71 0f 68 0f 5f .........x.q.h._
  401. | 48: 0f 56 0f 4d 0f 41 0f 38 0f 2f 0f 26 0f 1d 0f 13 .V.M.A.8./.&....
  402. | 64: 0f 0a 0f 01 0e f7 0e ee 0e e6 0e dd 0e d6 0e cd ................
  403. | 80: 0e c3 0e ba 0e 00 00 00 00 00 00 00 00 00 00 00 ................
  404. | 3648: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ................
  405. | 3664: 04 01 10 01 03 34 74 20 07 04 01 0e 01 03 34 1e .....4t ......4.
  406. | 3680: 09 04 01 12 01 03 33 74 68 1c 08 04 01 10 01 03 ......3th.......
  407. | 3696: 33 6e 1a 08 04 01 10 01 03 32 77 18 08 04 01 10 3n.......2w.....
  408. | 3712: 01 03 32 74 16 08 04 01 10 01 03 32 6e 14 07 04 ..2t.......2n...
  409. | 3728: 01 0e 01 03 32 12 08 04 01 10 01 03 31 74 10 08 ....2.......1t..
  410. | 3744: 04 01 10 01 03 31 6e 0e 07 04 01 0e 01 03 31 0c .....1n.......1.
  411. | 3760: 09 04 01 12 01 03 30 74 68 0a 08 04 01 10 01 03 ......0th.......
  412. | 3776: 30 74 08 09 04 01 12 01 03 30 6e 75 06 08 04 01 0t.......0nu....
  413. | 3792: 10 01 03 30 6e 04 06 04 01 0c 01 03 02 08 04 01 ...0n...........
  414. | 3808: 10 01 02 34 72 22 07 04 01 0e 01 02 34 20 08 04 ...4r.......4 ..
  415. | 3824: 01 10 01 02 33 72 1e 09 04 01 12 01 02 33 61 72 ....3r.......3ar
  416. | 3840: 1c 08 04 01 10 01 02 32 74 1a 08 04 01 10 01 02 .......2t.......
  417. | 3856: 32 69 18 09 04 01 12 01 02 32 61 72 16 08 04 01 2i.......2ar....
  418. | 3872: 10 01 02 31 74 14 08 04 01 10 01 02 31 6e 12 08 ...1t.......1n..
  419. | 3888: 04 01 10 01 02 31 62 10 08 04 01 10 01 02 31 32 .....1b.......12
  420. | 3904: 0e 0b 04 01 16 01 02 30 74 68 65 72 0c 08 04 01 .......0ther....
  421. | 3920: 10 01 02 30 74 0a 08 04 01 10 01 02 30 6e 08 08 ...0t.......0n..
  422. | 3936: 14 01 10 01 02 30 62 06 08 04 01 10 01 02 30 61 .....0b.......0a
  423. | 3952: 04 06 04 01 0c 01 02 02 07 04 09 10 01 34 74 22 .............4t.
  424. | 3968: 06 04 09 0e 01 34 20 08 04 09 12 01 33 74 65 1e .....4 .....3te.
  425. | 3984: 07 04 09 10 01 33 70 1c 07 04 09 10 01 33 66 1a .....3p......3f.
  426. | 4000: 08 04 09 12 01 32 74 68 18 07 04 09 10 01 32 74 .....2th......2t
  427. | 4016: 16 01 64 09 10 01 32 69 14 07 04 09 10 01 32 66 ..d...2i......2f
  428. | 4032: 12 07 04 09 10 01 31 74 10 07 04 09 10 01 31 69 ......1t......1i
  429. | 4048: 0e 06 04 09 0e 01 31 0c 08 04 09 12 01 30 74 65 ......1......0te
  430. | 4064: 0a 06 04 09 10 01 30 74 08 07 04 09 10 01 30 70 ......0t......0p
  431. | 4080: 06 08 04 09 12 00 00 00 00 00 00 00 00 00 00 00 ................
  432. | page 4 offset 12288
  433. | 4064: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
  434. | 4080: 03 05 05 02 03 00 10 04 06 05 01 03 00 10 04 04 ................
  435. | page 5 offset 16384
  436. | 0: 0a 00 00 00 02 0f eb 00 0f eb 0f f4 00 00 00 00 ................
  437. | 4064: 00 00 00 00 00 00 00 00 00 00 00 08 03 15 01 70 ...............p
  438. | 4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04 gsz.....version.
  439. | page 6 offset 20480
  440. | 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  441. | 4080: 00 00 03 03 02 01 03 03 02 02 01 00 00 00 00 00 ................
  442. | end sql047467.txt.db
  443. }]} {}
  444. do_catchsql_test 2.1 {
  445. SELECT * FROM t1('R*R*R*R*') WHERE (a,b)<=(current_date,0) ORDER BY rowid DESC;
  446. } {1 {database disk image is malformed}}
  447. #-------------------------------------------------------------------------
  448. reset_db
  449. do_test 3.0 {
  450. sqlite3 db {}
  451. db deserialize [decode_hexdb {
  452. .open --hexdb
  453. | size 32768 pagesize 4096 filename crash-c69fcaceff1e50.db
  454. | page 1 offset 0
  455. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  456. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
  457. | 32: 00 00 00 02 00 00 00 01 00 00 00 09 00 00 00 04 ................
  458. | 96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36 ...............6
  459. | 112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 0d 92 00 00 00 00 ...k............
  460. | 3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
  461. | 3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
  462. | 3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
  463. | 3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
  464. | 3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
  465. | 3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
  466. | 3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
  467. | 3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06 WITHOUT ROWID[.
  468. | 3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
  469. | 3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
  470. | 3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
  471. | 3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
  472. | 3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
  473. | 3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21 Y, sz BLOB)^...!
  474. | 3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74 !...tablet1_cont
  475. | 3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52 entt1_content.CR
  476. | 3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 EATE TABLE 't1_c
  477. | 3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 ontent'(id INTEG
  478. | 3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
  479. | 3776: 63 30 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19 c0, c1, c2)i....
  480. | 3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 ...-tablet1_idxt
  481. | 3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42 1_idx.CREATE TAB
  482. | 3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69 LE 't1_idx'(segi
  483. | 3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 d, term, pgno, P
  484. | 3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64 RIMARY KEY(segid
  485. | 3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54 , term)) WITHOUT
  486. | 3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74 ROWIDU........t
  487. | 3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61 ablet1_datat1_da
  488. | 3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 ta.CREATE TABLE
  489. | 3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54 't1_data'(id INT
  490. | 3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 EGER PRIMARY KEY
  491. | 3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06 , block BLOB)8..
  492. | 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
  493. | 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
  494. | 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 LE t1 USING fts5
  495. | 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
  496. | page 3 offset 8192
  497. | 0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00 ................
  498. | 3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18 .....J..........
  499. | 3232: 00 00 01 bb 02 30 30 01 02 06 01 02 06 01 02 06 .....00.........
  500. | 3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30 ...........20160
  501. | 3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01 609...........4.
  502. | 3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02 ..........5.....
  503. | 3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04 ......0000000...
  504. | 3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06 ........binary..
  505. | 3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
  506. | 3344: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
  507. | 3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
  508. | 3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70 ............comp
  509. | 3392: 69 6c 65 72 01 02 02 01 02 02 01 02 02 01 06 64 iler...........d
  510. | 3408: 62 73 74 61 74 07 02 03 01 02 03 01 02 03 02 04 bstat...........
  511. | 3424: 65 62 75 67 04 02 02 01 02 02 01 02 02 01 06 65 ebug...........e
  512. | 3440: 6b b1 62 6c 65 07 02 02 01 02 02 01 02 02 01 02 k.ble...........
  513. | 3456: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 ................
  514. | 3472: 01 02 02 01 02 02 05 02 02 01 02 02 01 02 02 01 ................
  515. | 3488: 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 ................
  516. | 3504: 02 01 02 02 02 08 78 74 65 6e 73 69 6f 6e 1f 02 ......xtension..
  517. | 3520: 04 01 02 04 01 02 04 01 04 66 74 73 34 1a 02 03 .........fts4...
  518. | 3536: 01 02 03 01 02 03 04 01 35 0d 02 03 01 02 03 01 ........5.......
  519. | 3552: 02 03 01 03 67 63 63 01 02 03 01 02 03 01 02 03 ....gcc.........
  520. | 3568: 02 06 65 6f 70 6f 6c 79 10 02 03 01 02 03 01 02 ..eopoly........
  521. | 3584: 03 01 05 6a 73 6f 6e 31 13 02 03 01 02 03 01 02 ...json1........
  522. | 3600: 03 01 04 6c 6f 61 64 1f 02 03 01 02 03 01 02 03 ...load.........
  523. | 3616: 01 03 6d 61 78 1c 02 02 01 02 02 01 02 02 02 05 ..max...........
  524. | 3632: 65 6d 6f 72 79 1c 02 03 01 02 03 01 02 03 04 04 emory...........
  525. | 3648: 73 79 73 35 16 02 03 01 02 03 01 02 03 01 06 6e sys5...........n
  526. | 3664: 6f 63 61 73 65 02 06 01 02 02 03 06 01 02 02 03 ocase...........
  527. | 3680: 06 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 ................
  528. | 3696: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
  529. | 3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
  530. | 3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 01 ...omit.........
  531. | 3744: ff ff ff ff ff ff ff ff ff ff ff ff ff ff f1 02 ................
  532. | 3760: 58 81 96 4d 01 06 01 02 02 03 06 01 02 02 03 06 X..M............
  533. | 3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
  534. | 3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
  535. | 3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
  536. | 3824: 01 0a 74 68 72 65 61 64 73 61 66 65 22 02 02 01 ..threadsafe....
  537. | 3840: 02 02 01 02 02 01 04 76 74 61 62 07 02 04 01 02 .......vtab.....
  538. | 3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01 ......x.........
  539. | 3872: 02 01 06 01 c6 02 01 06 01 01 02 01 06 01 01 02 ................
  540. | 3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
  541. | 3904: 06 01 01 02 00 f6 01 01 02 01 06 01 01 02 01 06 ................
  542. | 3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
  543. | 3936: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
  544. | 3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 ................
  545. | 3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
  546. | 3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
  547. | 4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
  548. | 4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
  549. | 4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c ................
  550. | 4048: 12 44 13 11 0f 47 13 0f 0c 0e 11 10 0f 0e 10 0f .D...G..........
  551. | 4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f D..@.......$Z$$.
  552. | 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
  553. | page 4 offset 12288
  554. | 0: 0a 00 00 00 01 0f fa 00 0f fa 00 00 00 00 00 00 ................
  555. | 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
  556. | page 7 offset 24576
  557. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  558. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  559. | end crash-c69fcaceff1e50.db
  560. }]} {}
  561. do_catchsql_test 3.1 {
  562. UPDATE t1 SET b=quote(zeroblob(200)) WHERE a MATCH 'thra*T';
  563. } {1 {database disk image is malformed}}
  564. #-------------------------------------------------------------------------
  565. reset_db
  566. do_test 4.0 {
  567. sqlite3 db {}
  568. db deserialize [decode_hexdb {
  569. .open --hexdb
  570. | size 24576 pagesize 4096 filename crash-ef6738247b1344.db
  571. | page 1 offset 0
  572. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  573. | 16: 10 00 01 01 00 40 20 20 00 10 00 06 40 00 00 06 .....@ ....@...
  574. | 32: 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 00 ................
  575. | 96: 00 00 00 00 0d 00 00 00 06 0e 0f 00 0f aa 0f 53 ...............S
  576. | 112: 0e e8 0e 8b 0e 33 0e 0f 00 00 00 00 00 00 00 00 .....3..........
  577. | 3584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 ................
  578. | 3600: 06 06 17 11 11 01 31 74 61 62 6c 65 62 62 62 62 ......1tablebbbb
  579. | 3616: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 62 62 .CREATE TABLE bb
  580. | 3632: 28 61 29 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 (a)V.......table
  581. | 3648: 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 6f 6e 66 t1_configt1_conf
  582. | 3664: 69 67 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 ig.CREATE TABLE
  583. | 3680: 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 't1_config'(k PR
  584. | 3696: 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 20 57 49 IMARY KEY, v) WI
  585. | 3712: 54 48 4f 55 54 20 52 4f 57 49 44 5b 04 07 17 21 THOUT ROWID[...!
  586. | 3728: 21 01 81 01 74 61 62 6c 65 74 31 5f 64 6f 63 73 !...tablet1_docs
  587. | 3744: 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 04 43 52 izet1_docsize.CR
  588. | 3760: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 EATE TABLE 't1_d
  589. | 3776: 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 54 45 47 ocsize'(id INTEG
  590. | 3792: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
  591. | 3808: 73 7a 20 42 4c 4f 42 29 69 03 07 17 19 19 01 81 sz BLOB)i.......
  592. | 3824: 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 -tablet1_idxt1_i
  593. | 3840: 64 78 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 dx.CREATE TABLE
  594. | 3856: 27 74 31 5f 69 64 78 27 28 73 65 67 69 64 2c 20 't1_idx'(segid,
  595. | 3872: 74 65 72 6d 2c 20 6f 67 6e 6f 2c 20 50 52 49 4d term, ogno, PRIM
  596. | 3888: 41 52 59 20 4b 45 59 28 73 65 67 69 64 2c 20 74 ARY KEY(segid, t
  597. | 3904: 65 72 6d 29 29 20 57 49 54 48 4f 55 54 20 52 4f erm)) WITHOUT RO
  598. | 3920: 57 49 44 55 35 07 17 1b 1b 01 81 01 74 61 62 6c WIDU5.......tabl
  599. | 3936: 65 74 31 5f 64 61 74 61 74 31 5f 64 61 74 61 02 et1_datat1_data.
  600. | 3952: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  601. | 3968: 5f 64 61 74 61 27 28 69 64 20 49 4e 54 45 47 45 _data'(id INTEGE
  602. | 3984: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 R PRIMARY KEY, b
  603. | 4000: 6c 6f 63 6b 20 42 4c 4f 42 29 54 01 07 17 11 11 lock BLOB)T.....
  604. | 4016: 08 81 15 74 61 62 6c 65 74 31 74 31 43 52 45 41 ...tablet1t1CREA
  605. | 4032: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 TE VIRTUAL TABLE
  606. | 4048: 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 28 61 t1 USING fts5(a
  607. | 4064: 2c 62 2c 70 72 65 66 69 78 3d 22 31 2c 32 2c 33 ,b,prefix=.1,2,3
  608. | 4080: 2c 34 22 2c 20 63 6f 6e 74 65 6e 74 3d 22 22 29 ,4., content=..)
  609. | page 2 offset 4096
  610. | 0: 0d 0b 6a 00 37 09 4c 02 0f e7 09 4c 0f c6 0f a4 ..j.7.L....L....
  611. | 16: 0f 88 0f 6d 0f 4b 0f 2c 0f 0e 0e ec 0e cd 0e ad ...m.K.,........
  612. | 32: 0e 8e 0e 6c 0e 4b 0e 29 0e 08 0d e6 0d c4 0d b5 ...l.K.)........
  613. | 48: 0d 97 0d 76 0d 54 0d 31 0d 15 0c f3 0c d3 0c b5 ...v.T.1........
  614. | 64: 0c 95 0c 73 0c 54 0c 32 0c 10 0b ee 0b cc 0b b0 ...s.T.2........
  615. | 80: 0b 8d 0b 7e 0b 48 0b 2e 0b 0b 0a ef 0a cc 0a 00 ...~.H..........
  616. | 2368: 00 00 00 00 00 00 00 00 00 00 00 00 15 0a 03 00 ................
  617. | 2384: 30 00 00 00 01 01 03 35 00 03 01 01 12 02 01 12 0......5........
  618. | 2400: 03 01 11 1c 8c 80 80 80 80 10 02 9c 3e 00 00 00 ............>...
  619. | 2416: 17 01 05 05 34 74 61 62 6c 03 02 03 01 04 77 68 ....4tabl.....wh
  620. | 2432: 65 72 03 02 06 09 1b 8c 80 80 80 80 0f 03 00 3c er.............<
  621. | 2448: 00 00 00 16 05 34 66 74 73 34 03 02 02 01 04 6e .....4fts4.....n
  622. | 2464: 75 6d 62 03 06 01 04 09 1b 8c 80 80 80 80 0e 03 umb.............
  623. | 2480: 00 3c 00 00 00 16 04 33 74 68 65 03 06 01 01 04 .<.....3the.....
  624. | 2496: 01 03 77 68 65 03 02 04 04 0a 1b 8c 80 80 80 80 ..whe...........
  625. | 2512: 0d 03 00 3c 00 00 00 16 04 33 6e 75 6d 03 06 01 ...<.....3num...
  626. | 2528: 01 05 01 03 74 61 62 03 02 03 04 0a 19 8c 80 80 ....tab.........
  627. | 2544: 80 80 0c 03 00 38 00 00 00 14 03 32 77 68 03 02 .....8.....2wh..
  628. | 2560: 04 00 04 33 66 74 73 03 12 02 04 07 18 8c 80 80 ...3fts.........
  629. | 2576: 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 03 02 .....6.....2ta..
  630. | 2592: 03 02 01 68 03 06 01 01 04 04 07 1b 8c 80 80 80 ...h............
  631. | 2608: 80 0a 03 00 3c 00 00 00 16 03 32 6e 75 03 06 01 ....<.....2nu...
  632. | 2624: 01 05 01 02 6f 66 03 06 01 01 06 04 09 19 8c 80 ....of..........
  633. | 2640: 82 d0 80 09 03 00 38 00 00 00 14 03 32 66 74 03 ......8.....2ft.
  634. | 2656: 02 02 01 02 69 73 03 06 01 01 03 04 07 18 8c 80 ....is..........
  635. | 2672: 80 80 80 08 03 00 36 00 00 00 13 02 31 74 03 08 ......6.....1t..
  636. | 2688: 03 01 01 04 01 01 77 03 02 04 04 09 1a 8c 80 80 ......w.........
  637. | 2704: 80 80 07 03 00 3a 00 00 00 15 02 31 6e 03 08 01 .....:.....1n...
  638. | 2720: 01 02 05 01 01 6f 03 06 01 01 06 04 09 18 8c 80 .....o..........
  639. | 2736: 81 80 80 06 03 00 36 00 00 00 13 04 12 31 66 03 ......6......1f.
  640. | 2752: 02 02 01 01 69 03 06 01 01 03 05 06 1c 8c 80 80 ....i...........
  641. | 2768: 80 80 05 03 00 3e 00 00 00 17 04 30 74 68 65 03 .....>.....0the.
  642. | 2784: 06 01 01 04 01 05 77 68 65 72 65 03 02 04 0a 15 ......where.....
  643. | 2800: 8c 80 65 80 80 04 03 00 30 00 00 00 11 01 01 06 ..e.....0.......
  644. | 2816: 06 30 74 61 62 6c 65 03 02 03 07 1c 8c 80 80 80 .0table.........
  645. | 2832: 80 03 03 00 3e 00 00 00 17 07 30 6e 75 6d 62 65 ....>.....0numbe
  646. | 2848: 72 03 06 01 01 05 01 02 6f 66 03 06 04 0d 13 8c r.......of......
  647. | 2864: 80 80 80 80 02 03 00 2c 00 00 00 0f fc 01 03 02 .......,........
  648. | 2880: 30 6e 03 06 01 00 f2 07 1b 8c 80 80 80 80 01 03 0n..............
  649. | 2896: 00 3c 00 00 00 16 08 30 66 74 73 34 61 75 78 03 .<.....0fts4aux.
  650. | 2912: 03 02 01 02 69 73 03 06 04 0c 00 00 00 18 ea 00 ....is..........
  651. | 2928: 00 00 01 01 02 24 00 02 01 01 12 02 01 12 08 88 .....$..........
  652. | 2944: 80 80 80 80 12 03 00 12 10 00 00 05 02 1c 88 80 ................
  653. | 2960: 80 80 80 11 03 00 3e 00 00 00 17 05 34 72 6f 77 ......>.....4row
  654. | 2976: 73 02 06 01 01 05 01 04 74 68 65 72 02 02 04 0b s.......ther....
  655. | 2992: 15 88 80 80 80 80 10 03 00 2f ff ff f0 11 02 01 ........./......
  656. | 3008: 01 07 05 34 62 65 74 77 02 02 04 08 1b 88 80 80 ...4betw........
  657. | 3024: 80 80 0f cf 00 3c 00 00 00 16 04 04 33 72 6f 77 .....<......3row
  658. | 3040: 02 06 01 01 05 01 03 74 68 65 02 08 05 0a 1b 88 .......the......
  659. | 3056: 80 80 80 80 0d 03 00 3c 00 00 00 16 00 01 02 04 .......<........
  660. | 3072: 33 61 72 65 02 02 03 01 03 62 65 74 02 02 07 08 3are.....bet....
  661. | 3088: 1b 88 80 80 80 80 0d 03 00 3c 00 00 00 16 03 32 .........<.....2
  662. | 3104: 74 68 02 08 02 01 01 07 00 04 33 61 6e 64 02 06 th........3and..
  663. | 3120: 04 0a 1b 88 80 80 80 80 0c 03 00 3c 00 00 00 16 ...........<....
  664. | 3136: 03 32 69 6e 02 06 01 01 06 01 02 72 6f 02 06 01 .2in.......ro...
  665. | 3152: 01 05 04 09 18 88 80 80 80 80 0b 03 00 36 00 00 .............6..
  666. | 3168: 00 13 02 03 32 61 72 02 02 03 01 02 62 65 02 02 ....2ar.....be..
  667. | 3184: 04 05 07 1b 88 80 80 80 80 0a 03 00 3c 00 00 00 ............<...
  668. | 3200: 16 12 31 74 02 08 02 01 01 07 00 03 32 61 6e 02 ..1t........2an.
  669. | 3216: 06 01 01 04 09 19 88 80 80 80 80 09 03 00 38 00 ..............8.
  670. | 3232: 00 00 14 02 31 6e 02 06 01 01 03 01 01 72 02 06 ....1n.......r..
  671. | 3248: 01 01 05 04 08 17 78 80 80 80 80 08 03 00 34 10 ......x.......4.
  672. | 3264: 01 00 12 02 31 62 02 02 04 01 01 69 02 06 01 01 ....1b.....i....
  673. | 3280: 06 04 06 19 88 80 80 80 80 07 03 00 38 00 00 00 ............8...
  674. | 3296: 14 04 02 31 32 02 02 05 01 01 61 02 08 03 01 01 ...12.....a.....
  675. | 3312: 02 05 06 1b 88 80 80 80 80 06 03 00 3c 00 00 00 ............<...
  676. | 3328: 16 06 30 74 68 65 72 65 e7 02 02 00 02 31 31 02 ..0there.....11.
  677. | 3344: 06 01 01 04 0a 15 88 80 80 80 80 05 03 00 30 00 ..............0.
  678. | 3360: 00 00 11 01 01 05 e5 30 74 68 65 02 06 01 01 07 .......0the.....
  679. | 3376: 07 1c 88 80 80 80 80 04 03 00 3e 00 00 00 17 01 ..........>.....
  680. | 3392: 01 06 02 30 6e 02 06 01 01 03 01 04 72 6f 77 73 ...0n.......rows
  681. | 3408: 02 06 07 08 1b 88 80 80 80 80 03 03 00 3c 00 00 .............<..
  682. | 3424: 00 16 08 30 62 65 74 77 65 65 6e 02 02 04 01 02 ...0between.....
  683. | 3440: 69 6e 02 06 04 0c 1a 88 80 80 80 80 02 03 00 3a in.............:
  684. | 3456: 00 00 00 15 04 30 61 6e 64 02 06 01 01 02 02 02 .....0and.......
  685. | 3472: 72 65 02 02 03 04 0a 17 88 80 80 80 80 01 03 00 re..............
  686. | 3488: 34 01 00 00 12 02 30 31 02 06 01 01 04 01 01 32 4.....01.......2
  687. | 3504: 02 02 05 04 08 08 84 80 80 80 80 12 03 00 16 00 ................
  688. | 3520: 00 00 05 04 1b 84 80 80 80 80 11 03 00 3c 00 00 .............<..
  689. | 3536: 00 16 05 34 74 61 62 6c 01 06 01 01 05 02 03 65 ...4tabl.......e
  690. | 3552: 72 6d 01 02 04 0b 1b 84 80 80 80 80 10 03 00 3c rm.............<
  691. | 3568: 00 00 00 16 05 34 65 61 63 68 01 02 02 01 04 70 .....4each.....p
  692. | 3584: 72 65 73 01 02 05 04 09 1a 84 80 80 80 80 0f 03 res.............
  693. | 3600: 00 3a 00 00 00 15 04 33 74 65 72 01 02 04 02 02 .:.....3ter.....
  694. | 3616: 68 65 01 06 01 01 03 04 08 1b 84 80 80 80 80 0e he..............
  695. | 3632: 03 00 3c 00 00 00 16 04 33 70 72 65 01 02 05 01 ..<.....3pre....
  696. | 3648: 03 74 61 62 01 06 01 01 05 04 08 1a 84 80 80 80 .tab............
  697. | 3664: 80 0d 03 0d 1a 00 00 00 15 04 33 66 6e 72 01 02 ..........3fnr..
  698. | 3680: 02 02 02 74 73 01 06 01 01 04 04 08 1b 84 80 80 ...ts...........
  699. | 3696: 80 80 0c 03 00 3c 00 00 00 16 03 32 74 68 01 06 .....<.....2th..
  700. | 3712: 01 01 03 00 04 33 65 61 63 01 02 03 04 09 18 84 .....3eac.......
  701. | 3728: 80 80 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 .......6.....2ta
  702. | 3744: 01 06 01 01 05 02 01 65 01 02 04 04 09 19 84 80 .......e........
  703. | 3760: 80 80 80 0a 03 00 38 00 00 00 14 03 30 c9 6e 01 ......8.....0.n.
  704. | 3776: 06 01 01 02 01 02 70 72 01 02 05 04 09 18 84 80 ......pr........
  705. | 3792: 80 80 80 09 03 00 36 00 00 00 13 03 32 66 6f 01 ......6.....2fo.
  706. | 3808: 02 0b e2 01 74 01 06 01 01 04 04 07 1b 84 80 80 ....t...........
  707. | 3824: 86 f0 08 03 00 3c 00 00 00 16 02 31 74 01 0a 04 .....<.....1t...
  708. | 3840: 01 01 03 04 00 03 32 65 61 01 02 03 04 0a 17 84 ......2ea.......
  709. | 3856: 80 80 80 80 07 03 00 34 00 00 00 12 02 31 69 01 .......4.....1i.
  710. | 3872: 06 01 01 02 01 01 70 01 02 05 04 08 18 84 80 80 ......p.........
  711. | 3888: 80 80 06 03 00 36 00 00 00 13 02 31 65 01 02 03 .....6.....1e...
  712. | 3904: 01 01 66 01 08 02 01 01 04 04 06 1b 84 80 80 80 ..f.............
  713. | 3920: 80 05 03 00 3c 00 00 00 16 05 30 74 65 72 6d 01 ....<.....0term.
  714. | 3936: 02 04 02 02 68 65 01 06 01 01 03 04 09 14 84 80 ....he..........
  715. | 3952: 80 80 80 04 03 00 2e 00 00 00 10 06 30 74 61 62 ............0tab
  716. | 3968: 6c 65 01 06 01 01 05 04 15 84 7f 80 80 80 03 03 le..............
  717. | 3984: 00 30 00 00 00 11 02 08 30 70 72 65 73 65 6e 74 .0......0present
  718. | 4000: 01 02 05 05 1b 84 80 22 80 80 02 03 00 3c 00 00 .............<..
  719. | 4016: 00 16 04 30 66 74 73 01 06 01 01 04 01 02 69 6e ...0fts.......in
  720. | 4032: 01 06 01 01 04 0a 1a 84 80 80 80 80 01 03 00 3a ...............:
  721. | 4048: 00 00 00 15 05 30 65 61 63 68 01 02 03 01 03 66 .....0each.....f
  722. | 4064: 6f 72 01 02 02 04 09 06 01 03 00 12 03 0b 0f 00 or..............
  723. | 4080: 00 08 8c 80 80 80 80 11 03 00 16 00 00 00 05 04 ................
  724. | page 3 offset 8192
  725. | 0: 0a 00 00 00 32 0e 4f 00 0f fa 0f f1 0f e9 0f e1 ....2.O.........
  726. | 16: 0f d8 0f d1 0f c9 0f c1 0f b9 0f b1 0f a9 0f a0 ................
  727. | 32: 0f 98 0f 90 0f 87 0f 80 0f 78 0f 71 0f 68 0f 5f .........x.q.h._
  728. | 48: 0f 56 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 .V..............
  729. | 3392: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ................
  730. | 3408: 04 01 10 01 03 34 74 20 07 04 01 0e 01 03 34 1e .....4t ......4.
  731. | 3424: 09 04 01 12 01 03 33 74 68 1c 08 04 01 10 01 03 ......3th.......
  732. | 3440: 34 6e 1a 08 04 01 10 01 03 32 67 18 08 04 01 10 4n.......2g.....
  733. | 3456: 01 03 32 74 16 08 04 01 10 01 03 32 6e 14 07 04 ..2t.......2n...
  734. | 3472: 01 0e 01 03 32 12 08 04 01 10 01 03 31 74 10 08 ....2.......1t..
  735. | 3488: 04 01 10 01 03 31 6e 0e 07 04 01 0e 01 03 31 0c .....1n.......1.
  736. | 3504: 09 04 01 12 01 03 30 74 68 0a 08 04 01 10 01 03 ......0th.......
  737. | 3520: 30 74 08 09 04 01 12 01 03 30 6e 75 06 08 04 01 0t.......0nu....
  738. | 3536: 10 01 03 30 6e 04 06 04 01 0c 01 03 02 08 04 01 ...0n...........
  739. | 3552: 10 01 02 34 72 22 07 04 01 0e 01 02 34 20 08 04 ...4r.......4 ..
  740. | 3568: 01 10 01 02 33 72 1e 09 04 01 12 01 02 33 61 72 ....3r.......3ar
  741. | 3584: 1c 18 04 01 10 01 02 32 74 1a 08 04 01 10 01 02 .......2t.......
  742. | 3600: 32 69 18 09 04 01 12 01 02 32 61 72 16 08 04 01 2i.......2ar....
  743. | 3616: 10 01 02 31 74 2a 08 04 01 0f 01 02 31 6e 12 0a ...1t*......1n..
  744. | 3632: d4 01 10 01 02 31 62 10 08 04 01 10 01 02 31 32 .....1b.......12
  745. | 3648: 0e 0b 04 01 16 01 02 30 74 68 65 72 0c 08 04 01 .......0ther....
  746. | 3664: 10 01 02 30 74 0a 08 04 01 10 01 02 30 6e 08 08 ...0t.......0n..
  747. | 3680: 04 01 10 01 02 30 62 06 08 04 01 10 01 02 30 61 .....0b.......0a
  748. | 3696: 04 06 03 f1 0c 01 02 02 07 04 09 10 01 34 74 22 .............4t.
  749. | 3712: 06 04 09 0e 01 34 20 08 04 09 12 01 33 74 65 1e .....4 .....3te.
  750. | 3728: 07 04 09 10 01 33 70 1c 07 04 09 10 01 33 66 1a .....3p......3f.
  751. | 3744: 08 04 09 12 01 32 74 68 18 07 04 09 10 01 32 74 .....2th......2t
  752. | 3760: 16 07 04 09 10 01 32 69 14 07 04 09 10 01 32 66 ......2i......2f
  753. | 3776: 12 07 04 09 10 01 31 74 10 07 04 09 10 01 31 69 ......1t......1i
  754. | 3792: 0e 06 04 09 0e 01 31 0c 08 04 09 12 01 30 74 65 ......1......0te
  755. | 3808: 0a 07 04 09 10 01 30 74 08 07 04 09 10 01 30 70 ......0t......0p
  756. | 3824: 06 08 04 09 1e 61 30 66 74 04 05 00 00 00 00 00 .....a0ft.......
  757. | page 4 offset 12288
  758. | 4064: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
  759. | 4080: 03 05 05 02 03 00 10 04 06 05 01 03 00 10 04 04 ................
  760. | page 5 offset 16384
  761. | 0: 0a 00 00 00 02 0f eb 00 0f eb 0f f4 00 00 00 00 ................
  762. | 4064: 00 00 00 00 00 00 00 00 00 00 00 08 03 15 01 70 ...............p
  763. | 4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04 gsz.....version.
  764. | end crash-ef6738247b1344.db
  765. }]} {}
  766. do_catchsql_test 4.1 {
  767. BEGIN;
  768. REPLACE INTO t1(rowid,b,a,rowid) VALUES(200,1,2,3);
  769. } {1 {database disk image is malformed}}
  770. do_catchsql_test 4.2 {
  771. INSERT INTO t1(t1) VALUES('delete-all');
  772. } {1 {database disk image is malformed}}
  773. do_catchsql_test 4.3 {
  774. REPLACE INTO t1(rowid,b,rowid,a) VALUES(200,1,2,3);
  775. } {1 {database disk image is malformed}}
  776. do_catchsql_test 4.4 {
  777. REPLACE INTO t1(rowid,b,a,rowid) VALUES(0,1,2,3);
  778. } {1 {database disk image is malformed}}
  779. do_catchsql_test 4.5 {
  780. REPLACE INTO t1(rowid,a,b,rowid) VALUES(200,1,2,3);
  781. } {1 {database disk image is malformed}}
  782. #-------------------------------------------------------------------------
  783. reset_db
  784. do_test 5.0 {
  785. sqlite3 db {}
  786. db deserialize [decode_hexdb {
  787. .open --hexdb
  788. | size 28672 pagesize 4096 filename crash-0c6d3451d11597.db
  789. | page 1 offset 0
  790. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  791. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 07 .....@ ........
  792. | 32: 00 00 00 00 00 00 00 00 00 00 00 07 00 00 00 04 ................
  793. | 96: 00 00 00 00 0d 00 00 00 07 0d d2 00 0f c4 0f 6d ...............m
  794. | 112: 0f 02 0e ab 0e 4e 0d f6 0d d2 00 00 00 00 00 00 .....N..........
  795. | 3536: 00 00 22 07 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
  796. | 3552: 32 74 32 07 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
  797. | 3568: 20 74 32 28 78 29 56 06 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
  798. | 3584: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
  799. | 3600: 6f 6e 66 69 67 06 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
  800. | 3616: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
  801. | 3632: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
  802. | 3648: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 05 WITHOUT ROWID[.
  803. | 3664: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
  804. | 3680: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
  805. | 3696: 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
  806. | 3712: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
  807. | 3728: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
  808. | 3744: 59 2c 20 73 7a 20 42 4c 4f 42 29 55 04 06 17 21 Y, sz BLOB)U...!
  809. | 3760: 21 01 77 74 61 62 6c 65 74 31 5f 63 6f 6e 74 65 !.wtablet1_conte
  810. | 3776: 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 04 43 52 45 ntt1_content.CRE
  811. | 3792: 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 6f ATE TABLE 't1_co
  812. | 3808: 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 45 ntent'(id INTEGE
  813. | 3824: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 63 R PRIMARY KEY, c
  814. | 3840: 30 29 69 03 07 17 19 19 01 81 2d 74 61 62 6c 65 0)i.......-table
  815. | 3856: 74 31 5f 69 64 78 74 31 5f 69 64 78 03 43 52 45 t1_idxt1_idx.CRE
  816. | 3872: 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 69 64 ATE TABLE 't1_id
  817. | 3888: 78 27 28 73 65 67 69 64 2c 20 74 65 72 6d 2c 20 x'(segid, term,
  818. | 3904: 70 67 6e 6f 2c 20 50 52 49 4d 41 52 59 20 4b 45 pgno, PRIMARY KE
  819. | 3920: 59 28 73 65 67 69 64 2c 20 74 65 72 6d 29 29 20 Y(segid, term))
  820. | 3936: 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 02 07 WITHOUT ROWIDU..
  821. | 3952: 17 1b 1b 01 81 01 74 61 62 6c 65 74 31 5f 64 61 ......tablet1_da
  822. | 3968: 74 61 74 31 5f 64 61 74 61 02 43 52 45 41 54 45 tat1_data.CREATE
  823. | 3984: 20 54 41 42 4c 45 20 27 74 31 5f 64 61 74 61 27 TABLE 't1_data'
  824. | 4000: 28 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d (id INTEGER PRIM
  825. | 4016: 41 52 b9 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 AR. KEY, block B
  826. | 4032: 4c 4f 42 29 3a 01 06 17 11 11 08 63 74 61 62 6c LOB):......ctabl
  827. | 4048: 65 74 31 74 31 43 52 45 41 54 45 20 56 49 52 54 et1t1CREATE VIRT
  828. | 4064: 55 41 4c 20 54 41 42 4c 45 20 74 31 20 55 53 49 UAL TABLE t1 USI
  829. | 4080: 4e 47 20 66 74 73 35 28 63 6f 6e 74 65 6e 74 29 NG fts5(content)
  830. | page 2 offset 4096
  831. | 0: 0d 00 00 00 03 0f bd 00 0f e8 0f ef 0f bd 00 00 ................
  832. | 16: 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  833. | 4016: 00 00 00 00 00 00 00 00 00 00 00 00 00 24 84 80 .............$..
  834. | 4032: 80 80 80 01 03 00 4e 00 00 00 1e 06 30 61 62 61 ......N.....0aba
  835. | 4048: 63 6b 01 02 02 04 02 66 74 02 02 02 04 04 6e 64 ck.....ft.....nd
  836. | 4064: 6f 6e 03 02 02 04 0a 07 05 01 03 00 10 03 03 0f on..............
  837. | 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 11 ...$............
  838. | page 3 offset 8192
  839. | 0: 0a 00 00 00 01 0f 00 00 00 00 00 00 00 00 00 00 ................
  840. | 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
  841. | page 4 offset 12288
  842. | 0: 0d 00 00 00 03 0f e0 00 0f f6 0f ec 0f e0 00 00 ................
  843. | 4064: 0a 03 03 00 1b 61 62 61 6e 64 6f 6e 08 02 03 00 .....abandon....
  844. | 4080: 17 61 62 61 66 74 08 01 03 00 17 61 62 61 63 6b .abaft.....aback
  845. | page 5 offset 16384
  846. | 0: 0d 00 00 00 03 0f ee 00 0f fa 0f f4 0f ee 00 00 ................
  847. | 16: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  848. | 4064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 03 ................
  849. | 4080: 03 00 0e 01 04 02 03 00 0e 01 04 01 03 00 0e 01 ................
  850. | page 6 offset 20480
  851. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  852. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  853. | page 7 offset 24576
  854. | 0: 0d 00 00 10 03 0f d6 00 0f f4 10 e1 0f d6 00 00 ................
  855. | 16: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
  856. | 4048: 00 00 00 00 00 00 09 03 02 1b 72 65 62 75 69 6c ..........rebuil
  857. | 4064: 64 11 02 02 2b 69 6e 74 65 67 72 69 74 79 2d 63 d...+integrity-c
  858. | 4080: 68 65 63 6b 0a 01 02 1d 6f 70 74 69 6d 00 00 00 heck....optim...
  859. | end crash-0c6d3451d11597.db
  860. }]} {}
  861. do_execsql_test 5.1 {
  862. INSERT INTO t1(t1,rank) VALUES('secure-delete',1);
  863. }
  864. do_catchsql_test 5.4 {
  865. UPDATE t1 SET content=randomblob(500);
  866. } {1 {database disk image is malformed}}
  867. #-------------------------------------------------------------------------
  868. reset_db
  869. do_test 6.0 {
  870. sqlite3 db {}
  871. db deserialize [decode_hexdb {
  872. .open --hexdb
  873. | size 32768 pagesize 4096 filename crash-42fa37b694d45a.db
  874. | page 1 offset 0
  875. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  876. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 07 .....@ ........
  877. | 96: 00 00 00 00 0d 00 00 00 07 0d d2 00 0f c4 0f 6d ...............m
  878. | 112: 0f 02 0e ab 0e 4e 0d f6 0d d2 00 00 00 00 00 00 .....N..........
  879. | 3536: 00 00 22 07 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
  880. | 3552: 32 74 32 07 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
  881. | 3568: 20 74 32 28 78 29 56 06 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
  882. | 3584: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
  883. | 3600: 6f 6e 66 69 67 06 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
  884. | 3616: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
  885. | 3632: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
  886. | 3648: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 05 WITHOUT ROWID[.
  887. | 3664: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
  888. | 3680: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
  889. | 3696: 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
  890. | 3712: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
  891. | 3728: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
  892. | 3744: 59 2c 20 73 7a 20 42 4c 4f 42 29 55 04 06 17 21 Y, sz BLOB)U...!
  893. | 3760: 21 01 77 74 61 62 6c 65 74 31 5f 63 6f 6e 74 65 !.wtablet1_conte
  894. | 3776: 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 04 43 52 45 ntt1_content.CRE
  895. | 3792: 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 6f ATE TABLE 't1_co
  896. | 3808: 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 45 ntent'(id INTEGE
  897. | 3824: 52 20 50 52 49 4d 41 52 49 20 4b 45 59 2c 20 63 R PRIMARI KEY, c
  898. | 3840: 30 29 69 03 07 17 19 19 01 81 2d 74 61 62 6c 65 0)i.......-table
  899. | 3856: 74 31 5f 69 64 78 74 31 5f 69 64 78 03 43 52 45 t1_idxt1_idx.CRE
  900. | 3872: 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 69 64 ATE TABLE 't1_id
  901. | 3888: 78 27 28 73 65 67 69 64 2c 20 74 65 72 6d 2c 20 x'(segid, term,
  902. | 3904: 70 67 6e 6f 2c 20 50 52 49 4d 41 52 59 20 4b 45 pgno, PRIMARY KE
  903. | 3920: 59 28 73 65 67 69 64 2c 20 74 65 72 6d 29 29 20 Y(segid, term))
  904. | 3936: 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 02 07 WITHOUT ROWIDU..
  905. | 3952: 17 1b 1b 01 81 01 74 61 62 6c 65 74 31 5f 64 61 ......tablet1_da
  906. | 3968: 74 61 74 31 5f 64 61 74 61 02 43 52 45 41 54 45 tat1_data.CREATE
  907. | 3984: 20 54 41 42 4c 45 20 27 74 31 5f 64 61 74 61 27 TABLE 't1_data'
  908. | 4000: 28 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d (id INTEGER PRIM
  909. | 4016: 41 52 b9 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 AR. KEY, block B
  910. | 4032: 4c 4f 42 29 3a 01 06 17 11 11 08 63 74 61 62 6c LOB):......ctabl
  911. | 4048: 65 74 31 74 31 43 52 45 41 54 45 20 56 49 52 54 et1t1CREATE VIRT
  912. | 4064: 55 41 4c 20 54 41 42 4c 45 20 74 31 20 55 53 49 UAL TABLE t1 USI
  913. | 4080: 4e 47 20 66 74 73 35 28 63 6f 6e 74 65 6e 74 29 NG fts5(content)
  914. | page 2 offset 4096
  915. | 0: 0d 00 00 00 03 0f bd 00 0f e8 0f ef 0f bd f0 00 ................
  916. | 16: 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  917. | 4016: 00 00 00 00 00 00 00 00 00 00 00 00 00 24 84 80 .............$..
  918. | 4032: 80 80 80 01 03 00 4e 00 10 00 1e 06 30 61 62 61 ......N.....0aba
  919. | 4048: 63 6c 01 02 02 04 02 66 74 02 5f 02 04 04 6e 64 cl.....ft._...nd
  920. | 4064: 6f 6e 02 02 02 04 0a 07 05 01 03 00 10 03 03 0f on..............
  921. | 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 11 ...$............
  922. | page 3 offset 8192
  923. | 0: 0a 00 00 00 01 0f 00 01 00 00 00 00 00 00 00 00 ................
  924. | 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
  925. | page 4 offset 12288
  926. | 0: 0d 00 00 00 03 0f e0 00 0f f6 0f ec 0f e0 00 00 ................
  927. | 4064: 0a 03 03 00 1b 61 62 61 6e 64 6f 6e 08 02 03 00 .....abandon....
  928. | 4080: 17 61 62 61 66 74 08 01 03 00 17 61 62 61 63 6b .abaft.....aback
  929. | page 5 offset 16384
  930. | 0: 0d 00 00 00 03 0f ee 00 0f fa 0f 00 00 00 00 00 ................
  931. | 4064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 03 ................
  932. | 4080: 03 00 0e 01 04 02 03 00 0e 01 04 01 03 00 0e 01 ................
  933. | page 6 offset 20480
  934. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  935. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  936. | page 7 offset 24576
  937. | 0: 0d 00 00 10 03 0f d6 00 0f 00 00 00 00 00 00 00 ................
  938. | 4048: 00 00 00 00 00 00 09 03 02 1b 72 65 62 75 69 6c ..........rebuil
  939. | 4064: 64 11 02 02 2b 69 6e 74 65 67 72 69 74 79 2d 63 d...+integrity-c
  940. | 4080: 68 65 63 6b 0a 01 02 1d 6f 70 74 69 6d 00 00 00 heck....optim...
  941. | page 8 offset 28672
  942. | 0: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  943. | end crash-42fa37b694d45a.db
  944. }]} {}
  945. do_execsql_test 6.1 {
  946. INSERT INTO t1(t1,rank) VALUES('secure-delete',1);
  947. }
  948. do_catchsql_test 6.2 {
  949. UPDATE t1 SET content=randomblob(500) WHERE t1;
  950. } {1 {constraint failed}}
  951. #-------------------------------------------------------------------------
  952. reset_db
  953. do_test 7.0 {
  954. sqlite3 db {}
  955. db deserialize [decode_hexdb {
  956. .open --hexdb
  957. | size 40960 pagesize 4096 filename crash-d8b4a99207c10b.db
  958. | page 1 offset 0
  959. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  960. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 0a .....@ ........
  961. | 32: 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 04 ................
  962. | 48: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ................
  963. | 96: 00 00 00 00 0d 00 00 00 0d 0b 62 00 0f 97 0f 40 ..........b....@
  964. | 112: 0e d5 0e 75 0e 18 0d c0 0d 66 0d 0f 0c a4 0c 44 ...u.....f.....D
  965. | 128: 0b ec 0b a7 0b 62 00 00 00 00 00 00 00 00 00 00 .....b..........
  966. | 2912: 00 00 43 0d 06 17 11 11 08 75 74 61 62 6c 65 74 ..C......utablet
  967. | 2928: 34 74 34 43 52 45 41 54 45 20 56 49 52 54 55 41 4t4CREATE VIRTUA
  968. | 2944: 4c 20 54 41 42 4c 45 20 74 34 20 55 53 49 4e 47 L TABLE t4 USING
  969. | 2960: 20 66 74 73 35 76 6f 63 61 62 28 27 74 32 27 2c fts5vocab('t2',
  970. | 2976: 20 27 72 6f 77 27 29 43 0c 06 17 11 11 08 75 74 'row')C......ut
  971. | 2992: 61 62 6c 65 74 33 74 33 43 52 45 41 54 45 20 56 ablet3t3CREATE V
  972. | 3008: 49 52 54 55 41 4c 20 54 41 42 4c 45 20 74 33 20 IRTUAL TABLE t3
  973. | 3024: 55 53 49 4e 47 20 66 74 73 35 76 6f 63 61 62 28 USING fts5vocab(
  974. | 3040: 27 74 31 27 2c 20 27 72 6f 77 27 29 56 0b 06 17 't1', 'row')V...
  975. | 3056: 1f 1f 01 7d 74 61 62 6c 65 74 32 5f 63 6f 6e 66 ....tablet2_conf
  976. | 3072: 69 67 74 32 5f 63 6f 6e 66 69 67 0a 43 52 45 41 igt2_config.CREA
  977. | 3088: 54 45 20 54 41 42 4c 45 20 27 74 32 5f 63 6f 6e TE TABLE 't2_con
  978. | 3104: 66 69 67 27 28 6b 20 50 52 49 4d 41 52 59 20 4b fig'(k PRIMARY K
  979. | 3120: 45 59 2c 20 76 29 20 57 49 54 48 4f 55 54 20 52 EY, v) WITHOUT R
  980. | 3136: 4f 57 49 44 5e 0a 07 17 21 21 01 81 07 74 61 62 OWID^...!!...tab
  981. | 3152: 6c 65 74 32 5f 63 6f 6e 74 65 6e 74 74 32 5f 63 let2_contentt2_c
  982. | 3168: 6f 6e 74 65 6e 74 09 43 52 45 41 54 45 20 54 41 ontent.CREATE TA
  983. | 3184: 42 4c 45 20 27 74 32 5f 63 6f 6e 74 65 6e 74 27 BLE 't2_content'
  984. | 3200: 28 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d (id INTEGER PRIM
  985. | 3216: 41 52 59 20 4b 45 59 2c 20 63 30 2c 20 63 31 2c ARY KEY, c0, c1,
  986. | 3232: 20 63 32 29 69 09 07 17 19 19 01 81 2d 74 61 62 c2)i.......-tab
  987. | 3248: 6c 65 74 32 5f 69 64 78 74 32 5f 69 64 78 08 43 let2_idxt2_idx.C
  988. | 3264: 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 32 5f REATE TABLE 't2_
  989. | 3280: 69 64 78 27 28 73 65 67 69 64 2c 20 74 65 72 6d idx'(segid, term
  990. | 3296: 2c 20 70 67 6e 6f 2c 20 50 52 49 4d 41 52 59 20 , pgno, PRIMARY
  991. | 3312: 4b 45 59 28 73 65 67 69 64 2c 20 74 65 72 6d 29 KEY(segid, term)
  992. | 3328: 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 ) WITHOUT ROWIDU
  993. | 3344: 08 07 17 1b 1b 01 81 01 74 61 62 6c 65 74 32 5f ........tablet2_
  994. | 3360: 64 61 74 61 74 32 5f 64 61 74 61 07 43 52 45 41 datat2_data.CREA
  995. | 3376: 54 45 20 54 41 42 4c 45 20 27 74 32 5f 64 61 74 TE TABLE 't2_dat
  996. | 3392: 61 27 28 69 64 20 49 4e 54 45 47 45 52 20 50 52 a'(id INTEGER PR
  997. | 3408: 49 4d 41 52 59 20 4b 45 59 2c 20 62 6c 6f 63 6b IMARY KEY, block
  998. | 3424: 20 42 4c 4f 42 29 58 07 07 17 11 11 08 81 1d 74 BLOB)X........t
  999. | 3440: 61 62 6c 65 74 32 74 32 43 52 45 41 54 45 20 56 ablet2t2CREATE V
  1000. | 3456: 49 52 54 55 41 4c 20 54 41 42 4c 45 20 74 32 20 IRTUAL TABLE t2
  1001. | 3472: 55 53 49 4e 47 20 66 74 73 35 28 27 61 27 2c 5b USING fts5('a',[
  1002. | 3488: 62 5d 2c 22 63 22 2c 64 65 74 61 69 6c 3d 6e 6f b],.c.,detail=no
  1003. | 3504: 6e 65 2c 63 6f 6c 75 6d 6e 73 69 7a 65 3d 30 29 ne,columnsize=0)
  1004. | 3520: 56 06 06 17 1f 1f 01 7d 74 61 62 6c 65 74 31 5f V.......tablet1_
  1005. | 3536: 63 6f 6e 66 69 67 74 31 5f 63 6f 6e 66 69 67 06 configt1_config.
  1006. | 3552: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  1007. | 3568: 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 49 4d 41 _config'(k PRIMA
  1008. | 3584: 52 59 20 4b 45 59 2c 20 76 29 20 57 49 54 48 4f RY KEY, v) WITHO
  1009. | 3600: 55 54 20 52 4f 57 49 44 5b 05 07 17 21 21 01 81 UT ROWID[...!!..
  1010. | 3616: 01 74 61 62 6c 65 74 31 5f 64 6f 63 73 69 7a 65 .tablet1_docsize
  1011. | 3632: 74 31 5f 64 6f 63 73 69 7a 65 05 43 52 45 41 54 t1_docsize.CREAT
  1012. | 3648: 45 20 54 41 42 4c 45 20 27 74 31 5f 64 6f 63 73 E TABLE 't1_docs
  1013. | 3664: 69 7a 65 27 28 69 64 20 49 4e 54 45 47 45 52 20 ize'(id INTEGER
  1014. | 3680: 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 73 7a 20 PRIMARY KEY, sz
  1015. | 3696: 42 4c 4f 42 29 5e 04 07 17 21 21 01 81 07 74 61 BLOB)^...!!...ta
  1016. | 3712: 62 6c 65 74 31 5f 63 6f 6e 74 65 6e 74 74 31 5f blet1_contentt1_
  1017. | 3728: 63 6f 6e 74 65 6e 74 04 43 52 45 41 54 45 20 54 content.CREATE T
  1018. | 3744: 41 42 4c 45 20 27 74 31 5f 63 6f 6e 74 65 6e 74 ABLE 't1_content
  1019. | 3760: 27 28 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 '(id INTEGER PRI
  1020. | 3776: 4d 41 52 59 20 4b 45 59 2c 20 63 30 2c 20 63 31 MARY KEY, c0, c1
  1021. | 3792: 2c 20 63 32 29 69 03 07 17 19 19 01 81 2d 74 61 , c2)i.......-ta
  1022. | 3808: 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 64 78 03 blet1_idxt1_idx.
  1023. | 3824: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  1024. | 3840: 5f 69 64 78 27 28 73 65 67 69 64 2c 20 74 65 72 _idx'(segid, ter
  1025. | 3856: 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d 41 52 59 m, pgno, PRIMARY
  1026. | 3872: 20 4b 45 59 28 73 65 67 69 64 2c 20 74 65 72 6d KEY(segid, term
  1027. | 3888: 29 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 )) WITHOUT ROWID
  1028. | 3904: 55 02 07 17 1b 1b 01 81 01 74 61 62 6c 65 74 31 U........tablet1
  1029. | 3920: 5f 64 61 74 61 74 31 5f 64 61 74 61 02 43 52 45 _datat1_data.CRE
  1030. | 3936: 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 61 ATE TABLE 't1_da
  1031. | 3952: 74 61 27 28 69 64 20 49 4e 54 45 47 45 52 20 50 ta'(id INTEGER P
  1032. | 3968: 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 6c 6f 63 RIMARY KEY, bloc
  1033. | 3984: 6b 20 42 4c 4f 42 29 67 01 07 17 11 11 08 81 3b k BLOB)g.......;
  1034. | 4000: 74 61 62 6c 65 74 31 74 31 43 52 45 41 54 45 20 tablet1t1CREATE
  1035. | 4016: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 74 31 VIRTUAL TABLE t1
  1036. | 4032: 20 55 53 49 4e 47 20 66 74 73 35 28 61 2c 62 20 USING fts5(a,b
  1037. | 4048: 75 6e 69 6e 64 65 78 65 64 2c 63 2c 74 6f 6b 65 unindexed,c,toke
  1038. | 4064: 6e 69 7a 65 3d 22 70 6f 72 74 65 72 20 61 73 63 nize=.porter asc
  1039. | 4080: 69 69 22 2c 74 6f 6b 65 6e 64 61 74 61 3d 31 29 ii.,tokendata=1)
  1040. | page 2 offset 4096
  1041. | 0: 0d 0f 68 00 05 0f 13 00 0f e6 0f 13 0f a8 0f 7c ..h............|
  1042. | 16: 0f 2a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .*..............
  1043. | 3856: 00 00 00 15 0a 03 00 30 00 00 00 00 01 03 03 00 .......0........
  1044. | 3872: 03 01 01 01 02 01 01 03 01 01 37 8c 80 80 80 80 ..........7.....
  1045. | 3888: 01 03 00 74 00 00 00 2e 02 30 61 03 02 02 01 01 ...t.....0a.....
  1046. | 3904: 62 03 02 03 01 01 63 03 02 04 01 01 67 03 06 01 b.....c.....g...
  1047. | 3920: 02 02 01 01 68 03 06 01 02 03 01 01 69 03 06 01 ....h.......i...
  1048. | 3936: 02 04 04 06 06 06 08 08 0f ef 00 14 2a 00 00 00 ............*...
  1049. | 3952: 00 01 02 02 00 02 01 01 01 02 01 01 25 88 80 80 ............%...
  1050. | 3968: 80 80 01 03 00 50 00 00 00 1f 02 30 67 02 08 02 .....P.....0g...
  1051. | 3984: 01 02 02 01 01 68 02 08 03 01 02 03 01 01 69 02 .....h........i.
  1052. | 4000: 08 04 01 02 04 04 09 09 37 84 80 80 80 7f f1 03 ........7.......
  1053. | 4016: 00 74 00 00 00 2e 02 30 61 01 02 02 01 01 62 01 .t.....0a.....b.
  1054. | 4032: 02 03 01 01 63 01 02 04 01 01 67 01 06 01 02 02 ....c.....g.....
  1055. | 4048: 01 01 68 01 06 01 02 03 01 01 69 01 06 01 02 04 ..h.......i.....
  1056. | 4064: 04 06 06 06 08 08 07 01 03 00 14 03 09 00 09 00 ................
  1057. | 4080: 00 00 11 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
  1058. | page 3 offset 8192
  1059. | 0: 0a 00 00 00 03 0f ec 00 0f fa 0f f3 0f ec 00 00 ................
  1060. | 4064: 00 00 00 00 00 00 00 00 00 00 00 00 06 04 01 0c ................
  1061. | 4080: 01 03 02 06 04 01 0c 01 02 02 05 04 09 0c 01 02 ................
  1062. | page 4 offset 12288
  1063. | 0: 0d 00 00 00 03 0f be 00 0f ea 0f d4 0f be 00 00 ................
  1064. | 4016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 03 ................
  1065. | 4032: 05 00 17 17 17 61 20 62 20 63 67 20 68 20 69 67 .....a b cg h ig
  1066. | 4048: 20 68 20 69 14 02 05 00 17 17 17 67 20 68 20 69 h i.......g h i
  1067. | 4064: 61 20 62 20 63 67 20 68 20 69 14 01 05 00 17 17 a b cg h i......
  1068. | 4080: 17 61 20 62 20 63 64 20 65 20 66 67 20 68 20 69 .a b cd e fg h i
  1069. | page 5 offset 16384
  1070. | 0: 0d 00 00 00 03 0f e8 00 0f f8 0f f0 0f e8 00 00 ................
  1071. | 4064: 00 00 00 00 00 00 00 00 06 03 03 00 12 03 00 03 ................
  1072. | 4080: 06 02 03 00 12 03 00 03 06 01 03 00 12 03 00 03 ................
  1073. | page 6 offset 20480
  1074. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  1075. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  1076. | page 7 offset 24576
  1077. | 0: 0d 00 00 00 03 0f 9e 00 0f e6 0f ef 0f 9e 00 00 ................
  1078. | 3984: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 84 ..............A.
  1079. | 4000: 80 80 80 80 01 04 00 81 06 00 00 00 34 02 30 61 ............4.0a
  1080. | 4016: 01 01 01 01 01 62 01 01 01 01 01 63 01 01 01 01 .....b.....c....
  1081. | 4032: 01 64 01 01 01 65 01 01 01 66 01 01 01 67 01 01 .d...e...f...g..
  1082. | 4048: 01 01 01 68 01 01 01 01 01 69 01 01 01 04 06 06 ...h.....i......
  1083. | 4064: 06 04 04 04 06 06 07 01 03 00 14 03 09 09 09 0f ................
  1084. | 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
  1085. | page 8 offset 28672
  1086. | 0: 0a 00 00 00 01 0f fa 00 0f fa 00 00 00 00 00 00 ................
  1087. | 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
  1088. | page 9 offset 32768
  1089. | 0: 0d 00 00 00 03 0f be 00 0f ea 0f d4 0f be 00 00 ................
  1090. | 4016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 03 ................
  1091. | 4032: 05 00 17 17 17 61 20 62 20 63 67 20 68 20 69 67 .....a b cg h ig
  1092. | 4048: 20 68 20 69 14 02 05 00 17 17 17 67 20 68 20 69 h i.......g h i
  1093. | 4064: 61 20 62 20 63 67 20 68 20 69 14 01 05 00 17 17 a b cg h i......
  1094. | 4080: 17 61 20 62 20 63 64 20 65 20 66 67 20 68 20 69 .a b cd e fg h i
  1095. | page 10 offset 36864
  1096. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  1097. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  1098. | end crash-d8b4a99207c10b.db
  1099. }]} {}
  1100. do_catchsql_test 7.1 {
  1101. SELECT snippet(t1, -1, '.', '..', '[', ']'),
  1102. highlight(t1, 2, '[', ']')
  1103. FROM t1('g + h')
  1104. WHERE rank MATCH 'bm25(1.0, 1.0)' ORDER BY rank;
  1105. } {1 {database disk image is malformed}}
  1106. #-------------------------------------------------------------------------
  1107. reset_db
  1108. do_test 8.0 {
  1109. sqlite3 db {}
  1110. db deserialize [decode_hexdb {
  1111. .open --hexdb
  1112. | size 20480 pagesize 4096 filename crash-d57c01958e48ab.db
  1113. | page 1 offset 0
  1114. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  1115. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 05 .....@ ........
  1116. | 32: 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 04 ................
  1117. | 48: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ................
  1118. | 96: 00 00 00 00 0d 00 00 00 05 0e 10 00 0f 97 0f 40 ...............@
  1119. | 112: 0e d5 0e 68 0e 10 01 00 00 00 00 00 00 00 00 00 ...h............
  1120. | 3600: 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 74 31 5f V.......tablet1_
  1121. | 3616: 63 6f 6e 66 69 67 74 31 5f 63 6f 6e 66 69 67 05 configt1_config.
  1122. | 3632: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  1123. | 3648: 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 49 4d 41 _config'(k PRIMA
  1124. | 3664: 52 59 20 4b 45 59 2c 20 76 29 20 57 49 54 48 4f RY KEY, v) WITHO
  1125. | 3680: 55 54 20 52 4f 57 49 44 6b 04 07 17 21 21 01 81 UT ROWIDk...!!..
  1126. | 3696: 21 74 61 62 6c 65 74 31 5f 64 6f 63 73 69 7a 65 !tablet1_docsize
  1127. | 3712: 74 31 5f 64 6f 63 73 69 7a 65 04 43 52 45 41 54 t1_docsize.CREAT
  1128. | 3728: 45 20 54 41 42 4c 45 20 27 74 31 5f 64 6f 63 73 E TABLE 't1_docs
  1129. | 3744: 69 7a 65 27 28 69 64 20 49 4e 54 45 47 45 52 20 ize'(id INTEGER
  1130. | 3760: 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 73 7a 20 PRIMARY KEY, sz
  1131. | 3776: 42 4c 4f 42 2c 20 6f 72 69 67 69 6e 20 49 4e 54 BLOB, origin INT
  1132. | 3792: 45 47 45 52 29 69 03 07 17 19 19 01 81 2d 74 61 EGER)i.......-ta
  1133. | 3808: 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 64 78 03 blet1_idxt1_idx.
  1134. | 3824: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
  1135. | 3840: 5f 69 64 78 27 28 73 65 67 69 64 2c 20 74 65 72 _idx'(segid, ter
  1136. | 3856: 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d 41 52 59 m, pgno, PRIMARY
  1137. | 3872: 20 4b 45 59 28 73 65 67 69 64 2c 20 74 65 72 6d KEY(segid, term
  1138. | 3888: 29 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 )) WITHOUT ROWID
  1139. | 3904: 55 02 07 17 1b 1b 01 81 01 74 61 62 6c 65 74 31 U........tablet1
  1140. | 3920: 5f 64 61 74 61 74 31 5f 64 61 74 61 02 43 52 45 _datat1_data.CRE
  1141. | 3936: 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 61 ATE TABLE 't1_da
  1142. | 3952: 74 61 27 28 69 64 20 49 4e 54 45 47 45 52 20 50 ta'(id INTEGER P
  1143. | 3968: 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 6c 6f 63 RIMARY KEY, bloc
  1144. | 3984: 6b 20 42 4c 4f 42 29 67 01 07 17 11 11 08 81 3b k BLOB)g.......;
  1145. | 4000: 74 61 62 6c 65 74 31 74 31 43 52 45 41 54 45 20 tablet1t1CREATE
  1146. | 4016: 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 74 31 VIRTUAL TABLE t1
  1147. | 4032: 20 55 53 49 4e 47 20 66 74 73 35 28 61 2c 20 62 USING fts5(a, b
  1148. | 4048: 2c 20 63 6f 6e 74 65 6e 74 3d 27 27 2c 20 63 6f , content='', co
  1149. | 4064: 6e 74 65 6e 74 6c 65 73 73 5f 64 65 6c 65 74 65 ntentless_delete
  1150. | 4080: 3d 31 2c 20 74 6f 6b 65 6e 64 61 74 61 3d 31 29 =1, tokendata=1)
  1151. | page 2 offset 4096
  1152. | 0: 0d 0f eb 00 03 0e 17 00 0f e2 0e 17 0e 31 00 00 .............1..
  1153. | 16: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  1154. | 3600: 00 00 00 00 00 00 00 18 0a 03 00 36 00 00 00 00 ...........6....
  1155. | 3616: ff 00 00 01 01 01 01 00 01 01 01 01 01 01 00 00 ................
  1156. | 3632: 07 83 29 84 80 80 80 80 01 04 00 86 56 00 00 01 ..).........V...
  1157. | 3648: 96 04 30 61 61 61 01 02 02 01 04 02 04 01 08 02 ..0aaa..........
  1158. | 3664: 04 04 04 01 10 02 04 04 04 04 04 04 04 01 20 02 .............. .
  1159. | 3680: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 01 ................
  1160. | 3696: 40 02 04 04 04 04 04 04 04 04 04 04 04 04 04 04 @...............
  1161. | 3712: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 ................
  1162. | 3728: 04 01 81 00 02 04 04 04 04 04 04 04 04 04 04 04 ................
  1163. | 3744: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 ................
  1164. | 3760: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 ................
  1165. | 3776: 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 ................
  1166. | 3792: 04 04 04 04 02 02 62 63 01 06 01 01 02 01 03 62 ......bc.......b
  1167. | 3808: 62 62 02 02 03 01 04 03 06 01 08 03 06 06 06 01 bb..............
  1168. | 3824: 10 03 06 06 06 06 06 06 06 01 20 03 06 06 06 06 .......... .....
  1169. | 3840: 06 06 06 06 06 06 06 06 06 06 06 01 40 03 06 06 ............@...
  1170. | 3856: 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 06 ................
  1171. | 3872: 06 06 06 06 06 06 06 06 06 06 16 06 06 02 02 63 ...............c
  1172. | 3888: 64 02 06 01 01 02 01 03 63 63 63 03 02 05 01 04 d.......ccc.....
  1173. | 3904: 05 0a 01 08 05 0a 0a 0a 01 10 05 0a 0a 0a 0a 0a ................
  1174. | 3920: 0a 0a 01 20 05 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ... ............
  1175. | 3936: 0a 0a 0a 0a 02 02 64 65 03 06 01 01 02 01 03 64 ......de.......d
  1176. | 3952: 64 64 04 02 09 01 04 09 12 01 08 09 12 12 12 01 dd..............
  1177. | 3968: 10 09 12 12 12 12 12 12 12 02 02 65 66 04 06 01 ...........ef...
  1178. | 3984: 01 02 01 03 65 65 65 05 02 11 01 04 11 22 01 08 ....eee.........
  1179. | 4000: 11 22 22 22 02 02 66 67 05 06 01 01 02 01 03 66 ......fg.......f
  1180. | 4016: 56 66 06 02 21 01 04 21 42 02 02 67 68 06 06 01 Vf..!..!B..gh...
  1181. | 4032: 01 02 cb 03 67 67 67 07 02 41 02 02 68 69 07 06 ....ggg..A..hi..
  1182. | 4048: 01 01 02 04 81 13 09 50 09 2e 09 1c 09 12 09 0c .......P........
  1183. | 4064: 09 08 07 01 03 00 14 07 81 77 07 00 00 00 15 22 .........w......
  1184. | 4080: 00 00 00 00 ff 00 00 01 00 00 00 00 00 00 05 0c ................
  1185. | page 3 offset 8192
  1186. | 0: 0a 00 00 00 01 0f fa 00 0f fa 00 00 00 00 00 00 ................
  1187. | 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
  1188. | page 4 offset 12288
  1189. | 0: 0d 00 00 00 07 0f c8 00 0f f8 0f f0 0f e8 0f e0 ................
  1190. | 16: 0f d8 0f d0 0f c8 00 00 00 00 00 00 00 00 00 00 ................
  1191. | 4032: 00 00 00 00 00 00 00 00 06 07 04 00 10 09 7f 01 ................
  1192. | 4048: 06 06 04 00 10 09 3f 01 06 05 04 00 10 09 1f 01 ......?.........
  1193. | 4064: 06 04 04 00 10 09 0f 01 06 03 04 00 10 09 07 01 ................
  1194. | 4080: 06 02 04 00 10 09 03 01 06 01 04 00 10 09 01 01 ................
  1195. | page 5 offset 16384
  1196. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  1197. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  1198. | end crash-d57c01958e48ab.db
  1199. }]} {}
  1200. do_catchsql_test 8.1 {
  1201. SELECT rowid FROM t1('a* NOT ý‘') ;
  1202. } {0 {1 2 3 4 5 6 7}}
  1203. #-------------------------------------------------------------------------
  1204. reset_db
  1205. do_test 9.0 {
  1206. sqlite3 db {}
  1207. db deserialize [decode_hexdb {
  1208. .open --hexdb
  1209. | size 32768 pagesize 4096 filename crash-c76a16c24c8ba6.db
  1210. | page 1 offset 0
  1211. | 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
  1212. | 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
  1213. | 32: 00 00 00 02 00 00 00 01 00 00 00 09 00 00 00 04 ................
  1214. | 96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36 ...............6
  1215. | 112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 0d 92 00 00 00 00 ...k............
  1216. | 3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
  1217. | 3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
  1218. | 3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
  1219. | 3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
  1220. | 3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
  1221. | 3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
  1222. | 3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
  1223. | 3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06 WITHOUT ROWID[.
  1224. | 3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
  1225. | 3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
  1226. | 3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
  1227. | 3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
  1228. | 3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
  1229. | 3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21 Y, sz BLOB)^...!
  1230. | 3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74 !...tablet1_cont
  1231. | 3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52 entt1_content.CR
  1232. | 3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 EATE TABLE 't1_c
  1233. | 3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 ontent'(id INTEG
  1234. | 3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
  1235. | 3776: 63 30 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19 c0, c1, c2)i....
  1236. | 3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 ...-tablet1_idxt
  1237. | 3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42 1_idx.CREATE TAB
  1238. | 3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69 LE 't1_idx'(segi
  1239. | 3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 d, term, pgno, P
  1240. | 3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64 RIMARY KEY(segid
  1241. | 3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54 , term)) WITHOUT
  1242. | 3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74 ROWIDU........t
  1243. | 3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61 ablet1_datat1_da
  1244. | 3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 ta.CREATE TABLE
  1245. | 3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54 't1_data'(id INT
  1246. | 3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 EGER PRIMARY KEY
  1247. | 3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06 , block BLOB)8..
  1248. | 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
  1249. | 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
  1250. | 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 LE t1 USING fts5
  1251. | 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
  1252. | page 3 offset 8192
  1253. | 0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00 ................
  1254. | 3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18 .....J..........
  1255. | 3232: 00 00 03 2b 02 30 30 01 02 06 01 02 06 01 02 06 ...+.00.........
  1256. | 3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30 ...........20160
  1257. | 3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01 609...........4.
  1258. | 3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02 ..........5.....
  1259. | 3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04 ......0000000...
  1260. | 3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06 ........binary..
  1261. | 3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
  1262. | 3344: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
  1263. | 3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
  1264. | 3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70 ............comp
  1265. | 3392: 69 6c 65 72 01 02 02 01 02 02 01 02 02 01 06 64 iler...........d
  1266. | 3408: 62 73 74 61 74 07 02 03 01 02 03 01 02 03 02 04 bstat...........
  1267. | 3424: 65 62 75 67 04 02 02 01 02 02 01 02 02 01 06 65 ebug...........e
  1268. | 3440: 6e 61 62 6c 65 07 02 02 01 02 02 01 02 02 01 02 nable...........
  1269. | 3456: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 ................
  1270. | 3472: 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 ................
  1271. | 3488: 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 ................
  1272. | 3504: 02 01 02 02 02 08 78 74 65 6e 73 69 6f 6e 1f 02 ......xtension..
  1273. | 3520: 04 01 02 04 01 02 04 01 04 66 74 73 34 0a 02 03 .........fts4...
  1274. | 3536: 01 02 03 01 02 03 04 01 35 0d 02 03 01 02 03 01 ........5.......
  1275. | 3552: 02 03 01 03 67 63 63 01 02 03 01 02 03 01 02 03 ....gcc.........
  1276. | 3568: 02 06 65 6f 70 6f 6c 79 10 02 03 01 02 03 01 02 ..eopoly........
  1277. | 3584: 03 01 05 6a 73 6f 6e 31 13 02 03 01 02 03 01 02 ...json1........
  1278. | 3600: 03 01 04 6c 6f 61 64 1f 02 03 01 02 03 01 02 03 ...load.........
  1279. | 3616: 01 03 6d 61 78 1c 02 02 01 02 02 01 02 02 02 05 ..max...........
  1280. | 3632: 65 6d 6f 72 79 1c 02 03 01 02 03 01 02 03 04 04 emory...........
  1281. | 3648: 73 79 73 35 16 02 03 01 02 03 01 02 03 01 06 6e sys5...........n
  1282. | 3664: 6f 63 61 73 65 02 06 01 02 02 03 06 01 02 02 03 ocase...........
  1283. | 3680: 06 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 ................
  1284. | 3696: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
  1285. | 3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
  1286. | 3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 02 ...omit.........
  1287. | 3744: 01 05 72 74 72 65 65 19 02 03 01 02 03 01 02 03 ..rtree.........
  1288. | 3760: 04 02 69 6d 01 06 01 02 02 03 06 01 02 02 03 06 ..im............
  1289. | 3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
  1290. | 3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
  1291. | 3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
  1292. | 3824: 01 0a 74 68 72 65 61 64 73 61 66 65 03 57 34 56 ..threadsafe.W4V
  1293. | 3840: 94 64 91 46 85 84 04 76 74 61 62 07 02 04 01 02 .d.F...vtab.....
  1294. | 3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01 ......x.........
  1295. | 3872: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 10 02 ................
  1296. | 3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
  1297. | 3904: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
  1298. | 3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
  1299. | 3936: 01 02 01 06 01 01 10 01 06 01 01 02 01 06 01 01 ................
  1300. | 3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 ................
  1301. | 3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
  1302. | 3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
  1303. | 4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
  1304. | 4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
  1305. | 4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c ................
  1306. | 4048: 12 44 13 11 0f 47 13 0f 0c 0e 11 10 0f 0e 10 0f .D...G..........
  1307. | 4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f D..@.......$Z$$.
  1308. | 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
  1309. | page 4 offset 12288
  1310. | 0: 0a 00 00 00 01 0f fa 00 00 00 00 00 00 00 00 00 ................
  1311. | 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
  1312. | page 5 offset 16384
  1313. | 0: 0d 00 00 00 24 0c 0a 00 0f d8 0f af 0f 86 0f 74 ....$..........t
  1314. | 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
  1315. | 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
  1316. | 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 35 0d 1b 0c fb .......h.O.5....
  1317. | 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a .......x.W.>.$..
  1318. | 3072: 00 00 00 00 00 00 00 00 00 00 18 24 05 00 25 0f ...........$..%.
  1319. | 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
  1320. | 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
  1321. | 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
  1322. | 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 31 46 45 3d ..%..THREADS1FE=
  1323. | 3152: 30 58 52 64 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRdRIM.!..3..OM
  1324. | 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
  1325. | 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
  1326. | 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
  1327. | 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
  1328. | 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
  1329. | 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
  1330. | 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
  1331. | 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
  1332. | 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
  1333. | 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
  1334. | 3328: 0f 17 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MAX MEMORY=500
  1335. | 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
  1336. | 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
  1337. | 3376: 49 4e 41 52 59 18 1a 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
  1338. | 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
  1339. | 3408: 19 05 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
  1340. | 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
  1341. | 3440: 4e 41 42 4b 45 20 4d 45 4d 53 59 53 35 58 42 49 NABKE MEMSYS5XBI
  1342. | 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
  1343. | 3472: 42 60 2d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 B`-EMSYS5XNOCASE
  1344. | 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
  1345. | 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 15 05 00 25 MSYS5XRTRIM....%
  1346. | 3520: 0f 19 45 4e 41 42 4c 45 20 4a 53 4f 4e 31 58 42 ..ENABLE JSON1XB
  1347. | 3536: 49 4e 41 52 59 18 14 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
  1348. | 3552: 4c 45 20 4a 53 4f 4e 31 58 4e 4f 43 41 53 45 17 LE JSON1XNOCASE.
  1349. | 3568: 13 05 00 25 0f 17 45 4e 41 42 4c 45 20 4a 53 4f ...%..ENABLE JSO
  1350. | 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 00 29 0f 19 45 N1XRTRIM....)..E
  1351. | 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 NABLE GEOPOLYXBI
  1352. | 3616: 4e 41 52 59 1a 11 05 00 39 0f 19 45 4e 41 42 4c NARY....9..ENABL
  1353. | 3632: 45 20 47 45 4f 50 4f 4c 59 58 4e 4f 43 41 53 45 E GEOPOLYXNOCASE
  1354. | 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
  1355. | 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
  1356. | 3680: 0f 19 45 4e 41 42 4c 45 20 46 54 53 35 58 42 49 ..ENABLE FTS5XBI
  1357. | 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
  1358. | 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0d 05 E FTS5XNOCASE...
  1359. | 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
  1360. | 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
  1361. | 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
  1362. | 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
  1363. | 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
  1364. | 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
  1365. | 3824: 09 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
  1366. | 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
  1367. | 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
  1368. | 3872: 54 41 54 20 56 54 24 15 48 4e 4f 43 41 53 45 1d TAT VT$.HNOCASE.
  1369. | 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
  1370. | 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
  1371. | 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
  1372. | 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
  1373. | 3952: 43 41 53 45 10 04 05 00 17 0f 17 44 45 42 55 47 CASE.......DEBUG
  1374. | 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
  1375. | 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
  1376. | 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
  1377. | 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3c 67 ...C..COMPILER<g
  1378. | 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
  1379. | 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 0f 17 43 9XNOCASE&...C..C
  1380. | 4064: 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e OMPILER=gcc-5.4.
  1381. | 4080: 30 20 32 30 31 36 30 36 30 39 58 52 54 52 49 4d 0 20160609XRTRIM
  1382. | page 6 offset 20480
  1383. | 0: 0d 00 00 00 24 0e e0 00 0f f8 0f f0 0f e8 0f e0 ....$...........
  1384. | 16: 0f d8 0f d0 0f c8 0f c0 0f b8 0f b0 0f a8 0f a0 ................
  1385. | 32: 1f 98 0f 90 0f 88 0f 80 0f 78 0f 70 0f 68 0f 60 .........x.p.h.`
  1386. | 48: 0f 58 0f 50 0f 48 0f 40 0f 38 0f 30 0f 28 0f 20 .X.P.H.@.8.0.(.
  1387. | 64: 0f 18 0f 10 0f 08 0f 00 0e f8 0e f0 0e e8 0e e0 ................
  1388. | 3808: 06 24 03 00 12 02 01 01 06 23 03 00 12 02 01 01 .$.......#......
  1389. | 3824: 06 22 03 00 12 02 01 01 06 21 03 00 12 03 01 01 .........!......
  1390. | 3840: 06 20 03 00 12 03 01 01 06 1f 03 00 12 03 01 01 . ..............
  1391. | 3856: 06 1e 03 00 12 03 01 01 06 1d 03 00 12 03 01 01 ................
  1392. | 3872: 06 1c 03 00 12 03 01 01 06 1b 03 00 12 02 01 01 ................
  1393. | 3888: 06 1a 03 00 12 02 01 01 06 19 03 00 12 02 01 01 ................
  1394. | 3904: 06 18 03 00 12 02 01 01 06 17 03 00 12 02 01 01 ................
  1395. | 3920: 06 15 f3 00 12 02 01 01 06 15 03 00 12 02 01 01 ................
  1396. | 3936: 06 14 03 00 12 02 01 01 06 13 03 00 12 02 01 01 ................
  1397. | 3952: 06 12 03 00 12 02 01 01 06 11 03 00 12 02 01 01 ................
  1398. | 3968: 06 10 03 00 12 02 01 01 06 0f 03 00 12 02 01 01 ................
  1399. | 3984: 06 0e 03 00 12 02 01 01 06 0d 03 00 12 02 01 01 ................
  1400. | 4000: 06 0c 03 00 12 02 01 01 06 0b 03 00 12 02 01 01 ................
  1401. | 4016: 06 0a 03 00 12 02 01 01 06 09 03 00 12 03 01 01 ................
  1402. | 4032: 06 08 03 00 12 03 01 01 06 07 03 00 12 03 01 01 ................
  1403. | 4048: 06 06 03 00 12 01 01 01 06 05 03 00 12 01 01 01 ................
  1404. | 4064: 06 04 03 00 12 01 01 01 06 03 03 00 12 06 01 01 ................
  1405. | 4080: 06 02 03 00 12 06 01 01 06 01 03 00 12 06 01 01 ................
  1406. | page 7 offset 24576
  1407. | 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
  1408. | 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
  1409. | page 8 offset 28672
  1410. | 0: 0d 00 00 00 03 0f d6 00 0f f4 0f e9 0f d6 00 00 ................
  1411. | 4048: 00 00 00 00 00 00 11 03 02 2b 69 6e 74 65 67 72 .........+integr
  1412. | 4064: 69 74 79 2d 63 68 65 63 6b 09 02 02 1b 72 65 62 ity-check....reb
  1413. | 4080: 75 69 6c 64 0a 01 02 1d 6f 70 74 69 00 00 00 00 uild....opti....
  1414. | end crash-c76a16c24c8ba6.db
  1415. }]} {}
  1416. #.testctrl prng_seed 1 db
  1417. #.testctrl internal_functions
  1418. #.testctrl json_selfcheck on
  1419. #
  1420. do_execsql_test 9.1 {
  1421. UPDATE t1 SET b=quote(zeroblob(current_date)) WHERE t1 MATCH 't*';
  1422. SAVEPOINT a;
  1423. UPDATE t1 SET b=quote(zeroblob(current_date)) WHERE t1 MATCH 't*';
  1424. INSERT INTO t1(t1,rank) VALUES('secure-delete',1);
  1425. }
  1426. do_catchsql_test 9.2 {
  1427. DELETE FROM t1;
  1428. } {1 {database disk image is malformed}}
  1429. sqlite3_fts5_may_be_corrupt 0
  1430. finish_test