Thank you D. Richard Hipp, for your time and nice work.


On 10/12/2011, at 15:25, Richard Hipp wrote:

On Thu, Dec 8, 2011 at 12:25 PM, Alessandro Merolli <amero...@mwneo.com >wrote:

Hi,

We've being working with SQLite version 3.6.22 in our project and we wish to upgrade it to the latest one. During the tests with the new library version, we noticed a strange behavior related to a trigger which updates the last inserted row. We where able to simplify the data model and
produce a test case which can be executed using the sqlite3 shell....


This is a real problem that was introduced when we added recursive
triggers. But it is very obscure and only comes up when you have really
complicated queries inside of triggers - queries that make use of
manifested views and/or automatic indices.  The trouble ticket is at
http://www.sqlite.org/src/info/7bbfb7d442 and the fix is checked in at
http://www.sqlite.org/src/info/557c69055a with additional changes at
http://www.sqlite.org/src/info/0064bab771 that fix related issues and
verify with assert() statements that similar kinds of problems do not
recur.  These changes will be in the next release.

Thanks for providing a test case. That was very helpful in tracking down
the problem.



Here are the outputs:

Execution with latest SQLite 3.7.9:
c:\>sqlite3shell.exe -init .\test_case.sql ":memory:"
-- Loading resources from .\test_case.sql
Expected result: 31|10
Problematic result: 31|0
31|0
SQLite version 3.7.9
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit
c:\>

Execution with latest SQLite 3.6.22:
c:\>sqlite3shell.exe -init .\test_case.sql ":memory:"
-- Loading resources from .\test_case.sql
Expected result: 31|10
Problematic result: 31|0
31|10
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit

We are using the amalgamation version of the source for both libraries and
here are the compilation defines:
TEMP_STORE=3
SQLITE_THREADSAFE=2
SQLITE_DEFAULT_CACHE_SIZE=**65568
SQLITE_DEFAULT_TEMP_CACHE_**SIZE=65568
SQLITE_MAX_ATTACHED=30
SQLITE_ENABLE_COLUMN_METADATA
SQLITE_ENABLE_UNLOCK_NOTIFY

The error was also reproduced on the original library available for Ubuntu
10.10.
Additional information is available in the test_case.sql script comments.

      Thanks for the assistance.
      Regards,
      Alessandro Merolli.



______________________________**_________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<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

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

Reply via email to