trilogy 2.12.4 → 2.12.6
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/ext/trilogy-ruby/cext.c +17 -1
- data/ext/trilogy-ruby/inc/trilogy/socket.h +2 -0
- data/lib/trilogy/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7bf5494671a9331547a73c7513cfe587b1a9300fe4bb96f70fd0957484c1ef4
|
|
4
|
+
data.tar.gz: e5f8c4c57b5c6cddfe3e574e3727d662b056211885456520854b69a6213708b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ff46c61895e2a829c52faeb8d01d40c19f87106e121d3f92c344e8c66249ecc27de44fb43ab689dfc84f0d86e4508701c2b753be765852aebad8566a5d9daaf
|
|
7
|
+
data.tar.gz: 573a75c06969df47df0a0c73b8888919aebbdec81004644bd47ad5cfab579f9a967fecfbce782188aeb81e2fc7ad63167b1f0f150eb0e8dfc252f3039f99631c
|
data/ext/trilogy-ruby/cext.c
CHANGED
|
@@ -431,6 +431,8 @@ static int _cb_ruby_wait(trilogy_sock_t *sock, trilogy_wait_t wait)
|
|
|
431
431
|
int state = 0;
|
|
432
432
|
rb_protect(rb_trilogy_wait_protected, (VALUE)&args, &state);
|
|
433
433
|
if (state) {
|
|
434
|
+
struct trilogy_ctx *ctx = sock->opts.privdata;
|
|
435
|
+
rb_trilogy_release_buffer(ctx);
|
|
434
436
|
trilogy_sock_shutdown(sock);
|
|
435
437
|
rb_jump_tag(state);
|
|
436
438
|
}
|
|
@@ -467,6 +469,17 @@ escape the GVL on each wait operation without going through call_without_gvl */
|
|
|
467
469
|
return TRILOGY_ERR;
|
|
468
470
|
}
|
|
469
471
|
|
|
472
|
+
int flags = fcntl(fd, F_GETFD); /* should not fail except EBADF. */
|
|
473
|
+
if (flags == -1) {
|
|
474
|
+
close(newfd);
|
|
475
|
+
return TRILOGY_ERR;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (fcntl(newfd, F_SETFD, flags) != 0){
|
|
479
|
+
close(newfd);
|
|
480
|
+
return TRILOGY_ERR;
|
|
481
|
+
}
|
|
482
|
+
|
|
470
483
|
rc = trilogy_connect_set_fd(&ctx->conn, sock, newfd);
|
|
471
484
|
if (rc < 0) {
|
|
472
485
|
trilogy_sock_close(sock);
|
|
@@ -597,7 +610,9 @@ static int rb_io_descriptor(VALUE io)
|
|
|
597
610
|
static VALUE rb_trilogy_connect(VALUE self, VALUE raw_socket, VALUE encoding, VALUE charset, VALUE opts)
|
|
598
611
|
{
|
|
599
612
|
struct trilogy_ctx *ctx = get_ctx(self);
|
|
600
|
-
trilogy_sockopt_t connopt = {
|
|
613
|
+
trilogy_sockopt_t connopt = {
|
|
614
|
+
.privdata = ctx,
|
|
615
|
+
};
|
|
601
616
|
trilogy_handshake_t handshake;
|
|
602
617
|
VALUE val;
|
|
603
618
|
|
|
@@ -1054,6 +1069,7 @@ static VALUE execute_read_query_response(struct trilogy_ctx *ctx)
|
|
|
1054
1069
|
|
|
1055
1070
|
// If we have seen an unexpected exception, jump to it so it gets raised.
|
|
1056
1071
|
if (state) {
|
|
1072
|
+
rb_trilogy_release_buffer(ctx);
|
|
1057
1073
|
trilogy_sock_shutdown(ctx->conn.socket);
|
|
1058
1074
|
rb_jump_tag(state);
|
|
1059
1075
|
}
|
data/lib/trilogy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trilogy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.12.
|
|
4
|
+
version: 2.12.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitHub Engineering
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bigdecimal
|
|
@@ -24,7 +23,6 @@ dependencies:
|
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '0'
|
|
27
|
-
description:
|
|
28
26
|
email: opensource+trilogy@github.com
|
|
29
27
|
executables: []
|
|
30
28
|
extensions:
|
|
@@ -75,7 +73,6 @@ homepage: https://github.com/trilogy-libraries/trilogy
|
|
|
75
73
|
licenses:
|
|
76
74
|
- MIT
|
|
77
75
|
metadata: {}
|
|
78
|
-
post_install_message:
|
|
79
76
|
rdoc_options: []
|
|
80
77
|
require_paths:
|
|
81
78
|
- lib
|
|
@@ -90,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
90
87
|
- !ruby/object:Gem::Version
|
|
91
88
|
version: '0'
|
|
92
89
|
requirements: []
|
|
93
|
-
rubygems_version:
|
|
94
|
-
signing_key:
|
|
90
|
+
rubygems_version: 4.0.12
|
|
95
91
|
specification_version: 4
|
|
96
92
|
summary: A friendly MySQL-compatible library for Ruby, binding to libtrilogy
|
|
97
93
|
test_files: []
|