Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
compile, test, repeat

Daniel Black grooverdan

💭
compile, test, repeat
View GitHub Profile
@grooverdan
grooverdan / gist:ad68b0161aa2ba9860b769a5304e83ab
Created Jan 13, 2022
MariaDB Database per user, on demand (aka systemd multi-instance socket activated) (LCA2022 Miniconf talk)
View gist:ad68b0161aa2ba9860b769a5304e83ab
MariaDB Database per user, on demand (aka systemd multi-instance socket activated)
This is to provide attendee's the notes needed related to the talk without
needing to transcribe from script or video:
Attendee notes:
My.cnf template to be copied into user home directories:
View gdb_output.log
Thread 34 (Thread 0x7f4089ffb640 (LWP 896292)):
#0 0x00007f40dd56c7b0 in __lll_lock_wait () from /lib64/libpthread.so.0
No symbol table info available.
#1 0x00007f40dd5656b2 in pthread_mutex_lock () from /lib64/libpthread.so.0
No symbol table info available.
#2 0x0000000000dc1f5e in psi_mutex_lock (that=0x15ca200 <buf_pool>, file=<optimized out>, line=<optimized out>) at /home/dan/repos/mariadb-server-10.8/mysys/my_thr_init.c:489
state = {m_flags = 100, m_operation = PSI_MUTEX_LOCK, m_mutex = 0x3e, m_thread = 0xffffffffffffffff, m_timer_start = 32, m_timer = 0x7f4089ff9a50, m_wait = 0x0}
locker = 0x0
result = <optimized out>
@grooverdan
grooverdan / timezones.sql
Created Nov 24, 2021
timezones for MariaDB-10.6
View timezones.sql
This file has been truncated, but you can view the full file.
\d |
IF (select count(*) from information_schema.global_variables where
variable_name='wsrep_on' and variable_value='ON') = 1 THEN
ALTER TABLE time_zone ENGINE=InnoDB;
ALTER TABLE time_zone_name ENGINE=InnoDB;
ALTER TABLE time_zone_transition ENGINE=InnoDB;
ALTER TABLE time_zone_transition_type ENGINE=InnoDB;
END IF|
\d ;
View gist:430a42f5674b0a0dece3756048a10c53
$ podman run -d --rm -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.5.10
Resolved "mariadb" as an alias (/home/dan/.cache/containers/short-name-aliases.conf)
Trying to pull docker.io/library/mariadb:10.5.10...
Getting image source signatures
Copying blob e989e430508e skipped: already exists
Copying blob 26ea6552a462 skipped: already exists
Copying blob c549ccf8d472 skipped: already exists
Copying blob 9f8d09317d80 skipped: already exists
Copying blob 2bc055a5511d skipped: already exists
Copying blob 329b1f41043f skipped: already exists
@grooverdan
grooverdan / mariadb-10.5-patch-aws-plugin
Created Aug 16, 2020
Patch to get AWS plugin compiled
View mariadb-10.5-patch-aws-plugin
diff --git a/extra/aws_sdk/CMakeLists.txt b/extra/aws_sdk/CMakeLists.txt
index 85a196dccce..7c4b8d8195c 100644
--- a/extra/aws_sdk/CMakeLists.txt
+++ b/extra/aws_sdk/CMakeLists.txt
@@ -34,7 +34,7 @@ ENDFOREACH()
IF(CMAKE_VERSION LESS "3.0")
SET(GIT_TAG "1.0.8")
ELSE()
- SET(GIT_TAG "1.2.11")
+ SET(GIT_TAG "1.8.29")
View pod-mariadb-init.sh
#!/bin/bash
set -x -v
for v in 10.1 10.2 10.3 10.4 10.5
do
#podman pull mariadb:$v
podman rm maria$v
#podman run -d --rm -e MYSQL_ROOT_PASSWORD=pass \
podman run -d --rm -e MYSQL_INITDB_SKIP_TZINFO=1 -e MYSQL_ROOT_PASSWORD=pass \
--expose 3306 \
--volume /home/dan/datadir/docker_library$v:/var/lib/mysql:Z \
@grooverdan
grooverdan / user_settings.h
Created Apr 15, 2020
wolf user_settings.h
View user_settings.h
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H
#define HAVE_CRL
#define WOLFSSL_MYSQL_COMPATIBLE
#define HAVE_ECC
#define ECC_TIMING_RESISTANT
#define HAVE_HASHDRBG
#define WOLFSSL_AES_DIRECT
#define WOLFSSL_SHA384
View gdb.txt
Thread 1 "mysqld" hit Breakpoint 1, new_VioSSLFd (key_file=0x7fffffffe098 "/home/dan/repos/mariadb-server-10.4/mysql-test/std_data/server8k-key.pem",
cert_file=0x7fffffffe0f2 "/home/dan/repos/mariadb-server-10.4/mysql-test/std_data/server8k-cert.pem",
ca_file=0x55555747631f "/home/dan/repos/mariadb-server-10.4/mysql-test/std_data/cacert.pem", ca_path=0x0, cipher=0x0, is_client_method=0 '\000',
error=0x7fffffffd690, crl_file=0x0, crl_path=0x0, tls_version=14) at /home/dan/repos/mariadb-server-10.4/vio/viosslfactories.c:253
253 check_ssl_init();
[New Thread 0x7ffff17a1700 (LWP 26760)]
[New Thread 0x7ffff1756700 (LWP 26761)]
[New Thread 0x7ffff170b700 (LWP 26764)]
[New Thread 0x7ffff16c0700 (LWP 26767)]
@grooverdan
grooverdan / gist:136f7cec0cedf67d13608c797d9eccca
Created Jul 12, 2019
build caddy multiarch docker manifest
View gist:136f7cec0cedf67d13608c797d9eccca
#!/bin/sh
set -v -x
version=v1.0.1
imagebase=caddyserver/caddy:${version}
images=""
# docker manifest is old, consistent but still experimental (for no great reason)
# mkdir -p ~/.docker
@grooverdan
grooverdan / travis.yml
Created Jun 8, 2018
kernel build matrix travis
View travis.yml
dist: trusty
sudo: false
language: c
service:
- docker
env:
matrix:
- BASE=ubuntu:14.04
- BASE=ubuntu:16.04
- BASE=ubuntu:18.04