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
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?
The DB is Oracle 19.14.0.0.0. (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 19.0.0.0.0 - Production Version 19.14.0.0.0
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 5.3.9.157
[LDEV-4006] - Lucee 5.3.9.147
@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 5.3.9.160 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
https://p-iptvweb-as-01.swi.srse.net:8443/bb/hfc_cockpit.cfm?action=showdetail&objid=3.9091132E+8&domain=HFC
Clearly 157:
Lucee 5.3.9.156:
Lucee 5.3.9.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
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.
This issue ([LDEV-4188] - Lucee) was solved in the lucee versions 5.3.9.165-SNAPSHOT and 5.3.10.71-SNAPSHOT.