This file contains 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
#!/usr/bin/env sysbench | |
-- replace oltp_common.lua | |
-- cp oltp_common.lua /usr/share/sysbench/oltp_common.lua | |
-- usage | |
-- oltp_rw_unoptimized.lua \ | |
-- --mysql-host=192.168.56.40 \ | |
-- --mysql-password=sbtest \ |
This file contains 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
" vim-bootstrap 2022-10-10 13:46:47 | |
"***************************************************************************** | |
"" Vim-Plug core | |
"***************************************************************************** | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
if has('win32')&&!has('win64') | |
let curl_exists=expand('C:\Windows\Sysnative\curl.exe') | |
else | |
let curl_exists=expand('curl') |
This file contains 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
#!/usr/bin/env sysbench | |
-- replace oltp_common.lua | |
-- cp oltp_common.lua /usr/share/sysbench/oltp_common.lua | |
-- usage | |
-- oltp_rw_unoptimized.lua \ | |
-- --mysql-host=192.168.56.40 \ | |
-- --mysql-password=sbtest \ |
This file contains 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
-- Copyright (C) 2006-2018 Alexey Kopytov <akopytov@gmail.com> | |
-- This program is free software; you can redistribute it and/or modify | |
-- it under the terms of the GNU General Public License as published by | |
-- the Free Software Foundation; either version 2 of the License, or | |
-- (at your option) any later version. | |
-- This program is distributed in the hope that it will be useful, | |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains 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
set optimizer_switch='use_invisible_indexes=on'; | |
set optimizer_switch='skip_scan=off'; | |
set optimizer_switch='hash_join=off'; | |
set optimizer_switch='subquery_to_derived=on'; | |
set optimizer_switch='hypergraph_optimizer=on'; | |
set optimizer_switch='derived_condition_pushdown=off'; |
This file contains 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
grep -oPz "CREATE TABLE \`.*\` \(\n(.*\`.*\`.*\n)*\) ENGINE=.*\n" output.txt | sed -Ee 's/^\).*[^(),]$/\0;/' > ddl.sql |
This file contains 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
echo -e $(grep "\"message\":" slowquery_logs.json | grep -o "#.*;") | sed -e 's/# Time/\n# Time/g' | sed -e 's/;\s*$/;/' > slowquery.log |
This file contains 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
cat << 'EOF' >> /tmp/ptstalk_trigger_non_primary.sh | |
#!/bin/bash | |
trg_plugin() { | |
mysql $EXT_ARGV -sN -e "select case when variable_value = 'Primary' then 0 else 1 end from information_schema.global_status where variable_name ='wsrep_cluster_status';" | |
} | |
EOF | |
chmod +x /tmp/ptstalk_trigger_non_primary.sh | |
sudo ./pt-stalk --stalk --function=/tmp/ptstalk_trigger_non_primary.sh --threshold=0 --cycles=1 --dest="${PTDEST}" -- --user=root --password=<mysql-root-pass>; & |
This file contains 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
cat << 'EOF' > /tmp/ptstalk_trigger_fc_active.sh | |
#!/bin/bash | |
trg_plugin() { | |
mysql $EXT_ARGV -sN -e "select case when variable_value = 'false' then 0 else 1 end from information_schema.global_status where variable_name ='wsrep_flow_control_active';" | |
} | |
EOF | |
chmod +x /tmp/ptstalk_trigger_fc_active.sh | |
sudo ./pt-stalk --stalk --function=/tmp/ptstalk_trigger_fc_active.sh --threshold=0 --cycles=1 --dest="${PTDEST}" -- --user=root --password=<mysql-root-pass>; & |
This file contains 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
#pragma once | |
/* VIAL UID for Lily58*/ | |
#define VIAL_KEYBOARD_UID {0x7E, 0xFD, 0xFC, 0x5B, 0x7D, 0x39, 0x48, 0x06} | |
/* VIAL secure unlock keystroke - currently both big keys (typ. SPACE/ENTER) */ | |
#define VIAL_UNLOCK_COMBO_ROWS {4, 9} | |
#define VIAL_UNLOCK_COMBO_COLS {4, 4} | |
/* Space reduction */ |
NewerOlder