Ticket #117 (new defect)

Opened 2 years ago

Last modified 1 month ago

Informix mis calculates max length of integer fields

Reported by: TomChiverton Owned by: dhughes
Type: defect Priority: highest
Milestone: 1.0 Release Component: Reactor - DBMS Interfaces
Version: Severity: major
Keywords: spam patch Cc:

Description

Index: /home/chivertont/Projects/reactor/trunk/data/informix/ObjectDao.cfc
===================================================================
--- /home/chivertont/Projects/reactor/trunk/data/informix/ObjectDao.cfc (revision 3983)
+++ /home/chivertont/Projects/reactor/trunk/data/informix/ObjectDao.cfc (working copy)
@@ -99,7 +99,11 @@

<!--- field length for text fields is held as 56 in the db, but text can be 231 or space available on disk, whichever is less --->
<cfif qFields.dbDataType NEQ 12>

- <cfset Field.length = qFields.length />
+ <cfif qFields.dbDataType eq 2><!--- for integer is length in bits --->
+ <cfset Field.length = len(2((2(qFields.length+1))-1)) >
+ <cfelse>
+ <cfset Field.length = qFields.length />
+ </cfif>

<cfelse>

<cfset Field.length = 2147483648>

</cfif>

Attachments

reactor-informix-integer-maxlength.patch (0.8 kB) - added by TomChiverton 2 years ago.
Trac didn't like me putting the patch in the summary, sorry

Change History

Changed 2 years ago by TomChiverton

Trac didn't like me putting the patch in the summary, sorry

Changed 1 month ago by mark.drew@…

  • milestone set to 1.0 Release

Changed 1 month ago by TomChiverton

  • keywords spam patch added
Note: See TracTickets for help on using tickets.