mysql2 0.3.19-x86-mingw32 → 0.3.20-x86-mingw32
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/ext/mysql2/client.c +19 -11
- data/ext/mysql2/extconf.rb +17 -11
- data/lib/mysql2/1.8/mysql2.so +0 -0
- data/lib/mysql2/1.9/mysql2.so +0 -0
- data/lib/mysql2/2.0/mysql2.so +0 -0
- data/lib/mysql2/2.1/mysql2.so +0 -0
- data/lib/mysql2/2.2/mysql2.so +0 -0
- data/lib/mysql2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aefc5d46127e829314065d19ae64c84e7f94bccc
|
4
|
+
data.tar.gz: 577f87d2413fc5539361909f2953233d1b7b11a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f69715c0ecdfd4e6991d548db3d5d3da19af1ec963f85e5032bf50010c0e3bbdb4b849531b649cb36ca340d7e86b4119319026a9031b4e5efdab860a42eab8f9
|
7
|
+
data.tar.gz: a2279aeef802f2a792761a4ec0451403fefaae1c088ace2dcb5b40a53cf122e32091e9b0c94a9a77532bbef97a1398d8176b5482166c58d198745c50dd4021dd
|
data/ext/mysql2/client.c
CHANGED
@@ -182,23 +182,31 @@ static void *nogvl_connect(void *ptr) {
|
|
182
182
|
*/
|
183
183
|
static VALUE invalidate_fd(int clientfd)
|
184
184
|
{
|
185
|
-
#ifdef
|
185
|
+
#ifdef O_CLOEXEC
|
186
186
|
/* Atomically set CLOEXEC on the new FD in case another thread forks */
|
187
187
|
int sockfd = open("/dev/null", O_RDWR | O_CLOEXEC);
|
188
|
-
if (sockfd < 0) {
|
189
|
-
/* Maybe SOCK_CLOEXEC is defined but not available on this kernel */
|
190
|
-
int sockfd = open("/dev/null", O_RDWR);
|
191
|
-
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
|
192
|
-
}
|
193
188
|
#else
|
194
|
-
/* Well we don't have
|
195
|
-
int sockfd =
|
196
|
-
fcntl(sockfd, F_SETFD, FD_CLOEXEC);
|
189
|
+
/* Well we don't have O_CLOEXEC, trigger the fallback code below */
|
190
|
+
int sockfd = -1;
|
197
191
|
#endif
|
198
192
|
|
199
193
|
if (sockfd < 0) {
|
200
|
-
/*
|
201
|
-
*
|
194
|
+
/* Either O_CLOEXEC wasn't defined at compile time, or it was defined at
|
195
|
+
* compile time, but isn't available at run-time. So we'll just be quick
|
196
|
+
* about setting FD_CLOEXEC now.
|
197
|
+
*/
|
198
|
+
int flags;
|
199
|
+
sockfd = open("/dev/null", O_RDWR);
|
200
|
+
flags = fcntl(sockfd, F_GETFD);
|
201
|
+
/* Do the flags dance in case there are more defined flags in the future */
|
202
|
+
if (flags != -1) {
|
203
|
+
flags |= FD_CLOEXEC;
|
204
|
+
fcntl(sockfd, F_SETFD, flags);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
|
208
|
+
if (sockfd < 0) {
|
209
|
+
/* Cannot raise here, because one or both of the following may be true:
|
202
210
|
* a) we have no GVL (in C Ruby)
|
203
211
|
* b) are running as a GC finalizer
|
204
212
|
*/
|
data/ext/mysql2/extconf.rb
CHANGED
@@ -3,12 +3,11 @@ require 'mkmf'
|
|
3
3
|
|
4
4
|
def asplode lib
|
5
5
|
if RUBY_PLATFORM =~ /mingw|mswin/
|
6
|
-
abort "-----\n#{lib} is missing.
|
6
|
+
abort "-----\n#{lib} is missing. Check your installation of MySQL or Connector/C, and try again.\n-----"
|
7
7
|
elsif RUBY_PLATFORM =~ /darwin/
|
8
|
-
abort "-----\n#{lib} is missing.
|
8
|
+
abort "-----\n#{lib} is missing. You may need to 'brew install mysql' or 'port install mysql', and try again.\n-----"
|
9
9
|
else
|
10
|
-
abort "-----\n#{lib} is missing.
|
11
|
-
'yum install mysql-devel', check your installation of mysql and try again.\n-----"
|
10
|
+
abort "-----\n#{lib} is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.\n-----"
|
12
11
|
end
|
13
12
|
end
|
14
13
|
|
@@ -73,15 +72,22 @@ elsif mc = (with_config('mysql-config') || Dir[GLOB].first)
|
|
73
72
|
rpath_dir = libs
|
74
73
|
else
|
75
74
|
inc, lib = dir_config('mysql', '/usr/local')
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
75
|
+
unless find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql")
|
76
|
+
found = false
|
77
|
+
# For some systems and some versions of libmysqlclient, there were extra
|
78
|
+
# libraries needed to link. Try each typical extra library, add it to the
|
79
|
+
# global compile flags, and see if that allows us to link libmysqlclient.
|
80
|
+
warn "-----\nlibmysqlclient is missing. Trying again with extra runtime libraries...\n-----"
|
81
|
+
|
82
|
+
%w{ m z socket nsl mygcc }.each do |extra_lib|
|
83
|
+
if have_library(extra_lib) && find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql")
|
84
|
+
found = true
|
85
|
+
break
|
86
|
+
end
|
87
|
+
end
|
88
|
+
asplode('libmysqlclient') unless found
|
81
89
|
end
|
82
90
|
|
83
|
-
asplode("mysql client") unless found
|
84
|
-
|
85
91
|
rpath_dir = lib
|
86
92
|
end
|
87
93
|
|
data/lib/mysql2/1.8/mysql2.so
CHANGED
Binary file
|
data/lib/mysql2/1.9/mysql2.so
CHANGED
Binary file
|
data/lib/mysql2/2.0/mysql2.so
CHANGED
Binary file
|
data/lib/mysql2/2.1/mysql2.so
CHANGED
Binary file
|
data/lib/mysql2/2.2/mysql2.so
CHANGED
Binary file
|
data/lib/mysql2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.20
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Brian Lopez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|