mysql 2.8.1-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +56 -0
- data/COPYING.ja +51 -0
- data/History.txt +12 -0
- data/Manifest.txt +16 -0
- data/README.txt +23 -0
- data/Rakefile +22 -0
- data/ext/mysql_api/extconf.rb +98 -0
- data/ext/mysql_api/mysql.c +2273 -0
- data/extra/README.html +1098 -0
- data/extra/README_ja.html +1323 -0
- data/extra/tommy.css +134 -0
- data/lib/1.8/mysql_api.so +0 -0
- data/lib/1.9/mysql_api.so +0 -0
- data/lib/mysql.rb +16 -0
- data/tasks/gem.rake +24 -0
- data/tasks/native.rake +30 -0
- data/tasks/vendor_mysql.rake +41 -0
- data/test/test_mysql.rb +1488 -0
- metadata +100 -0
data/COPYING
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the GPL
|
3
|
+
(see the file GPL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a) place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b) use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c) give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d) make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a) distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b) accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c) give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d) make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
data/COPYING.ja
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
$BK\%W%m%0%i%`$O%U%j!<%=%U%H%&%'%"$G$9!%(BGPL(the GNU General
|
2
|
+
Public License)$B$^$?$O0J2<$K<($9>r7o$GK\%W%m%0%i%`$r:FG[I[$G(B
|
3
|
+
$B$-$^$9!%(BGPL$B$K$D$$$F$O(BGPL$B%U%!%$%k$r;2>H$7$F2<$5$$!%(B
|
4
|
+
|
5
|
+
1. $BJ#@=$O@)8B$J$/<+M3$G$9!%(B
|
6
|
+
|
7
|
+
2. $B0J2<$N>r7o$N$$$:$l$+$rK~$?$9;~$KK\%W%m%0%i%`$N%=!<%9$r(B
|
8
|
+
$B<+M3$KJQ99$G$-$^$9!%(B
|
9
|
+
|
10
|
+
(a) $B%M%C%H%K%e!<%:$K%]%9%H$7$?$j!$:n<T$KJQ99$rAw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7!$K\%W%m%0%i%`$K4^$^$l$kB>$N:n<T$K$h$k%3!<%I$O!$$=(B
|
38
|
+
$B$l$>$l$N:n<T$N0U8~$K$h$k@)8B$,2C$($i$l$k>l9g$,$"$j$^$9!%(B
|
39
|
+
|
40
|
+
$B$=$l$i%U%!%$%k$N0lMw$H$=$l$>$l$NG[I[>r7o$J$I$KIU$$$F$O(B
|
41
|
+
LEGAL$B%U%!%$%k$r;2>H$7$F$/$@$5$$!%(B
|
42
|
+
|
43
|
+
5. $BK\%W%m%0%i%`$X$NF~NO$H$J$k%9%/%j%W%H$*$h$S!$K\%W%m%0%i(B
|
44
|
+
$B%`$+$i$N=PNO$N8"Mx$OK\%W%m%0%i%`$N:n<T$G$O$J$/!$$=$l$>(B
|
45
|
+
$B$l$NF~=PNO$r@8@.$7$??M$KB0$7$^$9!%$^$?!$K\%W%m%0%i%`$K(B
|
46
|
+
$BAH$_9~$^$l$k$?$a$N3HD%%i%$%V%i%j$K$D$$$F$bF1MM$G$9!%(B
|
47
|
+
|
48
|
+
6. $BK\%W%m%0%i%`$OL5J]>Z$G$9!%:n<T$OK\%W%m%0%i%`$r%5%]!<%H(B
|
49
|
+
$B$9$k0U;V$O$"$j$^$9$,!$%W%m%0%i%`<+?H$N%P%0$"$k$$$OK\%W(B
|
50
|
+
$B%m%0%i%`$N<B9T$J$I$+$iH/@8$9$k$$$+$J$kB;32$KBP$7$F$b@U(B
|
51
|
+
$BG$$r;}$A$^$;$s!%(B
|
data/History.txt
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
=== 2.8.1 / 2009-08-21
|
2
|
+
|
3
|
+
* New features:
|
4
|
+
* Early support for Ruby 1.9
|
5
|
+
|
6
|
+
* Enhancements:
|
7
|
+
* Improved gem release process using Hoe as development dependency
|
8
|
+
* Implemented support for cross compilation
|
9
|
+
* Binary version built against MySQL 5.0.83
|
10
|
+
|
11
|
+
* Bug fixes:
|
12
|
+
* Improved detection of mysql and it's configuration (mysql_config)
|
data/Manifest.txt
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
COPYING
|
2
|
+
COPYING.ja
|
3
|
+
History.txt
|
4
|
+
Manifest.txt
|
5
|
+
README.txt
|
6
|
+
Rakefile
|
7
|
+
ext/mysql_api/extconf.rb
|
8
|
+
ext/mysql_api/mysql.c
|
9
|
+
extra/README.html
|
10
|
+
extra/README_ja.html
|
11
|
+
extra/tommy.css
|
12
|
+
lib/mysql.rb
|
13
|
+
tasks/gem.rake
|
14
|
+
tasks/native.rake
|
15
|
+
tasks/vendor_mysql.rake
|
16
|
+
test/test_mysql.rb
|
data/README.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
= MySQL/Ruby Interface
|
2
|
+
|
3
|
+
* http://mysql-win.rubyforge.org
|
4
|
+
* http://rubyforge.org/projects/mysql-win
|
5
|
+
* http://github.com/luislaven/mysql-gem
|
6
|
+
|
7
|
+
== DESCRIPTION
|
8
|
+
|
9
|
+
This is the MySQL API module for Ruby. It provides the same functions for Ruby
|
10
|
+
programs that the MySQL C API provides for C programs.
|
11
|
+
|
12
|
+
This is a conversion of tmtm's original extension into a proper RubyGems.
|
13
|
+
|
14
|
+
=== Warning about incompatible MySQL versions
|
15
|
+
|
16
|
+
Mixing MySQL versions will generate segmentation faults.
|
17
|
+
|
18
|
+
Running the binary version of this gem against a different version of MySQL
|
19
|
+
shared library <tt>libMySQL.dll</tt> will generate segmentation faults and
|
20
|
+
terminate your application.
|
21
|
+
|
22
|
+
Please use the exact same MAJOR.MINOR version of MySQL, see History.txt for
|
23
|
+
specific version of MySQL used to build the binaries.
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2008 Luis Lavena
|
3
|
+
#
|
4
|
+
# This source code is released under the MIT License.
|
5
|
+
# See LICENSE file for details
|
6
|
+
#++
|
7
|
+
|
8
|
+
#
|
9
|
+
# NOTE: Keep this file clean.
|
10
|
+
# Add your customizations inside tasks directory.
|
11
|
+
# Thank You.
|
12
|
+
#
|
13
|
+
|
14
|
+
begin
|
15
|
+
require 'rake'
|
16
|
+
rescue LoadError
|
17
|
+
require 'rubygems'
|
18
|
+
require 'rake'
|
19
|
+
end
|
20
|
+
|
21
|
+
# load rakefile extensions (tasks)
|
22
|
+
Dir['tasks/*.rake'].sort.each { |f| load f }
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# Darwin (OSX) special cases for universal binaries
|
2
|
+
# This is to avoid the lack of UB binaries for MySQL
|
3
|
+
if RUBY_PLATFORM =~ /darwin/
|
4
|
+
ENV["RC_ARCHS"] = `uname -m`.chomp if `uname -sr` =~ /^Darwin/
|
5
|
+
|
6
|
+
# On PowerPC the defaults are fine
|
7
|
+
ENV["RC_ARCHS"] = '' if `uname -m` =~ /^Power Macintosh/
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'mkmf'
|
11
|
+
|
12
|
+
# Improved detection of mysql_config
|
13
|
+
# Code from DataObjects do_mysql adapter
|
14
|
+
|
15
|
+
# All instances of mysql_config on PATH ...
|
16
|
+
def mysql_config_paths
|
17
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).collect do |path|
|
18
|
+
[ "#{path}/mysql_config", "#{path}/mysql_config5" ].
|
19
|
+
detect { |bin| File.exist?(bin) }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# The first mysql_config binary on PATH ...
|
24
|
+
def default_mysql_config_path
|
25
|
+
mysql_config_paths.compact.first
|
26
|
+
end
|
27
|
+
|
28
|
+
# Allow overriding path to mysql_config on command line using:
|
29
|
+
# ruby extconf.rb --with-mysql-config=/path/to/mysql_config
|
30
|
+
if RUBY_PLATFORM =~ /mswin|mingw/
|
31
|
+
inc, lib = dir_config('mysql')
|
32
|
+
exit 1 unless have_library("libmysql")
|
33
|
+
elsif mc = with_config('mysql-config', default_mysql_config_path) then
|
34
|
+
mc = 'mysql_config' if mc == true
|
35
|
+
cflags = `#{mc} --cflags`.chomp
|
36
|
+
exit 1 if $? != 0
|
37
|
+
libs = `#{mc} --libs`.chomp
|
38
|
+
exit 1 if $? != 0
|
39
|
+
$CPPFLAGS += ' ' + cflags
|
40
|
+
$libs = libs + " " + $libs
|
41
|
+
else
|
42
|
+
inc, lib = dir_config('mysql', '/usr/local')
|
43
|
+
libs = ['m', 'z', 'socket', 'nsl', 'mygcc']
|
44
|
+
while not find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql") do
|
45
|
+
exit 1 if libs.empty?
|
46
|
+
have_library(libs.shift)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
have_func('mysql_ssl_set')
|
51
|
+
have_func('rb_str_set_len')
|
52
|
+
have_func('rb_thread_start_timer')
|
53
|
+
|
54
|
+
if have_header('mysql.h') then
|
55
|
+
src = "#include <errmsg.h>\n#include <mysqld_error.h>\n"
|
56
|
+
elsif have_header('mysql/mysql.h') then
|
57
|
+
src = "#include <mysql/errmsg.h>\n#include <mysql/mysqld_error.h>\n"
|
58
|
+
else
|
59
|
+
exit 1
|
60
|
+
end
|
61
|
+
|
62
|
+
# make mysql constant
|
63
|
+
File.open("conftest.c", "w") do |f|
|
64
|
+
f.puts src
|
65
|
+
end
|
66
|
+
if defined? cpp_command then
|
67
|
+
cpp = Config.expand(cpp_command(''))
|
68
|
+
else
|
69
|
+
cpp = Config.expand sprintf(CPP, $CPPFLAGS, $CFLAGS, '')
|
70
|
+
end
|
71
|
+
if RUBY_PLATFORM =~ /mswin/ && !/-E/.match(cpp)
|
72
|
+
cpp << " -E"
|
73
|
+
end
|
74
|
+
unless system "#{cpp} > confout" then
|
75
|
+
exit 1
|
76
|
+
end
|
77
|
+
File.unlink "conftest.c"
|
78
|
+
|
79
|
+
error_syms = []
|
80
|
+
IO.foreach('confout') do |l|
|
81
|
+
next unless l =~ /errmsg\.h|mysqld_error\.h/
|
82
|
+
fn = l.split(/\"/)[1]
|
83
|
+
IO.foreach(fn) do |m|
|
84
|
+
if m =~ /^#define\s+([CE]R_[0-9A-Z_]+)/ then
|
85
|
+
error_syms << $1
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
File.unlink 'confout'
|
90
|
+
error_syms.uniq!
|
91
|
+
|
92
|
+
File.open('error_const.h', 'w') do |f|
|
93
|
+
error_syms.each do |s|
|
94
|
+
f.puts " rb_define_mysql_const(#{s});"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
create_makefile("mysql_api")
|