adapter_extensions 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,22 @@ module ActiveRecord #:nodoc:
23
23
  q << " (#{options[:columns].join(',')})" if options[:columns]
24
24
  execute(q)
25
25
  end
26
+
27
+ private
28
+ def connect
29
+ encoding = @config[:encoding]
30
+ if encoding
31
+ @connection.options(Mysql::SET_CHARSET_NAME, encoding) rescue nil
32
+ end
33
+ @connection.options(Mysql::OPT_LOCAL_INFILE, true)
34
+ @connection.ssl_set(@config[:sslkey], @config[:sslcert], @config[:sslca], @config[:sslcapath], @config[:sslcipher]) if @config[:sslkey]
35
+ @connection.real_connect(*@connection_options)
36
+ execute("SET NAMES '#{encoding}'") if encoding
37
+
38
+ # By default, MySQL 'where id is null' selects the last inserted id.
39
+ # Turn this off. http://dev.rubyonrails.org/ticket/6778
40
+ execute("SET SQL_AUTO_IS_NULL=0")
41
+ end
26
42
  end
27
43
  end
28
44
  end
@@ -3,7 +3,7 @@ module AdapterExtensions#:nodoc:
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 1
6
+ TINY = 2
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0.10
3
3
  specification_version: 1
4
4
  name: adapter_extensions
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
6
+ version: 0.1.2
7
7
  date: 2007-03-05 00:00:00 -05:00
8
8
  summary: Extensions to Rails ActiveRecord adapters.
9
9
  require_paths: