Re: [Sqlrelay-discussion] ORA-01480 with long CLOBs?
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2007-10-12 15:11:53
|
On Fri, 2007-10-12 at 12:05 +0200, Alexander Klink wrote: > Hi, > > I am one of the core developers of the OpenXPKI project - an open source > certificate authority written in Perl and I was looking into sqlrelay as > a way to reduce the number of database connections we currently open > (but do not actively use at the same time). > > We are using Oracle at a customer here and as a quick test I've > replaced the connection string to use SQLRelay instead of Oracle. > > Unfortunately, now I run into the following problem: > ORA-01480: trailing null missing from STR bind value; > while doing the following query: > insert into L2CA1.config (config_identifier, data) VALUE (?, ?) > The config table consists of a data CLOB, and the bind value is > a few kilobytes big. Googling for the Oracle error shows that it > apparently looks for the \0 delimiter in the first few hundred(?) > characters only. > > I assume the DBD::Oracle module enlarges this value and DBD::SQLRelay > doesn't - could this be the reason for my error? I've never heard of that before, or of a way to enlarge it. Could you send me the url where they talk about it. I think I see a bug in the SQL Relay code causing it to leave off the trailing \0 though. A quick fix is to edit src/connection/sqlrcursor/binds.C and around line 51, change: inbindvars[i].valuesize, to: inbindvars[i].valuesize+1, Then rebuild/reinstall. Give that a try and let me know if it fixes the problem or not. Dave Muse dav...@fi... > > Any help highly appreciated ... > Best regards, > Alex |