Vermes, I'm late to the party but would still like to comment. The problem is the ruby code, not sqlite. The following is what you coded in the Ruby:

    db.execute("select szamla,megnevezes from proba") do |row|

In some shape or fashion, the result set is getting mangled by the update. When I debug it, the code is getting deeper than I have the ability to understand, but the execute is being reevaluated. That is probably getting more complicated due to the open (non-committed transaction). Again, this is deeper than my ability to understand.

What you need is a static collection and then iterate over the results:

    (db.execute("select szamla,megnevezes from proba")).each {|row|

- or -

    rows = db.execute("select szamla,megnevezes from proba")
    rows.each {|row|

The above will execute the select, returning a collection of the ten rows, then iterate for each member of the collection. The collection is not influenced by the update.


On 03/07/2017 09:00 AM, Vermes Mátyás wrote:
On Mon, 6 Mar 2017 18:34:40 -0500
Richard Hipp <> wrote:

For the benefit of those of us who do not do Ruby, perhaps you could
explain in words what you think it is that SQLite is doing

I am not a Ruby programmer either nor a real SQLite user. I am interested in writing  SQL interfaces 
to <a href="";>CCC</a> to various databases.  Ruby 
was chosen only because it can be run everywhere.   Just run the script: A select of ten rows turns 
into an endless loop.

Consider my post as a bug report. I do not need any workaround, and do know how 
to use WAL or duplicate database connections.

sqlite-users mailing list

Reply via email to