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(); |