Problem with numeric output since

Hi, after upgrading to .160 we had issues for large integers being returned by a database-query.

Below an example with a PK number
3.9085292E+8 was returned instead of 390852920

We had to roll-back to the previous version 141 and i works again

What database (SQL Server, Oracle, mySQL, etc) and driver version are you using when it works and failed?

  • Were they the same?

The DB is Oracle (exadata)
The DB didn’t change on the upgrade. So it is working with the version 141 and db 19, but issues with version 160.

Lucee will not trigger an error as it returns something, however as i’m using this id for a subsequent query i will get an ORA error as it expectes an integer but gets the mentioned value instead.

Oracle Database 19c Enterprise Edition Release - Production Version

Connecting via Oracle JDBC driver

Perhaps related, we encountered something similar where some integers were beign returned as decimals. However, it’s only in a couple odd places and we are using a custom JDBC driver for an older FoxPRO DB. I assumed something wonky between .160 and FoxPRO driver, but if similar/adjacent issue in an Oracle driver, then perhaps more is going on here with .160 release?

FWIW, the SELECT line in the SQL in question does have some logic in it:
MAX( IIF( d.item = #ASSEMBLY#, d.qty, 0 ) ) AS isAssembly

When the qry was output on a page, it would show e.g. 12.0 We just did a simple numberFormat to fix and moved on, assuming the old FoxPRO driver, but maybe it’s .160?

hmmm, could be related to either of these two tickets

[LDEV-4103] - Lucee
[LDEV-4006] - Lucee

@Leftbower can you try the previous snapshots to each of those listed above and let us know which one caused the regression?

@ugucione I’ve checked this issue with the lucee version and I can’t replicate this issue. if possible can you please share the testcode to replicate this issue?

Hi, unfortunately i cannot attach documents so i will try to explain here

Step 1: Combine 2 Database Queries into a query2query
Step 2: Output a Number Type Column from the query2query to page (i.e. Link or in javascript function)

Code of the output (getRowSql.ccn_objid of type Number)
<a href=“javascript:parent.showHideLog(‘detdiv’,‘hfc_cockpit.cfm?action=showdetail&objid=#getRowSql.ccn_objid#&domain=#domain#’)” title="#getRowSql.s_title#">#getRowSql.order_id#</a>

Javascript Function which is being called and opens the provided link in an iframe

function showHideLog(elementid,text){
var theframe=document.getElementById(‘logframe’);
setTimeout(function() { theframe.src = text; },300);

Expected Output

<a href=“javascript:parent.showHideLog(‘detdiv’,‘hfc_cockpit.cfm?action=showdetail&objid=390911320&domain=HFC’)” title=“O088165592: MODIFY-INSTALL ADDITIONAL PRODUCT: SUNRISE HOME: 26-AUG-22 20:23:27”>O088165592</a>

However the Link being finally called is corrupted

Clearly 157:



thanks, bug filed [LDEV-4188] - Lucee

@Leftbower can you please run this code against your query (passing your query into the funcion getDataTypeFrpmQuery)

ATM i assume the problem is with BigDecimal, we are in the process to move away from double to BigDecimal to have more precise mach operations. When you execute the code as is, you get the following output

As you can see the last line is “123.0”, problem is it maintain that way, even i convert it to a string

So it is very likely that is the issue you are seeing, it would be great if you could confirm if that is the case.

Here you go (Lucee…

This issue ([LDEV-4188] - Lucee) was solved in the lucee versions and

1 Like