mysql2 0.4.10-x86-mswin32-60 → 0.5.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +19 -6
- data/examples/eventmachine.rb +0 -2
- data/examples/threaded.rb +2 -4
- data/ext/mysql2/client.c +100 -51
- data/ext/mysql2/client.h +1 -39
- data/ext/mysql2/extconf.rb +22 -20
- data/ext/mysql2/mysql2_ext.c +2 -1
- data/ext/mysql2/mysql2_ext.h +8 -4
- data/ext/mysql2/result.c +15 -75
- data/ext/mysql2/result.h +2 -3
- data/ext/mysql2/statement.c +51 -66
- data/ext/mysql2/statement.h +0 -2
- data/ext/mysql2/wait_for_single_fd.h +2 -1
- data/lib/mysql2.rb +14 -15
- 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/2.3/mysql2.so +0 -0
- data/lib/mysql2/2.4/mysql2.so +0 -0
- data/lib/mysql2/2.5/mysql2.so +0 -0
- data/lib/mysql2/client.rb +33 -27
- data/lib/mysql2/em.rb +2 -4
- data/lib/mysql2/error.rb +49 -20
- data/lib/mysql2/mysql2.rb +0 -2
- data/lib/mysql2/result.rb +2 -0
- data/lib/mysql2/statement.rb +3 -9
- data/lib/mysql2/version.rb +1 -1
- data/spec/em/em_spec.rb +5 -6
- data/spec/mysql2/client_spec.rb +206 -173
- data/spec/mysql2/error_spec.rb +0 -4
- data/spec/mysql2/result_spec.rb +94 -154
- data/spec/mysql2/statement_spec.rb +101 -169
- data/spec/spec_helper.rb +6 -2
- data/support/mysql_enc_to_ruby.rb +2 -2
- data/support/ruby_enc_to_mysql.rb +5 -5
- data/vendor/README +8 -2
- metadata +10 -7
- data/lib/mysql2/1.8/mysql2.so +0 -0
- data/lib/mysql2/1.9/mysql2.so +0 -0
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
1
|
require 'rspec'
|
4
2
|
require 'mysql2'
|
5
3
|
require 'timeout'
|
@@ -36,6 +34,12 @@ RSpec.configure do |config|
|
|
36
34
|
end
|
37
35
|
end
|
38
36
|
|
37
|
+
def num_classes
|
38
|
+
# rubocop:disable Lint/UnifiedInteger
|
39
|
+
0.class == Integer ? [Integer] : [Fixnum, Bignum]
|
40
|
+
# rubocop:enable Lint/UnifiedInteger
|
41
|
+
end
|
42
|
+
|
39
43
|
config.before :each do
|
40
44
|
@client = new_client
|
41
45
|
end
|
@@ -45,8 +45,8 @@ mysql_to_rb = {
|
|
45
45
|
"eucjpms" => "eucJP-ms",
|
46
46
|
}
|
47
47
|
|
48
|
-
client = Mysql2::Client.new(:
|
49
|
-
collations = client.query "SHOW COLLATION", :
|
48
|
+
client = Mysql2::Client.new(username: user, password: pass, host: host, port: port.to_i)
|
49
|
+
collations = client.query "SHOW COLLATION", as: :array
|
50
50
|
encodings = Array.new(collations.to_a.last[2].to_i)
|
51
51
|
encodings_with_nil = Array.new(encodings.size)
|
52
52
|
|
@@ -40,7 +40,7 @@ mysql_to_rb = {
|
|
40
40
|
"eucjpms" => "eucJP-ms",
|
41
41
|
}
|
42
42
|
|
43
|
-
puts <<-
|
43
|
+
puts <<-HEADER
|
44
44
|
%readonly-tables
|
45
45
|
%enum
|
46
46
|
%define lookup-function-name mysql2_mysql_enc_name_to_rb
|
@@ -48,13 +48,13 @@ puts <<-header
|
|
48
48
|
%struct-type
|
49
49
|
struct mysql2_mysql_enc_name_to_rb_map { const char *name; const char *rb_name; }
|
50
50
|
%%
|
51
|
-
|
51
|
+
HEADER
|
52
52
|
|
53
53
|
mysql_to_rb.each do |mysql, ruby|
|
54
|
-
if ruby.nil?
|
55
|
-
|
54
|
+
name = if ruby.nil?
|
55
|
+
"NULL"
|
56
56
|
else
|
57
|
-
|
57
|
+
"\"#{ruby}\""
|
58
58
|
end
|
59
59
|
|
60
60
|
puts "#{mysql}, #{name}"
|
data/vendor/README
CHANGED
@@ -6,7 +6,7 @@ doubt, this particular copy of the software is released
|
|
6
6
|
under the version 2 of the GNU General Public License.
|
7
7
|
MySQL Connector/C is brought to you by Oracle.
|
8
8
|
|
9
|
-
Copyright (c) 2000,
|
9
|
+
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
10
10
|
|
11
11
|
License information can be found in the COPYING file.
|
12
12
|
|
@@ -51,7 +51,13 @@ DOCUMENTATION LOCATION
|
|
51
51
|
|
52
52
|
You may also find the latest copy of the documentation on
|
53
53
|
the MySQL website at
|
54
|
-
<http://dev.mysql.com/doc/connector-c/en/index.html
|
54
|
+
<http://dev.mysql.com/doc/connector-c/en/index.html>.
|
55
|
+
|
56
|
+
For the new features/bugfix history, see release notes at
|
57
|
+
<https://dev.mysql.com/doc/relnotes/connector-c/en/news-6-1.html>.
|
58
|
+
|
59
|
+
For installation instructions see
|
60
|
+
<https://dev.mysql.com/doc/connector-c/en/connector-c-installation.html>.
|
55
61
|
|
56
62
|
|
57
63
|
***************************************************************
|
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.
|
4
|
+
version: 0.5.0
|
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:
|
12
|
+
date: 2018-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|
@@ -39,12 +39,12 @@ files:
|
|
39
39
|
- ext/mysql2/statement.h
|
40
40
|
- ext/mysql2/wait_for_single_fd.h
|
41
41
|
- lib/mysql2.rb
|
42
|
-
- lib/mysql2/1.8/mysql2.so
|
43
|
-
- lib/mysql2/1.9/mysql2.so
|
44
42
|
- lib/mysql2/2.0/mysql2.so
|
45
43
|
- lib/mysql2/2.1/mysql2.so
|
46
44
|
- lib/mysql2/2.2/mysql2.so
|
47
45
|
- lib/mysql2/2.3/mysql2.so
|
46
|
+
- lib/mysql2/2.4/mysql2.so
|
47
|
+
- lib/mysql2/2.5/mysql2.so
|
48
48
|
- lib/mysql2/client.rb
|
49
49
|
- lib/mysql2/console.rb
|
50
50
|
- lib/mysql2/em.rb
|
@@ -83,7 +83,7 @@ files:
|
|
83
83
|
- support/ruby_enc_to_mysql.rb
|
84
84
|
- vendor/README
|
85
85
|
- vendor/libmysql.dll
|
86
|
-
homepage:
|
86
|
+
homepage: https://github.com/brianmario/mysql2
|
87
87
|
licenses:
|
88
88
|
- MIT
|
89
89
|
metadata: {}
|
@@ -110,7 +110,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version: '0'
|
113
|
+
version: '2.0'
|
114
|
+
- - "<"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '2.6'
|
114
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
118
|
requirements:
|
116
119
|
- - ">="
|
@@ -118,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
121
|
version: '0'
|
119
122
|
requirements: []
|
120
123
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.7.3
|
122
125
|
signing_key:
|
123
126
|
specification_version: 4
|
124
127
|
summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
data/lib/mysql2/1.8/mysql2.so
DELETED
Binary file
|
data/lib/mysql2/1.9/mysql2.so
DELETED
Binary file
|