/[webpac]/trunk/index_DBI_cache.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/index_DBI_cache.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 88 by dpavlin, Sat Jul 12 16:02:15 2003 UTC revision 93 by dpavlin, Sun Jul 13 14:44:03 2003 UTC
# Line 99  sub insert { Line 99  sub insert {
99          $Table{$field}++;          $Table{$field}++;
100    
101          #$sth_cache{$field."select"}->execute($index_data) || die "cache: $field select; ".$self->{dbh}->errstr();          #$sth_cache{$field."select"}->execute($index_data) || die "cache: $field select; ".$self->{dbh}->errstr();
102    
103            # XXX for some strange reason, it seems that some entries in my
104            # database produce strings which start with null byte. I suspect
105            # this to be bug in OpenIsis 0.9.0.
106            # This should fix it..
107            $index_data =~ s/^[^\w]+//;
108          $index_data = substr($index_data,0,255);          $index_data = substr($index_data,0,255);
109    
110          my $uc = uc($index_data);          my $uc = uc($index_data);
111          if (! $c_table->{$field}->{$ident}->{$uc}) {          if (! $c_table->{$field}->{$ident}->{$uc}) {
112                  $sth_cache{$field."insert"}->execute($index_data,$ident,0) || warn "cache: $field insert ($index_data,$ident); ".$self->{dbh}->errstr();                  $sth_cache{$field."insert"}->execute($index_data,$ident,0) || warn "cache: $field insert ($index_data,$ident); ".$self->{dbh}->errstr();

Legend:
Removed from v.88  
changed lines
  Added in v.93

  ViewVC Help
Powered by ViewVC 1.1.26