Suppress annoy warning, when executing AR's testcases. #7432

Merged
merged 2 commits into from Sep 10, 2012

Projects

None yet

4 participants

@kennyj
Contributor
kennyj commented Aug 23, 2012

We always see the follwing warning, when executing rake test_mysql

...warning: instance variable errno not initialized...

I know we shouldn't hide warnings, but I guess that development for mysql gem is not active.

BTW:
according to https://github.com/luislavena/mysql-gem/blob/master/ext/mysql_api/mysql.c#L1873
and https://github.com/luislavena/mysql-gem/blob/master/ext/mysql_api/mysql.c#L171, we can't access this iv ?

@carlosantoniodasilva

This message is very annoying yeah, and I'm happy to merge it. I just thought that perhaps we should move it to our tests setup instead of the connection adapter, since it's a hack for our tests only, wdyt?

@tenderlove
Member

I agree with @carlosantoniodasilva on this. We should probably move to the test cases.

@kennyj
Contributor
kennyj commented Sep 10, 2012

@carlosantoniodasilva @tenderlove I moved to the testcases.

BTW, I found the below comment in mysql_adapter

  8 class Mysql
  9   class Time
 10     ###
 11     # This monkey patch is for test_additional_columns_from_join_table
 12     def to_date
 13       Date.new(year, month, day)
 14     end
 15   end

Should we move it to the testcases ?

@rafaelfranca
Member

@kennyj I don't think this code is used only in tests. I guess it is fixing some issue. But I'm just guessing

@kennyj
Contributor
kennyj commented Sep 10, 2012

@rafaelfranca
When I remove Mysql::Time#to_date, many testcases are failed, and I confirm some functionalities depend on the method. I'll remove this comment.

@kennyj
Contributor
kennyj commented Sep 10, 2012

I added 48498da .

@rafaelfranca rafaelfranca merged commit 7b2363f into rails:master Sep 10, 2012
@rafaelfranca
Member

Great! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment