mysql2 0.3.21 → 0.4.10
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/README.md +132 -55
- data/examples/eventmachine.rb +1 -1
- data/examples/threaded.rb +4 -6
- data/ext/mysql2/client.c +314 -118
- data/ext/mysql2/client.h +13 -3
- data/ext/mysql2/extconf.rb +111 -44
- data/ext/mysql2/infile.c +2 -2
- data/ext/mysql2/mysql2_ext.c +1 -0
- data/ext/mysql2/mysql2_ext.h +5 -10
- data/ext/mysql2/mysql_enc_name_to_ruby.h +2 -2
- data/ext/mysql2/mysql_enc_to_ruby.h +25 -22
- data/ext/mysql2/result.c +489 -101
- data/ext/mysql2/result.h +12 -4
- data/ext/mysql2/statement.c +595 -0
- data/ext/mysql2/statement.h +19 -0
- data/lib/mysql2/client.rb +70 -27
- data/lib/mysql2/console.rb +1 -1
- data/lib/mysql2/em.rb +5 -6
- data/lib/mysql2/error.rb +17 -26
- data/lib/mysql2/field.rb +3 -0
- data/lib/mysql2/statement.rb +17 -0
- data/lib/mysql2/version.rb +1 -1
- data/lib/mysql2.rb +37 -35
- data/spec/configuration.yml.example +0 -6
- data/spec/em/em_spec.rb +22 -21
- data/spec/mysql2/client_spec.rb +484 -346
- data/spec/mysql2/error_spec.rb +38 -39
- data/spec/mysql2/result_spec.rb +256 -230
- data/spec/mysql2/statement_spec.rb +776 -0
- data/spec/spec_helper.rb +80 -59
- data/spec/ssl/ca-cert.pem +17 -0
- data/spec/ssl/ca-key.pem +27 -0
- data/spec/ssl/ca.cnf +22 -0
- data/spec/ssl/cert.cnf +22 -0
- data/spec/ssl/client-cert.pem +17 -0
- data/spec/ssl/client-key.pem +27 -0
- data/spec/ssl/client-req.pem +15 -0
- data/spec/ssl/gen_certs.sh +48 -0
- data/spec/ssl/pkcs8-client-key.pem +28 -0
- data/spec/ssl/pkcs8-server-key.pem +28 -0
- data/spec/ssl/server-cert.pem +17 -0
- data/spec/ssl/server-key.pem +27 -0
- data/spec/ssl/server-req.pem +15 -0
- data/support/5072E1F5.asc +432 -0
- data/support/mysql_enc_to_ruby.rb +7 -8
- data/support/ruby_enc_to_mysql.rb +1 -1
- metadata +50 -55
data/ext/mysql2/client.h
CHANGED
@@ -43,14 +43,24 @@ typedef struct {
|
|
43
43
|
int reconnect_enabled;
|
44
44
|
unsigned int connect_timeout;
|
45
45
|
int active;
|
46
|
-
int
|
46
|
+
int automatic_close;
|
47
47
|
int initialized;
|
48
48
|
int refcount;
|
49
|
-
int
|
49
|
+
int closed;
|
50
50
|
MYSQL *client;
|
51
51
|
} mysql_client_wrapper;
|
52
52
|
|
53
|
-
void
|
53
|
+
void rb_mysql_client_set_active_thread(VALUE self);
|
54
|
+
|
55
|
+
#define GET_CLIENT(self) \
|
56
|
+
mysql_client_wrapper *wrapper; \
|
57
|
+
Data_Get_Struct(self, mysql_client_wrapper, wrapper);
|
58
|
+
|
59
|
+
void init_mysql2_client(void);
|
54
60
|
void decr_mysql2_client(mysql_client_wrapper *wrapper);
|
55
61
|
|
56
62
|
#endif
|
63
|
+
|
64
|
+
#ifndef HAVE_RB_HASH_DUP
|
65
|
+
VALUE rb_hash_dup(VALUE other);
|
66
|
+
#endif
|
data/ext/mysql2/extconf.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require 'mkmf'
|
3
|
+
require 'English'
|
3
4
|
|
4
|
-
def asplode
|
5
|
+
def asplode(lib)
|
5
6
|
if RUBY_PLATFORM =~ /mingw|mswin/
|
6
7
|
abort "-----\n#{lib} is missing. Check your installation of MySQL or Connector/C, and try again.\n-----"
|
7
8
|
elsif RUBY_PLATFORM =~ /darwin/
|
@@ -11,6 +12,20 @@ def asplode lib
|
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
15
|
+
def add_ssl_defines(header)
|
16
|
+
all_modes_found = %w(SSL_MODE_DISABLED SSL_MODE_PREFERRED SSL_MODE_REQUIRED SSL_MODE_VERIFY_CA SSL_MODE_VERIFY_IDENTITY).inject(true) do |m, ssl_mode|
|
17
|
+
m && have_const(ssl_mode, header)
|
18
|
+
end
|
19
|
+
$CFLAGS << ' -DFULL_SSL_MODE_SUPPORT' if all_modes_found
|
20
|
+
# if we only have ssl toggle (--ssl,--disable-ssl) from 5.7.3 to 5.7.10
|
21
|
+
has_no_support = all_modes_found ? false : !have_const('MYSQL_OPT_SSL_ENFORCE', header)
|
22
|
+
$CFLAGS << ' -DNO_SSL_MODE_SUPPORT' if has_no_support
|
23
|
+
end
|
24
|
+
|
25
|
+
# 2.1+
|
26
|
+
have_func('rb_absint_size')
|
27
|
+
have_func('rb_absint_singlebit_p')
|
28
|
+
|
14
29
|
# 2.0-only
|
15
30
|
have_header('ruby/thread.h') && have_func('rb_thread_call_without_gvl', 'ruby/thread.h')
|
16
31
|
|
@@ -19,10 +34,11 @@ have_func('rb_thread_blocking_region')
|
|
19
34
|
have_func('rb_wait_for_single_fd')
|
20
35
|
have_func('rb_hash_dup')
|
21
36
|
have_func('rb_intern3')
|
37
|
+
have_func('rb_big_cmp')
|
22
38
|
|
23
39
|
# borrowed from mysqlplus
|
24
40
|
# http://github.com/oldmoe/mysqlplus/blob/master/ext/extconf.rb
|
25
|
-
dirs = ENV
|
41
|
+
dirs = ENV.fetch('PATH').split(File::PATH_SEPARATOR) + %w(
|
26
42
|
/opt
|
27
43
|
/opt/local
|
28
44
|
/opt/local/mysql
|
@@ -33,13 +49,18 @@ dirs = ENV['PATH'].split(File::PATH_SEPARATOR) + %w[
|
|
33
49
|
/usr/local/mysql
|
34
50
|
/usr/local/mysql-*
|
35
51
|
/usr/local/lib/mysql5*
|
36
|
-
|
52
|
+
/usr/local/opt/mysql5*
|
53
|
+
).map { |dir| dir << '/bin' }
|
54
|
+
|
55
|
+
# For those without HOMEBREW_ROOT in PATH
|
56
|
+
dirs << "#{ENV['HOMEBREW_ROOT']}/bin" if ENV['HOMEBREW_ROOT']
|
37
57
|
|
38
58
|
GLOB = "{#{dirs.join(',')}}/{mysql_config,mysql_config5,mariadb_config}"
|
39
59
|
|
40
60
|
# If the user has provided a --with-mysql-dir argument, we must respect it or fail.
|
41
61
|
inc, lib = dir_config('mysql')
|
42
62
|
if inc && lib
|
63
|
+
# TODO: Remove when 2.0.0 is the minimum supported version
|
43
64
|
# Ruby versions not incorporating the mkmf fix at
|
44
65
|
# https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39717
|
45
66
|
# do not properly search for lib directories, and must be corrected
|
@@ -47,48 +68,33 @@ if inc && lib
|
|
47
68
|
@libdir_basename = 'lib'
|
48
69
|
inc, lib = dir_config('mysql')
|
49
70
|
end
|
50
|
-
abort "-----\nCannot find include dir(s) #{inc}\n-----" unless inc && inc.split(File::PATH_SEPARATOR).any?{|dir| File.directory?(dir)}
|
51
|
-
abort "-----\nCannot find library dir(s) #{lib}\n-----" unless lib && lib.split(File::PATH_SEPARATOR).any?{|dir| File.directory?(dir)}
|
52
|
-
warn
|
71
|
+
abort "-----\nCannot find include dir(s) #{inc}\n-----" unless inc && inc.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) }
|
72
|
+
abort "-----\nCannot find library dir(s) #{lib}\n-----" unless lib && lib.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) }
|
73
|
+
warn "-----\nUsing --with-mysql-dir=#{File.dirname inc}\n-----"
|
53
74
|
rpath_dir = lib
|
54
|
-
elsif mc = (with_config('mysql-config') || Dir[GLOB].first)
|
75
|
+
elsif (mc = (with_config('mysql-config') || Dir[GLOB].first))
|
55
76
|
# If the user has provided a --with-mysql-config argument, we must respect it or fail.
|
56
77
|
# If the user gave --with-mysql-config with no argument means we should try to find it.
|
57
78
|
mc = Dir[GLOB].first if mc == true
|
58
|
-
abort "-----\nCannot find mysql_config at #{mc}\n-----" unless mc && File.
|
79
|
+
abort "-----\nCannot find mysql_config at #{mc}\n-----" unless mc && File.exist?(mc)
|
59
80
|
abort "-----\nCannot execute mysql_config at #{mc}\n-----" unless File.executable?(mc)
|
60
|
-
warn
|
81
|
+
warn "-----\nUsing mysql_config at #{mc}\n-----"
|
61
82
|
ver = `#{mc} --version`.chomp.to_f
|
62
83
|
includes = `#{mc} --include`.chomp
|
63
|
-
|
84
|
+
abort unless $CHILD_STATUS.success?
|
64
85
|
libs = `#{mc} --libs_r`.chomp
|
65
86
|
# MySQL 5.5 and above already have re-entrant code in libmysqlclient (no _r).
|
66
|
-
if ver >= 5.5 || libs.empty?
|
67
|
-
|
68
|
-
end
|
69
|
-
exit 1 if $? != 0
|
87
|
+
libs = `#{mc} --libs`.chomp if ver >= 5.5 || libs.empty?
|
88
|
+
abort unless $CHILD_STATUS.success?
|
70
89
|
$INCFLAGS += ' ' + includes
|
71
90
|
$libs = libs + " " + $libs
|
72
91
|
rpath_dir = libs
|
73
92
|
else
|
74
|
-
|
75
|
-
unless find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql")
|
76
|
-
found = false
|
77
|
-
# For some systems and some versions of libmysqlclient, there were extra
|
78
|
-
# libraries needed to link. Try each typical extra library, add it to the
|
79
|
-
# global compile flags, and see if that allows us to link libmysqlclient.
|
80
|
-
warn "-----\nlibmysqlclient is missing. Trying again with extra runtime libraries...\n-----"
|
81
|
-
|
82
|
-
%w{ m z socket nsl mygcc }.each do |extra_lib|
|
83
|
-
if have_library(extra_lib) && find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql")
|
84
|
-
found = true
|
85
|
-
break
|
86
|
-
end
|
87
|
-
end
|
88
|
-
asplode('libmysqlclient') unless found
|
89
|
-
end
|
93
|
+
_, usr_local_lib = dir_config('mysql', '/usr/local')
|
90
94
|
|
91
|
-
|
95
|
+
asplode("mysql client") unless find_library('mysqlclient', 'mysql_query', usr_local_lib, "#{usr_local_lib}/mysql")
|
96
|
+
|
97
|
+
rpath_dir = usr_local_lib
|
92
98
|
end
|
93
99
|
|
94
100
|
if have_header('mysql.h')
|
@@ -99,16 +105,77 @@ else
|
|
99
105
|
asplode 'mysql.h'
|
100
106
|
end
|
101
107
|
|
102
|
-
%w
|
103
|
-
header = [prefix, h].compact.join
|
104
|
-
asplode h unless have_header
|
108
|
+
%w(errmsg.h).each do |h|
|
109
|
+
header = [prefix, h].compact.join('/')
|
110
|
+
asplode h unless have_header header
|
111
|
+
end
|
112
|
+
|
113
|
+
mysql_h = [prefix, 'mysql.h'].compact.join('/')
|
114
|
+
add_ssl_defines(mysql_h)
|
115
|
+
have_struct_member('MYSQL', 'net.vio', mysql_h)
|
116
|
+
have_struct_member('MYSQL', 'net.pvio', mysql_h)
|
117
|
+
have_const('MYSQL_ENABLE_CLEARTEXT_PLUGIN', mysql_h)
|
118
|
+
|
119
|
+
# This is our wishlist. We use whichever flags work on the host.
|
120
|
+
# -Wall and -Wextra are included by default.
|
121
|
+
wishlist = [
|
122
|
+
'-Weverything',
|
123
|
+
'-Wno-bad-function-cast', # rb_thread_call_without_gvl returns void * that we cast to VALUE
|
124
|
+
'-Wno-conditional-uninitialized', # false positive in client.c
|
125
|
+
'-Wno-covered-switch-default', # result.c -- enum_field_types (when fully covered, e.g. mysql 5.5)
|
126
|
+
'-Wno-declaration-after-statement', # GET_CLIENT followed by GET_STATEMENT in statement.c
|
127
|
+
'-Wno-disabled-macro-expansion', # rubby :(
|
128
|
+
'-Wno-documentation-unknown-command', # rubby :(
|
129
|
+
'-Wno-missing-field-initializers', # gperf generates bad code
|
130
|
+
'-Wno-missing-variable-declarations', # missing symbols due to ruby native ext initialization
|
131
|
+
'-Wno-padded', # mysql :(
|
132
|
+
'-Wno-reserved-id-macro', # rubby :(
|
133
|
+
'-Wno-sign-conversion', # gperf generates bad code
|
134
|
+
'-Wno-static-in-inline', # gperf generates bad code
|
135
|
+
'-Wno-switch-enum', # result.c -- enum_field_types (when not fully covered, e.g. mysql 5.6+)
|
136
|
+
'-Wno-undef', # rubinius :(
|
137
|
+
'-Wno-unreachable-code', # rubby :(
|
138
|
+
'-Wno-used-but-marked-unused', # rubby :(
|
139
|
+
]
|
140
|
+
|
141
|
+
usable_flags = wishlist.select do |flag|
|
142
|
+
try_link('int main() {return 0;}', "-Werror #{flag}")
|
143
|
+
end
|
144
|
+
|
145
|
+
$CFLAGS << ' ' << usable_flags.join(' ')
|
146
|
+
|
147
|
+
enabled_sanitizers = disabled_sanitizers = []
|
148
|
+
# Specify a commna-separated list of sanitizers, or try them all by default
|
149
|
+
sanitizers = with_config('sanitize')
|
150
|
+
case sanitizers
|
151
|
+
when true
|
152
|
+
# Try them all, turn on whatever we can
|
153
|
+
enabled_sanitizers = %w(address cfi integer memory thread undefined).select do |s|
|
154
|
+
try_link('int main() {return 0;}', "-Werror -fsanitize=#{s}")
|
155
|
+
end
|
156
|
+
abort "-----\nCould not enable any sanitizers!\n-----" if enabled_sanitizers.empty?
|
157
|
+
when String
|
158
|
+
# Figure out which sanitizers are supported
|
159
|
+
enabled_sanitizers, disabled_sanitizers = sanitizers.split(',').partition do |s|
|
160
|
+
try_link('int main() {return 0;}', "-Werror -fsanitize=#{s}")
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
unless disabled_sanitizers.empty?
|
165
|
+
abort "-----\nCould not enable requested sanitizers: #{disabled_sanitizers.join(',')}\n-----"
|
105
166
|
end
|
106
167
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
168
|
+
unless enabled_sanitizers.empty?
|
169
|
+
warn "-----\nEnabling sanitizers: #{enabled_sanitizers.join(',')}\n-----"
|
170
|
+
enabled_sanitizers.each do |s|
|
171
|
+
# address sanitizer requires runtime support
|
172
|
+
if s == 'address' # rubocop:disable Style/IfUnlessModifier
|
173
|
+
have_library('asan') || $LDFLAGS << ' -fsanitize=address'
|
174
|
+
end
|
175
|
+
$CFLAGS << " -fsanitize=#{s}"
|
176
|
+
end
|
177
|
+
# Options for line numbers in backtraces
|
178
|
+
$CFLAGS << ' -g -fno-omit-frame-pointer'
|
112
179
|
end
|
113
180
|
|
114
181
|
if RUBY_PLATFORM =~ /mswin|mingw/
|
@@ -119,7 +186,7 @@ if RUBY_PLATFORM =~ /mswin|mingw/
|
|
119
186
|
# Use rake to rebuild only if these files change
|
120
187
|
deffile = File.expand_path('../../../support/libmysql.def', __FILE__)
|
121
188
|
libfile = File.expand_path(File.join(rpath_dir, 'libmysql.lib'))
|
122
|
-
file 'libmysql.a' => [deffile, libfile] do
|
189
|
+
file 'libmysql.a' => [deffile, libfile] do
|
123
190
|
when_writing 'building libmysql.a' do
|
124
191
|
# Ruby kindly shows us where dllwrap is, but that tool does more than we want.
|
125
192
|
# Maybe in the future Ruby could provide RbConfig::CONFIG['DLLTOOL'] directly.
|
@@ -136,8 +203,8 @@ if RUBY_PLATFORM =~ /mswin|mingw/
|
|
136
203
|
|
137
204
|
# Make sure the generated interface library works (if cross-compiling, trust without verifying)
|
138
205
|
unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
|
139
|
-
abort "-----\nCannot find libmysql.a\n
|
140
|
-
abort "-----\nCannot link to libmysql.a (my_init)\n
|
206
|
+
abort "-----\nCannot find libmysql.a\n-----" unless have_library('libmysql')
|
207
|
+
abort "-----\nCannot link to libmysql.a (my_init)\n-----" unless have_func('my_init')
|
141
208
|
end
|
142
209
|
|
143
210
|
# Vendor libmysql.dll
|
@@ -146,7 +213,7 @@ if RUBY_PLATFORM =~ /mswin|mingw/
|
|
146
213
|
|
147
214
|
vendordll = File.join(vendordir, 'libmysql.dll')
|
148
215
|
dllfile = File.expand_path(File.join(rpath_dir, 'libmysql.dll'))
|
149
|
-
file vendordll => [dllfile, vendordir] do
|
216
|
+
file vendordll => [dllfile, vendordir] do
|
150
217
|
when_writing 'copying libmysql.dll' do
|
151
218
|
cp dllfile, vendordll
|
152
219
|
end
|
@@ -172,7 +239,7 @@ else
|
|
172
239
|
warn "-----\nSetting mysql rpath to #{explicit_rpath}\n-----"
|
173
240
|
$LDFLAGS << rpath_flags
|
174
241
|
else
|
175
|
-
if libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2]
|
242
|
+
if (libdir = rpath_dir[%r{(-L)?(/[^ ]+)}, 2])
|
176
243
|
rpath_flags = " -Wl,-rpath,#{libdir}"
|
177
244
|
if RbConfig::CONFIG["RPATHFLAG"].to_s.empty? && try_link('int main() {return 0;}', rpath_flags)
|
178
245
|
# Usually Ruby sets RPATHFLAG the right way for each system, but not on OS X.
|
data/ext/mysql2/infile.c
CHANGED
@@ -56,7 +56,7 @@ mysql2_local_infile_init(void **ptr, const char *filename, void *userdata)
|
|
56
56
|
* < 0 error
|
57
57
|
*/
|
58
58
|
static int
|
59
|
-
mysql2_local_infile_read(void *ptr, char *buf,
|
59
|
+
mysql2_local_infile_read(void *ptr, char *buf, unsigned int buf_len)
|
60
60
|
{
|
61
61
|
int count;
|
62
62
|
mysql2_local_infile_data *data = (mysql2_local_infile_data *)ptr;
|
@@ -95,7 +95,7 @@ mysql2_local_infile_end(void *ptr)
|
|
95
95
|
* Error message number (see http://dev.mysql.com/doc/refman/5.0/en/error-messages-client.html)
|
96
96
|
*/
|
97
97
|
static int
|
98
|
-
mysql2_local_infile_error(void *ptr, char *error_msg,
|
98
|
+
mysql2_local_infile_error(void *ptr, char *error_msg, unsigned int error_msg_len)
|
99
99
|
{
|
100
100
|
mysql2_local_infile_data *data = (mysql2_local_infile_data *) ptr;
|
101
101
|
|
data/ext/mysql2/mysql2_ext.c
CHANGED
data/ext/mysql2/mysql2_ext.h
CHANGED
@@ -1,28 +1,20 @@
|
|
1
1
|
#ifndef MYSQL2_EXT
|
2
2
|
#define MYSQL2_EXT
|
3
3
|
|
4
|
+
void Init_mysql2(void);
|
5
|
+
|
4
6
|
/* tell rbx not to use it's caching compat layer
|
5
7
|
by doing this we're making a promise to RBX that
|
6
8
|
we'll never modify the pointers we get back from RSTRING_PTR */
|
7
9
|
#define RSTRING_NOT_MODIFIED
|
8
10
|
#include <ruby.h>
|
9
11
|
|
10
|
-
#ifndef HAVE_UINT
|
11
|
-
#define HAVE_UINT
|
12
|
-
typedef unsigned short ushort;
|
13
|
-
typedef unsigned int uint;
|
14
|
-
#endif
|
15
|
-
|
16
12
|
#ifdef HAVE_MYSQL_H
|
17
13
|
#include <mysql.h>
|
18
|
-
#include <mysql_com.h>
|
19
14
|
#include <errmsg.h>
|
20
|
-
#include <mysqld_error.h>
|
21
15
|
#else
|
22
16
|
#include <mysql/mysql.h>
|
23
|
-
#include <mysql/mysql_com.h>
|
24
17
|
#include <mysql/errmsg.h>
|
25
|
-
#include <mysql/mysqld_error.h>
|
26
18
|
#endif
|
27
19
|
|
28
20
|
#ifdef HAVE_RUBY_ENCODING_H
|
@@ -33,12 +25,15 @@ typedef unsigned int uint;
|
|
33
25
|
#endif
|
34
26
|
|
35
27
|
#if defined(__GNUC__) && (__GNUC__ >= 3)
|
28
|
+
#define RB_MYSQL_NORETURN __attribute__ ((noreturn))
|
36
29
|
#define RB_MYSQL_UNUSED __attribute__ ((unused))
|
37
30
|
#else
|
31
|
+
#define RB_MYSQL_NORETURN
|
38
32
|
#define RB_MYSQL_UNUSED
|
39
33
|
#endif
|
40
34
|
|
41
35
|
#include <client.h>
|
36
|
+
#include <statement.h>
|
42
37
|
#include <result.h>
|
43
38
|
#include <infile.h>
|
44
39
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/* C code produced by gperf version 3.0.
|
1
|
+
/* C code produced by gperf version 3.0.4 */
|
2
2
|
/* Command-line: gperf */
|
3
3
|
/* Computed positions: -k'1,3,$' */
|
4
4
|
|
@@ -78,7 +78,7 @@ mysql2_mysql_enc_name_to_rb_hash (str, len)
|
|
78
78
|
|
79
79
|
#ifdef __GNUC__
|
80
80
|
__inline
|
81
|
-
#
|
81
|
+
#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
|
82
82
|
__attribute__ ((__gnu_inline__))
|
83
83
|
#endif
|
84
84
|
#endif
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const char *mysql2_mysql_enc_to_rb[] = {
|
1
|
+
static const char *mysql2_mysql_enc_to_rb[] = {
|
2
2
|
"Big5",
|
3
3
|
"ISO-8859-2",
|
4
4
|
NULL,
|
@@ -54,13 +54,13 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
54
54
|
"macRoman",
|
55
55
|
"UTF-16",
|
56
56
|
"UTF-16",
|
57
|
-
|
57
|
+
"",
|
58
58
|
"Windows-1256",
|
59
59
|
"Windows-1257",
|
60
60
|
"Windows-1257",
|
61
61
|
"UTF-32",
|
62
62
|
"UTF-32",
|
63
|
-
|
63
|
+
"",
|
64
64
|
"ASCII-8BIT",
|
65
65
|
NULL,
|
66
66
|
"US-ASCII",
|
@@ -119,10 +119,10 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
119
119
|
"UTF-16",
|
120
120
|
"UTF-16",
|
121
121
|
"UTF-16",
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
122
|
+
"UTF-16",
|
123
|
+
"UTF-16",
|
124
|
+
"UTF-16",
|
125
|
+
"UTF-16",
|
126
126
|
NULL,
|
127
127
|
NULL,
|
128
128
|
NULL,
|
@@ -146,6 +146,10 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
146
146
|
"UTF-16BE",
|
147
147
|
"UTF-16BE",
|
148
148
|
"UTF-16BE",
|
149
|
+
"UTF-16BE",
|
150
|
+
"UTF-16BE",
|
151
|
+
"UTF-16BE",
|
152
|
+
"UTF-16BE",
|
149
153
|
NULL,
|
150
154
|
NULL,
|
151
155
|
NULL,
|
@@ -153,11 +157,11 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
153
157
|
NULL,
|
154
158
|
NULL,
|
155
159
|
NULL,
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
160
|
+
"UTF-16BE",
|
161
|
+
"UTF-32",
|
162
|
+
"UTF-32",
|
163
|
+
"UTF-32",
|
164
|
+
"UTF-32",
|
161
165
|
"UTF-32",
|
162
166
|
"UTF-32",
|
163
167
|
"UTF-32",
|
@@ -178,10 +182,6 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
178
182
|
"UTF-32",
|
179
183
|
"UTF-32",
|
180
184
|
"UTF-32",
|
181
|
-
NULL,
|
182
|
-
NULL,
|
183
|
-
NULL,
|
184
|
-
NULL,
|
185
185
|
NULL,
|
186
186
|
NULL,
|
187
187
|
NULL,
|
@@ -210,6 +210,10 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
210
210
|
"UTF-8",
|
211
211
|
"UTF-8",
|
212
212
|
"UTF-8",
|
213
|
+
"UTF-8",
|
214
|
+
"UTF-8",
|
215
|
+
"UTF-8",
|
216
|
+
"UTF-8",
|
213
217
|
NULL,
|
214
218
|
NULL,
|
215
219
|
NULL,
|
@@ -217,11 +221,11 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
217
221
|
NULL,
|
218
222
|
NULL,
|
219
223
|
NULL,
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
224
|
+
"UTF-8",
|
225
|
+
"UTF-8",
|
226
|
+
"UTF-8",
|
227
|
+
"UTF-8",
|
228
|
+
"UTF-8",
|
225
229
|
"UTF-8",
|
226
230
|
"UTF-8",
|
227
231
|
"UTF-8",
|
@@ -243,4 +247,3 @@ const char *mysql2_mysql_enc_to_rb[] = {
|
|
243
247
|
"UTF-8",
|
244
248
|
"UTF-8"
|
245
249
|
};
|
246
|
-
|