exwiw 1.1.2 → 1.1.3
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/CHANGELOG.md +6 -0
- data/lib/exwiw/adapter/mysql_client.rb +3 -1
- data/lib/exwiw/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0feed4cda7c72c24738b7ccc03fa5cadc5321b636e48a86e07d8a169c5b7d941
|
|
4
|
+
data.tar.gz: 50241d3f38a64485adcfbc8740e5558e8049c136762068f56e9b505a93251d19
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fad77e8f61f216afc2c9af89f54784e90fc50bfa691b29bd198727be29a6114d208d867e261c89e6b14d3ad27d385c6e981bd133df4803d2cab4c201eb9e090
|
|
7
|
+
data.tar.gz: a874e74e0c5c6fe674511de041baf80b80c7dc6495b7c96a950d5200f393a9e6e6dfa004f0d341245fdf576e4f42c0425079225895e9143f8001612a6d403383
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.1.3] - 2026-09-08
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **MySQL (mysql2): `query` no longer reads the field list after draining the result.** mysql2 frees the underlying `MYSQL_RES` as soon as the last row has been fetched, and `Result#fields` dereferences it afterwards, so a buffered query followed by `fields` was a use-after-free. It went unnoticed on the export path, which issues only a handful of such queries, but `exwiw schema check --from-db` / `schema generate --from-db` issue several per table and crashed with a segmentation fault on Ruby 4.0 with MariaDB Connector/C 3.4. The field list is now captured before the rows are read.
|
|
10
|
+
|
|
5
11
|
## [1.1.2] - 2026-09-07
|
|
6
12
|
|
|
7
13
|
### Added
|
|
@@ -110,8 +110,10 @@ module Exwiw
|
|
|
110
110
|
# mysql2 returns nil for a statement with no result set (SET, DDL, ...).
|
|
111
111
|
return Result.new([], []) if res.nil?
|
|
112
112
|
|
|
113
|
+
# mysql2 frees the MYSQL_RES once every row is fetched; #fields after that is a use-after-free.
|
|
114
|
+
fields = res.fields
|
|
113
115
|
rows = res.to_a.map { |row| row.map { |value| self.class.stringify_value(value) } }
|
|
114
|
-
Result.new(
|
|
116
|
+
Result.new(fields, rows)
|
|
115
117
|
when :trilogy
|
|
116
118
|
res = raw.query(sql)
|
|
117
119
|
rows = res.rows.map { |row| row.map { |value| self.class.stringify_value(value) } }
|
data/lib/exwiw/version.rb
CHANGED