Commit Graph

273 Commits

Author SHA1 Message Date
Brian Lopez d1379d2fdd update readme for encoding changes 2010-06-13 16:28:53 -07:00
Brian Lopez 6751a98873 use Encoding.default_internal 2010-06-13 15:50:03 -07:00
Brian Lopez ef37f7ef76 spec fix for ruby 1.9.2+ 2010-06-13 14:50:02 -07:00
Brian Lopez bd3c39f819 formatting 2010-06-11 08:51:55 -07:00
Brian Lopez d4beaf3059 apply proper fix for timezone support, and fix specs accordingly 2010-06-08 15:16:37 -07:00
Brian Lopez 5d8346cf38 typo in readme 2010-06-02 00:46:08 -07:00
Brian Lopez e6d406b0b0 yury's been doing all kinds of work with the AR adapter, credit overdue 2010-06-02 00:44:44 -07:00
Brian Lopez e835c4b2b2 update readme to reflect most current state of facts 2010-06-02 00:41:04 -07:00
Brian Lopez d7e0d551f8 update files for 0.1.8 release 2010-06-02 00:37:59 -07:00
Brian Lopez e5c8f89fc9 Version bump to 0.1.8 2010-06-02 00:35:49 -07:00
Brian Lopez d3db7ec52a fixes for running benchmarks in 1.9.2 preview3 2010-06-01 23:45:48 -07:00
Brian Lopez 82718e6dad fix specs under 1.9.2 preview3 2010-06-01 23:40:16 -07:00
Brian Lopez 39c894a1bd use Time.zone instead 2010-06-01 15:01:21 -07:00
Brian Lopez c7e9ecdcbd fix timezone handling in the AR adapter 2010-06-01 11:17:59 -07:00
Brian Lopez f89d2b257b update files for 0.1.7 release 2010-05-22 12:32:27 -07:00
Brian Lopez b51d709f6e Version bump to 0.1.7 2010-05-22 12:31:58 -07:00
Brian Lopez 49e50cad14 we don't need the connection around after a disconnect 2010-05-22 11:56:23 -07:00
Brian Lopez b82e307931 more laziness clarification 2010-05-16 00:28:10 -07:00
Brian Lopez 82c40620ad some notes about being lazy 2010-05-16 00:13:18 -07:00
Brian Lopez d67e7eda20 update files for 0.1.6 release 2010-05-14 18:23:13 -07:00
Brian Lopez 1895401272 Version bump to 0.1.6 2010-05-14 18:19:27 -07:00
Brian Lopez b676a33bf9 Revert "optimize casting to it only happens for default values"
This reverts commit 48db8907be.
2010-05-14 17:37:09 -07:00
Brian Lopez 48db8907be optimize casting to it only happens for default values 2010-05-14 16:23:03 -07:00
Brian Lopez 86b9ffefe9 fix another typo in the AR adapter 2010-05-14 12:36:22 -07:00
Brian Lopez 24a6393d7f fix a few typos in the Sequel adapter 2010-05-13 02:04:49 -07:00
Brian Lopez cf87d9d783 fix typo 2010-05-13 00:18:21 -07:00
Brian Lopez 6b285dcd85 minor refactor to casting code to better match what the MysqlAdapter does, removing unneeded checks 2010-05-13 00:13:55 -07:00
Brian Lopez 1f7ff62c8b update gemspec to include new error spec 2010-05-12 23:50:00 -07:00
Brian Lopez ea56862ec4 add sql_state and error_number methods to Mysql2::Error 2010-05-12 23:40:18 -07:00
Brian Lopez 87f23f4db4 no need to force GC 2010-05-12 23:37:20 -07:00
Brian Lopez 6736071ff1 assign Qnil for safety 2010-05-12 23:05:55 -07:00
Brian Lopez 69b9c587ad make sure we raise exceptions early and often if the connection has been closed 2010-05-12 23:05:33 -07:00
Brian Lopez a577f09fb0 make sure we override index creation for mysql 2010-05-12 22:34:53 -07:00
Brian Lopez 5b41082aba use new close method for disconnecting where we can 2010-05-12 22:09:06 -07:00
Brian Lopez e01c7581e5 unfortunately ActiveRecord does casting *all over the place* so I need to also fully override type_cast_code as well 2010-05-12 21:24:52 -07:00
Brian Lopez af2dd0d7f9 give Eric props for his work 2010-05-12 14:14:52 -07:00
Brian Lopez fc6c4641e8 bump version in gemspec 2010-05-12 14:09:47 -07:00
Brian Lopez a03b776037 Version bump to 0.1.5 2010-05-12 14:09:30 -07:00
Eric Wong ec00873181 make Mysql2::Client destructor safely non-blocking
Since sending a QUIT message to the MySQL server is more of a
formality than a hard requirement in a TCP-based protocol, we'll
just fire-and-forget the message to avoid any chance of blocking
the interpreter during the GC finalizer phase.  Since the socket
will be closed immediately afterwards, there's no long-term
side-effects from making the socket non-blocking.

We do this instead of using rb_thread_blocking_region because
the GVL is already destroyed by the time the ObjectSpace
finalizers are called under 1.9.
2010-05-10 14:16:53 -07:00
Brian Lopez 46021b9351 fix boolean casts 2010-05-10 01:18:05 -07:00
Brian Lopez 1dc3410a24 finally fix casting/attributes issue due to a lexical typo 2010-05-09 23:48:49 -07:00
Brian Lopez 10df5216c8 fix gemspec 2010-05-07 08:26:06 -07:00
Brian Lopez 6e977f756f add casting support in the AR driver specifically for handling default column values - this is a temporary (but working) fix as I'm looking into how I can do this in C 2010-05-07 00:21:54 -07:00
Brian Lopez 03c8d5dcea update benchmark results in readme 2010-05-06 16:42:03 -07:00
Brian Lopez edd8aa2773 Merge remote branch 'origin/master' into thread-signal-safety 2010-05-06 16:37:02 -07:00
Brian Lopez 30e06479e0 add raw driver benchmark with casting for the mysql gem 2010-05-06 00:17:00 -07:00
Brian Lopez d9200c43b4 add raw driver benchmark with casting for the mysql gem 2010-05-06 00:09:18 -07:00
Eric Wong f2a731e0a7 Fix memory leak from the result wrapper struct itself
Data_Make_Struct always allocates memory for us, so we
need to explicitly free the pointer in the function we
pass to the GC, not just objects internal to us.

Without this change, a slow but constant growth can be
seen with the trivial code below:

    x = Mysql2::Client.new
    loop { x.query "select 1" }
2010-05-05 18:26:29 -07:00
Eric Wong 4ac62c1333 correctly free the wrapped result in case of EOF
This is a followup to aa9f435141
which made the same change 10 lines down.
2010-05-05 17:59:14 -07:00
Eric Wong 1d92db8aab add Mysql2::Client#close method
This allows users to (manually) avoid the tricky case of hitting
a socket write during GC and potentially blocking the
interpreter during GC.  An explicit `close' is also useful in
situations where server resources are limited and a client only
needs to connect for a limited time.
2010-05-05 17:38:08 -07:00