database error

Post Reply
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

database error

Post by sourceuno »

I'm trying to select a specific record in a table and I get the following error:

005 Bad size 47378 for column URL at offset 0x24 in recid0x13b4aof \boarddb\sites.tbl in the function fbuftofld
100 Error in data, file \boarddb\sites.tbl, offset 0x13B4A

Does this mean my table is corrupt?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

database error

Post by Kai »

Possibly. What is the exact query you're using, and what exact indexes exist on the table? Also, what is the output of texis -version?
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

database error

Post by sourceuno »

I created a table called sites that has indexes on 3 fields. I try to do the following query which gives me the error mentioned earlier:

select * from sites where URL like '%anysite%'

I do have an index on the field URL. I tried dropping the indexes and running the query, but still get the error. Here are the results from texis -version:

Commercial Version 3.01.984682785 of Mar 15, 2001 (i686-intel-winnt)
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

database error

Post by mark »

I'll let kai followup on the info he asked for, but I'm sure you don't want
like '%anysite%'
It should be
like 'anysite'
or
matches '%anysite%'
or most likely
matches 'anysite%'
which can take advantage of a regular index.

like wants a metamorph index and % has an entirely different meaning for like than for matches. Please see the manual sections about each.
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

database error

Post by sourceuno »

I get the error on pretty much any query that returns data. If I run a query that I know won't return data, the error doesn't show.
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

database error

Post by Kai »

It's likely the table has been corrupted, especially if you get the error when searching with no indexes. Copy the table into a new one and then rename it back:

cd /your/database
tsql "create table newtable as select * from sites"
tsql "drop table sites"
mv newtable.tbl sites.tbl
addtable sites.tbl
tsql "drop table newtable"

This will copy as much readable data as possible from sites.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

database error

Post by mark »

I wasn't addressing the error at all. I was only talking about proper queries once the error is fixed.
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

database error

Post by sourceuno »

After renaming the table to sites.tbl, I tried the addtable program and I get the following error:

002 Could not open table
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

database error

Post by sourceuno »

Ignore the last message. I closed my DOS window and opened a new one and it worked. Thanks.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

database error

Post by mark »

Are you running as the correct user?
What are the ownership and perms on the table vs. who you are running as?
What was your complete addtable command line?
Post Reply