--- db/prgsrc/mkRS.pl 2001/10/31 04:38:03 1.3 +++ db/prgsrc/mkRS.pl 2005/07/05 23:58:11 1.8 @@ -32,6 +32,7 @@ cicles_number=1. =cut + use locale; use DBI; use POSIX qw (locale_h); @@ -39,9 +40,13 @@ use lib "../lib"; use chgkfiles; use dbchgk; my $minstop=2000; -open (STDERR,">errors"); -do "../bin/common.pl"; -do "../bin/chgk.cnf"; + +my $DUMPDIR = $ENV{DUMPDIR} || "../dump"; + +open (STDERR,">$DUMPDIR/errors"); +do "common.pl"; +do "chgk.cnf"; + die "Undefined \$maxwsize! check your chgk.cnf" unless $maxwsize; @@ -60,7 +65,7 @@ print "Creating word2question table...\n word INT UNSIGNED NOT NULL, KEY wordkey (word), questions MEDIUMBLOB - )" + ) type=MyISAM" ) or die "Can't create WORD2QUESTION table: $!\n"; @@ -74,7 +79,7 @@ print "Creating nests table...\n"; KEY w1key (w1), w2 INT UNSIGNED NOT NULL, KEY w2key (w2) - )") + ) type=MyISAM") or die "Can't create NESTS table: $!\n"; @@ -91,7 +96,7 @@ mydo("CREATE TABLE nf ( KEY wordkey (word), flag CHAR(5), 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");