DO JDBC query logging differences causes spec failure w/dm-core
When DO is used with JRuby, the logging output is different for queries than when DO is used with MRI. This causes some spec failures in dm-core, since it compares the logged query with the expected query. Here is the specific failure as shown in the (new) CI system:
There are two problems:
- The prepared statement object is being stringified, rather than the actual query with the bind values merged.
- The query time is not being logged. The number of seconds should be displayed in as high resolution as possible. The current MRI driver shows as many as 6 digits after the decimal point. This is very useful for debugging and identifying slow queries for indexing/optimizations.
From what I can tell the query time not being logged occurs with all queries, while the prepared statement stringification happens only in specific cases.
Comments and changes to this ticket
JDBC query logging is implemented now for SQLite - http://github.com/datamapper/do/commit/1763a8dc6dfc5de8c1dc2ccd198a...
- State changed from accepted to resolved
(from [8f076a181e2c601e9a4d108752c8b2d2dd1e6768]) [do_jdbc] format execution time in debug log as fraction of second [#981 state:resolved] http://github.com/datamapper/do/commit/8f076a181e2c601e9a4d108752c8...