Repository navigation
Conversation
Reduce `SELECT ? AS x` returning "" on MySQL 8.4 with libmysqlclient to a plain-C program against libmariadb and libmysqlclient, with candidate fixes as variants, and a push-triggered workflow that runs it on MariaDB and MySQL servers. The workflow is an experiment harness to drop before any fix merges. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Report the post-execute type of a fresh statement next to a reused one, add type-changing parameter sequences and an extreme DOUBLE, and point the libmariadb build at the client headers rather than the server ones. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
A reused statement on MySQL keeps a DOUBLE result type and returns 0 for a later string parameter, so try preparing the statement again when a parameter changes its type. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Add the experiment's README with the method, the findings as quoted excerpts, and how to replicate, the output of each server and client combination, and the registry of experiments. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
The MariaDB and MySQL runners unpack different Connector/C versions, from the MariaDB repository and from Ubuntu respectively. Refresh the package lists before `apt-get download`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Keep a copy of the workflow beside the experiment and point Method and Replicate at it, since the workflow under .github/workflows/ is dropped before any fix merges. Qualify the post-execute types MariaDB reports for IF(?, ?, ?), and correct the runner image. Bound shown()'s buffer, check result metadata and store_result for failure, and skip a memcpy from a NULL buffer in repro.c. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Accepted limitationsThree review rounds. The first found two Mediums: the record had no replication path once the branch workflow is dropped, and a workflow comment misstated the Connector/C versions. It also found some Lows in
Generated by Claude Code |
|
Handover: the fix built from this record is draft #656. This experiment PR is complete and has no open items besides your review. This session is being archived, so nobody is watching this PR any more. Generated by Claude Code |
An experiment record for #638, as asked on #641. It reduces the problem to plain C against libmariadb and libmysqlclient, with MariaDB 11.8 and MySQL 8.4 servers, and tries fixes in plain C first. There are no package code changes. The record is
experiments/2026-11-29-mysql-placeholder-values/README.md, with the C program, the recorded output of each server × client combination, and a copy of the workflow for replication..github/workflows/experiment-638.yamlruns only on pushes to this branch and is a harness to drop before any fix merges.Findings (from run 46290841620, reproduced unchanged in run 46291919028):
buffer_length0, 1.5 reports length 0 and comes back as""; 0.1 reports length 1 and comes back as"0". This happens on all four server × client combinations, whenever the column arrives as DOUBLE. Integers, dates, strings and blobs report their full length and come back right.?as VAR_STRING at prepare time and the real type (DOUBLE, LONGLONG) only after execution, so RMariaDB binds a string buffer for a DOUBLE value. MariaDB reports NULL at prepare time and the parameter's own type after each execution. A blob parameter comes back from MySQL as a non-binary string.'abc'comes back as0with every fetch strategy. A NULL first set reports the prepare-time type.STMT_ATTR_UPDATE_MAX_LENGTHwithmysql_stmt_store_result(), and an empty buffer with a refetch of at least 64 bytes are all correct on both MariaDB combinations. On MySQL they are correct except for the sticky type (1.5 followed by'abc'). Only rebinding with the post-execute type plus re-preparing when a parameter changes type is correct on all four combinations in every case.experiments/is added to.Rbuildignore. The libmariadb on the MySQL runner comes from Ubuntu viaapt-get download, becauselibmariadb-devconflicts withmysql-serverthere.Accepted limitations
https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Generated by Claude Code