Fixed bug with data type identification -- was actually bug in test code.
Tests pass again! Hurray! And type detection works better and makes SQL statements that don't fail (at least for MySQL at this point).