Results 1 to 4 of 4

Thread: Possible bug report: Exception during compact operation of db with custom KeyMap

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    3

    Default Possible bug report: Exception during compact operation of db with custom KeyMap

    I ran a compact operation on a database with a StringKeyMap with longer maximum length and I got an IndexOutOfRangeException at StringKeyMap.Direct.

    This is the same error I got when trying to add long entries to the database with the default StringKeyMap, which I fixed by creating a new instance of the StringKeyMap. Thus, I am assuming that the code for compaction is not using this instance of the StringKeyMap, which is either a bug or a result of me doing something wrong.

    This is the KeyMap I am using:

    table.KeyMap = new StringKeyMap(80, SortOrderMap.Ascending);
    

  2. #2
    Junior Member
    Join Date
    Dec 2011
    Posts
    3

    Default Possible Solution

    The addition of the following code in the Scheme.CopyTables(Scheme) would solve the problem, I believe:

    dstTable.KeyMap = this.KeyMap;
    
    I have tested this addition to the code and the compact process seems to work fine now. Please consider including this bugfix in the official build of STSdb.

    Thank you for making the source code available.
    Last edited by obi1kenobi; 30.12.2011 at 22:54. Reason: confirm that solution works

  3. #3

    Default

    Your solution is correct. Thank you for your report!

  4. #4
    Junior Member
    Join Date
    Dec 2011
    Posts
    3

    Default

    Quote Originally Posted by a.todorov View Post
    Your solution is correct. Thank you for your report!
    Glad to be able to help Thanks for the excellent database system!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.