Skip to content

Mysql2::Error: This connection is still waiting for a result, try again once you have the result #99

@ghazel

Description

@ghazel

Easy to reproduce. From a console, run a query and Ctrl-C it while it's running. Then try to submit a second query:

>> client
=> #<Mysql2::Client:0x40254f0>
>> client.query("select sleep(5);")
IRB::Abort: abort then interrupt!!
      from /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/irb.rb:89:in `irb_abort'
      from /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/irb.rb:255:in `signal_handle'
      from /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/irb.rb:66
      from (irb):2:in `call'
      from (irb):2:in `query'
      from (irb):2
>> client.query("select sleep(2);")
Mysql2::Error: This connection is still waiting for a result, try again once you have the result
      from (irb):3:in `query'
      from (irb):3

The client object remains broken forever - long after the initial query would have returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions