Icon View Incident Report

Serious Serious
Reported By: Adam Hair
Reported On: 8/22/2017
For: Version 2.26 Build 3
# 4576 COMPARE DATABASE Generating Incorrect Statement Terminators for ALTER Statements

I am currently having some problems whilst trying to execute a reverse engineer within my application. It appears to work fine in EDB Manager, but I'm getting a bad script created when I attempt to run it through Delphi.

I have created a sample application to try and demonstrate by replicating the behaviour.

In EDBManager if I execute a reverse engineer (upgrade) between two databases I get first script below.

If I do the same within the test application I've created I get the second script below.

You can see that the second script hasn't generated correctly by the Max Publisher Buffer Size, as it puts an escalation mark at the end, even though it works fine in EDBManager.

EDB Manager:

/************************************************************
*
* ElevateDB Reverse-Engineered upgrade script for the
* Brokermate database
*
* Generated on 23/08/2017 12:23:04 PM
* By the user Administrator
*
************************************************************/

SCRIPT
BEGIN

EXECUTE IMMEDIATE 'CREATE TABLE "PostCodes"
(
"PCode" INTEGER,
"Locality" VARCHAR(50) COLLATE "UNI",
"State" VARCHAR(10) COLLATE "UNI"
)
VERSION 1.00
READWRITE
UNENCRYPTED
INDEX PAGE SIZE 8192
BLOB BLOCK SIZE 1024
PUBLISH BLOCK SIZE 1024
PUBLISH COMPRESSION 0
MAX ROW BUFFER SIZE 32768
MAX INDEX BUFFER SIZE 65536
MAX BLOB BUFFER SIZE 32768
MAX PUBLISH BUFFER SIZE 32768';

EXECUTE IMMEDIATE 'CREATE INDEX "PCode" ON "PostCodes" ("PCode")';

END

/************************************************************
* End of generated SQL
************************************************************/

Application:

/************************************************************
*
* ElevateDB Reverse-Engineered upgrade script for the
* Brokermate database
*
* Generated on 23/08/2017 12:22:24 PM
* By the user Administrator
*
************************************************************/

SCRIPT
BEGIN

EXECUTE IMMEDIATE 'CREATE TABLE "PostCodes"
(
"PCode" INTEGER,
"Locality" VARCHAR(50) COLLATE "UNI",
"State" VARCHAR(10) COLLATE "UNI"
)
VERSION 1.00
READWRITE
UNENCRYPTED
INDEX PAGE SIZE 8192
BLOB BLOCK SIZE 1024
PUBLISH BLOCK SIZE 1024
PUBLISH COMPRESSION 0
MAX ROW BUFFER SIZE 32768
MAX INDEX BUFFER SIZE 65536
MAX BLOB BUFFER SIZE 32768
MAX PUBLISH BUFFER SIZE 32768!

CREATE INDEX "PCode" ON "PostCodes" ("PCode")';

END

/************************************************************
* End of generated SQL
************************************************************/



Comments Comments
The bug was in the ALTER SQL generation for the COMPARE DATABASE statement.


Resolution Resolution
Fixed Problem on 8/27/2017 in version 2.26 build 4


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