Hello,
the version 3 is most probably broken. I traced down the crash problem in Windows CE, see
http://sourceforge.net/mailarchive/forum.php?thread_id=5438459&forum_id=35230
It happens in balance_nonroot but in the declare variable section! If I change the variables in balance_nonroot to "static", the test goes OK. But such an error must come from a wrong memory write before this function. I am not able to find this. I attach my test program, it only creates a table and starts inserting rows.
As the simiral problem appears on other OSes, see http://www.mail-archive.com/[EMAIL PROTECTED]/msg03112.html,
I wonder if some of the great developers could solve it?
Best regards Jakub
Darren Duncan wrote:
At 2:20 PM -0400 8/29/04, D. Richard Hipp wrote:
SQLite version 3.0.5 (beta) is now available on the website.
Richard, thank you very much for that release.
I have downloaded and compiled it under both Mac OS X 10.2.8 (GCC 3.1, 3.3), and Mac OS X 10.3.5 (GCC3.3), with each development environment having the default set of libraries and headers. It compiles without errors (but with warnings about long integer types) on all configurations, and ./sqlite3 starts up and quits normally.
Under both Mac OS X 10.2.8 configurations, 'make test' continues to fail due to my TCL library being out of date, as I had reported previously.
Under the Mac OS X 10.3.5 configurations, 'make test' succeeds, with a result of '0 errors out of 22364 tests'. 10.3.5 does have a new enough TCL bundled.
So at least with the newer setup, I can confirm that everything works.
Matt, I will eagerly test a newer DBD::SQLite as soon as you release it.
-- Darren Duncan
if (! db.execute ( "CREATE TABLE test (" " i INTEGER NOT NULL," " v VARCHAR (50)," " PRIMARY KEY (i));")) ERROR_RETURN_FALSE;
vector<CVariantValue> values; values.push_back (12); values.push_back ("ahoj brouku"); values.push_back (13); values.push_back ("nazdar brouku"); if (! db.execute ( "INSERT INTO test VALUES (12, 'ahoj brouku')")) ERROR_RETURN_FALSE; if (db.execute ( "INSERT INTO test VALUES (12, 'nazdar brouku')")) ERROR_RETURN_FALSE; if (! db.execute ( "INSERT INTO test VALUES (13, 'nazdar brouku')")) ERROR_RETURN_FALSE; if (db.isExecutePrecompiledSupported()) { vector<CVariantValue> params; params.push_back (14); params.push_back ("cau brundibare"); if (! db.executePrecompiled ( "INSERT INTO test VALUES (?, ?)", params)) ERROR_RETURN_FALSE; if (db.executePrecompiled ( "INSERT INTO test VALUES (?, ?)", params)) ERROR_RETURN_FALSE; values.push_back (14); values.push_back ("cau brundibare"); } COneWayRecordset rs (db); if (! rs.openTable ("test")) ERROR_RETURN_FALSE; if (! rs.add()) ERROR_RETURN_FALSE; rs ["i"] = 15; rs ["v"] = "Hello world"; if (! rs.update()) ERROR_RETURN_FALSE; values.push_back (15); values.push_back ("Hello world"); if (! rs.open ("SELECT i, v FROM test")) ERROR_RETURN_FALSE; int irecord = 0; bool ok; while (rs.next()) { int i = rs ["i"].forceInt (&ok); string s = rs ["v"].asString(); if (i != values [irecord*2].forceInt (&ok)) ERROR_RETURN_FALSE; if (s != values [irecord*2+1].asString()) ERROR_RETURN_FALSE; irecord ++; } // fill some rows with string and binary data if (! db.begin()) ERROR_RETURN_FALSE; if (! rs.openTable ("test")) ERROR_RETURN_FALSE; vector<uint8_t> vec; string s; for (int row=1; row < 1000; row ++) { vec.push_back ((uint8_t) (row & 0xFF)); s += long2string (row); CVariantValueBinary binary (& *vec.begin(), vec.size()); if (! rs.add()) ERROR_RETURN_FALSE; rs ["i"] = row * row; rs ["v"] = s; if (! rs.update()) ERROR_RETURN_FALSE; if (! rs.add()) ERROR_RETURN_FALSE; rs ["i"] = row * row + 1; rs ["v"] = binary; if (! rs.update()) ERROR_RETURN_FALSE; } if (! db.close()) ERROR_RETURN_FALSE; return true;