Hi guys,

I am experiencing a very strange issue in sqlite 3.4.2 (only with the Win32 version, OSX and linux works fine).
Here it is what's happen:

// create table
CREATE TABLE One( a varchar primary key, b1 integer, b2 integer, b3 integer, z varchar )
CREATE UNIQUE INDEX idx_One ON One( b1, b2, b3 )

// insert 100 rows
// pseudo code
for i as integer = 1 to 100
db.SQLExecute( "INSERT INTO One VALUES( '" + Str(i) + "', " + Str (i+1) + ", " + Str(i+2) + ", " + Str(i+3) + ", '" + Chr(i +Asc("A")) + "' )" )
next

// select case 1
// Getting one column, not in index, FAILS!
rs = db.SQLSelect( "SELECT a FROM One WHERE b1 = 99 AND b2 = 100 and b3 = 101" )
the return value should be 98, but it is 99!

// select case 2
// Getting all columns works
rs = db.SQLSelect( "SELECT * FROM One WHERE b1 = 99 AND b2 = 100 and b3 = 101" )

// select case 3
// Not using whole index works
rs = db.SQLSelect( "SELECT a FROM One WHERE  b2 = 100 and b3 = 101" )

// select case 4
// Getting one column, in the index, works
rs = db.SQLSelect( "SELECT b1 FROM One WHERE b1 = 99 AND b2 = 100 and b3 = 101" )

I wonder if there was a bug in the 3.4.2 version that I should fix...
Please note that I cannot upgrade to the latest 3.5.x versions...

Thanks a lot.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to