Skip to content

Instantly share code, notes, and snippets.

View grooverdan's full-sized avatar
💭
compile, test, repeat

Daniel Black grooverdan

💭
compile, test, repeat
View GitHub Profile
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 / user_settings.h
Created April 15, 2020 05:45
wolf 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
@grooverdan
grooverdan / mariadb-10.5-patch-aws-plugin
Created August 16, 2020 02:07
Patch to get AWS plugin compiled
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")
$ 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 / timezones.sql
Created November 24, 2021 00:39
timezones for MariaDB-10.6
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 ;
TRUNCATE TABLE time_zone;
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 / gist:ad68b0161aa2ba9860b769a5304e83ab
Created January 13, 2022 21:43
MariaDB Database per user, on demand (aka systemd multi-instance socket activated) (LCA2022 Miniconf talk)
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:
connection node_2;
connection node_1;
CREATE TABLE `legacy_item_requests` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`request` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SELECT * FROM legacy_item_requests;
// testing https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
#include <stdexcept>
class aio_uring
{
static constexpr char volatile * v= 0;
public:
aio_uring()
This file has been truncated, but you can view the full file.
use mysql;
set @wsrep_is_on=(select sum(VARIABLE_NAME='wsrep_on' AND SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES);
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(VARIABLE_NAME='wsrep_mode' and GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES);
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone'", 'do 0');
execute immedia