Icon View Incident Report

Serious Serious
Reported By: Yusuf Zorlu
Reported On: 3/2/2021
For: Version 2.33 Build 2
# 4802 Derived Table Execution Errors Can Cause Access Violation During Session Destruction

Run the following query and you will get:

ElevateDB Error #9999 Zugriffsverletzung bei Adresse 0000000000A77E7E in Modul 'mxDBServer64.exe'. Lesen von Adresse 0000000000000128

If you run only one of the subselects it shows the real problem:

ElevateDB Error #1011 An error occurred with the value 2021-02-29 (A conversion error occurred with the value 2021-02-29)

This happened today because of one customer added a user into his database with 1992-02-29 birthday and we're using this query to show a calendar with users having birthday today.

Table:

CREATE TABLE "MyTable"
(
"vusername" VARCHAR(16) COLLATE "ANSI",
"vbirthday" DATE
)

INSERT INTO "MyTable" VALUES ('Tim Young', DATE '1992-02-29')

INSERT INTO "MyTable" VALUES ('Yusuf Zorlu', DATE '1992-02-28')!

Query:

select * from (
   select
   if( vbirthday is not null and extract(year from vbirthday)>1901, cast(trim(both ' ' from cast(extract(year from current_date()) as varchar)+'-'+substring(cast(vbirthday as varchar),6,2)+'-'+substring(cast(vbirthday as varchar),9,2)) as date), null) vstart,
   if( vbirthday is not null and extract(year from vbirthday)>1901, cast(trim(both ' ' from cast(extract(year from current_date()) as varchar)+'-'+substring(cast(vbirthday as varchar),6,2)+'-'+substring(cast(vbirthday as varchar),9,2)) as date), null) vfinish,
   username
   from mytable
   where (vbirthday is not null and vbirthday>=DATE'1900-01-01')
union all
   select
   if( vbirthday is not null and extract(year from vbirthday)>1901, cast(trim(both ' ' from cast(extract(year from current_date()) as varchar)+'-'+substring(cast(vbirthday as varchar),6,2)+'-'+substring(cast(vbirthday as varchar),9,2)) as date), null) vstart,
   if( vbirthday is not null and extract(year from vbirthday)>1901, cast(trim(both ' ' from cast(extract(year from current_date()) as varchar)+'-'+substring(cast(vbirthday as varchar),6,2)+'-'+substring(cast(vbirthday as varchar),9,2)) as date), null) vfinish,
   username
   from mytable
   where (vbirthday is not null and vbirthday>=DATE'1900-01-01')
) daten



Comments Comments
The issue was that the temporary view manager used for the derived table was being left open when the derived table open/execution failed. When the session was subsequently destroyed, this temporary view was still referencing objects that were already destroyed when the parent statement was destroyed.


Resolution Resolution
Fixed Problem on 3/6/2021 in version 2.34 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image