亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fileformat.tcl

?? 新版輕量級嵌入式數據庫
?? TCL
?? 第 1 頁 / 共 2 頁
字號:
## Run this script to generated a fileformat.html output file#set rcsid {$Id: fileformat.tcl,v 1.13 2004/10/10 17:24:55 drh Exp $}source common.tclheader {SQLite Database File Format (Version 2)}puts {<h2>SQLite 2.X Database File Format</h2><p>This document describes the disk file format for SQLite versions 2.1through 2.8.  SQLite version 3.0 and following uses a very differentformat which is described separately.</p><h3>1.0 &nbsp; Layers</h3><p>SQLite is implemented in layers.(See the <a href="arch.html">architecture description</a>.)The format of database files is determined by three differentlayers in the architecture.</p><ul><li>The <b>schema</b> layer implemented by the VDBE.</li><li>The <b>b-tree</b> layer implemented by btree.c</li><li>The <b>pager</b> layer implemented by pager.c</li></ul><p>We will describe each layer beginning with the bottom (pager)layer and working upwards.</p><h3>2.0 &nbsp; The Pager Layer</h3><p>An SQLite database consists of"pages" of data.  Each page is 1024 bytes in size.Pages are numbered beginning with 1.A page number of 0 is used to indicate "no such page" in theB-Tree and Schema layers.</p><p>The pager layer is responsible for implementing transactionswith atomic commit and rollback.  It does this using a separatejournal file.  Whenever a new transaction is started, a journalfile is created that records the original state of the database.If the program terminates before completing the transaction, the nextprocess to open the database can use the journal file to restorethe database to its original state.</p><p>The journal file is located in the same directory as the databasefile and has the same name as the database file but with thecharacters "<tt>-journal</tt>" appended.</p><p>The pager layer does not impose any content restrictions on themain database file.  As far as the pager is concerned, each pagecontains 1024 bytes of arbitrary data.  But there is structure tothe journal file.</p><p>A journal file begins with 8 bytes as follows:0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, and 0xd6.Processes that are attempting to rollback a journal use these 8 bytesas a sanity check to make sure the file they think is a journal reallyis a valid journal.  Prior version of SQLite used different journalfile formats.  The magic numbers for these prior formats are differentso that if a new version of the library attempts to rollback a journalcreated by an earlier version, it can detect that the journal usesan obsolete format and make the necessary adjustments.  This articledescribes only the newest journal format - supported as of version2.8.0.</p><p>Following the 8 byte prefix is a three 4-byte integers that tell usthe number of pages that have been committed to the journal,a magic number used forsanity checking each page, and theoriginal size of the main database file before the transaction wasstarted.  The number of committed pages is used to limit how farinto the journal to read.  The use of the checksum magic number isdescribed below.The original size of the database is used to restore the databasefile back to its original size.The size is expressed in pages (1024 bytes per page).</p><p>All three integers in the journal header and all other multi-bytenumbers used in the journal file are big-endian.That means that the most significant byteoccurs first.  That way, a journal file that isoriginally created on one machine can be rolled back by anothermachine that uses a different byte order.  So, for example, atransaction that failed to complete on your big-endian SparcStationcan still be rolled back on your little-endian Linux box.</p><p>After the 8-byte prefix and the three 4-byte integers, thejournal file consists of zero or more page records.  Each pagerecord is a 4-byte (big-endian) page number followed by 1024 bytesof data and a 4-byte checksum.  The data is the original content of the database pagebefore the transaction was started.  So to roll back the transaction,the data is simply written into the corresponding page of themain database file.  Pages can appear in the journal in any order,but they are guaranteed to appear only once. All page numbers will bebetween 1 and the maximum specified by the page size integer thatappeared at the beginning of the journal.</p><p>The so-called checksum at the end of each record is not really achecksum - it is the sum of the page number and the magic number whichwas the second integer in the journal header.  The purpose of thisvalue is to try to detect journal corruption that might have occurredbecause of a power loss or OS crash that occurred which the journalfile was being written to disk.  It could have been the case that themeta-data for the journal file, specifically the size of the file, hadbeen written to the disk so that when the machine reboots it appears thatfile is large enough to hold the current record.  But even though thefile size has changed, the data for the file might not have made it tothe disk surface at the time of the OS crash or power loss.  This meansthat after reboot, the end of the journal file will contain quasi-randomgarbage data.  The checksum is an attempt to detect such corruption.  Ifthe checksum does not match, that page of the journal is not rolled back.</p><p>Here is a summary of the journal file format:</p><ul><li>8 byte prefix: 0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, 0xd6</li><li>4 byte number of records in journal</li><li>4 byte magic number used for page checksums</li><li>4 byte initial database page count</li><li>Zero or more instances of the following:   <ul>   <li>4 byte page number</li>   <li>1024 bytes of original data for the page</li>   <li>4 byte checksum</li>   </ul></li></ul><h3>3.0 &nbsp; The B-Tree Layer</h3><p>The B-Tree layer builds on top of the pager layer to implementone or more separate b-trees all in the same disk file.  Thealgorithms used are taken from Knuth's <i>The Art Of ComputerProgramming.</i></p><p>Page 1 of a database contains a header string used for sanitychecking, a few 32-bit words of configuration data, and a pointerto the beginning of a list of unused pages in the database.All other pages in thedatabase are either pages of a b-tree, overflow pages, or unusedpages on the freelist.</p><p>Each b-tree page contains zero or more database entries.Each entry has an unique key of one or more bytes and data ofzero or more bytes.Both the key and data are arbitrary byte sequences.  The combinationof key and data are collectively known as "payload".  The currentimplementation limits the amount of payload in a single entry to1048576 bytes.  This limit can be raised to 16777216 by adjustinga single #define in the source code and recompiling.  But most entriescontain less than a hundred bytes of payload so a megabyte limit seemsmore than enough.</p><p>Up to 238 bytes of payload for an entry can be held directly ona b-tree page.  Any additional payload is contained on a linked listof overflow pages.  This limit on the amount of payload held directlyon b-tree pages guarantees that each b-tree page can hold at least4 entries.  In practice, most entries are smaller than 238 bytes andthus most pages can hold more than 4 entries.</p><p>A single database file can hold any number of separate, independent b-trees.Each b-tree is identified by its root page, which never changes.Child pages of the b-tree may change as entries are added and removedand pages split and combine.  But the root page always stays the same.The b-tree itself does not record which pages are root pages and whichare not.  That information is handled entirely at the schema layer.</p><h4>3.1 &nbsp; B-Tree Page 1 Details</h4><p>Page 1 begins with the following 48-byte string:</p><blockquote><pre>** This file contains an SQLite 2.1 database **</pre></blockquote><p>If you count the number of characters in the string above, you willsee that there are only 47.  A '\000' terminator byte is added tobring the total to 48.</p><p>A frequent question is why the string says version 2.1 when (asof this writing) we are up to version 2.7.0 of SQLite and anychange to the second digit of the version is suppose to representa database format change.  The answer to this is that the B-treelayer has not changed any since version 2.1.  There have beendatabase format changes since version 2.1 but those changes haveall been in the schema layer.  Because the format of the b-treelayer is unchanged since version 2.1.0, the header string stillsays version 2.1.</p><p>After the format string is a 4-byte integer used to determine thebyte-order of the database.  The integer has a value of0xdae37528.  If this number is expressed as 0xda, 0xe3, 0x75, 0x28, thenthe database is in a big-endian format and all 16 and 32-bit integerselsewhere in the b-tree layer are also big-endian.  If the number isexpressed as 0x28, 0x75, 0xe3, and 0xda, then the database is in alittle-endian format and all other multi-byte numbers in the b-tree layer are also little-endian.  Prior to version 2.6.3, the SQLite engine was only able to read databasesthat used the same byte order as the processor they were running on.But beginning with 2.6.3, SQLite can read or write databases in anybyte order.</p><p>After the byte-order code are six 4-byte integers.  Each integer is in thebyte order determined by the byte-order code.  The first integer is thepage number for the first page of the freelist.  If there are no unusedpages in the database, then this integer is 0.  The second integer isthe number of unused pages in the database.  The last 4 integers arenot used by the b-tree layer.  These are the so-called "meta" values thatare passed up to the schema layerand used there for configuration and format version information.All bytes of page 1 past beyond the meta-value integers are unused and are initialized to zero.</p><p>Here is a summary of the information contained on page 1 in the b-tree layer:</p><ul><li>48 byte header string</li><li>4 byte integer used to determine the byte-order</li><li>4 byte integer which is the first page of the freelist</li><li>4 byte integer which is the number of pages on the freelist</li><li>36 bytes of meta-data arranged as nine 4-byte integers</li><li>928 bytes of unused space</li></ul><h4>3.2 &nbsp; Structure Of A Single B-Tree Page</h4><p>Conceptually, a b-tree page contains N database entries and N+1 pointersto other b-tree pages.</p><blockquote><table border=1 cellspacing=0 cellpadding=5><tr><td align="center">Ptr<br>0</td><td align="center">Entry<br>0</td><td align="center">Ptr<br>1</td><td align="center">Entry<br>1</td><td align="center"><b>...</b></td><td align="center">Ptr<br>N-1</td><td align="center">Entry<br>N-1</td><td align="center">Ptr<br>N</td></tr></table></blockquote><p>The entries are arranged in increasing order.  That is, the key toEntry 0 is less than the key to Entry 1, and the key to Entry 1 isless than the key of Entry 2, and so forth.  The pointers point topages containing additional entries that have keys in between theentries on either side.  So Ptr 0 points to another b-tree page thatcontains entries that all have keys less than Key 0, and Ptr 1points to a b-tree pages where all entries have keys greater than Key 0but less than Key 1, and so forth.</p><p>Each b-tree page in SQLite consists of a header, zero or more "cells"each holding a single entry and pointer, and zero or more "free blocks"that represent unused space on the page.</p><p>The header on a b-tree page is the first 8 bytes of the page.The header contains the valueof the right-most pointer (Ptr N) and the byte offset into the pageof the first cell and the first free block.  The pointer is a 32-bitvalue and the offsets are each 16-bit values.  We have:</p><blockquote><table border=1 cellspacing=0 cellpadding=5><tr><td align="center" width=30>0</td><td align="center" width=30>1</td><td align="center" width=30>2</td><td align="center" width=30>3</td><td align="center" width=30>4</td><td align="center" width=30>5</td><td align="center" width=30>6</td><td align="center" width=30>7</td></tr><tr><td align="center" colspan=4>Ptr N</td><td align="center" colspan=2>Cell 0</td><td align="center" colspan=2>Freeblock 0</td></tr></table></blockquote><p>The 1016 bytes of a b-tree page that come after the header containcells and freeblocks.  All 1016 bytes are covered by either a cellor a freeblock.</p><p>The cells are connected in a linked list.  Cell 0 contains Ptr 0 andEntry 0.  Bytes 4 and 5 of the header point to Cell 0.  Cell 0 thenpoints to Cell 1 which contains Ptr 1 and Entry 1.  And so forth.Cells vary in size.  Every cell has a 12-byte header and at least 4bytes of payload space.  Space is allocated to payload in incrementsof 4 bytes.  Thus the minimum size of a cell is 16 bytes and up to63 cells can fit on a single page.  The size of a cell is always a multipleof 4 bytes.A cell can have up to 238 bytes of payload space.  Ifthe payload is more than 238 bytes, then an additional 4 byte pagenumber is appended to the cell which is the page number of the firstoverflow page containing the additional payload.  The maximum sizeof a cell is thus 254 bytes, meaning that a least 4 cells can fit intothe 1016 bytes of space available on a b-tree page.An average cell is usually around 52 to 100 bytes in size with about10 or 20 cells to a page.</p><p>The data layout of a cell looks like this:</p><blockquote><table border=1 cellspacing=0 cellpadding=5><tr><td align="center" width=20>0</td><td align="center" width=20>1</td><td align="center" width=20>2</td><td align="center" width=20>3</td><td align="center" width=20>4</td><td align="center" width=20>5</td><td align="center" width=20>6</td><td align="center" width=20>7</td><td align="center" width=20>8</td><td align="center" width=20>9</td><td align="center" width=20>10</td><td align="center" width=20>11</td><td align="center" width=100>12 ... 249</td><td align="center" width=20>250</td><td align="center" width=20>251</td><td align="center" width=20>252</td><td align="center" width=20>253</td></tr><tr><td align="center" colspan=4>Ptr</td><td align="center" colspan=2>Keysize<br>(low)</td>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区99| 成人av第一页| 色婷婷狠狠综合| 亚洲激情成人在线| 欧美视频在线观看一区| 亚洲福利一二三区| 欧美久久久久久久久中文字幕| 亚洲精品国产精华液| 欧美午夜影院一区| 香蕉久久一区二区不卡无毒影院| 欧美日韩视频专区在线播放| 爽好多水快深点欧美视频| 日韩视频免费观看高清完整版在线观看 | 国产精品三级av| 色婷婷综合在线| 另类专区欧美蜜桃臀第一页| 国产精品全国免费观看高清| 97精品视频在线观看自产线路二| 综合激情网...| 欧美一级久久久| 成人美女视频在线看| 亚洲一区二区三区爽爽爽爽爽| 欧美一区欧美二区| 不卡的av电影| 极品销魂美女一区二区三区| 国产精品久久国产精麻豆99网站| 欧美在线观看视频在线| 精品一区二区三区在线播放视频 | www.爱久久.com| 精品在线免费观看| 亚洲国产综合色| 国产精品久久久久久久久搜平片| 日韩手机在线导航| 色婷婷综合久久久中文一区二区| 国产一区二区三区高清播放| 丝袜美腿亚洲综合| 亚洲制服丝袜一区| 亚洲天堂久久久久久久| 中文字幕乱码一区二区免费| 精品国产伦一区二区三区免费| 欧美日本精品一区二区三区| 99re这里只有精品视频首页| 粉嫩av一区二区三区在线播放| 日韩精彩视频在线观看| 亚洲成人午夜电影| 亚洲一区二区三区四区中文字幕| 国产精品久久久久久久久搜平片 | 综合av第一页| 欧美高清在线一区二区| 2023国产精品视频| 欧美激情中文字幕一区二区| 国产日韩欧美亚洲| 国产精品久久久久久户外露出| 国产亚洲成年网址在线观看| 久久视频一区二区| 欧美激情一二三区| 亚洲三级在线看| 亚洲福利视频一区二区| 国产一区二区三区综合| 久久99久久久久| 成人午夜又粗又硬又大| 99久久久免费精品国产一区二区| 色综合欧美在线视频区| 精品视频在线免费观看| 日韩色在线观看| 国产精品国产自产拍高清av王其| 依依成人综合视频| 另类人妖一区二区av| 成人丝袜高跟foot| 色吧成人激情小说| 精品少妇一区二区三区在线视频| 日本一区二区动态图| 亚洲成人精品影院| 国产精品亚洲人在线观看| 日本高清不卡在线观看| 26uuu国产日韩综合| 亚洲综合色噜噜狠狠| 国产美女在线观看一区| 在线观看www91| 国产日韩成人精品| 看电影不卡的网站| 欧美日韩国产美| 亚洲精品美腿丝袜| 国产suv精品一区二区883| 91精品国产91久久综合桃花| 亚洲男人天堂av| 成人福利在线看| 国产亚洲一区二区三区在线观看 | 日韩精品一卡二卡三卡四卡无卡| 国产成人a级片| 精品久久人人做人人爰| 日本不卡在线视频| 欧美少妇xxx| 亚洲一区二区三区爽爽爽爽爽| 成人精品视频.| 中文av字幕一区| 国产成人精品1024| 国产精品久久综合| 92国产精品观看| 亚洲一区二区三区视频在线播放| 99精品国产热久久91蜜凸| 亚洲欧美在线aaa| 91蜜桃传媒精品久久久一区二区| 成人欧美一区二区三区小说| 99热在这里有精品免费| 亚洲免费在线视频一区 二区| 99久久精品久久久久久清纯| 亚洲三级电影网站| 欧美狂野另类xxxxoooo| 蜜桃av一区二区在线观看| 久久嫩草精品久久久精品| 国产成都精品91一区二区三| 自拍偷拍欧美激情| 色婷婷综合久久久| 久久99国产精品成人| 亚洲国产精品成人综合色在线婷婷 | 国内精品久久久久影院薰衣草| 国产亚洲欧美色| 欧美日韩一级二级三级| 精品一区二区三区在线观看| 亚洲欧美综合另类在线卡通| 91亚洲精品乱码久久久久久蜜桃 | 狠狠色丁香久久婷婷综| 国产精品久久99| 日韩免费性生活视频播放| 91天堂素人约啪| 麻豆91免费观看| 亚洲资源在线观看| 中文字幕乱码久久午夜不卡| 欧美狂野另类xxxxoooo| 色婷婷精品久久二区二区蜜臂av| 理论电影国产精品| 午夜欧美大尺度福利影院在线看| 国产精品免费久久| 亚洲精品一区二区在线观看| 911精品国产一区二区在线| 99riav久久精品riav| 国产成人免费在线视频| 极品销魂美女一区二区三区| 日韩不卡手机在线v区| 亚洲成a人在线观看| 亚洲精品伦理在线| 亚洲欧美偷拍三级| |精品福利一区二区三区| 欧美国产精品劲爆| 国产精品久久久久精k8| 国产欧美一区二区精品秋霞影院 | 99re这里只有精品视频首页| 成人午夜私人影院| 91天堂素人约啪| 欧美日韩一区二区欧美激情| 欧美福利一区二区| 欧美一二三四在线| 久久久久久久综合日本| www久久精品| 亚洲色欲色欲www| 亚洲一区二区三区四区在线观看| 一区二区三区视频在线看| 亚洲一区二区三区四区在线免费观看| 亚洲另类春色国产| 日本最新不卡在线| 成人精品国产福利| 欧美视频一区二区三区四区| 欧美一区二区大片| 国产精品初高中害羞小美女文| 亚洲欧美日韩电影| 麻豆精品精品国产自在97香蕉| 国内精品嫩模私拍在线| 91福利在线看| 2023国产精品自拍| 天堂蜜桃一区二区三区| 成人性生交大片免费看视频在线| 欧美性感一类影片在线播放| 26uuu成人网一区二区三区| 亚洲自拍另类综合| 国产高清成人在线| 欧美一区二区私人影院日本| 国产精品电影一区二区三区| 亚洲一级二级三级在线免费观看| 国内精品久久久久影院色| 欧美日韩一区小说| 亚洲女同女同女同女同女同69| 日本美女视频一区二区| 欧美三级中文字幕在线观看| 欧美国产精品中文字幕| 国产麻豆精品在线| 日韩精品一区二区三区在线播放| 亚洲国产精品久久一线不卡| 成人av中文字幕| 亚洲国产岛国毛片在线| 国产一二精品视频| 久久综合九色欧美综合狠狠| 日本不卡视频一二三区| 欧美片在线播放| 日韩和欧美一区二区| 日韩一区二区在线看片| 婷婷中文字幕一区三区| 91精品在线麻豆| 国产麻豆精品theporn| 久久久综合视频|