Hello Thanks for responding so quickly.
It's taken awhile for me to do these tests, as it took me a little time to double check how the compiler lays out it's 64 bit integers ( I've never quite trusted an emulator's watch window! ). I've simplified my tests to an in memory database with the following test case: sqlite3 * thedb; CharT * ErrorMessage=NULL; Test_Debug("Test::Opening\n"); BoolT Result( sqlite3_open(":memory:",&thedb) == SQLITE_OK ); Result = Result && sqlite3_exec(thedb, "CREATE TABLE Players ( FirstName TEXT,LastName TEXT)", callback, 0, &ErrorMessage ) == SQLITE_OK; Result = Result && sqlite3_exec(thedb, "SELECT * FROM sqlite_master", callback, 0, &ErrorMessage ) == SQLITE_OK ); Result = Result && sqlite3_exec(thedb, "INSERT INTO Players VALUES ( \"Joe\",\"Cole\")", callback, 0, &ErrorMessage ) == SQLITE_OK; Result = Result && sqlite3_exec(thedb, "CREATE TABLE Clubs ( FirstName TEXT,Ground TEXT)", callback, 0, &ErrorMessage ) == SQLITE_OK; Result = Result && sqlite3_exec(thedb, "INSERT INTO Clubs VALUES ( \"ManU\",\"OldTrafford\")", callback, 0, &ErrorMessage ) == SQLITE_OK ; Result = Result && sqlite3_exec(thedb, "INSERT INTO Clubs VALUES ( \"Liverpool\",\"Anfield\")", callback, 0, &ErrorMessage ) == SQLITE_OK; Result = Result && sqlite3_exec(thedb, "INSERT INTO Clubs VALUES ( \"Chelsea\",\"Stamford Bridge\")", callback, 0, &ErrorMessage ) == SQLITE_OK; Result = Result AND_THEN CHECK_EQUAL( sqlite3_exec(thedb, "SELECT * FROM Players", callback, 0, &ErrorMessage ), SQLITE_OK ); Result = Result AND_THEN CHECK_EQUAL( sqlite3_exec(thedb, "SELECT * FROM Clubs", callback, 0, &ErrorMessage ), SQLITE_OK ); Following your advice, I set a break in sqlite3VdbeSerialGet just following the line you suggested. The breakpoint was hit twice during execution of this test ( once from the CREATE TABLE Players query, once from the SELECT * from sqlite_master query ). On both occasions, pMem->i appeared to be correctly assigned the value 2. However, the 'rootpage' entry in my debug output following this still registered the strange 'corruption' mentioned previously. < This is a simple string dump from the callback method. Nothing clever, and no type conversion > The subsequent INSERT INTO Players failed, and hence the rest of the tests did not run. Rgds Richard > The following code snippet is from vdbeaux.c: > > int sqlite3VdbeSerialGet( > const unsigned char *buf, > u32 serial_type, > Mem *pMem > ){ > switch( serial_type ){ > case 10: > case 11: > case 0: { > pMem->flags = MEM_Null; > break; > } > case 1: { > pMem->i = (signed char)buf[0]; /****** TROUBLE HERE? ****/ > pMem->flags = MEM_Int; > return 1; > } > > I put a comment on the line I suspect is malfunctioning. > This is where the integer value '2' gets read out of the database file and into a 64-bit integer in memory. > pMem->i is a long long int, and buf[0] is a character. > I'm guessing your compiler is not doing the conversion > quite right. > > Can you run in the debugger on the ARM and see what > is happening? If you don't have debugger on the ARM, > can you at least use some printf()s to see what is going > on at that point? ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Danish - Deutsch - English - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Svenska: www.cardinalhealth.com/legal/email ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------