do_mysql 0.10.14-x86-mswin32-60 → 0.10.15-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
  SHA1:
3
- metadata.gz: 160fbc70f457991c2bc08f6774058a59c15fbe3d
4
- data.tar.gz: dff4b0ea21b23dad7621c72cca993ff06ed162dd
3
+ metadata.gz: c547e9fd60adf6cd31e7778c5ad4aac804cf2069
4
+ data.tar.gz: eed4718743442a9a16c12be8f60139f93089310c
5
5
  SHA512:
6
- metadata.gz: 731ec6227cf63cea288af68f2cef0df670a046091ddeb304ab258ba36405294f45eb2822786850954ef8de7cf47ce25ca990ec4eaa622798d9f8711043b4416d
7
- data.tar.gz: 2de9115c1ae6ccf8813504fea93333899a2cfcb8187529c37e90f84e0e77d4b6a8e6e3d2f7967d6877209c74d14d8f41d369eeac6bcfe93aeb601c55e7bcc0fc
6
+ metadata.gz: 58ad81a47b44809af72f0402a97261d3c3cadf04e84c90227565edb83865af138caba2a354afecea87b6370936eaee293d3b4301a79490c24285857a4d011178
7
+ data.tar.gz: f21467c8d591b624e5a247c3fbcaa2415824bec4fe983879ce18fa79e0c641b8b580a83d8cefe5e82d207951fbc74888e831fe98a0edc8bc303f27ea7a159842
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.10.15 2015-02-15
2
+
3
+ * Ruby 2.2 support
4
+ * utf8mb4 support on do\_mysql
5
+ * Windows support on 2.1.x and 2.2.x
6
+
1
7
  ## 0.10.14 2014-02-13
2
8
 
3
9
  * Don't do DNS lookup in transaction loading
@@ -63,7 +63,7 @@ void data_objects_debug(VALUE connection, VALUE string, struct timeval *start) {
63
63
  rb_funcall(connection, DO_ID_LOG, 1, message);
64
64
  }
65
65
 
66
- void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state) {
66
+ void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state) {
67
67
  const char *exception_type = "SQLError";
68
68
  const struct errcodes *e;
69
69
  VALUE uri, exception;
@@ -82,7 +82,7 @@ void data_objects_raise_error(VALUE self, const struct errcodes *errors, int err
82
82
  data_objects_const_get(mDO, exception_type),
83
83
  DO_ID_NEW,
84
84
  5,
85
- rb_str_new2(message),
85
+ message,
86
86
  INT2NUM(errnum),
87
87
  state,
88
88
  query,
@@ -123,7 +123,7 @@ static inline void data_objects_define_errors(VALUE scope, const struct errcodes
123
123
  }
124
124
  }
125
125
 
126
- extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state);
126
+ extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, VALUE message, VALUE query, VALUE state);
127
127
 
128
128
  extern VALUE data_objects_typecast(const char *value, long length, const VALUE type, int encoding);
129
129
 
@@ -22,6 +22,17 @@
22
22
  #define do_mysql_cCommand_execute do_mysql_cCommand_execute_async
23
23
  #endif
24
24
 
25
+ #ifndef HAVE_RB_THREAD_FD_SELECT
26
+ #define rb_fdset_t fd_set
27
+ #define rb_fd_isset(n, f) FD_ISSET(n, f)
28
+ #define rb_fd_init(f) FD_ZERO(f)
29
+ #define rb_fd_zero(f) FD_ZERO(f)
30
+ #define rb_fd_set(n, f) FD_SET(n, f)
31
+ #define rb_fd_clr(n, f) FD_CLR(n, f)
32
+ #define rb_fd_term(f)
33
+ #define rb_thread_fd_select rb_thread_select
34
+ #endif
35
+
25
36
  #define CHECK_AND_RAISE(mysql_result_value, query) if (0 != mysql_result_value) { do_mysql_raise_error(self, db, query); }
26
37
 
27
38
  void do_mysql_full_connect(VALUE self, MYSQL *db);
@@ -105,7 +116,7 @@ VALUE do_mysql_typecast(const char *value, long length, const VALUE type, int en
105
116
 
106
117
  void do_mysql_raise_error(VALUE self, MYSQL *db, VALUE query) {
107
118
  int errnum = mysql_errno(db);
108
- const char *message = mysql_error(db);
119
+ VALUE message = rb_str_new2(mysql_error(db));
109
120
  VALUE sql_state = Qnil;
110
121
 
111
122
  #ifdef HAVE_MYSQL_SQLSTATE
@@ -154,13 +165,13 @@ MYSQL_RES *do_mysql_cCommand_execute_async(VALUE self, VALUE connection, MYSQL *
154
165
  CHECK_AND_RAISE(retval, query);
155
166
 
156
167
  int socket_fd = db->net.fd;
157
- fd_set rset;
168
+ rb_fdset_t rset;
158
169
 
159
170
  while (1) {
160
- FD_ZERO(&rset);
161
- FD_SET(socket_fd, &rset);
171
+ rb_fd_init(&rset);
172
+ rb_fd_set(socket_fd, &rset);
162
173
 
163
- retval = rb_thread_select(socket_fd + 1, &rset, NULL, NULL, NULL);
174
+ retval = rb_thread_fd_select(socket_fd + 1, &rset, NULL, NULL, NULL);
164
175
 
165
176
  if (retval < 0) {
166
177
  rb_sys_fail(0);
@@ -82,6 +82,8 @@ have_func 'mysql_set_character_set', 'mysql.h'
82
82
  have_func 'mysql_get_server_version', 'mysql.h'
83
83
  have_struct_member 'MYSQL_FIELD', 'charsetnr', 'mysql.h'
84
84
 
85
+ have_func('rb_thread_fd_select')
86
+
85
87
  unless DateTime.respond_to?(:new!)
86
88
  $CFLAGS << ' -DHAVE_NO_DATETIME_NEWBANG'
87
89
  end
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -20,6 +20,7 @@ module DataObjects
20
20
  "GBK" => "gbk",
21
21
  "ISO-8859-9" => "latin5",
22
22
  "UTF-8" => "utf8",
23
+ "UTF-8-MB4" => "utf8mb4",
23
24
  "UTF-16BE" => "ucs2",
24
25
  "IBM866" => "cp866",
25
26
  "macCentEuro" => "macce",
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Mysql
3
- VERSION = '0.10.14'
3
+ VERSION = '0.10.15'
4
4
  end
5
5
  end
data/tasks/compile.rake CHANGED
@@ -56,7 +56,7 @@ begin
56
56
  ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
57
57
  ext.java_compiling do |gem|
58
58
  gem.add_dependency 'jdbc-mysql', '>=5.0.4'
59
- gem.add_dependency 'do_jdbc', '0.10.14'
59
+ gem.add_dependency 'do_jdbc', '0.10.15'
60
60
  end
61
61
  end
62
62
  rescue LoadError
data/tasks/release.rake CHANGED
@@ -3,7 +3,7 @@ task :build_all do
3
3
  `rake clean`
4
4
  `rake build`
5
5
  `rake java gem`
6
- `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0`
6
+ `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0:2.1.5:2.2.0`
7
7
  end
8
8
 
9
9
  desc 'Release all gems (native, binaries for JRuby and Windows)'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.14
4
+ version: 0.10.15
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Dirkjan Bussink
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-13 00:00:00.000000000 Z
11
+ date: 2015-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: data_objects
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.14
19
+ version: 0.10.15
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.10.14
26
+ version: 0.10.15
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.7'
55
55
  description: Implements the DataObjects API for MySQL
@@ -73,9 +73,6 @@ files:
73
73
  - ext/do_mysql/extconf.rb
74
74
  - ext/do_mysql/mysql_compat.h
75
75
  - lib/do_mysql.rb
76
- - lib/do_mysql/1.8/do_mysql.so
77
- - lib/do_mysql/1.9/do_mysql.so
78
- - lib/do_mysql/2.0/do_mysql.so
79
76
  - lib/do_mysql/encoding.rb
80
77
  - lib/do_mysql/transaction.rb
81
78
  - lib/do_mysql/version.rb
@@ -105,6 +102,11 @@ files:
105
102
  - tasks/retrieve.rake
106
103
  - tasks/spec.rake
107
104
  - tasks/ssl.rake
105
+ - lib/do_mysql/1.8/do_mysql.so
106
+ - lib/do_mysql/1.9/do_mysql.so
107
+ - lib/do_mysql/2.0/do_mysql.so
108
+ - lib/do_mysql/2.1/do_mysql.so
109
+ - lib/do_mysql/2.2/do_mysql.so
108
110
  homepage:
109
111
  licenses: []
110
112
  metadata: {}
@@ -131,17 +133,17 @@ require_paths:
131
133
  - lib
132
134
  required_ruby_version: !ruby/object:Gem::Requirement
133
135
  requirements:
134
- - - ">="
136
+ - - '>='
135
137
  - !ruby/object:Gem::Version
136
138
  version: '0'
137
139
  required_rubygems_version: !ruby/object:Gem::Requirement
138
140
  requirements:
139
- - - ">="
141
+ - - '>='
140
142
  - !ruby/object:Gem::Version
141
143
  version: '0'
142
144
  requirements: []
143
145
  rubyforge_project: dorb
144
- rubygems_version: 2.2.0.preview.1
146
+ rubygems_version: 2.0.14
145
147
  signing_key:
146
148
  specification_version: 3
147
149
  summary: DataObjects MySQL Driver