mysql2 0.2.11 → 0.2.12
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 +4 -0
- data/ext/mysql2/result.c +6 -1
- data/lib/active_record/connection_adapters/mysql2_adapter.rb +1 -1
- data/lib/mysql2/version.rb +1 -1
- metadata +5 -5
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.12 (August 16th, 2011)
|
|
4
|
+
* ensure symbolized column names support encodings in 1.9
|
|
5
|
+
* plugging sql vulnerability in mysql2 adapter
|
|
6
|
+
|
|
3
7
|
## 0.2.11 (June 17th, 2011)
|
|
4
8
|
* fix bug in Time/DateTime range detection
|
|
5
9
|
* (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(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: 15
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 12
|
|
10
|
+
version: 0.2.12
|
|
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-16 00:00:00 -07:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
221
221
|
requirements: []
|
|
222
222
|
|
|
223
223
|
rubyforge_project:
|
|
224
|
-
rubygems_version: 1.
|
|
224
|
+
rubygems_version: 1.6.2
|
|
225
225
|
signing_key:
|
|
226
226
|
specification_version: 3
|
|
227
227
|
summary: A simple, fast Mysql library for Ruby, binding to libmysql
|