sequel 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +4 -0
- data/lib/sequel/adapters/mysql.rb +10 -5
- data/lib/sequel/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -99,6 +99,11 @@ module Sequel
|
|
99
99
|
conn = Mysql.init
|
100
100
|
conn.options(Mysql::READ_DEFAULT_GROUP, opts[:config_default_group] || "client")
|
101
101
|
conn.options(Mysql::OPT_LOCAL_INFILE, opts[:config_local_infile]) if opts.has_key?(:config_local_infile)
|
102
|
+
if encoding = opts[:encoding] || opts[:charset]
|
103
|
+
# Set encoding before connecting so that the mysql driver knows what
|
104
|
+
# encoding we want to use, but this can be overridden by READ_DEFAULT_GROUP.
|
105
|
+
conn.options(Mysql::SET_CHARSET_NAME, encoding)
|
106
|
+
end
|
102
107
|
conn.real_connect(
|
103
108
|
opts[:host] || 'localhost',
|
104
109
|
opts[:user],
|
@@ -110,11 +115,11 @@ module Sequel
|
|
110
115
|
Mysql::CLIENT_MULTI_STATEMENTS +
|
111
116
|
(opts[:compress] == false ? 0 : Mysql::CLIENT_COMPRESS)
|
112
117
|
)
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
+
# Set encoding a slightly different way after connecting,
|
119
|
+
# in case the READ_DEFAULT_GROUP overrode the provided encoding.
|
120
|
+
# Doesn't work across implicit reconnects, but Sequel doesn't turn on
|
121
|
+
# that feature.
|
122
|
+
conn.query("set names #{literal(encoding.to_s)}") if encoding
|
118
123
|
|
119
124
|
# increase timeout so mysql server doesn't disconnect us
|
120
125
|
conn.query("set @@wait_timeout = #{opts[:timeout] || 2592000}")
|
data/lib/sequel/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.12.
|
4
|
+
version: 3.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-06-
|
12
|
+
date: 2010-06-09 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|