Hello community,
here is the log from the commit of package ruby-mysql
checked in at Mon Mar 12 02:02:59 CET 2007.
--------
--- ruby-mysql/ruby-mysql.changes 2006-10-20 01:31:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/ruby-mysql/ruby-mysql.changes 2007-03-12 01:56:11.041600000 +0100
@@ -1,0 +2,16 @@
+Mon Mar 12 01:43:23 CET 2007 - mrueckert@suse.de
+
+- update to version 2.7.3:
+ * BUG: Mysql#query with block is stopped when last query failed.
+- additional changes from 2.7.2:
+ * BUG: Mysql::Stmt#result_metadata don't return nil.
+ (Thanks to Hidetoshi)
+ * BUG: Mysql#close check mysql_errno.
+ * BUG: multistatement Mysql#query with block ignore error.
+ * extconf.rb for Visual C++. (Thanks to Shugo Maeda)
+ * support MySQL BIT type.
+ * add Mysql::Field::TYPE_BIT, TYPE_NEWDECIMAL.
+- updated ruby-mysql-2.7_gcc4.patch
+ new name: ruby-mysql-2.7.3_gcc4.patch
+
+-------------------------------------------------------------------
Old:
----
mysql-ruby-2.7.1.tar.gz
ruby-mysql-2.7_gcc4.patch
New:
----
mysql-ruby-2.7.3.tar.gz
ruby-mysql-2.7.3_gcc4.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ruby-mysql.spec ++++++
--- /var/tmp/diff_new_pack.G16740/_old 2007-03-12 02:02:50.000000000 +0100
+++ /var/tmp/diff_new_pack.G16740/_new 2007-03-12 02:02:51.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package ruby-mysql (Version 2.7.1)
+# spec file for package ruby-mysql (Version 2.7.3)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,20 +11,19 @@
# norootforbuild
Name: ruby-mysql
-%define rb_pkg mysql-ruby
-#
-Version: 2.7.1
-Release: 12
+Version: 2.7.3
+Release: 1
#
License: Other uncritical OpenSource License
Group: Development/Languages/Ruby
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: mysql-devel ruby-devel
+BuildRequires: mysql-devel openssl-devel ruby-devel
+%define rb_pkg mysql-ruby
#
URL: http://www.tmtm.org/en/mysql/ruby/
Source: http://tmtm.org/downloads/mysql/ruby/%{rb_pkg}-%{version}.tar.gz
-Patch: ruby-mysql-2.7_gcc4.patch
+Patch: ruby-mysql-2.7.3_gcc4.patch
#
Summary: MySQL bindings for Ruby
@@ -53,7 +52,20 @@
%doc README* COPYING* *css test.rb
%{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/mysql.so
-%changelog -n ruby-mysql
+%changelog
+* Mon Mar 12 2007 - mrueckert@suse.de
+- update to version 2.7.3:
+ * BUG: Mysql#query with block is stopped when last query failed.
+- additional changes from 2.7.2:
+ * BUG: Mysql::Stmt#result_metadata don't return nil.
+ (Thanks to Hidetoshi)
+ * BUG: Mysql#close check mysql_errno.
+ * BUG: multistatement Mysql#query with block ignore error.
+ * extconf.rb for Visual C++. (Thanks to Shugo Maeda)
+ * support MySQL BIT type.
+ * add Mysql::Field::TYPE_BIT, TYPE_NEWDECIMAL.
+- updated ruby-mysql-2.7_gcc4.patch
+ new name: ruby-mysql-2.7.3_gcc4.patch
* Sat Sep 30 2006 - mrueckert@suse.de
- install into vendor_ruby
* Sun Jun 04 2006 - mrueckert@suse.de
++++++ mysql-ruby-2.7.1.tar.gz -> mysql-ruby-2.7.3.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mysql-ruby-2.7.1/extconf.rb new/mysql-ruby-2.7.3/extconf.rb
--- old/mysql-ruby-2.7.1/extconf.rb 2004-09-20 14:03:47.000000000 +0200
+++ new/mysql-ruby-2.7.3/extconf.rb 2006-10-29 15:59:44.000000000 +0100
@@ -1,6 +1,9 @@
require 'mkmf'
-if mc = with_config('mysql-config') then
+if /mswin32/ =~ RUBY_PLATFORM
+ inc, lib = dir_config('mysql')
+ exit 1 unless have_library("libmysql")
+elsif mc = with_config('mysql-config') then
mc = 'mysql_config' if mc == true
cflags = `#{mc} --cflags`.chomp
exit 1 if $? != 0
@@ -10,7 +13,7 @@
$libs = libs + " " + $libs
else
inc, lib = dir_config('mysql', '/usr/local')
- libs = ['m', 'z', 'socket', 'nsl']
+ libs = ['m', 'z', 'socket', 'nsl', 'mygcc']
while not find_library('mysqlclient', 'mysql_query', lib, "#{lib}/mysql") do
exit 1 if libs.empty?
have_library(libs.shift)
@@ -36,6 +39,9 @@
else
cpp = Config::expand sprintf(CPP, $CPPFLAGS, $CFLAGS, '')
end
+if /mswin32/ =~ RUBY_PLATFORM && !/-E/.match(cpp)
+ cpp << " -E"
+end
unless system "#{cpp} > confout" then
exit 1
end
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mysql-ruby-2.7.1/mysql.c.in new/mysql-ruby-2.7.3/mysql.c.in
--- old/mysql-ruby-2.7.1/mysql.c.in 2006-06-04 16:29:28.000000000 +0200
+++ new/mysql-ruby-2.7.3/mysql.c.in 2006-12-20 06:31:52.000000000 +0100
@@ -1,5 +1,5 @@
/* ruby mysql module
- * $Id: mysql.c.in,v 1.32 2006/06/04 14:29:28 tommy Exp $
+ * $Id: mysql.c.in,v 1.38 2006-12-20 05:31:52 tommy Exp $
*/
#include "ruby.h"
@@ -14,7 +14,7 @@
#include
#endif
-#define MYSQL_RUBY_VERSION 20701
+#define MYSQL_RUBY_VERSION 20703
#define GC_STORE_RESULT_LIMIT 20
@@ -182,7 +182,6 @@
static VALUE make_field_obj(MYSQL_FIELD* f)
{
VALUE obj;
- VALUE hash;
if (f == NULL)
return Qnil;
obj = rb_obj_alloc(cMysqlField);
@@ -446,8 +445,6 @@
{
MYSQL* m = GetHandler(obj);
mysql_close(m);
- if (mysql_errno(m))
- mysql_raise(m);
GetMysqlStruct(obj)->connection = Qfalse;
return obj;
}
@@ -700,6 +697,7 @@
/* query(sql) */
static VALUE query(VALUE obj, VALUE sql)
{
+ int loop = 0;
MYSQL* m = GetHandler(obj);
Check_Type(sql, T_STRING);
if (rb_block_given_p()) {
@@ -718,11 +716,12 @@
VALUE robj = mysqlres2obj(res);
rb_ensure(rb_yield, robj, res_free, robj);
}
- }
#if MYSQL_VERSION_ID >= 40101
- while (mysql_next_result(m) == 0);
+ if ((loop = mysql_next_result(m)) > 0)
+ mysql_raise(m);
+ } while (loop == 0);
#else
- while (0);
+ } while (0);
#endif
return obj;
}
@@ -1313,7 +1312,6 @@
struct mysql_stmt *s = DATA_PTR(obj);
MYSQL_STMT *stmt = s->stmt;
my_bool true = 1;
- my_bool false = 0;
int i;
check_stmt_closed(obj);
@@ -1334,7 +1332,7 @@
case T_BIGNUM:
s->param.bind[i].buffer_type = MYSQL_TYPE_LONGLONG;
s->param.bind[i].buffer = &(s->param.buffer[i]);
- *(long long*)(s->param.bind[i].buffer) = rb_big2ll(argv[i]);
+ *(LONG_LONG*)(s->param.bind[i].buffer) = rb_big2ll(argv[i]);
break;
case T_FLOAT:
s->param.bind[i].buffer_type = MYSQL_TYPE_DOUBLE;
@@ -1435,7 +1433,7 @@
v = INT2NUM(*(long*)s->result.bind[i].buffer);
break;
case MYSQL_TYPE_LONGLONG:
- v = rb_ll2inum(*(long long*)s->result.bind[i].buffer);
+ v = rb_ll2inum(*(LONG_LONG*)s->result.bind[i].buffer);
break;
case MYSQL_TYPE_DOUBLE:
v = rb_float_new(*(double*)s->result.bind[i].buffer);
@@ -1560,6 +1558,7 @@
case FIELD_TYPE_DECIMAL:
#if MYSQL_VERSION_ID >= 50003
case FIELD_TYPE_NEWDECIMAL:
+ case FIELD_TYPE_BIT:
#endif
return MYSQL_TYPE_STRING;
case FIELD_TYPE_BLOB:
@@ -1630,8 +1629,11 @@
MYSQL_RES *res;
check_stmt_closed(obj);
res = mysql_stmt_result_metadata(s->stmt);
- if (res == NULL && mysql_stmt_errno(s->stmt) != 0)
+ if (res == NULL) {
+ if (mysql_stmt_errno(s->stmt) != 0)
mysql_stmt_raise(s->stmt);
+ return Qnil;
+ }
return mysqlres2obj(res);
}
@@ -1700,6 +1702,7 @@
rb_iv_set(obj, "second", NILorFIXvalue(second));
rb_iv_set(obj, "neg", (neg == Qnil || neg == Qfalse) ? Qfalse : Qtrue);
rb_iv_set(obj, "second_part", NILorFIXvalue(second_part));
+ return obj;
}
static VALUE time_inspect(VALUE obj)
@@ -2081,6 +2084,10 @@
#if MYSQL_VERSION_ID >= 32130
rb_define_const(cMysqlField, "TYPE_YEAR", INT2NUM(FIELD_TYPE_YEAR));
#endif
+#if MYSQL_VERSION_ID >= 50003
+ rb_define_const(cMysqlField, "TYPE_BIT", INT2NUM(FIELD_TYPE_BIT));
+ rb_define_const(cMysqlField, "TYPE_NEWDECIMAL", INT2NUM(FIELD_TYPE_NEWDECIMAL));
+#endif
rb_define_const(cMysqlField, "TYPE_SET", INT2NUM(FIELD_TYPE_SET));
rb_define_const(cMysqlField, "TYPE_BLOB", INT2NUM(FIELD_TYPE_BLOB));
rb_define_const(cMysqlField, "TYPE_STRING", INT2NUM(FIELD_TYPE_STRING));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mysql-ruby-2.7.1/README.html new/mysql-ruby-2.7.3/README.html
--- old/mysql-ruby-2.7.1/README.html 2006-06-04 16:39:53.000000000 +0200
+++ new/mysql-ruby-2.7.3/README.html 2006-12-20 06:31:52.000000000 +0100
@@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- $Id: README.html,v 1.18 2006/06/04 14:39:53 tommy Exp $ -->
+<!-- $Id: README.html,v 1.20 2006-12-20 05:31:52 tommy Exp $ -->
<html>
<head>
<meta http-equiv="content-style-type" content="text/css">
@@ -22,8 +22,8 @@
<h2>Requirement</h2>
<ul>
- <li>MySQL 4.1.15/5.0.16
- <li>Ruby 1.8.4
+ <li>MySQL 5.0.27
+ <li>Ruby 1.8.5
</ul>
<p>
The module may work for other versions, but that has not been verified.
@@ -103,6 +103,9 @@
<pre class="code">
% env LD_RUN_PATH=<i>libmysqlclient.so directory</i> make
</pre>
+ <p>
+ test.rb is tested on Linux only.
+ </p>
<h2>Usage</h2>
<p>
@@ -697,7 +700,7 @@
<tr><td>FLOAT, DOUBLE<td>Float
<tr><td>DECIMAL<td>String
<tr><td>DATE, DATETIME, TIMESTAMP, TIME<td>Mysql::Time
- <tr><td>CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, TINYBLOB, TINYTEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET<td>String
+ <tr><td>CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, TINYBLOB, TINYTEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET, BIT<td>String
<tr><td>NULL<td>NilClass
</table>
@@ -811,6 +814,25 @@
<h2>History</h2>
<dl>
+ <dt>2006-12-20
+ <dd>
+ version 2.7.3
+ <ul>
+ <li>BUG: Mysql#query with block is stopped when last query failed.
+ </ul>
+
+ <dt>2006-10-28
+ <dd>
+ version 2.7.2
+ <ul>
+ <li>BUG: Mysql::Stmt#result_metadata don't return nil. (Thanks to Hidetoshi)
+ <li>BUG: Mysql#close check mysql_errno.
+ <li>BUG: multistatement Mysql#query with block ignore error.
+ <li>extconf.rb for Visual C++. (Thanks to Shugo Maeda)
+ <li>support MySQL BIT type.
+ <li>add Mysql::Field::TYPE_BIT, TYPE_NEWDECIMAL.
+ </ul>
+
<dt>2006-06-04
<dd>
version 2.7.1
@@ -1011,7 +1033,7 @@
<address><a href="mailto:tommy@tmtm.org">TOMITA Masahiro</a></address>
<!-- Created: Sun Aug 29 11:52:09 JST 2004 -->
<!-- hhmts start -->
-Last modified: Sun Jun 4 23:39:34 JST 2006
+Last modified: Wed Dec 20 14:30:14 JST 2006
<!-- hhmts end -->
</body>
</html>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mysql-ruby-2.7.1/README_ja.html new/mysql-ruby-2.7.3/README_ja.html
--- old/mysql-ruby-2.7.1/README_ja.html 2006-06-04 16:39:53.000000000 +0200
+++ new/mysql-ruby-2.7.3/README_ja.html 2006-12-20 06:31:52.000000000 +0100
@@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- $Id: README_ja.html,v 1.22 2006/06/04 14:39:53 tommy Exp $ -->
+<!-- $Id: README_ja.html,v 1.24 2006-12-20 05:31:52 tommy Exp $ -->
<html>
<head>
<meta http-equiv="content-style-type" content="text/css">
@@ -21,8 +21,8 @@
<h2>ɬ�פʤ��</h2>
<ul>
- <li>MySQL 4.1.15/5.0.16
- <li>Ruby 1.8.4
+ <li>MySQL 5.0.27
+ <li>Ruby 1.8.5
</ul>
<p>
�����ʳ��Ǥ� make �Ǥ��뤫�⤷��ޤ�����ǧ���Ƥޤ���
@@ -100,6 +100,10 @@
<pre class="code">
% env LD_RUN_PATH=<i>libmysqlclient.so��</i> make
</pre>
+ <p>
+ test.rb �� Linux ��Ǥ�ư�����ǧ���Ƥ��ޤ���
+ ¾�Υץ�åȥե�����Ǥϥ��顼���Ф뤫�⤷��ޤ���
+ </p>
<h2>�Ȥ���</h2>
<p>
@@ -743,7 +747,7 @@
<tr><td>FLOAT, DOUBLE<td>Float
<tr><td>DECIMAL<td>String
<tr><td>DATE, DATETIME, TIMESTAMP, TIME<td>Mysql::Time
- <tr><td>CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, TINYBLOB, TINYTEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET<td>String
+ <tr><td>CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, TINYTEXT, TINYBLOB, TINYTEXT, MEDIUMBLOB, MEDIUMTEXT, LONGBLOB, LONGTEXT, ENUM, SET, BIT<td>String
<tr><td>NULL<td>NilClass
</table>
@@ -891,6 +895,25 @@
<h2>����</h2>
<dl>
+ <dt>2006-12-20
+ <dd>
+ version 2.7.3
+ <ul>
+ <li>BUG: �֥��å��Ĥ� Mysql#query �����Ǹ�Υ����꤬���顼�ξ�����ߤ��Ƥ��ޤ���
+ </ul>
+
+ <dt>2006-10-28
+ <dd>
+ version 2.7.2
+ <ul>
+ <li>BUG: ��̤��֤��ʤ�������� Mysql::Stmt#result_metadata �� nil ���Ѥ����褦�ˤ��� (Thanks to Hidetoshi)
+ <li>BUG: Mysql#close �� mysql_errno �ʤ��褦���ѹ�
+ <li>BUG: �֥��å��Ĥ� Mysql#query ��ʣ�����ơ��ȥ��Ȼ��˥��顼��̵�뤷�Ƥ�����
+ <li>extconf.rb �� Visual C++ �б� (Thanks to Shugo Maeda)
+ <li>BIT�����б�
+ <li>Mysql::Field �� TYPE_BIT, TYPE_NEWDECIMAL �ɲ�
+ </ul>
+
<dt>2006-06-04
<dd>
version 2.7.1
@@ -1235,7 +1258,7 @@
<address><a href="mailto:tommy@tmtm.org">TOMITA Masahiro</a></address>
<!-- Created: Sun Aug 29 11:52:09 JST 2004 -->
<!-- hhmts start -->
-Last modified: Sun Jun 4 23:39:20 JST 2006
+Last modified: Wed Dec 20 14:31:13 JST 2006
<!-- hhmts end -->
</body>
</html>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mysql-ruby-2.7.1/test.rb new/mysql-ruby-2.7.3/test.rb
--- old/mysql-ruby-2.7.1/test.rb 2006-06-04 16:39:53.000000000 +0200
+++ new/mysql-ruby-2.7.3/test.rb 2006-12-20 06:31:52.000000000 +0100
@@ -1,5 +1,5 @@
#!/usr/local/bin/ruby
-# $Id: test.rb,v 1.18 2006/06/04 14:39:53 tommy Exp $
+# $Id: test.rb,v 1.23 2006-12-20 05:31:52 tommy Exp $
require "test/unit"
require "./mysql.o"
@@ -16,7 +16,7 @@
end
def test_version()
- assert_equal(20701, Mysql::VERSION)
+ assert_equal(20703, Mysql::VERSION)
end
def test_init()
@@ -48,11 +48,11 @@
end
def test_get_client_info()
- assert_match(/^\d.\d+.\d+(-.*)?$/, Mysql.get_client_info())
+ assert_match(/^\d.\d+.\d+[a-z]?(-.*)?$/, Mysql.get_client_info())
end
def test_client_info()
- assert_match(/^\d.\d+.\d+(-.*)?$/, Mysql.client_info())
+ assert_match(/^\d.\d+.\d+[a-z]?(-.*)?$/, Mysql.client_info())
end
def test_options()
@@ -103,7 +103,7 @@
@m = Mysql.new(@host, @user, @pass, @db, @port, @sock, @flag)
end
def teardown()
- @m.close
+ @m.close if @m
end
def test_affected_rows()
@@ -142,6 +142,33 @@
end
end if Mysql.client_version >= 40100
+ def test_query_with_block()
+ if @m.server_version >= 40100 then
+ expect = [["1","2","3"], ["4","5","6"]]
+ @m.query("select 1,2,3; select 4,5,6") {|res|
+ assert_equal(1, res.num_rows)
+ assert_equal(expect.shift, res.fetch_row)
+ }
+ assert(expect.empty?)
+ expect = [["1","2","3"], ["4","5","6"]]
+ assert_raises(Mysql::Error) {
+ @m.query("select 1,2,3; hoge; select 4,5,6") {|res|
+ assert_equal(1, res.num_rows)
+ assert_equal(expect.shift, res.fetch_row)
+ }
+ }
+ assert_equal(1, expect.size)
+ expect = [["1","2","3"], ["4","5","6"]]
+ assert_raises(Mysql::Error) {
+ @m.query("select 1,2,3; select 4,5,6; hoge") {|res|
+ assert_equal(1, res.num_rows)
+ assert_equal(expect.shift, res.fetch_row)
+ }
+ }
+ assert(expect.empty?)
+ end
+ end
+
def test_set_server_option()
if @m.server_version >= 40101 then
assert_equal(@m, @m.set_server_option(Mysql::OPTION_MULTI_STATEMENTS_ON))
@@ -662,6 +689,31 @@
end
end
+ def test_fetch_bit()
+ if @m.client_version >= 50003 and @m.server_version >= 50003 then
+ @m.query("create temporary table t (i bit(8))")
+ @m.query("insert into t values (0),(-1),(127),(-128),(255),(-255),(256)")
+ @s.prepare("select i from t")
+ @s.execute
+ assert_equal(["\x00"], @s.fetch)
+ assert_equal(["\xff"], @s.fetch)
+ assert_equal(["\x7f"], @s.fetch)
+ assert_equal(["\xff"], @s.fetch)
+ assert_equal(["\xff"], @s.fetch)
+ assert_equal(["\xff"], @s.fetch)
+ assert_equal(["\xff"], @s.fetch)
+ @m.query("create temporary table t2 (i bit(64))")
+ @m.query("insert into t2 values (0),(-1),(4294967296),(18446744073709551615),(18446744073709551616)")
+ @s.prepare("select i from t2")
+ @s.execute
+ assert_equal(["\x00\x00\x00\x00\x00\x00\x00\x00"], @s.fetch)
+ assert_equal(["\xff\xff\xff\xff\xff\xff\xff\xff"], @s.fetch)
+ assert_equal(["\x00\x00\x00\x01\x00\x00\x00\x00"], @s.fetch)
+ assert_equal(["\xff\xff\xff\xff\xff\xff\xff\xff"], @s.fetch)
+ assert_equal(["\xff\xff\xff\xff\xff\xff\xff\xff"], @s.fetch)
+ end
+ end
+
def test_fetch_tinyint()
if @m.server_version >= 40100 then
@m.query("create temporary table t (i tinyint)")
@@ -1254,6 +1306,14 @@
end
end
+ def test_result_metadata_nodata()
+ if @m.server_version >= 40100 then
+ @m.query("create temporary table t (i int)")
+ @s.prepare("insert into t values (1)")
+ assert_equal(nil, @s.result_metadata())
+ end
+ end
+
def test_row_seek_tell()
if @m.server_version >= 40100 then
@m.query("create temporary table t (i int)")
@@ -1285,7 +1345,11 @@
def test_sqlstate()
if @m.server_version >= 40100 then
@s.prepare("select 1")
- assert_equal("", @s.sqlstate)
+ if @m.client_version >= 50000 then
+ assert_equal("00000", @s.sqlstate)
+ else
+ assert_equal("", @s.sqlstate)
+ end
assert_raises(Mysql::Error){@s.prepare("hogehoge")}
assert_equal("42000", @s.sqlstate)
end
++++++ ruby-mysql-2.7_gcc4.patch -> ruby-mysql-2.7.3_gcc4.patch ++++++
--- ruby-mysql/ruby-mysql-2.7_gcc4.patch 2006-10-20 01:31:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/ruby-mysql/ruby-mysql-2.7.3_gcc4.patch 2007-03-12 01:56:11.041600000 +0100
@@ -1,8 +1,22 @@
+mysql.c: In function 'time_inspect':
+mysql.c:1719: warning: format '%04d' expects type 'int', but argument 5 has type 'long int'
+mysql.c:1719: warning: format '%02d' expects type 'int', but argument 6 has type 'long int'
+mysql.c:1719: warning: format '%02d' expects type 'int', but argument 7 has type 'long int'
+mysql.c:1719: warning: format '%02d' expects type 'int', but argument 8 has type 'long int'
+mysql.c:1719: warning: format '%02d' expects type 'int', but argument 9 has type 'long int'
+mysql.c:1719: warning: format '%02d' expects type 'int', but argument 10 has type 'long int'
+mysql.c: In function 'time_to_s':
+mysql.c:1732: warning: format '%04d' expects type 'int', but argument 5 has type 'long int'
+mysql.c:1732: warning: format '%02d' expects type 'int', but argument 6 has type 'long int'
+mysql.c:1732: warning: format '%02d' expects type 'int', but argument 7 has type 'long int'
+mysql.c:1732: warning: format '%02d' expects type 'int', but argument 8 has type 'long int'
+mysql.c:1732: warning: format '%02d' expects type 'int', but argument 9 has type 'long int'
+mysql.c:1732: warning: format '%02d' expects type 'int', but argument 10 has type 'long int'
Index: mysql.c.in
===================================================================
---- mysql.c.in.orig
-+++ mysql.c.in
-@@ -1362,6 +1362,7 @@ static VALUE stmt_execute(int argc, VALU
+--- mysql.c.in.orig 2006-12-20 06:31:52.000000000 +0100
++++ mysql.c.in 2007-03-12 01:32:25.229145395 +0100
+@@ -1360,6 +1360,7 @@ static VALUE stmt_execute(int argc, VALU
t.day = FIX2INT(RARRAY(a)->ptr[3]);
t.month = FIX2INT(RARRAY(a)->ptr[4]);
t.year = FIX2INT(RARRAY(a)->ptr[5]);
@@ -10,7 +24,7 @@
*(MYSQL_TIME*)&(s->param.buffer[i]) = t;
} else if (CLASS_OF(argv[i]) == cMysqlTime) {
MYSQL_TIME t;
-@@ -1375,6 +1376,7 @@ static VALUE stmt_execute(int argc, VALU
+@@ -1373,6 +1374,7 @@ static VALUE stmt_execute(int argc, VALU
t.day = NUM2INT(rb_iv_get(argv[i], "day"));
t.month = NUM2INT(rb_iv_get(argv[i], "month"));
t.year = NUM2INT(rb_iv_get(argv[i], "year"));
@@ -18,13 +32,7 @@
*(MYSQL_TIME*)&(s->param.buffer[i]) = t;
} else
rb_raise(rb_eTypeError, "unsupported type: %d", TYPE(argv[i]));
-@@ -1700,31 +1702,32 @@ static VALUE time_initialize(int argc, V
- rb_iv_set(obj, "second", NILorFIXvalue(second));
- rb_iv_set(obj, "neg", (neg == Qnil || neg == Qfalse) ? Qfalse : Qtrue);
- rb_iv_set(obj, "second_part", NILorFIXvalue(second_part));
-+ return obj;
- }
-
+@@ -1708,26 +1710,26 @@ static VALUE time_initialize(int argc, V
static VALUE time_inspect(VALUE obj)
{
char buf[36];
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org