RDBI/rdbi-driver-mysql — Issue #6: new_execution incurs unnecessary performance hit
Author: bsanders1979
Created: 2011-10-29 00:00:19+00:00
State: open

mysql.rb:411-414
...
metadata = res.result_metadata rescue nil

if metadata
columns = res.result_metadata.fetch_fields.collect do |col|
...

I was profiling my code to find bottlenecks and discovered that result_metadata was costing me a lot of CPU time
Line should be: columns = metadata.fetch_fields

Also, seems like metadata/columns/schema should only be calculated once unless there's a good reason why it shouldn't be.