mysql2 0.5.5 → 0.5.6
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/mysql2/client.c +19 -0
- data/ext/mysql2/extconf.rb +3 -0
- data/ext/mysql2/mysql_enc_name_to_ruby.h +4 -3
- data/ext/mysql2/mysql_enc_to_ruby.h +15 -0
- data/lib/mysql2/version.rb +1 -1
- data/support/mysql_enc_to_ruby.rb +1 -0
- data/support/ruby_enc_to_mysql.rb +1 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8e25b1a25080490b1bf04829d8f6616609391a094baa783d7da242342a4ff3b
|
4
|
+
data.tar.gz: 7dfab0d03b289b665807d21b29326b96711e5c1d3ae697e81f0e4ab7a5dd6280
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3709403d316832055596c96af2e260e3de9d181ba558f551f0d5fe0d89abfec0ea242f6c30228eac02284e1e7287cbd315933fadc517fab88a10d588c4f0d8b6
|
7
|
+
data.tar.gz: 63c17fa1c273cefa454ea7f6cc0860014514e4c899ceb1bd856271cd238938a4d0fb263118eb64dde0a9568905d6410110fbe3b8359bff3fab8314607de6dd50
|
data/README.md
CHANGED
@@ -94,7 +94,7 @@ the library file `libmysqlclient.so` but is missing the header file `mysql.h`
|
|
94
94
|
|
95
95
|
### Mac OS X
|
96
96
|
|
97
|
-
You may use
|
97
|
+
You may use Homebrew, MacPorts, or a native MySQL installer package. The most
|
98
98
|
common paths will be automatically searched. If you want to select a specific
|
99
99
|
MySQL directory, use the `--with-mysql-dir` or `--with-mysql-config` options above.
|
100
100
|
|
data/ext/mysql2/client.c
CHANGED
@@ -1435,12 +1435,31 @@ static VALUE set_charset_name(VALUE self, VALUE value) {
|
|
1435
1435
|
static VALUE set_ssl_options(VALUE self, VALUE key, VALUE cert, VALUE ca, VALUE capath, VALUE cipher) {
|
1436
1436
|
GET_CLIENT(self);
|
1437
1437
|
|
1438
|
+
#ifdef HAVE_MYSQL_SSL_SET
|
1438
1439
|
mysql_ssl_set(wrapper->client,
|
1439
1440
|
NIL_P(key) ? NULL : StringValueCStr(key),
|
1440
1441
|
NIL_P(cert) ? NULL : StringValueCStr(cert),
|
1441
1442
|
NIL_P(ca) ? NULL : StringValueCStr(ca),
|
1442
1443
|
NIL_P(capath) ? NULL : StringValueCStr(capath),
|
1443
1444
|
NIL_P(cipher) ? NULL : StringValueCStr(cipher));
|
1445
|
+
#else
|
1446
|
+
/* mysql 8.3 does not provide mysql_ssl_set */
|
1447
|
+
if (!NIL_P(key)) {
|
1448
|
+
mysql_options(wrapper->client, MYSQL_OPT_SSL_KEY, StringValueCStr(key));
|
1449
|
+
}
|
1450
|
+
if (!NIL_P(cert)) {
|
1451
|
+
mysql_options(wrapper->client, MYSQL_OPT_SSL_CERT, StringValueCStr(cert));
|
1452
|
+
}
|
1453
|
+
if (!NIL_P(ca)) {
|
1454
|
+
mysql_options(wrapper->client, MYSQL_OPT_SSL_CA, StringValueCStr(ca));
|
1455
|
+
}
|
1456
|
+
if (!NIL_P(capath)) {
|
1457
|
+
mysql_options(wrapper->client, MYSQL_OPT_SSL_CAPATH, StringValueCStr(capath));
|
1458
|
+
}
|
1459
|
+
if (!NIL_P(cipher)) {
|
1460
|
+
mysql_options(wrapper->client, MYSQL_OPT_SSL_CIPHER, StringValueCStr(cipher));
|
1461
|
+
}
|
1462
|
+
#endif
|
1444
1463
|
|
1445
1464
|
return self;
|
1446
1465
|
}
|
data/ext/mysql2/extconf.rb
CHANGED
@@ -164,6 +164,9 @@ have_const('MYSQL_OPTION_MULTI_STATEMENTS_OFF', mysql_h)
|
|
164
164
|
# to retain compatibility with the typedef in earlier MySQLs.
|
165
165
|
have_type('my_bool', mysql_h)
|
166
166
|
|
167
|
+
# detect mysql functions
|
168
|
+
have_func('mysql_ssl_set', mysql_h)
|
169
|
+
|
167
170
|
### Compiler flags to help catch errors
|
168
171
|
|
169
172
|
# This is our wishlist. We use whichever flags work on the host.
|
@@ -51,7 +51,7 @@ mysql2_mysql_enc_name_to_rb_hash (str, len)
|
|
51
51
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
52
52
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
53
53
|
74, 74, 74, 74, 74, 74, 74, 74, 15, 5,
|
54
|
-
0,
|
54
|
+
0, 30, 5, 25, 40, 10, 20, 50, 74, 74,
|
55
55
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
56
56
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
57
57
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
@@ -89,7 +89,7 @@ mysql2_mysql_enc_name_to_rb (str, len)
|
|
89
89
|
{
|
90
90
|
enum
|
91
91
|
{
|
92
|
-
TOTAL_KEYWORDS =
|
92
|
+
TOTAL_KEYWORDS = 42,
|
93
93
|
MIN_WORD_LENGTH = 3,
|
94
94
|
MAX_WORD_LENGTH = 8,
|
95
95
|
MIN_HASH_VALUE = 3,
|
@@ -133,7 +133,8 @@ mysql2_mysql_enc_name_to_rb (str, len)
|
|
133
133
|
{"big5", "Big5"},
|
134
134
|
{"euckr", "EUC-KR"},
|
135
135
|
{"latin2", "ISO-8859-2"},
|
136
|
-
{""
|
136
|
+
{"utf8mb3", "UTF-8"},
|
137
|
+
{""},
|
137
138
|
{"dec8", NULL},
|
138
139
|
{"cp850", "CP850"},
|
139
140
|
{"latin1", "ISO-8859-1"},
|
@@ -306,5 +306,20 @@ static const char *mysql2_mysql_enc_to_rb[] = {
|
|
306
306
|
"UTF-8",
|
307
307
|
"UTF-8",
|
308
308
|
"UTF-8",
|
309
|
+
"UTF-8",
|
310
|
+
"UTF-8",
|
311
|
+
"UTF-8",
|
312
|
+
"UTF-8",
|
313
|
+
"UTF-8",
|
314
|
+
"UTF-8",
|
315
|
+
"UTF-8",
|
316
|
+
"UTF-8",
|
317
|
+
"UTF-8",
|
318
|
+
"UTF-8",
|
319
|
+
"UTF-8",
|
320
|
+
"UTF-8",
|
321
|
+
"UTF-8",
|
322
|
+
"UTF-8",
|
323
|
+
"UTF-8",
|
309
324
|
"UTF-8"
|
310
325
|
};
|
data/lib/mysql2/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Lopez
|
8
8
|
- Aaron Stone
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description:
|
14
|
+
description:
|
15
15
|
email:
|
16
16
|
- seniorlopez@gmail.com
|
17
17
|
- aaron@serendipity.cx
|
@@ -57,12 +57,12 @@ licenses:
|
|
57
57
|
- MIT
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/brianmario/mysql2/issues
|
60
|
-
changelog_uri: https://github.com/brianmario/mysql2/releases/tag/0.5.
|
61
|
-
documentation_uri: https://www.rubydoc.info/gems/mysql2/0.5.
|
60
|
+
changelog_uri: https://github.com/brianmario/mysql2/releases/tag/0.5.6
|
61
|
+
documentation_uri: https://www.rubydoc.info/gems/mysql2/0.5.6
|
62
62
|
homepage_uri: https://github.com/brianmario/mysql2
|
63
|
-
source_code_uri: https://github.com/brianmario/mysql2/tree/0.5.
|
63
|
+
source_code_uri: https://github.com/brianmario/mysql2/tree/0.5.6
|
64
64
|
msys2_mingw_dependencies: libmariadbclient
|
65
|
-
post_install_message:
|
65
|
+
post_install_message:
|
66
66
|
rdoc_options:
|
67
67
|
- "--charset=UTF-8"
|
68
68
|
require_paths:
|
@@ -78,8 +78,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
rubygems_version: 3.0.
|
82
|
-
signing_key:
|
81
|
+
rubygems_version: 3.6.0.dev
|
82
|
+
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
85
85
|
test_files: []
|