LXR Cross Referencer Git repo
Brought to you by:
ajlittoz
/* Read this into mysql with "\. initdb-mysql" when logged in as root to delete the old lxr database and create a new */ drop database if exists lxr; create database lxr; use lxr; /* symnum filenum */ create table lxr_files ( filename char(255) binary not null, revision char(255) binary not null, fileid int not null auto_increment, primary key (fileid) /*, unique (filename, revision) */ ); create table lxr_symbols ( symname char(255) binary not null, symid int not null auto_increment, primary key (symid), unique (symname) ); create table lxr_indexes ( symid int not null references lxr_symbols, fileid int not null references lxr_files, line int not null, langid tinyint not null references lxr_declarations, type smallint not null references lxr_declarations, relsym int references lxr_symbols ); create table lxr_releases (fileid int not null references lxr_files, release char(255) binary not null, primary key (fileid,release) ); create table lxr_useage (fileid int not null references lxr_files, line int not null, symid int not null references lxr_symbols ); create table lxr_status (fileid int not null references lxr_files, status tinyint not null, primary key (fileid) ); create table lxr_declarations (declid smallint not null auto_increment, langid tinyint not null, declaration char(255) not null, primary key (declid, langid) ); create index lxr_indexindex on lxr_indexes (symid) ; create unique index lxr_symbolindex on lxr_symbols (symname) ; create index lxr_useageindex on lxr_useage (symid) ; create index lxr_filelookup on lxr_files (filename); grant all on lxr.* to lxr@localhost;