A modern, simple and very fast Mysql library for Ruby - binding to libmysql
This report summarizes scanner evidence for brianmario/mysql2, a Ruby project with 2,275 GitHub stars. SynthScan examined 18,893 lines of code across 68 source files, recording 26 pattern matches distributed across 2 syntactic categories. The legacy adjusted pattern signal is 1.4 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 26 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 2 finding(s).
Which changes need focused human review? 26 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 26 distinct pattern matches across 2 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .rubocop_todo.yml | 1 | # This configuration was generated by | COMMENT |
| LOW | ext/mysql2/mysql2_ext.h | 1 | #ifndef MYSQL2_EXT | COMMENT |
| LOW | ext/mysql2/mysql2_ext.h | 21 | #include <ruby/thread.h> | COMMENT |
| LOW | ext/mysql2/mysql2_ext.h | 41 | #define rb_mysql2_gc_location(ptr) ptr = rb_gc_location(ptr) | COMMENT |
| LOW | ext/mysql2/client.c | 1 | #include <mysql2_ext.h> | COMMENT |
| LOW | ext/mysql2/client.c | 3041 | #ifdef HAVE_CONST_MYSQL_OPT_SSL_ENFORCE // MySQL 5.7.3 - 5.7.10 & MariaDB 10.x and later | COMMENT |
| LOW | ext/mysql2/extconf.rb | 221 | SRC | COMMENT |
| LOW | ext/mysql2/extconf.rb | 341 | COMMENT | |
| LOW | ext/mysql2/statement.c | 681 | FREE_BINDS; | COMMENT |
| LOW | ext/mysql2/result.c | 41 | * which indicates binary rather than nonbinary data. This enables you to distinguish BINARY | COMMENT |
| LOW | spec/mysql2/client_spec.rb | 181 | COMMENT | |
| LOW | spec/mysql2/result_spec.rb | 401 | expect(result.fields).to eql(["only_col"]) | COMMENT |
| LOW | spec/mysql2/result_spec.rb | 1761 | COMMENT | |
| LOW | spec/mysql2/result_spec.rb | 2401 | # connection status at call time would leak the second statement's | COMMENT |
| LOW | spec/mysql2/result_spec.rb | 2421 | # while the same connection is mid protocol exchange for a completely | COMMENT |
| LOW | .github/workflows/build-windows-cross.yml | 21 | # so it re-downloaded on every run with no way to cache across them. | COMMENT |
| LOW | .github/workflows/build-windows.yml | 21 | env: | COMMENT |
| LOW | .github/workflows/build-windows.yml | 41 | # | COMMENT |
| LOW | .github/workflows/build-windows.yml | 61 | # dependency built by plain `bundle install` rather than rake-compiler) | COMMENT |
| LOW | lib/mysql2.rb | 61 | COMMENT | |
| LOW | lib/mysql2/client.rb | 21 | COMMENT | |
| LOW | lib/mysql2/client.rb | 141 | elsif f && f =~ /^\w+$/ && Mysql2::Client.const_defined?(f) | COMMENT |
| LOW | lib/mysql2/error.rb | 61 | def self.new_with_args(msg, server_version, error_number, sql_state) | COMMENT |
| LOW | lib/mysql2/error.rb | 81 | # be in any encoding MySQL supports and is insert into the latin1, euckr or | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spec/mysql2/result_spec.rb | 1554 | def expect_charset_matrix_row(row) | CODE |
| LOW | lib/mysql2/client.rb | 162 | def configure_tls_verification(opts, mode) | CODE |