xref: /minix3/external/bsd/file/dist/magic/magdir/sql (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1ef01931fSBen Gras
2ef01931fSBen Gras#------------------------------------------------------------------------------
3*0a6a1f1dSLionel Sambuc# $File: sql,v 1.15 2014/04/30 21:41:02 christos Exp $
4ef01931fSBen Gras# sql:  file(1) magic for SQL files
5ef01931fSBen Gras#
6ef01931fSBen Gras# From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
7ef01931fSBen Gras# Recognize some MySQL files.
884d9c625SLionel Sambuc# Elan Ruusamae <glen@delfi.ee>, added MariaDB signatures
984d9c625SLionel Sambuc# from https://bazaar.launchpad.net/~maria-captains/maria/5.5/view/head:/support-files/magic
10ef01931fSBen Gras#
11ef01931fSBen Gras0	beshort			0xfe01		MySQL table definition file
12ef01931fSBen Gras>2	byte			x		Version %d
1384d9c625SLionel Sambuc0	belong&0xffffff00	0xfefe0700	MySQL MyISAM index file
14ef01931fSBen Gras>3	byte			x		Version %d
1584d9c625SLionel Sambuc0	belong&0xffffff00	0xfefe0800	MySQL MyISAM compressed data file
1684d9c625SLionel Sambuc>3	byte			x		Version %d
1784d9c625SLionel Sambuc0	belong&0xffffff00	0xfefe0900	MySQL Maria index file
1884d9c625SLionel Sambuc>3	byte			x		Version %d
1984d9c625SLionel Sambuc0	belong&0xffffff00	0xfefe0A00	MySQL Maria compressed data file
20ef01931fSBen Gras>3	byte			x		Version %d
21ef01931fSBen Gras0	belong&0xffffff00	0xfefe0500	MySQL ISAM index file
22ef01931fSBen Gras>3	byte			x		Version %d
23ef01931fSBen Gras0	belong&0xffffff00	0xfefe0600	MySQL ISAM compressed data file
24ef01931fSBen Gras>3	byte			x		Version %d
25ef01931fSBen Gras0	string			\376bin		MySQL replication log
2684d9c625SLionel Sambuc0	belong&0xffffff00	0xfefe0b00
2784d9c625SLionel Sambuc>4	string			MARIALOG	MySQL Maria transaction log file
2884d9c625SLionel Sambuc>>3	byte			x		Version %d
2984d9c625SLionel Sambuc0	belong&0xffffff00	0xfefe0c00
3084d9c625SLionel Sambuc>4	string			MACF		MySQL Maria control file
3184d9c625SLionel Sambuc>>3	byte			x		Version %d
32ef01931fSBen Gras
33ef01931fSBen Gras#------------------------------------------------------------------------------
34ef01931fSBen Gras# iRiver H Series database file
35ef01931fSBen Gras# From Ken Guest <ken@linux.ie>
36ef01931fSBen Gras# As observed from iRivNavi.iDB and unencoded firmware
37ef01931fSBen Gras#
38ef01931fSBen Gras0   string		iRivDB	iRiver Database file
39ef01931fSBen Gras>11  string	>\0	Version %s
40ef01931fSBen Gras>39  string		iHP-100	[H Series]
41ef01931fSBen Gras
42ef01931fSBen Gras#------------------------------------------------------------------------------
43ef01931fSBen Gras# SQLite database files
44ef01931fSBen Gras# Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg
45ef01931fSBen Gras#
46ef01931fSBen Gras# Version 1 used GDBM internally; its files cannot be distinguished
47ef01931fSBen Gras# from other GDBM files.
48ef01931fSBen Gras#
49ef01931fSBen Gras# Version 2 used this format:
50ef01931fSBen Gras0	string	**\ This\ file\ contains\ an\ SQLite  SQLite 2.x database
51ef01931fSBen Gras
52ef01931fSBen Gras# Version 3 of SQLite allows applications to embed their own "user version"
53*0a6a1f1dSLionel Sambuc# number in the database at offset 60.  Later, SQLite added an "application id"
54*0a6a1f1dSLionel Sambuc# at offset 68 that is preferred over "user version" for indicating the
55*0a6a1f1dSLionel Sambuc# associated application.
56*0a6a1f1dSLionel Sambuc#
57ef01931fSBen Gras0   string  SQLite\ format\ 3
58*0a6a1f1dSLionel Sambuc>60 belong  =0x5f4d544e  Monotone source repository - SQLite3 database
59*0a6a1f1dSLionel Sambuc>68 belong  =0x0f055112  Fossil checkout - SQLite3 database
60*0a6a1f1dSLionel Sambuc>68 belong  =0x0f055113  Fossil global configuration - SQLite3 database
61*0a6a1f1dSLionel Sambuc>68 belong  =0x0f055111  Fossil repository - SQLite3 database
62*0a6a1f1dSLionel Sambuc>68 belong  =0x42654462  Bentley Systems BeSQLite Database - SQLite3 database
63*0a6a1f1dSLionel Sambuc>68 belong  =0x42654c6e  Bentley Systems Localization File - SQLite3 database
64*0a6a1f1dSLionel Sambuc>68 belong  =0x47504b47  OGC GeoPackage file - SQLite3 database
65*0a6a1f1dSLionel Sambuc>68 default x            SQLite 3.x database
66*0a6a1f1dSLionel Sambuc>>68 belong  !0          \b, application id %u
67*0a6a1f1dSLionel Sambuc>>60 belong  !0          \b, user version %d
68*0a6a1f1dSLionel Sambuc
69*0a6a1f1dSLionel Sambuc# SQLite Write-Ahead Log from SQLite version >= 3.7.0
70*0a6a1f1dSLionel Sambuc# http://www.sqlite.org/fileformat.html#walformat
71*0a6a1f1dSLionel Sambuc0	belong&0xfffffffe	0x377f0682	SQLite Write-Ahead Log,
72*0a6a1f1dSLionel Sambuc>4	belong	x	version %d
73*0a6a1f1dSLionel Sambuc
74*0a6a1f1dSLionel Sambuc# SQLite Rollback Journal
75*0a6a1f1dSLionel Sambuc# http://www.sqlite.org/fileformat.html#rollbackjournal
76*0a6a1f1dSLionel Sambuc0	string	\xd9\xd5\x05\xf9\x20\xa1\x63\xd7	SQLite Rollback Journal
7784d9c625SLionel Sambuc
7884d9c625SLionel Sambuc# Panasonic channel list database svl.bin or svl.db added by Joerg Jenderek
7984d9c625SLionel Sambuc# http://www.ullrich.es/job/service-menue/panasonic/panasonic-sendersortierung-sat-am-pc/
8084d9c625SLionel Sambuc# pceditor_V2003.jar
8184d9c625SLionel Sambuc0	string		PSDB\0			Panasonic channel list database
8284d9c625SLionel Sambuc>126	string		SQLite\ format\ 3
8384d9c625SLionel Sambuc>>&-15	indirect	x			\b; contains
84