Not a real question here, just reporting a bug in version 16.0.0.2003.
When upgrading from version 11 to 16 I ran into a problem with a query that crashed the asa 16 engine.
I managed to pinpoint the problem to a "having 0 in (field, 1)" construct.
Depending on how complex the query is you will either get an assertion failed error (106104) or it will crash the engine. The following queries will reproduce this behaviour:
SQL:
select max(count) as max_count, table_type from sys.systable group by table_type having 0 in (max_count, 1)Error:
Could not execute statement.
Run time SQL error -- ERROR Assertion failed: 106104
(16.0.0.2003)
Field unexpected during compilation
SQLCODE=-300, ODBC 3 State="HY000"
Line 1, column 1SQL:
select max(c.width) as max_width, t.table_type from sys.systable as t left outer join sys.syscolumn as c on c.table_id = t.table_id group by t.table_type having 0 in (max_width, 1)Error:
dbeng16 has encountered a serious error and needs to close
The workaround for this problem is simpel. Just replace the having clause with "0 = field or 0 = 1".
And in case you're wondering: the actual query we used looked like this "having 0 in (field, :param)" where we use the param value to optionally apply the having clause.
Request clarification before answering.
Thanks for the simple repro Christian. I've opened QTS 774060 to address the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW, according to the CR note this has been fixed with 12.0.1.4197 and 16.0.0.2052.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.