osx brew mysql-5.6.12 breaks building native extension for brianmario/mysql2

As soon as I updated mysql on my OSX machine to mysql-5.6.12 and subsequently wanted to install the brianmario/mysql2 Ruby gem hell broke loose. Precise examination of mkmf.log in the directory of the gem showed that a compiler flag was not recognized by the compiler. After mysql-5.6.10 two compiler flags are introduced in mysql_config that conflict with the gcc42 compiler needed to build gems against ruby-1.9.3 while building them against ruby-2.0.0 did not produce any problems. This is logical because the latter uses the llvm compiler instead of the gcc42 compiler to build native extensions.

The solution is to (temporarily) remove the -Wno-null-conversion -Wno-unused-private-field flags from the cflags and cxxflags in the mysql_config script located in /usr/ocal/Cellar/mysql-5.6.12/bin/ directory. 

The same error also pops up when building the mysql extension for python. Have a look at the stack overflow article that eventually lead me to the solution to the problem. Notice that there the problem starts with mysql-5.6.11 and also notice that using mysql-5.6.10 on my machine did not give trouble.

Also see: http://bugs.mysql.com/bug.php?id=69645

Enjoy!