Hello community, here is the log from the commit of package rubygem-mysql2 for openSUSE:Factory checked in at 2017-06-08 15:01:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-mysql2 (Old) and /work/SRC/openSUSE:Factory/.rubygem-mysql2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mysql2" Thu Jun 8 15:01:21 2017 rev:21 rq:497698 version:0.4.6 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-mysql2/rubygem-mysql2.changes 2016-11-07 12:23:29.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-mysql2.new/rubygem-mysql2.changes 2017-06-08 15:01:22.428820006 +0200 @@ -1,0 +2,6 @@ +Tue May 23 10:04:10 UTC 2017 - [email protected] + +- updated to version 0.4.6 + see installed CHANGELOG.md + +------------------------------------------------------------------- Old: ---- mysql2-0.4.5.gem New: ---- mysql2-0.4.6.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-mysql2.spec ++++++ --- /var/tmp/diff_new_pack.bUm0Zv/_old 2017-06-08 15:01:23.008738161 +0200 +++ /var/tmp/diff_new_pack.bUm0Zv/_new 2017-06-08 15:01:23.012737597 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-mysql2 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-mysql2 -Version: 0.4.5 +Version: 0.4.6 Release: 0 %define mod_name mysql2 %define mod_full_name %{mod_name}-%{version} ++++++ mysql2-0.4.5.gem -> mysql2-0.4.6.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -85,6 +85,9 @@ common paths will be automatically searched. If you want to select a specific MySQL directory, use the `--with-mysql-dir` or `--with-mysql-config` options above. +If you have not done so already, you will need to install the XCode select tools by running +`xcode-select --install`. + ### Windows Make sure that you have Ruby and the DevKit compilers installed. We recommend the [Ruby Installer](http://rubyinstaller.org) distribution. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mysql2/client.c new/ext/mysql2/client.c --- old/ext/mysql2/client.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/mysql2/client.c 1970-01-01 01:00:00.000000000 +0100 @@ -111,7 +111,7 @@ int val = NUM2INT( setting ); if (version >= 50703 && version < 50711) { if (val == SSL_MODE_DISABLED || val == SSL_MODE_REQUIRED) { - my_bool b = ( val == SSL_MODE_REQUIRED ); + bool b = ( val == SSL_MODE_REQUIRED ); int result = mysql_options( wrapper->client, MYSQL_OPT_SSL_ENFORCE, &b ); return INT2NUM(result); @@ -504,7 +504,7 @@ */ static void *nogvl_read_query_result(void *ptr) { MYSQL * client = ptr; - my_bool res = mysql_read_query_result(client); + bool res = mysql_read_query_result(client); return (void *)(res == 0 ? Qtrue : Qfalse); } @@ -596,9 +596,11 @@ /* Invalidate the MySQL socket to prevent further communication. * The GC will come along later and call mysql_close to free it. */ - if (invalidate_fd(wrapper->client->net.fd) == Qfalse) { - fprintf(stderr, "[WARN] mysql2 failed to invalidate FD safely, closing unsafely\n"); - close(wrapper->client->net.fd); + if (wrapper->client) { + if (invalidate_fd(wrapper->client->net.fd) == Qfalse) { + fprintf(stderr, "[WARN] mysql2 failed to invalidate FD safely, closing unsafely\n"); + close(wrapper->client->net.fd); + } } rb_exc_raise(error); @@ -647,26 +649,30 @@ return Qnil; } -#else -static VALUE finish_and_mark_inactive(void *args) { - VALUE self = args; - MYSQL_RES *result; +#endif +static VALUE disconnect_and_mark_inactive(VALUE self) { GET_CLIENT(self); + /* Check if execution terminated while result was still being read. */ if (!NIL_P(wrapper->active_thread)) { - /* if we got here, the result hasn't been read off the wire yet - so lets do that and then throw it away because we have no way - of getting it back up to the caller from here */ - result = (MYSQL_RES *)rb_thread_call_without_gvl(nogvl_store_result, wrapper, RUBY_UBF_IO, 0); - mysql_free_result(result); - + /* Invalidate the MySQL socket to prevent further communication. */ +#ifndef _WIN32 + if (invalidate_fd(wrapper->client->net.fd) == Qfalse) { + rb_warn("mysql2 failed to invalidate FD safely, closing unsafely\n"); + close(wrapper->client->net.fd); + } +#else + close(wrapper->client->net.fd); +#endif + /* Skip mysql client check performed before command execution. */ + wrapper->client->status = MYSQL_STATUS_READY; wrapper->active_thread = Qnil; + wrapper->connected = 0; } return Qnil; } -#endif void rb_mysql_client_set_active_thread(VALUE self) { VALUE thread_current = rb_thread_current(); @@ -760,13 +766,13 @@ rb_rescue2(do_query, (VALUE)&async_args, disconnect_and_raise, self, rb_eException, (VALUE)0); - return rb_mysql_client_async_result(self); + return rb_ensure(rb_mysql_client_async_result, self, disconnect_and_mark_inactive, self); } #else do_send_query(&args); /* this will just block until the result is ready */ - return rb_ensure(rb_mysql_client_async_result, self, finish_and_mark_inactive, self); + return rb_ensure(rb_mysql_client_async_result, self, disconnect_and_mark_inactive, self); #endif } @@ -825,7 +831,7 @@ const void *retval = NULL; unsigned int intval = 0; const char * charval = NULL; - my_bool boolval; + bool boolval; GET_CLIENT(self); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mysql2/result.c new/ext/mysql2/result.c --- old/ext/mysql2/result.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/mysql2/result.c 1970-01-01 01:00:00.000000000 +0100 @@ -262,8 +262,8 @@ if (wrapper->result_buffers != NULL) return; wrapper->result_buffers = xcalloc(wrapper->numberOfFields, sizeof(MYSQL_BIND)); - wrapper->is_null = xcalloc(wrapper->numberOfFields, sizeof(my_bool)); - wrapper->error = xcalloc(wrapper->numberOfFields, sizeof(my_bool)); + wrapper->is_null = xcalloc(wrapper->numberOfFields, sizeof(bool)); + wrapper->error = xcalloc(wrapper->numberOfFields, sizeof(bool)); wrapper->length = xcalloc(wrapper->numberOfFields, sizeof(unsigned long)); for (i = 0; i < wrapper->numberOfFields; i++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mysql2/result.h new/ext/mysql2/result.h --- old/ext/mysql2/result.h 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/mysql2/result.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +1,6 @@ #ifndef MYSQL2_RESULT_H #define MYSQL2_RESULT_H +#include <stdbool.h> void init_mysql2_result(void); VALUE rb_mysql_result_to_obj(VALUE client, VALUE encoding, VALUE options, MYSQL_RES *r, VALUE statement); @@ -21,8 +22,8 @@ mysql_client_wrapper *client_wrapper; /* statement result bind buffers */ MYSQL_BIND *result_buffers; - my_bool *is_null; - my_bool *error; + bool *is_null; + bool *error; unsigned long *length; } mysql2_result_wrapper; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mysql2/statement.c new/ext/mysql2/statement.c --- old/ext/mysql2/statement.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/mysql2/statement.c 1970-01-01 01:00:00.000000000 +0100 @@ -124,7 +124,7 @@ // set STMT_ATTR_UPDATE_MAX_LENGTH attr { - my_bool truth = 1; + bool truth = 1; if (mysql_stmt_attr_set(stmt_wrapper->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &truth)) { rb_raise(cMysql2Error, "Unable to initialize prepared statement: set STMT_ATTR_UPDATE_MAX_LENGTH"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mysql2/client.rb new/lib/mysql2/client.rb --- old/lib/mysql2/client.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/mysql2/client.rb 1970-01-01 01:00:00.000000000 +0100 @@ -37,7 +37,7 @@ when :reconnect, :local_infile, :secure_auth, :automatic_close send(:"#{key}=", !!opts[key]) # rubocop:disable Style/DoubleNegation when :connect_timeout, :read_timeout, :write_timeout - send(:"#{key}=", opts[key].to_i) unless opts[key].nil? + send(:"#{key}=", Integer(opts[key])) unless opts[key].nil? else send(:"#{key}=", opts[key]) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mysql2/version.rb new/lib/mysql2/version.rb --- old/lib/mysql2/version.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/mysql2/version.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +1,3 @@ module Mysql2 - VERSION = "0.4.5" + VERSION = "0.4.6" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: mysql2 version: !ruby/object:Gem::Version - version: 0.4.5 + version: 0.4.6 platform: ruby authors: - Brian Lopez @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2016-10-22 00:00:00.000000000 Z +date: 2017-05-04 00:00:00.000000000 Z dependencies: [] description: email: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/mysql2/client_spec.rb new/spec/mysql2/client_spec.rb --- old/spec/mysql2/client_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/mysql2/client_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -538,15 +538,6 @@ }.to raise_error(Mysql2::Error) end - it 'should be impervious to connection-corrupting timeouts in #query' do - pending('`Thread.handle_interrupt` is not defined') unless Thread.respond_to?(:handle_interrupt) - # attempt to break the connection - expect { Timeout.timeout(0.1) { @client.query('SELECT SLEEP(0.2)') } }.to raise_error(Timeout::Error) - - # expect the connection to not be broken - expect { @client.query('SELECT 1') }.to_not raise_error - end - it 'should be impervious to connection-corrupting timeouts in #execute' do # the statement handle gets corrupted and will segfault the tests if interrupted, # so we can't even use pending on this test, really have to skip it on older Rubies.
