do_mysql 0.10.11 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.markdown +5 -0
- data/ext/do_mysql/do_mysql.c +5 -5
- data/lib/do_mysql.rb +1 -0
- data/lib/do_mysql/version.rb +1 -1
- data/tasks/compile.rake +1 -1
- metadata +5 -5
data/ChangeLog.markdown
CHANGED
data/ext/do_mysql/do_mysql.c
CHANGED
@@ -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)
|
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));
|
data/lib/do_mysql.rb
CHANGED
@@ -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
|
data/lib/do_mysql/version.rb
CHANGED
data/tasks/compile.rake
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 10
|
8
|
-
-
|
9
|
-
version: 0.10.
|
8
|
+
- 12
|
9
|
+
version: 0.10.12
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dirkjan Bussink
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2013-01-21 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -27,8 +27,8 @@ dependencies:
|
|
27
27
|
segments:
|
28
28
|
- 0
|
29
29
|
- 10
|
30
|
-
-
|
31
|
-
version: 0.10.
|
30
|
+
- 12
|
31
|
+
version: 0.10.12
|
32
32
|
type: :runtime
|
33
33
|
version_requirements: *id001
|
34
34
|
- !ruby/object:Gem::Dependency
|