From: Brad H. <bh...@vp...> - 2002-05-11 15:02:42
|
On Fri, 2002-05-10 at 14:44, Brad Hilton wrote: > usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql/Mysql.rb:321:in `finish': > undefined method `free' for #<Mysql:0x81a9d44> (NameError) > from /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:701:in > `finish' Well, to follow up to myself: It turns out the error is expected. Mysql objects don't have the methods 'free' and 'fetch_fields' defined. Those methods are actually in the class MysqlRes, which I found out after looking at the c code. The problem is that ruby-dbd-mysql assumes that Mysql#query always MysqlRes objects, when that isn't true. If query_with_result is false, Mysql#query returns self (a Mysql object). Could the maintainer of ruby-dbd-mysql look into this please? Basically, every time a @res_handle is grabbed from Mysql#query there is a false assumption that it is a MysqlRes object, and not a reference to the original Mysql object. Thanks, -Brad |