fix(rds): vendor mysql UDF plugin API in fakecloud_udf.c#813
Merged
vieiralucas merged 1 commit intomainfrom Apr 28, 2026
Merged
fix(rds): vendor mysql UDF plugin API in fakecloud_udf.c#813vieiralucas merged 1 commit intomainfrom
vieiralucas merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The upstream mysql:8.0 image strips its community release repo after install, so `mysql-community-devel` (the package shipping `mysql.h`) is no longer installable on a fresh build. Re-adding the repo would hard-code a brittle URL. The UDF plugin API surface we touch (UDF_INIT, UDF_ARGS, Item_result) is tiny and ABI-stable across MySQL 5.6 -> 8.x and MariaDB 10.x/11.x. Vendor the struct definitions inline, drop the mysql.h include, and remove libmysqlclient-dev / libmariadb-dev from both Dockerfiles. Plugin dir is probed instead of asked from mysql_config.
01a416c to
dd18ac9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UDF_INIT/UDF_ARGS/Item_resultdefinitions inline infakecloud_udf.c, dropping the#include <mysql.h>requirement.mysql-community-devel/libmysqlclient-dev/libmariadb-devfrom both Dockerfiles — onlygcc+libcurl-develremain.mysql_config.Why
PR #812 added
mysql-community-develto fixmysql.h: not found, but the upstreammysql:8.0image's Dockerfile strips its community release repo after install —microdnf install mysql-community-develreturnsNo package matches. Re-adding the repo would hard-code a brittle Oracle URL.The UDF plugin API surface we touch is tiny and ABI-stable across MySQL 5.6 -> 8.x and MariaDB 10.x/11.x. Vendoring is safer than depending on a repo definition Oracle removed.
Test plan
RDS support imagesworkflow buildsfakecloud-mysql:8.0on linux/amd64 and linux/arm64.fakecloud-mariadb10.6, 10.11, 11.4.Summary by cubic
Vendor minimal MySQL UDF structs inline in both
mysql/fakecloud_udf.candmariadb/fakecloud_udf.cto drop themysql.hdependency and fix UDF builds onmysql:8.0and MariaDB. Dockerfiles now compile the UDF with only gcc + libcurl and probe plugin directories withoutmysql_config.Bug Fixes
UDF_INIT/UDF_ARGS/Item_resultin both UDF sources and remove the include./usr/lib/mysql/plugin).mysql_configflags.Dependencies
mysql-community-devel,libmysqlclient-dev,libmariadb-dev.gcc,make, libcurl headers (libcurl-devel/libcurl4-openssl-dev), and libc headers.Written for commit dd18ac9. Summary will update on new commits. Review in cubic