mysql2 0.3.12b2 → 0.3.12b3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mysql2 (0.3.12b2)
4
+ mysql2 (0.3.12b3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1054,107 +1054,107 @@ void init_mysql2_client() {
1054
1054
 
1055
1055
  #ifdef CLIENT_LONG_PASSWORD
1056
1056
  rb_const_set(cMysql2Client, rb_intern("LONG_PASSWORD"),
1057
- INT2NUM(CLIENT_LONG_PASSWORD));
1057
+ LONG2NUM(CLIENT_LONG_PASSWORD));
1058
1058
  #endif
1059
1059
 
1060
1060
  #ifdef CLIENT_FOUND_ROWS
1061
1061
  rb_const_set(cMysql2Client, rb_intern("FOUND_ROWS"),
1062
- INT2NUM(CLIENT_FOUND_ROWS));
1062
+ LONG2NUM(CLIENT_FOUND_ROWS));
1063
1063
  #endif
1064
1064
 
1065
1065
  #ifdef CLIENT_LONG_FLAG
1066
1066
  rb_const_set(cMysql2Client, rb_intern("LONG_FLAG"),
1067
- INT2NUM(CLIENT_LONG_FLAG));
1067
+ LONG2NUM(CLIENT_LONG_FLAG));
1068
1068
  #endif
1069
1069
 
1070
1070
  #ifdef CLIENT_CONNECT_WITH_DB
1071
1071
  rb_const_set(cMysql2Client, rb_intern("CONNECT_WITH_DB"),
1072
- INT2NUM(CLIENT_CONNECT_WITH_DB));
1072
+ LONG2NUM(CLIENT_CONNECT_WITH_DB));
1073
1073
  #endif
1074
1074
 
1075
1075
  #ifdef CLIENT_NO_SCHEMA
1076
1076
  rb_const_set(cMysql2Client, rb_intern("NO_SCHEMA"),
1077
- INT2NUM(CLIENT_NO_SCHEMA));
1077
+ LONG2NUM(CLIENT_NO_SCHEMA));
1078
1078
  #endif
1079
1079
 
1080
1080
  #ifdef CLIENT_COMPRESS
1081
- rb_const_set(cMysql2Client, rb_intern("COMPRESS"), INT2NUM(CLIENT_COMPRESS));
1081
+ rb_const_set(cMysql2Client, rb_intern("COMPRESS"), LONG2NUM(CLIENT_COMPRESS));
1082
1082
  #endif
1083
1083
 
1084
1084
  #ifdef CLIENT_ODBC
1085
- rb_const_set(cMysql2Client, rb_intern("ODBC"), INT2NUM(CLIENT_ODBC));
1085
+ rb_const_set(cMysql2Client, rb_intern("ODBC"), LONG2NUM(CLIENT_ODBC));
1086
1086
  #endif
1087
1087
 
1088
1088
  #ifdef CLIENT_LOCAL_FILES
1089
1089
  rb_const_set(cMysql2Client, rb_intern("LOCAL_FILES"),
1090
- INT2NUM(CLIENT_LOCAL_FILES));
1090
+ LONG2NUM(CLIENT_LOCAL_FILES));
1091
1091
  #endif
1092
1092
 
1093
1093
  #ifdef CLIENT_IGNORE_SPACE
1094
1094
  rb_const_set(cMysql2Client, rb_intern("IGNORE_SPACE"),
1095
- INT2NUM(CLIENT_IGNORE_SPACE));
1095
+ LONG2NUM(CLIENT_IGNORE_SPACE));
1096
1096
  #endif
1097
1097
 
1098
1098
  #ifdef CLIENT_PROTOCOL_41
1099
1099
  rb_const_set(cMysql2Client, rb_intern("PROTOCOL_41"),
1100
- INT2NUM(CLIENT_PROTOCOL_41));
1100
+ LONG2NUM(CLIENT_PROTOCOL_41));
1101
1101
  #endif
1102
1102
 
1103
1103
  #ifdef CLIENT_INTERACTIVE
1104
1104
  rb_const_set(cMysql2Client, rb_intern("INTERACTIVE"),
1105
- INT2NUM(CLIENT_INTERACTIVE));
1105
+ LONG2NUM(CLIENT_INTERACTIVE));
1106
1106
  #endif
1107
1107
 
1108
1108
  #ifdef CLIENT_SSL
1109
- rb_const_set(cMysql2Client, rb_intern("SSL"), INT2NUM(CLIENT_SSL));
1109
+ rb_const_set(cMysql2Client, rb_intern("SSL"), LONG2NUM(CLIENT_SSL));
1110
1110
  #endif
1111
1111
 
1112
1112
  #ifdef CLIENT_IGNORE_SIGPIPE
1113
1113
  rb_const_set(cMysql2Client, rb_intern("IGNORE_SIGPIPE"),
1114
- INT2NUM(CLIENT_IGNORE_SIGPIPE));
1114
+ LONG2NUM(CLIENT_IGNORE_SIGPIPE));
1115
1115
  #endif
1116
1116
 
1117
1117
  #ifdef CLIENT_TRANSACTIONS
1118
1118
  rb_const_set(cMysql2Client, rb_intern("TRANSACTIONS"),
1119
- INT2NUM(CLIENT_TRANSACTIONS));
1119
+ LONG2NUM(CLIENT_TRANSACTIONS));
1120
1120
  #endif
1121
1121
 
1122
1122
  #ifdef CLIENT_RESERVED
1123
- rb_const_set(cMysql2Client, rb_intern("RESERVED"), INT2NUM(CLIENT_RESERVED));
1123
+ rb_const_set(cMysql2Client, rb_intern("RESERVED"), LONG2NUM(CLIENT_RESERVED));
1124
1124
  #endif
1125
1125
 
1126
1126
  #ifdef CLIENT_SECURE_CONNECTION
1127
1127
  rb_const_set(cMysql2Client, rb_intern("SECURE_CONNECTION"),
1128
- INT2NUM(CLIENT_SECURE_CONNECTION));
1128
+ LONG2NUM(CLIENT_SECURE_CONNECTION));
1129
1129
  #endif
1130
1130
 
1131
1131
  #ifdef CLIENT_MULTI_STATEMENTS
1132
1132
  rb_const_set(cMysql2Client, rb_intern("MULTI_STATEMENTS"),
1133
- INT2NUM(CLIENT_MULTI_STATEMENTS));
1133
+ LONG2NUM(CLIENT_MULTI_STATEMENTS));
1134
1134
  #endif
1135
1135
 
1136
1136
  #ifdef CLIENT_PS_MULTI_RESULTS
1137
1137
  rb_const_set(cMysql2Client, rb_intern("PS_MULTI_RESULTS"),
1138
- INT2NUM(CLIENT_PS_MULTI_RESULTS));
1138
+ LONG2NUM(CLIENT_PS_MULTI_RESULTS));
1139
1139
  #endif
1140
1140
 
1141
1141
  #ifdef CLIENT_SSL_VERIFY_SERVER_CERT
1142
1142
  rb_const_set(cMysql2Client, rb_intern("SSL_VERIFY_SERVER_CERT"),
1143
- INT2NUM(CLIENT_SSL_VERIFY_SERVER_CERT));
1143
+ LONG2NUM(CLIENT_SSL_VERIFY_SERVER_CERT));
1144
1144
  #endif
1145
1145
 
1146
1146
  #ifdef CLIENT_REMEMBER_OPTIONS
1147
1147
  rb_const_set(cMysql2Client, rb_intern("REMEMBER_OPTIONS"),
1148
- INT2NUM(CLIENT_REMEMBER_OPTIONS));
1148
+ LONG2NUM(CLIENT_REMEMBER_OPTIONS));
1149
1149
  #endif
1150
1150
 
1151
1151
  #ifdef CLIENT_ALL_FLAGS
1152
1152
  rb_const_set(cMysql2Client, rb_intern("ALL_FLAGS"),
1153
- INT2NUM(CLIENT_ALL_FLAGS));
1153
+ LONG2NUM(CLIENT_ALL_FLAGS));
1154
1154
  #endif
1155
1155
 
1156
1156
  #ifdef CLIENT_BASIC_FLAGS
1157
1157
  rb_const_set(cMysql2Client, rb_intern("BASIC_FLAGS"),
1158
- INT2NUM(CLIENT_BASIC_FLAGS));
1158
+ LONG2NUM(CLIENT_BASIC_FLAGS));
1159
1159
  #endif
1160
1160
  }
@@ -31,10 +31,12 @@ if RUBY_PLATFORM =~ /mswin|mingw/
31
31
  exit 1 unless have_library("libmysql")
32
32
  elsif mc = (with_config('mysql-config') || Dir[GLOB].first) then
33
33
  mc = Dir[GLOB].first if mc == true
34
+ ver = `#{mc} --version`.chomp.to_f
34
35
  cflags = `#{mc} --cflags`.chomp
35
36
  exit 1 if $? != 0
36
37
  libs = `#{mc} --libs_r`.chomp
37
- if libs.empty?
38
+ # MySQL 5.5 and above already have re-entrant code in libmysqlclient (no _r).
39
+ if ver >= 5.5 || libs.empty?
38
40
  libs = `#{mc} --libs`.chomp
39
41
  end
40
42
  exit 1 if $? != 0
@@ -16,11 +16,15 @@ module Mysql2
16
16
  end
17
17
 
18
18
  if defined?(ActiveRecord::VERSION::STRING) && ActiveRecord::VERSION::STRING < "3.1"
19
- warn "============= WARNING FROM mysql2 ============="
20
- warn "This version of mysql2 (#{Mysql2::VERSION}) doesn't ship with the ActiveRecord adapter."
21
- warn "In Rails version 3.1.0 and up, the mysql2 ActiveRecord adapter is included with rails."
22
- warn "If you want to use the mysql2 gem with Rails <= 3.0.x, please use the latest mysql2 in the 0.2.x series."
23
- warn "============= END WARNING FROM mysql2 ============="
19
+ begin
20
+ require 'active_record/connection_adapters/mysql2_adapter'
21
+ rescue LoadError
22
+ warn "============= WARNING FROM mysql2 ============="
23
+ warn "This version of mysql2 (#{Mysql2::VERSION}) doesn't ship with the ActiveRecord adapter."
24
+ warn "In Rails version 3.1.0 and up, the mysql2 ActiveRecord adapter is included with rails."
25
+ warn "If you want to use the mysql2 gem with Rails <= 3.0.x, please use the latest mysql2 in the 0.2.x series."
26
+ warn "============= END WARNING FROM mysql2 ============="
27
+ end
24
28
  end
25
29
 
26
30
  # For holding utility methods
@@ -1,3 +1,3 @@
1
1
  module Mysql2
2
- VERSION = "0.3.12b2"
2
+ VERSION = "0.3.12b3"
3
3
  end
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.3.12b2
4
+ version: 0.3.12b3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-10 00:00:00.000000000 Z
12
+ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine