do_mysql 0.10.14-java → 0.10.15-java

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: a5710d5c1ca6c09dcc1aeaf925f2f78a6b2782dc
4
- data.tar.gz: b63e14b182d3ec75ebfe156e8796223dda8724e8
3
+ metadata.gz: 5f1115c4c51cc159b1e94e81d279635a3f14ef86
4
+ data.tar.gz: 76fcf00ced709607c34dbdbf66387a7d9944d114
5
5
  SHA512:
6
- metadata.gz: c1134de4027c3cd915fa053448c21be45fc15417c8117d94647d7afb941966d70b4960afae9cc40905d0adb792cf017e4c06cf217b9af14900672da397f027d9
7
- data.tar.gz: c7a116cc04883c58b61c2ec0ed377fbadbda23548263a7f2e7286968fe15dc07e7954f80cc323be6b550435b80b2235201e3f464d40c4130fa178e1b941c4a6c
6
+ metadata.gz: 23946e25d929d44c1b858bfd4c33c078e6bbaeb293e4fab28dbddc756e1215f47a505463ebe59f073d2b8c3ccc0073e2f4de9f085f800b9696b5dfe198d5644c
7
+ data.tar.gz: 1512f6a9aa73003760a796534ae13270eed4658dbfa11c1cdea6c75e018476a55b80c427a627a472574e1f1be354af808e0804a7c1207f6d377c9aec09a48237
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
@@ -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: java
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,54 +16,54 @@ 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
  - !ruby/object:Gem::Dependency
56
56
  name: jdbc-mysql
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 5.0.4
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 5.0.4
69
69
  - !ruby/object:Gem::Dependency
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.10.14
75
+ version: 0.10.15
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.10.14
82
+ version: 0.10.15
83
83
  description: Implements the DataObjects API for MySQL
84
84
  email: d.bussink@gmail.com
85
85
  executables: []
@@ -101,7 +101,6 @@ files:
101
101
  - ext/do_mysql/extconf.rb
102
102
  - ext/do_mysql/mysql_compat.h
103
103
  - lib/do_mysql.rb
104
- - lib/do_mysql/do_mysql.jar
105
104
  - lib/do_mysql/encoding.rb
106
105
  - lib/do_mysql/transaction.rb
107
106
  - lib/do_mysql/version.rb
@@ -131,6 +130,7 @@ files:
131
130
  - tasks/retrieve.rake
132
131
  - tasks/spec.rake
133
132
  - tasks/ssl.rake
133
+ - lib/do_mysql/do_mysql.jar
134
134
  homepage:
135
135
  licenses: []
136
136
  metadata: {}
@@ -140,17 +140,17 @@ require_paths:
140
140
  - lib
141
141
  required_ruby_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ">="
148
+ - - '>='
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project: dorb
153
- rubygems_version: 2.2.0.preview.1
153
+ rubygems_version: 2.0.14
154
154
  signing_key:
155
155
  specification_version: 3
156
156
  summary: DataObjects MySQL Driver