Add CI/Pipeline Automation for MySQL (issue #872)#876
Add CI/Pipeline Automation for MySQL (issue #872)#876sm-shaw merged 3 commits intoTPC-Council:masterfrom
Conversation
sm-shaw
left a comment
There was a problem hiding this comment.
Issues are similar to #875
In genci cifix wont run as there is no rule for my.cnf or myio.cnf. This is update for PostgreSQL but not for MySQL.
PostgreSQL
set name [file tail $f]
if {$name ni {"maria.cnf" "mariaio.cnf"}} {
if {$name ni {"maria.cnf" "mariaio.cnf" "postgresql.conf" "postgresqlio.conf"}} {
putsci "CI FIX ERROR: no download rule for missing file $f"
return 1
}
---
MySQL
set name [file tail $f]
if {$name ni {"maria.cnf" "mariaio.cnf"}} {
putsci "CI FIX ERROR: no download rule for missing file $f"
return 1
}
When you run through the web interface there is the same error as PostgreSQL

in the pipelines module there is a similar error to PostgreSQL
613c613
< if {$dbprefix ne "maria"} {
---
> if {$dbprefix ne "maria" && $dbprefix ne "my"} {
874c874
< if {$dbprefix ne "maria"} {
---
> if {$dbprefix ne "maria" && $dbprefix ne "my" } {
Note that when enabled. We need to support maria my and pg as prefixes.
For consistency it will be best if we add all of the supported databases in the initial dropdown in the same order as the GUI)
and report the same message for Oracle, SQL Server and Db2 for the time being. There will be plans to support these but only for already running instances as we will not be able to build them.
This could be added to either PR but we want to make sure that for both it is not blocked as it currently is.
…, fix cifix allowlist
* genci.tcl cifix: extend missing-file allowlist to include my.cnf, myio.cnf,
postgresql.conf and postgresqlio.conf so MySQL (and PostgreSQL) configs are
fetched from hammerdb.com/ci-config rather than failing.
* pipelines-1.0.tm: invert the dbprefix gate (run-action and UI banner) from
'must be maria' to 'block ora/mssqls/db2'. MariaDB, MySQL and PostgreSQL all
flow through the run form; Oracle, SQL Server and Db2 show a friendly
'pipelines are not yet enabled' banner explaining that support for already-
running instances is planned for a future release.
* pipelines-1.0.tm: extend the database dropdown to list all six supported
databases in GUI order (Oracle, SQL Server, Db2, MySQL, PostgreSQL, MariaDB).
* pipelines-1.0.tm: add Oracle/SQL Server/Db2 cases to __db_label so the banner
titles read 'Oracle pipelines are not yet enabled' instead of 'ora ...'.
* pipelines-1.0.tm: generalise the Windows-host banner ('CI pipelines are not
available on Windows in this release') so it covers all DBs.
|
Thanks @sm-shaw — addressed in Changes
- if {$name ni {"maria.cnf" "mariaio.cnf"}} {
+ if {$name ni {"maria.cnf" "mariaio.cnf" "my.cnf" "myio.cnf" "postgresql.conf" "postgresqlio.conf"}} {Included the PostgreSQL entries here too so this benefits #875 even before that PR merges, as you suggested.
-if {$dbprefix ne "maria"} {
+if {$dbprefix in {ora mssqls db2}} {The friendly banner text was updated to:
The Windows-only banner was also generalised from "MariaDB CI pipelines are not available on Windows" to "CI pipelines are not available on Windows in this release".
- foreach {pfx label} [ list maria MariaDB mysql MySQL pg PostgreSQL ] {
+ foreach {pfx label} [ list ora Oracle mssqls "SQL Server" db2 Db2 mysql MySQL pg PostgreSQL maria MariaDB ] {
Verification
Net effect: MariaDB / MySQL / PostgreSQL pipelines all run through the Web Service page; Oracle / SQL Server / Db2 show the friendly "support planned for already-running instances" banner. The same fixes naturally unblock the PG flow once #875 lands as well. |
|
Many thanks for the update will retest. |
|
One additional issue with the MySQL implementation. The parameter
This will prevent running against MySQL 5.7 but that is EOL. |
…down trim * src/mysql/mysqlci.tcl (mysql_init, mysql_start): replace the deprecated --innodb-log-file-size with --innodb-redo-log-capacity (supported from MySQL 8.0.30+). MySQL 5.7 is EOL so dropping that path is acceptable. * modules/pipelines-1.0.tm: trim the database dropdown back to the three databases that actually run pipelines today (MySQL, PostgreSQL, MariaDB). Listing Oracle / SQL Server / Db2 there only ever produced the "not yet enabled" banner, so per review feedback they are commented out with a TODO note for re-enablement once build/install support lands. The dbprefix gate at lines 613 and 874 is left intact so direct ?db=ora| mssqls|db2 URLs still render the friendly banner.
|
Thanks @sm-shaw — both items addressed in 1.
|
|
This is getting close. I am still testing the previous commit to get MySQL to successfully run and identifying issues. Once it has run successfully I will add a note and then after a further commit to fix there all issues should be identified and it should run successfully. So now there are 2 current issues:
This should be changed to:
Also MySQL does not support dynamic purge, so this line can be removed:
Note that in these scripts it should not copy directly the unfixed MySQL scripts as above i.e. it should set the database to MySQL and not MariaDB. The highlighted MariaDB files are in bold. These need to be added for PostgreSQL and MySQL. Maria MySQL PostgreSQL Maria MySQL PostgreSQL |
… Python siblings
scripts/tcl/mysql/tprocc/mysql_tprocc_run_profile.tcl:
- Fix `dbset db maria` -> `dbset db mysql` (was incorrectly inherited
from the MariaDB template).
- Remove `diset tpcc mysql_purge true`; the `mysql_purge` key does not
exist in the MySQL TPC-C dict (it is MariaDB-only).
Add Python siblings mirroring the MariaDB layout for CLI consistency
under the Python interpreter (these are not driven by automation but
provide parity with the Tcl scripts):
- scripts/python/mysql/tprocc/mysql_tprocc_run_profile.py
- scripts/python/mysql/tprocc/mysql_tprocc_profile_py.sh
- scripts/python/mysql/tprocc/mysql_tprocc_single_py.sh
- scripts/python/mysql/tproch/mysql_tproch_single_py.sh
The new Python run_profile sets `dbset("db", "mysql")` (not maria) and
omits the non-existent `mysql_purge` key.
|
@sm-shaw thanks for the catch and for confirming the TPROC-C single run worked locally with the patch. Pushed 1.
|
Adds the MySQL provider to the cipush pipeline alongside the existing PostgreSQL/MariaDB ports. config/ci.xml: new <mysql> block with clone URL, mysql-8.0.39 tag, build_cmd using -DFORCE_INSOURCE_BUILD=1, install layout, and the standard pipeline (clone build package commit_msg install init run_sql:shutdown start ping run_sql:change_password start_tests:oltp run_sql:shutdown). src/mysql/mysqlci.tcl: clone/build/package/install/init/start/ping/run_sql/shutdown handlers. Hoists --defaults-file to the first CLI argument (mysqld parses it as an unknown variable otherwise), uses --daemonize for start, --initialize-insecure for first-time init, and emits -u root explicitly for client calls (MySQL does not auto-map OS user to DB root the way MariaDB's unix_socket plugin does). Omits --thread-pool-size because the thread_pool plugin is Enterprise-only and Community builds abort startup with it. scripts/tcl/mysql/tprocc/: TPROC-C profile and helper scripts used by start_tests:oltp. Validated end-to-end in WSL Ubuntu 24.04 against MySQL 8.0.39 built from upstream: clone, build, package, install, init, start, ping (returns 8.0.39), change_password, and shutdown all succeed.
* src/mysql/mysqlci.tcl (mysql_init, mysql_start): replace the deprecated --innodb-log-file-size with --innodb-redo-log-capacity (supported from MySQL 8.0.30+). MySQL 5.7 is EOL so dropping that path is acceptable.
… Python siblings
scripts/tcl/mysql/tprocc/mysql_tprocc_run_profile.tcl:
- Fix `dbset db maria` -> `dbset db mysql` (was incorrectly inherited
from the MariaDB template).
- Remove `diset tpcc mysql_purge true`; the `mysql_purge` key does not
exist in the MySQL TPC-C dict (it is MariaDB-only).
Add Python siblings mirroring the MariaDB layout for CLI consistency
under the Python interpreter (these are not driven by automation but
provide parity with the Tcl scripts):
- scripts/python/mysql/tprocc/mysql_tprocc_run_profile.py
- scripts/python/mysql/tprocc/mysql_tprocc_profile_py.sh
- scripts/python/mysql/tprocc/mysql_tprocc_single_py.sh
- scripts/python/mysql/tproch/mysql_tproch_single_py.sh
The new Python run_profile sets `dbset("db", "mysql")` (not maria) and
omits the non-existent `mysql_purge` key.
1e1c0ee to
61e79fc
Compare
|
Rebased What changed
Verification
Final layered diff vs master is just the MySQL CI port ( |

Add CI/Pipeline Automation for MySQL (Issue #872)
Port of the MariaDB CI pipeline to MySQL. Follows the same shape as the
PostgreSQL port (PR #875).
What this adds
src/mysql/mysqlci.tcl— MySQL provider (clone / build / package /install / init / start / ping / run_sql / shutdown)
config/ci.xml— new<mysql>provider block:https://github.com/mysql/mysql-server.git(tagmysql-8.0.39)build_cmduses-DFORCE_INSOURCE_BUILD=1(MySQL 8.0 refuses in-sourcebuilds without this; the CI build tree is the source tree)
<pipeline>=clone build package commit_msg install init run_sql:shutdown start ping run_sql:change_password start_tests:oltp run_sql:shutdownscripts/tcl/mysql/tprocc/mysql_tprocc_run_profile.tcl— TPROC-C profilescript used by
start_tests:oltpChecklist from issue #872
ci.xmlentries for MySQL (clone URL, tag, build/install commands)cipushCLI (uses the existing
process_requestdispatcher; no changes neededto the trigger layer)
the existing
start_tests:oltpstep)jobsmodule; identical path to PG/MariaDB)E2E validation (WSL Ubuntu 24.04, 16-core, 32 GB)
Ran
cipushend-to-end against a MySQL 8.0.39 build compiled from theupstream source. Steps validated via a targeted harness that replays each
pipeline step against the preserved build tree:
mysql-8.0.39-DFORCE_INSOURCE_BUILD=1)mysql-8.0.39-linux-x86_64--initialize-insecure)--daemonize)/tmp/mysql.sockSELECT @@version)8.0.39ALTER USER … IDENTIFIED BY 'mysql'Bugs found and fixed during E2E validation
All of these surfaced only when running against an actual MySQL build; none
are reachable from static review.
-DFORCE_INSOURCE_BUILD=1is set. Added toci.xml build_cmd.libaio-dev,libncurses-dev,pkg-configas prerequisites (same set as upstreamBUILD/INSTALL).mysql-*, notMySQL-*. Fixed in 6 glob sites.bin/mysql, notbin/MySQL.unix_socketplugin (OS user ⇒ DB root). MySQL does not auto-map; theclient has to pass
-u rootexplicitly.ALTER USER … IDENTIFIED BY 'mysql', subsequent admin calls need the password. Added a|| <cmd with -pmysql>bash fallback so the same run_sql wrapper worksbefore and after
change_password.--daemonizerequired for start — without it, the Tcl pipe closetears down the mysqld parent. MariaDB uses a
bash -c '... &'fork; MySQL8.0 supports the native
--daemonizeflag.--defaults-filemust be the first CLI argument — if anything else(even
--daemonize) precedes it,mysqldparses it as an unknownvariable.
mysql_startnow hoists it to the front of the argv.--thread-pool-sizeis Enterprise-only — MySQL Community does notship the
thread_poolplugin; passing the flag causesPlugin 'thread_pool' is not loadedand an abort. Removed from theMySQL arglist (MariaDB still has it — MariaDB bundles thread_pool).
/tmp/MySQL.sock; MySQL defaultsto
/tmp/mysql.sock. Unified throughout.Build prerequisites (Linux)
Notes for reviewers
src/generic/— the port is entirely additive, asrequested in the issue.
run_sql:shutdownright afterinitexists sochange_passwordcan run against a freshly starteddaemon with a known root password.
start_tests:oltpreuses the normal TPROC-C profile code path; noMySQL-specific scheduling knobs are required.
points are introduced.