version 1.5, 2003/02/13 16:27:32
|
version 1.9, 2008/02/08 22:49:12
|
Line 50 do "chgk.cnf";
|
Line 50 do "chgk.cnf";
|
|
|
die "Undefined \$maxwsize! check your chgk.cnf" unless $maxwsize; |
die "Undefined \$maxwsize! check your chgk.cnf" unless $maxwsize; |
|
|
checktable('word2question','delete'); |
#checktable('word2question','delete'); |
|
|
checktable('nests','delete'); |
#checktable('nests','delete'); |
|
|
checktable('nf','delete'); |
#checktable('nf','delete'); |
|
|
|
|
print "Creating word2question table...\n"; |
print "Creating word2question table...\n"; |
|
mydo ("DROP TABLE IF EXISTS word2question"); |
mydo("CREATE TABLE word2question ( |
mydo("CREATE TABLE word2question ( |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
KEY idkey (id), |
KEY idkey (id), |
word INT UNSIGNED NOT NULL, |
word INT UNSIGNED NOT NULL, |
KEY wordkey (word), |
KEY wordkey (word), |
questions MEDIUMBLOB |
questions MEDIUMBLOB |
)" |
) type=MyISAM" |
) |
) |
|
|
or die "Can't create WORD2QUESTION table: $!\n"; |
or die "Can't create WORD2QUESTION table: $!\n"; |
|
|
print "Creating nests table...\n"; |
print "Creating nests table...\n"; |
|
mydo ("DROP TABLE IF EXISTS nests"); |
mydo("CREATE TABLE nests ( |
mydo("CREATE TABLE nests ( |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
KEY idkey (id), |
KEY idkey (id), |
w1 CHAR($maxwsize) BINARY NOT NULL, |
w1 CHAR($maxwsize) CHARACTER SET koi8r COLLATE koi8r_general_ci NOT NULL, |
KEY w1key (w1), |
KEY w1key (w1), |
w2 INT UNSIGNED NOT NULL, |
w2 INT UNSIGNED NOT NULL, |
KEY w2key (w2) |
KEY w2key (w2) |
)") |
) type=MyISAM") |
|
|
or die "Can't create NESTS table: $!\n"; |
or die "Can't create NESTS table: $!\n"; |
|
|
Line 88 print "Creating nests table...\n";
|
Line 88 print "Creating nests table...\n";
|
|
|
print "Creating nf table...\n"; |
print "Creating nf table...\n"; |
|
|
|
mydo ("DROP TABLE IF EXISTS nf"); |
|
|
mydo("CREATE TABLE nf ( |
mydo("CREATE TABLE nf ( |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, |
KEY idkey (id), |
KEY idkey (id), |
word CHAR(30) BINARY NOT NULL, |
word CHAR(30) CHARACTER SET koi8r COLLATE koi8r_general_ci NOT NULL, |
KEY wordkey (word), |
KEY wordkey (word), |
flag CHAR(5), |
flag CHAR(5), |
number INT UNSIGNED |
number INT UNSIGNED |
)") or die "Can't create NF table: $!\n"; |
) type=MyISAM") or die "Can't create NF table: $!\n"; |
|
|
|
|
mydo("UPDATE Questions SET ProcessedBySearch=NULL"); |
mydo("UPDATE Questions SET ProcessedBySearch=NULL"); |