mysql2 0.3.6 → 0.3.7
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.md +10 -0
- data/ext/mysql2/result.c +6 -1
- data/lib/mysql2/version.rb +1 -1
- metadata +5 -5
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.3.7 (August 16th, 2011)
|
4
|
+
* ensure symbolized column names support encodings in 1.9
|
5
|
+
|
3
6
|
## 0.3.6 (June 17th, 2011)
|
4
7
|
* fix bug in Time/DateTime range detection
|
5
8
|
* (win32) fix bug where the Mysql2::Client object wasn't cleaned up properly if interrupted during a query
|
@@ -33,6 +36,13 @@
|
|
33
36
|
* BREAKING CHANGE: the ActiveRecord adapter has been pulled into Rails 3.1 and is no longer part of the gem
|
34
37
|
* added Mysql2::Client.escape (class-level) for raw one-off non-encoding-aware escaping
|
35
38
|
|
39
|
+
## 0.2.13 (August 16th, 2011)
|
40
|
+
* fix stupid bug around symbol encoding support (thanks coderrr!)
|
41
|
+
|
42
|
+
## 0.2.12 (August 16th, 2011)
|
43
|
+
* ensure symbolized column names support encodings in 1.9
|
44
|
+
* plugging sql vulnerability in mysql2 adapter
|
45
|
+
|
36
46
|
## 0.2.11 (June 17th, 2011)
|
37
47
|
* fix bug in Time/DateTime range detection
|
38
48
|
* (win32) fix bug where the Mysql2::Client object wasn't cleaned up properly if interrupted during a query
|
data/ext/mysql2/result.c
CHANGED
@@ -114,10 +114,15 @@ static VALUE rb_mysql_result_fetch_field(VALUE self, unsigned int idx, short int
|
|
114
114
|
|
115
115
|
field = mysql_fetch_field_direct(wrapper->result, idx);
|
116
116
|
if (symbolize_keys) {
|
117
|
+
VALUE colStr;
|
117
118
|
char buf[field->name_length+1];
|
118
119
|
memcpy(buf, field->name, field->name_length);
|
119
120
|
buf[field->name_length] = 0;
|
120
|
-
|
121
|
+
colStr = rb_str_new2(buf);
|
122
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
123
|
+
rb_enc_associate(colStr, rb_utf8_encoding());
|
124
|
+
#endif
|
125
|
+
rb_field = ID2SYM(rb_to_id(colStr));
|
121
126
|
} else {
|
122
127
|
rb_field = rb_str_new(field->name, field->name_length);
|
123
128
|
#ifdef HAVE_RUBY_ENCODING_H
|
data/lib/mysql2/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 7
|
10
|
+
version: 0.3.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Lopez
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-17 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
219
|
requirements: []
|
220
220
|
|
221
221
|
rubyforge_project:
|
222
|
-
rubygems_version: 1.
|
222
|
+
rubygems_version: 1.6.2
|
223
223
|
signing_key:
|
224
224
|
specification_version: 3
|
225
225
|
summary: A simple, fast Mysql library for Ruby, binding to libmysql
|