Oracle LONG limitation bug.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2997
Reported by @grubba
From: eric lindvall <eric@5stops.com>
To: "pike@roxen.com" <pike@roxen.com>
Date: Thu, 11 Apr 2002 08:50:43 +0200 (MEST)
Subject: oracle patch
the oracle module assumes that all strings should be converted to LONGs. unfortunatly, you can't have more than one LONG in a given row, or in a select.
this fixes the problems with having more than one bind variable that is a string. it also manifested itself in spitting out: Oracle:code=-1:ORA-01460: unimplemented or unreasonable conversion requested
when using more than one bind variable or more than one escaped entry.
hope this helps.
e.
Index: src/modules/Oracle/oracle.c
===================================================================
RCS file: /cvs/Pike/7.2/src/modules/Oracle/oracle.c,v
retrieving revision 1.59
diff -u -u -r1.59 oracle.c
--- src/modules/Oracle/oracle.c 2002/02/07 16:55:19 1.59
+++ src/modules/Oracle/oracle.c 2002/04/11 06:32:10
@@ -1735,7 +1735,13 @@
case T_STRING:
addr = (ub1 *)value->u.string->str;
len = value->u.string->len;
- fty = SQLT_LNG;
+ if (len < 4000)
+ {
+ rlen = 4000;
+ fty = SQLT_CHR;
+ }
+ else
+ fty = SQLT_LNG;
break;
case T_FLOAT: