PiRSquared17 / jwpl

Automatically exported from code.google.com/p/jwpl
0 stars 1 forks source link

[RevisionMachine] DiffTool should allow to create data files instead of SQL dumps #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Importing SQL dumps is slow. DiffTool should produce data files that can be 
imported with the "load data local infile" command.

Original issue reported on code.google.com by oliver.ferschke on 20 Jan 2012 at 4:40

GoogleCodeExporter commented 9 years ago
Implemented in r503

Data files can be loaded like this:
load data local infile '/path/to/file.csv' into table revisions
fields terminated by ','
optionally enclosed by '"'
lines terminated by ';'
(PrimaryKey,FullRevisionID,RevisionCounter,RevisionID,ArticleID,Timestamp,Revisi
on,Comment,Minor,ContributorName,ContributorId,ContributorIsRegistered);

Table create statements are:

CREATE TABLE IF NOT EXISTS revisions (
PrimaryKey INT UNSIGNED NOT NULL AUTO_INCREMENT, 
FullRevisionID INTEGER UNSIGNED NOT NULL, 
RevisionCounter INTEGER UNSIGNED NOT NULL, 
RevisionID INTEGER UNSIGNED NOT NULL, 
ArticleID INTEGER UNSIGNED NOT NULL, 
Timestamp BIGINT NOT NULL, 
Revision MEDIUMTEXT NOT NULL, 
Comment MEDIUMTEXT, 
Minor TINYINT NOT NULL, 
ContributorName TEXT NOT NULL, 
ContributorId INTEGER UNSIGNED, 
ContributorIsRegistered TINYINT NOT NULL, 
PRIMARY KEY(PrimaryKey)
) TYPE = MyISAM DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

Original comment by oliver.ferschke on 20 Jan 2012 at 4:40

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 16 Feb 2012 at 1:20