do_mysql 0.10.11-x86-mswin32-60 → 0.10.12-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ ## 0.10.12 2013-01-21
2
+
3
+ * jdbc-mysql driver loading fix
4
+ * Improve compatibility for anscient MySQL versions
5
+
1
6
  ## 0.10.11 2012-12-29
2
7
 
3
8
  * Rename C symbols to prevent name collitions
@@ -341,13 +341,13 @@ void do_mysql_full_connect(VALUE self, MYSQL *db) {
341
341
 
342
342
  // For really anscient MySQL versions we don't attempt any strictness
343
343
  #ifdef HAVE_MYSQL_GET_SERVER_VERSION
344
- //4.x versions do not support certain session parameters
345
- if (mysql_get_server_version(db) < 50000) {
346
- do_mysql_cCommand_execute(Qnil, self, db, rb_str_new2("SET SESSION sql_mode = 'ANSI,NO_DIR_IN_CREATE,NO_UNSIGNED_SUBTRACTION'"));
347
- }
348
- else {
344
+ //4.0 does not support sql_mode at all, while later 4.x versions do not support certain session parameters
345
+ if (mysql_get_server_version(db) >= 50000) {
349
346
  do_mysql_cCommand_execute(Qnil, self, db, rb_str_new2("SET SESSION sql_mode = 'ANSI,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION,TRADITIONAL'"));
350
347
  }
348
+ else if (mysql_get_server_version(db) >= 40100) {
349
+ do_mysql_cCommand_execute(Qnil, self, db, rb_str_new2("SET SESSION sql_mode = 'ANSI,NO_DIR_IN_CREATE,NO_UNSIGNED_SUBTRACTION'"));
350
+ }
351
351
  #endif
352
352
 
353
353
  rb_iv_set(self, "@connection", Data_Wrap_Struct(rb_cObject, 0, 0, db));
@@ -13,6 +13,7 @@ if RUBY_PLATFORM =~ /java/
13
13
  java.lang.Thread.currentThread.getContextClassLoader().loadClass(DataObjects::Mysql::JDBC_DRIVER, true)
14
14
  rescue java.lang.ClassNotFoundException
15
15
  require 'jdbc/mysql' # the JDBC driver, packaged as a gem
16
+ Jdbc::MySQL.load_driver if Jdbc::MySQL.respond_to?(:load_driver)
16
17
  end
17
18
 
18
19
  # Another way of loading the JDBC Class. This seems to be more reliable
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Mysql
3
- VERSION = '0.10.11'
3
+ VERSION = '0.10.12'
4
4
  end
5
5
  end
@@ -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.11'
59
+ gem.add_dependency 'do_jdbc', '0.10.12'
60
60
  end
61
61
  end
62
62
  rescue LoadError
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 10
8
- - 11
9
- version: 0.10.11
8
+ - 12
9
+ version: 0.10.12
10
10
  platform: x86-mswin32-60
11
11
  authors:
12
12
  - Dirkjan Bussink
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-12-29 00:00:00 +01:00
17
+ date: 2013-01-21 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -28,8 +28,8 @@ dependencies:
28
28
  segments:
29
29
  - 0
30
30
  - 10
31
- - 11
32
- version: 0.10.11
31
+ - 12
32
+ version: 0.10.12
33
33
  requirement: *id001
34
34
  - !ruby/object:Gem::Dependency
35
35
  prerelease: false