mysql2 0.4.8-x64-mingw32 → 0.4.9-x64-mingw32
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/README.md +12 -15
 - data/ext/mysql2/client.c +2 -2
 - data/ext/mysql2/extconf.rb +1 -0
 - data/ext/mysql2/statement.c +10 -0
 - data/lib/mysql2/2.0/mysql2.so +0 -0
 - data/lib/mysql2/2.1/mysql2.so +0 -0
 - data/lib/mysql2/2.2/mysql2.so +0 -0
 - data/lib/mysql2/2.3/mysql2.so +0 -0
 - data/lib/mysql2/version.rb +1 -1
 - data/spec/mysql2/client_spec.rb +5 -0
 - data/spec/mysql2/statement_spec.rb +6 -0
 - data/vendor/libmysql.dll +0 -0
 - metadata +4 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8e3409d4a03fd28519b22efc33f278ce3aa9747b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d5605e66285be9ebdd481b6807a5dffc3a6652d5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: dad4c657bd50bdb893befd7dc38ac130a75860259bf3cd623ebec6ec3f865962366b7b2c004b6d5fbc237acb0dee7b13a5221bf6bff7489c83ded2b74bafd211
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a806aa3e440b201aa563738282f6abc05b38ad89edd19ab75864d8f3cb4e9e2eeb8288100a6173dc101b5b320c763515ca6b5aaf229f7c253d90fd035f62ef2a
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -213,21 +213,18 @@ Mysql2::Client.new( 
     | 
|
| 
       213 
213 
     | 
    
         
             
              )
         
     | 
| 
       214 
214 
     | 
    
         
             
            ```
         
     | 
| 
       215 
215 
     | 
    
         | 
| 
       216 
     | 
    
         
            -
            ### Connecting to localhost
         
     | 
| 
       217 
     | 
    
         
            -
             
     | 
| 
       218 
     | 
    
         
            -
            The underlying MySQL client library  
     | 
| 
       219 
     | 
    
         
            -
             
     | 
| 
       220 
     | 
    
         
            -
             
     | 
| 
       221 
     | 
    
         
            -
             
     | 
| 
       222 
     | 
    
         
            -
             
     | 
| 
       223 
     | 
    
         
            -
             
     | 
| 
       224 
     | 
    
         
            -
             
     | 
| 
       225 
     | 
    
         
            -
             
     | 
| 
       226 
     | 
    
         
            -
             
     | 
| 
       227 
     | 
    
         
            -
             
     | 
| 
       228 
     | 
    
         
            -
            You can be explicit about using either a local socket or a TCP/IP connection,
         
     | 
| 
       229 
     | 
    
         
            -
            and whether to use IPv4 or IPv6, by specifying a value other than "localhost"
         
     | 
| 
       230 
     | 
    
         
            -
            for the `host` or `socket` connection options.
         
     | 
| 
      
 216 
     | 
    
         
            +
            ### Connecting to MySQL on localhost and elsewhere
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
      
 218 
     | 
    
         
            +
            The underlying MySQL client library uses the `:host` parameter to determine the
         
     | 
| 
      
 219 
     | 
    
         
            +
            type of connection to make, with special interpretation you should be aware of:
         
     | 
| 
      
 220 
     | 
    
         
            +
             
     | 
| 
      
 221 
     | 
    
         
            +
            * An empty value or `"localhost"` will attempt a local connection:
         
     | 
| 
      
 222 
     | 
    
         
            +
              * On Unix, connect to the default local socket path. (To set a custom socket
         
     | 
| 
      
 223 
     | 
    
         
            +
                path, use the `:socket` parameter).
         
     | 
| 
      
 224 
     | 
    
         
            +
              * On Windows, connect using a shared-memory connection, if enabled, or TCP.
         
     | 
| 
      
 225 
     | 
    
         
            +
            * A value of `"."` on Windows specifies a named-pipe connection.
         
     | 
| 
      
 226 
     | 
    
         
            +
            * An IPv4 or IPv6 address will result in a TCP connection.
         
     | 
| 
      
 227 
     | 
    
         
            +
            * Any other value will be looked up as a hostname for a TCP connection.
         
     | 
| 
       231 
228 
     | 
    
         | 
| 
       232 
229 
     | 
    
         
             
            ### SSL options
         
     | 
| 
       233 
230 
     | 
    
         | 
    
        data/ext/mysql2/client.c
    CHANGED
    
    | 
         @@ -903,7 +903,7 @@ static VALUE _mysql_client_options(VALUE self, int opt, VALUE value) { 
     | 
|
| 
       903 
903 
     | 
    
         
             
                  retval  = charval;
         
     | 
| 
       904 
904 
     | 
    
         
             
                  break;
         
     | 
| 
       905 
905 
     | 
    
         | 
| 
       906 
     | 
    
         
            -
            #ifdef  
     | 
| 
      
 906 
     | 
    
         
            +
            #ifdef HAVE_CONST_MYSQL_ENABLE_CLEARTEXT_PLUGIN
         
     | 
| 
       907 
907 
     | 
    
         
             
                case MYSQL_ENABLE_CLEARTEXT_PLUGIN:
         
     | 
| 
       908 
908 
     | 
    
         
             
                  boolval = (value == Qfalse ? 0 : 1);
         
     | 
| 
       909 
909 
     | 
    
         
             
                  retval = &boolval;
         
     | 
| 
         @@ -1328,7 +1328,7 @@ static VALUE set_init_command(VALUE self, VALUE value) { 
     | 
|
| 
       1328 
1328 
     | 
    
         
             
            }
         
     | 
| 
       1329 
1329 
     | 
    
         | 
| 
       1330 
1330 
     | 
    
         
             
            static VALUE set_enable_cleartext_plugin(VALUE self, VALUE value) {
         
     | 
| 
       1331 
     | 
    
         
            -
            #ifdef  
     | 
| 
      
 1331 
     | 
    
         
            +
            #ifdef HAVE_CONST_MYSQL_ENABLE_CLEARTEXT_PLUGIN
         
     | 
| 
       1332 
1332 
     | 
    
         
             
              return _mysql_client_options(self, MYSQL_ENABLE_CLEARTEXT_PLUGIN, value);
         
     | 
| 
       1333 
1333 
     | 
    
         
             
            #else
         
     | 
| 
       1334 
1334 
     | 
    
         
             
              rb_raise(cMysql2Error, "enable-cleartext-plugin is not available, you may need a newer MySQL client library");
         
     | 
    
        data/ext/mysql2/extconf.rb
    CHANGED
    
    | 
         @@ -114,6 +114,7 @@ mysql_h = [prefix, 'mysql.h'].compact.join('/') 
     | 
|
| 
       114 
114 
     | 
    
         
             
            add_ssl_defines(mysql_h)
         
     | 
| 
       115 
115 
     | 
    
         
             
            have_struct_member('MYSQL', 'net.vio', mysql_h)
         
     | 
| 
       116 
116 
     | 
    
         
             
            have_struct_member('MYSQL', 'net.pvio', mysql_h)
         
     | 
| 
      
 117 
     | 
    
         
            +
            have_const('MYSQL_ENABLE_CLEARTEXT_PLUGIN', mysql_h)
         
     | 
| 
       117 
118 
     | 
    
         | 
| 
       118 
119 
     | 
    
         
             
            # This is our wishlist. We use whichever flags work on the host.
         
     | 
| 
       119 
120 
     | 
    
         
             
            # -Wall and -Wextra are included by default.
         
     | 
    
        data/ext/mysql2/statement.c
    CHANGED
    
    | 
         @@ -343,6 +343,16 @@ static VALUE execute(int argc, VALUE *argv, VALUE self) { 
     | 
|
| 
       343 
343 
     | 
    
         
             
            #endif
         
     | 
| 
       344 
344 
     | 
    
         
             
                      set_buffer_for_string(&bind_buffers[i], &length_buffers[i], params_enc[i]);
         
     | 
| 
       345 
345 
     | 
    
         
             
                      break;
         
     | 
| 
      
 346 
     | 
    
         
            +
                    case T_TRUE:
         
     | 
| 
      
 347 
     | 
    
         
            +
                      bind_buffers[i].buffer_type = MYSQL_TYPE_TINY;
         
     | 
| 
      
 348 
     | 
    
         
            +
                      bind_buffers[i].buffer = xmalloc(sizeof(signed char));
         
     | 
| 
      
 349 
     | 
    
         
            +
                      *(signed char*)(bind_buffers[i].buffer) = 1;
         
     | 
| 
      
 350 
     | 
    
         
            +
                      break;
         
     | 
| 
      
 351 
     | 
    
         
            +
                    case T_FALSE:
         
     | 
| 
      
 352 
     | 
    
         
            +
                      bind_buffers[i].buffer_type = MYSQL_TYPE_TINY;
         
     | 
| 
      
 353 
     | 
    
         
            +
                      bind_buffers[i].buffer = xmalloc(sizeof(signed char));
         
     | 
| 
      
 354 
     | 
    
         
            +
                      *(signed char*)(bind_buffers[i].buffer) = 0;
         
     | 
| 
      
 355 
     | 
    
         
            +
                      break;
         
     | 
| 
       346 
356 
     | 
    
         
             
                    default:
         
     | 
| 
       347 
357 
     | 
    
         
             
                      // TODO: what Ruby type should support MYSQL_TYPE_TIME
         
     | 
| 
       348 
358 
     | 
    
         
             
                      if (CLASS_OF(argv[i]) == rb_cTime || CLASS_OF(argv[i]) == cDateTime) {
         
     | 
    
        data/lib/mysql2/2.0/mysql2.so
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/mysql2/2.1/mysql2.so
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/mysql2/2.2/mysql2.so
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/mysql2/2.3/mysql2.so
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/mysql2/version.rb
    CHANGED
    
    
    
        data/spec/mysql2/client_spec.rb
    CHANGED
    
    | 
         @@ -1026,6 +1026,11 @@ RSpec.describe Mysql2::Client do 
     | 
|
| 
       1026 
1026 
     | 
    
         
             
                expect(@client.ping).to eql(false)
         
     | 
| 
       1027 
1027 
     | 
    
         
             
              end
         
     | 
| 
       1028 
1028 
     | 
    
         | 
| 
      
 1029 
     | 
    
         
            +
              it "should be able to connect using plaintext password" do
         
     | 
| 
      
 1030 
     | 
    
         
            +
                client = new_client(:enable_cleartext_plugin => true)
         
     | 
| 
      
 1031 
     | 
    
         
            +
                client.query('SELECT 1')
         
     | 
| 
      
 1032 
     | 
    
         
            +
              end
         
     | 
| 
      
 1033 
     | 
    
         
            +
             
     | 
| 
       1029 
1034 
     | 
    
         
             
              unless RUBY_VERSION =~ /1.8/
         
     | 
| 
       1030 
1035 
     | 
    
         
             
                it "should respond to #encoding" do
         
     | 
| 
       1031 
1036 
     | 
    
         
             
                  expect(@client).to respond_to(:encoding)
         
     | 
| 
         @@ -61,6 +61,12 @@ RSpec.describe Mysql2::Statement do 
     | 
|
| 
       61 
61 
     | 
    
         
             
                expect(rows).to eq([{ "1" => 1 }])
         
     | 
| 
       62 
62 
     | 
    
         
             
              end
         
     | 
| 
       63 
63 
     | 
    
         | 
| 
      
 64 
     | 
    
         
            +
              it "should handle booleans" do
         
     | 
| 
      
 65 
     | 
    
         
            +
                stmt = @client.prepare('SELECT ? AS `true`, ? AS `false`')
         
     | 
| 
      
 66 
     | 
    
         
            +
                result = stmt.execute(true, false)
         
     | 
| 
      
 67 
     | 
    
         
            +
                expect(result.to_a).to eq(['true' => 1, 'false' => 0])
         
     | 
| 
      
 68 
     | 
    
         
            +
              end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
       64 
70 
     | 
    
         
             
              it "should handle bignum but in int64_t" do
         
     | 
| 
       65 
71 
     | 
    
         
             
                stmt = @client.prepare('SELECT ? AS max, ? AS min')
         
     | 
| 
       66 
72 
     | 
    
         
             
                int64_max = (1 << 63) - 1
         
     | 
    
        data/vendor/libmysql.dll
    CHANGED
    
    | 
         Binary file 
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: mysql2
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.9
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x64-mingw32
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Brian Lopez
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2017- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2017-08-11 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       14 
14 
     | 
    
         
             
            description: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -89,11 +89,11 @@ post_install_message: |2+ 
     | 
|
| 
       89 
89 
     | 
    
         
             
              ======================================================================================================
         
     | 
| 
       90 
90 
     | 
    
         | 
| 
       91 
91 
     | 
    
         
             
                You've installed the binary version of mysql2.
         
     | 
| 
       92 
     | 
    
         
            -
                It was built using MySQL Connector/C version 6.1. 
     | 
| 
      
 92 
     | 
    
         
            +
                It was built using MySQL Connector/C version 6.1.11.
         
     | 
| 
       93 
93 
     | 
    
         
             
                It's recommended to use the exact same version to avoid potential issues.
         
     | 
| 
       94 
94 
     | 
    
         | 
| 
       95 
95 
     | 
    
         
             
                At the time of building this gem, the necessary DLL files were retrieved from:
         
     | 
| 
       96 
     | 
    
         
            -
                http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1. 
     | 
| 
      
 96 
     | 
    
         
            +
                http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.11-win32.zip
         
     | 
| 
       97 
97 
     | 
    
         | 
| 
       98 
98 
     | 
    
         
             
                This gem *includes* vendor/libmysql.dll with redistribution notice in vendor/README.
         
     | 
| 
       99 
99 
     | 
    
         |