Heads up for <@U070SQMD1> re potential 5.4 bug. S...
# lucee
a
Heads up for @zackster re potential 5.4 bug. Seeing an issue with using
IFNULL
in QoQ with data from a MySQL DB. Cannot tie down what the actual issue is yet, but am getting
there is a problem to execute sql statement on query
(nice English, btw) and
incompatible data type in operation
as the detail. The columns in question are both
varchar(100)
in the DB. And in the dataset I'm seeing it on, there are no nulls, or anything else quirky about the data. I will look more into it a bit later, just thought I'd let you know. This is a show stopper for us upgrading to 5.4. TBC...
r
Just curious. Did it work before?
IFNULL
is MySQL specific so I wouldn't expect it to work in a QoQ, just as I wouldn't expect
ISNULL
for MS SQL to work. Have you tried
COALESCE
which is more universal?
Odd. Did some testing and
IFNULL
,
ISNULL
, and
COALESCE
all worked for me in a QoQ using 5.4.0.80. The original query was from MS SQL since I don't have access to a MySQL server at the moment but that really shouldn't matter.
z
@bdw429s is our QoQ guru, nothing changed from memory
Stacktrace?
b
Lucee's native qoq has coalesce, also aliased as isNull. It does not support ifnull, so those queries would fall back to HSQLDB
If the hsqldb version has changed in 5.4, that may affect this.
a
OK I might try
ISNULL
as a work around. NB: this all works fine on 5.3.x, and has for quite some time.
ie: it's not new code. It's a regression in 5.4. And I know y'all did work on QoQ recently...
Is Lucee's "supported" QoQ SQL dialect documented anywhere?
image.png
😆 1
HA
That's from https://docs.lucee.org/guides/cookbooks/query-of-queries.html. The statements section of it is good though 😉
b
There's no comprehensive docs in supported qoq functions, but there really should be.
Hsqldb 1.8 and up do support ifnull btw
I'm in a session here at cfcamp in my phone, but if you can get a repro case, I'll peek at it.
a
Yeah no rush at all man. I'll have some time to focus on it after work this evening. Too rammed with important stuff right now 😉
a
@Adam Cameron you should be here to bring the bug report in person to Zac and Brad 😅
a
Yes. I should be in the position where the Home Office doesn't have my passport, too! 😐
a
@zackster told me. Next time hopefully we'll see you here.
👍 1
a
Have a beer for me anyhow 😉
z
Cheers mate, we will meet eventually for a beer or two
a
COALESCE
works. This works around it for me, but... there's still a regression there. I've not been able to isolate it from our app for a repro case yet