1284194Sdelphij
2284194Sdelphij#------------------------------------------------------------------------------
3284194Sdelphij# $File: sql,v 1.15 2014/04/30 21:41:02 christos Exp $
4284194Sdelphij# sql:  file(1) magic for SQL files
5284194Sdelphij#
6284194Sdelphij# From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
7284194Sdelphij# Recognize some MySQL files.
8284194Sdelphij# Elan Ruusamae <glen@delfi.ee>, added MariaDB signatures
9284194Sdelphij# from https://bazaar.launchpad.net/~maria-captains/maria/5.5/view/head:/support-files/magic
10284194Sdelphij#
11284194Sdelphij0	beshort			0xfe01		MySQL table definition file
12284194Sdelphij>2	byte			x		Version %d
13284194Sdelphij0	belong&0xffffff00	0xfefe0700	MySQL MyISAM index file
14284194Sdelphij>3	byte			x		Version %d
15284194Sdelphij0	belong&0xffffff00	0xfefe0800	MySQL MyISAM compressed data file
16284194Sdelphij>3	byte			x		Version %d
17284194Sdelphij0	belong&0xffffff00	0xfefe0900	MySQL Maria index file
18284194Sdelphij>3	byte			x		Version %d
19284194Sdelphij0	belong&0xffffff00	0xfefe0A00	MySQL Maria compressed data file
20284194Sdelphij>3	byte			x		Version %d
21284194Sdelphij0	belong&0xffffff00	0xfefe0500	MySQL ISAM index file
22284194Sdelphij>3	byte			x		Version %d
23284194Sdelphij0	belong&0xffffff00	0xfefe0600	MySQL ISAM compressed data file
24284194Sdelphij>3	byte			x		Version %d
25284194Sdelphij0	string			\376bin		MySQL replication log
26284194Sdelphij0	belong&0xffffff00	0xfefe0b00
27284194Sdelphij>4	string			MARIALOG	MySQL Maria transaction log file
28284194Sdelphij>>3	byte			x		Version %d
29284194Sdelphij0	belong&0xffffff00	0xfefe0c00
30284194Sdelphij>4	string			MACF		MySQL Maria control file
31284194Sdelphij>>3	byte			x		Version %d
32284194Sdelphij
33284194Sdelphij#------------------------------------------------------------------------------
34284194Sdelphij# iRiver H Series database file 
35284194Sdelphij# From Ken Guest <ken@linux.ie>
36284194Sdelphij# As observed from iRivNavi.iDB and unencoded firmware
37284194Sdelphij#
38284194Sdelphij0   string		iRivDB	iRiver Database file
39284194Sdelphij>11  string	>\0	Version %s
40284194Sdelphij>39  string		iHP-100	[H Series]
41284194Sdelphij
42284194Sdelphij#------------------------------------------------------------------------------
43284194Sdelphij# SQLite database files
44284194Sdelphij# Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg
45284194Sdelphij#
46284194Sdelphij# Version 1 used GDBM internally; its files cannot be distinguished
47284194Sdelphij# from other GDBM files.
48284194Sdelphij#
49284194Sdelphij# Version 2 used this format:
50284194Sdelphij0	string	**\ This\ file\ contains\ an\ SQLite  SQLite 2.x database
51284194Sdelphij
52284194Sdelphij# Version 3 of SQLite allows applications to embed their own "user version"
53284194Sdelphij# number in the database at offset 60.  Later, SQLite added an "application id"
54284194Sdelphij# at offset 68 that is preferred over "user version" for indicating the
55284194Sdelphij# associated application.
56284194Sdelphij#
57284194Sdelphij0   string  SQLite\ format\ 3
58284194Sdelphij>60 belong  =0x5f4d544e  Monotone source repository - SQLite3 database
59284194Sdelphij>68 belong  =0x0f055112  Fossil checkout - SQLite3 database
60284194Sdelphij>68 belong  =0x0f055113  Fossil global configuration - SQLite3 database
61284194Sdelphij>68 belong  =0x0f055111  Fossil repository - SQLite3 database
62284194Sdelphij>68 belong  =0x42654462  Bentley Systems BeSQLite Database - SQLite3 database
63284194Sdelphij>68 belong  =0x42654c6e  Bentley Systems Localization File - SQLite3 database
64284194Sdelphij>68 belong  =0x47504b47  OGC GeoPackage file - SQLite3 database
65284194Sdelphij>68 default x            SQLite 3.x database
66284194Sdelphij>>68 belong  !0          \b, application id %u
67284194Sdelphij>>60 belong  !0          \b, user version %d
68284194Sdelphij
69284194Sdelphij# SQLite Write-Ahead Log from SQLite version >= 3.7.0
70284194Sdelphij# http://www.sqlite.org/fileformat.html#walformat
71284194Sdelphij0	belong&0xfffffffe	0x377f0682	SQLite Write-Ahead Log,
72284194Sdelphij>4	belong	x	version %d
73284194Sdelphij
74284194Sdelphij# SQLite Rollback Journal
75284194Sdelphij# http://www.sqlite.org/fileformat.html#rollbackjournal
76284194Sdelphij0	string	\xd9\xd5\x05\xf9\x20\xa1\x63\xd7	SQLite Rollback Journal
77284194Sdelphij
78284194Sdelphij# Panasonic channel list database svl.bin or svl.db added by Joerg Jenderek
79284194Sdelphij# http://www.ullrich.es/job/service-menue/panasonic/panasonic-sendersortierung-sat-am-pc/
80284194Sdelphij# pceditor_V2003.jar
81284194Sdelphij0	string		PSDB\0			Panasonic channel list database
82284194Sdelphij>126	string		SQLite\ format\ 3	
83284194Sdelphij>>&-15	indirect	x			\b; contains 
84