mysql2 0.4.2 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +231 -86
- data/ext/mysql2/client.c +527 -128
- data/ext/mysql2/client.h +11 -52
- data/ext/mysql2/extconf.rb +100 -21
- data/ext/mysql2/mysql2_ext.c +8 -2
- data/ext/mysql2/mysql2_ext.h +21 -8
- data/ext/mysql2/mysql_enc_name_to_ruby.h +60 -56
- data/ext/mysql2/mysql_enc_to_ruby.h +64 -3
- data/ext/mysql2/result.c +333 -109
- data/ext/mysql2/result.h +1 -0
- data/ext/mysql2/statement.c +247 -90
- data/ext/mysql2/statement.h +0 -2
- data/ext/mysql2/wait_for_single_fd.h +2 -1
- data/lib/mysql2/client.rb +71 -31
- data/lib/mysql2/em.rb +2 -4
- data/lib/mysql2/error.rb +52 -22
- data/lib/mysql2/result.rb +2 -0
- data/lib/mysql2/statement.rb +3 -11
- data/lib/mysql2/version.rb +1 -1
- data/lib/mysql2.rb +19 -15
- data/support/3A79BD29.asc +49 -0
- data/support/5072E1F5.asc +432 -0
- data/support/C74CD1D8.asc +104 -0
- data/support/mysql_enc_to_ruby.rb +8 -3
- data/support/ruby_enc_to_mysql.rb +7 -5
- metadata +19 -61
- data/examples/eventmachine.rb +0 -21
- data/examples/threaded.rb +0 -18
- data/spec/configuration.yml.example +0 -17
- data/spec/em/em_spec.rb +0 -135
- data/spec/my.cnf.example +0 -9
- data/spec/mysql2/client_spec.rb +0 -939
- data/spec/mysql2/error_spec.rb +0 -84
- data/spec/mysql2/result_spec.rb +0 -510
- data/spec/mysql2/statement_spec.rb +0 -684
- data/spec/rcov.opts +0 -3
- data/spec/spec_helper.rb +0 -94
- data/spec/ssl/ca-cert.pem +0 -17
- data/spec/ssl/ca-key.pem +0 -27
- data/spec/ssl/ca.cnf +0 -22
- data/spec/ssl/cert.cnf +0 -22
- data/spec/ssl/client-cert.pem +0 -17
- data/spec/ssl/client-key.pem +0 -27
- data/spec/ssl/client-req.pem +0 -15
- data/spec/ssl/gen_certs.sh +0 -48
- data/spec/ssl/pkcs8-client-key.pem +0 -28
- data/spec/ssl/pkcs8-server-key.pem +0 -28
- data/spec/ssl/server-cert.pem +0 -17
- data/spec/ssl/server-key.pem +0 -27
- data/spec/ssl/server-req.pem +0 -15
- data/spec/test_data +0 -1
data/spec/spec_helper.rb
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
require 'rspec'
|
4
|
-
require 'mysql2'
|
5
|
-
require 'timeout'
|
6
|
-
require 'yaml'
|
7
|
-
DatabaseCredentials = YAML.load_file('spec/configuration.yml')
|
8
|
-
|
9
|
-
RSpec.configure do |config|
|
10
|
-
config.disable_monkey_patching!
|
11
|
-
|
12
|
-
def with_internal_encoding(encoding)
|
13
|
-
old_enc = Encoding.default_internal
|
14
|
-
old_verbose = $VERBOSE
|
15
|
-
$VERBOSE = nil
|
16
|
-
Encoding.default_internal = encoding
|
17
|
-
$VERBOSE = old_verbose
|
18
|
-
|
19
|
-
yield
|
20
|
-
ensure
|
21
|
-
$VERBOSE = nil
|
22
|
-
Encoding.default_internal = old_enc
|
23
|
-
$VERBOSE = old_verbose
|
24
|
-
end
|
25
|
-
|
26
|
-
config.before :each do
|
27
|
-
@client = Mysql2::Client.new DatabaseCredentials['root']
|
28
|
-
end
|
29
|
-
|
30
|
-
config.after :each do
|
31
|
-
@client.close
|
32
|
-
end
|
33
|
-
|
34
|
-
config.before(:all) do
|
35
|
-
client = Mysql2::Client.new DatabaseCredentials['root']
|
36
|
-
client.query %[
|
37
|
-
CREATE TABLE IF NOT EXISTS mysql2_test (
|
38
|
-
id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
39
|
-
null_test VARCHAR(10),
|
40
|
-
bit_test BIT(64),
|
41
|
-
single_bit_test BIT(1),
|
42
|
-
tiny_int_test TINYINT,
|
43
|
-
bool_cast_test TINYINT(1),
|
44
|
-
small_int_test SMALLINT,
|
45
|
-
medium_int_test MEDIUMINT,
|
46
|
-
int_test INT,
|
47
|
-
big_int_test BIGINT,
|
48
|
-
float_test FLOAT(10,3),
|
49
|
-
float_zero_test FLOAT(10,3),
|
50
|
-
double_test DOUBLE(10,3),
|
51
|
-
decimal_test DECIMAL(10,3),
|
52
|
-
decimal_zero_test DECIMAL(10,3),
|
53
|
-
date_test DATE,
|
54
|
-
date_time_test DATETIME,
|
55
|
-
timestamp_test TIMESTAMP,
|
56
|
-
time_test TIME,
|
57
|
-
year_test YEAR(4),
|
58
|
-
char_test CHAR(10),
|
59
|
-
varchar_test VARCHAR(10),
|
60
|
-
binary_test BINARY(10),
|
61
|
-
varbinary_test VARBINARY(10),
|
62
|
-
tiny_blob_test TINYBLOB,
|
63
|
-
tiny_text_test TINYTEXT,
|
64
|
-
blob_test BLOB,
|
65
|
-
text_test TEXT,
|
66
|
-
medium_blob_test MEDIUMBLOB,
|
67
|
-
medium_text_test MEDIUMTEXT,
|
68
|
-
long_blob_test LONGBLOB,
|
69
|
-
long_text_test LONGTEXT,
|
70
|
-
enum_test ENUM('val1', 'val2'),
|
71
|
-
set_test SET('val1', 'val2'),
|
72
|
-
PRIMARY KEY (id)
|
73
|
-
)
|
74
|
-
]
|
75
|
-
client.query "DELETE FROM mysql2_test;"
|
76
|
-
client.query %[
|
77
|
-
INSERT INTO mysql2_test (
|
78
|
-
null_test, bit_test, single_bit_test, tiny_int_test, bool_cast_test, small_int_test, medium_int_test, int_test, big_int_test,
|
79
|
-
float_test, float_zero_test, double_test, decimal_test, decimal_zero_test, date_test, date_time_test, timestamp_test, time_test,
|
80
|
-
year_test, char_test, varchar_test, binary_test, varbinary_test, tiny_blob_test,
|
81
|
-
tiny_text_test, blob_test, text_test, medium_blob_test, medium_text_test,
|
82
|
-
long_blob_test, long_text_test, enum_test, set_test
|
83
|
-
)
|
84
|
-
|
85
|
-
VALUES (
|
86
|
-
NULL, b'101', b'1', 1, 1, 10, 10, 10, 10,
|
87
|
-
10.3, 0, 10.3, 10.3, 0, '2010-4-4', '2010-4-4 11:44:00', '2010-4-4 11:44:00', '11:44:00',
|
88
|
-
2009, "test", "test", "test", "test", "test",
|
89
|
-
"test", "test", "test", "test", "test",
|
90
|
-
"test", "test", 'val1', 'val1,val2'
|
91
|
-
)
|
92
|
-
]
|
93
|
-
end
|
94
|
-
end
|
data/spec/ssl/ca-cert.pem
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIICqjCCAZICCQDbDS+Z2mpWkDANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxj
|
3
|
-
YV9teXNxbDJnZW0wHhcNMTUwOTA5MDQ1NzIxWhcNMjUwNzE4MDQ1NzIxWjAXMRUw
|
4
|
-
EwYDVQQDDAxjYV9teXNxbDJnZW0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
|
5
|
-
AoIBAQDFnpc22lPFtdPELsIffsDt8cD2Hkt47nGMcKQ9n4U98yAg+fodipyP1Bn0
|
6
|
-
2OeaONqpttJIET7HxlGrtugPtV/O8XZHlhfAHrRUDMFZJhgnnqK+c/7fRGeB0Eqw
|
7
|
-
ljBlRD/dDL3bFq5hVBC9QsGi5k03r+xLPKm5ccAr4WtofcoKXqEbSO6koTSrsGG5
|
8
|
-
7inlldM2AVzrY2kXbe0jAyNvYmDL2ycN8G2wObogPWDfITQRhOxfkzKIQiEhQF2Y
|
9
|
-
/DlhT7IbIarBIm6abf6JxZ6/Sm5XyVNEWOnryXM6rKyVeGktCxLHNmxx5eKYs440
|
10
|
-
8hNgURa8pB+aZaiokkwhM1+jmE83AgMBAAEwDQYJKoZIhvcNAQELBQADggEBACrQ
|
11
|
-
umqygXkkbff5Jqf6AYi30U3c+byX+IButRKXN9Ete2LPcT76o/snS9Lexf3KQsIy
|
12
|
-
a2Tcc9adak7pBf7FgHdiZkWiQp3MDgx2gJu6Uu6TNzfT8jy2JrHyBWw4ydEvhyA8
|
13
|
-
cgelTHSaudafKeQgU4KYc8bqafYFILkWxP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END RSA PRIVATE KEY-----
|
data/spec/ssl/ca.cnf
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
|
2
|
-
[ ca ]
|
3
|
-
# January 1, 2015
|
4
|
-
default_startdate = 2015010360000Z
|
5
|
-
|
6
|
-
[ req ]
|
7
|
-
distinguished_name = req_distinguished_name
|
8
|
-
|
9
|
-
[ req_distinguished_name ]
|
10
|
-
# If this isn't set, the error is error, no objects specified in config file
|
11
|
-
commonName = Common Name (hostname, IP, or your name)
|
12
|
-
|
13
|
-
countryName_default = US
|
14
|
-
stateOrProvinceName_default = CA
|
15
|
-
localityName_default = San Francisco
|
16
|
-
0.organizationName_default = mysql2_gem
|
17
|
-
organizationalUnitName_default = Mysql2Gem
|
18
|
-
emailAddress_default = mysql2gem@example.com
|
19
|
-
|
20
|
-
|
21
|
-
commonName_default = ca_mysql2gem
|
22
|
-
|
data/spec/ssl/cert.cnf
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
|
2
|
-
[ ca ]
|
3
|
-
# January 1, 2015
|
4
|
-
default_startdate = 2015010360000Z
|
5
|
-
|
6
|
-
[ req ]
|
7
|
-
distinguished_name = req_distinguished_name
|
8
|
-
|
9
|
-
[ req_distinguished_name ]
|
10
|
-
# If this isn't set, the error is error, no objects specified in config file
|
11
|
-
commonName = Common Name (hostname, IP, or your name)
|
12
|
-
|
13
|
-
countryName_default = US
|
14
|
-
stateOrProvinceName_default = CA
|
15
|
-
localityName_default = San Francisco
|
16
|
-
0.organizationName_default = mysql2_gem
|
17
|
-
organizationalUnitName_default = Mysql2Gem
|
18
|
-
emailAddress_default = mysql2gem@example.com
|
19
|
-
|
20
|
-
|
21
|
-
commonName_default = mysql2gem.example.com
|
22
|
-
|
data/spec/ssl/client-cert.pem
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIICqzCCAZMCAQEwDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMY2FfbXlzcWwy
|
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PTk1NFaiUyM5mhSlgi0/SGPEp9JMU
|
5
|
-
uH+Uiv9UwmOFl9Em3FXQQ8SG7fV7651uAUskNgfEqoy+f+uvi1P155rHNDx7Yw6i
|
6
|
-
+wwfpLGTU0boMnLL6cO/KcIbZlx4/2Lqr5sYbpIqhz46bbG+fIhvepruH9h7WVWq
|
7
|
-
AibTqymYrA3T03O/HWTOqfq03gM7Oe3tJvJbqX2LecQvi2SbQoX8c2MrQ6X7xDe2
|
8
|
-
Ajh7Yx9DQ1gqClTglbPFHNiWPcGACg+W2ptCY/Q2SdP5h1dtj5Sw5VwL3dvCjQID
|
9
|
-
AQABoAAwDQYJKoZIhvcNAQELBQADggEBAB05YaBSyAKCgHfBWhpZ1+OOVp1anr2v
|
10
|
-
TkStnqmNrNM2qBJXjfrythPTX4EJAt7+eNdH/6IVA93qKC/EUQVuMjgfMmMUaM+m
|
11
|
-
5pqfAo95w7vUY147U9nbC+EIo2u1KOVTNTgl45H372/1vCwTHZYu2atCk4tN3ueO
|
12
|
-
0O2XW89Kq94/7PDAExN2PhZdeATVX9dPNT+7ZUDNe8cuq9v0YCHy+2JN2WkplxcG
|
13
|
-
kMyCE3YYLnd96YtWiS9DOUib3+b7FwyGe0dXeLVw1br3NZGCZrybyfmnAQfiouAF
|
14
|
-
9nMxKIpWFSx00ubGrUefOQqp6nuk27n+scgr4+d6dBXz9efEEvTbLKA=
|
15
|
-
-----END CERTIFICATE REQUEST-----
|
data/spec/ssl/gen_certs.sh
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
set -eu
|
4
|
-
|
5
|
-
echo "
|
6
|
-
[ ca ]
|
7
|
-
# January 1, 2015
|
8
|
-
default_startdate = 2015010360000Z
|
9
|
-
|
10
|
-
[ req ]
|
11
|
-
distinguished_name = req_distinguished_name
|
12
|
-
|
13
|
-
[ req_distinguished_name ]
|
14
|
-
# If this isn't set, the error is "error, no objects specified in config file"
|
15
|
-
commonName = Common Name (hostname, IP, or your name)
|
16
|
-
|
17
|
-
countryName_default = US
|
18
|
-
stateOrProvinceName_default = CA
|
19
|
-
localityName_default = San Francisco
|
20
|
-
0.organizationName_default = mysql2_gem
|
21
|
-
organizationalUnitName_default = Mysql2Gem
|
22
|
-
emailAddress_default = mysql2gem@example.com
|
23
|
-
" | tee ca.cnf cert.cnf
|
24
|
-
|
25
|
-
# The client and server certs must have a diferent common name than the CA
|
26
|
-
# to avoid "SSL connection error: error:00000001:lib(0):func(0):reason(1)"
|
27
|
-
|
28
|
-
echo "
|
29
|
-
commonName_default = ca_mysql2gem
|
30
|
-
" >> ca.cnf
|
31
|
-
|
32
|
-
echo "
|
33
|
-
commonName_default = mysql2gem.example.com
|
34
|
-
" >> cert.cnf
|
35
|
-
|
36
|
-
# Generate a set of certificates
|
37
|
-
openssl genrsa -out ca-key.pem 2048
|
38
|
-
openssl req -new -x509 -nodes -days 3600 -key ca-key.pem -out ca-cert.pem -batch -config ca.cnf
|
39
|
-
openssl req -newkey rsa:2048 -days 3600 -nodes -keyout pkcs8-server-key.pem -out server-req.pem -batch -config cert.cnf
|
40
|
-
openssl x509 -req -in server-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out server-cert.pem
|
41
|
-
openssl req -newkey rsa:2048 -days 3600 -nodes -keyout pkcs8-client-key.pem -out client-req.pem -batch -config cert.cnf
|
42
|
-
openssl x509 -req -in client-req.pem -days 3600 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -out client-cert.pem
|
43
|
-
|
44
|
-
# Convert format from PKCS#8 to PKCS#1
|
45
|
-
openssl rsa -in pkcs8-server-key.pem -out server-key.pem
|
46
|
-
openssl rsa -in pkcs8-client-key.pem -out client-key.pem
|
47
|
-
|
48
|
-
echo "done"
|
@@ -1,28 +0,0 @@
|
|
1
|
-
-----BEGIN PRIVATE KEY-----
|
2
|
-
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDVm4F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