trilogy 2.12.5 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb255b4a759f25f1ddbf289fb3d17e163cd4efa1dcdf0537d3c9bafeac7183ab
4
- data.tar.gz: 8d89ef7ec7d5a11cc480a3f6fc0c7ba96c4baa761dccb0b773b88cc382897ea8
3
+ metadata.gz: d7bf5494671a9331547a73c7513cfe587b1a9300fe4bb96f70fd0957484c1ef4
4
+ data.tar.gz: e5f8c4c57b5c6cddfe3e574e3727d662b056211885456520854b69a6213708b6
5
5
  SHA512:
6
- metadata.gz: 14bd176ad7f6289bb38b42036344b94800831699b82807464f6ee124e7d31c9a17fa474cabf342ae0c8b549f664062aa0dd52b14e75b06c65c1ff717520e9fda
7
- data.tar.gz: 7928348c8d89a3e0a5ad5dec06503a9ba3111f0e4f33e4d1448a85407c614c98adbd3adbe4e2e6c763654747a1a484c7437c3cea6c853b448eb105335c8dfb78
6
+ metadata.gz: 9ff46c61895e2a829c52faeb8d01d40c19f87106e121d3f92c344e8c66249ecc27de44fb43ab689dfc84f0d86e4508701c2b753be765852aebad8566a5d9daaf
7
+ data.tar.gz: 573a75c06969df47df0a0c73b8888919aebbdec81004644bd47ad5cfab579f9a967fecfbce782188aeb81e2fc7ad63167b1f0f150eb0e8dfc252f3039f99631c
@@ -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
  }
@@ -608,7 +610,9 @@ static int rb_io_descriptor(VALUE io)
608
610
  static VALUE rb_trilogy_connect(VALUE self, VALUE raw_socket, VALUE encoding, VALUE charset, VALUE opts)
609
611
  {
610
612
  struct trilogy_ctx *ctx = get_ctx(self);
611
- trilogy_sockopt_t connopt = {0};
613
+ trilogy_sockopt_t connopt = {
614
+ .privdata = ctx,
615
+ };
612
616
  trilogy_handshake_t handshake;
613
617
  VALUE val;
614
618
 
@@ -1065,6 +1069,7 @@ static VALUE execute_read_query_response(struct trilogy_ctx *ctx)
1065
1069
 
1066
1070
  // If we have seen an unexpected exception, jump to it so it gets raised.
1067
1071
  if (state) {
1072
+ rb_trilogy_release_buffer(ctx);
1068
1073
  trilogy_sock_shutdown(ctx->conn.socket);
1069
1074
  rb_jump_tag(state);
1070
1075
  }
@@ -72,6 +72,8 @@ typedef struct {
72
72
  TRILOGY_CAPABILITIES_t flags;
73
73
 
74
74
  size_t max_allowed_packet;
75
+
76
+ void *privdata;
75
77
  } trilogy_sockopt_t;
76
78
 
77
79
  typedef struct trilogy_sock_t {
@@ -1,3 +1,3 @@
1
1
  class Trilogy
2
- VERSION = "2.12.5"
2
+ VERSION = "2.12.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trilogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.5
4
+ version: 2.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Engineering
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 4.0.11
90
+ rubygems_version: 4.0.12
91
91
  specification_version: 4
92
92
  summary: A friendly MySQL-compatible library for Ruby, binding to libtrilogy
93
93
  test_files: []