Icon ElevateDB 2.10 Released

Posted by Tim Young on Sat, Sep 8 2012
ElevateDB 2.10 is now available for download. If you're an existing customer, then you should be receiving an email shortly with download instructions. You can view the release notes, including any breaking changes, on the download page before downloading.

The catalog format/version number is not changed in this release, so you can simply recompile your applications in order to deploy the improvements and fixes contained in the release.

Text Index Bug
This release corrects a serious bug with the text indexes in ElevateDB that has been present since ElevateDB was originally released. The following incident report describes the issue:

# 3606 Text Indexes Containing Words Longer than Word Length Can Experience Corruption

This bug affects any database table that contains text indexes, and must be corrected in any affected database table immediately after installing 2.10. The following script can be run against any database using 2.10 in order to repair the text indexes:

SCRIPT
BEGIN
   DECLARE CatalogCursor SENSITIVE CURSOR FOR CatalogStatement;
   DECLARE DBPath VARCHAR DEFAULT '';
   DECLARE TableName VARCHAR DEFAULT '';
   DECLARE CurrentTable INTEGER DEFAULT 1;

   PREPARE CatalogStatement FROM 'SELECT * FROM Configuration.Databases WHERE Name=?';
   OPEN CatalogCursor USING CURRENT_DATABASE();

   FETCH FIRST FROM CatalogCursor ('Path') INTO DBPath;

   EXECUTE IMMEDIATE 'CREATE STORE __RepairTextIndexes AS LOCAL PATH '+QUOTEDSTR(DBPath);

   BEGIN

      PREPARE CatalogStatement FROM 'SELECT DISTINCT(TableName) FROM Information.Indexes
                                     WHERE Type=?
                                     ORDER BY TableName';
      OPEN CatalogCursor USING 'Text Index';
   
      SET PROGRESS TO 0;
      SET LOG MESSAGE TO '*** Repair of text indexes in database '+CURRENT_DATABASE()+
                         ' started on '+CAST(CURRENT_TIMESTAMP() AS VARCHAR);
   
      FETCH FIRST FROM CatalogCursor ('TableName') INTO TableName;
   
      WHILE NOT EOF(CatalogCursor) AND NOT ABORTED() DO
   
         SET STATUS MESSAGE TO 'Repairing text indexes for table '+TableName;
   
         EXECUTE IMMEDIATE 'DELETE FILE '+QUOTEDSTR(TableName+'.EDBIdx','"')+' FROM STORE __RepairTextIndexes';
         EXECUTE IMMEDIATE 'REPAIR TABLE '+QUOTEDSTR(TableName,'"');
   
         FETCH NEXT FROM CatalogCursor ('TableName') INTO TableName;
   
         SET PROGRESS TO TRUNC((CurrentTable/ROWCOUNT(CatalogCursor))*100);
   
         SET CurrentTable=CurrentTable+1;
   
      END WHILE;

   FINALLY
      EXECUTE IMMEDIATE 'DROP STORE __RepairTextIndexes KEEP CONTENTS';
   END;

   SET LOG MESSAGE TO '*** Repair of text indexes in database '+CURRENT_DATABASE()+
                      ' completed on '+CAST(CURRENT_TIMESTAMP() AS VARCHAR);

END

Warning A simple repair of the affected tables is not sufficient since the repair functionality in ElevateDB will not be able to cope with the shifted index key values in all cases. This is why the above script deletes the actual index file for the table before attempting to repair the indexes. If you are using a custom index file extension in your installations, please change the reference to '.EDBIdx' in the above script so that it matches the custom index file extension that you are using.

We sincerely apologize for this problem, and hope that it is not too disruptive for you or your customers.

Tags: ElevateDB, New ReleasesPermanent Link

Comments Comments (1) You must be logged in to comment

Comment GReg said... Reply
Backup and restore whole databases won't be enough to fix the problem?  

Image