svnno****@sourc*****
svnno****@sourc*****
2008年 2月 16日 (土) 16:19:52 JST
Revision: 506 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=506 Author: tach Date: 2008-02-16 16:19:52 +0900 (Sat, 16 Feb 2008) Log Message: ----------- Fix typo and DROP TABLE Modified Paths: -------------- slashjp/trunk/plugins/Stats/Stats.pm -------------- next part -------------- Modified: slashjp/trunk/plugins/Stats/Stats.pm =================================================================== --- slashjp/trunk/plugins/Stats/Stats.pm 2008-02-14 12:57:35 UTC (rev 505) +++ slashjp/trunk/plugins/Stats/Stats.pm 2008-02-16 07:19:52 UTC (rev 506) @@ -94,6 +94,7 @@ $self->sqlDo("DROP TABLE IF EXISTS accesslog_temp_rss"); $self->sqlDo("DROP TABLE IF EXISTS accesslog_temp_host_addr"); + $self->sqlDo("DROP TABLE IF EXISTS accesslog_build_uidip"); $self->sqlDo("DROP TABLE IF EXISTS accesslog_build_unique_uid"); $self->sqlDo("CREATE TABLE accesslog_temp_host_addr (host_addr char(32) NOT NULL, anon ENUM('no','yes') NOT NULL DEFAULT 'yes', PRIMARY KEY (host_addr, anon)) TYPE = InnoDB"); $self->sqlDo("CREATE TABLE accesslog_build_uidip (uidip varchar(32) NOT NULL, op varchar(254) NOT NULL, PRIMARY KEY (uidip, op), INDEX (op)) TYPE = InnoDB"); @@ -237,7 +238,7 @@ ); return undef unless $self->_do_insert_select( - "accecsslog_build_uidip", + "accesslog_build_uidip", "IF(uid = $constants->{anonymous_coward_uid}, uid, host_addr), op", "accesslog_temp_rss", "", @@ -1122,7 +1123,7 @@ my $tn = 0; for my $hit (@$hit_ar) { ++$tn; - push @tables, "accecsslog_build_uidip AS a$tn"; + push @tables, "accesslog_build_uidip AS a$tn"; push @where, "a$tn.uidip = a1.uidip" if $tn > 1; push @where, "a$tn.op=" . $self->sqlQuote($hit); } @@ -1130,7 +1131,7 @@ my $tnprev = $tn; ++$tn; my $notlist = join ',', map { $self->sqlQuote($_) } @$nohit_ar; - $tables[-1] .= " LEFT JOIN accecsslog_build_uidip AS a$tn + $tables[-1] .= " LEFT JOIN accesslog_build_uidip AS a$tn ON (a$tn.uidip=a$tnprev.uidip AND a$tn.op IN ($notlist))"; push @where, "a$tn.op IS NULL"; }