Commit Graph

116 Commits

Author SHA1 Message Date
Brian Lopez f6d7e877b2 Merge branch 'master' into stmt
* master:
  only use wait_timeout if it's a Fixnum
  update gemspec from file updates
  no need to invalidate the FD now that we're only modifying it once, in one place
  no need to check if the FD is >= 0 now that we centralized the close/free logic. Once closed, none of that code will run again
  wording fix in readme
2010-10-18 12:15:35 -07:00
Brian Lopez 0b3b63305e only use wait_timeout if it's a Fixnum 2010-10-18 12:15:16 -07:00
Brian Lopez ddcd1064cd Merge branch 'master' into stmt
* master:
  avoid potential race-condition with closing a connection
  add option for setting the wait_timeout in the AR adapter (this can be done in database.yml)
  add some more defaults to the connect flags
  add connect_flags to default options and add REMEMBER_OPTIONS to that list. fix NUM2INT to be NUM2ULONG as it should be for flags
  free the client after close if we can
  forgot to remove this
  get rid of double-pointer casting
  a couple of minor updates to connection management with some specs
  check for error from mysql_affected_rows call
  change connection check symantecs
2010-10-15 16:19:11 -07:00
Brian Lopez 832eb2d247 add option for setting the wait_timeout in the AR adapter (this can be done in database.yml) 2010-10-15 07:45:07 -07:00
Brian Lopez c394122fd9 add some more defaults to the connect flags 2010-10-14 23:38:25 -07:00
Brian Lopez a6b5e9c28c add connect_flags to default options and add REMEMBER_OPTIONS to that list. fix NUM2INT to be NUM2ULONG as it should be for flags 2010-10-14 08:12:52 -07:00
Brian Lopez 7b6d210c97 Merge branch 'master' into stmt
* master:
  Detach before executing callbacks.
  make sure we don't hit a race condition if this EM spec is taking longer to run than normal
  was in a hurry earlier
  whoops, lost this line in a previous patch
  Dry windows configuration options
  Inject 1.8/1.9 pure-ruby entry point during xcompile
  Use MySQL 5.1.51 now from available mirror
2010-10-05 17:14:45 -07:00
Anton Mironov 687487d5a5 Detach before executing callbacks.
This allows to make queries in callbacks.
2010-09-28 13:47:19 +08:00
Brian Lopez 39a28c4a91 Merge branch 'master' into stmt 2010-09-24 14:39:21 -07:00
Brian Lopez 50775163ed prepare for 0.2.4 release 2010-09-17 10:19:16 -07:00
Kouhei Yanagita 0f0bd5a001 set IndexDefinition#length 2010-09-15 00:38:39 +08:00
Brian Lopez 98fbeb6f64 add aliases for Mysql compatibility 2010-09-01 11:42:16 -07:00
Brian Lopez ae6c33a13f add cache_rows option to enable/disable internal row caching for results 2010-08-27 12:08:48 -07:00
Brian Lopez 39ea9c6bdb Merge branch 'master' into stmt 2010-08-20 20:24:37 -07:00
Brian Lopez 17cabf5559 update files for 0.2.3 release 2010-08-20 20:24:00 -07:00
Brian Lopez a19888e939 Make sure we switch over to the DateTime class for DATETIME/TIMESTAMP columns that are out of the supported range for 32bit platforms 2010-08-20 12:07:27 -07:00
Aaron Patterson c5f2eb7f3f adding FOUND_ROWS to the client flags 2010-08-20 10:14:49 -07:00
Brian Lopez 9a84f88d90 Merge branch 'master' into stmt 2010-08-20 10:07:26 -07:00
Aaron Patterson ce77899848 connection flags can be passed to the constructor 2010-08-20 09:56:36 -07:00
Aaron Patterson 864cf0f291 exposing client flags 2010-08-20 09:36:15 -07:00
Brian Lopez 4935931431 update files for 0.2.2 release 2010-08-19 16:03:43 -07:00
Brian Lopez d990f68320 slight refactor of how initial commands were being sent 2010-08-18 12:50:03 -07:00
Brian Lopez 60c33be87c multiple variable assignments can done in a single query 2010-08-17 22:55:31 -07:00
Brian Lopez d962ef2583 update files for 0.2.1 release 2010-08-16 14:47:17 -07:00
Brian Lopez 95fb97dc2b add AR mysql2 adatper back 2010-08-16 14:43:48 -07:00
Brian Lopez 91671e0d9a update files for 0.2.0 release 2010-08-16 12:38:08 -07:00
Brian Lopez 731b456862 bring over latest from master 2010-08-16 02:10:10 -07:00
Brian Lopez cebf9af068 Wrap the MYSQL* again so we can:
1) let mysql_init/mysql_close take care of any/all allocation, thread state and freeing
2) for faster access to the encoding and active state variables for the connection
2010-08-16 02:03:19 -07:00
Brian Lopez 0bab31a61f mysql2 adapter moved into AR3 core 2010-08-09 14:52:45 -07:00
Brian Lopez 8aa1e9bb65 Merge branch 'master' into stmt
* master:
  remove Sequel adapter as it's now in Sequel core :)
  move -Wextra to development flags area
  update AR adapter to reflect timezone setting update
  application_timezone is allowed to be nil
  default application_timezone to nil
  sync up with sequel adapter from my Sequel fork until it's officially merged in
  convert :timezone option into two new ones :database_timezone - the timezone (:utc or :local) Mysql2 will assume time/datetime fields are stored in the db. This modifies what initial timezone your Time objects will be in when creating them from libmysql in C and :application_timezone - the timezone (:utc or :local) you'd finally like the Time objects converted to before you get them
  can't call literal here because it'll try to join it's own thread
  Mysql2::Client uses the :username key, set it to :user if that was used instead
  heh
  fix typo in comment
  major refactor of Sequel adapter - it's now green in Sequel
  add :cast_booleans option for automatically casting tinyint(1) fields into true/false for ruby
  move most previously global symbols to static to prevent conflicts (thanks for catching this Eric)
  respect :symbolize_keys option for Mysql2::Result#fields if it's called before the first row is built
  initialize @active early on to prevent warnings later
  let's try that again - libmysql only allows one query be sent at a time per connection, bail early if that's attempted
  Revert "libmysql only allows one query be sent at a time per connection, bail early if that's attempted"
  libmysql only allows one query be sent at a time per connection, bail early if that's attempted
  no need to carry over options twice as we're already doing it up in rb_mysql_client_async_result
2010-08-06 12:47:50 -07:00
Brian Lopez 7bf9889103 remove Sequel adapter as it's now in Sequel core :) 2010-08-06 12:47:25 -07:00
Brian Lopez 2527454b26 update AR adapter to reflect timezone setting update 2010-08-06 00:01:24 -07:00
Brian Lopez 957b0bac1b default application_timezone to nil 2010-08-05 23:09:13 -07:00
Brian Lopez f4fb9e8034 sync up with sequel adapter from my Sequel fork until it's officially merged in 2010-08-05 22:53:36 -07:00
Brian Lopez ad34357e57 convert :timezone option into two new ones
:database_timezone - the timezone (:utc or :local) Mysql2 will assume time/datetime fields are stored in the db. This modifies what initial timezone your Time objects will be in when creating them from libmysql in C
and
:application_timezone - the timezone (:utc or :local) you'd finally like the Time objects converted to before you get them
2010-08-05 22:50:45 -07:00
Brian Lopez 1bdf44ce7f can't call literal here because it'll try to join it's own thread 2010-08-05 01:20:42 -07:00
Brian Lopez 04932b549b Mysql2::Client uses the :username key, set it to :user if that was used instead 2010-08-05 01:20:15 -07:00
Brian Lopez 93fabe2b24 heh 2010-08-05 00:45:56 -07:00
Brian Lopez 86302eb1f1 fix typo in comment 2010-08-05 00:45:33 -07:00
Brian Lopez d1b2f98b7c major refactor of Sequel adapter - it's now green in Sequel 2010-08-05 00:44:01 -07:00
Brian Lopez 2514fafa53 add :cast_booleans option for automatically casting tinyint(1) fields into true/false for ruby 2010-08-05 00:39:11 -07:00
Brian Lopez 923393351a initialize @active early on to prevent warnings later 2010-08-03 20:45:00 -07:00
Brian Lopez ee4fd98611 Merge branch 'master' into stmt 2010-08-02 10:04:07 -07:00
Brian Lopez 074885cca1 cleanup in AR adapter 2010-08-02 01:26:15 -07:00
Brian Lopez 00ab233606 remove performance overrides of select_one, select_value, and select_values in the AR adapter for now 2010-08-02 01:26:04 -07:00
Brian Lopez 1086233cc3 bugfix for how arel resolves compiler paths 2010-08-02 01:21:09 -07:00
Brian Lopez fc6c24a20c add support for configuring which timezone Time objects should be created in 2010-08-02 01:20:03 -07:00
Brian Lopez 36c243be71 Add cascading options hash at Mysql2::Client.default_query_options, which can be overridden by passing options to Mysql2::Client#query and/or Mysql2::Result#each
Tune up specs, benchmarks and AR adapter to conform
2010-08-01 20:20:48 -07:00
Brian Lopez d20bc8dc8b bring in latest from master (specifically the split out of Mysql2::Result into it's own C file) 2010-07-30 13:58:48 -07:00
Brian Lopez 89401acff4 make sure we tell AR the proper attribute types for SET and BIT fields as well 2010-07-28 14:54:33 -07:00