mysql2 0.5.1-x86-mswin32-60 → 0.5.2-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3742289f5034fac7e4bba5286607f8ad0819260363fc56fdeeb29ff7ca75d79f
4
- data.tar.gz: 6149fe0004bded93e643d742645a79cf49d4de4726fbede5b682b9945088385c
3
+ metadata.gz: ebfb351abe5637978610599a9ce3a47aa8774d86d879b2c92c1a51e3e2e0d81f
4
+ data.tar.gz: c252ad77e07a25fa2335124a6df8b21062b0c8cc09d9ba6caf8c26de05ecc2af
5
5
  SHA512:
6
- metadata.gz: 2d7041de3f662d2b8586ca632cb938922ec0535b6144af7602be5f63317bec30cc9a06c3b50d1b9c3a43e332b7fe3bc1906f11b62f27ec1fc66a8c105eb5b04e
7
- data.tar.gz: a7f387554e25f1fd967c2919699e44e0a1257cb072bcd20cb8f06ffb4931f83526296c5b10830a00cc17a4f9faeb9e92296098d6c2357a0482cdac3be9f76c82
6
+ metadata.gz: 7d60ba9e02a66f37a32d170ab9b13b5ca9b8765407f65d19b094401643f5eaff245baeac0df65fdd4c8c9a0a2135148c3dbba70874f880a1ce3ff14c84b91121
7
+ data.tar.gz: f8c17a32ec8be8dd6299b6b955579b23376101856562971e230f565b2c04b2ecae877526cbf7383e4e49015315118803f6957c55eb31fb5950db86e8aec9b561
data/README.md CHANGED
@@ -74,10 +74,11 @@ To see line numbers in backtraces, declare these environment variables
74
74
 
75
75
  ### Linux and other Unixes
76
76
 
77
- You may need to install a package such as `libmysqlclient-dev` or `mysql-devel`;
78
- refer to your distribution's package guide to find the particular package.
79
- The most common issue we see is a user who has the library file `libmysqlclient.so` but is
80
- missing the header file `mysql.h` -- double check that you have the _-dev_ packages installed.
77
+ You may need to install a package such as `libmysqlclient-dev`, `mysql-devel`,
78
+ or `default-libmysqlclient-dev`; refer to your distribution's package guide to
79
+ find the particular package. The most common issue we see is a user who has
80
+ the library file `libmysqlclient.so` but is missing the header file `mysql.h`
81
+ -- double check that you have the _-dev_ packages installed.
81
82
 
82
83
  ### Mac OS X
83
84
 
@@ -245,5 +245,15 @@ static const char *mysql2_mysql_enc_to_rb[] = {
245
245
  "UTF-8",
246
246
  "UTF-8",
247
247
  "UTF-8",
248
+ "UTF-8",
249
+ NULL,
250
+ NULL,
251
+ NULL,
252
+ NULL,
253
+ NULL,
254
+ NULL,
255
+ NULL,
248
256
  "UTF-8"
249
257
  };
258
+
259
+ #define CHARSETNR_SIZE (sizeof(mysql2_mysql_enc_to_rb)/sizeof(mysql2_mysql_enc_to_rb[0]))
@@ -179,7 +179,8 @@ static VALUE mysql2_set_field_string_encoding(VALUE val, MYSQL_FIELD field, rb_e
179
179
  const char *enc_name;
180
180
  int enc_index;
181
181
 
182
- enc_name = mysql2_mysql_enc_to_rb[field.charsetnr-1];
182
+ enc_name = (field.charsetnr-1 < CHARSETNR_SIZE) ? mysql2_mysql_enc_to_rb[field.charsetnr-1] : NULL;
183
+
183
184
  if (enc_name != NULL) {
184
185
  /* use the field encoding we were able to match */
185
186
  enc_index = rb_enc_find_index(enc_name);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module Mysql2
2
- VERSION = "0.5.1".freeze
2
+ VERSION = "0.5.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Brian Lopez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-11 00:00:00.000000000 Z
12
+ date: 2018-07-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: