On Mon, Feb 17, 2014 at 10:09 PM, Jean-Marie CUAZ <jm.c...@orens.fr> wrote:

> Hello,
>
> Win XP + Tcl 8.6.1 + SQLite 3.8.3 (loaded from Active State)
>
> Possible usefull information on bug similar as 4c86b126f2 but in a simpler
> context (corrected by version SQLite 3.8.3.1)
>
> Description :
>
> For a table Tbl1 having historical data with 12 occurences (one for each
> month) of the value 'b' in the field2,  the following UPDATE modified _only
> 1 record_ : the last occurence (december) of 'b' in field2.
>
> "UPDATE Tbl1
> SET field1 = 'a'
> WHERE field2 = 'b'"
>
> Field2 has string values in every rows and no NULL in it, and is the third
> member of the PK. Tb1 has 39 fields, a PK on the first three fields . Apart
> the PK, no constraint are set on the other fields.
>


Please show the complete schema, including all indices, for table tbl1.  We
are unable to recreate your problem without additional information.



>
> Re-ran the same same query on the same table with older versions of SQLite
> (from AS) :
>
> version 3.8.0.1 -> OK
> version 3.8.1 -> OK
> version 3.8.3 -> NOT OK
> (unfortunately 3.8.3.1 is not available for now from AS)
>
> With version 3.8.3, we ran scripts creating test tables and reproducing
> the same logic in the same db but nothing went wrong.
>
> Our App has a kind of "Sql console" : exercising the original populated
> table with manual UPDATES we observed that the miss-match with the RHS
> criteria in the WHERE clause arose only on one particular field ("field2")
> and not the others. With this field the sole match was allways on the last
> occurence in the table.
>
> Reading ticket 4c86b126f2, changed the WHERE clause -> "WHERE + field2 =
> 'b'" -> works : criteria recognised on every rows -> every rows were updated
>
> Then ran ANALYZE command, wich was not run for more than 6 months on this
> db and re-ran exactly the same UPDATE queries on the console -> the pb
> disapeared (!)
>
> Jean-Marie
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to