Hi Paul,
Thanks for the bug report.
FYI, I could not reproduce the problem with carob standalone. We will
now investigate the libmysequoia side, and keep you posted.
Cheers,
Gilles.
Paul Legato a écrit :
Hi all,
Firstly, thanks for the suggestions. I'm now running Sequoia 2.10.5,
Carob 0.7.2, and libmysequoia 0.9.7. The system is now mostly working
from Ruby via libmysequoia.
I think I may have uncovered a bug/quirk/feature. If I perform an
invalid query from a nonexistent table now, I get the approriate
'ERROR: relation "bar" does not exist' message *UNLESS* I have
previously fetched result rows from a valid query within the same
session.
If the results of a successful query have been accessed, subsequent
invalid queries produce "Mysql::Error: Virtual database testDB not
found on any of the controllers" and close the connection. Also, the
connection cannot then be reopened without exiting and restarting the
process.
In the following example, the table "foo" does exist on the
controller, and the table "bar" does not.
irb(main):002:0> require 'mysql.so'
=> true
irb(main):003:0> x = Mysql.connect "localhost", "sequoia", "sequoia",
"testDB", 25322
=> #<Mysql:0xb7734364>
irb(main):004:0> x.query("select * from bar") # produces correct error
Mysql::Error: ERROR: relation "bar" does not exist
from (irb):4:in `query'
from (irb):4
from :0
irb(main):005:0> x.query("select * from bar") # produces correct error
Mysql::Error: ERROR: relation "bar" does not exist
from (irb):5:in `query'
from (irb):5
from :0
irb(main):006:0> z = x.query("select * from foo") # produces
correct result
=> #<Mysql::Result:0xb771cc78>
irb(main):007:0> x.query("select * from bar") # still produces
correct error
Mysql::Error: ERROR: relation "bar" does not exist
from (irb):7:in `query'
from (irb):7
from :0
irb(main):008:0> z = x.query("select * from foo")
=> #<Mysql::Result:0xb77132f4>
irb(main):009:0> z.fetch_row # fetching a row from the result works,
but breaks something else
=> ["123", "asdf"]
irb(main):010:0> x.query("select * from bar") # wrong error message?
Mysql::Error: Virtual database testDB not found on any of the controllers
from (irb):10:in `query'
from (irb):10
from :0
irb(main):011:0> z = x.query("select * from foo") # valid queries
no longer work
Mysql::Error: Request cannot be processed : connection is closed!
from (irb):11:in `query'
from (irb):11
from :0
irb(main):012:0> x = Mysql.connect "localhost", "sequoia", "sequoia",
"testDB", 25322 # can't reopen the connection, either
Mysql::Error: Virtual database testDB not found on any of the controllers
from (irb):12:in `connect'
from (irb):12
from :0
irb(main):013:0>
If I exit back to a shell and restart irb, everything works fine once
again (mysql.so connects to sequoia with no problems, etc.) until a
row is fetched and an invalid query is executed.
Is the connection supposed to be used for only one query? Even if so,
why can't I reconnect and then execute another query within the same
process?
Thanks in advance for any insight.
Best,
Paul
_______________________________________________
Carob mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob