Icon View Incident Report

Serious Serious
Reported By: Terry Swiers
Reported On: 4/11/2012
For: Version 2.08 Build 3
# 3582 Altering Temporary Tables Can Cause Named Table Files To Appear in Database Directory

There appears to be a bug with temporary table names and adding constraints. If I create a temporary table and then subsequently alter that temporary table to add a unique constraint, the alter statement is creating a .EDBIdx file in the actual database folder using the temporary table name in addition to the .EDBIdx file created in the users temporary windows folder as part of the temporary table creation.

This appears to work as expected, but the problem comes into play when you attempt to delete the temporary table as the drop statement will delete the .EDBIdx file from the users temporary folder but leave the fully named .EDBIdx file in the database folder. This prevents subsequent attempts to create the temporary table again with the same table name.

Steps to reproduce:

1. Run the following script against the restored database from within EDB Manager.

2. Run a second SQL to drop the MyTempTable created in the script.

3. Run the script again. It will fail on the create statement.

Table:

CREATE TABLE "test"
(
"Entry" INTEGER,
"Sequence" INTEGER
)

INSERT INTO "test" VALUES (1,4)
INSERT INTO "test" VALUES (2,3)
INSERT INTO "test" VALUES (3,2)
INSERT INTO "test" VALUES (4,1)

Script:

SCRIPT
BEGIN

EXECUTE IMMEDIATE 'CREATE TEMPORARY TABLE MyTempTable as (select * from test) WITH DATA';
EXECUTE IMMEDIATE 'ALTER TABLE MyTempTable ADD CONSTRAINT "MyUnique" UNIQUE ("Entry")';
EXECUTE IMMEDIATE 'CREATE INDEX "MyIndex" ON "MyTempTable" (Sequence, Entry)';
EXECUTE IMMEDIATE 'DROP TABLE MyTempTable';

END



Resolution Resolution
Fixed Problem on 4/15/2012 in version 2.09 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