On Mar 30, 9:01 am, cult hero <[email protected]> wrote:
> Hmmm... It looks like I'm going to need to revise this a bit more.
> Some errors that should trigger "closed?" don't seem to.
I've noticed that as well. Seems like a bug in TinyTDS:
$ ruby -I lib bin/sequel -E tinytds://...
Your database is stored in DB...
irb(main):001:0> DB[:a].all
I, [2011-03-30T10:13:27.222565 #31020] INFO -- : (0.000288s) SELECT *
FROM [A]
=> [{:a=>"\302\243"}, {:a=>"\302\243"}]
# Kill connection here
irb(main):002:0> DB[:a].all
E, [2011-03-30T10:14:31.071765 #31020] ERROR -- : TinyTds::Error:
Write to the server failed: SELECT * FROM [A]
# Note that closed is false, so a disconnect error is not raised
[:closed?, false]
Sequel::DatabaseError: TinyTds::Error: Write to the server failed
from ./lib/sequel/adapters/tinytds.rb:37:in `execute'
from ./lib/sequel/adapters/tinytds.rb:37:in `execute'
from ./lib/sequel/database/logging.rb:32:in `log_yield'
from ./lib/sequel/adapters/tinytds.rb:36:in `execute'
from ./lib/sequel/connection_pool/threaded.rb:84:in `hold'
from ./lib/sequel/database/connecting.rb:226:in `synchronize'
from ./lib/sequel/adapters/tinytds.rb:32:in `execute'
from ./lib/sequel/dataset/actions.rb:541:in `execute'
from ./lib/sequel/adapters/tinytds.rb:91:in `fetch_rows'
from ./lib/sequel/dataset/actions.rb:123:in `each'
from ./lib/sequel/dataset/actions.rb:50:in `all'
from (irb):2
irb(main):003:0> DB[:a].all
# Immediate process exit == very bad juju
FreeTDS: db-lib: exiting because client error handler returned 0 for
msgno 20017
I'll report this to the tinytds bug tracker.
I think that patch is correct, so I'll merge it.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.