luislavena / mysql-gem

MySQL/Ruby Bindings, wrapped as Gem with improved cross-platform support
http://rubyforge.org/projects/mysql-win
Other
53 stars 20 forks source link

Warning: instance variable errno not initialized #25

Closed zirni closed 9 years ago

zirni commented 10 years ago

Hello folks,

this warning happens while running the activerecord mysql test suite. Please look at the following link: https://travis-ci.org/rails/rails/jobs/16809416#L117

At this point the warning happens:

ARCONN=mysql /home/vagrant/.rvm/rubies/ruby-2.0.0-p353/bin/ruby -w -I"lib:test" -I"/home/vagrant/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib" "/home/vagrant/.rvm/gems/ruby-2.0.0-p353/gems/rake-10.1.1/lib/rake/rake_test_loader.rb"  "test/cases/disconnected_test.rb" -v

Would it be a better to explicitly set an ivar even when the assigned value would be nil?

https://github.com/luislavena/mysql-gem/blob/master/ext/mysql_api/mysql.c#L1873 I think that would be a good place to start initialization?

What do you think?

Cheers