Subject Re: [firebird-support] varchar(2048) holds 1012
Author kyle@nevadacitysoftware.com
Hi,

I did recently do a restore with a page size of 8192, and had always used a smaller
page size before. Alan suggesteed the possibility of a problem there, and that does co-
incide with my experience. I can do a restore with the smaller page size later and see
if there is a difference.

Regarding monitoring, I have a simple log in my application (in C++) and check the
CString length before sending, as well as printing out the query string, its detected
length, and other related data. All seems normal. But I'm not sure what monitoring tool
you might be referring to, it may tell more?

Thanks,

Kyle


On 1 Jan 2004, at 12:35, Helen Borrie wrote:

> At 04:06 PM 31/12/2003 -0800, you wrote:
> >Hello,
> >
> >Using FB 1.0
> >
> >I have a varchar(2048) that holds only about 1012 actual characters. If I
> >try to insert
> >more than that It fails with:
> >
> >First Err: arithmetic exception, numeric overflow, or string truncation
> >SqlCode: Arithmetic overflow or division by zero has occurred.
> >
> >The particular string consisted of numerals "12345670123etc", but of
> >course that
> >should not make any difference.
> >
> >Is this to be expected? I am pretty sure that I have other tables with
> >varchar(2048)
> >which will allow inserts of 2000 chars. Or am I losing my mind :)
>
> Varchar(2048) should accept 2048 characters and overflow at 2049 or
> higher. You should not be getting an arithmetic error on *storing* a
> varchar. Have you tried explicitly casting your values as varchar(2048)?
>
> Are you certain that you are not passing an expression (function call,
> etc.) that might be causing the exception? The ib_udf string functions
> have a known bug that none of them will accept strings longer than 80
> bytes, making them useless for processing longer strings.
>
> It seems this problem would benefit from putting a SQL monitor on the
> interface, to see what the application is passing.
>
> /heLen
>
>

http://pearz.com - A new whole-person approach to online dating