What happened to this site? And what's that frog about?

data in file more than once

F105 - Failure Feedback Forum 

Status: resolved Severity: failure Category: Metakit C++, 2.4.9.5, 2.4.9.6 Created: 2006-11-28 Updated: 2006-12-09

e.g. with the following code:

 c4_Storage database("test.db", true);
 c4_View sections = database.GetAs("blocks[data:b]");
 for ( int i = 0; i < n; i++ ) {
    c4_Row row; c4_BytesProp
    data("data");
      // pBuffer, nBytes have been updated on every iteration -
      // e.g. we have a files list, reading data from files and
      // storing it into metakit database
    data(current) = c4_Bytes (pBuffer, nBytes);
    sections.Add(row);
    database.Commit(true);
 }

e.g. if we have files A, B, C in list, in the metakit database we'll have data from file 'A' on the first Commit(), 'A' + 'A' + 'B' on the second one, 'A' + 'A' + 'B' + 'A' + 'A' + 'B' + 'C' on the third and so on. In spite of this, kviewer and metakit functions will show that we have only 'A', 'B', 'C'.

Summary

The above code is not usable for a test case as is. Will reopen when it is fixed.



2006-11-28 dannie.4x4

Imported

2006-12-09 jcw

Copied from metakit cvstrac ticket #14

2006-12-09 jcw

Several comments:

  • "blocks[data:b]" should be "blocks[data:B]"
  • I'm guessing that current should be "row[i]"
  • n is not defined (though also probably not important)

Please turn this into a test case I can run here, if you want to get more assistance with this.

Add a comment:

Tip: add empty lines between paragraphs and indent lines to prevent reformatting.

Your name or initials:  

Powered by Mavrig