mirror of
https://github.com/facebook/sapling.git
synced 2024-10-15 19:29:13 +03:00
0e6b93a0e0
Summary: - Add support for RocksDB engine (developed as a drop in replacement for innodb) to hgsql to allow new xdb.hgsql.1-10 shards to host hg repos - Prefer MySQL test DBs in same region - Run all hgsql unit tests also for RocksDB engine - Allow for nested ifs to make that possible (downside if you switch off rockdb tests, innodb tests are run twice) Reviewed By: quark-zju Differential Revision: D7014064 fbshipit-source-id: 073c36176aa7eaf74252ef33c3f47da594920b28
26 lines
888 B
SQL
26 lines
888 B
SQL
CREATE TABLE `revisions` (
|
|
`repo` varbinary(64) NOT NULL,
|
|
`path` varbinary(512) NOT NULL,
|
|
`chunk` int(10) unsigned NOT NULL,
|
|
`chunkcount` int(10) unsigned NOT NULL,
|
|
`linkrev` int(10) unsigned NOT NULL,
|
|
`rev` int(10) unsigned NOT NULL,
|
|
`node` binary(40) NOT NULL,
|
|
`entry` binary(64) NOT NULL,
|
|
`data0` varbinary(1) NOT NULL,
|
|
`data1` longblob NOT NULL,
|
|
`createdtime` datetime NOT NULL,
|
|
PRIMARY KEY (`repo`,`path`,`rev`,`chunk`),
|
|
KEY `linkrevs` (`repo`,`linkrev`)
|
|
) ENGINE=RocksDB DEFAULT CHARSET=latin1;
|
|
|
|
CREATE TABLE `revision_references` (
|
|
`autoid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`repo` varbinary(64) NOT NULL,
|
|
`namespace` varbinary(32) NOT NULL,
|
|
`name` varbinary(256) DEFAULT NULL,
|
|
`value` varbinary(40) NOT NULL,
|
|
PRIMARY KEY (`autoid`),
|
|
UNIQUE KEY `bookmarkindex` (`repo`,`namespace`,`name`)
|
|
) ENGINE=RocksDB DEFAULT CHARSET=latin1;
|