Finish issue #262 - svndbadmin doesn't commit data to MySQL InnoDB tables

* lib/cvsdb.py
  (CheckinDatabase.AddCommit): Set plus_count and minus_count
    explicitly to '0', which seems to be required for some folks'
    MySQL installations.

* bin/make-database
  Explicitly declare that we want tables of type "MyISAM".

git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1500 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/options-overhaul
cmpilato 2007-01-05 23:05:14 +00:00
parent cf862e4e68
commit 04cb1cd74d
2 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ CREATE TABLE branches (
branch varchar(64) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE branch (branch)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS checkins;
CREATE TABLE checkins (
@ -62,7 +62,7 @@ CREATE TABLE checkins (
KEY dirid (dirid),
KEY fileid (fileid),
KEY branchid (branchid)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS descs;
CREATE TABLE descs (
@ -71,7 +71,7 @@ CREATE TABLE descs (
hash bigint(20) DEFAULT '0' NOT NULL,
PRIMARY KEY (id),
KEY hash (hash)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS dirs;
CREATE TABLE dirs (
@ -79,7 +79,7 @@ CREATE TABLE dirs (
dir varchar(255) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE dir (dir)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS files;
CREATE TABLE files (
@ -87,7 +87,7 @@ CREATE TABLE files (
file varchar(255) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE file (file)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS people;
CREATE TABLE people (
@ -95,7 +95,7 @@ CREATE TABLE people (
who varchar(128) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE who (who)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS repositories;
CREATE TABLE repositories (
@ -103,7 +103,7 @@ CREATE TABLE repositories (
repository varchar(64) binary DEFAULT '' NOT NULL,
PRIMARY KEY (id),
UNIQUE repository (repository)
);
) TYPE=MyISAM;
DROP TABLE IF EXISTS tags;
CREATE TABLE tags (
@ -117,7 +117,7 @@ CREATE TABLE tags (
KEY dirid (dirid),
KEY fileid (fileid),
KEY branchid (branchid)
);
) TYPE=MyISAM;
"""
if __name__ == "__main__":

View File

@ -249,8 +249,8 @@ class CheckinDatabase:
revision = commit.GetRevision()
sticky_tag = "NULL"
branch_id = self.GetBranchID(commit.GetBranch())
plus_count = commit.GetPlusCount()
minus_count = commit.GetMinusCount()
plus_count = commit.GetPlusCount() or '0'
minus_count = commit.GetMinusCount() or '0'
description_id = self.GetDescriptionID(commit.GetDescription())
sql = "REPLACE INTO checkins"\