Hello community,

here is the log from the commit of package rubygem-mysql2 for openSUSE:Factory 
checked in at 2017-08-13 14:59:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mysql2 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-mysql2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-mysql2"

Sun Aug 13 14:59:20 2017 rev:23 rq:516061 version:0.4.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mysql2/rubygem-mysql2.changes    
2017-07-12 19:35:24.513412107 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-mysql2.new/rubygem-mysql2.changes       
2017-08-13 14:59:24.286982101 +0200
@@ -1,0 +2,14 @@
+Fri Aug 11 06:05:33 UTC 2017 - [email protected]
+
+- updated to version 0.4.9
+  # Bug Fixes
+    - Fixed enable_cleartext_plugin mode (#874)
+    - Prepared statements should handle booleans properly (#871)
+
+-------------------------------------------------------------------
+Thu Aug  3 10:16:21 UTC 2017 - [email protected]
+
+- updated to version 0.4.8
+  see installed CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  mysql2-0.4.7.gem

New:
----
  mysql2-0.4.9.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-mysql2.spec ++++++
--- /var/tmp/diff_new_pack.RQjjFZ/_old  2017-08-13 14:59:26.370689667 +0200
+++ /var/tmp/diff_new_pack.RQjjFZ/_new  2017-08-13 14:59:26.374689106 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-mysql2
-Version:        0.4.7
+Version:        0.4.9
 Release:        0
 %define mod_name mysql2
 %define mod_full_name %{mod_name}-%{version}

++++++ mysql2-0.4.7.gem -> mysql2-0.4.9.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
@@ -213,21 +213,18 @@
   )
 ```
 
-### Connecting to localhost
+### Connecting to MySQL on localhost and elsewhere
 
-The underlying MySQL client library has a special interpretation of the 
"localhost" default connection host name:
+The underlying MySQL client library uses the `:host` parameter to determine the
+type of connection to make, with special interpretation you should be aware of:
 
-  1. Attempt to connect via local socket (as specified in your distribution's 
my.cnf or `default_file` config file).
-  2. But if the socket is not available, look up "localhost" to find an IP 
address...
-     * The file "/etc/hosts" is generally the source of truth for "localhost", 
and can override its value.
-     * Systems with IPv4 use "127.0.0.1"
-     * Systems with IPv6 use "::1"
-     * Systems with both IPv4 and IPv6 can be configured to prefer one or the 
other.
-  3. If an address is found for "localhost", connect to it over TCP/IP.
-
-You can be explicit about using either a local socket or a TCP/IP connection,
-and whether to use IPv4 or IPv6, by specifying a value other than "localhost"
-for the `host` or `socket` connection options.
+* An empty value or `"localhost"` will attempt a local connection:
+  * On Unix, connect to the default local socket path. (To set a custom socket
+    path, use the `:socket` parameter).
+  * On Windows, connect using a shared-memory connection, if enabled, or TCP.
+* A value of `"."` on Windows specifies a named-pipe connection.
+* An IPv4 or IPv6 address will result in a TCP connection.
+* Any other value will be looked up as a hostname for a TCP connection.
 
 ### SSL options
 
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
@@ -903,10 +903,12 @@
       retval  = charval;
       break;
 
+#ifdef HAVE_CONST_MYSQL_ENABLE_CLEARTEXT_PLUGIN
     case MYSQL_ENABLE_CLEARTEXT_PLUGIN:
       boolval = (value == Qfalse ? 0 : 1);
       retval = &boolval;
       break;
+#endif
 
     default:
       return Qfalse;
@@ -1326,7 +1328,11 @@
 }
 
 static VALUE set_enable_cleartext_plugin(VALUE self, VALUE value) {
+#ifdef HAVE_CONST_MYSQL_ENABLE_CLEARTEXT_PLUGIN
   return _mysql_client_options(self, MYSQL_ENABLE_CLEARTEXT_PLUGIN, value);
+#else
+  rb_raise(cMysql2Error, "enable-cleartext-plugin is not available, you may 
need a newer MySQL client library");
+#endif
 }
 
 static VALUE initialize_ext(VALUE self) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/mysql2/extconf.rb new/ext/mysql2/extconf.rb
--- old/ext/mysql2/extconf.rb   1970-01-01 01:00:00.000000000 +0100
+++ new/ext/mysql2/extconf.rb   1970-01-01 01:00:00.000000000 +0100
@@ -114,6 +114,7 @@
 add_ssl_defines(mysql_h)
 have_struct_member('MYSQL', 'net.vio', mysql_h)
 have_struct_member('MYSQL', 'net.pvio', mysql_h)
+have_const('MYSQL_ENABLE_CLEARTEXT_PLUGIN', mysql_h)
 
 # This is our wishlist. We use whichever flags work on the host.
 # -Wall and -Wextra are included by default.
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
@@ -343,6 +343,16 @@
 #endif
           set_buffer_for_string(&bind_buffers[i], &length_buffers[i], 
params_enc[i]);
           break;
+        case T_TRUE:
+          bind_buffers[i].buffer_type = MYSQL_TYPE_TINY;
+          bind_buffers[i].buffer = xmalloc(sizeof(signed char));
+          *(signed char*)(bind_buffers[i].buffer) = 1;
+          break;
+        case T_FALSE:
+          bind_buffers[i].buffer_type = MYSQL_TYPE_TINY;
+          bind_buffers[i].buffer = xmalloc(sizeof(signed char));
+          *(signed char*)(bind_buffers[i].buffer) = 0;
+          break;
         default:
           // TODO: what Ruby type should support MYSQL_TYPE_TIME
           if (CLASS_OF(argv[i]) == rb_cTime || CLASS_OF(argv[i]) == cDateTime) 
{
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.7"
+  VERSION = "0.4.9"
 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.7
+  version: 0.4.9
 platform: ruby
 authors:
 - Brian Lopez
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-07-01 00:00:00.000000000 Z
+date: 2017-08-11 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
@@ -1026,6 +1026,11 @@
     expect(@client.ping).to eql(false)
   end
 
+  it "should be able to connect using plaintext password" do
+    client = new_client(:enable_cleartext_plugin => true)
+    client.query('SELECT 1')
+  end
+
   unless RUBY_VERSION =~ /1.8/
     it "should respond to #encoding" do
       expect(@client).to respond_to(:encoding)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/mysql2/statement_spec.rb 
new/spec/mysql2/statement_spec.rb
--- old/spec/mysql2/statement_spec.rb   1970-01-01 01:00:00.000000000 +0100
+++ new/spec/mysql2/statement_spec.rb   1970-01-01 01:00:00.000000000 +0100
@@ -61,6 +61,12 @@
     expect(rows).to eq([{ "1" => 1 }])
   end
 
+  it "should handle booleans" do
+    stmt = @client.prepare('SELECT ? AS `true`, ? AS `false`')
+    result = stmt.execute(true, false)
+    expect(result.to_a).to eq(['true' => 1, 'false' => 0])
+  end
+
   it "should handle bignum but in int64_t" do
     stmt = @client.prepare('SELECT ? AS max, ? AS min')
     int64_max = (1 << 63) - 1


Reply via email to