1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*ae316d1dSXin LI# $File: sql,v 1.27 2023/08/19 15:33:04 christos Exp $ 4b6cee71dSXin LI# sql: file(1) magic for SQL files 5b6cee71dSXin LI# 6b6cee71dSXin LI# From: "Marty Leisner" <mleisner@eng.mc.xerox.com> 7b6cee71dSXin LI# Recognize some MySQL files. 8b6cee71dSXin LI# Elan Ruusamae <glen@delfi.ee>, added MariaDB signatures 9b6cee71dSXin LI# from https://bazaar.launchpad.net/~maria-captains/maria/5.5/view/head:/support-files/magic 10b6cee71dSXin LI# 11b6cee71dSXin LI0 beshort 0xfe01 MySQL table definition file 12b6cee71dSXin LI>2 byte x Version %d 13a5d223e6SXin LI>3 byte 0 \b, type UNKNOWN 14a5d223e6SXin LI>3 byte 1 \b, type DIAM_ISAM 15a5d223e6SXin LI>3 byte 2 \b, type HASH 16a5d223e6SXin LI>3 byte 3 \b, type MISAM 17a5d223e6SXin LI>3 byte 4 \b, type PISAM 18a5d223e6SXin LI>3 byte 5 \b, type RMS_ISAM 19a5d223e6SXin LI>3 byte 6 \b, type HEAP 20a5d223e6SXin LI>3 byte 7 \b, type ISAM 21a5d223e6SXin LI>3 byte 8 \b, type MRG_ISAM 22a5d223e6SXin LI>3 byte 9 \b, type MYISAM 23a5d223e6SXin LI>3 byte 10 \b, type MRG_MYISAM 24a5d223e6SXin LI>3 byte 11 \b, type BERKELEY_DB 25a5d223e6SXin LI>3 byte 12 \b, type INNODB 26a5d223e6SXin LI>3 byte 13 \b, type GEMINI 27a5d223e6SXin LI>3 byte 14 \b, type NDBCLUSTER 28a5d223e6SXin LI>3 byte 15 \b, type EXAMPLE_DB 29a5d223e6SXin LI>3 byte 16 \b, type CSV_DB 30a5d223e6SXin LI>3 byte 17 \b, type FEDERATED_DB 31a5d223e6SXin LI>3 byte 18 \b, type BLACKHOLE_DB 32a5d223e6SXin LI>3 byte 19 \b, type PARTITION_DB 33a5d223e6SXin LI>3 byte 20 \b, type BINLOG 34a5d223e6SXin LI>3 byte 21 \b, type SOLID 35a5d223e6SXin LI>3 byte 22 \b, type PBXT 36a5d223e6SXin LI>3 byte 23 \b, type TABLE_FUNCTION 37a5d223e6SXin LI>3 byte 24 \b, type MEMCACHE 38a5d223e6SXin LI>3 byte 25 \b, type FALCON 39a5d223e6SXin LI>3 byte 26 \b, type MARIA 40a5d223e6SXin LI>3 byte 27 \b, type PERFORMANCE_SCHEMA 41a5d223e6SXin LI>3 byte 127 \b, type DEFAULT 42a5d223e6SXin LI>0x0033 ulong x \b, MySQL version %d 43b6cee71dSXin LI0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file 44b6cee71dSXin LI>3 byte x Version %d 45b6cee71dSXin LI0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file 46b6cee71dSXin LI>3 byte x Version %d 47a5d223e6SXin LI0 belong&0xffffff00 0xfefe0700 MySQL MyISAM index file 48a5d223e6SXin LI>3 byte x Version %d 49a5d223e6SXin LI>14 beshort x \b, %d key parts 50a5d223e6SXin LI>16 beshort x \b, %d unique key parts 51a5d223e6SXin LI>18 byte x \b, %d keys 52a5d223e6SXin LI>28 bequad x \b, %lld records 53a5d223e6SXin LI>36 bequad x \b, %lld deleted records 54a5d223e6SXin LI0 belong&0xffffff00 0xfefe0800 MySQL MyISAM compressed data file 55a5d223e6SXin LI>3 byte x Version %d 56a5d223e6SXin LI0 belong&0xffffff00 0xfefe0900 MySQL Maria index file 57a5d223e6SXin LI>3 byte x Version %d 58a5d223e6SXin LI0 belong&0xffffff00 0xfefe0a00 MySQL Maria compressed data file 59a5d223e6SXin LI>3 byte x Version %d 60b6cee71dSXin LI0 belong&0xffffff00 0xfefe0c00 61b6cee71dSXin LI>4 string MACF MySQL Maria control file 62b6cee71dSXin LI>>3 byte x Version %d 63a5d223e6SXin LI0 string \376bin MySQL replication log, 64a5d223e6SXin LI>9 long x server id %d 65a5d223e6SXin LI>8 byte 1 66a5d223e6SXin LI>>13 long 69 \b, MySQL V3.2.3 67a5d223e6SXin LI>>>19 string x \b, server version %s 68a5d223e6SXin LI>>13 long 75 \b, MySQL V4.0.2-V4.1 69a5d223e6SXin LI>>>25 string x \b, server version %s 70a5d223e6SXin LI>8 byte 15 MySQL V5+, 71a5d223e6SXin LI>>25 string x server version %s 72a5d223e6SXin LI>4 string MARIALOG MySQL Maria transaction log file 73a5d223e6SXin LI>>3 byte x Version %d 74b6cee71dSXin LI 75b6cee71dSXin LI#------------------------------------------------------------------------------ 76b6cee71dSXin LI# iRiver H Series database file 77b6cee71dSXin LI# From Ken Guest <ken@linux.ie> 78b6cee71dSXin LI# As observed from iRivNavi.iDB and unencoded firmware 79b6cee71dSXin LI# 80b6cee71dSXin LI0 string iRivDB iRiver Database file 81b6cee71dSXin LI>11 string >\0 Version %s 82b6cee71dSXin LI>39 string iHP-100 [H Series] 83b6cee71dSXin LI 84b6cee71dSXin LI#------------------------------------------------------------------------------ 85b6cee71dSXin LI# SQLite database files 86b6cee71dSXin LI# Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg 87b6cee71dSXin LI# 88b6cee71dSXin LI# Version 1 used GDBM internally; its files cannot be distinguished 89b6cee71dSXin LI# from other GDBM files. 90b6cee71dSXin LI# 91898496eeSXin LI# Update: Joerg Jenderek 92898496eeSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/sqlite-2x.trid.xml 93898496eeSXin LI# Note: called "SQLite 2.x database" by TrID and "SQLite Database File Format" version 2 by DROID via PUID fmt/1135 94b6cee71dSXin LI# Version 2 used this format: 95b6cee71dSXin LI0 string **\ This\ file\ contains\ an\ SQLite SQLite 2.x database 96898496eeSXin LI!:mime application/x-sqlite2 97898496eeSXin LI# FileAttributesStore.db test.sqlite2 98898496eeSXin LI!:ext sqlite/sqlite2/db 99b6cee71dSXin LI 10043a5ec4eSXin LI# URL: https://en.wikipedia.org/wiki/SQLite 10143a5ec4eSXin LI# Reference: https://www.sqlite.org/fileformat.html 10243a5ec4eSXin LI# Update: Joerg Jenderek 103*ae316d1dSXin LI# TODO: missing extensions for Bentley Systems and Esri Spatially-Enabled Database 104b6cee71dSXin LI# Version 3 of SQLite allows applications to embed their own "user version" 105b6cee71dSXin LI# number in the database at offset 60. Later, SQLite added an "application id" 106b6cee71dSXin LI# at offset 68 that is preferred over "user version" for indicating the 107b6cee71dSXin LI# associated application. 108b6cee71dSXin LI# 10943a5ec4eSXin LI0 string SQLite\ format\ 3 11043a5ec4eSXin LI# skip DROID fmt-729-signature-id-1053.sqlite by checking for valid page size 11143a5ec4eSXin LI>16 ubeshort >0 SQLite 3.x 11243a5ec4eSXin LI# deprecated 11343a5ec4eSXin LI#!:mime application/x-sqlite3 1143e41d09dSXin LI# seldom found extension sqlite3 like in SyncData.sqlite3 1153e41d09dSXin LI# db 11643a5ec4eSXin LI# db3 like: AddrBook.db3 cgipcrvp.db3 11743a5ec4eSXin LI# https://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet%2freference%2fhelpdatabase 11843a5ec4eSXin LI# help is used for newer Maple help database 11943a5ec4eSXin LI# SQLite database weewx.sdb used by weather software weewx 12043a5ec4eSXin LI# https://www.weewx.com/docs/usersguide.htm 1213e41d09dSXin LI# Avira Antivir use extension "dbe" like in avevtdb.dbe, avguard_tchk.dbe 122*ae316d1dSXin LI# ide is used in storage.ide 123*ae316d1dSXin LI# localstorage like in Enigma2 http_itv.ard.de_0.localstorage 124*ae316d1dSXin LI# xowa like in home-html.user.xowa http://fileformats.archiveteam.org/wiki/XOWA 125*ae316d1dSXin LI# sqlar like in sqlar-src-4824e73896.sqlar http://fileformats.archiveteam.org/wiki/SQLite_Archive 126*ae316d1dSXin LI# sketch http://fileformats.archiveteam.org/wiki/Sketch 127*ae316d1dSXin LI# ftb http://fileformats.archiveteam.org/wiki/MyHeritage_Family_Tree_Builder 128*ae316d1dSXin LI# lrcat http://fileformats.archiveteam.org/wiki/Lightroom_catalog 129*ae316d1dSXin LI# without suffix like in "Diagnostic Data" 1303e41d09dSXin LI# Unfortunately extension sqlite also used for other databases starting with string 1313e41d09dSXin LI# "TTCONTAINER" like in tracks.sqlite contentconsumer.sqlite contentproducerrepository.sqlite 1323e41d09dSXin LI# and with string "ZV-zlib" in like extra.sqlite 133*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/maple-sqlite.trid.xml 13443a5ec4eSXin LI>>68 belong =0x5CDE09EF database 13543a5ec4eSXin LI# maple is used for Maple Workbook 13643a5ec4eSXin LI!:ext maple 137*ae316d1dSXin LI# From: Joerg Jenderek 138*ae316d1dSXin LI# URL: https://en.wikipedia.org/wiki/Audacity_(audio_editor) 139*ae316d1dSXin LI# http://fileformats.archiveteam.org/wiki/Audacity_Project_Format 140*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/aup3.trid.xml 141*ae316d1dSXin LI# Note: called "Audacity 3 Project" by TrID and "Audacity Project File" version 3.x by DROID via PUID fmt/1826 142*ae316d1dSXin LI# with user version 03000000h whereas older versions *.AUP are not SQLite based 143*ae316d1dSXin LI>>68 belong =0x41554459 database 144*ae316d1dSXin LI!:mime application/x-audacity-project+sqlite3 145*ae316d1dSXin LI!:ext aup3 146*ae316d1dSXin LI# From: Joerg Jenderek 147*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/TeXnicard 148*ae316d1dSXin LI# Reference: http://fileformats.archiveteam.org/wiki/TeXnicard_card_database 149*ae316d1dSXin LI# Note: no examples found 150*ae316d1dSXin LI>>68 belong =0x6A035744 database 151*ae316d1dSXin LI!:mime application/vnd.sqlite3 152*ae316d1dSXin LI!:ext db 153*ae316d1dSXin LI# Update: Joerg Jenderek 154*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/Fossil_repository_database 155*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fossil.trid.xml 156*ae316d1dSXin LI# Note: called "Fossil repository data base" by TrID 157*ae316d1dSXin LI>>68 belong =0x0F055111 database 158*ae316d1dSXin LI!:mime application/vnd.sqlite3 159*ae316d1dSXin LI!:ext fossil/fsl 160*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/Fossil_checkout_database 161*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fossil-checkout.trid.xml 162*ae316d1dSXin LI# Note: called "Fossil checkout data base" by TrID 163*ae316d1dSXin LI>>68 belong =0x0F055112 database 164*ae316d1dSXin LI!:mime application/vnd.sqlite3 165*ae316d1dSXin LI# name _FOSSIL_ on Windows or .fslckout else 166*ae316d1dSXin LI!:ext /fslckout 167*ae316d1dSXin LI# Update: Joerg Jenderek 168*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/Fossil_configuration_database 169*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fossil-config.trid.xml 170*ae316d1dSXin LI# Note: called "Fossil configuration data base" by TrID 171*ae316d1dSXin LI>>68 belong =0x0F055113 database 172*ae316d1dSXin LI!:mime application/vnd.sqlite3 173*ae316d1dSXin LI# %LOCALAPPDATA%\_fossil on Windows and ~/.fossil or fossil.db else 174*ae316d1dSXin LI!:ext /fossil/db 175*ae316d1dSXin LI# Update: Joerg Jenderek 176*ae316d1dSXin LI# URL: http://fileformats.archiveteam.org/wiki/GeoPackage 177*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/g/gpkg-v1.trid.xml 178*ae316d1dSXin LI# Note: called "GeoPackage (v1)" by TrID and "OGC GeoPackage" version 1.0-1.31 by DROID via PUID fmt/1700 179*ae316d1dSXin LI# with GP10 application id 180*ae316d1dSXin LI>>68 belong =0x47503130 database 181*ae316d1dSXin LI# https://www.iana.org/assignments/media-types/application/geopackage+sqlite3 182*ae316d1dSXin LI!:mime application/geopackage+sqlite3 183*ae316d1dSXin LI# https://github.com/opengeospatial/ets-gpkg12/blob/master/src/test/resources/gpkg/bluemarble.gpkg 184*ae316d1dSXin LI!:ext gpkg 185*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/g/gpkg-v12.trid.xml 186*ae316d1dSXin LI# Note: called "GeoPackage (v1.2)" by TrID and "OGC GeoPackage" version 1.0-1.31 by DROID via PUID fmt/1700 187*ae316d1dSXin LI# with GPKG application id 188*ae316d1dSXin LI>>68 belong =0x47504B47 database 189*ae316d1dSXin LI!:mime application/geopackage+sqlite3 190*ae316d1dSXin LI!:ext gpkg 191*ae316d1dSXin LI# Update: Joerg Jenderek 192*ae316d1dSXin LI# URL: https://github.com/mapbox/mbtiles-spec/tree/master 193*ae316d1dSXin LI# Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mbtiles-MPBX.trid.xml 194*ae316d1dSXin LI# Note: called "MBTiles tileset (MPBX)" by TrID and many samples without application id MPBX like 195*ae316d1dSXin LI# https://ftp.gwdg.de/pub/misc/openstreetmap/openseamap/charts/mbtiles/OSM-OpenCPN2-MagellanStrait.mbtiles 196*ae316d1dSXin LI>>68 belong =0x4D504258 database 197*ae316d1dSXin LI!:mime application/vnd.sqlite3 198*ae316d1dSXin LI!:ext mbtiles 199*ae316d1dSXin LI>>68 default x database 200*ae316d1dSXin LI!:mime application/vnd.sqlite3 201*ae316d1dSXin LI# no examples found with s3db sl3 suffix 202*ae316d1dSXin LI!:ext /sqlite/sqlite3/db/db3/dbe/sdb/help/ide/localstorage/sqlar/xowa/mbtiles 203*ae316d1dSXin LI# GRR: the line above only works if in ../../src/file.h FILE_MAGICSIZE ext[] are raised or you get 20443a5ec4eSXin LI>>60 belong =0x5f4d544e (Monotone source repository) 20543a5ec4eSXin LI# if no known user version then check for Application IDs with default clause 20643a5ec4eSXin LI>>60 belong !0x5f4d544e 20743a5ec4eSXin LI# The "Application ID" set by PRAGMA application_id 20843a5ec4eSXin LI>>>68 belong =0x0f055112 (Fossil checkout) 20943a5ec4eSXin LI>>>68 belong =0x0f055113 (Fossil global configuration) 21043a5ec4eSXin LI>>>68 belong =0x0f055111 (Fossil repository) 21143a5ec4eSXin LI>>>68 belong =0x42654462 (Bentley Systems BeSQLite Database) 21243a5ec4eSXin LI>>>68 belong =0x42654c6e (Bentley Systems Localization File) 21343a5ec4eSXin LI>>>68 belong =0x47504b47 (OGC GeoPackage file) 21443a5ec4eSXin LI# https://www.sqlite.org/src/artifact?ci=trunk&filename=magic.txt 21543a5ec4eSXin LI>>>68 belong =0x47503130 (OGC GeoPackage version 1.0 file) 21643a5ec4eSXin LI>>>68 belong =0x45737269 (Esri Spatially-Enabled Database) 21743a5ec4eSXin LI>>>68 belong =0x4d504258 (MBTiles tileset) 21843a5ec4eSXin LI# https://www.maplesoft.com/support/help/errors/view.aspx?path=Formats/Maple 21943a5ec4eSXin LI>>>68 belong =0x5CDE09EF (Maple Workbook) 220*ae316d1dSXin LI# AUDY Audacity Project File 221*ae316d1dSXin LI>>>68 belong =0x41554459 (Audacity Project) 222*ae316d1dSXin LI>>>68 belong =0x6A035744 (TeXnicard card database) 22343a5ec4eSXin LI# unknown application ID 22443a5ec4eSXin LI>>>68 default x 22543a5ec4eSXin LI>>>>68 belong !0 \b, application id %u 22643a5ec4eSXin LI# The "user version" as read and set by the user_version pragma like: 227*ae316d1dSXin LI# 1 2 4 5 7 9 10 25 36 43 53 400 416 131073 131074 131075 50331648 228b6cee71dSXin LI>>60 belong !0 \b, user version %d 229*ae316d1dSXin LI# expressed as hexadecimal because some people mention version number in hexadecimal with marking that item 230*ae316d1dSXin LI>>>60 belong x (%#x) 231*ae316d1dSXin LI# SQLITE_VERSION_NUMBER like: 0 3007014 3008011 3016002 3017000 3022000 3028000 3031001 3032003 3035005 23243a5ec4eSXin LI>>96 belong x \b, last written using SQLite version %d 23343a5ec4eSXin LI# database page size in bytes; a power of two between 512 and 32768, or 1 for 65536 23443a5ec4eSXin LI# like: 512 1024 often 4096 32768 235*ae316d1dSXin LI>>16 ubeshort !4096 \b, page size 236*ae316d1dSXin LI>>>16 ubeshort !1 %u 237*ae316d1dSXin LI>>>16 ubeshort =1 65536 23843a5ec4eSXin LI# File format write version. 1 for legacy; 2 for WAL; 0 for corruptDB.sqlite 23943a5ec4eSXin LI>>18 ubyte !1 \b, writer version %u 24043a5ec4eSXin LI# File format read version. 1 for legacy; 2 for WAL; 4 for corruptDB.sqlite 24143a5ec4eSXin LI>>19 ubyte !1 \b, read version %u 24243a5ec4eSXin LI# Bytes of unused "reserved" space at the end of each page. Usually 0 24343a5ec4eSXin LI>>20 ubyte !0 \b, unused bytes %u 24443a5ec4eSXin LI# maximum embedded payload fraction. Must be 64; 1 for corruptDB.sqlite 24543a5ec4eSXin LI>>21 ubyte !64 \b, maximum payload %u 24643a5ec4eSXin LI# Minimum embedded payload fraction. Must be 32; 1 for corruptDB.sqlite 24743a5ec4eSXin LI>>22 ubyte !32 \b, minimum payload %u 24843a5ec4eSXin LI# Leaf payload fraction. Must be 32; 0 for corruptDB.sqlite 24943a5ec4eSXin LI>>23 ubyte !32 \b, leaf payload %u 25043a5ec4eSXin LI# file change counter 25143a5ec4eSXin LI>>24 ubelong x \b, file counter %u 25243a5ec4eSXin LI# Size of the database file in pages 25343a5ec4eSXin LI>>28 ubelong x \b, database pages %u 25443a5ec4eSXin LI# page number of the first freelist trunk page like: 0 2 3 4 5 9 25543a5ec4eSXin LI# 10 13 14 15 16 17 18 19 23 36 39 46 50 136 190 217 307 505 516 561 883 1659 25643a5ec4eSXin LI>>32 ubelong !0 \b, 1st free page %u 25743a5ec4eSXin LI# total number of freelist pages 25843a5ec4eSXin LI>>36 ubelong !0 \b, free pages %u 25943a5ec4eSXin LI# The schema cookie like: 2 3 4 6 7 9 A D E F 13 14 1C 25 2A 2F 33 44 4B 53 5A 5F 62 86 87 8F 91 A8 26043a5ec4eSXin LI>>40 ubelong x \b, cookie %#x 26143a5ec4eSXin LI# the schema format number. Supported formats are 1 2 3 and often 4 26243a5ec4eSXin LI# 3328 for corruptDB.sqlite and 0 for 512 byte storage.sqlite (TorBrowser Firefox Thunderbird) 26343a5ec4eSXin LI>>44 ubelong x \b, schema %u 26443a5ec4eSXin LI# Suggested cache size like: 0 2000 26543a5ec4eSXin LI>>48 ubelong !0 \b, cache page size %u 26643a5ec4eSXin LI# The page number of the largest root b-tree page when in auto-vacuum or incremental-vacuum modes, or zero otherwise. 26743a5ec4eSXin LI>>52 ubelong !0 \b, largest root page %u 26843a5ec4eSXin LI# The database text encoding; a value of 1 means UTF-8; 2 means UTF-16le; 3 means UTF-16be 26943a5ec4eSXin LI#>>56 ubelong x \b, encoding %u 27043a5ec4eSXin LI>>56 ubelong x 27143a5ec4eSXin LI>>>56 ubelong =1 \b, UTF-8 27243a5ec4eSXin LI>>>56 ubelong =2 \b, UTF-16 little endian 27343a5ec4eSXin LI>>>56 ubelong =3 \b, UTF-16 big endian 27443a5ec4eSXin LI# 0 for corruptDB.sqlite and for storage.sqlite with database pages 1 (TorBrowser Firefox Thunderbird) 27543a5ec4eSXin LI# https://mozilla.github.io/firefox-browser-architecture/text/0010-firefox-data-stores.html 27643a5ec4eSXin LI>>>56 default x 27743a5ec4eSXin LI>>>>56 ubelong x \b, unknown %#x encoding 27843a5ec4eSXin LI# True (non-zero) for incremental-vacuum mode; false (zero) otherwiseqy 27943a5ec4eSXin LI>>64 ubelong !0 \b, vacuum mode %u 28043a5ec4eSXin LI# Reserved for expansion. Must be zero 28143a5ec4eSXin LI>>72 uquad !0 \b, reserved %#llx 28243a5ec4eSXin LI# The version-valid-for number like: 28343a5ec4eSXin LI# 1 2 3 4 C F 68h 95h 266h A99h 3DCDh B7CEh 28443a5ec4eSXin LI>>92 ubelong x \b, version-valid-for %u 285b6cee71dSXin LI 286b6cee71dSXin LI# SQLite Write-Ahead Log from SQLite version >= 3.7.0 28748c779cdSXin LI# https://www.sqlite.org/fileformat.html#walformat 288b6cee71dSXin LI0 belong&0xfffffffe 0x377f0682 SQLite Write-Ahead Log, 2893e41d09dSXin LI!:ext sqlite-wal/db-wal 290b6cee71dSXin LI>4 belong x version %d 291898496eeSXin LI# Summary: SQLite Write-Ahead-Log index (shared memory) 292898496eeSXin LI# From: Joerg Jenderek 293898496eeSXin LI# URL: http://fileformats.archiveteam.org/wiki/SQLite 294898496eeSXin LI# Reference: http://www.sqlite.org/draft/walformat.html#walidxfmt 295898496eeSXin LI# iVersion; WAL-index format version number; always 3007000=2DE218h 296898496eeSXin LI0 ulelong 0x002DE218 297898496eeSXin LI>0 use shm-le 298898496eeSXin LI# big endian variant not tested 299898496eeSXin LI0 ubelong 0x002DE218 300898496eeSXin LI>0 use \^shm-le 301898496eeSXin LI# show information about SQLite Write-Ahead-Log shared memory 302898496eeSXin LI0 name shm-le 303898496eeSXin LI>0 ulelong x SQLite Write-Ahead Log shared memory 304898496eeSXin LI#!:mime application/octet-stream 305898496eeSXin LI!:mime application/vnd.sqlite3 306898496eeSXin LI# db3-shm Acronis BackupAndRecovery F4CEEE47-042C-4828-95A0-DE44EC267A28.db3-shm 307898496eeSXin LI# dbx-shm probably Dropbox filecache.dbx-shm 308898496eeSXin LI# aup3-shm Audacity project tada.aup3-shm 309898496eeSXin LI# srd-shm Microsoft Windows StateRepository service StateRepository-Deployment.srd-shm StateRepository-Machine.srd-shm: 310898496eeSXin LI!:ext sqlite-shm/db-shm/db3-shm/dbx-shm/aup3-shm/srd-shm 311898496eeSXin LI# unused padding space; must be zero 312898496eeSXin LI>4 ulelong !0 \b, unused %x 313898496eeSXin LI# iChange; unsigned integer counter, incremented with each transaction 314898496eeSXin LI>8 ulelong x \b, counter %u 315898496eeSXin LI# isInit; the "isInit" flag; 1 when the shm file has been initialized 316898496eeSXin LI>12 ubyte !1 \b, not initialized %u 317898496eeSXin LI# bigEndCksum; true if the WAL file uses big-ending checksums; 0 if the WAL uses little-endian checksums 318898496eeSXin LI>13 ubyte !0 \b, checksum type %u 319898496eeSXin LI# szPage; database page size in bytes, or 1 if the page size is 65536 320898496eeSXin LI>14 uleshort !1 \b, page size %u 321898496eeSXin LI>14 uleshort =1 \b, page size 65536 322898496eeSXin LI# mxFrame; number of valid and committed frames in the WAL file 323898496eeSXin LI>16 ulelong x \b, %u frames 324898496eeSXin LI# nPage; size of the database file in pages 325898496eeSXin LI>20 ulelong x \b, %u pages 326898496eeSXin LI# aFrameCksum; checksum of the last frame in the WAL file 327898496eeSXin LI>24 ulelong x \b, frame checksum %#x 328898496eeSXin LI# aSalt; two salt value copied from the WAL file header in the byte-order of the WAL file; might be different from machine byte-order 329898496eeSXin LI>32 ulequad x \b, salt %#llx 330898496eeSXin LI# aCksum; checksum over bytes 0 through 39 of this header 331898496eeSXin LI>40 ulelong x \b, header checksum %#x 332898496eeSXin LI# a copy of bytes 0 through 47 of header 333898496eeSXin LI>48 ulelong !3007000 \b, iversion %u 334898496eeSXin LI# nBackfill; number of WAL frames that have already been backfilled into the database by prior checkpoints 335898496eeSXin LI>96 ulelong !0 \b, %u backfilled 336898496eeSXin LI# nBackfillAttempted; number of WAL frames that have attempted to be backfilled 337898496eeSXin LI>>128 ulelong x (%u attempts) 338898496eeSXin LI# read-mark[0..4]; five "read marks"; each read mark is a 32-bit unsigned integer 339898496eeSXin LI>100 ulelong !0 \b, read-mark[0] %#x 340898496eeSXin LI>104 ulelong x \b, read-mark[1] %#x 341898496eeSXin LI>108 ulelong !0xffffffff \b, read-mark[2] %#x 342898496eeSXin LI>112 ulelong !0xffffffff \b, read-mark[3] %#x 343898496eeSXin LI>116 ulelong !0xffffffff \b, read-mark[4] %#x 344898496eeSXin LI# unused space set aside for 8 file locks 345898496eeSXin LI>120 ulequad !0 \b, space %#llx 346898496eeSXin LI# unused space reserved for further expansion 347898496eeSXin LI>132 ulelong !0 \b, reserved %#x 348b6cee71dSXin LI 349b6cee71dSXin LI# SQLite Rollback Journal 35048c779cdSXin LI# https://www.sqlite.org/fileformat.html#rollbackjournal 351b6cee71dSXin LI0 string \xd9\xd5\x05\xf9\x20\xa1\x63\xd7 SQLite Rollback Journal 352b6cee71dSXin LI 353b6cee71dSXin LI# Panasonic channel list database svl.bin or svl.db added by Joerg Jenderek 3543e41d09dSXin LI# https://github.com/PredatH0r/ChanSort 3553e41d09dSXin LI0 string PSDB\0 Panasonic channel list DataBase 3563e41d09dSXin LI!:ext db/bin 3573e41d09dSXin LI#!:mime application/x-db-svl-panasonic 358b6cee71dSXin LI>126 string SQLite\ format\ 3 3593e41d09dSXin LI#!:mime application/x-panasonic-sqlite3 360b6cee71dSXin LI>>&-15 indirect x \b; contains 361a5d223e6SXin LI 36248c779cdSXin LI# H2 Database from https://www.h2database.com/ 363a5d223e6SXin LI0 string --\ H2\ 0.5/B\ --\ \n H2 Database file 364a2dfb722SXin LI 365a2dfb722SXin LI# DuckDB database file from https://duckdb.org 366a2dfb722SXin LI8 string DUCK DuckDB database file 367a2dfb722SXin LI>12 lequad x \b, version %lld 368a2dfb722SXin LI#>20 lequad x \b, flags %#llx 369a2dfb722SXin LI#>28 lequad x \b, flags %#llx 370