duel-mysql 0.1.3 → 0.1.5

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: 76e7f8cfd4e2c994f10658be3aa123308d51ec2c996495fbfebbb8775fc2b1fb
4
- data.tar.gz: f0a8b19d187e1b3215cbd571a48a2449b106431e1c6722e2bd4ebc81b81331b5
3
+ metadata.gz: e042200fe077c7a73427ac2eba7659440c90841bf9e3a45abf2302c83e09a30b
4
+ data.tar.gz: 6406d8011fd11a519e012e35c65db3b8abec0e85b1b4a51c95c7138a9e4ca050
5
5
  SHA512:
6
- metadata.gz: da5141e0f714ec99aaa62b095527e49834247a3ba814ecb13b30aae77c1a87bf7b62d9db2764c48599d664e7faaea5a5e47c29e6005e8830b3c75aef1b5f3cd7
7
- data.tar.gz: 1726b76195daac9dce317d14f2ae6ef6d514cfc1c3926be1f1654b245aabcb7fa8923f0f83497eabc12f2ba22c6e77008b589d48df4fbcf19640fd9fac15f63b
6
+ metadata.gz: 156b770677f2e4548559c7eab4a478d6b90211ad5c58f2c3b1c5b7351077ee52588484808fc7cee8faf972fd9b216beea0c64c18d9e69c9df2d9c066fee31aa3
7
+ data.tar.gz: 7540d0f57167af8b4e798e23fbd1f7398b7fba8dab45edfe54cfbce6e900c03db0539be4b14de3e6dd6612b19a6a9f424afa1ed6301711d4c6fe020f7b754763
data/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.5] - 2026-11-08
11
+
12
+ No changes of its own: released in step with the other Duel gems.
13
+
14
+ ## [0.1.4] - 2026-11-06
15
+
16
+ ### Fixed
17
+
18
+ - In trilogy's own repository, every worker would measure the bundle's
19
+ release of trilogy, not its version's own, as the plugin required
20
+ trilogy as it loaded, in `.duel.rb`, before the worker loaded the
21
+ version. It now requires trilogy as it first connects: in the
22
+ runner, to the server it started, and in a worker, once the version
23
+ has loaded.
24
+
10
25
  ## [0.1.3] - 2026-11-04
11
26
 
12
27
  No changes of its own: released in step with the other Duel gems.
@@ -78,7 +93,9 @@ or later (not MariaDB).
78
93
  CI.
79
94
  - RBS signatures in sig/, checked with Steep.
80
95
 
81
- [Unreleased]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.3...HEAD
96
+ [Unreleased]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.5...HEAD
97
+ [0.1.5]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.4...duel-mysql-v0.1.5
98
+ [0.1.4]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.3...duel-mysql-v0.1.4
82
99
  [0.1.3]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.2...duel-mysql-v0.1.3
83
100
  [0.1.2]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.1...duel-mysql-v0.1.2
84
101
  [0.1.1]: https://github.com/sferik/duel-ruby/compare/duel-mysql-v0.1.0...duel-mysql-v0.1.1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Duel
4
4
  module MySQL
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.5"
6
6
  end
7
7
  end
data/lib/duel/mysql.rb CHANGED
@@ -3,7 +3,6 @@
3
3
  require "duel"
4
4
  require "digest"
5
5
  require "fileutils"
6
- require "trilogy"
7
6
  require_relative "mysql/version"
8
7
 
9
8
  module Duel
@@ -82,6 +81,17 @@ module Duel
82
81
  connection
83
82
  end
84
83
 
84
+ # Loads Trilogy, as the first connection is made: not as the plugin
85
+ # loads, in .duel.rb, before a worker loads its version. In trilogy's
86
+ # own repository, trilogy is what's measured, and the worker would load
87
+ # whichever trilogy the load path led to first (the bundle's release,
88
+ # say), and keep it. (In the runner, which loads no version, the
89
+ # bundle's.)
90
+ # mutant:disable -- the tests' process has Trilogy loaded from the start,
91
+ # so a require changes nothing there: test_loads_trilogy_only_when_used
92
+ # checks it, in a process of its own
93
+ def self.require_trilogy = require("trilogy")
94
+
85
95
  # Runs SQL on a connection of its own to the server on +socket+;
86
96
  # returns the last statement's result.
87
97
  def self.run(socket, sql)
@@ -386,6 +396,7 @@ module Duel
386
396
  end
387
397
 
388
398
  def initialize(socket)
399
+ MySQL.require_trilogy
389
400
  # (As root: trilogy's user, unless it's given another.)
390
401
  @client = Trilogy.new(socket: socket, database: DATABASE, multi_statement: true)
391
402
  end
data/sig/duel/mysql.rbs CHANGED
@@ -51,6 +51,9 @@ module Duel
51
51
 
52
52
  # Runs SQL on a connection of its own to the server on +socket+;
53
53
  # returns the last statement's result.
54
+ # Loads Trilogy, as the first connection is made.
55
+ def self.require_trilogy: () -> bool
56
+
54
57
  def self.run: (String socket, String sql) -> ::Trilogy::Result
55
58
 
56
59
  # What the worker's server has done so far, but for the plugin's own
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duel-mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Berlin
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubygems_version: 4.0.23
77
+ rubygems_version: 4.0.24
78
78
  specification_version: 4
79
79
  summary: A MySQL server for each Duel worker, and what it did for each benchmark
80
80
  test_files: []