Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on:
pull_request:
branches:
- '*'
push:
branches:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
4 changes: 3 additions & 1 deletion scripts/after-crash-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function log() {
sed -i -e 's/safe_to_bootstrap: 0/safe_to_bootstrap: 1/g' /var/lib/mysql/grastate.dat

# bootstrap new cluster
if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
docker-entrypoint.sh mariadbd --wsrep-new-cluster $@
else
docker-entrypoint.sh mysqld --wsrep-new-cluster $@
Expand Down
4 changes: 3 additions & 1 deletion scripts/bootstrap-new-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function log() {
echo "$(timestamp) [$script_name] [$type] $msg"
}

if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
docker-entrypoint.sh mariadbd --wsrep-new-cluster $@
else
docker-entrypoint.sh mysqld --wsrep-new-cluster $@
Expand Down
4 changes: 3 additions & 1 deletion scripts/join-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ function log() {

export DATABASE_ALREADY_EXISTS=true

if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
docker-entrypoint.sh mariadbd $@
else
docker-entrypoint.sh mysqld $@
Expand Down
4 changes: 3 additions & 1 deletion scripts/on-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ if [[ $DISTRIBUTED == "true" ]]; then
fi

# write on galera configuration file
if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
cat >>/etc/mysql/conf.d/galera.cnf <<EOL
[mariadbd]
binlog_format=ROW
Expand Down
4 changes: 3 additions & 1 deletion scripts/recover-seq-no.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function log() {
echo "$(timestamp) [$script_name] [$type] $msg"
}

if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
export line=$(docker-entrypoint.sh mariadbd --wsrep-recover 2>&1 | grep "Recovered position:" | xargs echo) && echo -n ${line##*:} >/scripts/seqno
else
export line=$(docker-entrypoint.sh mysqld --wsrep-recover 2>&1 | grep "Recovered position:" | xargs echo) && echo -n ${line##*:} >/scripts/seqno
Expand Down
4 changes: 3 additions & 1 deletion scripts/std-replication-on-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ echo "Hostname: ${HOSTNAME}"
echo "Base Name: ${BASE_NAME}"

# write configuration file
if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
cat >>/etc/mysql/conf.d/my.cnf <<EOL
[mariadbd]
log-bin
Expand Down
4 changes: 3 additions & 1 deletion scripts/std-replication-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ export pid
function start_mysqld_in_background() {
log "INFO" "Starting MySQL server with docker-entrypoint.sh mysqld $args..."
process=""
if [[ $MARIADB_VERSION == "1:11"* ]]; then
major=$(echo "$MARIADB_VERSION" | sed -E 's/^1:([0-9]+).*/\1/' | grep -E '^[0-9]+$' || echo "0")

if [[ "$major" -ge 11 ]]; then
docker-entrypoint.sh mariadbd $args &
process="mariadbd"
else
Expand Down