diff --git a/bin/pt-archiver b/bin/pt-archiver index 026c17d34..4e2bec063 100755 --- a/bin/pt-archiver +++ b/bin/pt-archiver @@ -1923,13 +1923,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-config-diff b/bin/pt-config-diff index 3885a52e7..326f51219 100755 --- a/bin/pt-config-diff +++ b/bin/pt-config-diff @@ -3818,7 +3818,7 @@ sub BUILDARGS { if ( ($args->{line_width} || '') eq 'auto' ) { die "Cannot auto-detect line width because the Term::ReadKey module " . "is not installed" unless $have_term; - ($args->{line_width}) = GetTerminalSize(); + ($args->{line_width}) = Term::ReadKey::GetTerminalSize(); PTDEBUG && _d('Line width:', $args->{line_width}); } diff --git a/bin/pt-duplicate-key-checker b/bin/pt-duplicate-key-checker index 0c1bb0dc9..2c7e2b4a7 100755 --- a/bin/pt-duplicate-key-checker +++ b/bin/pt-duplicate-key-checker @@ -310,13 +310,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-find b/bin/pt-find index 93fa0272e..32f7b26ee 100755 --- a/bin/pt-find +++ b/bin/pt-find @@ -1862,13 +1862,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-heartbeat b/bin/pt-heartbeat index 060f327a8..41e882e35 100755 --- a/bin/pt-heartbeat +++ b/bin/pt-heartbeat @@ -3603,13 +3603,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-index-usage b/bin/pt-index-usage index b610a793c..9fcc8221f 100755 --- a/bin/pt-index-usage +++ b/bin/pt-index-usage @@ -3114,13 +3114,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-ioprofile b/bin/pt-ioprofile index 72e61b8cb..d9ffa5c2b 100755 --- a/bin/pt-ioprofile +++ b/bin/pt-ioprofile @@ -75,6 +75,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -203,9 +204,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -312,7 +319,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -404,7 +411,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/bin/pt-kill b/bin/pt-kill index 0a1eb5cae..15756d600 100755 --- a/bin/pt-kill +++ b/bin/pt-kill @@ -2977,13 +2977,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-mext b/bin/pt-mext index 90f45fef5..d975a7d7a 100755 --- a/bin/pt-mext +++ b/bin/pt-mext @@ -116,6 +116,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -244,9 +245,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -353,7 +360,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -445,7 +452,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 8f3c838a5..d459456cd 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -77,6 +77,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -205,9 +206,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -314,7 +321,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -406,7 +413,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi @@ -872,11 +883,13 @@ collect_mysqld_instances () { find_my_cnf_file() { local file="$1" local port="${2:-""}" + local pid_file="${3:-""}" local cnf_file="" - if [ "$port" ]; then - cnf_file="$(grep --max-count 1 "/mysqld.*--port=$port" "$file" \ + if [ "$pid_file" ]; then + local pid=$(cat "$pid_file") + cnf_file="$(grep --max-count 1 -E "^\s*$pid\s+" "$file" \ | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" if [ -n "$cnf_file" ]; then @@ -885,9 +898,18 @@ find_my_cnf_file() { fi fi - cnf_file="$(grep --max-count 1 '/mysqld' "$file" \ - | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" + if [ "$port" ]; then + cnf_file="$(grep --max-count 1 "/mysqld.*--port=$port" "$file" \ + | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" + if [ -n "$cnf_file" ]; then + echo "$cnf_file" + return + fi + else + cnf_file="$(grep --max-count 1 '/mysqld' "$file" \ + | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" + fi if [ -z "$cnf_file" ]; then if [ -e "/etc/my.cnf" ]; then @@ -990,6 +1012,43 @@ collect_internal_vars () { i=$(($i + 1)) done < "$mysqld_executables" fi + + local JEMALLOC_STATUS='' + local GENERAL_JEMALLOC_STATUS=0 + local JEMALLOC_LOCATION='' + + for pid in $(pidof mysqld); do + grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc + jemalloc_status=$? + if [ $jemalloc_status = 1 ]; then + echo "pt-summary-internal-jemalloc_enabled_for_pid_${pid} 0" + else + echo "pt-summary-internal-jemalloc_enabled_for_pid_${pid} 1" + GENERAL_JEMALLOC_STATUS=1 + fi + done + + if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then + JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1) + echo "pt-summary-internal-jemalloc_location ${JEMALLOC_LOCATION}" + fi +} + +collect_keyring_plugins() { + $CMD_MYSQL $EXT_ARGV --table -ss -e 'SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE "keyring%";' +} + +collect_encrypted_tables() { + $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT TABLE_SCHEMA, TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE CREATE_OPTIONS LIKE '%ENCRYPTION=_Y_%';" +} + +collect_encrypted_tablespaces() { + local version="$1" + if [ "$version" '<' "8.0" ]; then + $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES where FLAG&8192 = 8192;" + else + $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_TABLESPACES where FLAG&8192 = 8192;" + fi } get_mysqldump_for () { @@ -1047,6 +1106,7 @@ collect_mysql_info () { collect_mysql_processlist > "$dir/mysql-processlist" collect_mysql_users > "$dir/mysql-users" collect_mysql_roles > "$dir/mysql-roles" + collect_keyring_plugins > "$dir/keyring-plugins" collect_mysqld_instances "$dir/mysql-variables" > "$dir/mysqld-instances" collect_mysqld_executables "$dir/mysqld-instances" > "$dir/mysqld-executables" @@ -1061,16 +1121,16 @@ collect_mysql_info () { local current_time="$($CMD_MYSQL $EXT_ARGV -ss -e \ "SELECT LEFT(NOW() - INTERVAL ${uptime} SECOND, 16)")" - local port="$(get_var port "$dir/mysql-variables")" - local cnf_file="$(find_my_cnf_file "$dir/mysqld-instances" ${port})" - - [ -e "$cnf_file" ] && cat "$cnf_file" > "$dir/mysql-config-file" - local pid_file="$(get_var "pid_file" "$dir/mysql-variables")" local pid_file_exists="" [ -e "${pid_file}" ] && pid_file_exists=1 echo "pt-summary-internal-pid_file_exists $pid_file_exists" >> "$dir/mysql-variables" + local port="$(get_var port "$dir/mysql-variables")" + local cnf_file="$(find_my_cnf_file "$dir/mysqld-instances" ${port} ${pid_file})" + + [ -e "$cnf_file" ] && cat "$cnf_file" > "$dir/mysql-config-file" + echo "pt-summary-internal-current_time $current_time" >> "$dir/mysql-variables" echo "pt-summary-internal-Config_File_path $cnf_file" >> "$dir/mysql-variables" collect_internal_vars "$dir/mysqld-executables" >> "$dir/mysql-variables" @@ -1081,6 +1141,12 @@ collect_mysql_info () { get_mysqldump_for "${trg_arg}" "$dbs" > "$dir/mysqldump" fi + if [ "${OPT_LIST_ENCRYPTED_TABLES}" = 'yes' ]; then + local mysql_version="$(get_var version "$dir/mysql-variables")" + collect_encrypted_tables > "$dir/encrypted-tables" + collect_encrypted_tablespaces ${mysql_version} > "$dir/encrypted-tablespaces" + fi + ( sleep $OPT_SLEEP collect_mysql_deferred_status "$dir/mysql-status" > "$dir/mysql-status-defer" @@ -1182,24 +1248,6 @@ get_plugin_status () { echo ${status:-"Not found"} } -collect_keyring_plugins() { - $CMD_MYSQL $EXT_ARGV --table -ss -e 'SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE "keyring%";' -} - -collect_encrypted_tables() { - $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT TABLE_SCHEMA, TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE CREATE_OPTIONS LIKE '%ENCRYPTION=\"Y\"%';" -} - -collect_encrypted_tablespaces() { - local version="$1" - if [ "$version" '<' "8.0" ]; then - $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES where FLAG&8192 = 8192;" - else - $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_TABLESPACES where FLAG&8192 = 8192;" - fi -} - - _NO_FALSE_NEGATIVES="" parse_mysqld_instances () { @@ -2293,30 +2341,31 @@ parse_wsrep_provider_options () { } report_jemalloc_enabled() { - local JEMALLOC_STATUS='' - local GENERAL_JEMALLOC_STATUS=0 - local JEMALLOC_LOCATION='' - - for pid in $(pidof mysqld); do - grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc - jemalloc_status=$? - if [ $jemalloc_status = 1 ]; then - echo "jemalloc is not enabled in mysql config for process with id ${pid}" - else - echo "jemalloc enabled in mysql config for process with id ${pid}" - GENERAL_JEMALLOC_STATUS=1 - fi - done - - if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then - JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1) - if [ -z "$JEMALLOC_LOCATION" ]; then - echo "Jemalloc library not found" - else - echo "Using jemalloc from $JEMALLOC_LOCATION" - fi - fi - + local instances_file="$1" + local variables_file="$2" + local GENERAL_JEMALLOC_STATUS=0 + + for pid in $(grep '/mysqld ' "$instances_file" | awk '{print $1;}'); do + local jemalloc_status="$(get_var "pt-summary-internal-jemalloc_enabled_for_pid_${pid}" "${variables_file}")" + if [ -z $jemalloc_status ]; then + continue + elif [ $jemalloc_status = 0 ]; then + echo "jemalloc is not enabled in mysql config for process with id ${pid}" + else + echo "jemalloc enabled in mysql config for process with id ${pid}" + GENERAL_JEMALLOC_STATUS=1 + fi + done + + if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then + local jemalloc_location="$(get_var "pt-summary-internal-jemalloc_location" "${variables_file}")" + if [ -n "$jemalloc_location" ]; then + echo "Using jemalloc from $jemalloc_location" + else + echo "Jemalloc library not found" + fi + fi + } report_mysql_summary () { @@ -2522,7 +2571,7 @@ report_mysql_summary () { fi fi - local has_rocksdb=$($CMD_MYSQL $EXT_ARGV -ss -e 'SHOW ENGINES' 2>/dev/null | grep -i 'rocksdb') + local has_rocksdb=$(cat $dir/mysql-plugins | grep -i 'rocksdb.*active.*storage engine') if [ ! -z "$has_rocksdb" ]; then section "RocksDB" section_rocksdb "$dir/mysql-variables" "$dir/mysql-status" @@ -2547,13 +2596,17 @@ report_mysql_summary () { fi section "Encryption" - local keyring_plugins="$(collect_keyring_plugins)" + local keyring_plugins="" local encrypted_tables="" local encrypted_tablespaces="" - if [ "${OPT_LIST_ENCRYPTED_TABLES}" = 'yes' ]; then - local mysql_version="$(get_var version "$dir/mysql-variables")" - encrypted_tables="$(collect_encrypted_tables)" - encrypted_tablespaces="$(collect_encrypted_tablespaces ${mysql_version})" + if [ -s "$dir/keyring-plugins" ]; then + keyring_plugins="$(cat $dir/keyring-plugins)" + fi + if [ -s "$dir/encrypted-tables" ]; then + encrypted_tables="$(cat $dir/encrypted-tables)" + fi + if [ -s "$dir/encrypted-tablespaces" ]; then + encrypted_tablespaces="$(cat $dir/encrypted-tablespaces)" fi format_keyring_plugins "$keyring_plugins" "$encrypted_tables" @@ -2588,7 +2641,7 @@ report_mysql_summary () { fi section "Memory management library" - report_jemalloc_enabled + report_jemalloc_enabled "$dir/mysqld-instances" "$dir/mysql-variables" section "The End" } diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index aa5c12a79..f45fc4a53 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -3293,13 +3293,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-pmp b/bin/pt-pmp index c68f24242..b9f7d3a6d 100755 --- a/bin/pt-pmp +++ b/bin/pt-pmp @@ -118,6 +118,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -246,9 +247,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -355,7 +362,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -447,7 +454,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/bin/pt-query-digest b/bin/pt-query-digest index 3acf450bc..b80ad938a 100755 --- a/bin/pt-query-digest +++ b/bin/pt-query-digest @@ -6357,7 +6357,7 @@ sub BUILDARGS { if ( ($args->{line_width} || '') eq 'auto' ) { die "Cannot auto-detect line width because the Term::ReadKey module " . "is not installed" unless $have_term; - ($args->{line_width}) = GetTerminalSize(); + ($args->{line_width}) = Term::ReadKey::GetTerminalSize(); PTDEBUG && _d('Line width:', $args->{line_width}); } @@ -8862,13 +8862,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-sift b/bin/pt-sift index c3233734e..0416a16ce 100755 --- a/bin/pt-sift +++ b/bin/pt-sift @@ -116,6 +116,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -244,9 +245,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -353,7 +360,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -445,7 +452,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/bin/pt-stalk b/bin/pt-stalk index 82de7bff9..e8e5d9a50 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -129,6 +129,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -257,9 +258,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -366,7 +373,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -458,7 +465,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/bin/pt-summary b/bin/pt-summary index df295e86e..f2d94223c 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -84,6 +84,7 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs usage() { local file="$1" @@ -212,9 +213,15 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -321,7 +328,7 @@ _parse_config_files() { echo "$config_opt" | grep '^[ ]*[^#]' >/dev/null 2>&1 || continue - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" [ "$config_opt" = "" ] && continue @@ -413,7 +420,11 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index b8d8d459d..850c9b1ba 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -4493,13 +4493,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/bin/pt-table-sync b/bin/pt-table-sync index 6d9095c3d..f174af307 100755 --- a/bin/pt-table-sync +++ b/bin/pt-table-sync @@ -2842,13 +2842,15 @@ sub get_create_table { eval { $href = $dbh->selectrow_hashref($show_sql); }; if ( my $e = $EVAL_ERROR ) { PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); die $e; } PTDEBUG && _d($old_sql_mode); - $dbh->do($old_sql_mode); + eval { $dbh->do($old_sql_mode); }; + PTDEBUG && $EVAL_ERROR && _d($EVAL_ERROR); my ($key) = grep { m/create (?:table|view)/i } keys %$href; if ( !$key ) { diff --git a/lib/ReportFormatter.pm b/lib/ReportFormatter.pm index db8899ffa..710136ca5 100644 --- a/lib/ReportFormatter.pm +++ b/lib/ReportFormatter.pm @@ -170,7 +170,7 @@ sub BUILDARGS { if ( ($args->{line_width} || '') eq 'auto' ) { die "Cannot auto-detect line width because the Term::ReadKey module " . "is not installed" unless $have_term; - ($args->{line_width}) = GetTerminalSize(); + ($args->{line_width}) = Term::ReadKey::GetTerminalSize(); PTDEBUG && _d('Line width:', $args->{line_width}); } diff --git a/lib/bash/collect_mysql_info.sh b/lib/bash/collect_mysql_info.sh index 86fba56be..deab42258 100644 --- a/lib/bash/collect_mysql_info.sh +++ b/lib/bash/collect_mysql_info.sh @@ -57,9 +57,21 @@ collect_mysqld_instances () { find_my_cnf_file() { local file="$1" local port="${2:-""}" + local pid_file="${3:-""}" local cnf_file="" + if [ "$pid_file" ]; then + local pid=$(cat "$pid_file") + cnf_file="$(grep --max-count 1 -E "^\s*$pid\s+" "$file" \ + | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" + + if [ -n "$cnf_file" ]; then + echo "$cnf_file" + return + fi + fi + if [ "$port" ]; then # Find the cnf file for the specific port. cnf_file="$(grep --max-count 1 "/mysqld.*--port=$port" "$file" \ @@ -69,12 +81,11 @@ find_my_cnf_file() { echo "$cnf_file" return fi + else + cnf_file="$(grep --max-count 1 '/mysqld' "$file" \ + | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" fi - cnf_file="$(grep --max-count 1 '/mysqld' "$file" \ - | awk 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }')" - - if [ -z "$cnf_file" ]; then # Cannot autodetect config file, try common locations. if [ -e "/etc/my.cnf" ]; then @@ -180,6 +191,46 @@ collect_internal_vars () { i=$(($i + 1)) done < "$mysqld_executables" fi + + # jemalloc info + local JEMALLOC_STATUS='' + local GENERAL_JEMALLOC_STATUS=0 + local JEMALLOC_LOCATION='' + + for pid in $(pidof mysqld); do + grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc + jemalloc_status=$? + if [ $jemalloc_status = 1 ]; then + echo "pt-summary-internal-jemalloc_enabled_for_pid_${pid} 0" + else + echo "pt-summary-internal-jemalloc_enabled_for_pid_${pid} 1" + GENERAL_JEMALLOC_STATUS=1 + fi + done + + if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then + JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1) + echo "pt-summary-internal-jemalloc_location ${JEMALLOC_LOCATION}" + fi +} + +collect_keyring_plugins() { + $CMD_MYSQL $EXT_ARGV --table -ss -e 'SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE "keyring%";' +} + +collect_encrypted_tables() { + $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT TABLE_SCHEMA, TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE CREATE_OPTIONS LIKE '%ENCRYPTION=_Y_%';" +} + +collect_encrypted_tablespaces() { + local version="$1" +# I_S.INNODB_[SYS_]TABLESPACES has a "flag" field. Encrypted tablespace has bit 14 set. You can check it with "flag & 8192". +# And seems like MySQL is capable of bitwise operations. https://dev.mysql.com/doc/refman/5.7/en/bit-functions.html + if [ "$version" '<' "8.0" ]; then + $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES where FLAG&8192 = 8192;" + else + $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_TABLESPACES where FLAG&8192 = 8192;" + fi } # Uses mysqldump and dumps the results to FILE. @@ -246,6 +297,7 @@ collect_mysql_info () { collect_mysql_processlist > "$dir/mysql-processlist" collect_mysql_users > "$dir/mysql-users" collect_mysql_roles > "$dir/mysql-roles" + collect_keyring_plugins > "$dir/keyring-plugins" collect_mysqld_instances "$dir/mysql-variables" > "$dir/mysqld-instances" collect_mysqld_executables "$dir/mysqld-instances" > "$dir/mysqld-executables" @@ -261,16 +313,16 @@ collect_mysql_info () { local current_time="$($CMD_MYSQL $EXT_ARGV -ss -e \ "SELECT LEFT(NOW() - INTERVAL ${uptime} SECOND, 16)")" - local port="$(get_var port "$dir/mysql-variables")" - local cnf_file="$(find_my_cnf_file "$dir/mysqld-instances" ${port})" - - [ -e "$cnf_file" ] && cat "$cnf_file" > "$dir/mysql-config-file" - local pid_file="$(get_var "pid_file" "$dir/mysql-variables")" local pid_file_exists="" [ -e "${pid_file}" ] && pid_file_exists=1 echo "pt-summary-internal-pid_file_exists $pid_file_exists" >> "$dir/mysql-variables" + local port="$(get_var port "$dir/mysql-variables")" + local cnf_file="$(find_my_cnf_file "$dir/mysqld-instances" ${port} ${pid_file})" + + [ -e "$cnf_file" ] && cat "$cnf_file" > "$dir/mysql-config-file" + # TODO: Do these require a file of their own? echo "pt-summary-internal-current_time $current_time" >> "$dir/mysql-variables" echo "pt-summary-internal-Config_File_path $cnf_file" >> "$dir/mysql-variables" @@ -283,6 +335,13 @@ collect_mysql_info () { get_mysqldump_for "${trg_arg}" "$dbs" > "$dir/mysqldump" fi + # encrypted tables and tablespaces + if [ "${OPT_LIST_ENCRYPTED_TABLES}" = 'yes' ]; then + local mysql_version="$(get_var version "$dir/mysql-variables")" + collect_encrypted_tables > "$dir/encrypted-tables" + collect_encrypted_tablespaces ${mysql_version} > "$dir/encrypted-tablespaces" + fi + # TODO: gather this data in the same format as normal: TS line, stats ( sleep $OPT_SLEEP diff --git a/lib/bash/parse_options.sh b/lib/bash/parse_options.sh index 5324585b3..a667cea36 100644 --- a/lib/bash/parse_options.sh +++ b/lib/bash/parse_options.sh @@ -56,6 +56,8 @@ OPT_VERSION="" # If --version was specified OPT_HELP="" # If --help was specified OPT_ASK_PASS="" # If --ask-pass was specified PO_DIR="" # Directory with program option spec files +GLOBAL_CONFIG=0 # We ignore non-recognized options in global configs + # and return error for user-defined configs and command line # Sub: usage # Print usage (--help) and list the program's options. @@ -215,10 +217,16 @@ parse_options() { _parse_config_files "$user_config_file" done else - _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" "/etc/percona-toolkit/$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "/etc/percona-toolkit/percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "/etc/percona-toolkit/$TOOL.conf" # conditional in case $HOME isn't set; e.g. tool launched from init if [ "${HOME:-}" ]; then - _parse_config_files "$HOME/.percona-toolkit.conf" "$HOME/.$TOOL.conf" + GLOBAL_CONFIG=1 + _parse_config_files "$HOME/.percona-toolkit.conf" + GLOBAL_CONFIG=0 + _parse_config_files "$HOME/.$TOOL.conf" fi fi @@ -348,7 +356,7 @@ _parse_config_files() { # Strip leading and trailing spaces, and spaces around the first =, # and end-of-line # comments. - config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/[ ]+#.*$//')" + config_opt="$(echo "$config_opt" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/[ ]*=[ ]*/=/' -e 's/\s[ ]*#.*$//')" # Skip blank lines. [ "$config_opt" = "" ] && continue @@ -468,11 +476,14 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - # Not all programs uses the same options and since these options can be stored - # in a common config file, we need to skip general options not used by a particular - # program - # option_error "Unknown option: $real_opt" - continue + if [ $GLOBAL_CONFIG -eq 1 ]; then + # Not all programs uses the same options and since these options can be stored + # in a common config file, we need to skip general options not used by a particular + # program + continue + else + option_error "Unknown option: $real_opt" + fi fi fi diff --git a/lib/bash/report_mysql_info.sh b/lib/bash/report_mysql_info.sh index 428dc2693..9ec5a5b72 100644 --- a/lib/bash/report_mysql_info.sh +++ b/lib/bash/report_mysql_info.sh @@ -107,26 +107,6 @@ get_plugin_status () { echo ${status:-"Not found"} } -collect_keyring_plugins() { - $CMD_MYSQL $EXT_ARGV --table -ss -e 'SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE "keyring%";' -} - -collect_encrypted_tables() { - $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT TABLE_SCHEMA, TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE CREATE_OPTIONS LIKE '%ENCRYPTION=\"Y\"%';" -} - -collect_encrypted_tablespaces() { - local version="$1" -# I_S.INNODB_[SYS_]TABLESPACES has a "flag" field. Encrypted tablespace has bit 14 set. You can check it with "flag & 8192". -# And seems like MySQL is capable of bitwise operations. https://dev.mysql.com/doc/refman/5.7/en/bit-functions.html - if [ "$version" '<' "8.0" ]; then - $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES where FLAG&8192 = 8192;" - else - $CMD_MYSQL $EXT_ARGV --table -ss -e "SELECT SPACE, NAME, SPACE_TYPE from INFORMATION_SCHEMA.INNODB_TABLESPACES where FLAG&8192 = 8192;" - fi -} - - # ############################################################################## # Functions for parsing specific files and getting desired info from them. # These are called from within main() and are separated so they can be tested @@ -1292,30 +1272,31 @@ parse_wsrep_provider_options () { } report_jemalloc_enabled() { - local JEMALLOC_STATUS='' - local GENERAL_JEMALLOC_STATUS=0 - local JEMALLOC_LOCATION='' - - for pid in $(pidof mysqld); do - grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc - jemalloc_status=$? - if [ $jemalloc_status = 1 ]; then - echo "jemalloc is not enabled in mysql config for process with id ${pid}" - else - echo "jemalloc enabled in mysql config for process with id ${pid}" - GENERAL_JEMALLOC_STATUS=1 - fi - done - - if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then - JEMALLOC_LOCATION=$(find /usr/lib64/ /usr/lib/x86_64-linux-gnu /usr/lib -name "libjemalloc.*" 2>/dev/null | head -n 1) - if [ -z "$JEMALLOC_LOCATION" ]; then - echo "Jemalloc library not found" - else - echo "Using jemalloc from $JEMALLOC_LOCATION" - fi - fi - + local instances_file="$1" + local variables_file="$2" + local GENERAL_JEMALLOC_STATUS=0 + + for pid in $(grep '/mysqld ' "$instances_file" | awk '{print $1;}'); do + local jemalloc_status="$(get_var "pt-summary-internal-jemalloc_enabled_for_pid_${pid}" "${variables_file}")" + if [ -z $jemalloc_status ]; then + continue + elif [ $jemalloc_status = 0 ]; then + echo "jemalloc is not enabled in mysql config for process with id ${pid}" + else + echo "jemalloc enabled in mysql config for process with id ${pid}" + GENERAL_JEMALLOC_STATUS=1 + fi + done + + if [ $GENERAL_JEMALLOC_STATUS -eq 1 ]; then + local jemalloc_location="$(get_var "pt-summary-internal-jemalloc_location" "${variables_file}")" + if [ -n "$jemalloc_location" ]; then + echo "Using jemalloc from $jemalloc_location" + else + echo "Jemalloc library not found" + fi + fi + } report_mysql_summary () { @@ -1566,7 +1547,7 @@ report_mysql_summary () { fi fi - local has_rocksdb=$($CMD_MYSQL $EXT_ARGV -ss -e 'SHOW ENGINES' 2>/dev/null | grep -i 'rocksdb') + local has_rocksdb=$(cat $dir/mysql-plugins | grep -i 'rocksdb.*active.*storage engine') if [ ! -z "$has_rocksdb" ]; then section "RocksDB" section_rocksdb "$dir/mysql-variables" "$dir/mysql-status" @@ -1600,13 +1581,17 @@ report_mysql_summary () { fi section "Encryption" - local keyring_plugins="$(collect_keyring_plugins)" + local keyring_plugins="" local encrypted_tables="" local encrypted_tablespaces="" - if [ "${OPT_LIST_ENCRYPTED_TABLES}" = 'yes' ]; then - local mysql_version="$(get_var version "$dir/mysql-variables")" - encrypted_tables="$(collect_encrypted_tables)" - encrypted_tablespaces="$(collect_encrypted_tablespaces ${mysql_version})" + if [ -s "$dir/keyring-plugins" ]; then + keyring_plugins="$(cat $dir/keyring-plugins)" + fi + if [ -s "$dir/encrypted-tables" ]; then + encrypted_tables="$(cat $dir/encrypted-tables)" + fi + if [ -s "$dir/encrypted-tablespaces" ]; then + encrypted_tablespaces="$(cat $dir/encrypted-tablespaces)" fi format_keyring_plugins "$keyring_plugins" "$encrypted_tables" @@ -1652,7 +1637,7 @@ report_mysql_summary () { fi section "Memory management library" - report_jemalloc_enabled + report_jemalloc_enabled "$dir/mysqld-instances" "$dir/mysql-variables" # Make sure that we signal the end of the tool's output. section "The End" diff --git a/sandbox/servers/pxc/5.7/my.sandbox.cnf b/sandbox/servers/pxc/5.7/my.sandbox.cnf index 0cb994f29..1d195eb44 100644 --- a/sandbox/servers/pxc/5.7/my.sandbox.cnf +++ b/sandbox/servers/pxc/5.7/my.sandbox.cnf @@ -26,6 +26,7 @@ log-error = /tmp/PORT/data/mysqld.log innodb_lock_wait_timeout = 3 general_log general_log_file = genlog +local-infile = 1 binlog_format = ROW wsrep_provider = LIBGALERA @@ -41,3 +42,4 @@ innodb_locks_unsafe_for_binlog = 1 innodb_autoinc_lock_mode = 2 wsrep-replicate-myisam pxc_strict_mode = DISABLED +secure-file-priv = diff --git a/sandbox/servers/pxc/8.0/my.sandbox.cnf b/sandbox/servers/pxc/8.0/my.sandbox.cnf index b33776995..8bb296ecc 100644 --- a/sandbox/servers/pxc/8.0/my.sandbox.cnf +++ b/sandbox/servers/pxc/8.0/my.sandbox.cnf @@ -26,6 +26,7 @@ log-error = /tmp/PORT/data/mysqld.log innodb_lock_wait_timeout = 3 general_log general_log_file = genlog +local-infile = 1 binlog_format = ROW wsrep_provider = LIBGALERA @@ -41,3 +42,4 @@ innodb_autoinc_lock_mode = 2 wsrep-replicate-myisam pxc_strict_mode = DISABLED pxc_encrypt_cluster_traffic = 0 +secure-file-priv = diff --git a/t/lib/CompareQueryTimes.t b/t/lib/CompareQueryTimes.t index 4ad720222..4e67fa70b 100644 --- a/t/lib/CompareQueryTimes.t +++ b/t/lib/CompareQueryTimes.t @@ -150,9 +150,9 @@ compare(0.000100, 0.000250); $report = <do('update test.t set i = 99 where i=1'); - -proc('before_execute', db=>'test', 'temp-table'=>'dropme'); -proc('execute'); -proc('after_execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - ) ], - [ - different_row_counts => 0, - different_checksums => 1, - different_column_counts => 0, - different_column_types => 0, - ], - 'checksum: compare, different checksums' -); - -# Make row counts differ, too. -$dbh2->do('insert into test.t values (4)'); - -proc('before_execute', db=>'test', 'temp-table'=>'dropme'); -proc('execute'); -proc('after_execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - ) ], - [ - different_row_counts => 1, - different_checksums => 1, - different_column_counts => 0, - different_column_types => 0, - ], - 'checksum: compare, different checksums and row counts' -); - -$report = <is_cluster_mode ); + + # Make checksums differ. + $dbh2->do('update test.t set i = 99 where i=1'); + + proc('before_execute', db=>'test', 'temp-table'=>'dropme'); + proc('execute'); + proc('after_execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + ) ], + [ + different_row_counts => 0, + different_checksums => 1, + different_column_counts => 0, + different_column_types => 0, + ], + 'checksum: compare, different checksums' + ); + + # Make row counts differ, too. + $dbh2->do('insert into test.t values (4)'); + + proc('before_execute', db=>'test', 'temp-table'=>'dropme'); + proc('execute'); + proc('after_execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + ) ], + [ + different_row_counts => 1, + different_checksums => 1, + different_column_counts => 0, + different_column_types => 0, + ], + 'checksum: compare, different checksums and row counts' + ); + + $report = <{checksum} $events[1]->{checksum} +# Query ID host1 host2 +# ================================== ========= ========== +# 5B07DA841600FC6FD2D386B840D3BEEA-1 $events[0]->{checksum} $events[1]->{checksum} # Row count differences -# Query ID host1 host2 -# ================== ===== ===== -# D2D386B840D3BEEA-1 3 4 +# Query ID host1 host2 +# ================================== ===== ===== +# 5B07DA841600FC6FD2D386B840D3BEEA-1 3 4 EOF -is( - $cr->report(hosts => $hosts), - $report, - 'checksum: report' -); - -my %samples = $cr->samples($events[0]->{fingerprint}); -is_deeply( - \%samples, - { - 1 => 'select * from test.t where i>0', - }, - 'checksum: samples' -); - + is( + $cr->report(hosts => $hosts), + $report, + 'checksum: report' + ); + + my %samples = $cr->samples($events[0]->{fingerprint}); + is_deeply( + \%samples, + { + 1 => 'select * from test.t where i>0', + }, + 'checksum: samples' + ); +} # ############################################################################# # Test the rows method. # ############################################################################# my $tmpdir = '/tmp/mk-upgrade-res'; -SKIP: { diag(`rm -rf $tmpdir 2>/dev/null; mkdir $tmpdir`); @@ -414,26 +416,29 @@ is( "rows: compare() sets row_count" ); -# Make the result set differ. -$dbh2->do('insert into test.t values (5)'); - -proc('before_execute'); -proc('execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - ) ], - [ - different_row_counts => 1, - different_column_values => 0, - different_column_counts => 0, - different_column_types => 0, - ], - 'rows: compare, different row counts' -); - +SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); + + # Make the result set differ. + $dbh2->do('insert into test.t values (5)'); + + proc('before_execute'); + proc('execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + ) ], + [ + different_row_counts => 1, + different_column_values => 0, + different_column_counts => 0, + different_column_types => 0, + ], + 'rows: compare, different row counts' + ); +} # Use test.t2 and make a column value differ. @events = ( { @@ -458,84 +463,91 @@ is_deeply( 'rows: column value is different' ); -proc('before_execute'); -proc('execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - ) ], - [ - different_row_counts => 0, - different_column_values => 1, - different_column_counts => 0, - different_column_types => 0, - ], - 'rows: compare, different column values' -); - -is_deeply( - $dbh1->selectall_arrayref('show indexes from test.mk_upgrade_left'), - [], - 'Did not add indexes' -); - -$report = <is_cluster_mode ); + + proc('before_execute'); + proc('execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + ) ], + [ + different_row_counts => 0, + different_column_values => 1, + different_column_counts => 0, + different_column_types => 0, + ], + 'rows: compare, different column values' + ); + + is_deeply( + $dbh1->selectall_arrayref('show indexes from test.mk_upgrade_left'), + [], + 'Did not add indexes' + ); + + $report = <report(hosts => $hosts), - $report, - 'rows: report' -); - -%samples = $cr->samples($events[0]->{fingerprint}); -is_deeply( - \%samples, - { - 3 => 'select * from test.t2' - }, - 'rows: samples' -); - -# ############################################################################# -# Test max-different-rows. -# ############################################################################# -$cr->reset(); -$dbh2->do("update test.t2 set c='should be a' where i=1"); -$dbh2->do("update test.t2 set c='should be b' where i=2"); -proc('before_execute'); -proc('execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - 'max-different-rows' => 1, - 'add-indexes' => 1, - ) ], - [ - different_row_counts => 0, - different_column_values => 1, - different_column_counts => 0, - different_column_types => 0, - ], - 'rows: compare, stop at max-different-rows' -); - + is( + $cr->report(hosts => $hosts), + $report, + 'rows: report' + ); + + my %samples = $cr->samples($events[0]->{fingerprint}); + is_deeply( + \%samples, + { + 3 => 'select * from test.t2' + }, + 'rows: samples' + ); + + # ############################################################################# + # Test max-different-rows. + # ############################################################################# + $cr->reset(); + $dbh2->do("update test.t2 set c='should be a' where i=1"); + $dbh2->do("update test.t2 set c='should be b' where i=2"); + proc('before_execute'); + proc('execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + 'max-different-rows' => 1, + 'add-indexes' => 1, + ) ], + [ + different_row_counts => 0, + different_column_values => 1, + different_column_counts => 0, + different_column_types => 0, + ], + 'rows: compare, stop at max-different-rows' + ); +} # I don't know why but several months ago this test started # failing although nothing afaik was changed. This module # is only used in pt-upgrade and that tool passes its tests. +# Added by Daniel Nichter on Feb 02, 2012, +# by commit 38c421351df19f463c046100b0b6889b018428d3 +# Likely affected by move of the function get_create_table +# to TableParser.pm and subsequent changes. Need to investigate. SKIP: { skip "Fix this test", 1; is_deeply( @@ -545,141 +557,143 @@ is_deeply( ); } -$report = <is_cluster_mode ); + + $report = <report(hosts => $hosts), - $report, - 'rows: report max-different-rows' -); - -# ############################################################################# -# Double check that outfiles have correct contents. -# ############################################################################# - -# This test uses the results from the max-different-rows test above. - -my @outfile = split(/[\t\n]+/, `cat /tmp/mk-upgrade-res/left-outfile.txt`); -is_deeply( - \@outfile, - [qw(1 a 2 b 3 c)], - 'Left outfile' -); - -@outfile = split(/[\t\n]+/, `cat /tmp/mk-upgrade-res/right-outfile.txt`); -is_deeply( - \@outfile, - ['1', 'should be a', '2', 'should be b', '3', 'should be c'], - 'Right outfile' -); - -# ############################################################################# -# Test float-precision. -# ############################################################################# -@events = ( - { - arg => 'select * from test.t3', - db => 'test', - fingerprint => 'select * from test.t3', - sampleno => 3, - }, - { - arg => 'select * from test.t3', - db => 'test', - fingerprint => 'select * from test.t3', - sampleno => 3, - }, -); - -$cr->reset(); -$dbh2->do('update test.t3 set f=1.12346 where 1'); -proc('before_execute'); -proc('execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - ) ], - [ - different_row_counts => 0, - different_column_values => 1, - different_column_counts => 0, - different_column_types => 0, - ], - 'rows: compare, different without float-precision' -); - -proc('before_execute'); -proc('execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - 'float-precision' => 3 - ) ], - [ - different_row_counts => 0, - different_column_values => 0, - different_column_counts => 0, - different_column_types => 0, - ], - 'rows: compare, not different with float-precision' -); - -# ############################################################################# -# Test when left has more rows than right. -# ############################################################################# -$cr->reset(); -$dbh1->do('update test.t3 set f=0 where 1'); -$dbh1->do('SET SQL_LOG_BIN=0'); -$dbh1->do('insert into test.t3 values (2.0),(3.0)'); -$dbh1->do('SET SQL_LOG_BIN=1'); -$sb->wait_for_slaves(); - -my $left_n_rows = $dbh1->selectcol_arrayref('select count(*) from test.t3')->[0]; -my $right_n_rows = $dbh2->selectcol_arrayref('select count(*) from test.t3')->[0]; -ok( - $left_n_rows == 3 && $right_n_rows == 1, - 'Left has extra rows' -); - -proc('before_execute'); -proc('execute'); - -is_deeply( - [ $cr->compare( - events => \@events, - hosts => $hosts, - 'float-precision' => 3 - ) ], - [ - different_row_counts => 1, - different_column_values => 0, - different_column_counts => 0, - different_column_types => 0, - ], - 'rows: compare, left with more rows' -); - -$report = <report(hosts => $hosts), + $report, + 'rows: report max-different-rows' + ); + + # ############################################################################# + # Double check that outfiles have correct contents. + # ############################################################################# + + # This test uses the results from the max-different-rows test above. + + my @outfile = split(/[\t\n]+/, `cat /tmp/mk-upgrade-res/left-outfile.txt`); + is_deeply( + \@outfile, + [qw(1 a 2 b 3 c)], + 'Left outfile' + ); + + @outfile = split(/[\t\n]+/, `cat /tmp/mk-upgrade-res/right-outfile.txt`); + is_deeply( + \@outfile, + ['1', 'should be a', '2', 'should be b', '3', 'should be c'], + 'Right outfile' + ); + # ############################################################################# + # Test float-precision. + # ############################################################################# + @events = ( + { + arg => 'select * from test.t3', + db => 'test', + fingerprint => 'select * from test.t3', + sampleno => 3, + }, + { + arg => 'select * from test.t3', + db => 'test', + fingerprint => 'select * from test.t3', + sampleno => 3, + }, + ); + + $cr->reset(); + $dbh2->do('update test.t3 set f=1.12346 where 1'); + proc('before_execute'); + proc('execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + ) ], + [ + different_row_counts => 0, + different_column_values => 1, + different_column_counts => 0, + different_column_types => 0, + ], + 'rows: compare, different without float-precision' + ); + + proc('before_execute'); + proc('execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + 'float-precision' => 3 + ) ], + [ + different_row_counts => 0, + different_column_values => 0, + different_column_counts => 0, + different_column_types => 0, + ], + 'rows: compare, not different with float-precision' + ); + + # ############################################################################# + # Test when left has more rows than right. + # ############################################################################# + $cr->reset(); + $dbh1->do('update test.t3 set f=0 where 1'); + $dbh1->do('SET SQL_LOG_BIN=0'); + $dbh1->do('insert into test.t3 values (2.0),(3.0)'); + $dbh1->do('SET SQL_LOG_BIN=1'); + $sb->wait_for_slaves(); + + my $left_n_rows = $dbh1->selectcol_arrayref('select count(*) from test.t3')->[0]; + my $right_n_rows = $dbh2->selectcol_arrayref('select count(*) from test.t3')->[0]; + ok( + $left_n_rows == 3 && $right_n_rows == 1, + 'Left has extra rows' + ); + + proc('before_execute'); + proc('execute'); + + is_deeply( + [ $cr->compare( + events => \@events, + hosts => $hosts, + 'float-precision' => 3 + ) ], + [ + different_row_counts => 1, + different_column_values => 0, + different_column_counts => 0, + different_column_types => 0, + ], + 'rows: compare, left with more rows' + ); + + $report = <report(hosts => $hosts), - $report, - 'rows: report, left with more rows' -); + is( + $cr->report(hosts => $hosts), + $report, + 'rows: report, left with more rows' + ); } # ############################################################################# @@ -726,8 +740,6 @@ is_deeply( 'No differences after bad compare()' ); -SKIP: { - $cr = new CompareResults( method => 'rows', 'base-dir' => $tmpdir, @@ -757,8 +769,6 @@ is_deeply( 'No differences after bad compare()' ); -} - # ############################################################################# # Done. # ############################################################################# diff --git a/t/lib/Cxn.t b/t/lib/Cxn.t index f831f9766..3ec841530 100644 --- a/t/lib/Cxn.t +++ b/t/lib/Cxn.t @@ -353,25 +353,29 @@ SKIP: { "Re-connect connect()" ); - ($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS'); - ok( - $row, - "Re-connect connect(slave_dsn) to slave" - ) or diag(Dumper($row)); +PXC_SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); - $cxn->dbh->disconnect(); - $cxn->connect(); + ($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS'); + ok( + $row, + "Re-connect connect(slave_dsn) to slave" + ) or diag(Dumper($row)); - ok( - $cxn->dbh()->ping(), - "Re-re-connect connect()" - ); + $cxn->dbh->disconnect(); + $cxn->connect(); - ($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS'); - ok( - $row, - "Re-re-connect connect() to slave" - ) or diag(Dumper($row)); + ok( + $cxn->dbh()->ping(), + "Re-re-connect connect()" + ); + + ($row) = $cxn->dbh()->selectrow_hashref('SHOW SLAVE STATUS'); + ok( + $row, + "Re-re-connect connect() to slave" + ) or diag(Dumper($row)); + } } # ############################################################################# diff --git a/t/lib/HTTP/Micro.t b/t/lib/HTTP/Micro.t index 703aff534..02ca7d837 100644 --- a/t/lib/HTTP/Micro.t +++ b/t/lib/HTTP/Micro.t @@ -24,9 +24,13 @@ for my $test_url ( "http://www.percona.com/robots.txt", "https://v.percona.com" my $tiny = HTTP::Tiny->new(max_redirect => 0)->request('GET', $test_url); my $micro = HTTP::Micro->new->request('GET', $test_url); + # Need to split and sort content, because v.percona.com returns data + # in different order for each call + my $tiny_content = join "\n", sort (split /\n/, $tiny->{content}); + my $micro_content = (join "\n", sort (split /\n/, $micro->{content})); like( - $micro->{content}, - qr/^\Q$tiny->{content}/, + $micro_content, + qr/^\Q$tiny_content/, "HTTP::Micro == HTTP::Tiny for $test_url" ); } diff --git a/t/lib/IndexUsage.t b/t/lib/IndexUsage.t index bb0ddc91b..066acaeb9 100644 --- a/t/lib/IndexUsage.t +++ b/t/lib/IndexUsage.t @@ -211,7 +211,7 @@ SKIP: { is_deeply( $rows, [ - [qw(12852102680195556712 sakila actor PRIMARY idx_actor_last_name 1)], + [qw(85D2331F8094117AB25BD74B55E6E568 sakila actor PRIMARY idx_actor_last_name 1)], ], "Save alt index data" ); diff --git a/t/lib/MasterSlave.t b/t/lib/MasterSlave.t index fb9683cb6..a3af2bc66 100644 --- a/t/lib/MasterSlave.t +++ b/t/lib/MasterSlave.t @@ -50,159 +50,163 @@ my $ms = new MasterSlave( SKIP: { skip "Cannot connect to sandbox master", 2 unless $master_dbh; - local @ARGV = (); - $o->get_opts(); + +PXC_SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); + + local @ARGV = (); + $o->get_opts(); - my $slaves = $ms->get_slaves( - dbh => $master_dbh, - dsn => $master_dsn, - make_cxn => sub { - my $cxn = new Cxn( - @_, - DSNParser => $dp, - OptionParser => $o, - ); - $cxn->connect(); - return $cxn; - }, - ); + my $slaves = $ms->get_slaves( + dbh => $master_dbh, + dsn => $master_dsn, + make_cxn => sub { + my $cxn = new Cxn( + @_, + DSNParser => $dp, + OptionParser => $o, + ); + $cxn->connect(); + return $cxn; + }, + ); - is_deeply( - $slaves->[0]->dsn(), - { A => undef, - D => undef, - F => undef, - P => '12346', - S => undef, - h => '127.0.0.1', - p => 'msandbox', - t => undef, - u => 'msandbox', - server_id => 12346, - master_id => 12345, - source => 'hosts', - }, - 'get_slaves() from recurse_to_slaves() with a default --recursion-method' - ); + is_deeply( + $slaves->[0]->dsn(), + { A => undef, + D => undef, + F => undef, + P => '12346', + S => undef, + h => '127.0.0.1', + p => 'msandbox', + t => undef, + u => 'msandbox', + server_id => 12346, + master_id => 12345, + source => 'hosts', + }, + 'get_slaves() from recurse_to_slaves() with a default --recursion-method' + ); - my ($id) = $slaves->[0]->dbh()->selectrow_array('SELECT @@SERVER_ID'); - is( - $id, - '12346', - 'dbh created from get_slaves()' - ); + my ($id) = $slaves->[0]->dbh()->selectrow_array('SELECT @@SERVER_ID'); + is( + $id, + '12346', + 'dbh created from get_slaves()' + ); - # This doesn't actually work because the master and slave are both - # localhost/127.1 so it will connect agian to the master, detect this, - # and ignore it. This tests nonetheless that "processlist" isn't - # misspelled, which would cause the sub to die. - # https://bugs.launchpad.net/percona-toolkit/+bug/921802 - local @ARGV = ('--recursion-method', 'processlist'); - $o->get_opts(); - - $slaves = $ms->get_slaves( - dbh => $master_dbh, - dsn => $master_dsn, - make_cxn => sub { - my $cxn = new Cxn( - @_, - DSNParser => $dp, - OptionParser => $o, - ); - $cxn->connect(); - return $cxn; - }, - ); + # This doesn't actually work because the master and slave are both + # localhost/127.1 so it will connect agian to the master, detect this, + # and ignore it. This tests nonetheless that "processlist" isn't + # misspelled, which would cause the sub to die. + # https://bugs.launchpad.net/percona-toolkit/+bug/921802 + local @ARGV = ('--recursion-method', 'processlist'); + $o->get_opts(); + + $slaves = $ms->get_slaves( + dbh => $master_dbh, + dsn => $master_dsn, + make_cxn => sub { + my $cxn = new Cxn( + @_, + DSNParser => $dp, + OptionParser => $o, + ); + $cxn->connect(); + return $cxn; + }, + ); - is_deeply( - $slaves, - [], - "get_slaves() by processlist" - ); + is_deeply( + $slaves, + [], + "get_slaves() by processlist" + ); - # ########################################################################## - # --recursion-method=none - # https://bugs.launchpad.net/percona-toolkit/+bug/987694 - # ########################################################################## + # ########################################################################## + # --recursion-method=none + # https://bugs.launchpad.net/percona-toolkit/+bug/987694 + # ########################################################################## - # Create percona.checksums to make the privs happy. - diag(`/tmp/12345/use -e "create database if not exists percona"`); - diag(`/tmp/12345/use -e "create table if not exists percona.checksums (id int)"`); + # Create percona.checksums to make the privs happy. + diag(`/tmp/12345/use -e "create database if not exists percona"`); + diag(`/tmp/12345/use -e "create table if not exists percona.checksums (id int)"`); - # Create a read-only checksum user that can't SHOW SLAVES HOSTS or much else. - diag(`/tmp/12345/use -u root < $trunk/t/lib/samples/ro-checksum-user.sql`); + # Create a read-only checksum user that can't SHOW SLAVES HOSTS or much else. + diag(`/tmp/12345/use -u root < $trunk/t/lib/samples/ro-checksum-user.sql`); + + my $ro_dbh = DBI->connect( + "DBI:mysql:;host=127.0.0.1;port=12345", 'ro_checksum_user', 'msandbox', + { PrintError => 0, RaiseError => 1 }); + my $ro_dsn = { + h => '127.1', + P => '12345', + u => 'ro_checksum_user', + p => 'ro_checksum_user', + }; + + @ARGV = ('--recursion-method', 'hosts'); + $o->get_opts(); + throws_ok( + sub { + $slaves = $ms->get_slaves( + dbh => $ro_dbh, + dsn => $ro_dsn, + make_cxn => sub { + my $cxn = new Cxn( + @_, + DSNParser => $dp, + OptionParser => $o, + ); + $cxn->connect(); + return $cxn; + }, + ); + }, + qr/Access denied/, + "Can't SHOW SLAVE HOSTS without privs (bug 987694)" + ); - my $ro_dbh = DBI->connect( - "DBI:mysql:;host=127.0.0.1;port=12345", 'ro_checksum_user', 'msandbox', - { PrintError => 0, RaiseError => 1 }); - my $ro_dsn = { - h => '127.1', - P => '12345', - u => 'ro_checksum_user', - p => 'ro_checksum_user', - }; + @ARGV = ('--recursion-method', 'none'); + $o->get_opts(); + $slaves = $ms->get_slaves( + dbh => $ro_dbh, + dsn => $ro_dsn, + make_cxn => sub { + my $cxn = new Cxn( + @_, + DSNParser => $dp, + OptionParser => $o, + ); + $cxn->connect(); + return $cxn; + }, + ); + is_deeply( + $slaves, + [], + "No privs needed for --recursion-method=none (bug 987694)" + ); - @ARGV = ('--recursion-method', 'hosts'); - $o->get_opts(); - throws_ok( - sub { - $slaves = $ms->get_slaves( - dbh => $ro_dbh, + @ARGV = ('--recursion-method', 'none', '--recurse', '2'); + $o->get_opts(); + my $recursed = 0; + $ms->recurse_to_slaves( + { dbh => $ro_dbh, dsn => $ro_dsn, - make_cxn => sub { - my $cxn = new Cxn( - @_, - DSNParser => $dp, - OptionParser => $o, - ); - $cxn->connect(); - return $cxn; - }, - ); - }, - qr/Access denied/, - "Can't SHOW SLAVE HOSTS without privs (bug 987694)" - ); - - @ARGV = ('--recursion-method', 'none'); - $o->get_opts(); - $slaves = $ms->get_slaves( - dbh => $ro_dbh, - dsn => $ro_dsn, - make_cxn => sub { - my $cxn = new Cxn( - @_, - DSNParser => $dp, - OptionParser => $o, - ); - $cxn->connect(); - return $cxn; - }, - ); - is_deeply( - $slaves, - [], - "No privs needed for --recursion-method=none (bug 987694)" - ); - - @ARGV = ('--recursion-method', 'none', '--recurse', '2'); - $o->get_opts(); - my $recursed = 0; - $ms->recurse_to_slaves( - { dbh => $ro_dbh, - dsn => $ro_dsn, - callback => sub { $recursed++ }, - }); - is( - $recursed, - 0, - "recurse_to_slaves() doesn't recurse if method=none" - ); + callback => sub { $recursed++ }, + }); + is( + $recursed, + 0, + "recurse_to_slaves() doesn't recurse if method=none" + ); - $ro_dbh->disconnect(); - diag(`/tmp/12345/use -u root -e "drop user 'ro_checksum_user'\@'%'"`); + $ro_dbh->disconnect(); + diag(`/tmp/12345/use -u root -e "drop user 'ro_checksum_user'\@'%'"`); + } } - # ############################################################################# # First we need to setup a special replication sandbox environment apart from # the usual persistent sandbox servers on ports 12345 and 12346. @@ -600,6 +604,9 @@ SKIP: { skip "Cannot connect to sandbox master", 3 unless $master_dbh; skip "Cannot connect to sandbox slave", 3 unless $slave_dbh; +PXC_SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); + is_deeply( $ms->get_replication_filters(dbh=>$slave_dbh), { @@ -705,7 +712,7 @@ is( '12346', 'dbh created from DSN table works' ); - +} # ############################################################################ # Invalid recursion methods are caught # ############################################################################ diff --git a/t/lib/Processlist.t b/t/lib/Processlist.t index e22a54dfd..b137e702d 100644 --- a/t/lib/Processlist.t +++ b/t/lib/Processlist.t @@ -326,7 +326,7 @@ is_deeply( { 2 => [ 2, 'root', 'localhost', 'test', 'Query', 0, 'executing', 'query2_2', - Transformers::unix_timestamp('2001-01-01 00:05:08'), + (my $t = Transformers::unix_timestamp('2001-01-01 00:05:08.5')) =~ s/0+$//r, 0.123, Transformers::unix_timestamp('2001-01-01 00:05:08.500'), { executing => 0 }, @@ -544,23 +544,23 @@ is_deeply( { 1 => [ 1, 'root', 'localhost', 'test', 'Query', 1, 'Locked', 'query1', - Transformers::unix_timestamp('2011-01-01 00:00:09'), # START - 0.5, # ETIME - Transformers::unix_timestamp('2011-01-01 00:00:10.5'), # FSEEN + ($t = Transformers::unix_timestamp('2011-01-01 00:00:09.5')) =~ s/0+$//r, # START + 0.5, # ETIME + Transformers::unix_timestamp('2011-01-01 00:00:10.5'), # FSEEN { Locked => 0 }, ], 2 => [ 2, 'root', 'localhost', 'test', 'Query', 2, 'executing', 'query2', - Transformers::unix_timestamp('2011-01-01 00:00:08'), # START - 0.5, # ETIME - Transformers::unix_timestamp('2011-01-01 00:00:10.5'), # FSEEN + ($t = Transformers::unix_timestamp('2011-01-01 00:00:08.5')) =~ s/0+$//r, # START + 0.5, # ETIME + Transformers::unix_timestamp('2011-01-01 00:00:10.5'), # FSEEN { executing => 0 }, ], 3 => [ 3, 'root', 'localhost', 'test', 'Query', 3, 'executing', 'query3', - Transformers::unix_timestamp('2011-01-01 00:00:07'), # START - 0.5, # ETIME - Transformers::unix_timestamp('2011-01-01 00:00:10.5'), # FSEEN + ($t = Transformers::unix_timestamp('2011-01-01 00:00:07.5')) =~ s/0+$//r, # START + 0.5, # ETIME + Transformers::unix_timestamp('2011-01-01 00:00:10.5'), # FSEEN { executing => 0 }, ], }, @@ -624,7 +624,7 @@ is_deeply( db => 'test', host => 'localhost', id => 2, - ts => '2011-01-01T00:00:10', + ts => '2011-01-01T00:00:10.500000', user => 'root' }, { @@ -635,7 +635,7 @@ is_deeply( db => 'test', host => 'localhost', id => 3, - ts => '2011-01-01T00:00:10', + ts => '2011-01-01T00:00:10.500000', user => 'root' } ], "Cxn 2 and 3 finished (issue 1252)", @@ -667,7 +667,7 @@ is_deeply( db => 'test', host => 'localhost', id => 1, - ts => '2011-01-01T00:00:10', + ts => '2011-01-01T00:00:10.500000', user => 'root' } ], "4th call, last finished event (issue 1252)" diff --git a/t/lib/QueryHistory.t b/t/lib/QueryHistory.t index 694c76d41..8b185ad5e 100644 --- a/t/lib/QueryHistory.t +++ b/t/lib/QueryHistory.t @@ -87,7 +87,7 @@ my $res = $dbh->selectall_arrayref( { Slice => {} }); is_deeply( $res, - [ { checksum => '17145033699835028696', + [ { checksum => 'ACBD18DB4CC2F85CEDEF654FCCC4A4D8', sample => 'foo sample', ts_min => '2009-01-01 12:39:12', ts_max => '2009-01-01 13:19:12', @@ -141,7 +141,7 @@ $dbh->do('truncate table test.query_review'); $dbh->do('drop table test.query_review_history'); # mqd says "The table must have at least the following columns:" my $min_tbl = "CREATE TABLE query_review_history ( - checksum BIGINT UNSIGNED NOT NULL, + checksum CHAR(32) NOT NULL, sample TEXT NOT NULL )"; $dbh->do($min_tbl); diff --git a/t/lib/QueryReportFormatter.t b/t/lib/QueryReportFormatter.t index 11e857668..2ad9801e1 100644 --- a/t/lib/QueryReportFormatter.t +++ b/t/lib/QueryReportFormatter.t @@ -1052,15 +1052,7 @@ $qrf = new QueryReportFormatter( Quoter => $q, ExplainAnalyzer => $ex, ); -# Normally, the report subs will make their own ReportFormatter but -# that package isn't visible to QueryReportFormatter right now so we -# make ReportFormatters and pass them in. Since ReporFormatters can't -# be shared, we can only test one subreport at a time, else the -# prepared statements subreport will reuse/reprint stuff from the -# profile subreport. And the line width is 82 because that's the new -# default to accommodate the EXPLAIN sparkline (issue 1141). -my $report = new ReportFormatter(line_width=>82); -$qrf->{formatter} = $report; + ok( no_diff( sub { $qrf->print_reports( diff --git a/t/lib/QueryReview.t b/t/lib/QueryReview.t index 6ac786756..f294ffdd0 100644 --- a/t/lib/QueryReview.t +++ b/t/lib/QueryReview.t @@ -23,7 +23,7 @@ use PerconaTest; my $dp = new DSNParser(opts=>$dsn_opts); my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); -my $dbh = $sb->get_dbh_for('master', {no_lc=>1}); +my $dbh = $sb->get_dbh_for('master', {no_lc=>1, AutoCommit => 1}); if ( !$dbh ) { plan skip_all => "Cannot connect to sandbox master"; @@ -91,22 +91,22 @@ my $res = $dbh->selectall_arrayref( { Slice => {} }); is_deeply( $res, - [ { checksum => '4222630712410165197', + [ { checksum => '3E4FB43148C4B07CD4CD74934382A184', + last_seen => '2007-12-18 11:49:07', + first_seen => '2005-12-19 16:56:31' + }, + { checksum => '538CA093E701E0CBA20C29AF174CE545', + last_seen => '2007-12-18 11:49:30', + first_seen => '2007-12-18 11:48:27' + }, + { checksum => 'A853B50CDEB4866B3A99CC42AEDCCFCD', last_seen => '2007-10-15 21:45:10', first_seen => '2007-10-15 21:45:10' }, - { checksum => '9186595214868493422', + { checksum => 'AE9D6BB6AF470B997F7D57ACDD8A346E', last_seen => '2009-01-01 00:00:00', first_seen => '2009-01-01 00:00:00' }, - { checksum => '11676753765851784517', - last_seen => '2007-12-18 11:49:30', - first_seen => '2007-12-18 11:48:27' - }, - { checksum => '15334040482108055940', - last_seen => '2007-12-18 11:49:07', - first_seen => '2005-12-19 16:56:31' - } ], 'Updates last_seen' ); @@ -128,7 +128,7 @@ $res = $qv->get_review_info($fp); is_deeply( $res, { - checksum_conv => 'D3A1C1CD468791EE', + checksum_conv => '1C094E0B4F345C8DD3A1C1CD468791EE', first_seen => '2008-12-22 13:13:13', last_seen => '2008-12-22 13:13:13', reviewed_by => undef, diff --git a/t/lib/RowDiff.t b/t/lib/RowDiff.t index c6da90120..e84a3e1c3 100644 --- a/t/lib/RowDiff.t +++ b/t/lib/RowDiff.t @@ -9,7 +9,7 @@ BEGIN { use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); -use Test::More tests => 27; +use Test::More; use MockSync; use RowDiff; @@ -298,7 +298,7 @@ SKIP: { { a => 'a', b => 2, c => 3 }, ), syncer => $s, - tbl_struct => { collation_for => { a => 'utf8_general_ci' } }, + tbl_struct => { collation_for => { a => 'utf8mb4_general_ci' } }, ); is_deeply( $s, @@ -442,6 +442,9 @@ SKIP: { skip 'Cannot connect to sandbox master', 4 unless $master_dbh; skip 'Cannot connect to sandbox slave', 4 unless $slave_dbh; +PXC_SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); + $d = new RowDiff(dbh => $master_dbh); $sb->create_dbs($master_dbh, [qw(test)]); @@ -543,10 +546,10 @@ SKIP: { ], 'one identical row (real DBI sth)', ); - +} +} $sb->wipe_clean($master_dbh); $sb->wipe_clean($slave_dbh); -} ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); -exit; +done_testing; diff --git a/t/lib/SchemaIterator.t b/t/lib/SchemaIterator.t index f97eac623..e5c8765b9 100644 --- a/t/lib/SchemaIterator.t +++ b/t/lib/SchemaIterator.t @@ -169,7 +169,9 @@ SKIP: { # Test simple, unfiltered get_db_itr(). # ######################################################################## test_so( - result => "$out/all-dbs-tbls-$sandbox_version.txt", + result => $sb->is_cluster_mode + ? "$out/all-dbs-tbls-cluster-$sandbox_version.txt" + : "$out/all-dbs-tbls-$sandbox_version.txt", test_name => "Iterate all schema objects with dbh", ); @@ -413,7 +415,9 @@ is( test_so( filters => [qw(-d sakila)], result => $sandbox_version ge '5.1' - ? "$out/resume-from-sakila-payment.txt" + ? ($sandbox_version ge '8.0' + ? "$out/resume-from-sakila-payment-8.0.txt" + : "$out/resume-from-sakila-payment.txt") : "$out/resume-from-sakila-payment-5.0.txt", resume => 'sakila.payment', test_name => "Resume" @@ -423,7 +427,9 @@ test_so( test_so( filters => [qw(-d sakila --ignore-tables sakila.payment)], result => $sandbox_version ge '5.1' - ? "$out/resume-from-ignored-sakila-payment.txt" + ? ($sandbox_version ge '8.0' + ? "$out/resume-from-ignored-sakila-payment-8.0.txt" + : "$out/resume-from-ignored-sakila-payment.txt") : "$out/resume-from-ignored-sakila-payment-5.0.txt", resume => 'sakila.payment', test_name => "Resume from ignored table" diff --git a/t/lib/TableChunker.t b/t/lib/TableChunker.t index 121ebba87..cbf5fc210 100644 --- a/t/lib/TableChunker.t +++ b/t/lib/TableChunker.t @@ -630,6 +630,12 @@ $Data::Dumper::Quotekeys = 0; $sb->load_file('master', 't/lib/samples/issue_941.sql'); +# We use empty SQL mode here, because zero dates do not work with +# the default SQL mode. We do not adjust the tool, because, if users +# have zero or invalid dates, they can adjust SQL mode when using Toolkit. +my $old_sql_mode = ($dbh->selectrow_array('SELECT @@sql_mode'))[0]; +$dbh->do("set sql_mode=''"); + sub test_zero_row { my ( $tbl, $range, $chunks, $zero_chunk ) = @_; $zero_chunk = 1 unless defined $zero_chunk; @@ -840,6 +846,7 @@ is_deeply( "Gets valid min with enough tries" ); +$dbh->do("set sql_mode='$old_sql_mode'"); # ############################################################################# # Test issue 941 + issue 602 diff --git a/t/lib/TableParser.t b/t/lib/TableParser.t index 6ba697e16..f04231d4d 100644 --- a/t/lib/TableParser.t +++ b/t/lib/TableParser.t @@ -753,7 +753,7 @@ SKIP: { # msandbox user does not have GRANT privs. my $root_dbh = DBI->connect( - "DBI:mysql:host=127.0.0.1;port=12345", 'root', 'msandbox', + "DBI:mysql:host=127.0.0.1;port=12345;mysql_ssl=1", 'root', 'msandbox', { PrintError => 0, RaiseError => 1 }); $root_dbh->do(q[CREATE USER 'user'@'%' IDENTIFIED BY '';] ) || die($root_dbh->errstr); diff --git a/t/lib/TableSyncer.t b/t/lib/TableSyncer.t index a75c8822d..bff4aa2e7 100644 --- a/t/lib/TableSyncer.t +++ b/t/lib/TableSyncer.t @@ -497,77 +497,80 @@ is_deeply( # ########################################################################### # Test locking. # ########################################################################### -make_plugins(); +SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); -sync_table( - src => "test.test1", - dst => "test.test2", - lock => 1, -); + make_plugins(); -# The locks should be released. -ok($src_dbh->do('select * from test.test4'), 'Cycle locks released'); + sync_table( + src => "test.test1", + dst => "test.test2", + lock => 1, + ); -sync_table( - src => "test.test1", - dst => "test.test2", - lock => 2, -); + # The locks should be released. + ok($src_dbh->do('select * from test.test4'), 'Cycle locks released'); -# The locks should be released. -ok($src_dbh->do('select * from test.test4'), 'Table locks released'); + sync_table( + src => "test.test1", + dst => "test.test2", + lock => 2, + ); -sync_table( - src => "test.test1", - dst => "test.test2", - lock => 3, -); + # The locks should be released. + ok($src_dbh->do('select * from test.test4'), 'Table locks released'); -ok( - $dbh->do('replace into test.test3 select * from test.test3 limit 0'), - 'Does not lock in level 3 locking' -); + sync_table( + src => "test.test1", + dst => "test.test2", + lock => 3, + ); -eval { - $syncer->lock_and_wait( - src => $src, - dst => $dst, - lock => 3, - lock_level => 3, - replicate => 0, - timeout_ok => 1, - transaction => 0, - wait => 60, + ok( + $dbh->do('replace into test.test3 select * from test.test3 limit 0'), + 'Does not lock in level 3 locking' ); -}; -is($EVAL_ERROR, '', 'Locks in level 3'); - -# See DBI man page. -use POSIX ':signal_h'; -my $mask = POSIX::SigSet->new(SIGALRM); # signals to mask in the handler -my $action = POSIX::SigAction->new( sub { die "maatkit timeout" }, $mask, ); -my $oldaction = POSIX::SigAction->new(); -sigaction( SIGALRM, $action, $oldaction ); - -throws_ok ( - sub { - alarm 1; - $dbh->do('replace into test.test3 select * from test.test3 limit 0'); - }, - qr/maatkit timeout/, - "Level 3 lock NOT released", -); -# Kill the DBHs it in the right order: there's a connection waiting on -# a lock. -$src_dbh->disconnect(); -$dst_dbh->disconnect(); -$src_dbh = $sb->get_dbh_for('master'); -$dst_dbh = $sb->get_dbh_for('slave1'); + eval { + $syncer->lock_and_wait( + src => $src, + dst => $dst, + lock => 3, + lock_level => 3, + replicate => 0, + timeout_ok => 1, + transaction => 0, + wait => 60, + ); + }; + is($EVAL_ERROR, '', 'Locks in level 3'); -$src->{dbh} = $src_dbh; -$dst->{dbh} = $dst_dbh; + # See DBI man page. + use POSIX ':signal_h'; + my $mask = POSIX::SigSet->new(SIGALRM); # signals to mask in the handler + my $action = POSIX::SigAction->new( sub { die "maatkit timeout" }, $mask, ); + my $oldaction = POSIX::SigAction->new(); + sigaction( SIGALRM, $action, $oldaction ); + throws_ok ( + sub { + alarm 1; + $dbh->do('replace into test.test3 select * from test.test3 limit 0'); + }, + qr/maatkit timeout/, + "Level 3 lock NOT released", + ); + + # Kill the DBHs it in the right order: there's a connection waiting on + # a lock. + $src_dbh->disconnect(); + $dst_dbh->disconnect(); + $src_dbh = $sb->get_dbh_for('master'); + $dst_dbh = $sb->get_dbh_for('slave1'); + + $src->{dbh} = $src_dbh; + $dst->{dbh} = $dst_dbh; +} # ########################################################################### # Test TableSyncGroupBy. # ########################################################################### diff --git a/t/lib/Transformers.t b/t/lib/Transformers.t index d38ec60ea..4fbca1d41 100644 --- a/t/lib/Transformers.t +++ b/t/lib/Transformers.t @@ -99,7 +99,7 @@ is(ts(1192412632.5, 1), '2007-10-15T01:43:52.500000', 'ts with microseconds'); # ############################################################################# # make_checksum() tests. # ############################################################################# -is(make_checksum('hello world'), '93CB22BB8F5ACDC3', 'make_checksum'); +is(make_checksum('hello world'), '5EB63BBBE01EEED093CB22BB8F5ACDC3', 'make_checksum'); # ############################################################################# # crc32() tests. diff --git a/t/lib/bash/collect.sh b/t/lib/bash/collect.sh index 6afd98f24..a9b63ae82 100644 --- a/t/lib/bash/collect.sh +++ b/t/lib/bash/collect.sh @@ -16,6 +16,10 @@ source "$LIB_DIR/safeguards.sh" source "$LIB_DIR/alt_cmds.sh" source "$LIB_DIR/collect.sh" +# We need flush tables, otherwise we won't have stable results for opentables tests +CMD_MYSQL="$(_which mysql)" +$CMD_MYSQL --defaults-file=/tmp/12345/my.sandbox.cnf -ss -e 'FLUSH TABLES' + parse_options "$BIN_DIR/pt-stalk" --run-time 1 -- --defaults-file=/tmp/12345/my.sandbox.cnf # Prefix (with path) for the collect files. @@ -68,15 +72,6 @@ cmd_ok \ "grep -q 'error log seems to be .*/mysqld.log' $p-output" \ "Finds MySQL error log" -if [[ "$SANDBOX_VERSION" > "5.0" ]]; then - wait_for_files "$p-log_error" - cmd_ok \ - "grep -qE 'Memory status|Open streams|Begin safemalloc' $p-log_error" \ - "debug" -else - is "1" "1" "SKIP Can't determine MySQL 5.0 error log" -fi - if [ "$(which lsof 2>/dev/null)" ]; then cmd_ok \ "grep -q 'COMMAND[ ]\+PID[ ]\+USER' $p-lsof" \ @@ -126,7 +121,10 @@ for file in $p-*; do empty_files=1 break fi - if [ -z "$(grep -v '^TS ' --max-count 1 $file)" ]; then + # We need additional check here in case if first match + # is empty string. + if [ 0 -eq "$(grep -vc '^TS ' --max-count 1 $file)" ] || + [ 0 -eq "$(grep -vc '^$' --max-count 1 $file)" ]; then empty_files=1 break fi @@ -134,6 +132,37 @@ done is "$empty_files" "0" "No empty files" +# ########################################################################### +# Debug option for mysqladmin is not default now, we will test it separately. +# ########################################################################### + +#Skipping until PT-2242 is fixed +if false; then + parse_options "$BIN_DIR/pt-stalk" --run-time 2 -- --defaults-file=/tmp/12345/my.sandbox.cnf + + rm $PT_TMPDIR/collect/* + + # Prefix (with path) for the collect files. + p="$PT_TMPDIR/collect/2011_12_05" + + CMD_MYSQLADMIN="mysqladmin debug" + # Default collect, no extras like gdb, tcpdump, etc. + collect "$PT_TMPDIR/collect" "2011_12_05" > $p-output 2>&1 + + wait_for_files "$p-hostname" "$p-opentables2" "$p-variables" "$p-df" "$p-innodbstatus2" + + if [[ "$SANDBOX_VERSION" > "5.0" ]]; then + wait_for_files "$p-log_error" + cmd_ok \ + "grep -qE 'Memory status|Open streams|Begin safemalloc' $p-log_error" \ + "debug" + else + is "1" "1" "SKIP Can't determine MySQL 5.0 error log" + fi +else + is "1" "1" "SKIP until PT-2242 is fixed" +fi + # ########################################################################### # Try longer run time. # ########################################################################### diff --git a/t/lib/bash/collect_mysql_info.sh b/t/lib/bash/collect_mysql_info.sh index c25af7e66..f688f82e5 100644 --- a/t/lib/bash/collect_mysql_info.sh +++ b/t/lib/bash/collect_mysql_info.sh @@ -42,9 +42,9 @@ wait file_count=$(ls "$p" | wc -l) if [ "$sys_cnf_file" ]; then - n_files=14 + n_files=18 else - n_files=13 + n_files=17 fi is $file_count $n_files "Creates the correct number of files (without --databases)" diff --git a/t/lib/bash/report_mysql_info.sh b/t/lib/bash/report_mysql_info.sh index 1eda3c209..08e13ed50 100644 --- a/t/lib/bash/report_mysql_info.sh +++ b/t/lib/bash/report_mysql_info.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -plan 44 +plan 46 . "$LIB_DIR/alt_cmds.sh" . "$LIB_DIR/log_warn_die.sh" @@ -231,7 +231,8 @@ is \ echo "INNODB_CMP ACTIVE" >> $PT_TMPDIR/plugins is \ "$(get_plugin_status $PT_TMPDIR/plugins "INNODB_CMP" )" \ - "ACTIVE" + "ACTIVE" \ + "InnoDB compression active" cat < $PT_TMPDIR/plugins binlog ACTIVE STORAGE ENGINE NULL GPL @@ -476,7 +477,7 @@ cat < "$PT_TMPDIR/expected" EOF format_overall_db_stats "$samples/mysql-schema-001.txt" > "$PT_TMPDIR/got" -no_diff "$PT_TMPDIR/got" "$PT_TMPDIR/expected" +no_diff "$PT_TMPDIR/got" "$PT_TMPDIR/expected" "format_overall_db_stats" cat < $PT_TMPDIR/expected @@ -719,7 +720,10 @@ OPT_READ_SAMPLES="" OPT_ALL_DATABASES="" NAME_VAL_LEN=25 report_mysql_summary "$samples/tempdir" | tail -n+3 > "$PT_TMPDIR/got" -no_diff "$PT_TMPDIR/got" "$samples/expected_result_report_summary.txt" +no_diff \ + "$PT_TMPDIR/got" \ + "$samples/expected_result_report_summary.txt" \ + "report_mysql_summary, default result" _NO_FALSE_NEGATIVES="" OPT_SLEEP=10 @@ -753,6 +757,18 @@ no_diff \ "$samples/expected_output_temp007.txt" \ "report_mysql_summary, dir: temp007 (PXC, traditional master)" +report_mysql_summary "$samples/temp_enc008" 2>/dev/null | tail -n+3 > "$PT_TMPDIR/got" +no_diff \ + "$PT_TMPDIR/got" \ + "$samples/expected_output_temp_enc008.txt" \ + "report_mysql_summary, dir: temp_enc008 (libjemalloc, encryption)" + +report_mysql_summary "$samples/temp_enc009" 2>/dev/null | tail -n+3 > "$PT_TMPDIR/got" +no_diff \ + "$PT_TMPDIR/got" \ + "$samples/expected_output_temp_enc009.txt" \ + "report_mysql_summary, dir: temp_enc009 (keyring plugin, MyRocks)" + # ########################################################################### # parse_wsrep_provider_options # ########################################################################### @@ -803,7 +819,6 @@ no_diff \ "Bug 1015590: section_percona_server_features works on 5.1 with innodb_adaptive_checkpoint=none" section_percona_server_features "$samples/percona-server-5.1-variables-martin" > "$PT_TMPDIR/got" -cp "$PT_TMPDIR/got" /tmp/dasgot no_diff \ "$PT_TMPDIR/got" \ "$samples/expected_output_ps-5.1-martin.txt" \ diff --git a/t/lib/bash/report_system_info.sh b/t/lib/bash/report_system_info.sh index 53298a6fc..74037c2ec 100644 --- a/t/lib/bash/report_system_info.sh +++ b/t/lib/bash/report_system_info.sh @@ -768,6 +768,7 @@ cat < "$PT_TMPDIR/expected" Total | 3.9G Free | 1.4G Used | physical = 2.5G, swap allocated = 4.9G, swap used = 0.0, virtual = 2.5G + Shared | 0.0 Buffers | 131.8M Caches | 1.9G Dirty | 60 kB @@ -832,6 +833,7 @@ cat < "$PT_TMPDIR/expected" Total | 1010.5M Free | 784.4M Used | physical = 226.1M, swap allocated = 2.0G, swap used = 0.0, virtual = 226.1M + Shared | 0.0 Buffers | 48.8M Caches | 122.2M Dirty | 152 kB @@ -1316,10 +1318,10 @@ Architecture | CPU = 32-bit, OS = 32-bit Speeds | 2109 Models | AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ # Memory ##################################################### - Total | 499.4M - Virtual | 511.9M - Used | 66.4M - UsedRSS | 17.7M + Total | 499.4M + Virtual | 511.9M + Used | 66.4M + UsedRSS | 17.7M # Mounted Filesystems ######################################## Filesystem Size Used Type Opts Mountpoint /dev/ad0s1a 620M 30% ufs local / @@ -1353,6 +1355,8 @@ Architecture | CPU = 32-bit, OS = 32-bit 0 0 0 58164 339792 0 0 0 0 0 0 0 0 230 107 231 0 9 91 0 0 0 58164 339792 0 0 0 0 0 0 0 0 230 107 229 0 3 97 0 0 0 58164 339792 0 0 0 0 0 0 0 0 231 115 229 0 5 95 +# Memory management ########################################## +Transparent huge pages are enabled. # The End #################################################### EOF report_system_summary "$samples/BSD/freebsd_001" | tail -n +3 > "$PT_TMPDIR/got" @@ -1372,10 +1376,10 @@ Architecture | CPU = 32-bit, OS = 32-bit Models | 1xAMD Athlon(tm) 64 X2 Dual Core Processor 4000+ Caches | # Memory ##################################################### - Total | 127.6M - User | 127.2M - Swap | 64.5M - UsedRSS | 10.6M + Total | 127.6M + User | 127.2M + Swap | 64.5M + UsedRSS | 10.6M # Mounted Filesystems ######################################## Filesystem Size Used Type Opts Mountpoint /dev/sd0e 3.8G 0% yp dev/sd0e 3.8G 17M 3.7G 0% /mnt/usb on /mnt/usb type msdos (local /mnt/usb @@ -1407,6 +1411,8 @@ Architecture | CPU = 32-bit, OS = 32-bit 0 0 0 78564 21364 1208 0 0 0 0 0 0 0 98 806 43 2 9 89 0 0 0 78564 21364 0 0 0 0 0 0 0 0 101 11 9 0 0 100 0 0 0 78564 21364 0 0 0 0 0 0 0 0 101 11 10 0 0 100 +# Memory management ########################################## +Transparent huge pages are enabled. # The End #################################################### EOF report_system_summary "$samples/BSD/netbsd_001" | tail -n +3 > "$PT_TMPDIR/got" @@ -1425,10 +1431,10 @@ Architecture | CPU = 32-bit, OS = 32-bit Speeds | 2111 Models | AMD # Memory ##################################################### - Total | 255.5M - User | 255.5M - Swap | 81.1M - UsedRSS | 5.3M + Total | 255.5M + User | 255.5M + Swap | 81.1M + UsedRSS | 5.3M # Mounted Filesystems ######################################## Filesystem Size Used Type Opts Mountpoint /dev/sd0i 3.8G 0% yp long /mnt/usb @@ -1459,6 +1465,8 @@ Architecture | CPU = 32-bit, OS = 32-bit 1 0 0 7600 191360 9461 0 0 0 0 0 0 0 256 14435 285 6 94 0 0 0 0 7496 191456 1272 0 0 0 0 0 0 0 256 1973 50 2 12 85 0 0 0 7496 191456 11 0 0 0 0 0 0 0 230 23 12 0 0 100 +# Memory management ########################################## +Transparent huge pages are enabled. # The End #################################################### EOF report_system_summary "$samples/BSD/openbsd_001" | tail -n +3 > "$PT_TMPDIR/got" @@ -1482,15 +1490,16 @@ Architecture | CPU = 32-bit, OS = 32-bit Models | 2xIntel(R) Atom(TM) CPU N455 @ 1.66GHz Caches | 2x512 KB # Memory ##################################################### - Total | 2.0G - Free | 477.3M - Used | physical = 1.5G, swap allocated = 2.0G, swap used = 0.0, virtual = 1.5G - Buffers | 194.9M - Caches | 726.8M - Dirty | 144 kB - UsedRSS | 1.1G - Swappiness | 60 - DirtyPolicy | 20, 10 + Total | 2.0G + Free | 477.3M + Used | physical = 1.5G, swap allocated = 2.0G, swap used = 0.0, virtual = 1.5G + Shared | 0.0 + Buffers | 194.9M + Caches | 726.8M + Dirty | 144 kB + UsedRSS | 1.1G + Swappiness | 60 + DirtyPolicy | 20, 10 Locator Size Speed Form Factor Type Type Detail ========= ======== ================= ============= ============= =========== DIMM0 2048 MB 667 MHz (1.5 ns) SODIMM DDR2 Synchronous @@ -1577,6 +1586,8 @@ Unable to collect information 0 0 0 0 0 0 200 200 1 0 99 0 1 0 0 0 0 150 225 225 1 1 95 3 0 0 0 0 0 150 250 250 1 0 99 0 +# Memory management ########################################## +Transparent huge pages are enabled. # The End #################################################### EOF diff --git a/t/lib/samples/JSONReportFormatter/report001.json b/t/lib/samples/JSONReportFormatter/report001.json index 465c2de95..0e857f485 100644 --- a/t/lib/samples/JSONReportFormatter/report001.json +++ b/t/lib/samples/JSONReportFormatter/report001.json @@ -1 +1 @@ -{"classes":[{"ts_max":"2007-10-15 21:43:53","checksum":"82860EDA9A88FCC5","distillate":"SELECT users","ts_min":"2007-10-15 21:43:52","example":{"ts":"2007-10-15 21:43:52","query":"SELECT id FROM users WHERE name='foo'","Query_time":"8.000652"},"query_count":null,"attribute":"fingerprint","metrics":{"Lock_time":{"avg":"0.000155","sum":"0.000310","median":"0.000155","pct":"0.666667","max":"0.000201","pct_95":"0.000201","min":"0.000109","stddev":"0.000065"},"Rows_examined":{"min":"1","stddev":"0","pct_95":"2","max":"2","median":"1","pct":"0","avg":"1","sum":"3"},"user":{"value":"root"},"Query_time":{"median":"4.500667","pct":"0.666667","avg":"4.500667","sum":"9.001334","min":"1.000682","stddev":"4.949726","pct_95":"8.000652","max":"8.000652"},"Rows_sent":{"pct_95":"1","max":"1","min":"1","stddev":"0","sum":"2","avg":"1","pct":"0","median":"1"},"db":{"value":"test3"}},"tables":[{"create":"SHOW CREATE TABLE `test3`.`users`\\G","status":"SHOW TABLE STATUS FROM `test3` LIKE 'users'\\G"}],"fingerprint":"select id from users where name=?","histograms":{"Query_time":[0,0,0,0,0,0,2,0]}},{"ts_max":"2007-10-15 21:43:52","checksum":"1087A32FED3B7EBB","distillate":"INSERT articles","ts_min":"2007-10-15 21:43:52","example":{"ts":"2007-10-15 21:43:52","query":"INSERT IGNORE INTO articles (id, body,)VALUES(3558268,'sample text')","Query_time":"1.001943"},"query_count":null,"attribute":"fingerprint","metrics":{"db":{"value":"test1"},"Rows_sent":{"min":"0","stddev":"0","pct_95":"0","max":"0","median":"0","pct":"0","avg":"0","sum":"0"},"Query_time":{"min":"1.001943","stddev":"0.000000","pct_95":"1.001943","max":"1.001943","pct":"0.333333","median":"1.001943","sum":"1.001943","avg":"1.001943"},"user":{"value":"root"},"Rows_examined":{"median":"0","pct":"0","avg":"0","sum":"0","min":"0","stddev":"0","pct_95":"0","max":"0"},"Lock_time":{"pct":"0.333333","median":"0.000145","sum":"0.000145","avg":"0.000145","min":"0.000145","stddev":"0.000000","pct_95":"0.000145","max":"0.000145"}},"tables":[{"status":"SHOW TABLE STATUS FROM `test1` LIKE 'articles'\\G","create":"SHOW CREATE TABLE `test1`.`articles`\\G"}],"fingerprint":"insert ignore into articles (id, body,)values(?+)","histograms":{"Query_time":[0,0,0,0,0,0,1,0]}}],"global":{"files":null,"query_count":3,"metrics":{"Query_time":{"min":"1.000682","median":"0.992137","stddev":"3.162380","max":"8.000652","pct_95":"7.700558","sum":"10.003277","avg":"3.334426"},"Rows_sent":{"stddev":"0","median":"0","min":"0","sum":"2","max":"1","pct_95":"0","avg":"0"},"Rows_examined":{"avg":"1","pct_95":"1","max":"2","sum":"3","median":"0","min":"0","stddev":"0"},"Lock_time":{"stddev":"0.000035","min":"0.000109","median":"0.000145","avg":"0.000152","sum":"0.000455","pct_95":"0.000194","max":"0.000201"}},"unique_query_count":2}} +{"classes":[{"ts_max":"2007-10-15 21:43:53","checksum":"56A78B46A896465882860EDA9A88FCC5","distillate":"SELECT users","ts_min":"2007-10-15 21:43:52","example":{"ts":"2007-10-15 21:43:52","query":"SELECT id FROM users WHERE name='foo'","Query_time":"8.000652"},"query_count":null,"attribute":"fingerprint","metrics":{"Lock_time":{"avg":"0.000155","sum":"0.000310","median":"0.000155","pct":"0.666667","max":"0.000201","pct_95":"0.000201","min":"0.000109","stddev":"0.000065"},"Rows_examined":{"min":"1","stddev":"0","pct_95":"2","max":"2","median":"1","pct":"0","avg":"1","sum":"3"},"user":{"value":"root"},"Query_time":{"median":"4.500667","pct":"0.666667","avg":"4.500667","sum":"9.001334","min":"1.000682","stddev":"4.949726","pct_95":"8.000652","max":"8.000652"},"Rows_sent":{"pct_95":"1","max":"1","min":"1","stddev":"0","sum":"2","avg":"1","pct":"0","median":"1"},"db":{"value":"test3"}},"tables":[{"create":"SHOW CREATE TABLE `test3`.`users`\\G","status":"SHOW TABLE STATUS FROM `test3` LIKE 'users'\\G"}],"fingerprint":"select id from users where name=?","histograms":{"Query_time":[0,0,0,0,0,0,2,0]}},{"ts_max":"2007-10-15 21:43:52","checksum":"54D5D9FB1337BF6B1087A32FED3B7EBB","distillate":"INSERT articles","ts_min":"2007-10-15 21:43:52","example":{"ts":"2007-10-15 21:43:52","query":"INSERT IGNORE INTO articles (id, body,)VALUES(3558268,'sample text')","Query_time":"1.001943"},"query_count":null,"attribute":"fingerprint","metrics":{"db":{"value":"test1"},"Rows_sent":{"min":"0","stddev":"0","pct_95":"0","max":"0","median":"0","pct":"0","avg":"0","sum":"0"},"Query_time":{"min":"1.001943","stddev":"0.000000","pct_95":"1.001943","max":"1.001943","pct":"0.333333","median":"1.001943","sum":"1.001943","avg":"1.001943"},"user":{"value":"root"},"Rows_examined":{"median":"0","pct":"0","avg":"0","sum":"0","min":"0","stddev":"0","pct_95":"0","max":"0"},"Lock_time":{"pct":"0.333333","median":"0.000145","sum":"0.000145","avg":"0.000145","min":"0.000145","stddev":"0.000000","pct_95":"0.000145","max":"0.000145"}},"tables":[{"status":"SHOW TABLE STATUS FROM `test1` LIKE 'articles'\\G","create":"SHOW CREATE TABLE `test1`.`articles`\\G"}],"fingerprint":"insert ignore into articles (id, body,)values(?+)","histograms":{"Query_time":[0,0,0,0,0,0,1,0]}}],"global":{"files":null,"query_count":3,"metrics":{"Query_time":{"min":"1.000682","median":"0.992137","stddev":"3.162380","max":"8.000652","pct_95":"7.700558","sum":"10.003277","avg":"3.334426"},"Rows_sent":{"stddev":"0","median":"0","min":"0","sum":"2","max":"1","pct_95":"0","avg":"0"},"Rows_examined":{"avg":"1","pct_95":"1","max":"2","sum":"3","median":"0","min":"0","stddev":"0"},"Lock_time":{"stddev":"0.000035","min":"0.000109","median":"0.000145","avg":"0.000152","sum":"0.000455","pct_95":"0.000194","max":"0.000201"}},"unique_query_count":2}} diff --git a/t/lib/samples/QueryReportFormatter/report001.txt b/t/lib/samples/QueryReportFormatter/report001.txt index ceb1cfc09..8466b1c81 100644 --- a/t/lib/samples/QueryReportFormatter/report001.txt +++ b/t/lib/samples/QueryReportFormatter/report001.txt @@ -6,7 +6,7 @@ # Exec time 1s 1s 1s 1s 1s 0 1s # Lock time 1ms 1ms 1ms 1ms 1ms 0 1ms -# Query 1: 0 QPS, 0x concurrency, ID 0x5796997451B1FA1D at byte 123 ______ +# Query 1: 0 QPS, 0x concurrency, ID 0x1E49D897CED25CB05796997451B1FA1D at byte 123 # Scores: V/M = 0.00 # Time range: all events occurred at 2007-10-15 21:43:52 # Attribute pct total min max avg 95% stddev median @@ -34,6 +34,6 @@ select col from tbl where id=42\G # Profile -# Rank Query ID Response time Calls R/Call V/M Item -# ==== ================== ============= ===== ====== ===== ========== -# 1 0x5796997451B1FA1D 1.0007 100.0% 1 1.0007 0.00 SELECT tbl +# Rank Query ID Response time Calls R/Call V/M +# ==== =================================== ============= ===== ====== ==== +# 1 0x1E49D897CED25CB05796997451B1FA1D 1.0007 100.0% 1 1.0007 0.00 SELECT tbl diff --git a/t/lib/samples/QueryReportFormatter/report002.txt b/t/lib/samples/QueryReportFormatter/report002.txt index 193d5acda..89686d4ba 100644 --- a/t/lib/samples/QueryReportFormatter/report002.txt +++ b/t/lib/samples/QueryReportFormatter/report002.txt @@ -1,5 +1,5 @@ -# Query 1: 0 QPS, 0x concurrency, ID 0x3F79759E7FA2F117 at byte 1106 _____ +# Query 1: 0 QPS, 0x concurrency, ID 0x53704700F9CECAAF3F79759E7FA2F117 at byte 1106 # Scores: V/M = 0.00 # Time range: all events occurred at 2009-12-08 09:23:49.637892 # Attribute pct total min max avg 95% stddev median @@ -29,7 +29,7 @@ EXECUTE SELECT i FROM d.t WHERE i="3"\G # EXPLAIN /*!50100 PARTITIONS*/ SELECT i FROM d.t WHERE i="3"\G -# Query 2: 0 QPS, 0x concurrency, ID 0xAA8E9FA785927259 at byte 0 ________ +# Query 2: 0 QPS, 0x concurrency, ID 0xC29D79D8CB57E235AA8E9FA785927259 at byte 0 # Scores: V/M = 0.00 # Time range: all events occurred at 2009-12-08 09:23:49.637394 # Attribute pct total min max avg 95% stddev median @@ -60,6 +60,6 @@ PREPARE SELECT i FROM d.t WHERE i=?\G SELECT i FROM d.t WHERE i=?\G # Prepared statements -# Rank Query ID PREP PREP Response EXEC EXEC Response Item -# ==== ================== ==== ============= ==== ============= ========== -# 1 0x3F79759E7FA2F117 1 0.0003 0.9% 1 0.0303 99.1% SELECT d.t +# Rank Query ID PREP PREP Response EXEC EXEC Res +# ==== ================================== ==== ============= ==== ======== +# 1 0x53704700F9CECAAF3F79759E7FA2F117 1 0.0003 0.9% 1 0.0303 99.1% SELECT d.t diff --git a/t/lib/samples/QueryReportFormatter/report003.txt b/t/lib/samples/QueryReportFormatter/report003.txt index c87a08814..1bb081cc6 100644 --- a/t/lib/samples/QueryReportFormatter/report003.txt +++ b/t/lib/samples/QueryReportFormatter/report003.txt @@ -1,10 +1,10 @@ # Profile -# Rank Query ID Response time Calls R/Call V/M Item -# ==== ================== ============= ===== ====== ===== ========== -# 1 0x5796997451B1FA1D 1.0007 100.0% 1 1.0007 0.00 SELECT tbl +# Rank Query ID Response time Calls R/Call V/M +# ==== =================================== ============= ===== ====== ==== +# 1 0x1E49D897CED25CB05796997451B1FA1D 1.0007 100.0% 1 1.0007 0.00 SELECT tbl -# Query 1: 0 QPS, 0x concurrency, ID 0x5796997451B1FA1D at byte 123 ______ +# Query 1: 0 QPS, 0x concurrency, ID 0x1E49D897CED25CB05796997451B1FA1D at byte 123 # Scores: V/M = 0.00 # Time range: all events occurred at 2007-10-15 21:43:52 # Attribute pct total min max avg 95% stddev median diff --git a/t/lib/samples/QueryReportFormatter/report004.txt b/t/lib/samples/QueryReportFormatter/report004.txt index fadc68387..e326c58ce 100644 --- a/t/lib/samples/QueryReportFormatter/report004.txt +++ b/t/lib/samples/QueryReportFormatter/report004.txt @@ -1,6 +1,6 @@ # Profile -# Rank Query ID Response time Calls R/Call V/M Item -# ==== ================== ============= ===== ====== ===== ========== -# 1 0xAECF4CA2310AC9E2 1.0303 97.1% 1 1.0303 0.00 UPDATE foo -# MISC 0xMISC 0.0306 2.9% 2 0.0153 0.0 <2 ITEMS> +# Rank Query ID Response time Calls R/Call V/M +# ==== =================================== ============= ===== ====== ==== +# 1 0xBAA47CE27F8878DBAECF4CA2310AC9E2 1.0303 97.1% 1 1.0303 0.00 UPDATE foo +# MISC 0xMISC 0.0306 2.9% 2 0.0153 0.0 <2 ITEMS> diff --git a/t/lib/samples/QueryReportFormatter/report005.txt b/t/lib/samples/QueryReportFormatter/report005.txt index 502c32b98..a200861be 100644 --- a/t/lib/samples/QueryReportFormatter/report005.txt +++ b/t/lib/samples/QueryReportFormatter/report005.txt @@ -1,5 +1,5 @@ # Profile -# Rank Query ID Response time Calls R/Call V/M Item -# ==== ================== ============== ===== ====== ===== ======== -# 1 0xCB5621E548E5497F 17.5000 100.0% 4 4.3750 2.23 SELECT t +# Rank Query ID Response time Calls R/Call V/M +# ==== =================================== ============== ===== ====== === +# 1 0x5F47280C0D7DCF5CCB5621E548E5497F 17.5000 100.0% 4 4.3750 2.23 SELECT t diff --git a/t/lib/samples/QueryReportFormatter/report007.txt b/t/lib/samples/QueryReportFormatter/report007.txt index 932ec60c0..c28859d07 100644 --- a/t/lib/samples/QueryReportFormatter/report007.txt +++ b/t/lib/samples/QueryReportFormatter/report007.txt @@ -1,4 +1,4 @@ -# Query 1: 2 QPS, 9.00x concurrency, ID 0x82860EDA9A88FCC5 at byte 1 _____ +# Query 1: 2 QPS, 9.00x concurrency, ID 0x56A78B46A896465882860EDA9A88FCC5 at byte 1 # This item is included in the report because it matches --limit. # Scores: V/M = 5.44 # Time range: 2007-10-15 21:43:52 to 21:43:53 diff --git a/t/lib/samples/QueryReportFormatter/report009.txt b/t/lib/samples/QueryReportFormatter/report009.txt index e208c406d..11b0a0e42 100644 --- a/t/lib/samples/QueryReportFormatter/report009.txt +++ b/t/lib/samples/QueryReportFormatter/report009.txt @@ -1,4 +1,4 @@ -# Query 1: 0 QPS, 0x concurrency, ID 0x5D51E5F01B88B79E at byte 0 ________ +# Query 1: 0 QPS, 0x concurrency, ID 0x7417646A9FE969365D51E5F01B88B79E at byte 0 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: all events occurred at 2009-04-12 11:00:13.118191 diff --git a/t/lib/samples/QueryReportFormatter/report010.txt b/t/lib/samples/QueryReportFormatter/report010.txt index 319343f55..902fb0302 100644 --- a/t/lib/samples/QueryReportFormatter/report010.txt +++ b/t/lib/samples/QueryReportFormatter/report010.txt @@ -1,4 +1,4 @@ -# Query 1: 0 QPS, 0x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 ________ +# Query 1: 0 QPS, 0x concurrency, ID 0x56A78B46A896465882860EDA9A88FCC5 at byte 0 # This item is included in the report because it matches --limit. # Scores: V/M = 0.00 # Time range: all events occurred at 2007-10-15 21:43:52 diff --git a/t/lib/samples/QueryReportFormatter/report011.txt b/t/lib/samples/QueryReportFormatter/report011.txt index 02d54b0ca..c48768a6a 100644 --- a/t/lib/samples/QueryReportFormatter/report011.txt +++ b/t/lib/samples/QueryReportFormatter/report011.txt @@ -1,4 +1,4 @@ -# Query 1: 0.67 QPS, 1x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 _____ +# Query 1: 0.67 QPS, 1x concurrency, ID 0x56A78B46A896465882860EDA9A88FCC5 at byte 0 # This item is included in the report because it matches --limit. # Scores: V/M = 0.33 # Time range: 2007-10-15 21:43:52 to 21:43:55 diff --git a/t/lib/samples/QueryReportFormatter/report012.txt b/t/lib/samples/QueryReportFormatter/report012.txt index 330f8d68e..48ee7f585 100644 --- a/t/lib/samples/QueryReportFormatter/report012.txt +++ b/t/lib/samples/QueryReportFormatter/report012.txt @@ -1,4 +1,4 @@ -# Query 1: 1 QPS, 2x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 ________ +# Query 1: 1 QPS, 2x concurrency, ID 0x56A78B46A896465882860EDA9A88FCC5 at byte 0 # This item is included in the report because it matches --limit. # Scores: V/M = 0.30 # Time range: 2007-10-15 21:43:52 to 21:43:55 diff --git a/t/lib/samples/QueryReportFormatter/report013.txt b/t/lib/samples/QueryReportFormatter/report013.txt index 3ff99d583..99533c68b 100644 --- a/t/lib/samples/QueryReportFormatter/report013.txt +++ b/t/lib/samples/QueryReportFormatter/report013.txt @@ -1,4 +1,4 @@ -# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________ +# Item 1: 0 QPS, 0x concurrency, ID 0xACBD18DB4CC2F85CEDEF654FCCC4A4D8 at byte 0 # Scores: V/M = 0.00 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= diff --git a/t/lib/samples/QueryReportFormatter/report014.txt b/t/lib/samples/QueryReportFormatter/report014.txt index 782b0010e..66bf871e9 100644 --- a/t/lib/samples/QueryReportFormatter/report014.txt +++ b/t/lib/samples/QueryReportFormatter/report014.txt @@ -1,4 +1,4 @@ -# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________ +# Item 1: 0 QPS, 0x concurrency, ID 0xACBD18DB4CC2F85CEDEF654FCCC4A4D8 at byte 0 # Scores: V/M = 0.00 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= diff --git a/t/lib/samples/QueryReportFormatter/report014_no_trim.txt b/t/lib/samples/QueryReportFormatter/report014_no_trim.txt index 9044b1ae1..90f10eb61 100644 --- a/t/lib/samples/QueryReportFormatter/report014_no_trim.txt +++ b/t/lib/samples/QueryReportFormatter/report014_no_trim.txt @@ -1,4 +1,4 @@ -# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________ +# Item 1: 0 QPS, 0x concurrency, ID 0xACBD18DB4CC2F85CEDEF654FCCC4A4D8 at byte 0 # Scores: V/M = 0.00 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= diff --git a/t/lib/samples/QueryReportFormatter/report014_trim_12.txt b/t/lib/samples/QueryReportFormatter/report014_trim_12.txt index d66604cbb..c5784c5e1 100644 --- a/t/lib/samples/QueryReportFormatter/report014_trim_12.txt +++ b/t/lib/samples/QueryReportFormatter/report014_trim_12.txt @@ -1,4 +1,4 @@ -# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________ +# Item 1: 0 QPS, 0x concurrency, ID 0xACBD18DB4CC2F85CEDEF654FCCC4A4D8 at byte 0 # Scores: V/M = 0.00 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= diff --git a/t/lib/samples/QueryReportFormatter/report015.txt b/t/lib/samples/QueryReportFormatter/report015.txt index cb5591590..c7dc3d89d 100644 --- a/t/lib/samples/QueryReportFormatter/report015.txt +++ b/t/lib/samples/QueryReportFormatter/report015.txt @@ -1,4 +1,4 @@ -# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________ +# Item 1: 0 QPS, 0x concurrency, ID 0xACBD18DB4CC2F85CEDEF654FCCC4A4D8 at byte 0 # Scores: V/M = 0.00 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= diff --git a/t/lib/samples/QueryReportFormatter/report016.txt b/t/lib/samples/QueryReportFormatter/report016.txt index 64434e389..41f2dd19b 100644 --- a/t/lib/samples/QueryReportFormatter/report016.txt +++ b/t/lib/samples/QueryReportFormatter/report016.txt @@ -1,4 +1,4 @@ -# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________ +# Item 1: 0 QPS, 0x concurrency, ID 0xACBD18DB4CC2F85CEDEF654FCCC4A4D8 at byte 0 # Scores: V/M = 0.00 # Attribute pct total min max avg 95% stddev median # ============ === ======= ======= ======= ======= ======= ======= ======= diff --git a/t/lib/samples/QueryReportFormatter/report024.txt b/t/lib/samples/QueryReportFormatter/report024.txt index 2b1b7d80e..9f267fc5b 100644 --- a/t/lib/samples/QueryReportFormatter/report024.txt +++ b/t/lib/samples/QueryReportFormatter/report024.txt @@ -1,4 +1,4 @@ -# Query 0: 0 QPS, 0x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 ________ +# Query 0: 0 QPS, 0x concurrency, ID 0x56A78B46A896465882860EDA9A88FCC5 at byte 0 # Scores: V/M = 0.00 # Time range: all events occurred at 2007-10-15 21:43:52 # Attribute pct total min max avg 95% stddev median diff --git a/t/lib/samples/QueryReportFormatter/report030.txt b/t/lib/samples/QueryReportFormatter/report030.txt index c373570ce..e7a3a9451 100644 --- a/t/lib/samples/QueryReportFormatter/report030.txt +++ b/t/lib/samples/QueryReportFormatter/report030.txt @@ -1,5 +1,5 @@ # Prepared statements -# Rank Query ID PREP PREP Response EXEC EXEC Response Item -# ==== ================== ==== ============= ==== ============= ========== -# 1 0xAA8E9FA785927259 1 0.0003 100.0% 0 0.0000 0.0% SELECT d.t +# Rank Query ID PREP PREP Response EXEC EXEC Res +# ==== ================================== ==== ============= ==== ======== +# 1 0xC29D79D8CB57E235AA8E9FA785927259 1 0.0003 100.0% 0 0.0000 0.0% SELECT d.t diff --git a/t/lib/samples/QueryReportFormatter/table.sql b/t/lib/samples/QueryReportFormatter/table.sql index ffe6c7f24..72f5a63cd 100644 --- a/t/lib/samples/QueryReportFormatter/table.sql +++ b/t/lib/samples/QueryReportFormatter/table.sql @@ -6,7 +6,7 @@ CREATE TABLE t ( v varchar(16) ) engine=InnoDB; insert into qrf.t values - (null, 'hello'), - (null, ','), - (null, 'world'), - (null, '!'); + (1, 'hello'), + (2, ','), + (3, 'world'), + (4, '!'); diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-8.0.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-8.0.txt index 76d6c786b..efc6f1cbd 100644 --- a/t/lib/samples/SchemaIterator/all-dbs-tbls-8.0.txt +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-8.0.txt @@ -1,179 +1,236 @@ mysql.columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', - PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Column privileges' + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`User`,`Db`,`Table_name`,`Column_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Column privileges' mysql.component CREATE TABLE `component` ( - `component_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `component_group_id` int(10) unsigned NOT NULL, + `component_id` int unsigned NOT NULL AUTO_INCREMENT, + `component_group_id` int unsigned NOT NULL, `component_urn` text NOT NULL, PRIMARY KEY (`component_id`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Components' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='Components' mysql.db CREATE TABLE `db` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Event_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - PRIMARY KEY (`Host`,`Db`,`User`), + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`User`,`Db`), KEY `User` (`User`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Database privileges' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Database privileges' mysql.default_roles CREATE TABLE `default_roles` ( - `HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `DEFAULT_ROLE_HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '%', - `DEFAULT_ROLE_USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `DEFAULT_ROLE_HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '%', + `DEFAULT_ROLE_USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', PRIMARY KEY (`HOST`,`USER`,`DEFAULT_ROLE_HOST`,`DEFAULT_ROLE_USER`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Default roles' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Default roles' mysql.engine_cost CREATE TABLE `engine_cost` ( `engine_name` varchar(64) NOT NULL, - `device_type` int(11) NOT NULL, + `device_type` int NOT NULL, `cost_name` varchar(64) NOT NULL, `cost_value` float DEFAULT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `comment` varchar(1024) DEFAULT NULL, `default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8mb3'io_block_read_cost' then 1.0 when _utf8mb3'memory_block_read_cost' then 0.25 else NULL end)) VIRTUAL, PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC mysql.func CREATE TABLE `func` ( - `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `ret` tinyint(1) NOT NULL DEFAULT '0', - `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', - `type` enum('function','aggregate') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, + `name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `ret` tinyint NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, PRIMARY KEY (`name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='User defined functions' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='User defined functions' mysql.global_grants CREATE TABLE `global_grants` ( - `USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `PRIV` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', - `WITH_GRANT_OPTION` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', + `USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `PRIV` char(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `WITH_GRANT_OPTION` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', PRIMARY KEY (`USER`,`HOST`,`PRIV`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Extended global grants' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Extended global grants' mysql.help_category CREATE TABLE `help_category` ( - `help_category_id` smallint(5) unsigned NOT NULL, + `help_category_id` smallint unsigned NOT NULL, `name` char(64) NOT NULL, - `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `parent_category_id` smallint unsigned DEFAULT NULL, `url` text NOT NULL, PRIMARY KEY (`help_category_id`), UNIQUE KEY `name` (`name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help categories' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='help categories' mysql.help_keyword CREATE TABLE `help_keyword` ( - `help_keyword_id` int(10) unsigned NOT NULL, + `help_keyword_id` int unsigned NOT NULL, `name` char(64) NOT NULL, PRIMARY KEY (`help_keyword_id`), UNIQUE KEY `name` (`name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help keywords' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='help keywords' mysql.help_relation CREATE TABLE `help_relation` ( - `help_topic_id` int(10) unsigned NOT NULL, - `help_keyword_id` int(10) unsigned NOT NULL, + `help_topic_id` int unsigned NOT NULL, + `help_keyword_id` int unsigned NOT NULL, PRIMARY KEY (`help_keyword_id`,`help_topic_id`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='keyword-topic relation' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='keyword-topic relation' mysql.help_topic CREATE TABLE `help_topic` ( - `help_topic_id` int(10) unsigned NOT NULL, + `help_topic_id` int unsigned NOT NULL, `name` char(64) NOT NULL, - `help_category_id` smallint(5) unsigned NOT NULL, + `help_category_id` smallint unsigned NOT NULL, `description` text NOT NULL, `example` text NOT NULL, `url` text NOT NULL, PRIMARY KEY (`help_topic_id`), UNIQUE KEY `name` (`name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help topics' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='help topics' + +mysql.ndb_binlog_index +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint unsigned NOT NULL, + `inserts` int unsigned NOT NULL, + `updates` int unsigned NOT NULL, + `deletes` int unsigned NOT NULL, + `schemaops` int unsigned NOT NULL, + `orig_server_id` int unsigned NOT NULL, + `orig_epoch` bigint unsigned NOT NULL, + `gci` int unsigned NOT NULL, + `next_position` bigint unsigned NOT NULL, + `next_file` varchar(255) NOT NULL, + PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC mysql.password_history CREATE TABLE `password_history` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', `Password_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), - `Password` text COLLATE utf8_bin, + `Password` text COLLATE utf8mb3_bin, PRIMARY KEY (`Host`,`User`,`Password_timestamp` DESC) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Password history for user accounts' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Password history for user accounts' mysql.plugin CREATE TABLE `plugin` ( `name` varchar(64) NOT NULL DEFAULT '', `dl` varchar(128) NOT NULL DEFAULT '', PRIMARY KEY (`name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL plugins' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='MySQL plugins' mysql.procs_priv CREATE TABLE `procs_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Routine_name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', - `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, - `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '', - `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8mb3_bin NOT NULL, + `Grantor` varchar(288) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + PRIMARY KEY (`Host`,`User`,`Db`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Procedure privileges' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Procedure privileges' mysql.proxies_priv CREATE TABLE `proxies_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Proxied_user` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Proxied_host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Proxied_user` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', `With_grant` tinyint(1) NOT NULL DEFAULT '0', - `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` varchar(288) COLLATE utf8mb3_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), KEY `Grantor` (`Grantor`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='User proxy privileges' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='User proxy privileges' + +mysql.replication_asynchronous_connection_failover +CREATE TABLE `replication_asynchronous_connection_failover` ( + `Channel_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'The replication channel name that connects source and replica.', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The source hostname that the replica will attempt to switch over the replication connection to in case of a failure.', + `Port` int unsigned NOT NULL COMMENT 'The source port that the replica will attempt to switch over the replication connection to in case of a failure.', + `Network_namespace` char(64) NOT NULL COMMENT 'The source network namespace that the replica will attempt to switch over the replication connection to in case of a failure. If its value is empty, connections use the default (global) namespace.', + `Weight` tinyint unsigned NOT NULL COMMENT 'The order in which the replica shall try to switch the connection over to when there are failures. Weight can be set to a number between 1 and 100, where 100 is the highest weight and 1 the lowest.', + `Managed_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'The name of the group which this server belongs to.', + PRIMARY KEY (`Channel_name`,`Host`,`Port`,`Network_namespace`,`Managed_name`), + KEY `Channel_name` (`Channel_name`,`Managed_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The source configuration details' + +mysql.replication_asynchronous_connection_failover_managed +CREATE TABLE `replication_asynchronous_connection_failover_managed` ( + `Channel_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'The replication channel name that connects source and replica.', + `Managed_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'The name of the source which needs to be managed.', + `Managed_type` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'Determines the managed type.', + `Configuration` json DEFAULT NULL COMMENT 'The data to help manage group. For Managed_type = GroupReplication, Configuration value should contain {"Primary_weight": 80, "Secondary_weight": 60}, so that it assigns weight=80 to PRIMARY of the group, and weight=60 for rest of the members in mysql.replication_asynchronous_connection_failover table.', + PRIMARY KEY (`Channel_name`,`Managed_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The managed source configuration details' + +mysql.replication_group_configuration_version +CREATE TABLE `replication_group_configuration_version` ( + `name` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The configuration name.', + `version` bigint unsigned NOT NULL COMMENT 'The version of the configuration name.', + PRIMARY KEY (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The group configuration version.' + +mysql.replication_group_member_actions +CREATE TABLE `replication_group_member_actions` ( + `name` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The action name.', + `event` char(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The event that will trigger the action.', + `enabled` tinyint(1) NOT NULL COMMENT 'Whether the action is enabled.', + `type` char(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The action type.', + `priority` tinyint unsigned NOT NULL COMMENT 'The order on which the action will be run, value between 1 and 100, lower values first.', + `error_handling` char(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'On errors during the action will be handled: IGNORE, CRITICAL.', + PRIMARY KEY (`name`,`event`), + KEY `event` (`event`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The member actions configuration.' mysql.role_edges CREATE TABLE `role_edges` ( - `FROM_HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `FROM_USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `TO_HOST` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `TO_USER` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `WITH_ADMIN_OPTION` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', + `FROM_HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `FROM_USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `TO_HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `TO_USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `WITH_ADMIN_OPTION` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', PRIMARY KEY (`FROM_HOST`,`FROM_USER`,`TO_HOST`,`TO_USER`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Role hierarchy and role grants' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Role hierarchy and role grants' mysql.server_cost CREATE TABLE `server_cost` ( @@ -183,209 +240,210 @@ CREATE TABLE `server_cost` ( `comment` varchar(1024) DEFAULT NULL, `default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8mb3'disk_temptable_create_cost' then 20.0 when _utf8mb3'disk_temptable_row_cost' then 0.5 when _utf8mb3'key_compare_cost' then 0.05 when _utf8mb3'memory_temptable_create_cost' then 1.0 when _utf8mb3'memory_temptable_row_cost' then 0.1 when _utf8mb3'row_evaluate_cost' then 0.1 else NULL end)) VIRTUAL, PRIMARY KEY (`cost_name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC mysql.servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', - `Host` char(64) NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', `Username` char(64) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', - `Port` int(4) NOT NULL DEFAULT '0', + `Port` int NOT NULL DEFAULT '0', `Socket` char(64) NOT NULL DEFAULT '', `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL Foreign Servers table' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='MySQL Foreign Servers table' mysql.tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Grantor` varchar(288) COLLATE utf8mb3_bin NOT NULL DEFAULT '', `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', - `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', - PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`User`,`Db`,`Table_name`), KEY `Grantor` (`Grantor`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Table privileges' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Table privileges' mysql.time_zone CREATE TABLE `time_zone` ( - `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `Use_leap_seconds` enum('Y','N') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', + `Time_zone_id` int unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', PRIMARY KEY (`Time_zone_id`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zones' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zones' mysql.time_zone_leap_second CREATE TABLE `time_zone_leap_second` ( - `Transition_time` bigint(20) NOT NULL, - `Correction` int(11) NOT NULL, + `Transition_time` bigint NOT NULL, + `Correction` int NOT NULL, PRIMARY KEY (`Transition_time`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Leap seconds information for time zones' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Leap seconds information for time zones' mysql.time_zone_name CREATE TABLE `time_zone_name` ( `Name` char(64) NOT NULL, - `Time_zone_id` int(10) unsigned NOT NULL, + `Time_zone_id` int unsigned NOT NULL, PRIMARY KEY (`Name`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone names' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zone names' mysql.time_zone_transition CREATE TABLE `time_zone_transition` ( - `Time_zone_id` int(10) unsigned NOT NULL, - `Transition_time` bigint(20) NOT NULL, - `Transition_type_id` int(10) unsigned NOT NULL, + `Time_zone_id` int unsigned NOT NULL, + `Transition_time` bigint NOT NULL, + `Transition_type_id` int unsigned NOT NULL, PRIMARY KEY (`Time_zone_id`,`Transition_time`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transitions' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zone transitions' mysql.time_zone_transition_type CREATE TABLE `time_zone_transition_type` ( - `Time_zone_id` int(10) unsigned NOT NULL, - `Transition_type_id` int(10) unsigned NOT NULL, - `Offset` int(11) NOT NULL DEFAULT '0', - `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Time_zone_id` int unsigned NOT NULL, + `Transition_type_id` int unsigned NOT NULL, + `Offset` int NOT NULL DEFAULT '0', + `Is_DST` tinyint unsigned NOT NULL DEFAULT '0', `Abbreviation` char(8) NOT NULL DEFAULT '', PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transition types' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zone transition types' mysql.user CREATE TABLE `user` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Reload_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Process_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `File_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Show_db_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Super_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_user_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Event_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, - `max_questions` int(11) unsigned NOT NULL DEFAULT '0', - `max_updates` int(11) unsigned NOT NULL DEFAULT '0', - `max_connections` int(11) unsigned NOT NULL DEFAULT '0', - `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', - `plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'caching_sha2_password', - `authentication_string` text COLLATE utf8_bin, - `password_expired` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', + `max_questions` int unsigned NOT NULL DEFAULT '0', + `max_updates` int unsigned NOT NULL DEFAULT '0', + `max_connections` int unsigned NOT NULL DEFAULT '0', + `max_user_connections` int unsigned NOT NULL DEFAULT '0', + `plugin` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT 'caching_sha2_password', + `authentication_string` text COLLATE utf8mb3_bin, + `password_expired` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', `password_last_changed` timestamp NULL DEFAULT NULL, - `password_lifetime` smallint(5) unsigned DEFAULT NULL, - `account_locked` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Drop_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Password_reuse_history` smallint(5) unsigned DEFAULT NULL, - `Password_reuse_time` smallint(5) unsigned DEFAULT NULL, - `Password_require_current` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, + `password_lifetime` smallint unsigned DEFAULT NULL, + `account_locked` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_role_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_role_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Password_reuse_history` smallint unsigned DEFAULT NULL, + `Password_reuse_time` smallint unsigned DEFAULT NULL, + `Password_require_current` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `User_attributes` json DEFAULT NULL, PRIMARY KEY (`Host`,`User`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Users and global privileges' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Users and global privileges' percona_test.checksums CREATE TABLE `checksums` ( `db_tbl` varchar(128) NOT NULL, - `checksum` int(10) unsigned NOT NULL, + `checksum` int unsigned NOT NULL, PRIMARY KEY (`db_tbl`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci percona_test.load_data CREATE TABLE `load_data` ( - `i` int(11) DEFAULT NULL + `i` int DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci percona_test.sentinel CREATE TABLE `sentinel` ( - `id` int(11) NOT NULL, + `id` int NOT NULL, `ping` varchar(64) NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci sakila.actor CREATE TABLE `actor` ( - `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `actor_id` smallint unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`actor_id`), KEY `idx_actor_last_name` (`last_name`) -) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb3 sakila.address CREATE TABLE `address` ( - `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address_id` smallint unsigned NOT NULL AUTO_INCREMENT, `address` varchar(50) NOT NULL, `address2` varchar(50) DEFAULT NULL, `district` varchar(20) NOT NULL, - `city_id` smallint(5) unsigned NOT NULL, + `city_id` smallint unsigned NOT NULL, `postal_code` varchar(10) DEFAULT NULL, `phone` varchar(20) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`address_id`), KEY `idx_fk_city_id` (`city_id`), CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8mb3 sakila.category CREATE TABLE `category` ( - `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `category_id` tinyint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`category_id`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb3 sakila.city CREATE TABLE `city` ( - `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city_id` smallint unsigned NOT NULL AUTO_INCREMENT, `city` varchar(50) NOT NULL, - `country_id` smallint(5) unsigned NOT NULL, + `country_id` smallint unsigned NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`city_id`), KEY `idx_fk_country_id` (`country_id`), CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8mb3 sakila.country CREATE TABLE `country` ( - `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country_id` smallint unsigned NOT NULL AUTO_INCREMENT, `country` varchar(50) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`country_id`) -) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb3 sakila.customer CREATE TABLE `customer` ( - `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, - `store_id` tinyint(3) unsigned NOT NULL, + `customer_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint unsigned NOT NULL, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, `email` varchar(50) DEFAULT NULL, - `address_id` smallint(5) unsigned NOT NULL, + `address_id` smallint unsigned NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '1', `create_date` datetime NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -395,19 +453,19 @@ CREATE TABLE `customer` ( KEY `idx_last_name` (`last_name`), CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8mb3 sakila.film CREATE TABLE `film` ( - `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `description` text, - `release_year` year(4) DEFAULT NULL, - `language_id` tinyint(3) unsigned NOT NULL, - `original_language_id` tinyint(3) unsigned DEFAULT NULL, - `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `release_year` year DEFAULT NULL, + `language_id` tinyint unsigned NOT NULL, + `original_language_id` tinyint unsigned DEFAULT NULL, + `rental_duration` tinyint unsigned NOT NULL DEFAULT '3', `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', - `length` smallint(5) unsigned DEFAULT NULL, + `length` smallint unsigned DEFAULT NULL, `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, @@ -418,66 +476,66 @@ CREATE TABLE `film` ( KEY `idx_fk_original_language_id` (`original_language_id`), CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb3 sakila.film_actor CREATE TABLE `film_actor` ( - `actor_id` smallint(5) unsigned NOT NULL, - `film_id` smallint(5) unsigned NOT NULL, + `actor_id` smallint unsigned NOT NULL, + `film_id` smallint unsigned NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`actor_id`,`film_id`), KEY `idx_fk_film_id` (`film_id`), CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 sakila.film_category CREATE TABLE `film_category` ( - `film_id` smallint(5) unsigned NOT NULL, - `category_id` tinyint(3) unsigned NOT NULL, + `film_id` smallint unsigned NOT NULL, + `category_id` tinyint unsigned NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`film_id`,`category_id`), KEY `fk_film_category_category` (`category_id`), CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE, CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 sakila.film_text CREATE TABLE `film_text` ( - `film_id` smallint(6) NOT NULL, + `film_id` smallint NOT NULL, `title` varchar(255) NOT NULL, `description` text, PRIMARY KEY (`film_id`), FULLTEXT KEY `idx_title_description` (`title`,`description`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 sakila.inventory CREATE TABLE `inventory` ( - `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `film_id` smallint(5) unsigned NOT NULL, - `store_id` tinyint(3) unsigned NOT NULL, + `inventory_id` mediumint unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint unsigned NOT NULL, + `store_id` tinyint unsigned NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`inventory_id`), KEY `idx_fk_film_id` (`film_id`), KEY `idx_store_id_film_id` (`store_id`,`film_id`), CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8mb3 sakila.language CREATE TABLE `language` ( - `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `language_id` tinyint unsigned NOT NULL AUTO_INCREMENT, `name` char(20) NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`language_id`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 sakila.payment CREATE TABLE `payment` ( - `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, - `customer_id` smallint(5) unsigned NOT NULL, - `staff_id` tinyint(3) unsigned NOT NULL, - `rental_id` int(11) DEFAULT NULL, + `payment_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint unsigned NOT NULL, + `staff_id` tinyint unsigned NOT NULL, + `rental_id` int DEFAULT NULL, `amount` decimal(5,2) NOT NULL, `payment_date` datetime NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -488,16 +546,16 @@ CREATE TABLE `payment` ( CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 sakila.rental CREATE TABLE `rental` ( - `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_id` int NOT NULL AUTO_INCREMENT, `rental_date` datetime NOT NULL, - `inventory_id` mediumint(8) unsigned NOT NULL, - `customer_id` smallint(5) unsigned NOT NULL, + `inventory_id` mediumint unsigned NOT NULL, + `customer_id` smallint unsigned NOT NULL, `return_date` datetime DEFAULT NULL, - `staff_id` tinyint(3) unsigned NOT NULL, + `staff_id` tinyint unsigned NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rental_id`), UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), @@ -507,40 +565,40 @@ CREATE TABLE `rental` ( CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 sakila.staff CREATE TABLE `staff` ( - `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `staff_id` tinyint unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, - `address_id` smallint(5) unsigned NOT NULL, + `address_id` smallint unsigned NOT NULL, `picture` blob, `email` varchar(50) DEFAULT NULL, - `store_id` tinyint(3) unsigned NOT NULL, + `store_id` tinyint unsigned NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '1', `username` varchar(16) NOT NULL, - `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `password` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`staff_id`), KEY `idx_fk_store_id` (`store_id`), KEY `idx_fk_address_id` (`address_id`), CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 sakila.store CREATE TABLE `store` ( - `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, - `manager_staff_id` tinyint(3) unsigned NOT NULL, - `address_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint unsigned NOT NULL, + `address_id` smallint unsigned NOT NULL, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`store_id`), UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), KEY `idx_fk_address_id` (`address_id`), CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 sys.sys_config CREATE TABLE `sys_config` ( diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.0.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.0.txt new file mode 100644 index 000000000..809db9009 --- /dev/null +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.0.txt @@ -0,0 +1,473 @@ +mysql.columns_priv +CREATE TABLE `columns_priv` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Table_name` char(64) collate utf8_bin NOT NULL default '', + `Column_name` char(64) collate utf8_bin NOT NULL default '', + `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' + +mysql.db +CREATE TABLE `db` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `References_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' + +mysql.func +CREATE TABLE `func` ( + `name` char(64) collate utf8_bin NOT NULL default '', + `ret` tinyint(1) NOT NULL default '0', + `dl` char(128) collate utf8_bin NOT NULL default '', + `type` enum('function','aggregate') character set utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' + +mysql.help_category +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned default NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories' + +mysql.help_keyword +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords' + +mysql.help_relation +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation' + +mysql.help_topic +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics' + +mysql.host +CREATE TABLE `host` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `References_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' + +mysql.proc +CREATE TABLE `proc` ( + `db` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `name` char(64) NOT NULL default '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL default '', + `language` enum('SQL') NOT NULL default 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL default 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL default 'DEFINER', + `param_list` blob NOT NULL, + `returns` char(64) NOT NULL default '', + `body` longblob NOT NULL, + `definer` char(77) character set utf8 collate utf8_bin NOT NULL default '', + `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL default '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', + `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' + +mysql.procs_priv +CREATE TABLE `procs_priv` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Routine_name` char(64) collate utf8_bin NOT NULL default '', + `Routine_type` enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL, + `Grantor` char(77) collate utf8_bin NOT NULL default '', + `Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '', + `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' + +mysql.tables_priv +CREATE TABLE `tables_priv` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Table_name` char(64) collate utf8_bin NOT NULL default '', + `Grantor` char(77) collate utf8_bin NOT NULL default '', + `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') character set utf8 NOT NULL default '', + `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' + +mysql.time_zone +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL auto_increment, + `Use_leap_seconds` enum('Y','N') NOT NULL default 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones' + +mysql.time_zone_leap_second +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones' + +mysql.time_zone_name +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names' + +mysql.time_zone_transition +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions' + +mysql.time_zone_transition_type +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL default '0', + `Is_DST` tinyint(3) unsigned NOT NULL default '0', + `Abbreviation` char(8) NOT NULL default '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types' + +mysql.user +CREATE TABLE `user` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Password` char(41) character set latin1 collate latin1_bin NOT NULL default '', + `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Reload_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Shutdown_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Process_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `File_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `References_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_db_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Super_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Repl_slave_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Repl_client_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_user_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') character set utf8 NOT NULL default '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL default '0', + `max_updates` int(11) unsigned NOT NULL default '0', + `max_connections` int(11) unsigned NOT NULL default '0', + `max_user_connections` int(11) unsigned NOT NULL default '0', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' + +percona_test.checksums +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +percona_test.load_data +CREATE TABLE `load_data` ( + `i` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +percona_test.sentinel +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +sakila.actor +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL auto_increment, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 + +sakila.address +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL auto_increment, + `address` varchar(50) NOT NULL, + `address2` varchar(50) default NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) default NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 + +sakila.category +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL auto_increment, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 + +sakila.city +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL auto_increment, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8 + +sakila.country +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL auto_increment, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 + +sakila.customer +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL auto_increment, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) default NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL default '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8 + +sakila.film +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL auto_increment, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) default NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned default NULL, + `rental_duration` tinyint(3) unsigned NOT NULL default '3', + `rental_rate` decimal(4,2) NOT NULL default '4.99', + `length` smallint(5) unsigned default NULL, + `replacement_cost` decimal(5,2) NOT NULL default '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') default 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') default NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 + +sakila.film_actor +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_category +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_text +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 + +sakila.inventory +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL auto_increment, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8 + +sakila.language +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL auto_increment, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 + +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL auto_increment, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) default NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL auto_increment, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime default NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL auto_increment, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) default NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL default '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) character set utf8 collate utf8_bin default NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL auto_increment, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.1.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.1.txt new file mode 100644 index 000000000..151b596f1 --- /dev/null +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.1.txt @@ -0,0 +1,542 @@ +mysql.columns_priv +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' + +mysql.db +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' + +mysql.event +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' + +mysql.func +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' + +mysql.help_category +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories' + +mysql.help_keyword +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords' + +mysql.help_relation +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation' + +mysql.help_topic +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics' + +mysql.host +CREATE TABLE `host` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' + +mysql.ndb_binlog_index +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` bigint(20) unsigned NOT NULL, + `updates` bigint(20) unsigned NOT NULL, + `deletes` bigint(20) unsigned NOT NULL, + `schemaops` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +mysql.plugin +CREATE TABLE `plugin` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins' + +mysql.proc +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' + +mysql.procs_priv +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' + +mysql.servers +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' + +mysql.tables_priv +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' + +mysql.time_zone +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones' + +mysql.time_zone_leap_second +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones' + +mysql.time_zone_name +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names' + +mysql.time_zone_transition +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions' + +mysql.time_zone_transition_type +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types' + +mysql.user +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' + +percona_test.checksums +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +percona_test.load_data +CREATE TABLE `load_data` ( + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +percona_test.sentinel +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +sakila.actor +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 + +sakila.address +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 + +sakila.category +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 + +sakila.city +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8 + +sakila.country +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 + +sakila.customer +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8 + +sakila.film +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 + +sakila.film_actor +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_category +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_text +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 + +sakila.inventory +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8 + +sakila.language +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 + +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.5.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.5.txt new file mode 100644 index 000000000..02f29272d --- /dev/null +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.5.txt @@ -0,0 +1,558 @@ +mysql.columns_priv +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' + +mysql.db +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' + +mysql.event +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' + +mysql.func +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' + +mysql.help_category +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories' + +mysql.help_keyword +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords' + +mysql.help_relation +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation' + +mysql.help_topic +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics' + +mysql.host +CREATE TABLE `host` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' + +mysql.ndb_binlog_index +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` bigint(20) unsigned NOT NULL, + `updates` bigint(20) unsigned NOT NULL, + `deletes` bigint(20) unsigned NOT NULL, + `schemaops` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +mysql.plugin +CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins' + +mysql.proc +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' + +mysql.procs_priv +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' + +mysql.proxies_priv +CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges' + +mysql.servers +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' + +mysql.tables_priv +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' + +mysql.time_zone +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones' + +mysql.time_zone_leap_second +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones' + +mysql.time_zone_name +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names' + +mysql.time_zone_transition +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions' + +mysql.time_zone_transition_type +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types' + +mysql.user +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `plugin` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `authentication_string` text COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' + +percona_test.checksums +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +percona_test.load_data +CREATE TABLE `load_data` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +percona_test.sentinel +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +sakila.actor +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 + +sakila.address +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 + +sakila.category +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 + +sakila.city +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8 + +sakila.country +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 + +sakila.customer +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8 + +sakila.film +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 + +sakila.film_actor +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_category +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_text +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 + +sakila.inventory +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8 + +sakila.language +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 + +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.6.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.6.txt new file mode 100644 index 000000000..3772256aa --- /dev/null +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.6.txt @@ -0,0 +1,537 @@ +mysql.columns_priv +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' + +mysql.db +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' + +mysql.event +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' + +mysql.func +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' + +mysql.help_category +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories' + +mysql.help_keyword +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords' + +mysql.help_relation +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation' + +mysql.help_topic +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics' + +mysql.ndb_binlog_index +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` int(10) unsigned NOT NULL, + `updates` int(10) unsigned NOT NULL, + `deletes` int(10) unsigned NOT NULL, + `schemaops` int(10) unsigned NOT NULL, + `orig_server_id` int(10) unsigned NOT NULL, + `orig_epoch` bigint(20) unsigned NOT NULL, + `gci` int(10) unsigned NOT NULL, + PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +mysql.plugin +CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins' + +mysql.proc +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' + +mysql.procs_priv +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' + +mysql.proxies_priv +CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges' + +mysql.servers +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' + +mysql.tables_priv +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' + +mysql.time_zone +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones' + +mysql.time_zone_leap_second +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones' + +mysql.time_zone_name +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names' + +mysql.time_zone_transition +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions' + +mysql.time_zone_transition_type +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types' + +mysql.user +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `plugin` char(64) COLLATE utf8_bin DEFAULT '', + `authentication_string` text COLLATE utf8_bin, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' + +percona_test.checksums +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +percona_test.load_data +CREATE TABLE `load_data` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +percona_test.sentinel +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +sakila.actor +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 + +sakila.address +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 + +sakila.category +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 + +sakila.city +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8 + +sakila.country +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 + +sakila.customer +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8 + +sakila.film +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 + +sakila.film_actor +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_category +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_text +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 + +sakila.inventory +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8 + +sakila.language +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 + +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.7.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.7.txt new file mode 100644 index 000000000..c1e30dafa --- /dev/null +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-5.7.txt @@ -0,0 +1,570 @@ +mysql.columns_priv +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' + +mysql.db +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' + +mysql.engine_cost +CREATE TABLE `engine_cost` ( + `engine_name` varchar(64) NOT NULL, + `device_type` int(11) NOT NULL, + `cost_name` varchar(64) NOT NULL, + `cost_value` float DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `comment` varchar(1024) DEFAULT NULL, + PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 + +mysql.event +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(93) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' + +mysql.func +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' + +mysql.help_category +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` text NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help categories' + +mysql.help_keyword +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help keywords' + +mysql.help_relation +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='keyword-topic relation' + +mysql.help_topic +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` text NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help topics' + +mysql.ndb_binlog_index +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` int(10) unsigned NOT NULL, + `updates` int(10) unsigned NOT NULL, + `deletes` int(10) unsigned NOT NULL, + `schemaops` int(10) unsigned NOT NULL, + `orig_server_id` int(10) unsigned NOT NULL, + `orig_epoch` bigint(20) unsigned NOT NULL, + `gci` int(10) unsigned NOT NULL, + `next_position` bigint(20) unsigned NOT NULL, + `next_file` varchar(255) NOT NULL, + PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +mysql.plugin +CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL plugins' + +mysql.proc +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(93) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' + +mysql.procs_priv +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' + +mysql.proxies_priv +CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges' + +mysql.server_cost +CREATE TABLE `server_cost` ( + `cost_name` varchar(64) NOT NULL, + `cost_value` float DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `comment` varchar(1024) DEFAULT NULL, + PRIMARY KEY (`cost_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 + +mysql.servers +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='MySQL Foreign Servers table' + +mysql.tables_priv +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(93) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' + +mysql.time_zone +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zones' + +mysql.time_zone_leap_second +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Leap seconds information for time zones' + +mysql.time_zone_name +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone names' + +mysql.time_zone_transition +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transitions' + +mysql.time_zone_transition_type +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transition types' + +mysql.user +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'mysql_native_password', + `authentication_string` text COLLATE utf8_bin, + `password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `password_last_changed` timestamp NULL DEFAULT NULL, + `password_lifetime` smallint(5) unsigned DEFAULT NULL, + `account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' + +percona_test.checksums +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +percona_test.load_data +CREATE TABLE `load_data` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +percona_test.sentinel +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + +sakila.actor +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 + +sakila.address +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 + +sakila.category +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 + +sakila.city +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8 + +sakila.country +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 + +sakila.customer +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8 + +sakila.film +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 + +sakila.film_actor +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_category +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + +sakila.film_text +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 + +sakila.inventory +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8 + +sakila.language +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 + +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 + +sys.sys_config +CREATE TABLE `sys_config` ( + `variable` varchar(128) NOT NULL, + `value` varchar(128) DEFAULT NULL, + `set_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `set_by` varchar(128) DEFAULT NULL, + PRIMARY KEY (`variable`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 + diff --git a/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-8.0.txt b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-8.0.txt new file mode 100644 index 000000000..95e74ed3a --- /dev/null +++ b/t/lib/samples/SchemaIterator/all-dbs-tbls-cluster-8.0.txt @@ -0,0 +1,640 @@ +mysql.columns_priv +CREATE TABLE `columns_priv` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`User`,`Db`,`Table_name`,`Column_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Column privileges' + +mysql.component +CREATE TABLE `component` ( + `component_id` int unsigned NOT NULL AUTO_INCREMENT, + `component_group_id` int unsigned NOT NULL, + `component_urn` text NOT NULL, + PRIMARY KEY (`component_id`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='Components' + +mysql.db +CREATE TABLE `db` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`User`,`Db`), + KEY `User` (`User`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Database privileges' + +mysql.default_roles +CREATE TABLE `default_roles` ( + `HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `DEFAULT_ROLE_HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '%', + `DEFAULT_ROLE_USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + PRIMARY KEY (`HOST`,`USER`,`DEFAULT_ROLE_HOST`,`DEFAULT_ROLE_USER`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Default roles' + +mysql.engine_cost +CREATE TABLE `engine_cost` ( + `engine_name` varchar(64) NOT NULL, + `device_type` int NOT NULL, + `cost_name` varchar(64) NOT NULL, + `cost_value` float DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `comment` varchar(1024) DEFAULT NULL, + `default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8mb3'io_block_read_cost' then 1.0 when _utf8mb3'memory_block_read_cost' then 0.25 else NULL end)) VIRTUAL, + PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC + +mysql.func +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `ret` tinyint NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL, + PRIMARY KEY (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='User defined functions' + +mysql.global_grants +CREATE TABLE `global_grants` ( + `USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `PRIV` char(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `WITH_GRANT_OPTION` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + PRIMARY KEY (`USER`,`HOST`,`PRIV`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Extended global grants' + +mysql.help_category +CREATE TABLE `help_category` ( + `help_category_id` smallint unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint unsigned DEFAULT NULL, + `url` text NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='help categories' + +mysql.help_keyword +CREATE TABLE `help_keyword` ( + `help_keyword_id` int unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='help keywords' + +mysql.help_relation +CREATE TABLE `help_relation` ( + `help_topic_id` int unsigned NOT NULL, + `help_keyword_id` int unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='keyword-topic relation' + +mysql.help_topic +CREATE TABLE `help_topic` ( + `help_topic_id` int unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` text NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='help topics' + +mysql.ndb_binlog_index +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint unsigned NOT NULL, + `inserts` int unsigned NOT NULL, + `updates` int unsigned NOT NULL, + `deletes` int unsigned NOT NULL, + `schemaops` int unsigned NOT NULL, + `orig_server_id` int unsigned NOT NULL, + `orig_epoch` bigint unsigned NOT NULL, + `gci` int unsigned NOT NULL, + `next_position` bigint unsigned NOT NULL, + `next_file` varchar(255) NOT NULL, + PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC + +mysql.password_history +CREATE TABLE `password_history` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Password_timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + `Password` text COLLATE utf8mb3_bin, + PRIMARY KEY (`Host`,`User`,`Password_timestamp` DESC) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Password history for user accounts' + +mysql.plugin +CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='MySQL plugins' + +mysql.procs_priv +CREATE TABLE `procs_priv` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8mb3_bin NOT NULL, + `Grantor` varchar(288) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Db`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Procedure privileges' + +mysql.proxies_priv +CREATE TABLE `proxies_priv` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Proxied_host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Proxied_user` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` varchar(288) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='User proxy privileges' + +mysql.replication_asynchronous_connection_failover +CREATE TABLE `replication_asynchronous_connection_failover` ( + `Channel_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'The replication channel name that connects source and replica.', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The source hostname that the replica will attempt to switch over the replication connection to in case of a failure.', + `Port` int unsigned NOT NULL COMMENT 'The source port that the replica will attempt to switch over the replication connection to in case of a failure.', + `Network_namespace` char(64) NOT NULL COMMENT 'The source network namespace that the replica will attempt to switch over the replication connection to in case of a failure. If its value is empty, connections use the default (global) namespace.', + `Weight` tinyint unsigned NOT NULL COMMENT 'The order in which the replica shall try to switch the connection over to when there are failures. Weight can be set to a number between 1 and 100, where 100 is the highest weight and 1 the lowest.', + `Managed_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'The name of the group which this server belongs to.', + PRIMARY KEY (`Channel_name`,`Host`,`Port`,`Network_namespace`,`Managed_name`), + KEY `Channel_name` (`Channel_name`,`Managed_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The source configuration details' + +mysql.replication_asynchronous_connection_failover_managed +CREATE TABLE `replication_asynchronous_connection_failover_managed` ( + `Channel_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'The replication channel name that connects source and replica.', + `Managed_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'The name of the source which needs to be managed.', + `Managed_type` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'Determines the managed type.', + `Configuration` json DEFAULT NULL COMMENT 'The data to help manage group. For Managed_type = GroupReplication, Configuration value should contain {"Primary_weight": 80, "Secondary_weight": 60}, so that it assigns weight=80 to PRIMARY of the group, and weight=60 for rest of the members in mysql.replication_asynchronous_connection_failover table.', + PRIMARY KEY (`Channel_name`,`Managed_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The managed source configuration details' + +mysql.replication_group_configuration_version +CREATE TABLE `replication_group_configuration_version` ( + `name` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The configuration name.', + `version` bigint unsigned NOT NULL COMMENT 'The version of the configuration name.', + PRIMARY KEY (`name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The group configuration version.' + +mysql.replication_group_member_actions +CREATE TABLE `replication_group_member_actions` ( + `name` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The action name.', + `event` char(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The event that will trigger the action.', + `enabled` tinyint(1) NOT NULL COMMENT 'Whether the action is enabled.', + `type` char(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'The action type.', + `priority` tinyint unsigned NOT NULL COMMENT 'The order on which the action will be run, value between 1 and 100, lower values first.', + `error_handling` char(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'On errors during the action will be handled: IGNORE, CRITICAL.', + PRIMARY KEY (`name`,`event`), + KEY `event` (`event`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='The member actions configuration.' + +mysql.role_edges +CREATE TABLE `role_edges` ( + `FROM_HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `FROM_USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `TO_HOST` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `TO_USER` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `WITH_ADMIN_OPTION` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + PRIMARY KEY (`FROM_HOST`,`FROM_USER`,`TO_HOST`,`TO_USER`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Role hierarchy and role grants' + +mysql.server_cost +CREATE TABLE `server_cost` ( + `cost_name` varchar(64) NOT NULL, + `cost_value` float DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `comment` varchar(1024) DEFAULT NULL, + `default_value` float GENERATED ALWAYS AS ((case `cost_name` when _utf8mb3'disk_temptable_create_cost' then 20.0 when _utf8mb3'disk_temptable_row_cost' then 0.5 when _utf8mb3'key_compare_cost' then 0.05 when _utf8mb3'memory_temptable_create_cost' then 1.0 when _utf8mb3'memory_temptable_row_cost' then 0.1 when _utf8mb3'row_evaluate_cost' then 0.1 else NULL end)) VIRTUAL, + PRIMARY KEY (`cost_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC + +mysql.servers +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='MySQL Foreign Servers table' + +mysql.tables_priv +CREATE TABLE `tables_priv` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Grantor` varchar(288) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`User`,`Db`,`Table_name`), + KEY `Grantor` (`Grantor`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Table privileges' + +mysql.time_zone +CREATE TABLE `time_zone` ( + `Time_zone_id` int unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zones' + +mysql.time_zone_leap_second +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint NOT NULL, + `Correction` int NOT NULL, + PRIMARY KEY (`Transition_time`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Leap seconds information for time zones' + +mysql.time_zone_name +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int unsigned NOT NULL, + PRIMARY KEY (`Name`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zone names' + +mysql.time_zone_transition +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int unsigned NOT NULL, + `Transition_time` bigint NOT NULL, + `Transition_type_id` int unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zone transitions' + +mysql.time_zone_transition_type +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int unsigned NOT NULL, + `Transition_type_id` int unsigned NOT NULL, + `Offset` int NOT NULL DEFAULT '0', + `Is_DST` tinyint unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Time zone transition types' + +mysql.user +CREATE TABLE `user` ( + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int unsigned NOT NULL DEFAULT '0', + `max_updates` int unsigned NOT NULL DEFAULT '0', + `max_connections` int unsigned NOT NULL DEFAULT '0', + `max_user_connections` int unsigned NOT NULL DEFAULT '0', + `plugin` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT 'caching_sha2_password', + `authentication_string` text COLLATE utf8mb3_bin, + `password_expired` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `password_last_changed` timestamp NULL DEFAULT NULL, + `password_lifetime` smallint unsigned DEFAULT NULL, + `account_locked` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_role_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_role_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Password_reuse_history` smallint unsigned DEFAULT NULL, + `Password_reuse_time` smallint unsigned DEFAULT NULL, + `Password_require_current` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `User_attributes` json DEFAULT NULL, + PRIMARY KEY (`Host`,`User`) +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Users and global privileges' + +mysql.wsrep_cluster +CREATE TABLE `wsrep_cluster` ( + `cluster_uuid` char(36) NOT NULL, + `view_id` bigint NOT NULL, + `view_seqno` bigint NOT NULL, + `protocol_version` int NOT NULL, + `capabilities` int NOT NULL, + PRIMARY KEY (`cluster_uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + +mysql.wsrep_cluster_members +CREATE TABLE `wsrep_cluster_members` ( + `node_uuid` char(36) NOT NULL, + `cluster_uuid` char(36) NOT NULL, + `node_name` char(32) NOT NULL, + `node_incoming_address` varchar(256) NOT NULL, + PRIMARY KEY (`node_uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + +mysql.wsrep_streaming_log +CREATE TABLE `wsrep_streaming_log` ( + `node_uuid` char(36) NOT NULL, + `trx_id` bigint NOT NULL, + `seqno` bigint NOT NULL, + `flags` int NOT NULL, + `frag` longblob NOT NULL, + PRIMARY KEY (`node_uuid`,`trx_id`,`seqno`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + +percona_test.checksums +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + +percona_test.load_data +CREATE TABLE `load_data` ( + `i` int DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + +percona_test.sentinel +CREATE TABLE `sentinel` ( + `id` int NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + +sakila.actor +CREATE TABLE `actor` ( + `actor_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8mb3 + +sakila.address +CREATE TABLE `address` ( + `address_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8mb3 + +sakila.category +CREATE TABLE `category` ( + `category_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb3 + +sakila.city +CREATE TABLE `city` ( + `city_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8mb3 + +sakila.country +CREATE TABLE `country` ( + `country_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb3 + +sakila.customer +CREATE TABLE `customer` ( + `customer_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8mb3 + +sakila.film +CREATE TABLE `film` ( + `film_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year DEFAULT NULL, + `language_id` tinyint unsigned NOT NULL, + `original_language_id` tinyint unsigned DEFAULT NULL, + `rental_duration` tinyint unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb3 + +sakila.film_actor +CREATE TABLE `film_actor` ( + `actor_id` smallint unsigned NOT NULL, + `film_id` smallint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 + +sakila.film_category +CREATE TABLE `film_category` ( + `film_id` smallint unsigned NOT NULL, + `category_id` tinyint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 + +sakila.film_text +CREATE TABLE `film_text` ( + `film_id` smallint NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 + +sakila.inventory +CREATE TABLE `inventory` ( + `inventory_id` mediumint unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint unsigned NOT NULL, + `store_id` tinyint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8mb3 + +sakila.language +CREATE TABLE `language` ( + `language_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 + +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint unsigned NOT NULL, + `staff_id` tinyint unsigned NOT NULL, + `rental_id` int DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint unsigned NOT NULL, + `customer_id` smallint unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint unsigned NOT NULL, + `address_id` smallint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 + +sys.sys_config +CREATE TABLE `sys_config` ( + `variable` varchar(128) NOT NULL, + `value` varchar(128) DEFAULT NULL, + `set_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `set_by` varchar(128) DEFAULT NULL, + PRIMARY KEY (`variable`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + diff --git a/t/lib/samples/SchemaIterator/mysql-user-ddl-8.0.txt b/t/lib/samples/SchemaIterator/mysql-user-ddl-8.0.txt index 06a50a03f..b1622cb66 100644 --- a/t/lib/samples/SchemaIterator/mysql-user-ddl-8.0.txt +++ b/t/lib/samples/SchemaIterator/mysql-user-ddl-8.0.txt @@ -1,55 +1,56 @@ mysql.user CREATE TABLE `user` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `User` char(32) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Reload_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Process_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `File_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Show_db_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Super_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_user_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Event_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', + `Host` char(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + `User` char(32) COLLATE utf8mb3_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, - `max_questions` int(11) unsigned NOT NULL DEFAULT '0', - `max_updates` int(11) unsigned NOT NULL DEFAULT '0', - `max_connections` int(11) unsigned NOT NULL DEFAULT '0', - `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', - `plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT 'caching_sha2_password', - `authentication_string` text COLLATE utf8_bin, - `password_expired` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', + `max_questions` int unsigned NOT NULL DEFAULT '0', + `max_updates` int unsigned NOT NULL DEFAULT '0', + `max_connections` int unsigned NOT NULL DEFAULT '0', + `max_user_connections` int unsigned NOT NULL DEFAULT '0', + `plugin` char(64) COLLATE utf8mb3_bin NOT NULL DEFAULT 'caching_sha2_password', + `authentication_string` text COLLATE utf8mb3_bin, + `password_expired` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', `password_last_changed` timestamp NULL DEFAULT NULL, - `password_lifetime` smallint(5) unsigned DEFAULT NULL, - `account_locked` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Create_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Drop_role_priv` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N', - `Password_reuse_history` smallint(5) unsigned DEFAULT NULL, - `Password_reuse_time` smallint(5) unsigned DEFAULT NULL, - `Password_require_current` enum('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, + `password_lifetime` smallint unsigned DEFAULT NULL, + `account_locked` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Create_role_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Drop_role_priv` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT 'N', + `Password_reuse_history` smallint unsigned DEFAULT NULL, + `Password_reuse_time` smallint unsigned DEFAULT NULL, + `Password_require_current` enum('N','Y') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL, + `User_attributes` json DEFAULT NULL, PRIMARY KEY (`Host`,`User`) -) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0 COMMENT='Users and global privileges' +) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Users and global privileges' diff --git a/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment-8.0.txt b/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment-8.0.txt new file mode 100644 index 000000000..89a7d7ab2 --- /dev/null +++ b/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment-8.0.txt @@ -0,0 +1,52 @@ +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint unsigned NOT NULL, + `customer_id` smallint unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint unsigned NOT NULL, + `address_id` smallint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 + diff --git a/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment.txt b/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment.txt index a869e454d..ffc49d620 100644 --- a/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment.txt +++ b/t/lib/samples/SchemaIterator/resume-from-ignored-sakila-payment.txt @@ -12,9 +12,9 @@ CREATE TABLE `rental` ( KEY `idx_fk_inventory_id` (`inventory_id`), KEY `idx_fk_customer_id` (`customer_id`), KEY `idx_fk_staff_id` (`staff_id`), - CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, - CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 sakila.staff @@ -33,8 +33,8 @@ CREATE TABLE `staff` ( PRIMARY KEY (`staff_id`), KEY `idx_fk_store_id` (`store_id`), KEY `idx_fk_address_id` (`address_id`), - CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, - CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 sakila.store @@ -46,7 +46,7 @@ CREATE TABLE `store` ( PRIMARY KEY (`store_id`), UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), KEY `idx_fk_address_id` (`address_id`), - CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, - CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 diff --git a/t/lib/samples/SchemaIterator/resume-from-sakila-payment-8.0.txt b/t/lib/samples/SchemaIterator/resume-from-sakila-payment-8.0.txt new file mode 100644 index 000000000..c31074429 --- /dev/null +++ b/t/lib/samples/SchemaIterator/resume-from-sakila-payment-8.0.txt @@ -0,0 +1,70 @@ +sakila.payment +CREATE TABLE `payment` ( + `payment_id` smallint unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint unsigned NOT NULL, + `staff_id` tinyint unsigned NOT NULL, + `rental_id` int DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 + +sakila.rental +CREATE TABLE `rental` ( + `rental_id` int NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint unsigned NOT NULL, + `customer_id` smallint unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8mb3 + +sakila.staff +CREATE TABLE `staff` ( + `staff_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 + +sakila.store +CREATE TABLE `store` ( + `store_id` tinyint unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint unsigned NOT NULL, + `address_id` smallint unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 + diff --git a/t/lib/samples/SchemaIterator/resume-from-sakila-payment.txt b/t/lib/samples/SchemaIterator/resume-from-sakila-payment.txt index 1a0e53356..4b04e157b 100644 --- a/t/lib/samples/SchemaIterator/resume-from-sakila-payment.txt +++ b/t/lib/samples/SchemaIterator/resume-from-sakila-payment.txt @@ -11,8 +11,8 @@ CREATE TABLE `payment` ( KEY `idx_fk_staff_id` (`staff_id`), KEY `idx_fk_customer_id` (`customer_id`), KEY `fk_payment_rental` (`rental_id`), - CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 @@ -30,9 +30,9 @@ CREATE TABLE `rental` ( KEY `idx_fk_inventory_id` (`inventory_id`), KEY `idx_fk_customer_id` (`customer_id`), KEY `idx_fk_staff_id` (`staff_id`), - CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, - CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8 sakila.staff @@ -51,8 +51,8 @@ CREATE TABLE `staff` ( PRIMARY KEY (`staff_id`), KEY `idx_fk_store_id` (`store_id`), KEY `idx_fk_address_id` (`address_id`), - CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, - CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 sakila.store @@ -64,7 +64,7 @@ CREATE TABLE `store` ( PRIMARY KEY (`store_id`), UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), KEY `idx_fk_address_id` (`address_id`), - CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, - CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 diff --git a/t/lib/samples/bug_1038276.sql b/t/lib/samples/bug_1038276.sql index be5778042..25be1d3b3 100644 --- a/t/lib/samples/bug_1038276.sql +++ b/t/lib/samples/bug_1038276.sql @@ -9,4 +9,4 @@ CREATE TABLE rt ( id int not null auto_increment primary key, b varchar(300) ) ENGINE=InnoDB; -INSERT INTO lt VALUES (null, "0x89504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD965000000097048597300000EC300000EC301C76FA8640000200049444154789C4CBB7794246779FFBBF78F7B7EBE466177677772CE3D9D667AA67BA62776CE39545557CE3974EE9EB049AB9556392210414258083"); +INSERT INTO lt VALUES (1, "0x89504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD965000000097048597300000EC300000EC301C76FA8640000200049444154789C4CBB7794246779FFBBF78F7B7EBE466177677772CE3D9D667AA67BA62776CE39545557CE3974EE9EB049AB9556392210414258083"); diff --git a/t/lib/samples/col_types.sql b/t/lib/samples/col_types.sql index 3633c58c9..6eb56fb07 100644 --- a/t/lib/samples/col_types.sql +++ b/t/lib/samples/col_types.sql @@ -16,5 +16,5 @@ CREATE TABLE col_types_1 ( v varchar(32), t text ); -INSERT INTO col_types_1 VALUES (NULL, 1, 3.14, 5.08, NOW(), NOW(), 'c', 'c2', 'hello world', 'this is text'); +INSERT INTO col_types_1 VALUES (1, 1, 3.14, 5.08, NOW(), NOW(), 'c', 'c2', 'hello world', 'this is text'); diff --git a/t/lib/samples/issue_641.sql b/t/lib/samples/issue_641.sql index d11c86a4a..ab626ac03 100644 --- a/t/lib/samples/issue_641.sql +++ b/t/lib/samples/issue_641.sql @@ -9,4 +9,4 @@ CREATE TABLE rt ( id int not null auto_increment primary key, b blob ) ENGINE=InnoDB; -INSERT INTO lt VALUES (null, 0x89504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD965000000097048597300000EC300000EC301C76FA8640000200049444154789C4CBB7794246779FFBBF78F7B7EBE466177677772CE3D9D667AA67BA62776CE39545557CE3974EE9EB049AB9556392210414258083); +INSERT INTO lt VALUES (1, 0x89504E470D0A1A0A0000000D4948445200000079000000750802000000E55AD965000000097048597300000EC300000EC301C76FA8640000200049444154789C4CBB7794246779FFBBF78F7B7EBE466177677772CE3D9D667AA67BA62776CE39545557CE3974EE9EB049AB9556392210414258083); diff --git a/t/lib/samples/query_review.sql b/t/lib/samples/query_review.sql index 266dfa17b..c6890ca3c 100644 --- a/t/lib/samples/query_review.sql +++ b/t/lib/samples/query_review.sql @@ -1,7 +1,7 @@ USE test; DROP TABLE IF EXISTS query_review; CREATE TABLE query_review ( - checksum BIGINT UNSIGNED NOT NULL PRIMARY KEY, -- md5 of fingerprint + checksum CHAR(32) NOT NULL PRIMARY KEY, -- md5 of fingerprint fingerprint TEXT NOT NULL, sample TEXT NOT NULL, first_seen DATETIME, @@ -12,6 +12,6 @@ CREATE TABLE query_review ( ); INSERT INTO query_review VALUES -(11676753765851784517, 'select col from foo_tbl', 'SELECT col FROM foo_tbl', '2007-12-18 11:48:27', '2007-12-18 11:48:27', NULL, NULL, NULL), -(15334040482108055940, 'select col from bar_tbl', 'SELECT col FROM bar_tbl', '2005-12-19 16:56:31', '2006-12-20 11:48:57', NULL, NULL, NULL); +('538CA093E701E0CBA20C29AF174CE545', 'select col from foo_tbl', 'SELECT col FROM foo_tbl', '2007-12-18 11:48:27', '2007-12-18 11:48:27', NULL, NULL, NULL), +('3E4FB43148C4B07CD4CD74934382A184', 'select col from bar_tbl', 'SELECT col FROM bar_tbl', '2005-12-19 16:56:31', '2006-12-20 11:48:57', NULL, NULL, NULL); diff --git a/t/pt-mysql-summary/pt-2102.t b/t/pt-mysql-summary/pt-2102.t index 2f0ef80d8..79748864a 100644 --- a/t/pt-mysql-summary/pt-2102.t +++ b/t/pt-mysql-summary/pt-2102.t @@ -21,7 +21,6 @@ local $ENV{PTDEBUG} = ""; my $dp = new DSNParser(opts=>$dsn_opts); my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); my $master_dbh = $sb->get_dbh_for('master'); -my $has_keyring_plugin; if ( !$master_dbh ) { plan skip_all => 'Cannot connect to sandbox master'; @@ -30,24 +29,6 @@ else { plan tests => 3; } -my $db_flavor = VersionParser->new($master_dbh)->flavor(); -if ( $db_flavor =~ m/Percona Server/ ) { - my $rows = $master_dbh->selectall_hashref("SHOW PLUGINS", "name"); - while (my ($key, $values) = each %$rows) { - if ($key =~ m/^keyring_/) { - $has_keyring_plugin=1; - last; - } - } -} - -# mysqldump from earlier versions doesn't seem to work with 5.6, -# so use the actual mysqldump from each MySQL bin which should -# always be compatible with itself. -# We need LC_NUMERIC=POSIX, so test does not fail in environment -# which use , insead of . for numbers. -my $env = qq\CMD_MYSQLDUMP="$ENV{PERCONA_TOOLKIT_SANDBOX}/bin/mysqldump" LC_NUMERIC=POSIX\; - # # --save-samples # diff --git a/t/pt-mysql-summary/pt-76.t b/t/pt-mysql-summary/pt-76.t new file mode 100644 index 000000000..99732f6e4 --- /dev/null +++ b/t/pt-mysql-summary/pt-76.t @@ -0,0 +1,77 @@ +#!/usr/bin/env perl + +BEGIN { + die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" + unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH}; + unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib"; +}; + +use strict; +use warnings FATAL => 'all'; +use English qw(-no_match_vars); +use PerconaTest; +use Sandbox; +use DSNParser; +require VersionParser; +use Test::More; +use File::Temp qw( tempdir ); + +local $ENV{PTDEBUG} = ""; + +my $dp = new DSNParser(opts=>$dsn_opts); +my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); +my $dbh = $sb->get_dbh_for('master'); + +if ( !$dbh ) { + plan skip_all => 'Cannot connect to sandbox'; +} +else { + plan tests => 5; +} + +my ($tool) = 'pt-mysql-summary'; + +$dbh->do("DROP USER IF EXISTS `pt-76`"); +$dbh->do("CREATE USER `pt-76` IDENTIFIED BY 'foo&bar'"); + +my $out = `$trunk/bin/$tool --config $trunk/t/pt-mysql-summary/samples/pt-mysql-summary.conf.001 2>/dev/null -- --defaults-file=/tmp/12345/my.sandbox.cnf`; + +like( + $out, + qr/User | pt-76/, + "Password with & character works" +); + +$out = `$trunk/bin/$tool --config $trunk/t/pt-mysql-summary/samples/pt-mysql-summary.conf.003 2>/dev/null -- --defaults-file=/tmp/12345/my.sandbox.cnf`; + +like( + $out, + qr/User | pt-76/, + "Password with & character and inline comment works" +); + +$dbh->do("ALTER USER `pt-76` IDENTIFIED BY 'foo#bar'"); + +$out = `$trunk/bin/$tool --config $trunk/t/pt-mysql-summary/samples/pt-mysql-summary.conf.002 2>/dev/null -- --defaults-file=/tmp/12345/my.sandbox.cnf`; + +like( + $out, + qr/User | pt-76/, + "Password with # character works" +); + +$out = `$trunk/bin/$tool --config $trunk/t/pt-mysql-summary/samples/pt-mysql-summary.conf.004 2>/dev/null -- --defaults-file=/tmp/12345/my.sandbox.cnf`; + +like( + $out, + qr/User | pt-76/, + "Password with # character and inline comment works" +); + +# ############################################################################# +# Done. +# ############################################################################# +$dbh->do("DROP USER IF EXISTS `pt-76`"); +$sb->wipe_clean($dbh); +ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); +exit; diff --git a/t/pt-mysql-summary/pt-mysql-summary_encryption.t b/t/pt-mysql-summary/pt-mysql-summary_encryption.t index aa1545cd9..1424e28d6 100644 --- a/t/pt-mysql-summary/pt-mysql-summary_encryption.t +++ b/t/pt-mysql-summary/pt-mysql-summary_encryption.t @@ -67,7 +67,7 @@ ok( my @files = glob("$dir/*"); my $n_files = scalar @files; ok( - $n_files >= 15 && $n_files <= 18, + $n_files >= 15 && $n_files <= 19, "And leaves all files in there" ) or diag($n_files, `ls -l $dir`); @@ -98,12 +98,12 @@ like( ); # --read-samples -for my $i (2..7) { +for my $i (2..9) { ok( no_diff( sub { local $ENV{_NO_FALSE_NEGATIVES} = 1; - print `$env $trunk/bin/$tool --read-samples $trunk/t/pt-mysql-summary/samples/temp00$i -- --defaults-file=/tmp/12345/my.sandbox.cnf | tail -n+3 | perl -wlnpe 's/Skipping schema analysis.*/Specify --databases or --all-databases to dump and summarize schemas/' | grep -v jemalloc` + print `$env $trunk/bin/$tool --read-samples $trunk/t/pt-mysql-summary/samples/temp_enc00$i -- --defaults-file=/tmp/12345/my.sandbox.cnf | tail -n+3 | perl -wlnpe 's/Skipping schema analysis.*/Specify --databases or --all-databases to dump and summarize schemas/'` }, "t/pt-mysql-summary/samples/expected_output_temp_enc00$i.txt", ), @@ -139,19 +139,19 @@ like( like( $out, - qr/Keyring plugins/, + qr/Keyring plugins:/, "Keyring plugins included in report" ) or diag $out; like( $out, - qr/Encrypted tables/, + qr/Encrypted tables:/, "Encrypted tables included in report" ) or diag $out; like( $out, - qr/Encrypted tablespaces/, + qr/Encrypted tablespaces:/, "Encrypted tablespaces included in report" ) or diag $out; diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt new file mode 100644 index 000000000..d080fcc13 --- /dev/null +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt @@ -0,0 +1,380 @@ +# Instances ################################################## + Port Data Directory Nice OOM Socket + ===== ========================== ==== === ====== + 12345 /tmp/12345/data 0 0 /tmp/12345/mysql_sandbox12345.sock + 12346 /tmp/12346/data 0 0 /tmp/12346/mysql_sandbox12346.sock + 12347 /tmp/12347/data 0 0 /tmp/12347/mysql_sandbox12347.sock +# MySQL Executable ########################################### + Path to executable | /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld + Has symbols | Yes +# Slave Hosts ################################################ +*************************** 1. row *************************** + Server_id: 12346 + Host: 127.0.0.1 + Port: 12346 + Master_id: 12345 +Slave_UUID: 05c34f44-20c0-11ee-ad4c-7404f1a10a4a +# Report On Port 12345 ####################################### + User | msandbox@% + Time | 2023-07-13 23:29:50 (+03) + Hostname | s76 + Version | 8.0.32-24 Percona Server (GPL), Release 24, Revision e5c6e9d2 + Built On | Linux x86_64 + Started | 2023-07-12 17:25 (up 1+06:03:52) + Databases | 7 + Datadir | /tmp/12345/data/ + Processes | 4 connected, 3 running + Replication | Is not a slave, has 1 slaves connected + Pidfile | /tmp/12345/data/mysql_sandbox12345.pid (exists) +# Processlist ################################################ + + Command COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + Binlog Dump 1 1 100000 100000 + Daemon 1 1 100000 100000 + Query 1 1 0 0 + Sleep 2 0 2500 2500 + + User COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + event_scheduler 1 1 100000 100000 + msandbox 4 2 100000 100000 + + Host COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + localhost 5 3 225000 100000 + + db COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + NULL 5 3 225000 100000 + + State COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + 2 0 0 0 + init 1 1 0 0 + Source has sent all binlog to 1 1 100000 100000 + Waiting on empty queue 1 1 100000 100000 + +# Status Counters (Wait 10 Seconds) ########################## +Variable Per day Per second 10 secs +Aborted_clients 40 +Binlog_snapshot_position 3000000 30 +Binlog_cache_disk_use 7 +Binlog_cache_use 250 +Binlog_stmt_cache_use 25 +Bytes_received 4000000 50 700 +Bytes_sent 15000000 175 3500 +Com_admin_commands 1 +Com_alter_table 45 +Com_alter_tablespace 40 +Com_alter_user 2 +Com_change_db 800 +Com_checksum 7 +Com_commit 1 +Com_create_db 30 +Com_create_table 80 +Com_create_trigger 2 +Com_create_user 2 +Com_create_view 5 +Com_drop_db 40 +Com_drop_table 35 +Com_drop_user 1 +Com_flush 2 +Com_grant 2 +Com_insert 40 +Com_lock_tables 15 +Com_select 5000 3 +Com_set_option 5000 +Com_show_binlogs 80 +Com_show_create_db 25 +Com_show_create_table 700 +Com_show_databases 100 +Com_show_engine_mutex 6 +Com_show_engine_status 90 +Com_show_fields 1500 +Com_show_function_status 20 +Com_show_master_status 80 +Com_show_open_tables 6 +Com_show_plugins 100 +Com_show_procedure_status 20 +Com_show_processlist 90 +Com_show_replicas 80 +Com_show_slave_hosts 80 +Com_show_replica_status 90 +Com_show_slave_status 90 +Com_show_status 300 +Com_show_storage_engines 225 +Com_show_table_status 800 +Com_show_tables 50 +Com_show_triggers 700 +Com_show_variables 250 +Com_unlock_tables 35 +Com_update 15 +Connections 2500 2 +Created_tmp_disk_tables 200 +Created_tmp_files 5 +Created_tmp_tables 3500 +Error_log_buffered_bytes 3000 +Error_log_buffered_events 20 +Error_log_latest_write 1250000000000000 15000000000 +Flush_commands 3 +Handler_commit 8000 +Handler_delete 700 +Handler_external_lock 80000 4 +Handler_prepare 1000 +Handler_read_first 5000 1 +Handler_read_key 40000 6 +Handler_read_next 90000 1 +Handler_read_rnd 12500 +Handler_read_rnd_next 1000000 10 175 +Handler_rollback 300 +Handler_update 1750 +Handler_write 250000 3 70 +Innodb_buffer_pool_bytes_data 4500000 50 -168755 +Innodb_buffer_pool_bytes_dirty 1500000 15 -180224 +Innodb_buffer_pool_pages_flushed 15000 25 +Innodb_buffer_pool_pages_made_not_young 12500 +Innodb_buffer_pool_pages_made_young 300 +Innodb_buffer_pool_read_ahead 9 +Innodb_buffer_pool_read_requests 800000 9 70 +Innodb_buffer_pool_reads 12500 3 +Innodb_buffer_pool_write_requests 225000 2 9 +Innodb_checkpoint_age 60000 -7061 +Innodb_checkpoint_max_age 6000000 70 2500 +Innodb_data_fsyncs 7000 8 +Innodb_data_read 175000000 2250 50000 +Innodb_data_reads 12500 3 +Innodb_data_writes 12500 15 +Innodb_data_written 100000000 1250 175000 +Innodb_dblwr_pages_written 5000 10 +Innodb_dblwr_writes 1250 2 +Innodb_ibuf_segment_size 1 +Innodb_redo_log_uuid 900000000 10000 +Innodb_redo_log_checkpoint_lsn 25000000 300 7000 +Innodb_redo_log_current_lsn 25000000 300 35 +Innodb_redo_log_flushed_to_disk_lsn 25000000 300 35 +Innodb_redo_log_logical_size 60000 -7065 +Innodb_redo_log_physical_size 1000000 10 +Innodb_redo_log_capacity_resized 8000000 100 +Innodb_log_write_requests 200000 2 +Innodb_log_writes 5000 +Innodb_lsn_current 25000000 300 35 +Innodb_lsn_flushed 25000000 300 35 +Innodb_lsn_last_checkpoint 25000000 300 7000 +Innodb_master_thread_active_loops 125 +Innodb_master_thread_idle_loops 35000 1 +Innodb_max_trx_id 2500 +Innodb_os_log_fsyncs 3000 +Innodb_os_log_written 12500000 150 100 +Innodb_pages_created 1500 +Innodb_pages_read 12500 3 +Innodb_pages0_read 6 +Innodb_pages_written 5000 10 +Innodb_purge_trx_id 2500 +Innodb_rows_inserted 45000 9 +Innodb_rows_read 350000 3 9 +Innodb_rows_updated 15 +Innodb_system_rows_deleted 700 +Innodb_system_rows_inserted 1500 +Innodb_system_rows_read 150000 1 50 +Innodb_system_rows_updated 1750 +Innodb_num_open_files 25 +Innodb_undo_tablespaces_total 1 +Innodb_undo_tablespaces_implicit 1 +Innodb_undo_tablespaces_active 1 +Innodb_secondary_index_triggered_cluster_reads 80000 +Innodb_buffered_aio_submitted 9 +Key_read_requests 1500 +Key_write_requests 800 +Key_writes 7 +Mysqlx_port 25000 +Mysqlx_ssl_ctx_verify_mode 3 +Mysqlx_worker_threads 1 +Net_buffer_length 50000 +Open_table_definitions 90 +Opened_files 25 +Opened_table_definitions 300 +Opened_tables 1250 +Performance_schema_session_connect_attrs_longest_seen 150 +Queries 20000 6 +Questions 20000 6 +Select_full_join 450 +Select_scan 6000 1 +Slow_queries 20000 6 +Sort_rows 17500 +Sort_scan 3500 +Ssl_accepts 3 +Ssl_finished_accepts 3 +Ssl_session_cache_timeout 250 +Table_locks_immediate 700 +Table_open_cache_hits 40000 2 +Table_open_cache_misses 1250 +Threads_created 4 +Uptime 90000 1 1 +# Table cache ################################################ + Size | 4000 + Usage | 30% +# Key Percona Server features ################################ + Table & Index Stats | Disabled + Multiple I/O Threads | Enabled + Corruption Resilient | Enabled + Durable Replication | Not Supported + Import InnoDB Tables | Not Supported + Fast Server Restarts | Not Supported + Enhanced Logging | Disabled + Replica Perf Logging | Disabled + Response Time Hist. | Not Supported + Smooth Flushing | Not Supported + HandlerSocket NoSQL | Not Supported + Fast Hash UDFs | Unknown +# Percona XtraDB Cluster ##################################### +# Plugins #################################################### + InnoDB compression | ACTIVE +# Schema ##################################################### +Specify --databases or --all-databases to dump and summarize schemas +# Noteworthy Technologies #################################### + SSL | Yes + Explicit LOCK TABLES | Yes + Delayed Insert | No + XA Transactions | No + NDB Cluster | No + Prepared Statements | No + Prepared statement count | 0 +# InnoDB ##################################################### + Version | 8.0.32-24 + Buffer Pool Size | 16.0M + Buffer Pool Fill | 35% + Buffer Pool Dirty | 10% + File Per Table | ON + Page Size | 16k + Log File Size | 2 * 5.0M = 10.0M + Log Buffer Size | 16M + Flush Method | fsync + Flush Log At Commit | 1 + XA Support | + Checksums | + Doublewrite | ON + R/W I/O Threads | 4 4 + I/O Capacity | 200 + Thread Concurrency | 0 + Concurrency Tickets | 5000 + Commit Concurrency | 0 + Txn Isolation Level | + Adaptive Flushing | ON + Adaptive Checkpoint | + Checkpoint Age | 69k + InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue + Oldest Transaction | 0 Seconds + History List Len | 9 + Read Views | 0 + Undo Log Entries | 0 transactions, 0 total undo, 0 max undo + Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads + Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites + Pending I/O Flushes | 0 buf pool, 0 log + Transaction States | 5xnot started +# MyISAM ##################################################### + Key Cache | 5.0M + Pct Used | 20% + Unflushed | 0% +# Security ################################################### + Users | 2 users, 0 anon, 0 w/o pw, 0 old pw + Old Passwords | +# Encryption ################################################# +Keyring plugins: +'+--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+' +Encrypted tables: ++--------------+------------+----------------+ +| TABLE_SCHEMA | TABLE_NAME | CREATE_OPTIONS | ++--------------+------------+----------------+ +| test | t1 | ENCRYPTION='Y' | +| test | t2 | ENCRYPTION='Y' | ++--------------+------------+----------------+ +Encrypted tablespaces: ++-------+---------+------------+ +| SPACE | NAME | SPACE_TYPE | ++-------+---------+------------+ +| 89 | foo | General | +| 90 | test/t2 | Single | ++-------+---------+------------+ +# Binary Logging ############################################# + Binlogs | 2 + Zero-Sized | 0 + Total Size | 3.3M + binlog_format | STATEMENT + expire_logs_days | 0 + sync_binlog | 1 + server_id | 12345 + binlog_do_db | + binlog_ignore_db | +# Noteworthy Variables ####################################### + Auto-Inc Incr/Offset | 1/1 + default_storage_engine | InnoDB + flush_time | 0 + init_connect | + init_file | /tmp/12345/mysql-init + sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION + join_buffer_size | 256k + sort_buffer_size | 256k + read_buffer_size | 128k + read_rnd_buffer_size | 256k + bulk_insert_buffer | 0.00 + max_heap_table_size | 16M + tmp_table_size | 16M + max_allowed_packet | 64M + thread_stack | 1M + log | + log_error | /tmp/12345/data/mysqld.log + log_warnings | + log_slow_queries | +log_queries_not_using_indexes | OFF + log_slave_updates | ON +# Configuration File ######################################### + Config File | /tmp/12345/my.sandbox.cnf + +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35 +datadir = /tmp/12345/data +general_log +general_log_file = genlog +innodb_buffer_pool_size = 16M +innodb_data_file_path = ibdata1:10M:autoextend +innodb_data_home_dir = /tmp/12345/data +innodb_lock_wait_timeout = 3 +innodb_log_file_size = 5M +innodb_log_group_home_dir = /tmp/12345/data +key_buffer_size = 5M +local-infile = 1 +log-bin = mysql-bin +log-error = /tmp/12345/data/mysqld.log +log_slave_updates +lower_case_table_names = 0 +relay_log = mysql-relay-bin +report-host = 127.0.0.1 +report-port = 12345 +server-id = 12345 +slow-query-log = 1 +slow-query-log-file = /tmp/12345/data/slow.log +log_slow_admin_statements = 1 +long_query_time = 0 +default_authentication_plugin = mysql_native_password +binlog_format = STATEMENT +secure-file-priv = +# Memory management library ################################## +jemalloc enabled in mysql config for process with id 1088931 +jemalloc enabled in mysql config for process with id 1089193 +jemalloc enabled in mysql config for process with id 1089375 +Using jemalloc from /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt new file mode 100644 index 000000000..ec502f212 --- /dev/null +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt @@ -0,0 +1,389 @@ +# Instances ################################################## + Port Data Directory Nice OOM Socket + ===== ========================== ==== === ====== + 12345 /tmp/12345/data 0 0 /tmp/12345/mysql_sandbox12345.sock + 12346 /tmp/12346/data 0 0 /tmp/12346/mysql_sandbox12346.sock + 12347 /tmp/12347/data 0 0 /tmp/12347/mysql_sandbox12347.sock +# MySQL Executable ########################################### + Path to executable | /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld + Has symbols | Yes +# Slave Hosts ################################################ +*************************** 1. row *************************** + Server_id: 12346 + Host: 127.0.0.1 + Port: 12346 + Master_id: 12345 +Slave_UUID: 05c34f44-20c0-11ee-ad4c-7404f1a10a4a +# Report On Port 12345 ####################################### + User | msandbox@% + Time | 2023-07-14 17:54:34 (+03) + Hostname | s76 + Version | 8.0.32-24 Percona Server (GPL), Release 24, Revision e5c6e9d2 + Built On | Linux x86_64 + Started | 2023-07-12 17:25 (up 2+00:28:35) + Databases | 6 + Datadir | /tmp/12345/data/ + Processes | 3 connected, 3 running + Replication | Is not a slave, has 1 slaves connected + Pidfile | /tmp/12345/data/mysql_sandbox12345.pid (exists) +# Processlist ################################################ + + Command COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + Binlog Dump 1 1 175000 175000 + Daemon 1 1 175000 175000 + Query 1 1 0 0 + Sleep 1 0 800 800 + + User COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + event_scheduler 1 1 175000 175000 + msandbox 3 2 175000 175000 + + Host COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + localhost 4 3 350000 175000 + + db COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + NULL 4 3 350000 175000 + + State COUNT(*) Working SUM(Time) MAX(Time) + ------------------------------ -------- ------- --------- --------- + 1 0 0 0 + init 1 1 0 0 + Source has sent all binlog to 1 1 175000 175000 + Waiting on empty queue 1 1 175000 175000 + +# Status Counters (Wait 10 Seconds) ########################## +Variable Per day Per second 11 secs +Aborted_clients 35 +Binlog_snapshot_position 1750000 20 +Binlog_cache_disk_use 4 +Binlog_cache_use 250 +Binlog_stmt_cache_use 25 +Bytes_received 3000000 35 600 +Bytes_sent 15000000 175 3500 +Com_alter_table 35 +Com_alter_tablespace 40 +Com_alter_user 1 +Com_change_db 800 +Com_checksum 4 +Com_create_db 25 +Com_create_table 70 +Com_create_trigger 1 +Com_create_user 1 +Com_create_view 3 +Com_drop_db 45 +Com_drop_table 40 +Com_flush 1 +Com_grant 1 +Com_insert 25 +Com_install_plugin 7 +Com_lock_tables 7 +Com_select 5000 2 +Com_set_option 6000 +Com_show_binlogs 90 +Com_show_create_db 25 +Com_show_create_table 700 +Com_show_databases 100 +Com_show_engine_mutex 3 +Com_show_engine_status 100 +Com_show_fields 1500 +Com_show_function_status 20 +Com_show_master_status 90 +Com_show_open_tables 3 +Com_show_plugins 125 +Com_show_procedure_status 20 +Com_show_processlist 100 +Com_show_replicas 90 +Com_show_slave_hosts 90 +Com_show_replica_status 90 +Com_show_slave_status 90 +Com_show_status 300 +Com_show_storage_engines 250 +Com_show_table_status 800 +Com_show_tables 40 +Com_show_triggers 700 +Com_show_variables 250 +Com_unlock_tables 30 +Com_update 8 +Connections 2500 1 +Created_tmp_disk_tables 225 +Created_tmp_files 3 +Created_tmp_tables 3500 +Error_log_buffered_bytes 2000 +Error_log_buffered_events 10 +Error_log_latest_write 800000000000000 10000000000 +Flush_commands 1 +Handler_commit 8000 +Handler_delete 700 +Handler_external_lock 80000 4 +Handler_prepare 900 +Handler_read_first 5000 1 +Handler_read_key 40000 5 +Handler_read_next 90000 1 +Handler_read_rnd 12500 +Handler_read_rnd_next 800000 9 175 +Handler_rollback 175 +Handler_update 1250 +Handler_write 250000 3 70 +Innodb_buffer_pool_bytes_data 2000000 25 +Innodb_buffer_pool_pages_flushed 15000 4 +Innodb_buffer_pool_pages_made_not_young 9000 +Innodb_buffer_pool_pages_made_young 300 +Innodb_buffer_pool_read_ahead 5 +Innodb_buffer_pool_read_requests 700000 7 70 +Innodb_buffer_pool_reads 10000 4 +Innodb_buffer_pool_write_requests 150000 1 8 +Innodb_checkpoint_max_age 4000000 45 +Innodb_data_fsyncs 7000 +Innodb_data_read 175000000 2000 80000 +Innodb_data_reads 10000 4 +Innodb_data_writes 12500 +Innodb_data_written 100000000 1250 1500 +Innodb_dblwr_pages_written 5000 +Innodb_dblwr_writes 1250 +Innodb_redo_log_uuid 500000000 6000 +Innodb_redo_log_checkpoint_lsn 17500000 200 +Innodb_redo_log_current_lsn 17500000 200 +Innodb_redo_log_flushed_to_disk_lsn 17500000 200 +Innodb_redo_log_logical_size 250 +Innodb_redo_log_physical_size 1500000 20 +Innodb_redo_log_capacity_resized 5000000 60 +Innodb_log_write_requests 150000 1 +Innodb_log_writes 4000 +Innodb_lsn_current 17500000 200 +Innodb_lsn_flushed 17500000 200 +Innodb_lsn_last_checkpoint 17500000 200 +Innodb_master_thread_active_loops 125 +Innodb_master_thread_idle_loops 30000 +Innodb_max_trx_id 2250 +Innodb_os_log_fsyncs 2500 +Innodb_os_log_written 9000000 100 +Innodb_pages_created 1250 +Innodb_pages_read 10000 4 +Innodb_pages0_read 3 +Innodb_pages_written 5000 +Innodb_purge_trx_id 2250 +Innodb_rows_inserted 35000 10 +Innodb_rows_read 225000 2 10 +Innodb_rows_updated 7 +Innodb_system_rows_deleted 700 +Innodb_system_rows_inserted 1500 +Innodb_system_rows_read 150000 1 45 +Innodb_system_rows_updated 1250 +Innodb_num_open_files 15 +Innodb_secondary_index_triggered_cluster_reads 90000 +Innodb_buffered_aio_submitted 5 +Key_read_requests 900 +Key_write_requests 500 +Key_writes 4 +Mysqlx_port 17500 +Mysqlx_ssl_ctx_verify_mode 2 +Net_buffer_length 25000 +Open_table_definitions 50 +Opened_files 20 +Opened_table_definitions 225 +Opened_tables 800 +Performance_schema_session_connect_attrs_longest_seen 90 +Queries 20000 5 +Questions 20000 5 +Select_full_join 450 +Select_scan 6000 +Slow_queries 20000 5 +Sort_rows 17500 +Sort_scan 3500 +Ssl_accepts 3 +Ssl_finished_accepts 3 +Ssl_session_cache_timeout 150 +Table_locks_immediate 600 +Table_open_cache_hits 40000 2 +Table_open_cache_misses 800 +Threads_created 2 +Uptime 90000 1 1 +rocksdb_memtable_total 2000 +rocksdb_memtable_unflushed 2000 +rocksdb_bytes_read 10 +rocksdb_bytes_written 35 +rocksdb_iter_bytes_read 6 +rocksdb_memtable_hit 1 +rocksdb_number_db_seek 2 +rocksdb_number_keys_read 2 +rocksdb_number_superversion_acquires 4 +rocksdb_wal_bytes 35 +rocksdb_wal_group_syncs 4 +rocksdb_wal_synced 6 +rocksdb_write_self 1 +rocksdb_write_wal 1 +# Table cache ################################################ + Size | 4000 + Usage | 30% +# Key Percona Server features ################################ + Table & Index Stats | Disabled + Multiple I/O Threads | Enabled + Corruption Resilient | Enabled + Durable Replication | Not Supported + Import InnoDB Tables | Not Supported + Fast Server Restarts | Not Supported + Enhanced Logging | Disabled + Replica Perf Logging | Disabled + Response Time Hist. | Not Supported + Smooth Flushing | Not Supported + HandlerSocket NoSQL | Not Supported + Fast Hash UDFs | Unknown +# Percona XtraDB Cluster ##################################### +# Plugins #################################################### + InnoDB compression | ACTIVE +# Schema ##################################################### +Specify --databases or --all-databases to dump and summarize schemas +# Noteworthy Technologies #################################### + SSL | Yes + Explicit LOCK TABLES | Yes + Delayed Insert | No + XA Transactions | No + NDB Cluster | No + Prepared Statements | No + Prepared statement count | 0 +# InnoDB ##################################################### + Version | 8.0.32-24 + Buffer Pool Size | 16.0M + Buffer Pool Fill | 25% + Buffer Pool Dirty | 0% + File Per Table | ON + Page Size | 16k + Log File Size | 2 * 5.0M = 10.0M + Log Buffer Size | 16M + Flush Method | fsync + Flush Log At Commit | 1 + XA Support | + Checksums | + Doublewrite | ON + R/W I/O Threads | 4 4 + I/O Capacity | 200 + Thread Concurrency | 0 + Concurrency Tickets | 5000 + Commit Concurrency | 0 + Txn Isolation Level | + Adaptive Flushing | ON + Adaptive Checkpoint | + Checkpoint Age | 0 + InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue + Oldest Transaction | 0 Seconds + History List Len | 0 + Read Views | 0 + Undo Log Entries | 0 transactions, 0 total undo, 0 max undo + Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads + Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites + Pending I/O Flushes | 0 buf pool, 0 log + Transaction States | 4xnot started +# RocksDB #################################################### + Block Cache Size | 512M + Block Size | 16k + Bytes Per Sync | 0 + Compaction Seq Deletes | 0 + Compaction Seq Deletes Count SD | OFF + Compaction Seq Deletes Window | 0 + Default CF Options | block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true;compaction_pri=kMinOverlappingRatio;compression=kLZ4Compression;bottommost_compression=kLZ4Compression; + Max Background Jobs | 2 + Max Block Cache Size | 0.00 + Max Block Size | 0.00 + Max Open Files | 4k + Max Total Wal Size | 2G + Rate Limiter Bytes Per Second | 0 + Rate Limiter Bytes Per Sync | 0 + Rate Limiter Wal Bytes Per Sync | 0 + Table Cache NumHardBits | 6 + Wal Bytes per Sync | 0 +# MyISAM ##################################################### + Key Cache | 5.0M + Pct Used | 20% + Unflushed | 0% +# Security ################################################### + Users | 2 users, 0 anon, 0 w/o pw, 0 old pw + Old Passwords | +# Encryption ################################################# +Keyring plugins: +'+--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+' +# Binary Logging ############################################# + Binlogs | 2 + Zero-Sized | 0 + Total Size | 3.3M + binlog_format | STATEMENT + expire_logs_days | 0 + sync_binlog | 1 + server_id | 12345 + binlog_do_db | + binlog_ignore_db | +# Noteworthy Variables ####################################### + Auto-Inc Incr/Offset | 1/1 + default_storage_engine | InnoDB + flush_time | 0 + init_connect | + init_file | /tmp/12345/mysql-init + sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION + join_buffer_size | 256k + sort_buffer_size | 256k + read_buffer_size | 128k + read_rnd_buffer_size | 256k + bulk_insert_buffer | 0.00 + max_heap_table_size | 16M + tmp_table_size | 16M + max_allowed_packet | 64M + thread_stack | 1M + log | + log_error | /tmp/12345/data/mysqld.log + log_warnings | + log_slow_queries | +log_queries_not_using_indexes | OFF + log_slave_updates | ON +# Configuration File ######################################### + Config File | /tmp/12345/my.sandbox.cnf + +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35 +datadir = /tmp/12345/data +general_log +general_log_file = genlog +innodb_buffer_pool_size = 16M +innodb_data_file_path = ibdata1:10M:autoextend +innodb_data_home_dir = /tmp/12345/data +innodb_lock_wait_timeout = 3 +innodb_log_file_size = 5M +innodb_log_group_home_dir = /tmp/12345/data +key_buffer_size = 5M +local-infile = 1 +log-bin = mysql-bin +log-error = /tmp/12345/data/mysqld.log +log_slave_updates +lower_case_table_names = 0 +relay_log = mysql-relay-bin +report-host = 127.0.0.1 +report-port = 12345 +server-id = 12345 +slow-query-log = 1 +slow-query-log-file = /tmp/12345/data/slow.log +log_slow_admin_statements = 1 +long_query_time = 0 +default_authentication_plugin = mysql_native_password +binlog_format = STATEMENT +secure-file-priv = +# Memory management library ################################## +jemalloc enabled in mysql config for process with id 1088931 +jemalloc enabled in mysql config for process with id 1089193 +jemalloc enabled in mysql config for process with id 1089375 +Using jemalloc from /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_result_report_summary.txt b/t/pt-mysql-summary/samples/expected_result_report_summary.txt index 07b59a5d2..9987088fd 100644 --- a/t/pt-mysql-summary/samples/expected_result_report_summary.txt +++ b/t/pt-mysql-summary/samples/expected_result_report_summary.txt @@ -194,6 +194,8 @@ Uptime 90000 1 1 0 users, 1 anon, 0 w/o pw, 0 old pw 0 users, 0 anon, 0 w/o pw, 0 old pw Old Passwords | OFF +# Encryption ################################################# +No keyring plugins found # Binary Logging ############################################# Binlogs | 3 Zero-Sized | 0 @@ -255,4 +257,5 @@ report-host = 127.0.0.1 report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 +# Memory management library ################################## # The End #################################################### diff --git a/t/pt-mysql-summary/samples/pt-mysql-summary.conf.001 b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.001 new file mode 100644 index 000000000..8a40801a4 --- /dev/null +++ b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.001 @@ -0,0 +1,2 @@ +user=pt-76 +password=foo&bar diff --git a/t/pt-mysql-summary/samples/pt-mysql-summary.conf.002 b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.002 new file mode 100644 index 000000000..a56c37083 --- /dev/null +++ b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.002 @@ -0,0 +1,2 @@ +user=pt-76 +password=foo#bar diff --git a/t/pt-mysql-summary/samples/pt-mysql-summary.conf.003 b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.003 new file mode 100644 index 000000000..f85d7b3c6 --- /dev/null +++ b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.003 @@ -0,0 +1,2 @@ +user=pt-76 +password=foo&bar # inline comment diff --git a/t/pt-mysql-summary/samples/pt-mysql-summary.conf.004 b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.004 new file mode 100644 index 000000000..21e9c426d --- /dev/null +++ b/t/pt-mysql-summary/samples/pt-mysql-summary.conf.004 @@ -0,0 +1,2 @@ +user=pt-76 +password=foo#bar # inline comment diff --git a/t/pt-mysql-summary/samples/temp_enc002/innodb-status b/t/pt-mysql-summary/samples/temp_enc002/innodb-status new file mode 100644 index 000000000..2067764d9 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/innodb-status @@ -0,0 +1,118 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +120323 21:05:31 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 42 seconds +----------------- +BACKGROUND THREAD +----------------- +srv_master_thread loops: 1 1_second, 1 sleeps, 0 10_second, 1 background, 1 flush +srv_master_thread log flush and writes: 128 +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 2, signal count 2 +Mutex spin waits 0, rounds 0, OS waits 0 +RW-shared spins 2, rounds 60, OS waits 2 +RW-excl spins 0, rounds 0, OS waits 0 +Spin rounds per wait: 0.00 mutex, 30.00 RW-shared, 0.00 RW-excl +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for completed aio requests (insert buffer thread) +I/O thread 1 state: waiting for completed aio requests (log thread) +I/O thread 2 state: waiting for completed aio requests (read thread) +I/O thread 3 state: waiting for completed aio requests (read thread) +I/O thread 4 state: waiting for completed aio requests (read thread) +I/O thread 5 state: waiting for completed aio requests (read thread) +I/O thread 6 state: waiting for completed aio requests (write thread) +I/O thread 7 state: waiting for completed aio requests (write thread) +I/O thread 8 state: waiting for completed aio requests (write thread) +I/O thread 9 state: waiting for completed aio requests (write thread) +Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] , + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 +Pending flushes (fsync) log: 0; buffer pool: 0 +217 OS file reads, 3 OS file writes, 3 OS fsyncs +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, 0 merges +merged operations: + insert 0, delete mark 0, delete 0 +discarded operations: + insert 0, delete mark 0, delete 0 +Hash table size 553193, node heap has 0 buffer(s) +0.00 hash searches/s, 0.00 non-hash searches/s +--- +LOG +--- +Log sequence number 1687931 +Log flushed up to 1687931 +Last checkpoint at 1687931 +Max checkpoint age 7782360 +Checkpoint age target 7539162 +Modified age 0 +Checkpoint age 0 +0 pending log writes, 0 pending chkp writes +8 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total memory allocated 137003008; in additional pool allocated 0 +Internal hash tables (constant factor + variable factor) + Adaptive hash index 2216932 (2212772 + 4160) + Page hash 69556 (buffer pool 0 only) + Dictionary cache 577764 (553912 + 23852) + File system 41920 (41336 + 584) + Lock system 166756 (166436 + 320) + Recovery system 0 (0 + 0) +Dictionary memory allocated 23852 +Buffer pool size 8191 +Buffer pool size, bytes 134201344 +Free buffers 7985 +Database pages 206 +Old database pages 0 +Modified db pages 0 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages made young 0, not young 0 +0.00 youngs/s, 0.00 non-youngs/s +Pages read 206, created 0, written 0 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s +No buffer pool page gets since the last printout +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s +LRU len: 206, unzip_LRU len: 0 +I/O sum[0]:cur[0], unzip sum[0]:cur[0] +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +1 read views open inside InnoDB +---OLDEST VIEW--- +Normal read view +Read view low limit trx n:o 1300 +Read view up limit trx id 1300 +Read view low limit trx id 1300 +Read view individually stored trx ids: +----------------- +Main thread process no. 7615, id 2772052848, state: flushing log +Number of rows inserted 0, updated 0, deleted 0, read 0 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s +------------ +TRANSACTIONS +------------ +Trx id counter 1300 +Purge done for trx's n:o < 1178 undo n:o < 0 +History list length 30 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 0, not started +MySQL thread id 496, OS thread handle 0xa7913b70, query id 4251 localhost hugmeir +SHOW /*!50000 ENGINE*/ INNODB STATUS +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc002/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc002/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-config-file b/t/pt-mysql-summary/samples/temp_enc002/mysql-config-file new file mode 100644 index 000000000..d9f9260fd --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-config-file @@ -0,0 +1,26 @@ +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ +datadir = /tmp/12345/data +key_buffer_size = 16M +innodb_buffer_pool_size = 16M +innodb_data_home_dir = /tmp/12345/data +innodb_log_group_home_dir = /tmp/12345/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_file_size = 5M +log-bin = mysql-bin +relay_log = mysql-relay-bin +log_slave_updates +server-id = 12345 +report-host = 127.0.0.1 +report-port = 12345 +log-error = mysqld.log +innodb_lock_wait_timeout = 3 diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-databases b/t/pt-mysql-summary/samples/temp_enc002/mysql-databases new file mode 100644 index 000000000..74cb18238 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-databases @@ -0,0 +1,6 @@ +information_schema +bluh +mysql +percona +performance_schema +test diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc002/mysql-master-logs new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc002/mysql-master-status new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc002/mysql-plugins new file mode 100644 index 000000000..d45f8d52a --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-plugins @@ -0,0 +1,35 @@ +binlog ACTIVE STORAGE ENGINE NULL GPL +mysql_native_password ACTIVE AUTHENTICATION NULL GPL +mysql_old_password ACTIVE AUTHENTICATION NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +INNODB_RSEG ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCKS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCK_WAITS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLESTATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_COLUMNS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FIELDS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FOREIGN ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FOREIGN_COLS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLE_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_INDEX_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_INDEX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_BLOB ACTIVE INFORMATION SCHEMA NULL GPL +XTRADB_ADMIN_COMMAND ACTIVE INFORMATION SCHEMA NULL GPL +PERFORMANCE_SCHEMA ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +partition ACTIVE STORAGE ENGINE NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc002/mysql-processlist new file mode 100644 index 000000000..fc1cbad7e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-processlist @@ -0,0 +1,12 @@ +*************************** 1. row *************************** + Id: 497 + User: hugmeir + Host: localhost + db: NULL + Command: Query + Time: 0 + State: NULL + Info: SHOW FULL PROCESSLIST + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 1 diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-slave b/t/pt-mysql-summary/samples/temp_enc002/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-status b/t/pt-mysql-summary/samples/temp_enc002/mysql-status new file mode 100644 index 000000000..656560cc0 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-status @@ -0,0 +1,370 @@ +Aborted_clients 0 +Aborted_connects 0 +Binlog_cache_disk_use 0 +Binlog_cache_use 0 +Binlog_stmt_cache_disk_use 0 +Binlog_stmt_cache_use 0 +Bytes_received 197237 +Bytes_sent 2689375 +Com_admin_commands 0 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_db_upgrade 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_procedure 0 +Com_alter_server 0 +Com_alter_table 0 +Com_alter_tablespace 0 +Com_analyze 0 +Com_begin 0 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 48 +Com_change_master 0 +Com_check 0 +Com_checksum 0 +Com_commit 0 +Com_create_db 0 +Com_create_event 0 +Com_create_function 0 +Com_create_index 0 +Com_create_procedure 0 +Com_create_server 0 +Com_create_table 0 +Com_create_trigger 0 +Com_create_udf 0 +Com_create_user 0 +Com_create_view 0 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_db 0 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_server 0 +Com_drop_table 0 +Com_drop_trigger 0 +Com_drop_user 0 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_flush 0 +Com_grant 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_insert 0 +Com_insert_select 0 +Com_install_plugin 2 +Com_kill 0 +Com_load 0 +Com_lock_tables 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 0 +Com_replace_select 0 +Com_reset 0 +Com_resignal 0 +Com_revoke 0 +Com_revoke_all 0 +Com_rollback 0 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 730 +Com_set_option 1341 +Com_signal 0 +Com_show_authors 0 +Com_show_binlog_events 0 +Com_show_binlogs 27 +Com_show_charsets 0 +Com_show_client_statistics 0 +Com_show_collations 0 +Com_show_contributors 0 +Com_show_create_db 5 +Com_show_create_event 0 +Com_show_create_func 0 +Com_show_create_proc 0 +Com_show_create_table 423 +Com_show_create_trigger 0 +Com_show_databases 32 +Com_show_engine_logs 0 +Com_show_engine_mutex 0 +Com_show_engine_status 27 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 423 +Com_show_function_status 24 +Com_show_grants 0 +Com_show_index_statistics 0 +Com_show_keys 0 +Com_show_master_status 27 +Com_show_open_tables 0 +Com_show_plugins 27 +Com_show_privileges 0 +Com_show_procedure_status 0 +Com_show_processlist 27 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_relaylog_events 0 +Com_show_slave_hosts 0 +Com_show_slave_status 27 +Com_show_slave_status_nolock 0 +Com_show_status 55 +Com_show_storage_engines 0 +Com_show_table_statistics 0 +Com_show_table_status 423 +Com_show_tables 24 +Com_show_temporary_tables 0 +Com_show_thread_statistics 0 +Com_show_triggers 0 +Com_show_user_statistics 0 +Com_show_variables 28 +Com_show_warnings 0 +Com_slave_start 0 +Com_slave_stop 0 +Com_stmt_close 0 +Com_stmt_execute 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reprepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_plugin 0 +Com_unlock_tables 0 +Com_update 0 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Compression OFF +Connections 493 +Created_tmp_disk_tables 782 +Created_tmp_files 5 +Created_tmp_tables 2836 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Flashcache_enabled OFF +Flush_commands 1 +Handler_commit 0 +Handler_delete 0 +Handler_discover 0 +Handler_prepare 0 +Handler_read_first 3 +Handler_read_key 0 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 37430 +Handler_rollback 0 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 0 +Handler_write 36070 +Innodb_adaptive_hash_cells 553193 +Innodb_adaptive_hash_heap_buffers 0 +Innodb_adaptive_hash_hash_searches 0 +Innodb_adaptive_hash_non_hash_searches 50 +Innodb_background_log_sync 128 +Innodb_buffer_pool_pages_data 206 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_pages_flushed 0 +Innodb_buffer_pool_pages_LRU_flushed 0 +Innodb_buffer_pool_pages_free 7985 +Innodb_buffer_pool_pages_made_not_young 0 +Innodb_buffer_pool_pages_made_young 0 +Innodb_buffer_pool_pages_misc 0 +Innodb_buffer_pool_pages_old 0 +Innodb_buffer_pool_pages_total 8191 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead 0 +Innodb_buffer_pool_read_ahead_evicted 0 +Innodb_buffer_pool_read_requests 1047 +Innodb_buffer_pool_reads 207 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 0 +Innodb_checkpoint_age 0 +Innodb_checkpoint_max_age 7782360 +Innodb_checkpoint_target_age 7539162 +Innodb_data_fsyncs 3 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 5574656 +Innodb_data_reads 217 +Innodb_data_writes 3 +Innodb_data_written 1536 +Innodb_dblwr_pages_written 0 +Innodb_dblwr_writes 0 +Innodb_deadlocks 0 +Innodb_dict_tables 8 +Innodb_have_atomic_builtins OFF +Innodb_history_list_length 30 +Innodb_ibuf_discarded_delete_marks 0 +Innodb_ibuf_discarded_deletes 0 +Innodb_ibuf_discarded_inserts 0 +Innodb_ibuf_free_list 0 +Innodb_ibuf_merged_delete_marks 0 +Innodb_ibuf_merged_deletes 0 +Innodb_ibuf_merged_inserts 0 +Innodb_ibuf_merges 0 +Innodb_ibuf_segment_size 2 +Innodb_ibuf_size 1 +Innodb_log_waits 0 +Innodb_log_write_requests 0 +Innodb_log_writes 1 +Innodb_lsn_current 1687931 +Innodb_lsn_flushed 1687931 +Innodb_lsn_last_checkpoint 1687931 +Innodb_master_thread_1_second_loops 1 +Innodb_master_thread_10_second_loops 0 +Innodb_master_thread_background_loops 1 +Innodb_master_thread_main_flush_loops 1 +Innodb_master_thread_sleeps 1 +Innodb_max_trx_id 4864 +Innodb_mem_adaptive_hash 2216932 +Innodb_mem_dictionary 577764 +Innodb_mem_total 137003008 +Innodb_mutex_os_waits 0 +Innodb_mutex_spin_rounds 0 +Innodb_mutex_spin_waits 0 +Innodb_oldest_view_low_limit_trx_id 4864 +Innodb_os_log_fsyncs 3 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 512 +Innodb_page_size 16384 +Innodb_pages_created 0 +Innodb_pages_read 206 +Innodb_pages_written 0 +Innodb_purge_trx_id 4472 +Innodb_purge_undo_no 0 +Innodb_row_lock_current_waits 0 +Innodb_current_row_locks 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 0 +Innodb_rows_read 0 +Innodb_rows_updated 0 +Innodb_s_lock_os_waits 2 +Innodb_s_lock_spin_rounds 60 +Innodb_s_lock_spin_waits 2 +Innodb_truncated_status_writes 0 +Innodb_x_lock_os_waits 0 +Innodb_x_lock_spin_rounds 0 +Innodb_x_lock_spin_waits 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 14497 +Key_blocks_used 0 +Key_read_requests 0 +Key_reads 0 +Key_write_requests 0 +Key_writes 0 +Last_query_cost 0.000000 +Max_used_connections 1 +Not_flushed_delayed_rows 0 +Open_files 46 +Open_streams 0 +Open_table_definitions 40 +Open_tables 40 +Opened_files 3708 +Opened_table_definitions 40 +Opened_tables 47 +Performance_schema_cond_classes_lost 0 +Performance_schema_cond_instances_lost 0 +Performance_schema_file_classes_lost 0 +Performance_schema_file_handles_lost 0 +Performance_schema_file_instances_lost 0 +Performance_schema_locker_lost 0 +Performance_schema_mutex_classes_lost 0 +Performance_schema_mutex_instances_lost 0 +Performance_schema_rwlock_classes_lost 0 +Performance_schema_rwlock_instances_lost 0 +Performance_schema_table_handles_lost 0 +Performance_schema_table_instances_lost 0 +Performance_schema_thread_classes_lost 0 +Performance_schema_thread_instances_lost 0 +Prepared_stmt_count 0 +Qcache_free_blocks 1 +Qcache_free_memory 16768384 +Qcache_hits 0 +Qcache_inserts 0 +Qcache_lowmem_prunes 0 +Qcache_not_cached 730 +Qcache_queries_in_cache 0 +Qcache_total_blocks 1 +Queries 4239 +Questions 4239 +Rpl_status AUTH_MASTER +Select_full_join 0 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 1141 +Slave_heartbeat_period 0.000 +Slave_open_temp_tables 0 +Slave_received_heartbeats 0 +Slave_retried_transactions 0 +Slave_running OFF +Slow_launch_threads 0 +Slow_queries 0 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 48 +Ssl_accept_renegotiates 0 +Ssl_accepts 0 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 0 +Ssl_ctx_verify_mode 0 +Ssl_default_timeout 0 +Ssl_finished_accepts 0 +Ssl_finished_connects 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode NONE +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 0 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 92 +Table_locks_waited 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threads_cached 0 +Threads_connected 1 +Threads_created 1 +Threads_running 1 +Uptime 94521 +Uptime_since_flush_status 94521 +binlog_commits 0 +binlog_group_commits 0 diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc002/mysql-status-defer new file mode 100644 index 000000000..34a8e3e3e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-status-defer @@ -0,0 +1,370 @@ +Aborted_clients 0 0 +Aborted_connects 0 0 +Binlog_cache_disk_use 0 0 +Binlog_cache_use 0 0 +Binlog_stmt_cache_disk_use 0 0 +Binlog_stmt_cache_use 0 0 +Bytes_received 197237 199233 +Bytes_sent 2689375 2712489 +Com_admin_commands 0 0 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_db_upgrade 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_procedure 0 0 +Com_alter_server 0 0 +Com_alter_table 0 0 +Com_alter_tablespace 0 0 +Com_analyze 0 0 +Com_begin 0 0 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 48 48 +Com_change_master 0 0 +Com_check 0 0 +Com_checksum 0 0 +Com_commit 0 0 +Com_create_db 0 0 +Com_create_event 0 0 +Com_create_function 0 0 +Com_create_index 0 0 +Com_create_procedure 0 0 +Com_create_server 0 0 +Com_create_table 0 0 +Com_create_trigger 0 0 +Com_create_udf 0 0 +Com_create_user 0 0 +Com_create_view 0 0 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_db 0 0 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_server 0 0 +Com_drop_table 0 0 +Com_drop_trigger 0 0 +Com_drop_user 0 0 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_flush 0 0 +Com_grant 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_insert 0 0 +Com_insert_select 0 0 +Com_install_plugin 2 2 +Com_kill 0 0 +Com_load 0 0 +Com_lock_tables 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 0 0 +Com_replace_select 0 0 +Com_reset 0 0 +Com_resignal 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_rollback 0 0 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 730 749 +Com_set_option 1341 1341 +Com_signal 0 0 +Com_show_authors 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 27 28 +Com_show_charsets 0 0 +Com_show_client_statistics 0 0 +Com_show_collations 0 0 +Com_show_contributors 0 0 +Com_show_create_db 5 5 +Com_show_create_event 0 0 +Com_show_create_func 0 0 +Com_show_create_proc 0 0 +Com_show_create_table 423 423 +Com_show_create_trigger 0 0 +Com_show_databases 32 33 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 0 0 +Com_show_engine_status 27 28 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 423 423 +Com_show_function_status 24 24 +Com_show_grants 0 0 +Com_show_index_statistics 0 0 +Com_show_keys 0 0 +Com_show_master_status 27 28 +Com_show_open_tables 0 0 +Com_show_plugins 27 28 +Com_show_privileges 0 0 +Com_show_procedure_status 0 0 +Com_show_processlist 27 28 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_relaylog_events 0 0 +Com_show_slave_hosts 0 0 +Com_show_slave_status 27 28 +Com_show_slave_status_nolock 0 0 +Com_show_status 55 56 +Com_show_storage_engines 0 0 +Com_show_table_statistics 0 0 +Com_show_table_status 423 423 +Com_show_tables 24 24 +Com_show_temporary_tables 0 0 +Com_show_thread_statistics 0 0 +Com_show_triggers 0 0 +Com_show_user_statistics 0 0 +Com_show_variables 28 28 +Com_show_warnings 0 0 +Com_slave_start 0 0 +Com_slave_stop 0 0 +Com_stmt_close 0 0 +Com_stmt_execute 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reprepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_tables 0 0 +Com_update 0 0 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Compression OFF OFF +Connections 493 507 +Created_tmp_disk_tables 782 793 +Created_tmp_files 5 5 +Created_tmp_tables 2836 2900 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Flashcache_enabled OFF OFF +Flush_commands 1 1 +Handler_commit 0 0 +Handler_delete 0 0 +Handler_discover 0 0 +Handler_prepare 0 0 +Handler_read_first 3 3 +Handler_read_key 0 0 +Handler_read_last 0 0 +Handler_read_next 0 0 +Handler_read_prev 0 0 +Handler_read_rnd 0 0 +Handler_read_rnd_next 37430 37852 +Handler_rollback 0 0 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 0 0 +Handler_write 36070 36481 +Innodb_adaptive_hash_cells 553193 553193 +Innodb_adaptive_hash_heap_buffers 0 0 +Innodb_adaptive_hash_hash_searches 0 0 +Innodb_adaptive_hash_non_hash_searches 50 50 +Innodb_background_log_sync 128 128 +Innodb_buffer_pool_pages_data 206 206 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_pages_flushed 0 0 +Innodb_buffer_pool_pages_LRU_flushed 0 0 +Innodb_buffer_pool_pages_free 7985 7985 +Innodb_buffer_pool_pages_made_not_young 0 0 +Innodb_buffer_pool_pages_made_young 0 0 +Innodb_buffer_pool_pages_misc 0 0 +Innodb_buffer_pool_pages_old 0 0 +Innodb_buffer_pool_pages_total 8191 8191 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead 0 0 +Innodb_buffer_pool_read_ahead_evicted 0 0 +Innodb_buffer_pool_read_requests 1047 1047 +Innodb_buffer_pool_reads 207 207 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 0 0 +Innodb_checkpoint_age 0 0 +Innodb_checkpoint_max_age 7782360 7782360 +Innodb_checkpoint_target_age 7539162 7539162 +Innodb_data_fsyncs 3 3 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 5574656 5574656 +Innodb_data_reads 217 217 +Innodb_data_writes 3 3 +Innodb_data_written 1536 1536 +Innodb_dblwr_pages_written 0 0 +Innodb_dblwr_writes 0 0 +Innodb_deadlocks 0 0 +Innodb_dict_tables 8 8 +Innodb_have_atomic_builtins OFF OFF +Innodb_history_list_length 30 30 +Innodb_ibuf_discarded_delete_marks 0 0 +Innodb_ibuf_discarded_deletes 0 0 +Innodb_ibuf_discarded_inserts 0 0 +Innodb_ibuf_free_list 0 0 +Innodb_ibuf_merged_delete_marks 0 0 +Innodb_ibuf_merged_deletes 0 0 +Innodb_ibuf_merged_inserts 0 0 +Innodb_ibuf_merges 0 0 +Innodb_ibuf_segment_size 2 2 +Innodb_ibuf_size 1 1 +Innodb_log_waits 0 0 +Innodb_log_write_requests 0 0 +Innodb_log_writes 1 1 +Innodb_lsn_current 1687931 1687931 +Innodb_lsn_flushed 1687931 1687931 +Innodb_lsn_last_checkpoint 1687931 1687931 +Innodb_master_thread_1_second_loops 1 1 +Innodb_master_thread_10_second_loops 0 0 +Innodb_master_thread_background_loops 1 1 +Innodb_master_thread_main_flush_loops 1 1 +Innodb_master_thread_sleeps 1 1 +Innodb_max_trx_id 4864 4864 +Innodb_mem_adaptive_hash 2216932 2216932 +Innodb_mem_dictionary 577764 577764 +Innodb_mem_total 137003008 137003008 +Innodb_mutex_os_waits 0 0 +Innodb_mutex_spin_rounds 0 0 +Innodb_mutex_spin_waits 0 0 +Innodb_oldest_view_low_limit_trx_id 4864 4864 +Innodb_os_log_fsyncs 3 3 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 512 512 +Innodb_page_size 16384 16384 +Innodb_pages_created 0 0 +Innodb_pages_read 206 206 +Innodb_pages_written 0 0 +Innodb_purge_trx_id 4472 4472 +Innodb_purge_undo_no 0 0 +Innodb_row_lock_current_waits 0 0 +Innodb_current_row_locks 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 0 0 +Innodb_rows_read 0 0 +Innodb_rows_updated 0 0 +Innodb_s_lock_os_waits 2 2 +Innodb_s_lock_spin_rounds 60 60 +Innodb_s_lock_spin_waits 2 2 +Innodb_truncated_status_writes 0 0 +Innodb_x_lock_os_waits 0 0 +Innodb_x_lock_spin_rounds 0 0 +Innodb_x_lock_spin_waits 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 14497 14497 +Key_blocks_used 0 0 +Key_read_requests 0 0 +Key_reads 0 0 +Key_write_requests 0 0 +Key_writes 0 0 +Last_query_cost 0.000000 0.000000 +Max_used_connections 1 1 +Not_flushed_delayed_rows 0 0 +Open_files 46 46 +Open_streams 0 0 +Open_table_definitions 40 40 +Open_tables 40 40 +Opened_files 3708 3752 +Opened_table_definitions 40 40 +Opened_tables 47 47 +Performance_schema_cond_classes_lost 0 0 +Performance_schema_cond_instances_lost 0 0 +Performance_schema_file_classes_lost 0 0 +Performance_schema_file_handles_lost 0 0 +Performance_schema_file_instances_lost 0 0 +Performance_schema_locker_lost 0 0 +Performance_schema_mutex_classes_lost 0 0 +Performance_schema_mutex_instances_lost 0 0 +Performance_schema_rwlock_classes_lost 0 0 +Performance_schema_rwlock_instances_lost 0 0 +Performance_schema_table_handles_lost 0 0 +Performance_schema_table_instances_lost 0 0 +Performance_schema_thread_classes_lost 0 0 +Performance_schema_thread_instances_lost 0 0 +Prepared_stmt_count 0 0 +Qcache_free_blocks 1 1 +Qcache_free_memory 16768384 16768384 +Qcache_hits 0 0 +Qcache_inserts 0 0 +Qcache_lowmem_prunes 0 0 +Qcache_not_cached 730 749 +Qcache_queries_in_cache 0 0 +Qcache_total_blocks 1 1 +Queries 4239 4281 +Questions 4239 4281 +Rpl_status AUTH_MASTER AUTH_MASTER +Select_full_join 0 0 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 1141 1146 +Slave_heartbeat_period 0.000 0.000 +Slave_open_temp_tables 0 0 +Slave_received_heartbeats 0 0 +Slave_retried_transactions 0 0 +Slave_running OFF OFF +Slow_launch_threads 0 0 +Slow_queries 0 0 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 0 0 +Sort_scan 48 48 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 0 0 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 0 0 +Ssl_ctx_verify_mode 0 0 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 0 0 +Ssl_finished_connects 0 0 +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode NONE NONE +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 0 0 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 92 93 +Table_locks_waited 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threads_cached 0 0 +Threads_connected 1 1 +Threads_created 1 1 +Threads_running 1 1 +Uptime 94521 94532 +Uptime_since_flush_status 94521 94532 +binlog_commits 0 0 +binlog_group_commits 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-users b/t/pt-mysql-summary/samples/temp_enc002/mysql-users new file mode 100644 index 000000000..c3eadd40f --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-users @@ -0,0 +1 @@ +6 0 1 1 diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysql-variables b/t/pt-mysql-summary/samples/temp_enc002/mysql-variables new file mode 100644 index 000000000..9f3aaf146 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysql-variables @@ -0,0 +1,372 @@ +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +back_log 50 +basedir /usr +big_tables OFF +binlog_cache_size 32768 +binlog_direct_non_transactional_updates OFF +binlog_format STATEMENT +binlog_stmt_cache_size 32768 +bulk_insert_buffer_size 8388608 +character_set_client latin1 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results latin1 +character_set_server latin1 +character_set_system utf8 +character_sets_dir /usr/share/charsets/ +collation_connection latin1_swedish_ci +collation_database latin1_swedish_ci +collation_server latin1_swedish_ci +completion_type NO_CHAIN +concurrent_insert AUTO +connect_timeout 10 +datadir /var/lib/mysql/ +date_format %Y-%m-%d +datetime_format %Y-%m-%d %H:%i:%s +default_storage_engine InnoDB +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +div_precision_increment 4 +engine_condition_pushdown ON +event_scheduler OFF +expand_fast_index_creation OFF +expire_logs_days 10 +fast_index_creation ON +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_stopword_file (built-in) +general_log OFF +general_log_file /var/lib/mysql/hugmeir.log +group_concat_max_len 1024 +have_compress YES +have_crypt YES +have_csv YES +have_dynamic_loading YES +have_geometry YES +have_innodb YES +have_ndbcluster NO +have_openssl DISABLED +have_partitioning YES +have_profiling YES +have_query_cache YES +have_response_time_distribution YES +have_rtree_keys YES +have_ssl DISABLED +have_symlink YES +hostname hugmeir +ignore_builtin_innodb OFF +init_connect +init_file +init_slave +innodb_adaptive_flushing ON +innodb_adaptive_flushing_method estimate +innodb_adaptive_hash_index ON +innodb_adaptive_hash_index_partitions 1 +innodb_additional_mem_pool_size 8388608 +innodb_autoextend_increment 8 +innodb_autoinc_lock_mode 1 +innodb_blocking_buffer_pool_restore OFF +innodb_buffer_pool_instances 1 +innodb_buffer_pool_restore_at_startup 0 +innodb_buffer_pool_shm_checksum ON +innodb_buffer_pool_shm_key 0 +innodb_buffer_pool_size 134217728 +innodb_change_buffering all +innodb_checkpoint_age_target 0 +innodb_checksums ON +innodb_commit_concurrency 0 +innodb_concurrency_tickets 500 +innodb_corrupt_table_action assert +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir +innodb_dict_size_limit 0 +innodb_doublewrite ON +innodb_doublewrite_file +innodb_fake_changes OFF +innodb_fast_checksum OFF +innodb_fast_shutdown 1 +innodb_file_format Antelope +innodb_file_format_check ON +innodb_file_format_max Antelope +innodb_file_per_table OFF +innodb_flush_log_at_trx_commit 1 +innodb_flush_method +innodb_flush_neighbor_pages area +innodb_force_load_corrupted OFF +innodb_force_recovery 0 +innodb_ibuf_accel_rate 100 +innodb_ibuf_active_contract 1 +innodb_ibuf_max_size 67092480 +innodb_import_table_from_xtrabackup 0 +innodb_io_capacity 200 +innodb_kill_idle_transaction 0 +innodb_large_prefix OFF +innodb_lazy_drop_table 0 +innodb_lock_wait_timeout 50 +innodb_locks_unsafe_for_binlog OFF +innodb_log_block_size 512 +innodb_log_buffer_size 8388608 +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir ./ +innodb_max_dirty_pages_pct 75 +innodb_max_purge_lag 0 +innodb_mirrored_log_groups 1 +innodb_old_blocks_pct 37 +innodb_old_blocks_time 0 +innodb_open_files 300 +innodb_page_size 16384 +innodb_purge_batch_size 20 +innodb_purge_threads 1 +innodb_random_read_ahead OFF +innodb_read_ahead linear +innodb_read_ahead_threshold 56 +innodb_read_io_threads 4 +innodb_recovery_stats OFF +innodb_recovery_update_relay_log OFF +innodb_replication_delay 0 +innodb_rollback_on_timeout OFF +innodb_rollback_segments 128 +innodb_show_locks_held 10 +innodb_show_verbose_locks 0 +innodb_spin_wait_delay 6 +innodb_stats_auto_update 1 +innodb_stats_method nulls_equal +innodb_stats_on_metadata ON +innodb_stats_sample_pages 8 +innodb_stats_update_need_lock 1 +innodb_strict_mode OFF +innodb_support_xa ON +innodb_sync_spin_loops 30 +innodb_table_locks ON +innodb_thread_concurrency 0 +innodb_thread_concurrency_timer_based OFF +innodb_thread_sleep_delay 10000 +innodb_use_global_flush_log_at_trx_commit ON +innodb_use_native_aio ON +innodb_use_sys_malloc ON +innodb_use_sys_stats_table OFF +innodb_version 1.1.8-rel24.1 +innodb_write_io_threads 4 +interactive_timeout 28800 +join_buffer_size 131072 +keep_files_on_create OFF +key_buffer_size 16777216 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +large_files_support ON +large_page_size 0 +large_pages OFF +lc_messages en_US +lc_messages_dir /usr/share/ +lc_time_names en_US +license GPL +local_infile ON +lock_wait_timeout 31536000 +locked_in_memory OFF +log OFF +log_bin OFF +log_bin_trust_function_creators OFF +log_error /var/log/mysql/error.log +log_output FILE +log_queries_not_using_indexes OFF +log_slave_updates OFF +log_slow_admin_statements OFF +log_slow_filter +log_slow_queries OFF +log_slow_rate_limit 1 +log_slow_slave_statements OFF +log_slow_sp_statements ON +log_slow_verbosity +log_warnings 1 +log_warnings_suppress +long_query_time 10.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +max_allowed_packet 16777216 +max_binlog_cache_size 18446744073709547520 +max_binlog_size 104857600 +max_binlog_stmt_cache_size 18446744073709547520 +max_connect_errors 10 +max_connections 151 +max_delayed_threads 20 +max_error_count 64 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 1024 +max_long_data_size 16777216 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 4294967295 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_tmp_tables 32 +max_user_connections 0 +max_write_lock_count 4294967295 +metadata_locks_cache_size 1024 +min_examined_row_limit 0 +multi_range_count 256 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 2146435072 +myisam_mmap_size 4294967295 +myisam_recover_options BACKUP +myisam_repair_threads 1 +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +net_buffer_length 16384 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +old OFF +old_alter_table OFF +old_passwords OFF +open_files_limit 1024 +optimizer_fix ON +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on +performance_schema OFF +performance_schema_events_waits_history_long_size 10000 +performance_schema_events_waits_history_size 10 +performance_schema_max_cond_classes 80 +performance_schema_max_cond_instances 1000 +performance_schema_max_file_classes 50 +performance_schema_max_file_handles 32768 +performance_schema_max_file_instances 10000 +performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 +performance_schema_max_table_handles 100000 +performance_schema_max_table_instances 50000 +performance_schema_max_thread_classes 50 +performance_schema_max_thread_instances 1000 +pid_file /var/lib/mysql/hugmeir.pid +plugin_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.5/lib/mysql/plugin +port 3306 +preload_buffer_size 32768 +profiling OFF +profiling_history_size 15 +protocol_version 10 +query_alloc_block_size 8192 +query_cache_limit 1048576 +query_cache_min_res_unit 4096 +query_cache_size 16777216 +query_cache_strip_comments OFF +query_cache_type ON +query_cache_wlock_invalidate OFF +query_prealloc_size 8192 +query_response_time_range_base 10 +query_response_time_stats OFF +range_alloc_block_size 4096 +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +relay_log +relay_log_index +relay_log_info_file relay-log.info +relay_log_purge ON +relay_log_recovery OFF +relay_log_space_limit 0 +report_host +report_password +report_port 3306 +report_user +rpl_recovery_rank 0 +secure_auth OFF +secure_file_priv +server_id 0 +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_show_database OFF +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_net_timeout 3600 +slave_skip_errors OFF +slave_transaction_retries 10 +slave_type_conversions +slow_launch_time 2 +slow_query_log OFF +slow_query_log_file /var/lib/mysql/hugmeir-slow.log +slow_query_log_timestamp_always OFF +slow_query_log_timestamp_precision second +slow_query_log_use_global_control +socket /var/run/mysqld/mysqld.sock +sort_buffer_size 2097152 +sql_auto_is_null OFF +sql_big_selects ON +sql_big_tables OFF +sql_buffer_result OFF +sql_log_bin ON +sql_log_off OFF +sql_low_priority_updates OFF +sql_max_join_size 18446744073709551615 +sql_mode +sql_notes ON +sql_quote_show_create ON +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter 0 +sql_warnings OFF +ssl_ca +ssl_capath +ssl_cert +ssl_cipher +ssl_key +storage_engine InnoDB +sync_binlog 0 +sync_frm ON +sync_master_info 0 +sync_relay_log 0 +sync_relay_log_info 0 +system_time_zone ART +table_definition_cache 400 +table_open_cache 400 +thread_cache_size 8 +thread_concurrency 10 +thread_handling one-thread-per-connection +thread_stack 196608 +thread_statistics OFF +time_format %H:%i:%s +time_zone SYSTEM +timed_mutexes OFF +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_prealloc_size 4096 +tx_isolation REPEATABLE-READ +unique_checks ON +updatable_views_with_limit YES +userstat OFF +version 5.5.20-rel24.1 +version_comment Percona Server with XtraDB (GPL), Release rel24.1, Revision 217 +version_compile_machine i686 +version_compile_os Linux +wait_timeout 28800 +pt-summary-internal-current_time 2012-03-22 18:50 +pt-summary-internal-Config_File_path /etc/mysql/my.cnf +pt-summary-internal-now 2012-03-23 21:05:32 +pt-summary-internal-user hugmeir@localhost +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 0 +pt-summary-internal-symbols Yes +pt-summary-internal-pid_file_exists diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc002/mysqld-instances new file mode 100644 index 000000000..3833905c6 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysqld-instances @@ -0,0 +1,4 @@ +root 7306 0.0 0.0 5808 1668 pts/1 S+ Mar22 0:00 sudo bin/mysqld_safe +root 7307 0.0 0.0 2048 596 pts/1 S+ Mar22 0:00 /bin/sh bin/mysqld_safe +mysql 7615 0.1 1.7 333480 36432 pts/1 Sl+ Mar22 1:43 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.5/bin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.5/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/lib/mysql/hugmeir.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 +hugmeir 19009 0.0 0.0 4456 776 pts/0 S+ 21:05 0:00 grep mysqld diff --git a/t/pt-mysql-summary/samples/temp_enc002/mysqldump b/t/pt-mysql-summary/samples/temp_enc002/mysqldump new file mode 100644 index 000000000..7161fe6ea --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc002/mysqldump @@ -0,0 +1,396 @@ + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `bluh` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `bluh`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `test` ( + `id` int(11) DEFAULT NULL, + `t_test` text, + `bi_test` binary(1) DEFAULT NULL, + `blo_test` blob +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `meh` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `meh`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `future``me` ( + `bluh` char(1) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `mysql`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `host` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` bigint(20) unsigned NOT NULL, + `updates` bigint(20) unsigned NOT NULL, + `deletes` bigint(20) unsigned NOT NULL, + `schemaops` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `plugin` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `percona` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `percona`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checksums` ( + `db` char(64) NOT NULL, + `tbl` char(64) NOT NULL, + `chunk` int(11) NOT NULL, + `chunk_time` float DEFAULT NULL, + `chunk_index` varchar(200) DEFAULT NULL, + `lower_boundary` text, + `upper_boundary` text, + `this_crc` char(40) NOT NULL, + `this_cnt` int(11) NOT NULL, + `master_crc` char(40) DEFAULT NULL, + `master_cnt` int(11) DEFAULT NULL, + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`db`,`tbl`,`chunk`), + KEY `ts_db_tbl` (`ts`,`db`,`tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `performance_schema` /*!40100 DEFAULT CHARACTER SET utf8 */; + +USE `performance_schema`; diff --git a/t/pt-mysql-summary/samples/temp_enc003/innodb-status b/t/pt-mysql-summary/samples/temp_enc003/innodb-status new file mode 100644 index 000000000..f8ebd774d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/innodb-status @@ -0,0 +1,77 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +120327 16:33:46 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 38 seconds +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 7, signal count 7 +Mutex spin waits 0, rounds 140, OS waits 7 +RW-shared spins 0, OS waits 0; RW-excl spins 0, OS waits 0 +------------ +TRANSACTIONS +------------ +Trx id counter 0 769 +Purge done for trx's n:o < 0 0 undo n:o < 0 0 +History list length 0 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 0 0, not started, process no 1529, OS thread id 2970180464 +MySQL thread id 26, query id 75 localhost msandbox +SHOW /*!50000 ENGINE*/ INNODB STATUS +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for i/o request (insert buffer thread) +I/O thread 1 state: waiting for i/o request (log thread) +I/O thread 2 state: waiting for i/o request (read thread) +I/O thread 3 state: waiting for i/o request (write thread) +Pending normal aio reads: 0, aio writes: 0, + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 +Pending flushes (fsync) log: 0; buffer pool: 0 +0 OS file reads, 38 OS file writes, 16 OS fsyncs +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, +0 inserts, 0 merged recs, 0 merges +Hash table size 69257, node heap has 1 buffer(s) +0.00 hash searches/s, 0.00 non-hash searches/s +--- +LOG +--- +Log sequence number 0 44233 +Log flushed up to 0 44233 +Last checkpoint at 0 44233 +0 pending log writes, 0 pending chkp writes +11 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total memory allocated 26533784; in additional pool allocated 858752 +Dictionary memory allocated 20888 +Buffer pool size 1024 +Free buffers 845 +Database pages 178 +Modified db pages 0 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages read 0, created 178, written 189 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s +No buffer pool page gets since the last printout +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +1 read views open inside InnoDB +Main thread process no. 1529, id 2978773872, state: waiting for server activity +Number of rows inserted 0, updated 0, deleted 0, read 0 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc003/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc003/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-config-file b/t/pt-mysql-summary/samples/temp_enc003/mysql-config-file new file mode 100644 index 000000000..d9f9260fd --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-config-file @@ -0,0 +1,26 @@ +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ +datadir = /tmp/12345/data +key_buffer_size = 16M +innodb_buffer_pool_size = 16M +innodb_data_home_dir = /tmp/12345/data +innodb_log_group_home_dir = /tmp/12345/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_file_size = 5M +log-bin = mysql-bin +relay_log = mysql-relay-bin +log_slave_updates +server-id = 12345 +report-host = 127.0.0.1 +report-port = 12345 +log-error = mysqld.log +innodb_lock_wait_timeout = 3 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-databases b/t/pt-mysql-summary/samples/temp_enc003/mysql-databases new file mode 100644 index 000000000..63edec21c --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-databases @@ -0,0 +1,2 @@ +information_schema +mysql diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc003/mysql-master-logs new file mode 100644 index 000000000..b101899ce --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-master-logs @@ -0,0 +1 @@ +mysql-bin.000001 106 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc003/mysql-master-status new file mode 100644 index 000000000..836b06fa3 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000001 106 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc003/mysql-plugins new file mode 100644 index 000000000..e6ef15eb5 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-plugins @@ -0,0 +1,10 @@ +binlog ACTIVE STORAGE ENGINE NULL GPL +partition ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc003/mysql-processlist new file mode 100644 index 000000000..74b1ceda6 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-processlist @@ -0,0 +1,9 @@ +*************************** 1. row *************************** + Id: 27 + User: msandbox + Host: localhost + db: NULL +Command: Query + Time: 0 + State: NULL + Info: SHOW FULL PROCESSLIST diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-slave b/t/pt-mysql-summary/samples/temp_enc003/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-status b/t/pt-mysql-summary/samples/temp_enc003/mysql-status new file mode 100644 index 000000000..f060b8262 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-status @@ -0,0 +1,291 @@ +Aborted_clients 0 +Aborted_connects 0 +Binlog_cache_disk_use 0 +Binlog_cache_use 0 +Bytes_received 3015 +Bytes_sent 43255 +Com_admin_commands 1 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_db_upgrade 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_procedure 0 +Com_alter_server 0 +Com_alter_table 0 +Com_alter_tablespace 0 +Com_analyze 0 +Com_backup_table 0 +Com_begin 0 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 0 +Com_change_master 0 +Com_check 0 +Com_checksum 0 +Com_commit 0 +Com_create_db 0 +Com_create_event 0 +Com_create_function 0 +Com_create_index 0 +Com_create_procedure 0 +Com_create_server 0 +Com_create_table 0 +Com_create_trigger 0 +Com_create_udf 0 +Com_create_user 0 +Com_create_view 0 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_db 0 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_server 0 +Com_drop_table 0 +Com_drop_trigger 0 +Com_drop_user 0 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_flush 0 +Com_grant 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_insert 0 +Com_insert_select 0 +Com_install_plugin 0 +Com_kill 0 +Com_load 0 +Com_load_master_data 0 +Com_load_master_table 0 +Com_lock_tables 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 0 +Com_replace_select 0 +Com_reset 0 +Com_restore_table 0 +Com_revoke 0 +Com_revoke_all 0 +Com_rollback 0 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 28 +Com_set_option 0 +Com_show_authors 0 +Com_show_binlog_events 0 +Com_show_binlogs 1 +Com_show_charsets 0 +Com_show_collations 0 +Com_show_column_types 0 +Com_show_contributors 0 +Com_show_create_db 0 +Com_show_create_event 0 +Com_show_create_func 0 +Com_show_create_proc 0 +Com_show_create_table 0 +Com_show_create_trigger 0 +Com_show_databases 1 +Com_show_engine_logs 0 +Com_show_engine_mutex 0 +Com_show_engine_status 2 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 0 +Com_show_function_status 0 +Com_show_grants 0 +Com_show_keys 0 +Com_show_master_status 1 +Com_show_new_master 0 +Com_show_open_tables 0 +Com_show_plugins 1 +Com_show_privileges 0 +Com_show_procedure_status 0 +Com_show_processlist 1 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_slave_hosts 0 +Com_show_slave_status 1 +Com_show_status 3 +Com_show_storage_engines 0 +Com_show_table_status 0 +Com_show_tables 0 +Com_show_triggers 0 +Com_show_variables 2 +Com_show_warnings 0 +Com_slave_start 0 +Com_slave_stop 0 +Com_stmt_close 0 +Com_stmt_execute 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reprepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_plugin 0 +Com_unlock_tables 0 +Com_update 0 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Compression OFF +Connections 23 +Created_tmp_disk_tables 10 +Created_tmp_files 5 +Created_tmp_tables 36 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Flush_commands 1 +Handler_commit 0 +Handler_delete 0 +Handler_discover 0 +Handler_prepare 0 +Handler_read_first 3 +Handler_read_key 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 1164 +Handler_rollback 0 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 0 +Handler_write 1142 +Innodb_buffer_pool_pages_data 178 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_pages_flushed 189 +Innodb_buffer_pool_pages_free 845 +Innodb_buffer_pool_pages_misc 1 +Innodb_buffer_pool_pages_total 1024 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead_seq 0 +Innodb_buffer_pool_read_requests 1398 +Innodb_buffer_pool_reads 0 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 1174 +Innodb_data_fsyncs 16 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 0 +Innodb_data_reads 0 +Innodb_data_writes 38 +Innodb_data_written 3400192 +Innodb_dblwr_pages_written 16 +Innodb_dblwr_writes 1 +Innodb_log_waits 0 +Innodb_log_write_requests 77 +Innodb_log_writes 4 +Innodb_os_log_fsyncs 10 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 37888 +Innodb_page_size 16384 +Innodb_pages_created 178 +Innodb_pages_read 0 +Innodb_pages_written 189 +Innodb_row_lock_current_waits 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 0 +Innodb_rows_read 0 +Innodb_rows_updated 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 14497 +Key_blocks_used 0 +Key_read_requests 0 +Key_reads 0 +Key_write_requests 0 +Key_writes 0 +Last_query_cost 0.000000 +Max_used_connections 1 +Not_flushed_delayed_rows 0 +Open_files 48 +Open_streams 0 +Open_table_definitions 23 +Open_tables 23 +Opened_files 138 +Opened_table_definitions 23 +Opened_tables 30 +Prepared_stmt_count 0 +Qcache_free_blocks 0 +Qcache_free_memory 0 +Qcache_hits 0 +Qcache_inserts 0 +Qcache_lowmem_prunes 0 +Qcache_not_cached 0 +Qcache_queries_in_cache 0 +Qcache_total_blocks 0 +Queries 63 +Questions 63 +Rpl_status NULL +Select_full_join 0 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 9 +Slave_open_temp_tables 0 +Slave_retried_transactions 0 +Slave_running OFF +Slow_launch_threads 0 +Slow_queries 0 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 0 +Ssl_accept_renegotiates 0 +Ssl_accepts 0 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 0 +Ssl_ctx_verify_mode 0 +Ssl_default_timeout 0 +Ssl_finished_accepts 0 +Ssl_finished_connects 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode NONE +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 0 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 19 +Table_locks_waited 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threads_cached 0 +Threads_connected 1 +Threads_created 22 +Threads_running 1 +Uptime 1092 +Uptime_since_flush_status 1092 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc003/mysql-status-defer new file mode 100644 index 000000000..cdf727b64 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-status-defer @@ -0,0 +1,291 @@ +Aborted_clients 0 0 +Aborted_connects 0 0 +Binlog_cache_disk_use 0 0 +Binlog_cache_use 0 0 +Bytes_received 3015 4996 +Bytes_sent 43255 59206 +Com_admin_commands 1 1 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_db_upgrade 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_procedure 0 0 +Com_alter_server 0 0 +Com_alter_table 0 0 +Com_alter_tablespace 0 0 +Com_analyze 0 0 +Com_backup_table 0 0 +Com_begin 0 0 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 0 0 +Com_change_master 0 0 +Com_check 0 0 +Com_checksum 0 0 +Com_commit 0 0 +Com_create_db 0 0 +Com_create_event 0 0 +Com_create_function 0 0 +Com_create_index 0 0 +Com_create_procedure 0 0 +Com_create_server 0 0 +Com_create_table 0 0 +Com_create_trigger 0 0 +Com_create_udf 0 0 +Com_create_user 0 0 +Com_create_view 0 0 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_db 0 0 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_server 0 0 +Com_drop_table 0 0 +Com_drop_trigger 0 0 +Com_drop_user 0 0 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_flush 0 0 +Com_grant 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_insert 0 0 +Com_insert_select 0 0 +Com_install_plugin 0 0 +Com_kill 0 0 +Com_load 0 0 +Com_load_master_data 0 0 +Com_load_master_table 0 0 +Com_lock_tables 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 0 0 +Com_replace_select 0 0 +Com_reset 0 0 +Com_restore_table 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_rollback 0 0 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 28 47 +Com_set_option 0 0 +Com_show_authors 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 1 2 +Com_show_charsets 0 0 +Com_show_collations 0 0 +Com_show_column_types 0 0 +Com_show_contributors 0 0 +Com_show_create_db 0 0 +Com_show_create_event 0 0 +Com_show_create_func 0 0 +Com_show_create_proc 0 0 +Com_show_create_table 0 0 +Com_show_create_trigger 0 0 +Com_show_databases 1 2 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 0 0 +Com_show_engine_status 2 3 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 0 0 +Com_show_function_status 0 0 +Com_show_grants 0 0 +Com_show_keys 0 0 +Com_show_master_status 1 2 +Com_show_new_master 0 0 +Com_show_open_tables 0 0 +Com_show_plugins 1 2 +Com_show_privileges 0 0 +Com_show_procedure_status 0 0 +Com_show_processlist 1 2 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_slave_hosts 0 0 +Com_show_slave_status 1 2 +Com_show_status 3 4 +Com_show_storage_engines 0 0 +Com_show_table_status 0 0 +Com_show_tables 0 0 +Com_show_triggers 0 0 +Com_show_variables 2 2 +Com_show_warnings 0 0 +Com_slave_start 0 0 +Com_slave_stop 0 0 +Com_stmt_close 0 0 +Com_stmt_execute 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reprepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_tables 0 0 +Com_update 0 0 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Compression OFF OFF +Connections 23 37 +Created_tmp_disk_tables 10 20 +Created_tmp_files 5 5 +Created_tmp_tables 36 68 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Flush_commands 1 1 +Handler_commit 0 0 +Handler_delete 0 0 +Handler_discover 0 0 +Handler_prepare 0 0 +Handler_read_first 3 3 +Handler_read_key 0 0 +Handler_read_next 0 0 +Handler_read_prev 0 0 +Handler_read_rnd 0 0 +Handler_read_rnd_next 1164 1474 +Handler_rollback 0 0 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 0 0 +Handler_write 1142 1445 +Innodb_buffer_pool_pages_data 178 178 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_pages_flushed 189 189 +Innodb_buffer_pool_pages_free 845 845 +Innodb_buffer_pool_pages_misc 1 1 +Innodb_buffer_pool_pages_total 1024 1024 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead_seq 0 0 +Innodb_buffer_pool_read_requests 1398 1398 +Innodb_buffer_pool_reads 0 0 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 1174 1174 +Innodb_data_fsyncs 16 16 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 0 0 +Innodb_data_reads 0 0 +Innodb_data_writes 38 38 +Innodb_data_written 3400192 3400192 +Innodb_dblwr_pages_written 16 16 +Innodb_dblwr_writes 1 1 +Innodb_log_waits 0 0 +Innodb_log_write_requests 77 77 +Innodb_log_writes 4 4 +Innodb_os_log_fsyncs 10 10 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 37888 37888 +Innodb_page_size 16384 16384 +Innodb_pages_created 178 178 +Innodb_pages_read 0 0 +Innodb_pages_written 189 189 +Innodb_row_lock_current_waits 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 0 0 +Innodb_rows_read 0 0 +Innodb_rows_updated 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 14497 14497 +Key_blocks_used 0 0 +Key_read_requests 0 0 +Key_reads 0 0 +Key_write_requests 0 0 +Key_writes 0 0 +Last_query_cost 0.000000 0.000000 +Max_used_connections 1 1 +Not_flushed_delayed_rows 0 0 +Open_files 48 48 +Open_streams 0 0 +Open_table_definitions 23 23 +Open_tables 23 23 +Opened_files 138 178 +Opened_table_definitions 23 23 +Opened_tables 30 30 +Prepared_stmt_count 0 0 +Qcache_free_blocks 0 0 +Qcache_free_memory 0 0 +Qcache_hits 0 0 +Qcache_inserts 0 0 +Qcache_lowmem_prunes 0 0 +Qcache_not_cached 0 0 +Qcache_queries_in_cache 0 0 +Qcache_total_blocks 0 0 +Queries 63 105 +Questions 63 105 +Rpl_status NULL NULL +Select_full_join 0 0 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 9 14 +Slave_open_temp_tables 0 0 +Slave_retried_transactions 0 0 +Slave_running OFF OFF +Slow_launch_threads 0 0 +Slow_queries 0 0 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 0 0 +Sort_scan 0 0 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 0 0 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 0 0 +Ssl_ctx_verify_mode 0 0 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 0 0 +Ssl_finished_connects 0 0 +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode NONE NONE +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 0 0 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 19 20 +Table_locks_waited 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threads_cached 0 0 +Threads_connected 1 1 +Threads_created 22 36 +Threads_running 1 1 +Uptime 1092 1102 +Uptime_since_flush_status 1092 1102 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-users b/t/pt-mysql-summary/samples/temp_enc003/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysql-variables b/t/pt-mysql-summary/samples/temp_enc003/mysql-variables new file mode 100644 index 000000000..48c9c42ea --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysql-variables @@ -0,0 +1,285 @@ +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +back_log 50 +basedir /home/vagrant/mysql-5.1.49-barebones/ +big_tables OFF +binlog_cache_size 32768 +binlog_direct_non_transactional_updates OFF +binlog_format STATEMENT +bulk_insert_buffer_size 8388608 +character_set_client latin1 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results latin1 +character_set_server latin1 +character_set_system utf8 +character_sets_dir /home/vagrant/mysql-5.1.49-barebones/share/charsets/ +collation_connection latin1_swedish_ci +collation_database latin1_swedish_ci +collation_server latin1_swedish_ci +completion_type 0 +concurrent_insert 1 +connect_timeout 10 +datadir /tmp/12345/data/ +date_format %Y-%m-%d +datetime_format %Y-%m-%d %H:%i:%s +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +div_precision_increment 4 +engine_condition_pushdown ON +error_count 0 +event_scheduler OFF +expire_logs_days 0 +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_stopword_file (built-in) +general_log OFF +general_log_file /tmp/12345/data/mysql_sandbox12345.log +group_concat_max_len 1024 +have_community_features YES +have_compress YES +have_crypt YES +have_csv YES +have_dynamic_loading YES +have_geometry YES +have_innodb YES +have_ndbcluster NO +have_openssl DISABLED +have_partitioning YES +have_query_cache YES +have_rtree_keys YES +have_ssl DISABLED +have_symlink YES +hostname vagrant-debian-squeeze +identity 0 +ignore_builtin_innodb OFF +init_connect +init_file +init_slave +innodb_adaptive_hash_index ON +innodb_additional_mem_pool_size 1048576 +innodb_autoextend_increment 8 +innodb_autoinc_lock_mode 1 +innodb_buffer_pool_size 16777216 +innodb_checksums ON +innodb_commit_concurrency 0 +innodb_concurrency_tickets 500 +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_doublewrite ON +innodb_fast_shutdown 1 +innodb_file_io_threads 4 +innodb_file_per_table OFF +innodb_flush_log_at_trx_commit 1 +innodb_flush_method +innodb_force_recovery 0 +innodb_lock_wait_timeout 3 +innodb_locks_unsafe_for_binlog OFF +innodb_log_buffer_size 1048576 +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_max_dirty_pages_pct 90 +innodb_max_purge_lag 0 +innodb_mirrored_log_groups 1 +innodb_open_files 300 +innodb_rollback_on_timeout OFF +innodb_stats_on_metadata ON +innodb_support_xa ON +innodb_sync_spin_loops 20 +innodb_table_locks ON +innodb_thread_concurrency 8 +innodb_thread_sleep_delay 10000 +innodb_use_legacy_cardinality_algorithm ON +insert_id 0 +interactive_timeout 28800 +join_buffer_size 131072 +keep_files_on_create OFF +key_buffer_size 16777216 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +language /home/vagrant/mysql-5.1.49-barebones/share/english/ +large_files_support ON +large_page_size 0 +large_pages OFF +last_insert_id 0 +lc_time_names en_US +license GPL +local_infile ON +locked_in_memory OFF +log OFF +log_bin ON +log_bin_trust_function_creators OFF +log_bin_trust_routine_creators OFF +log_error /tmp/12345/data/mysqld.log +log_output FILE +log_queries_not_using_indexes OFF +log_slave_updates ON +log_slow_queries OFF +log_warnings 1 +long_query_time 10.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +max_allowed_packet 1048576 +max_binlog_cache_size 4294963200 +max_binlog_size 1073741824 +max_connect_errors 10 +max_connections 151 +max_delayed_threads 20 +max_error_count 64 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 1024 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 4294967295 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_tmp_tables 32 +max_user_connections 0 +max_write_lock_count 4294967295 +min_examined_row_limit 0 +multi_range_count 256 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 2146435072 +myisam_mmap_size 4294967295 +myisam_recover_options OFF +myisam_repair_threads 1 +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +net_buffer_length 16384 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +old OFF +old_alter_table OFF +old_passwords OFF +open_files_limit 1024 +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/vagrant/mysql-5.1.49-barebones/lib/plugin +port 12345 +preload_buffer_size 32768 +profiling OFF +profiling_history_size 15 +protocol_version 10 +pseudo_thread_id 0 +query_alloc_block_size 8192 +query_cache_limit 1048576 +query_cache_min_res_unit 4096 +query_cache_size 0 +query_cache_type ON +query_cache_wlock_invalidate OFF +query_prealloc_size 8192 +rand_seed1 +rand_seed2 +range_alloc_block_size 4096 +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +relay_log mysql-relay-bin +relay_log_index +relay_log_info_file relay-log.info +relay_log_purge ON +relay_log_space_limit 0 +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +rpl_recovery_rank 0 +secure_auth OFF +secure_file_priv +server_id 12345 +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_show_database OFF +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_net_timeout 3600 +slave_skip_errors OFF +slave_transaction_retries 10 +slow_launch_time 2 +slow_query_log OFF +slow_query_log_file /tmp/12345/data/mysql_sandbox12345-slow.log +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 2097144 +sql_auto_is_null ON +sql_big_selects ON +sql_big_tables OFF +sql_buffer_result OFF +sql_log_bin ON +sql_log_off OFF +sql_log_update ON +sql_low_priority_updates OFF +sql_max_join_size 18446744073709551615 +sql_mode +sql_notes ON +sql_quote_show_create ON +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter +sql_warnings OFF +ssl_ca +ssl_capath +ssl_cert +ssl_cipher +ssl_key +storage_engine MyISAM +sync_binlog 0 +sync_frm ON +system_time_zone BST +table_definition_cache 256 +table_lock_wait_timeout 50 +table_open_cache 64 +table_type MyISAM +thread_cache_size 0 +thread_handling one-thread-per-connection +thread_stack 196608 +time_format %H:%i:%s +time_zone SYSTEM +timed_mutexes OFF +timestamp 1332862426 +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_prealloc_size 4096 +tx_isolation REPEATABLE-READ +unique_checks ON +updatable_views_with_limit YES +version 5.1.49-log +version_comment MySQL Community Server (GPL) +version_compile_machine i686 +version_compile_os pc-linux-gnu +wait_timeout 28800 +warning_count 0 +internal::nice_of_1529 0 +internal::oom_of_1529 0 +pt-summary-internal-current_time 2012-03-27 16:15 +pt-summary-internal-Config_File_path /tmp/12345/my.sandbox.cnf +pt-summary-internal-mysql_executable /home/vagrant/mysql-5.1.49-barebones/bin/mysql +pt-summary-internal-now 2012-03-27 16:33:46 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 0 +pt-summary-internal-symbols Yes +pt-summary-internal-pid_file_exists 1 diff --git a/t/pt-mysql-summary/samples/temp_enc003/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc003/mysqld-instances new file mode 100644 index 000000000..6aeddf49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc003/mysqld-instances @@ -0,0 +1,2 @@ + PID TTY STAT TIME COMMAND + 1529 pts/0 Sl 0:00 /home/vagrant/mysql-5.1.49-barebones/bin/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf --basedir=/home/vagrant/mysql-5.1.49-barebones --datadir=/tmp/12345/data --log-error=/tmp/12345/data/mysqld.log --pid-file=/tmp/12345/data/mysql_sandbox12345.pid --socket=/tmp/12345/mysql_sandbox12345.sock --port=12345 diff --git a/t/pt-mysql-summary/samples/temp_enc004/innodb-status b/t/pt-mysql-summary/samples/temp_enc004/innodb-status new file mode 100644 index 000000000..1e77e9daa --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/innodb-status @@ -0,0 +1,77 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +120327 9:16:44 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 26 seconds +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 3, signal count 3 +Mutex spin waits 0, rounds 20, OS waits 0 +RW-shared spins 4, OS waits 2; RW-excl spins 1, OS waits 1 +------------ +TRANSACTIONS +------------ +Trx id counter 0 1280 +Purge done for trx's n:o < 0 0 undo n:o < 0 0 +History list length 0 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 0 0, not started, process no 2837, OS thread id 3007159184 +MySQL thread id 25, query id 72 localhost msandbox +SHOW /*!50000 ENGINE*/ INNODB STATUS +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for i/o request (insert buffer thread) +I/O thread 1 state: waiting for i/o request (log thread) +I/O thread 2 state: waiting for i/o request (read thread) +I/O thread 3 state: waiting for i/o request (write thread) +Pending normal aio reads: 0, aio writes: 0, + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 +Pending flushes (fsync) log: 0; buffer pool: 0 +288 OS file reads, 3 OS file writes, 3 OS fsyncs +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, +0 inserts, 0 merged recs, 0 merges +Hash table size 69257, node heap has 0 buffer(s) +0.00 hash searches/s, 0.00 non-hash searches/s +--- +LOG +--- +Log sequence number 0 7006635 +Log flushed up to 0 7006635 +Last checkpoint at 0 7006635 +0 pending log writes, 0 pending chkp writes +8 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total memory allocated 26528202; in additional pool allocated 985216 +Dictionary memory allocated 80072 +Buffer pool size 1024 +Free buffers 815 +Database pages 209 +Modified db pages 0 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages read 209, created 0, written 0 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s +No buffer pool page gets since the last printout +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +1 read views open inside InnoDB +Main thread process no. 2837, id 2961238928, state: waiting for server activity +Number of rows inserted 0, updated 0, deleted 0, read 0 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc004/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc004/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-config-file b/t/pt-mysql-summary/samples/temp_enc004/mysql-config-file new file mode 100644 index 000000000..d9f9260fd --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-config-file @@ -0,0 +1,26 @@ +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ +datadir = /tmp/12345/data +key_buffer_size = 16M +innodb_buffer_pool_size = 16M +innodb_data_home_dir = /tmp/12345/data +innodb_log_group_home_dir = /tmp/12345/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_file_size = 5M +log-bin = mysql-bin +relay_log = mysql-relay-bin +log_slave_updates +server-id = 12345 +report-host = 127.0.0.1 +report-port = 12345 +log-error = mysqld.log +innodb_lock_wait_timeout = 3 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-databases b/t/pt-mysql-summary/samples/temp_enc004/mysql-databases new file mode 100644 index 000000000..e06f891af --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-databases @@ -0,0 +1,3 @@ +information_schema +mysql +sakila diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc004/mysql-master-logs new file mode 100644 index 000000000..48c8f0ec9 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-master-logs @@ -0,0 +1,2 @@ +mysql-bin.000001 3251612 +mysql-bin.000002 106 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc004/mysql-master-status new file mode 100644 index 000000000..ecb21440e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000002 106 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc004/mysql-plugins new file mode 100644 index 000000000..e6ef15eb5 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-plugins @@ -0,0 +1,10 @@ +binlog ACTIVE STORAGE ENGINE NULL GPL +partition ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc004/mysql-processlist new file mode 100644 index 000000000..0d8a2ba4c --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-processlist @@ -0,0 +1,9 @@ +*************************** 1. row *************************** + Id: 26 + User: msandbox + Host: localhost + db: NULL +Command: Query + Time: 0 + State: NULL + Info: SHOW FULL PROCESSLIST diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-slave b/t/pt-mysql-summary/samples/temp_enc004/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-status b/t/pt-mysql-summary/samples/temp_enc004/mysql-status new file mode 100644 index 000000000..f41344127 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-status @@ -0,0 +1,291 @@ +Aborted_clients 0 +Aborted_connects 0 +Binlog_cache_disk_use 0 +Binlog_cache_use 0 +Bytes_received 2865 +Bytes_sent 40457 +Com_admin_commands 1 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_db_upgrade 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_procedure 0 +Com_alter_server 0 +Com_alter_table 0 +Com_alter_tablespace 0 +Com_analyze 0 +Com_backup_table 0 +Com_begin 0 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 0 +Com_change_master 0 +Com_check 0 +Com_checksum 0 +Com_commit 0 +Com_create_db 0 +Com_create_event 0 +Com_create_function 0 +Com_create_index 0 +Com_create_procedure 0 +Com_create_server 0 +Com_create_table 0 +Com_create_trigger 0 +Com_create_udf 0 +Com_create_user 0 +Com_create_view 0 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_db 0 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_server 0 +Com_drop_table 0 +Com_drop_trigger 0 +Com_drop_user 0 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_flush 0 +Com_grant 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_insert 0 +Com_insert_select 0 +Com_install_plugin 0 +Com_kill 0 +Com_load 0 +Com_load_master_data 0 +Com_load_master_table 0 +Com_lock_tables 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 0 +Com_replace_select 0 +Com_reset 0 +Com_restore_table 0 +Com_revoke 0 +Com_revoke_all 0 +Com_rollback 0 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 27 +Com_set_option 0 +Com_show_authors 0 +Com_show_binlog_events 0 +Com_show_binlogs 1 +Com_show_charsets 0 +Com_show_collations 0 +Com_show_column_types 0 +Com_show_contributors 0 +Com_show_create_db 0 +Com_show_create_event 0 +Com_show_create_func 0 +Com_show_create_proc 0 +Com_show_create_table 0 +Com_show_create_trigger 0 +Com_show_databases 1 +Com_show_engine_logs 0 +Com_show_engine_mutex 0 +Com_show_engine_status 1 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 0 +Com_show_function_status 0 +Com_show_grants 0 +Com_show_keys 0 +Com_show_master_status 1 +Com_show_new_master 0 +Com_show_open_tables 0 +Com_show_plugins 1 +Com_show_privileges 0 +Com_show_procedure_status 0 +Com_show_processlist 1 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_slave_hosts 0 +Com_show_slave_status 1 +Com_show_status 3 +Com_show_storage_engines 0 +Com_show_table_status 0 +Com_show_tables 0 +Com_show_triggers 0 +Com_show_variables 2 +Com_show_warnings 0 +Com_slave_start 0 +Com_slave_stop 0 +Com_stmt_close 0 +Com_stmt_execute 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reprepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_plugin 0 +Com_unlock_tables 0 +Com_update 0 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Compression OFF +Connections 22 +Created_tmp_disk_tables 10 +Created_tmp_files 5 +Created_tmp_tables 36 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Flush_commands 1 +Handler_commit 0 +Handler_delete 0 +Handler_discover 0 +Handler_prepare 0 +Handler_read_first 3 +Handler_read_key 13 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 1171 +Handler_rollback 0 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 0 +Handler_write 1149 +Innodb_buffer_pool_pages_data 209 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_pages_flushed 0 +Innodb_buffer_pool_pages_free 815 +Innodb_buffer_pool_pages_misc 0 +Innodb_buffer_pool_pages_total 1024 +Innodb_buffer_pool_read_ahead_rnd 3 +Innodb_buffer_pool_read_ahead_seq 0 +Innodb_buffer_pool_read_requests 1803 +Innodb_buffer_pool_reads 140 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 0 +Innodb_data_fsyncs 3 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 7704576 +Innodb_data_reads 288 +Innodb_data_writes 3 +Innodb_data_written 1536 +Innodb_dblwr_pages_written 0 +Innodb_dblwr_writes 0 +Innodb_log_waits 0 +Innodb_log_write_requests 0 +Innodb_log_writes 1 +Innodb_os_log_fsyncs 3 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 512 +Innodb_page_size 16384 +Innodb_pages_created 0 +Innodb_pages_read 209 +Innodb_pages_written 0 +Innodb_row_lock_current_waits 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 0 +Innodb_rows_read 0 +Innodb_rows_updated 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 14497 +Key_blocks_used 0 +Key_read_requests 0 +Key_reads 0 +Key_write_requests 0 +Key_writes 0 +Last_query_cost 0.000000 +Max_used_connections 2 +Not_flushed_delayed_rows 0 +Open_files 50 +Open_streams 0 +Open_table_definitions 46 +Open_tables 39 +Opened_files 170 +Opened_table_definitions 39 +Opened_tables 46 +Prepared_stmt_count 0 +Qcache_free_blocks 0 +Qcache_free_memory 0 +Qcache_hits 0 +Qcache_inserts 0 +Qcache_lowmem_prunes 0 +Qcache_not_cached 0 +Qcache_queries_in_cache 0 +Qcache_total_blocks 0 +Queries 60 +Questions 60 +Rpl_status NULL +Select_full_join 0 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 9 +Slave_open_temp_tables 0 +Slave_retried_transactions 0 +Slave_running OFF +Slow_launch_threads 0 +Slow_queries 0 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 0 +Ssl_accept_renegotiates 0 +Ssl_accepts 0 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 0 +Ssl_ctx_verify_mode 0 +Ssl_default_timeout 0 +Ssl_finished_accepts 0 +Ssl_finished_connects 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode NONE +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 0 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 19 +Table_locks_waited 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threads_cached 0 +Threads_connected 1 +Threads_created 21 +Threads_running 1 +Uptime 457 +Uptime_since_flush_status 457 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc004/mysql-status-defer new file mode 100644 index 000000000..574f0670a --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-status-defer @@ -0,0 +1,291 @@ +Aborted_clients 0 0 +Aborted_connects 0 0 +Binlog_cache_disk_use 0 0 +Binlog_cache_use 0 0 +Bytes_received 2865 4845 +Bytes_sent 40457 56442 +Com_admin_commands 1 1 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_db_upgrade 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_procedure 0 0 +Com_alter_server 0 0 +Com_alter_table 0 0 +Com_alter_tablespace 0 0 +Com_analyze 0 0 +Com_backup_table 0 0 +Com_begin 0 0 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 0 0 +Com_change_master 0 0 +Com_check 0 0 +Com_checksum 0 0 +Com_commit 0 0 +Com_create_db 0 0 +Com_create_event 0 0 +Com_create_function 0 0 +Com_create_index 0 0 +Com_create_procedure 0 0 +Com_create_server 0 0 +Com_create_table 0 0 +Com_create_trigger 0 0 +Com_create_udf 0 0 +Com_create_user 0 0 +Com_create_view 0 0 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_db 0 0 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_server 0 0 +Com_drop_table 0 0 +Com_drop_trigger 0 0 +Com_drop_user 0 0 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_flush 0 0 +Com_grant 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_insert 0 0 +Com_insert_select 0 0 +Com_install_plugin 0 0 +Com_kill 0 0 +Com_load 0 0 +Com_load_master_data 0 0 +Com_load_master_table 0 0 +Com_lock_tables 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 0 0 +Com_replace_select 0 0 +Com_reset 0 0 +Com_restore_table 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_rollback 0 0 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 27 46 +Com_set_option 0 0 +Com_show_authors 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 1 2 +Com_show_charsets 0 0 +Com_show_collations 0 0 +Com_show_column_types 0 0 +Com_show_contributors 0 0 +Com_show_create_db 0 0 +Com_show_create_event 0 0 +Com_show_create_func 0 0 +Com_show_create_proc 0 0 +Com_show_create_table 0 0 +Com_show_create_trigger 0 0 +Com_show_databases 1 2 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 0 0 +Com_show_engine_status 1 2 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 0 0 +Com_show_function_status 0 0 +Com_show_grants 0 0 +Com_show_keys 0 0 +Com_show_master_status 1 2 +Com_show_new_master 0 0 +Com_show_open_tables 0 0 +Com_show_plugins 1 2 +Com_show_privileges 0 0 +Com_show_procedure_status 0 0 +Com_show_processlist 1 2 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_slave_hosts 0 0 +Com_show_slave_status 1 2 +Com_show_status 3 4 +Com_show_storage_engines 0 0 +Com_show_table_status 0 0 +Com_show_tables 0 0 +Com_show_triggers 0 0 +Com_show_variables 2 2 +Com_show_warnings 0 0 +Com_slave_start 0 0 +Com_slave_stop 0 0 +Com_stmt_close 0 0 +Com_stmt_execute 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reprepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_tables 0 0 +Com_update 0 0 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Compression OFF OFF +Connections 22 36 +Created_tmp_disk_tables 10 20 +Created_tmp_files 5 5 +Created_tmp_tables 36 68 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Flush_commands 1 1 +Handler_commit 0 0 +Handler_delete 0 0 +Handler_discover 0 0 +Handler_prepare 0 0 +Handler_read_first 3 3 +Handler_read_key 13 13 +Handler_read_next 0 0 +Handler_read_prev 0 0 +Handler_read_rnd 0 0 +Handler_read_rnd_next 1171 1488 +Handler_rollback 0 0 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 0 0 +Handler_write 1149 1459 +Innodb_buffer_pool_pages_data 209 209 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_pages_flushed 0 0 +Innodb_buffer_pool_pages_free 815 815 +Innodb_buffer_pool_pages_misc 0 0 +Innodb_buffer_pool_pages_total 1024 1024 +Innodb_buffer_pool_read_ahead_rnd 3 3 +Innodb_buffer_pool_read_ahead_seq 0 0 +Innodb_buffer_pool_read_requests 1803 1803 +Innodb_buffer_pool_reads 140 140 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 0 0 +Innodb_data_fsyncs 3 3 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 7704576 7704576 +Innodb_data_reads 288 288 +Innodb_data_writes 3 3 +Innodb_data_written 1536 1536 +Innodb_dblwr_pages_written 0 0 +Innodb_dblwr_writes 0 0 +Innodb_log_waits 0 0 +Innodb_log_write_requests 0 0 +Innodb_log_writes 1 1 +Innodb_os_log_fsyncs 3 3 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 512 512 +Innodb_page_size 16384 16384 +Innodb_pages_created 0 0 +Innodb_pages_read 209 209 +Innodb_pages_written 0 0 +Innodb_row_lock_current_waits 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 0 0 +Innodb_rows_read 0 0 +Innodb_rows_updated 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 14497 14497 +Key_blocks_used 0 0 +Key_read_requests 0 0 +Key_reads 0 0 +Key_write_requests 0 0 +Key_writes 0 0 +Last_query_cost 0.000000 0.000000 +Max_used_connections 2 2 +Not_flushed_delayed_rows 0 0 +Open_files 50 50 +Open_streams 0 0 +Open_table_definitions 46 46 +Open_tables 39 39 +Opened_files 170 211 +Opened_table_definitions 39 39 +Opened_tables 46 46 +Prepared_stmt_count 0 0 +Qcache_free_blocks 0 0 +Qcache_free_memory 0 0 +Qcache_hits 0 0 +Qcache_inserts 0 0 +Qcache_lowmem_prunes 0 0 +Qcache_not_cached 0 0 +Qcache_queries_in_cache 0 0 +Qcache_total_blocks 0 0 +Queries 60 102 +Questions 60 102 +Rpl_status NULL NULL +Select_full_join 0 0 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 9 14 +Slave_open_temp_tables 0 0 +Slave_retried_transactions 0 0 +Slave_running OFF OFF +Slow_launch_threads 0 0 +Slow_queries 0 0 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 0 0 +Sort_scan 0 0 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 0 0 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 0 0 +Ssl_ctx_verify_mode 0 0 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 0 0 +Ssl_finished_connects 0 0 +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode NONE NONE +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 0 0 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 19 20 +Table_locks_waited 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threads_cached 0 0 +Threads_connected 1 1 +Threads_created 21 35 +Threads_running 1 1 +Uptime 457 467 +Uptime_since_flush_status 457 467 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-users b/t/pt-mysql-summary/samples/temp_enc004/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysql-variables b/t/pt-mysql-summary/samples/temp_enc004/mysql-variables new file mode 100644 index 000000000..c116a1eb9 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysql-variables @@ -0,0 +1,285 @@ +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +back_log 50 +basedir /home/vagrant/mysql-5.1.49-barebones/ +big_tables OFF +binlog_cache_size 32768 +binlog_direct_non_transactional_updates OFF +binlog_format STATEMENT +bulk_insert_buffer_size 8388608 +character_set_client latin1 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results latin1 +character_set_server latin1 +character_set_system utf8 +character_sets_dir /home/vagrant/mysql-5.1.49-barebones/share/charsets/ +collation_connection latin1_swedish_ci +collation_database latin1_swedish_ci +collation_server latin1_swedish_ci +completion_type 0 +concurrent_insert 1 +connect_timeout 10 +datadir /tmp/12345/data/ +date_format %Y-%m-%d +datetime_format %Y-%m-%d %H:%i:%s +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +div_precision_increment 4 +engine_condition_pushdown ON +error_count 0 +event_scheduler OFF +expire_logs_days 0 +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_stopword_file (built-in) +general_log OFF +general_log_file /tmp/12345/data/mysql_sandbox12345.log +group_concat_max_len 1024 +have_community_features YES +have_compress YES +have_crypt YES +have_csv YES +have_dynamic_loading YES +have_geometry YES +have_innodb YES +have_ndbcluster NO +have_openssl DISABLED +have_partitioning YES +have_query_cache YES +have_rtree_keys YES +have_ssl DISABLED +have_symlink YES +hostname localhost.localdomain +identity 0 +ignore_builtin_innodb OFF +init_connect +init_file +init_slave +innodb_adaptive_hash_index ON +innodb_additional_mem_pool_size 1048576 +innodb_autoextend_increment 8 +innodb_autoinc_lock_mode 1 +innodb_buffer_pool_size 16777216 +innodb_checksums ON +innodb_commit_concurrency 0 +innodb_concurrency_tickets 500 +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_doublewrite ON +innodb_fast_shutdown 1 +innodb_file_io_threads 4 +innodb_file_per_table OFF +innodb_flush_log_at_trx_commit 1 +innodb_flush_method +innodb_force_recovery 0 +innodb_lock_wait_timeout 3 +innodb_locks_unsafe_for_binlog OFF +innodb_log_buffer_size 1048576 +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_max_dirty_pages_pct 90 +innodb_max_purge_lag 0 +innodb_mirrored_log_groups 1 +innodb_open_files 300 +innodb_rollback_on_timeout OFF +innodb_stats_on_metadata ON +innodb_support_xa ON +innodb_sync_spin_loops 20 +innodb_table_locks ON +innodb_thread_concurrency 8 +innodb_thread_sleep_delay 10000 +innodb_use_legacy_cardinality_algorithm ON +insert_id 0 +interactive_timeout 28800 +join_buffer_size 131072 +keep_files_on_create OFF +key_buffer_size 16777216 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +language /home/vagrant/mysql-5.1.49-barebones/share/english/ +large_files_support ON +large_page_size 0 +large_pages OFF +last_insert_id 0 +lc_time_names en_US +license GPL +local_infile ON +locked_in_memory OFF +log OFF +log_bin ON +log_bin_trust_function_creators OFF +log_bin_trust_routine_creators OFF +log_error /tmp/12345/data/mysqld.log +log_output FILE +log_queries_not_using_indexes OFF +log_slave_updates ON +log_slow_queries OFF +log_warnings 1 +long_query_time 10.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +max_allowed_packet 1048576 +max_binlog_cache_size 4294963200 +max_binlog_size 1073741824 +max_connect_errors 10 +max_connections 151 +max_delayed_threads 20 +max_error_count 64 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 1024 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 4294967295 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_tmp_tables 32 +max_user_connections 0 +max_write_lock_count 4294967295 +min_examined_row_limit 0 +multi_range_count 256 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 2146435072 +myisam_mmap_size 4294967295 +myisam_recover_options OFF +myisam_repair_threads 1 +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +net_buffer_length 16384 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +old OFF +old_alter_table OFF +old_passwords OFF +open_files_limit 1024 +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/vagrant/mysql-5.1.49-barebones/lib/plugin +port 12345 +preload_buffer_size 32768 +profiling OFF +profiling_history_size 15 +protocol_version 10 +pseudo_thread_id 0 +query_alloc_block_size 8192 +query_cache_limit 1048576 +query_cache_min_res_unit 4096 +query_cache_size 0 +query_cache_type ON +query_cache_wlock_invalidate OFF +query_prealloc_size 8192 +rand_seed1 +rand_seed2 +range_alloc_block_size 4096 +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +relay_log mysql-relay-bin +relay_log_index +relay_log_info_file relay-log.info +relay_log_purge ON +relay_log_space_limit 0 +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +rpl_recovery_rank 0 +secure_auth OFF +secure_file_priv +server_id 12345 +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_show_database OFF +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_net_timeout 3600 +slave_skip_errors OFF +slave_transaction_retries 10 +slow_launch_time 2 +slow_query_log OFF +slow_query_log_file /tmp/12345/data/mysql_sandbox12345-slow.log +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 2097144 +sql_auto_is_null ON +sql_big_selects ON +sql_big_tables OFF +sql_buffer_result OFF +sql_log_bin ON +sql_log_off OFF +sql_log_update ON +sql_low_priority_updates OFF +sql_max_join_size 18446744073709551615 +sql_mode +sql_notes ON +sql_quote_show_create ON +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter +sql_warnings OFF +ssl_ca +ssl_capath +ssl_cert +ssl_cipher +ssl_key +storage_engine MyISAM +sync_binlog 0 +sync_frm ON +system_time_zone CEST +table_definition_cache 256 +table_lock_wait_timeout 50 +table_open_cache 64 +table_type MyISAM +thread_cache_size 0 +thread_handling one-thread-per-connection +thread_stack 196608 +time_format %H:%i:%s +time_zone SYSTEM +timed_mutexes OFF +timestamp 1332832604 +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_prealloc_size 4096 +tx_isolation REPEATABLE-READ +unique_checks ON +updatable_views_with_limit YES +version 5.1.49-log +version_comment MySQL Community Server (GPL) +version_compile_machine i686 +version_compile_os pc-linux-gnu +wait_timeout 28800 +warning_count 0 +internal::nice_of_2837 0 +internal::oom_of_2837 0 +pt-summary-internal-current_time 2012-03-27 09:09 +pt-summary-internal-Config_File_path /tmp/12345/my.sandbox.cnf +pt-summary-internal-mysql_executable /usr/bin/mysql +pt-summary-internal-now 2012-03-27 09:16:44 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 6 +pt-summary-internal-symbols No +pt-summary-internal-pid_file_exists 1 diff --git a/t/pt-mysql-summary/samples/temp_enc004/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc004/mysqld-instances new file mode 100644 index 000000000..bc6340469 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc004/mysqld-instances @@ -0,0 +1,2 @@ + PID TTY STAT TIME COMMAND + 2837 pts/0 Sl 0:00 /home/vagrant/mysql-5.1.49-barebones/bin/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf --basedir=/home/vagrant/mysql-5.1.49-barebones --datadir=/tmp/12345/data --log-error=/tmp/12345/data/mysqld.log --pid-file=/tmp/12345/data/mysql_sandbox12345.pid --socket=/tmp/12345/mysql_sandbox12345.sock --port=12345 diff --git a/t/pt-mysql-summary/samples/temp_enc005/innodb-status b/t/pt-mysql-summary/samples/temp_enc005/innodb-status new file mode 100644 index 000000000..7b5778921 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/innodb-status @@ -0,0 +1,108 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +120330 22:33:19 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 1 seconds +----------------- +BACKGROUND THREAD +----------------- +srv_master_thread loops: 22 1_second, 22 sleeps, 2 10_second, 3 background, 3 flush +srv_master_thread log flush and writes: 25 +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 38, signal count 38 +Mutex spin waits 43, rounds 526, OS waits 12 +RW-shared spins 18, OS waits 18; RW-excl spins 0, OS waits 8 +Spin rounds per wait: 12.23 mutex, 30.00 RW-shared, 240.00 RW-excl +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for i/o request (insert buffer thread) +I/O thread 1 state: waiting for i/o request (log thread) +I/O thread 2 state: waiting for i/o request (read thread) +I/O thread 3 state: waiting for i/o request (read thread) +I/O thread 4 state: waiting for i/o request (read thread) +I/O thread 5 state: waiting for i/o request (read thread) +I/O thread 6 state: waiting for i/o request (write thread) +I/O thread 7 state: waiting for i/o request (write thread) +I/O thread 8 state: waiting for i/o request (write thread) +I/O thread 9 state: waiting for i/o request (write thread) +Pending normal aio reads: 0, aio writes: 0, + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 +Pending flushes (fsync) log: 0; buffer pool: 0 +0 OS file reads, 177 OS file writes, 96 OS fsyncs +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, +0 inserts, 0 merged recs, 0 merges +Hash table size 138337, node heap has 7 buffer(s) +0.00 hash searches/s, 0.00 non-hash searches/s +--- +LOG +--- +Log sequence number 7004601 +Log flushed up to 7004601 +Last checkpoint at 7004601 +Max checkpoint age 7782360 +Checkpoint age target 7539162 +Modified age 0 +Checkpoint age 0 +0 pending log writes, 0 pending chkp writes +69 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total memory allocated 34193408; in additional pool allocated 0 +Internal hash tables (constant factor + variable factor) + Adaptive hash index 672196 (553348 + 118848) + Page hash 17692 + Dictionary cache 227638 (139064 + 88574) + File system 41888 (41336 + 552) + Lock system 42228 (41908 + 320) + Recovery system 0 (0 + 0) + Threads 41612 (41348 + 264) +Dictionary memory allocated 88574 +Buffer pool size 2047 +Buffer pool size, bytes 33538048 +Free buffers 1512 +Database pages 528 +Old database pages 209 +Modified db pages 0 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages made young 0, not young 0 +0.00 youngs/s, 0.00 non-youngs/s +Pages read 0, created 528, written 630 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s +No buffer pool page gets since the last printout +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s +LRU len: 528, unzip_LRU len: 0 +I/O sum[0]:cur[0], unzip sum[0]:cur[0] +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +1 read views open inside InnoDB +Main thread process no. 2406, id 2894470000, state: waiting for server activity +Number of rows inserted 46273, updated 0, deleted 0, read 0 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s +------------ +TRANSACTIONS +------------ +Trx id counter 31C +Purge done for trx's n:o < 0 undo n:o < 0 +History list length 0 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 0, not started, process no 2406, OS thread id 2877283184 +MySQL thread id 445, query id 4428 localhost msandbox +SHOW /*!50000 ENGINE*/ INNODB STATUS +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc005/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc005/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-config-file b/t/pt-mysql-summary/samples/temp_enc005/mysql-config-file new file mode 100644 index 000000000..d9f9260fd --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-config-file @@ -0,0 +1,26 @@ +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ +datadir = /tmp/12345/data +key_buffer_size = 16M +innodb_buffer_pool_size = 16M +innodb_data_home_dir = /tmp/12345/data +innodb_log_group_home_dir = /tmp/12345/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_file_size = 5M +log-bin = mysql-bin +relay_log = mysql-relay-bin +log_slave_updates +server-id = 12345 +report-host = 127.0.0.1 +report-port = 12345 +log-error = mysqld.log +innodb_lock_wait_timeout = 3 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-databases b/t/pt-mysql-summary/samples/temp_enc005/mysql-databases new file mode 100644 index 000000000..e06f891af --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-databases @@ -0,0 +1,3 @@ +information_schema +mysql +sakila diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc005/mysql-master-logs new file mode 100644 index 000000000..ee85f20ad --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-master-logs @@ -0,0 +1 @@ +mysql-bin.000001 3251580 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc005/mysql-master-status new file mode 100644 index 000000000..46bcc0ef9 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000001 3251580 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc005/mysql-plugins new file mode 100644 index 000000000..6529d3024 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-plugins @@ -0,0 +1,28 @@ +binlog ACTIVE STORAGE ENGINE NULL GPL +partition ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +INNODB_RSEG ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_INDEX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_BLOB ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCKS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCK_WAITS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLE_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_INDEX_STATS ACTIVE INFORMATION SCHEMA NULL GPL +XTRADB_ADMIN_COMMAND ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_STATS ACTIVE INFORMATION SCHEMA NULL GPL +XTRADB_ENHANCEMENTS ACTIVE INFORMATION SCHEMA NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc005/mysql-processlist new file mode 100644 index 000000000..438335fed --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-processlist @@ -0,0 +1,18 @@ +*************************** 1. row *************************** + Id: 3 + User: msandbox + Host: localhost:58268 + db: NULL +Command: Binlog Dump + Time: 2872 + State: Has sent all binlog to slave; waiting for binlog to be updated + Info: NULL +*************************** 2. row *************************** + Id: 446 + User: msandbox + Host: localhost + db: NULL +Command: Query + Time: 0 + State: NULL + Info: SHOW FULL PROCESSLIST diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-slave b/t/pt-mysql-summary/samples/temp_enc005/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-status b/t/pt-mysql-summary/samples/temp_enc005/mysql-status new file mode 100644 index 000000000..41b993f45 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-status @@ -0,0 +1,304 @@ +Aborted_clients 0 +Aborted_connects 0 +Binlog_cache_disk_use 1 +Binlog_cache_use 1 +Bytes_received 3394106 +Bytes_sent 4951576 +Com_admin_commands 2 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_db_upgrade 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_procedure 0 +Com_alter_server 0 +Com_alter_table 0 +Com_alter_tablespace 0 +Com_analyze 0 +Com_backup_table 0 +Com_begin 1 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 152 +Com_change_master 0 +Com_check 0 +Com_checksum 0 +Com_commit 1 +Com_create_db 1 +Com_create_event 0 +Com_create_function 3 +Com_create_index 0 +Com_create_procedure 3 +Com_create_server 0 +Com_create_table 16 +Com_create_trigger 6 +Com_create_udf 0 +Com_create_user 0 +Com_create_view 7 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_db 1 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_server 0 +Com_drop_table 0 +Com_drop_trigger 0 +Com_drop_user 0 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_flush 0 +Com_grant 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_insert 1017 +Com_insert_select 0 +Com_install_plugin 0 +Com_kill 0 +Com_load 0 +Com_load_master_data 0 +Com_load_master_table 0 +Com_lock_tables 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 0 +Com_replace_select 0 +Com_reset 0 +Com_restore_table 0 +Com_revoke 0 +Com_revoke_all 0 +Com_rollback 0 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 751 +Com_set_option 993 +Com_show_authors 0 +Com_show_binlog_events 0 +Com_show_binlogs 17 +Com_show_charsets 0 +Com_show_client_statistics 0 +Com_show_collations 0 +Com_show_column_types 0 +Com_show_contributors 0 +Com_show_create_db 6 +Com_show_create_event 0 +Com_show_create_func 9 +Com_show_create_proc 9 +Com_show_create_table 264 +Com_show_create_trigger 18 +Com_show_databases 37 +Com_show_engine_logs 0 +Com_show_engine_mutex 0 +Com_show_engine_status 32 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 132 +Com_show_function_status 6 +Com_show_grants 0 +Com_show_index_statistics 0 +Com_show_keys 0 +Com_show_master_status 17 +Com_show_new_master 0 +Com_show_open_tables 0 +Com_show_patches 0 +Com_show_plugins 31 +Com_show_privileges 0 +Com_show_procedure_status 6 +Com_show_processlist 31 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_slave_hosts 0 +Com_show_slave_status 31 +Com_show_slave_status_nolock 0 +Com_show_status 49 +Com_show_storage_engines 0 +Com_show_table_statistics 0 +Com_show_table_status 132 +Com_show_tables 12 +Com_show_thread_statistics 0 +Com_show_temporary_tables 0 +Com_show_triggers 132 +Com_show_user_statistics 0 +Com_show_variables 33 +Com_show_warnings 0 +Com_slave_start 0 +Com_slave_stop 0 +Com_stmt_close 0 +Com_stmt_execute 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reprepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_plugin 0 +Com_unlock_tables 0 +Com_update 0 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Compression OFF +Connections 442 +Created_tmp_disk_tables 511 +Created_tmp_files 6 +Created_tmp_tables 1643 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Flashcache_enabled OFF +Flush_commands 1 +Handler_commit 43 +Handler_delete 0 +Handler_discover 0 +Handler_prepare 36 +Handler_read_first 15 +Handler_read_key 19 +Handler_read_next 72 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 28998 +Handler_rollback 0 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 0 +Handler_write 75553 +Innodb_buffer_pool_pages_data 528 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_pages_flushed 630 +Innodb_buffer_pool_pages_free 1512 +Innodb_buffer_pool_pages_misc 7 +Innodb_buffer_pool_pages_total 2047 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead 0 +Innodb_buffer_pool_read_ahead_evicted 0 +Innodb_buffer_pool_read_requests 436734 +Innodb_buffer_pool_reads 0 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 233467 +Innodb_data_fsyncs 96 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 0 +Innodb_data_reads 0 +Innodb_data_writes 177 +Innodb_data_written 24823808 +Innodb_dblwr_pages_written 456 +Innodb_deadlocks 0 +Innodb_dblwr_writes 12 +Innodb_dict_tables 23 +Innodb_have_atomic_builtins OFF +Innodb_log_waits 0 +Innodb_log_write_requests 14578 +Innodb_log_writes 52 +Innodb_os_log_fsyncs 67 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 7022080 +Innodb_page_size 16384 +Innodb_pages_created 528 +Innodb_pages_read 0 +Innodb_pages_written 630 +Innodb_row_lock_current_waits 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 46273 +Innodb_rows_read 0 +Innodb_rows_updated 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 14295 +Key_blocks_used 202 +Key_read_requests 28901 +Key_reads 0 +Key_write_requests 11127 +Key_writes 212 +Last_query_cost 0.000000 +Max_used_connections 3 +Not_flushed_delayed_rows 0 +Open_files 51 +Open_streams 0 +Open_table_definitions 46 +Open_tables 41 +Opened_files 2653 +Opened_table_definitions 64 +Opened_tables 73 +Prepared_stmt_count 0 +Qcache_free_blocks 0 +Qcache_free_memory 0 +Qcache_hits 0 +Qcache_inserts 0 +Qcache_lowmem_prunes 0 +Qcache_not_cached 0 +Qcache_queries_in_cache 0 +Qcache_total_blocks 0 +Queries 4416 +Questions 3416 +Rpl_status NULL +Select_full_join 0 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 645 +Slave_open_temp_tables 0 +Slave_retried_transactions 0 +Slave_running OFF +Slow_launch_threads 0 +Slow_queries 0 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 6 +Ssl_accept_renegotiates 0 +Ssl_accepts 0 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 0 +Ssl_ctx_verify_mode 0 +Ssl_default_timeout 0 +Ssl_finished_accepts 0 +Ssl_finished_connects 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode NONE +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 0 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 143 +Table_locks_waited 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threads_cached 0 +Threads_connected 2 +Threads_created 441 +Threads_running 2 +Uptime 2880 +Uptime_since_flush_status 2880 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc005/mysql-status-defer new file mode 100644 index 000000000..e1f81aa95 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-status-defer @@ -0,0 +1,304 @@ +Aborted_clients 0 0 +Aborted_connects 0 0 +Binlog_cache_disk_use 1 1 +Binlog_cache_use 1 1 +Bytes_received 3394106 3424450 +Bytes_sent 4951576 5180605 +Com_admin_commands 2 2 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_db_upgrade 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_procedure 0 0 +Com_alter_server 0 0 +Com_alter_table 0 0 +Com_alter_tablespace 0 0 +Com_analyze 0 0 +Com_backup_table 0 0 +Com_begin 1 1 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 152 202 +Com_change_master 0 0 +Com_check 0 0 +Com_checksum 0 0 +Com_commit 1 1 +Com_create_db 1 1 +Com_create_event 0 0 +Com_create_function 3 3 +Com_create_index 0 0 +Com_create_procedure 3 3 +Com_create_server 0 0 +Com_create_table 16 16 +Com_create_trigger 6 6 +Com_create_udf 0 0 +Com_create_user 0 0 +Com_create_view 7 7 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_db 1 1 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_server 0 0 +Com_drop_table 0 0 +Com_drop_trigger 0 0 +Com_drop_user 0 0 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_flush 0 0 +Com_grant 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_insert 1017 1017 +Com_insert_select 0 0 +Com_install_plugin 0 0 +Com_kill 0 0 +Com_load 0 0 +Com_load_master_data 0 0 +Com_load_master_table 0 0 +Com_lock_tables 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 0 0 +Com_replace_select 0 0 +Com_reset 0 0 +Com_restore_table 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_rollback 0 0 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 751 826 +Com_set_option 993 1321 +Com_show_authors 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 17 18 +Com_show_charsets 0 0 +Com_show_client_statistics 0 0 +Com_show_collations 0 0 +Com_show_column_types 0 0 +Com_show_contributors 0 0 +Com_show_create_db 6 8 +Com_show_create_event 0 0 +Com_show_create_func 9 12 +Com_show_create_proc 9 12 +Com_show_create_table 264 352 +Com_show_create_trigger 18 24 +Com_show_databases 37 40 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 0 0 +Com_show_engine_status 32 33 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 132 176 +Com_show_function_status 6 8 +Com_show_grants 0 0 +Com_show_index_statistics 0 0 +Com_show_keys 0 0 +Com_show_master_status 17 18 +Com_show_new_master 0 0 +Com_show_open_tables 0 0 +Com_show_patches 0 0 +Com_show_plugins 31 32 +Com_show_privileges 0 0 +Com_show_procedure_status 6 8 +Com_show_processlist 31 32 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_slave_hosts 0 0 +Com_show_slave_status 31 32 +Com_show_slave_status_nolock 0 0 +Com_show_status 49 50 +Com_show_storage_engines 0 0 +Com_show_table_statistics 0 0 +Com_show_table_status 132 176 +Com_show_tables 12 16 +Com_show_thread_statistics 0 0 +Com_show_temporary_tables 0 0 +Com_show_triggers 132 176 +Com_show_user_statistics 0 0 +Com_show_variables 33 33 +Com_show_warnings 0 0 +Com_slave_start 0 0 +Com_slave_stop 0 0 +Com_stmt_close 0 0 +Com_stmt_execute 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reprepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_tables 0 0 +Com_update 0 0 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Compression OFF OFF +Connections 442 457 +Created_tmp_disk_tables 511 630 +Created_tmp_files 6 6 +Created_tmp_tables 1643 1889 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Flashcache_enabled OFF OFF +Flush_commands 1 1 +Handler_commit 43 43 +Handler_delete 0 0 +Handler_discover 0 0 +Handler_prepare 36 36 +Handler_read_first 15 19 +Handler_read_key 19 25 +Handler_read_next 72 96 +Handler_read_prev 0 0 +Handler_read_rnd 0 0 +Handler_read_rnd_next 28998 29993 +Handler_rollback 0 0 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 0 0 +Handler_write 75553 76388 +Innodb_buffer_pool_pages_data 528 528 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_pages_flushed 630 630 +Innodb_buffer_pool_pages_free 1512 1512 +Innodb_buffer_pool_pages_misc 7 7 +Innodb_buffer_pool_pages_total 2047 2047 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead 0 0 +Innodb_buffer_pool_read_ahead_evicted 0 0 +Innodb_buffer_pool_read_requests 436734 437466 +Innodb_buffer_pool_reads 0 0 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 233467 233467 +Innodb_data_fsyncs 96 96 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 0 0 +Innodb_data_reads 0 0 +Innodb_data_writes 177 177 +Innodb_data_written 24823808 24823808 +Innodb_dblwr_pages_written 456 456 +Innodb_deadlocks 0 0 +Innodb_dblwr_writes 12 12 +Innodb_dict_tables 23 23 +Innodb_have_atomic_builtins OFF OFF +Innodb_log_waits 0 0 +Innodb_log_write_requests 14578 14578 +Innodb_log_writes 52 52 +Innodb_os_log_fsyncs 67 67 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 7022080 7022080 +Innodb_page_size 16384 16384 +Innodb_pages_created 528 528 +Innodb_pages_read 0 0 +Innodb_pages_written 630 630 +Innodb_row_lock_current_waits 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 46273 46273 +Innodb_rows_read 0 0 +Innodb_rows_updated 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 14295 14295 +Key_blocks_used 202 202 +Key_read_requests 28901 28929 +Key_reads 0 0 +Key_write_requests 11127 11127 +Key_writes 212 212 +Last_query_cost 0.000000 0.000000 +Max_used_connections 3 3 +Not_flushed_delayed_rows 0 0 +Open_files 51 51 +Open_streams 0 0 +Open_table_definitions 46 46 +Open_tables 41 41 +Opened_files 2653 3262 +Opened_table_definitions 64 64 +Opened_tables 73 73 +Prepared_stmt_count 0 0 +Qcache_free_blocks 0 0 +Qcache_free_memory 0 0 +Qcache_hits 0 0 +Qcache_inserts 0 0 +Qcache_lowmem_prunes 0 0 +Qcache_not_cached 0 0 +Qcache_queries_in_cache 0 0 +Qcache_total_blocks 0 0 +Queries 4416 5137 +Questions 3416 4137 +Rpl_status NULL NULL +Select_full_join 0 0 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 645 801 +Slave_open_temp_tables 0 0 +Slave_retried_transactions 0 0 +Slave_running OFF OFF +Slow_launch_threads 0 0 +Slow_queries 0 0 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 0 0 +Sort_scan 6 8 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 0 0 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 0 0 +Ssl_ctx_verify_mode 0 0 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 0 0 +Ssl_finished_connects 0 0 +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode NONE NONE +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 0 0 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 143 154 +Table_locks_waited 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threads_cached 0 0 +Threads_connected 2 2 +Threads_created 441 456 +Threads_running 2 2 +Uptime 2880 2891 +Uptime_since_flush_status 2880 2891 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-users b/t/pt-mysql-summary/samples/temp_enc005/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysql-variables b/t/pt-mysql-summary/samples/temp_enc005/mysql-variables new file mode 100644 index 000000000..830aec4f0 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysql-variables @@ -0,0 +1,363 @@ +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +back_log 50 +basedir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ +big_tables OFF +binlog_cache_size 32768 +binlog_direct_non_transactional_updates OFF +binlog_format STATEMENT +bulk_insert_buffer_size 8388608 +character_set_client latin1 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results latin1 +character_set_server latin1 +character_set_system utf8 +character_sets_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/share/mysql/charsets/ +collation_connection latin1_swedish_ci +collation_database latin1_swedish_ci +collation_server latin1_swedish_ci +completion_type 0 +concurrent_insert 1 +connect_timeout 10 +datadir /tmp/12345/data/ +date_format %Y-%m-%d +datetime_format %Y-%m-%d %H:%i:%s +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +div_precision_increment 4 +enable_query_response_time_stats OFF +engine_condition_pushdown ON +error_count 0 +event_scheduler OFF +expand_fast_index_creation OFF +expire_logs_days 0 +fast_index_creation ON +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_stopword_file (built-in) +general_log OFF +general_log_file /tmp/12345/data/mysql_sandbox12345.log +group_concat_max_len 1024 +have_community_features YES +have_compress YES +have_crypt YES +have_csv YES +have_dynamic_loading YES +have_geometry YES +have_innodb YES +have_ndbcluster NO +have_openssl DISABLED +have_partitioning YES +have_query_cache YES +have_response_time_distribution YES +have_rtree_keys YES +have_ssl DISABLED +have_symlink YES +hostname hugmeir +identity 0 +ignore_builtin_innodb OFF +init_connect +init_file +init_slave +innodb_adaptive_checkpoint estimate +innodb_adaptive_flushing OFF +innodb_adaptive_hash_index ON +innodb_additional_mem_pool_size 8388608 +innodb_auto_lru_dump 0 +innodb_autoextend_increment 8 +innodb_autoinc_lock_mode 1 +innodb_blocking_lru_restore OFF +innodb_buffer_pool_shm_checksum ON +innodb_buffer_pool_shm_key 0 +innodb_buffer_pool_size 33554432 +innodb_change_buffering inserts +innodb_checkpoint_age_target 0 +innodb_checksums ON +innodb_commit_concurrency 0 +innodb_concurrency_tickets 500 +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_dict_size_limit 0 +innodb_doublewrite ON +innodb_doublewrite_file +innodb_enable_unsafe_group_commit 0 +innodb_expand_import 0 +innodb_extra_rsegments 0 +innodb_extra_undoslots OFF +innodb_fake_changes OFF +innodb_fast_checksum OFF +innodb_fast_recovery OFF +innodb_fast_shutdown 1 +innodb_file_format Antelope +innodb_file_format_check Antelope +innodb_file_per_table OFF +innodb_flush_log_at_trx_commit 1 +innodb_flush_log_at_trx_commit_session 3 +innodb_flush_method +innodb_flush_neighbor_pages 1 +innodb_force_recovery 0 +innodb_ibuf_accel_rate 100 +innodb_ibuf_active_contract 1 +innodb_ibuf_max_size 16760832 +innodb_io_capacity 200 +innodb_kill_idle_transaction 0 +innodb_lazy_drop_table 0 +innodb_lock_wait_timeout 3 +innodb_locks_unsafe_for_binlog OFF +innodb_log_block_size 512 +innodb_log_buffer_size 8388608 +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_max_dirty_pages_pct 75 +innodb_max_purge_lag 0 +innodb_mirrored_log_groups 1 +innodb_old_blocks_pct 37 +innodb_old_blocks_time 0 +innodb_open_files 300 +innodb_overwrite_relay_log_info OFF +innodb_page_size 16384 +innodb_pass_corrupt_table 0 +innodb_random_read_ahead OFF +innodb_read_ahead linear +innodb_read_ahead_threshold 56 +innodb_read_io_threads 4 +innodb_recovery_stats OFF +innodb_replication_delay 0 +innodb_rollback_on_timeout OFF +innodb_show_locks_held 10 +innodb_show_verbose_locks 0 +innodb_spin_wait_delay 6 +innodb_stats_auto_update 1 +innodb_stats_method nulls_equal +innodb_stats_on_metadata ON +innodb_stats_sample_pages 8 +innodb_stats_update_need_lock 1 +innodb_strict_mode OFF +innodb_support_xa ON +innodb_sync_spin_loops 30 +innodb_table_locks ON +innodb_thread_concurrency 0 +innodb_thread_concurrency_timer_based OFF +innodb_thread_sleep_delay 10000 +innodb_use_purge_thread 1 +innodb_use_sys_malloc ON +innodb_use_sys_stats_table OFF +innodb_version 1.0.17-13.2 +innodb_write_io_threads 4 +insert_id 0 +interactive_timeout 28800 +join_buffer_size 131072 +keep_files_on_create OFF +key_buffer_size 16777216 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +language /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/share/mysql/english/ +large_files_support ON +large_page_size 0 +large_pages OFF +last_insert_id 0 +lc_time_names en_US +license GPL +local_infile ON +locked_in_memory OFF +log OFF +log_bin ON +log_bin_trust_function_creators OFF +log_bin_trust_routine_creators OFF +log_error /tmp/12345/data/mysqld.log +log_output FILE +log_queries_not_using_indexes OFF +log_slave_updates ON +log_slow_admin_statements OFF +log_slow_filter +log_slow_queries OFF +log_slow_rate_limit 1 +log_slow_slave_statements OFF +log_slow_sp_statements ON +log_slow_timestamp_every OFF +log_slow_verbosity microtime +log_warnings 1 +long_query_time 10.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +max_allowed_packet 1048576 +max_binlog_cache_size 4294963200 +max_binlog_size 1073741824 +max_connect_errors 10 +max_connections 151 +max_delayed_threads 20 +max_error_count 64 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 4294967295 +max_length_for_sort_data 1024 +max_long_data_size 1048576 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 4294967295 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_tmp_tables 32 +max_user_connections 0 +max_write_lock_count 4294967295 +min_examined_row_limit 0 +multi_range_count 256 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 2146435072 +myisam_mmap_size 4294967295 +myisam_recover_options OFF +myisam_repair_threads 1 +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +net_buffer_length 16384 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +old OFF +old_alter_table OFF +old_passwords OFF +open_files_limit 1024 +optimizer_fix ON +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/lib/mysql/plugin +port 12345 +preload_buffer_size 32768 +profiling OFF +profiling_history_size 15 +profiling_server OFF +profiling_use_getrusage OFF +protocol_version 10 +pseudo_thread_id 0 +query_alloc_block_size 8192 +query_cache_limit 1048576 +query_cache_min_res_unit 4096 +query_cache_size 0 +query_cache_strip_comments OFF +query_cache_type ON +query_cache_wlock_invalidate OFF +query_prealloc_size 8192 +query_response_time_range_base 10 +rand_seed1 +rand_seed2 +range_alloc_block_size 4096 +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +relay_log mysql-relay-bin +relay_log_index +relay_log_info_file relay-log.info +relay_log_purge ON +relay_log_space_limit 0 +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +rpl_recovery_rank 0 +secure_auth OFF +secure_file_priv +server_id 12345 +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_show_database OFF +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_net_timeout 3600 +slave_skip_errors OFF +slave_transaction_retries 10 +slow_launch_time 2 +slow_query_log OFF +slow_query_log_file /tmp/12345/data/mysql_sandbox12345-slow.log +slow_query_log_microseconds_timestamp OFF +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 2097144 +sql_auto_is_null ON +sql_big_selects ON +sql_big_tables OFF +sql_buffer_result OFF +sql_log_bin ON +sql_log_off OFF +sql_log_update ON +sql_low_priority_updates OFF +sql_max_join_size 4294967295 +sql_mode +sql_notes ON +sql_quote_show_create ON +sql_safe_updates OFF +sql_select_limit 4294967295 +sql_slave_skip_counter +sql_warnings OFF +ssl_ca +ssl_capath +ssl_cert +ssl_cipher +ssl_key +storage_engine MyISAM +suppress_log_warning_1592 OFF +sync_binlog 0 +sync_frm ON +system_time_zone ART +table_definition_cache 256 +table_lock_wait_timeout 50 +table_open_cache 64 +table_type MyISAM +thread_cache_size 0 +thread_handling one-thread-per-connection +thread_stack 196608 +thread_statistics OFF +time_format %H:%i:%s +time_zone SYSTEM +timed_mutexes OFF +timestamp 1333157599 +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_prealloc_size 4096 +tx_isolation REPEATABLE-READ +unique_checks ON +updatable_views_with_limit YES +use_global_log_slow_control none +use_global_long_query_time OFF +userstat_running OFF +version 5.1.61rel13.2-log +version_comment Percona Server with XtraDB (GPL), Release rel13.2, Revision 430 +version_compile_machine i686 +version_compile_os pc-linux-gnu +wait_timeout 28800 +warning_count 0 +internal::nice_of_2750 0 +internal::oom_of_2750 0 +internal::nice_of_2571 0 +internal::oom_of_2571 0 +internal::nice_of_2406 0 +internal::oom_of_2406 0 +pt-summary-internal-current_time 2012-03-30 21:45 +pt-summary-internal-Config_File_path /tmp/12345/my.sandbox.cnf +pt-summary-internal-mysql_executable /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/bin/mysql +pt-summary-internal-now 2012-03-30 22:33:19 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 6 +pt-summary-internal-mysqld_executable_1 Yes +pt-summary-internal-pid_file_exists 1 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysqld-executables b/t/pt-mysql-summary/samples/temp_enc005/mysqld-executables new file mode 100644 index 000000000..c2ce56c5f --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysqld-executables @@ -0,0 +1 @@ +/home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/libexec/mysqld diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc005/mysqld-instances new file mode 100644 index 000000000..c54e6513e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysqld-instances @@ -0,0 +1,4 @@ + PID TTY STAT TIME COMMAND + 2406 pts/1 Sl 0:10 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/libexec/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf --basedir=/home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ --datadir=/tmp/12345/data --log-error=/tmp/12345/data/mysqld.log --pid-file=/tmp/12345/data/mysql_sandbox12345.pid --socket=/tmp/12345/mysql_sandbox12345.sock --port=12345 + 2571 pts/1 Sl 0:07 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/libexec/mysqld --defaults-file=/tmp/12346/my.sandbox.cnf --basedir=/home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ --datadir=/tmp/12346/data --log-error=/tmp/12346/data/mysqld.log --pid-file=/tmp/12346/data/mysql_sandbox12346.pid --socket=/tmp/12346/mysql_sandbox12346.sock --port=12346 + 2750 pts/1 Sl 0:07 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/libexec/mysqld --defaults-file=/tmp/12347/my.sandbox.cnf --basedir=/home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-Server-5.1/ --datadir=/tmp/12347/data --log-error=/tmp/12347/data/mysqld.log --pid-file=/tmp/12347/data/mysql_sandbox12347.pid --socket=/tmp/12347/mysql_sandbox12347.sock --port=12347 diff --git a/t/pt-mysql-summary/samples/temp_enc005/mysqldump b/t/pt-mysql-summary/samples/temp_enc005/mysqldump new file mode 100644 index 000000000..531d95842 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc005/mysqldump @@ -0,0 +1,1084 @@ + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `mysql`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `host` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` bigint(20) unsigned NOT NULL, + `updates` bigint(20) unsigned NOT NULL, + `deletes` bigint(20) unsigned NOT NULL, + `schemaops` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `plugin` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `sakila` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `sakila`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `actor_info` ( + `actor_id` smallint(5) unsigned, + `first_name` varchar(45), + `last_name` varchar(45), + `film_info` varchar(341) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER customer_create_date BEFORE INSERT ON customer + FOR EACH ROW SET NEW.create_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `customer_list` ( + `ID` smallint(5) unsigned, + `name` varchar(91), + `address` varchar(50), + `zip code` varchar(10), + `phone` varchar(20), + `city` varchar(50), + `country` varchar(50), + `notes` varchar(6), + `SID` tinyint(3) unsigned +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `ins_film` AFTER INSERT ON `film` FOR EACH ROW BEGIN + INSERT INTO film_text (film_id, title, description) + VALUES (new.film_id, new.title, new.description); + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `upd_film` AFTER UPDATE ON `film` FOR EACH ROW BEGIN + IF (old.title != new.title) or (old.description != new.description) + THEN + UPDATE film_text + SET title=new.title, + description=new.description, + film_id=new.film_id + WHERE film_id=old.film_id; + END IF; + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `del_film` AFTER DELETE ON `film` FOR EACH ROW BEGIN + DELETE FROM film_text WHERE film_id = old.film_id; + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `film_list` ( + `FID` smallint(5) unsigned, + `title` varchar(255), + `description` text, + `category` varchar(25), + `price` decimal(4,2), + `length` smallint(5) unsigned, + `rating` enum('G','PG','PG-13','R','NC-17'), + `actors` varchar(341) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `nicer_but_slower_film_list` ( + `FID` smallint(5) unsigned, + `title` varchar(255), + `description` text, + `category` varchar(25), + `price` decimal(4,2), + `length` smallint(5) unsigned, + `rating` enum('G','PG','PG-13','R','NC-17'), + `actors` varchar(341) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER payment_date BEFORE INSERT ON payment + FOR EACH ROW SET NEW.payment_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER rental_date BEFORE INSERT ON rental + FOR EACH ROW SET NEW.rental_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `sales_by_film_category` ( + `category` varchar(25), + `total_sales` decimal(27,2) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `sales_by_store` ( + `store` varchar(101), + `manager` varchar(91), + `total_sales` decimal(27,2) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `staff_list` ( + `ID` tinyint(3) unsigned, + `name` varchar(91), + `address` varchar(50), + `zip code` varchar(10), + `phone` varchar(20), + `city` varchar(50), + `country` varchar(50), + `SID` tinyint(3) unsigned +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `get_customer_balance`(p_customer_id INT, p_effective_date DATETIME) RETURNS decimal(5,2) + READS SQL DATA + DETERMINISTIC +BEGIN + + + + + + + + + DECLARE v_rentfees DECIMAL(5,2); + DECLARE v_overfees INTEGER; + DECLARE v_payments DECIMAL(5,2); + + SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees + FROM film, inventory, rental + WHERE film.film_id = inventory.film_id + AND inventory.inventory_id = rental.inventory_id + AND rental.rental_date <= p_effective_date + AND rental.customer_id = p_customer_id; + + SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration, + ((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees + FROM rental, inventory, film + WHERE film.film_id = inventory.film_id + AND inventory.inventory_id = rental.inventory_id + AND rental.rental_date <= p_effective_date + AND rental.customer_id = p_customer_id; + + + SELECT IFNULL(SUM(payment.amount),0) INTO v_payments + FROM payment + + WHERE payment.payment_date <= p_effective_date + AND payment.customer_id = p_customer_id; + + RETURN v_rentfees + v_overfees - v_payments; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `inventory_held_by_customer`(p_inventory_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE v_customer_id INT; + DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL; + + SELECT customer_id INTO v_customer_id + FROM rental + WHERE return_date IS NULL + AND inventory_id = p_inventory_id; + + RETURN v_customer_id; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `inventory_in_stock`(p_inventory_id INT) RETURNS tinyint(1) + READS SQL DATA +BEGIN + DECLARE v_rentals INT; + DECLARE v_out INT; + + + + + SELECT COUNT(*) INTO v_rentals + FROM rental + WHERE inventory_id = p_inventory_id; + + IF v_rentals = 0 THEN + RETURN TRUE; + END IF; + + SELECT COUNT(rental_id) INTO v_out + FROM inventory LEFT JOIN rental USING(inventory_id) + WHERE inventory.inventory_id = p_inventory_id + AND rental.return_date IS NULL; + + IF v_out > 0 THEN + RETURN FALSE; + ELSE + RETURN TRUE; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `film_in_stock`(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) + READS SQL DATA +BEGIN + SELECT inventory_id + FROM inventory + WHERE film_id = p_film_id + AND store_id = p_store_id + AND inventory_in_stock(inventory_id); + + SELECT FOUND_ROWS() INTO p_film_count; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `film_not_in_stock`(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) + READS SQL DATA +BEGIN + SELECT inventory_id + FROM inventory + WHERE film_id = p_film_id + AND store_id = p_store_id + AND NOT inventory_in_stock(inventory_id); + + SELECT FOUND_ROWS() INTO p_film_count; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = latin1 */ ; +/*!50003 SET character_set_results = latin1 */ ; +/*!50003 SET collation_connection = latin1_swedish_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `rewards_report`( + IN min_monthly_purchases TINYINT UNSIGNED + , IN min_dollar_amount_purchased DECIMAL(10,2) UNSIGNED + , OUT count_rewardees INT +) + READS SQL DATA + COMMENT 'Provides a customizable report on best customers' +proc: BEGIN + + DECLARE last_month_start DATE; + DECLARE last_month_end DATE; + + + IF min_monthly_purchases = 0 THEN + SELECT 'Minimum monthly purchases parameter must be > 0'; + LEAVE proc; + END IF; + IF min_dollar_amount_purchased = 0.00 THEN + SELECT 'Minimum monthly dollar amount purchased parameter must be > $0.00'; + LEAVE proc; + END IF; + + + SET last_month_start = DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH); + SET last_month_start = STR_TO_DATE(CONCAT(YEAR(last_month_start),'-',MONTH(last_month_start),'-01'),'%Y-%m-%d'); + SET last_month_end = LAST_DAY(last_month_start); + + + CREATE TEMPORARY TABLE tmpCustomer (customer_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY); + + + INSERT INTO tmpCustomer (customer_id) + SELECT p.customer_id + FROM payment AS p + WHERE DATE(p.payment_date) BETWEEN last_month_start AND last_month_end + GROUP BY customer_id + HAVING SUM(p.amount) > min_dollar_amount_purchased + AND COUNT(customer_id) > min_monthly_purchases; + + + SELECT COUNT(*) FROM tmpCustomer INTO count_rewardees; + + + SELECT c.* + FROM tmpCustomer AS t + INNER JOIN customer AS c ON t.customer_id = c.customer_id; + + + DROP TABLE tmpCustomer; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; + +USE `mysql`; + +USE `sakila`; +/*!50001 DROP TABLE IF EXISTS `actor_info`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY INVOKER */ +/*!50001 VIEW `actor_info` AS select `a`.`actor_id` AS `actor_id`,`a`.`first_name` AS `first_name`,`a`.`last_name` AS `last_name`,group_concat(distinct concat(`c`.`name`,': ',(select group_concat(`f`.`title` order by `f`.`title` ASC separator ', ') from ((`film` `f` join `film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `film_actor` `fa` on((`f`.`film_id` = `fa`.`film_id`))) where ((`fc`.`category_id` = `c`.`category_id`) and (`fa`.`actor_id` = `a`.`actor_id`)))) order by `c`.`name` ASC separator '; ') AS `film_info` from (((`actor` `a` left join `film_actor` `fa` on((`a`.`actor_id` = `fa`.`actor_id`))) left join `film_category` `fc` on((`fa`.`film_id` = `fc`.`film_id`))) left join `category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `a`.`actor_id`,`a`.`first_name`,`a`.`last_name` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `customer_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `customer_list` AS select `cu`.`customer_id` AS `ID`,concat(`cu`.`first_name`,_utf8' ',`cu`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`city`.`city` AS `city`,`country`.`country` AS `country`,if(`cu`.`active`,_utf8'active',_utf8'') AS `notes`,`cu`.`store_id` AS `SID` from (((`customer` `cu` join `address` `a` on((`cu`.`address_id` = `a`.`address_id`))) join `city` on((`a`.`city_id` = `city`.`city_id`))) join `country` on((`city`.`country_id` = `country`.`country_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `film_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `film_list` AS select `film`.`film_id` AS `FID`,`film`.`title` AS `title`,`film`.`description` AS `description`,`category`.`name` AS `category`,`film`.`rental_rate` AS `price`,`film`.`length` AS `length`,`film`.`rating` AS `rating`,group_concat(concat(`actor`.`first_name`,_utf8' ',`actor`.`last_name`) separator ', ') AS `actors` from ((((`category` left join `film_category` on((`category`.`category_id` = `film_category`.`category_id`))) left join `film` on((`film_category`.`film_id` = `film`.`film_id`))) join `film_actor` on((`film`.`film_id` = `film_actor`.`film_id`))) join `actor` on((`film_actor`.`actor_id` = `actor`.`actor_id`))) group by `film`.`film_id` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `nicer_but_slower_film_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `nicer_but_slower_film_list` AS select `film`.`film_id` AS `FID`,`film`.`title` AS `title`,`film`.`description` AS `description`,`category`.`name` AS `category`,`film`.`rental_rate` AS `price`,`film`.`length` AS `length`,`film`.`rating` AS `rating`,group_concat(concat(concat(ucase(substr(`actor`.`first_name`,1,1)),lcase(substr(`actor`.`first_name`,2,length(`actor`.`first_name`))),_utf8' ',concat(ucase(substr(`actor`.`last_name`,1,1)),lcase(substr(`actor`.`last_name`,2,length(`actor`.`last_name`)))))) separator ', ') AS `actors` from ((((`category` left join `film_category` on((`category`.`category_id` = `film_category`.`category_id`))) left join `film` on((`film_category`.`film_id` = `film`.`film_id`))) join `film_actor` on((`film`.`film_id` = `film_actor`.`film_id`))) join `actor` on((`film_actor`.`actor_id` = `actor`.`actor_id`))) group by `film`.`film_id` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `sales_by_film_category`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `sales_by_film_category` AS select `c`.`name` AS `category`,sum(`p`.`amount`) AS `total_sales` from (((((`payment` `p` join `rental` `r` on((`p`.`rental_id` = `r`.`rental_id`))) join `inventory` `i` on((`r`.`inventory_id` = `i`.`inventory_id`))) join `film` `f` on((`i`.`film_id` = `f`.`film_id`))) join `film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `c`.`name` order by sum(`p`.`amount`) desc */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `sales_by_store`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `sales_by_store` AS select concat(`c`.`city`,_utf8',',`cy`.`country`) AS `store`,concat(`m`.`first_name`,_utf8' ',`m`.`last_name`) AS `manager`,sum(`p`.`amount`) AS `total_sales` from (((((((`payment` `p` join `rental` `r` on((`p`.`rental_id` = `r`.`rental_id`))) join `inventory` `i` on((`r`.`inventory_id` = `i`.`inventory_id`))) join `store` `s` on((`i`.`store_id` = `s`.`store_id`))) join `address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `city` `c` on((`a`.`city_id` = `c`.`city_id`))) join `country` `cy` on((`c`.`country_id` = `cy`.`country_id`))) join `staff` `m` on((`s`.`manager_staff_id` = `m`.`staff_id`))) group by `s`.`store_id` order by `cy`.`country`,`c`.`city` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `staff_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `staff_list` AS select `s`.`staff_id` AS `ID`,concat(`s`.`first_name`,_utf8' ',`s`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`city`.`city` AS `city`,`country`.`country` AS `country`,`s`.`store_id` AS `SID` from (((`staff` `s` join `address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `city` on((`a`.`city_id` = `city`.`city_id`))) join `country` on((`city`.`country_id` = `country`.`country_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; diff --git a/t/pt-mysql-summary/samples/temp_enc006/collect.err b/t/pt-mysql-summary/samples/temp_enc006/collect.err new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc006/innodb-status b/t/pt-mysql-summary/samples/temp_enc006/innodb-status new file mode 100644 index 000000000..d0267bb38 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/innodb-status @@ -0,0 +1,119 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +121127 17:38:42 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 53 seconds +----------------- +BACKGROUND THREAD +----------------- +srv_master_thread loops: 42 1_second, 42 sleeps, 4 10_second, 3 background, 3 flush +srv_master_thread log flush and writes: 45 +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 39, signal count 39 +Mutex spin waits 11, rounds 271, OS waits 6 +RW-shared spins 24, rounds 720, OS waits 24 +RW-excl spins 0, rounds 270, OS waits 9 +Spin rounds per wait: 24.64 mutex, 30.00 RW-shared, 270.00 RW-excl +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for completed aio requests (insert buffer thread) +I/O thread 1 state: waiting for completed aio requests (log thread) +I/O thread 2 state: waiting for completed aio requests (read thread) +I/O thread 3 state: waiting for completed aio requests (read thread) +I/O thread 4 state: waiting for completed aio requests (read thread) +I/O thread 5 state: waiting for completed aio requests (read thread) +I/O thread 6 state: waiting for completed aio requests (write thread) +I/O thread 7 state: waiting for completed aio requests (write thread) +I/O thread 8 state: waiting for completed aio requests (write thread) +I/O thread 9 state: waiting for completed aio requests (write thread) +Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] , + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 +Pending flushes (fsync) log: 0; buffer pool: 0 +0 OS file reads, 1067 OS file writes, 131 OS fsyncs +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, 0 merges +merged operations: + insert 0, delete mark 0, delete 0 +discarded operations: + insert 0, delete mark 0, delete 0 +Hash table size 138337, node heap has 7 buffer(s) +0.00 hash searches/s, 0.00 non-hash searches/s +--- +LOG +--- +Log sequence number 8809964 +Log flushed up to 8809964 +Last checkpoint at 8809964 +Max checkpoint age 7782360 +Checkpoint age target 7539162 +Modified age 0 +Checkpoint age 0 +0 pending log writes, 0 pending chkp writes +93 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total memory allocated 34062336; in additional pool allocated 0 +Internal hash tables (constant factor + variable factor) + Adaptive hash index 672196 (553348 + 118848) + Page hash 17692 (buffer pool 0 only) + Dictionary cache 221035 (139064 + 81971) + File system 41792 (41336 + 456) + Lock system 42228 (41908 + 320) + Recovery system 0 (0 + 0) +Dictionary memory allocated 81971 +Buffer pool size 2047 +Buffer pool size, bytes 33538048 +Free buffers 1332 +Database pages 708 +Old database pages 241 +Modified db pages 0 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages made young 0, not young 0 +0.00 youngs/s, 0.00 non-youngs/s +Pages read 0, created 708, written 916 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s +No buffer pool page gets since the last printout +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s +LRU len: 708, unzip_LRU len: 0 +I/O sum[0]:cur[0], unzip sum[0]:cur[0] +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +1 read views open inside InnoDB +---OLDEST VIEW--- +Normal read view +Read view low limit trx n:o 338 +Read view up limit trx id 337 +Read view low limit trx id 339 +Read view individually stored trx ids: +Read view trx id 337 +----------------- +Main thread process no. 32324, id 2710072128, state: waiting for server activity +Number of rows inserted 47315, updated 0, deleted 0, read 47274 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s +------------ +TRANSACTIONS +------------ +Trx id counter 34E +Purge done for trx's n:o < 338 undo n:o < 0 +History list length 1 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 0, not started +MySQL thread id 205, OS thread handle 0xa0822b40, query id 2462 localhost msandbox sleeping +SHOW /*!50000 ENGINE*/ INNODB STATUS +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc006/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc006/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-databases b/t/pt-mysql-summary/samples/temp_enc006/mysql-databases new file mode 100644 index 000000000..ff1205b22 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-databases @@ -0,0 +1,5 @@ +information_schema +mysql +percona_test +performance_schema +sakila diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc006/mysql-master-logs new file mode 100644 index 000000000..59d2be4d4 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-master-logs @@ -0,0 +1 @@ +mysql-bin.000001 1518742 diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc006/mysql-master-status new file mode 100644 index 000000000..04927c45e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000001 1518742 diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc006/mysql-plugins new file mode 100644 index 000000000..95fb6b175 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-plugins @@ -0,0 +1,41 @@ +binlog ACTIVE STORAGE ENGINE NULL GPL +wsrep ACTIVE STORAGE ENGINE NULL GPL +mysql_native_password ACTIVE AUTHENTICATION NULL GPL +mysql_old_password ACTIVE AUTHENTICATION NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +PERFORMANCE_SCHEMA ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +INNODB_RSEG ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_UNDO_LOGS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCKS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCK_WAITS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLESTATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_COLUMNS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FIELDS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FOREIGN ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FOREIGN_COLS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLE_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_INDEX_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_INDEX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_BLOB ACTIVE INFORMATION SCHEMA NULL GPL +XTRADB_ADMIN_COMMAND ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CHANGED_PAGES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE_LRU ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_STATS ACTIVE INFORMATION SCHEMA NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +partition ACTIVE STORAGE ENGINE NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc006/mysql-processlist new file mode 100644 index 000000000..bb3d0112e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-processlist @@ -0,0 +1,48 @@ +*************************** 1. row *************************** + Id: 1 + User: system user + Host: + db: NULL + Command: Sleep + Time: 2510 + State: NULL + Info: NULL + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 1 +*************************** 2. row *************************** + Id: 2 + User: system user + Host: + db: NULL + Command: Sleep + Time: 2510 + State: wsrep aborter idle + Info: NULL + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 1 +*************************** 3. row *************************** + Id: 3 + User: system user + Host: + db: NULL + Command: Sleep + Time: 2507 + State: NULL + Info: NULL + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 1 +*************************** 4. row *************************** + Id: 206 + User: msandbox + Host: localhost + db: NULL + Command: Query + Time: 0 + State: sleeping + Info: SHOW FULL PROCESSLIST + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 1 diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-slave b/t/pt-mysql-summary/samples/temp_enc006/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-status b/t/pt-mysql-summary/samples/temp_enc006/mysql-status new file mode 100644 index 000000000..adf1e5c1b --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-status @@ -0,0 +1,410 @@ +Aborted_clients 0 +Aborted_connects 0 +Binlog_cache_disk_use 1 +Binlog_cache_use 4 +Binlog_stmt_cache_disk_use 0 +Binlog_stmt_cache_use 1 +Bytes_received 3315595 +Bytes_sent 796598 +Com_admin_commands 1 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_db_upgrade 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_procedure 0 +Com_alter_server 0 +Com_alter_table 2 +Com_alter_tablespace 0 +Com_analyze 0 +Com_begin 1 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 59 +Com_change_master 0 +Com_check 0 +Com_checksum 1 +Com_commit 2 +Com_create_db 2 +Com_create_event 0 +Com_create_function 3 +Com_create_index 0 +Com_create_procedure 3 +Com_create_server 0 +Com_create_table 19 +Com_create_trigger 6 +Com_create_udf 0 +Com_create_user 0 +Com_create_view 7 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_db 1 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_server 0 +Com_drop_table 1 +Com_drop_trigger 0 +Com_drop_user 0 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_flush 2 +Com_grant 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_insert 1059 +Com_insert_select 0 +Com_install_plugin 0 +Com_kill 0 +Com_load 1 +Com_lock_tables 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 0 +Com_replace_select 0 +Com_reset 0 +Com_resignal 0 +Com_revoke 0 +Com_revoke_all 0 +Com_rollback 1 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 326 +Com_set_option 373 +Com_signal 0 +Com_show_authors 0 +Com_show_binlog_events 0 +Com_show_binlogs 11 +Com_show_charsets 0 +Com_show_client_statistics 0 +Com_show_collations 0 +Com_show_contributors 0 +Com_show_create_db 3 +Com_show_create_event 0 +Com_show_create_func 3 +Com_show_create_proc 3 +Com_show_create_table 96 +Com_show_create_trigger 6 +Com_show_databases 13 +Com_show_engine_logs 0 +Com_show_engine_mutex 0 +Com_show_engine_status 12 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 48 +Com_show_function_status 3 +Com_show_grants 0 +Com_show_index_statistics 0 +Com_show_keys 0 +Com_show_master_status 11 +Com_show_open_tables 0 +Com_show_plugins 11 +Com_show_privileges 0 +Com_show_procedure_status 3 +Com_show_processlist 11 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_relaylog_events 0 +Com_show_slave_hosts 0 +Com_show_slave_status 11 +Com_show_slave_status_nolock 0 +Com_show_status 18 +Com_show_storage_engines 0 +Com_show_table_statistics 0 +Com_show_table_status 48 +Com_show_tables 7 +Com_show_temporary_tables 0 +Com_show_thread_statistics 0 +Com_show_triggers 48 +Com_show_user_statistics 0 +Com_show_variables 12 +Com_show_warnings 0 +Com_slave_start 0 +Com_slave_stop 0 +Com_stmt_close 0 +Com_stmt_execute 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reprepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_plugin 0 +Com_unlock_tables 0 +Com_update 1 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Compression OFF +Connections 202 +Created_tmp_disk_tables 242 +Created_tmp_files 7 +Created_tmp_tables 976 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Flashcache_enabled OFF +Flush_commands 3 +Handler_commit 220 +Handler_delete 0 +Handler_discover 0 +Handler_prepare 183 +Handler_read_first 26 +Handler_read_key 23 +Handler_read_last 0 +Handler_read_next 36 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 61902 +Handler_rollback 32 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 6 +Handler_write 59905 +Innodb_adaptive_hash_cells 138337 +Innodb_adaptive_hash_heap_buffers 6 +Innodb_adaptive_hash_hash_searches 129190 +Innodb_adaptive_hash_non_hash_searches 53308 +Innodb_background_log_sync 45 +Innodb_buffer_pool_pages_data 708 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_pages_flushed 916 +Innodb_buffer_pool_pages_LRU_flushed 0 +Innodb_buffer_pool_pages_free 1332 +Innodb_buffer_pool_pages_made_not_young 0 +Innodb_buffer_pool_pages_made_young 0 +Innodb_buffer_pool_pages_misc 7 +Innodb_buffer_pool_pages_old 241 +Innodb_buffer_pool_pages_total 2047 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead 0 +Innodb_buffer_pool_read_ahead_evicted 0 +Innodb_buffer_pool_read_requests 447048 +Innodb_buffer_pool_reads 0 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 236593 +Innodb_checkpoint_age 0 +Innodb_checkpoint_max_age 7782360 +Innodb_checkpoint_target_age 7539162 +Innodb_data_fsyncs 131 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 0 +Innodb_data_reads 0 +Innodb_data_writes 1067 +Innodb_data_written 36013056 +Innodb_dblwr_pages_written 742 +Innodb_dblwr_writes 17 +Innodb_deadlocks 0 +Innodb_dict_tables 27 +Innodb_have_atomic_builtins ON +Innodb_history_list_length 1 +Innodb_ibuf_discarded_delete_marks 0 +Innodb_ibuf_discarded_deletes 0 +Innodb_ibuf_discarded_inserts 0 +Innodb_ibuf_free_list 0 +Innodb_ibuf_merged_delete_marks 0 +Innodb_ibuf_merged_deletes 0 +Innodb_ibuf_merged_inserts 0 +Innodb_ibuf_merges 0 +Innodb_ibuf_segment_size 2 +Innodb_ibuf_size 1 +Innodb_log_waits 0 +Innodb_log_write_requests 18226 +Innodb_log_writes 70 +Innodb_lsn_current 8809964 +Innodb_lsn_flushed 8809964 +Innodb_lsn_last_checkpoint 8809964 +Innodb_master_thread_1_second_loops 42 +Innodb_master_thread_10_second_loops 4 +Innodb_master_thread_background_loops 3 +Innodb_master_thread_main_flush_loops 3 +Innodb_master_thread_sleeps 42 +Innodb_max_trx_id 846 +Innodb_mem_adaptive_hash 672196 +Innodb_mem_dictionary 221035 +Innodb_mem_total 34062336 +Innodb_mutex_os_waits 6 +Innodb_mutex_spin_rounds 271 +Innodb_mutex_spin_waits 11 +Innodb_oldest_view_low_limit_trx_id 825 +Innodb_os_log_fsyncs 93 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 8836608 +Innodb_page_size 16384 +Innodb_pages_created 708 +Innodb_pages_read 0 +Innodb_pages_written 916 +Innodb_purge_trx_id 824 +Innodb_purge_undo_no 0 +Innodb_row_lock_current_waits 0 +Innodb_current_row_locks 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 47315 +Innodb_rows_read 47274 +Innodb_rows_updated 0 +Innodb_s_lock_os_waits 24 +Innodb_s_lock_spin_rounds 720 +Innodb_s_lock_spin_waits 24 +Innodb_truncated_status_writes 0 +Innodb_x_lock_os_waits 9 +Innodb_x_lock_spin_rounds 270 +Innodb_x_lock_spin_waits 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 14495 +Key_blocks_used 2 +Key_read_requests 47 +Key_reads 1 +Key_write_requests 12 +Key_writes 12 +Last_query_cost 0.000000 +Max_used_connections 4 +Not_flushed_delayed_rows 0 +Open_files 51 +Open_streams 0 +Open_table_definitions 50 +Open_tables 45 +Opened_files 1349 +Opened_table_definitions 107 +Opened_tables 109 +Performance_schema_cond_classes_lost 0 +Performance_schema_cond_instances_lost 0 +Performance_schema_file_classes_lost 0 +Performance_schema_file_handles_lost 0 +Performance_schema_file_instances_lost 0 +Performance_schema_locker_lost 0 +Performance_schema_mutex_classes_lost 0 +Performance_schema_mutex_instances_lost 0 +Performance_schema_rwlock_classes_lost 0 +Performance_schema_rwlock_instances_lost 0 +Performance_schema_table_handles_lost 0 +Performance_schema_table_instances_lost 0 +Performance_schema_thread_classes_lost 0 +Performance_schema_thread_instances_lost 0 +Prepared_stmt_count 0 +Qcache_free_blocks 0 +Qcache_free_memory 0 +Qcache_hits 0 +Qcache_inserts 0 +Qcache_lowmem_prunes 0 +Qcache_not_cached 0 +Qcache_queries_in_cache 0 +Qcache_total_blocks 0 +Queries 2450 +Questions 1450 +Rpl_status AUTH_MASTER +Select_full_join 0 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 243 +Slave_heartbeat_period 0.000 +Slave_open_temp_tables 0 +Slave_received_heartbeats 0 +Slave_retried_transactions 0 +Slave_running OFF +Slow_launch_threads 0 +Slow_queries 0 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 2 +Ssl_accept_renegotiates 0 +Ssl_accepts 0 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 0 +Ssl_ctx_verify_mode 0 +Ssl_default_timeout 0 +Ssl_finished_accepts 0 +Ssl_finished_connects 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode NONE +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 0 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 214 +Table_locks_waited 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threads_cached 0 +Threads_connected 4 +Threads_created 201 +Threads_running 1 +Uptime 2511 +Uptime_since_flush_status 2511 +binlog_commits 5 +binlog_group_commits 5 +wsrep_local_state_uuid 968bdd7e-38cc-11e2-0800-a86d39553d83 +wsrep_protocol_version 4 +wsrep_last_committed 49 +wsrep_replicated 49 +wsrep_replicated_bytes 3372882 +wsrep_received 11 +wsrep_received_bytes 658 +wsrep_local_commits 4 +wsrep_local_cert_failures 0 +wsrep_local_bf_aborts 0 +wsrep_local_replays 0 +wsrep_local_send_queue 0 +wsrep_local_send_queue_avg 0.000000 +wsrep_local_recv_queue 0 +wsrep_local_recv_queue_avg 0.000000 +wsrep_flow_control_paused 0.000000 +wsrep_flow_control_sent 0 +wsrep_flow_control_recv 0 +wsrep_cert_deps_distance 1.000000 +wsrep_apply_oooe 0.000000 +wsrep_apply_oool 0.000000 +wsrep_apply_window 0.000000 +wsrep_commit_oooe 0.000000 +wsrep_commit_oool 0.000000 +wsrep_commit_window 0.000000 +wsrep_local_state 4 +wsrep_local_state_comment Synced +wsrep_cert_index_size 73966 +wsrep_causal_reads 0 +wsrep_incoming_addresses 192.168.0.100,192.168.0.100,192.168.0.100 +wsrep_cluster_conf_id 3 +wsrep_cluster_size 3 +wsrep_cluster_state_uuid 968bdd7e-38cc-11e2-0800-a86d39553d83 +wsrep_cluster_status Primary +wsrep_connected ON +wsrep_local_index 0 +wsrep_provider_name Galera +wsrep_provider_vendor Codership Oy +wsrep_provider_version 2.2(r137) +wsrep_ready ON diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc006/mysql-status-defer new file mode 100644 index 000000000..cb6cb4c4d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-status-defer @@ -0,0 +1,410 @@ +Aborted_clients 0 0 +Aborted_connects 0 0 +Binlog_cache_disk_use 1 1 +Binlog_cache_use 4 4 +Binlog_stmt_cache_disk_use 0 0 +Binlog_stmt_cache_use 1 1 +Bytes_received 3315595 3317884 +Bytes_sent 796598 821862 +Com_admin_commands 1 1 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_db_upgrade 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_procedure 0 0 +Com_alter_server 0 0 +Com_alter_table 2 2 +Com_alter_tablespace 0 0 +Com_analyze 0 0 +Com_begin 1 1 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 59 59 +Com_change_master 0 0 +Com_check 0 0 +Com_checksum 1 1 +Com_commit 2 2 +Com_create_db 2 2 +Com_create_event 0 0 +Com_create_function 3 3 +Com_create_index 0 0 +Com_create_procedure 3 3 +Com_create_server 0 0 +Com_create_table 19 19 +Com_create_trigger 6 6 +Com_create_udf 0 0 +Com_create_user 0 0 +Com_create_view 7 7 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_db 1 1 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_server 0 0 +Com_drop_table 1 1 +Com_drop_trigger 0 0 +Com_drop_user 0 0 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_flush 2 2 +Com_grant 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_insert 1059 1059 +Com_insert_select 0 0 +Com_install_plugin 0 0 +Com_kill 0 0 +Com_load 1 1 +Com_lock_tables 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 0 0 +Com_replace_select 0 0 +Com_reset 0 0 +Com_resignal 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_rollback 1 1 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 326 345 +Com_set_option 373 373 +Com_signal 0 0 +Com_show_authors 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 11 12 +Com_show_charsets 0 0 +Com_show_client_statistics 0 0 +Com_show_collations 0 0 +Com_show_contributors 0 0 +Com_show_create_db 3 3 +Com_show_create_event 0 0 +Com_show_create_func 3 3 +Com_show_create_proc 3 3 +Com_show_create_table 96 96 +Com_show_create_trigger 6 6 +Com_show_databases 13 14 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 0 0 +Com_show_engine_status 12 13 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 48 48 +Com_show_function_status 3 3 +Com_show_grants 0 0 +Com_show_index_statistics 0 0 +Com_show_keys 0 0 +Com_show_master_status 11 12 +Com_show_open_tables 0 0 +Com_show_plugins 11 12 +Com_show_privileges 0 0 +Com_show_procedure_status 3 3 +Com_show_processlist 11 12 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_relaylog_events 0 0 +Com_show_slave_hosts 0 0 +Com_show_slave_status 11 12 +Com_show_slave_status_nolock 0 0 +Com_show_status 18 19 +Com_show_storage_engines 0 0 +Com_show_table_statistics 0 0 +Com_show_table_status 48 48 +Com_show_tables 7 7 +Com_show_temporary_tables 0 0 +Com_show_thread_statistics 0 0 +Com_show_triggers 48 48 +Com_show_user_statistics 0 0 +Com_show_variables 12 12 +Com_show_warnings 0 0 +Com_slave_start 0 0 +Com_slave_stop 0 0 +Com_stmt_close 0 0 +Com_stmt_execute 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reprepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_tables 0 0 +Com_update 1 1 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Compression OFF OFF +Connections 202 216 +Created_tmp_disk_tables 242 253 +Created_tmp_files 7 7 +Created_tmp_tables 976 1045 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Flashcache_enabled OFF OFF +Flush_commands 3 3 +Handler_commit 220 220 +Handler_delete 0 0 +Handler_discover 0 0 +Handler_prepare 183 183 +Handler_read_first 26 26 +Handler_read_key 23 23 +Handler_read_last 0 0 +Handler_read_next 36 36 +Handler_read_prev 0 0 +Handler_read_rnd 0 0 +Handler_read_rnd_next 61902 62371 +Handler_rollback 32 32 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 6 6 +Handler_write 59905 60367 +Innodb_adaptive_hash_cells 138337 138337 +Innodb_adaptive_hash_heap_buffers 6 6 +Innodb_adaptive_hash_hash_searches 129190 129190 +Innodb_adaptive_hash_non_hash_searches 53308 53308 +Innodb_background_log_sync 45 45 +Innodb_buffer_pool_pages_data 708 708 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_pages_flushed 916 916 +Innodb_buffer_pool_pages_LRU_flushed 0 0 +Innodb_buffer_pool_pages_free 1332 1332 +Innodb_buffer_pool_pages_made_not_young 0 0 +Innodb_buffer_pool_pages_made_young 0 0 +Innodb_buffer_pool_pages_misc 7 7 +Innodb_buffer_pool_pages_old 241 241 +Innodb_buffer_pool_pages_total 2047 2047 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead 0 0 +Innodb_buffer_pool_read_ahead_evicted 0 0 +Innodb_buffer_pool_read_requests 447048 447048 +Innodb_buffer_pool_reads 0 0 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 236593 236593 +Innodb_checkpoint_age 0 0 +Innodb_checkpoint_max_age 7782360 7782360 +Innodb_checkpoint_target_age 7539162 7539162 +Innodb_data_fsyncs 131 131 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 0 0 +Innodb_data_reads 0 0 +Innodb_data_writes 1067 1067 +Innodb_data_written 36013056 36013056 +Innodb_dblwr_pages_written 742 742 +Innodb_dblwr_writes 17 17 +Innodb_deadlocks 0 0 +Innodb_dict_tables 27 27 +Innodb_have_atomic_builtins ON ON +Innodb_history_list_length 1 1 +Innodb_ibuf_discarded_delete_marks 0 0 +Innodb_ibuf_discarded_deletes 0 0 +Innodb_ibuf_discarded_inserts 0 0 +Innodb_ibuf_free_list 0 0 +Innodb_ibuf_merged_delete_marks 0 0 +Innodb_ibuf_merged_deletes 0 0 +Innodb_ibuf_merged_inserts 0 0 +Innodb_ibuf_merges 0 0 +Innodb_ibuf_segment_size 2 2 +Innodb_ibuf_size 1 1 +Innodb_log_waits 0 0 +Innodb_log_write_requests 18226 18226 +Innodb_log_writes 70 70 +Innodb_lsn_current 8809964 8809964 +Innodb_lsn_flushed 8809964 8809964 +Innodb_lsn_last_checkpoint 8809964 8809964 +Innodb_master_thread_1_second_loops 42 42 +Innodb_master_thread_10_second_loops 4 4 +Innodb_master_thread_background_loops 3 3 +Innodb_master_thread_main_flush_loops 3 3 +Innodb_master_thread_sleeps 42 42 +Innodb_max_trx_id 846 846 +Innodb_mem_adaptive_hash 672196 672196 +Innodb_mem_dictionary 221035 221035 +Innodb_mem_total 34062336 34062336 +Innodb_mutex_os_waits 6 6 +Innodb_mutex_spin_rounds 271 271 +Innodb_mutex_spin_waits 11 11 +Innodb_oldest_view_low_limit_trx_id 825 825 +Innodb_os_log_fsyncs 93 93 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 8836608 8836608 +Innodb_page_size 16384 16384 +Innodb_pages_created 708 708 +Innodb_pages_read 0 0 +Innodb_pages_written 916 916 +Innodb_purge_trx_id 824 824 +Innodb_purge_undo_no 0 0 +Innodb_row_lock_current_waits 0 0 +Innodb_current_row_locks 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 47315 47315 +Innodb_rows_read 47274 47274 +Innodb_rows_updated 0 0 +Innodb_s_lock_os_waits 24 24 +Innodb_s_lock_spin_rounds 720 720 +Innodb_s_lock_spin_waits 24 24 +Innodb_truncated_status_writes 0 0 +Innodb_x_lock_os_waits 9 9 +Innodb_x_lock_spin_rounds 270 270 +Innodb_x_lock_spin_waits 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 14495 14495 +Key_blocks_used 2 2 +Key_read_requests 47 47 +Key_reads 1 1 +Key_write_requests 12 12 +Key_writes 12 12 +Last_query_cost 0.000000 0.000000 +Max_used_connections 4 4 +Not_flushed_delayed_rows 0 0 +Open_files 51 51 +Open_streams 0 0 +Open_table_definitions 50 50 +Open_tables 45 45 +Opened_files 1349 1397 +Opened_table_definitions 107 107 +Opened_tables 109 109 +Performance_schema_cond_classes_lost 0 0 +Performance_schema_cond_instances_lost 0 0 +Performance_schema_file_classes_lost 0 0 +Performance_schema_file_handles_lost 0 0 +Performance_schema_file_instances_lost 0 0 +Performance_schema_locker_lost 0 0 +Performance_schema_mutex_classes_lost 0 0 +Performance_schema_mutex_instances_lost 0 0 +Performance_schema_rwlock_classes_lost 0 0 +Performance_schema_rwlock_instances_lost 0 0 +Performance_schema_table_handles_lost 0 0 +Performance_schema_table_instances_lost 0 0 +Performance_schema_thread_classes_lost 0 0 +Performance_schema_thread_instances_lost 0 0 +Prepared_stmt_count 0 0 +Qcache_free_blocks 0 0 +Qcache_free_memory 0 0 +Qcache_hits 0 0 +Qcache_inserts 0 0 +Qcache_lowmem_prunes 0 0 +Qcache_not_cached 0 0 +Qcache_queries_in_cache 0 0 +Qcache_total_blocks 0 0 +Queries 2450 2492 +Questions 1450 1492 +Rpl_status AUTH_MASTER AUTH_MASTER +Select_full_join 0 0 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 243 248 +Slave_heartbeat_period 0.000 0.000 +Slave_open_temp_tables 0 0 +Slave_received_heartbeats 0 0 +Slave_retried_transactions 0 0 +Slave_running OFF OFF +Slow_launch_threads 0 0 +Slow_queries 0 0 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 0 0 +Sort_scan 2 2 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 0 0 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 0 0 +Ssl_ctx_verify_mode 0 0 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 0 0 +Ssl_finished_connects 0 0 +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode NONE NONE +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 0 0 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 214 215 +Table_locks_waited 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threads_cached 0 0 +Threads_connected 4 4 +Threads_created 201 215 +Threads_running 1 1 +Uptime 2511 2521 +Uptime_since_flush_status 2511 2521 +binlog_commits 5 5 +binlog_group_commits 5 5 +wsrep_local_state_uuid 968bdd7e-38cc-11e2-0800-a86d39553d83 968bdd7e-38cc-11e2-0800-a86d39553d83 +wsrep_protocol_version 4 4 +wsrep_last_committed 49 49 +wsrep_replicated 49 49 +wsrep_replicated_bytes 3372882 3372882 +wsrep_received 11 11 +wsrep_received_bytes 658 658 +wsrep_local_commits 4 4 +wsrep_local_cert_failures 0 0 +wsrep_local_bf_aborts 0 0 +wsrep_local_replays 0 0 +wsrep_local_send_queue 0 0 +wsrep_local_send_queue_avg 0.000000 0.000000 +wsrep_local_recv_queue 0 0 +wsrep_local_recv_queue_avg 0.000000 0.000000 +wsrep_flow_control_paused 0.000000 0.000000 +wsrep_flow_control_sent 0 0 +wsrep_flow_control_recv 0 0 +wsrep_cert_deps_distance 1.000000 1.000000 +wsrep_apply_oooe 0.000000 0.000000 +wsrep_apply_oool 0.000000 0.000000 +wsrep_apply_window 0.000000 0.000000 +wsrep_commit_oooe 0.000000 0.000000 +wsrep_commit_oool 0.000000 0.000000 +wsrep_commit_window 0.000000 0.000000 +wsrep_local_state 4 4 +wsrep_local_state_comment Synced Synced +wsrep_cert_index_size 73966 73966 +wsrep_causal_reads 0 0 +wsrep_incoming_addresses 192.168.0.100,192.168.0.100,192.168.0.100 192.168.0.100,192.168.0.100,192.168.0.100 +wsrep_cluster_conf_id 3 3 +wsrep_cluster_size 3 3 +wsrep_cluster_state_uuid 968bdd7e-38cc-11e2-0800-a86d39553d83 968bdd7e-38cc-11e2-0800-a86d39553d83 +wsrep_cluster_status Primary Primary +wsrep_connected ON ON +wsrep_local_index 0 0 +wsrep_provider_name Galera Galera +wsrep_provider_vendor Codership Oy Codership Oy +wsrep_provider_version 2.2(r137) 2.2(r137) +wsrep_ready ON ON diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-users b/t/pt-mysql-summary/samples/temp_enc006/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysql-variables b/t/pt-mysql-summary/samples/temp_enc006/mysql-variables new file mode 100644 index 000000000..82c189d9d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysql-variables @@ -0,0 +1,422 @@ +auto_increment_increment 3 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +back_log 50 +basedir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686 +big_tables OFF +binlog_cache_size 32768 +binlog_direct_non_transactional_updates OFF +binlog_format ROW +binlog_stmt_cache_size 32768 +bulk_insert_buffer_size 8388608 +character_set_client latin1 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results latin1 +character_set_server latin1 +character_set_system utf8 +character_sets_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/share/charsets/ +collation_connection latin1_swedish_ci +collation_database latin1_swedish_ci +collation_server latin1_swedish_ci +completion_type NO_CHAIN +concurrent_insert AUTO +connect_timeout 10 +datadir /tmp/12345/data/ +date_format %Y-%m-%d +datetime_format %Y-%m-%d %H:%i:%s +default_storage_engine InnoDB +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +div_precision_increment 4 +enforce_storage_engine +engine_condition_pushdown ON +event_scheduler OFF +expand_fast_index_creation OFF +expire_logs_days 0 +fast_index_creation ON +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_stopword_file (built-in) +general_log ON +general_log_file genlog +group_concat_max_len 1024 +have_compress YES +have_crypt YES +have_csv YES +have_dynamic_loading YES +have_flashcache YES +have_geometry YES +have_innodb YES +have_ndbcluster NO +have_openssl DISABLED +have_partitioning YES +have_profiling YES +have_query_cache YES +have_response_time_distribution YES +have_rtree_keys YES +have_ssl DISABLED +have_symlink YES +hostname hugmeir +ignore_builtin_innodb OFF +init_connect +init_file +init_slave +innodb_adaptive_flushing ON +innodb_adaptive_flushing_method estimate +innodb_adaptive_hash_index ON +innodb_adaptive_hash_index_partitions 1 +innodb_additional_mem_pool_size 8388608 +innodb_autoextend_increment 8 +innodb_autoinc_lock_mode 2 +innodb_blocking_buffer_pool_restore OFF +innodb_buffer_pool_instances 1 +innodb_buffer_pool_populate OFF +innodb_buffer_pool_restore_at_startup 0 +innodb_buffer_pool_shm_checksum ON +innodb_buffer_pool_shm_key 0 +innodb_buffer_pool_size 33554432 +innodb_change_buffering all +innodb_changed_pages_limit 1000000 +innodb_checkpoint_age_target 0 +innodb_checksums ON +innodb_commit_concurrency 0 +innodb_concurrency_tickets 500 +innodb_corrupt_table_action assert +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_dict_size_limit 0 +innodb_disallow_writes OFF +innodb_doublewrite ON +innodb_doublewrite_file +innodb_fake_changes OFF +innodb_fast_checksum OFF +innodb_fast_shutdown 1 +innodb_file_format Antelope +innodb_file_format_check ON +innodb_file_format_max Antelope +innodb_file_per_table OFF +innodb_flush_log_at_trx_commit 1 +innodb_flush_method +innodb_flush_neighbor_pages area +innodb_force_load_corrupted OFF +innodb_force_recovery 0 +innodb_ibuf_accel_rate 100 +innodb_ibuf_active_contract 1 +innodb_ibuf_max_size 16760832 +innodb_import_table_from_xtrabackup 0 +innodb_io_capacity 200 +innodb_kill_idle_transaction 0 +innodb_large_prefix OFF +innodb_lazy_drop_table 0 +innodb_lock_wait_timeout 3 +innodb_locks_unsafe_for_binlog ON +innodb_log_block_size 512 +innodb_log_buffer_size 8388608 +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_max_dirty_pages_pct 75 +innodb_max_purge_lag 0 +innodb_merge_sort_block_size 1048576 +innodb_mirrored_log_groups 1 +innodb_old_blocks_pct 37 +innodb_old_blocks_time 0 +innodb_open_files 300 +innodb_page_size 16384 +innodb_purge_batch_size 20 +innodb_purge_threads 1 +innodb_random_read_ahead OFF +innodb_read_ahead linear +innodb_read_ahead_threshold 56 +innodb_read_io_threads 4 +innodb_recovery_stats OFF +innodb_recovery_update_relay_log OFF +innodb_replication_delay 0 +innodb_rollback_on_timeout OFF +innodb_rollback_segments 128 +innodb_show_locks_held 10 +innodb_show_verbose_locks 0 +innodb_spin_wait_delay 6 +innodb_stats_auto_update 1 +innodb_stats_method nulls_equal +innodb_stats_on_metadata ON +innodb_stats_sample_pages 8 +innodb_stats_update_need_lock 1 +innodb_strict_mode OFF +innodb_support_xa ON +innodb_sync_spin_loops 30 +innodb_table_locks ON +innodb_thread_concurrency 0 +innodb_thread_concurrency_timer_based OFF +innodb_thread_sleep_delay 10000 +innodb_track_changed_pages OFF +innodb_use_global_flush_log_at_trx_commit ON +innodb_use_native_aio ON +innodb_use_sys_malloc ON +innodb_use_sys_stats_table OFF +innodb_version 1.1.8-rel29.1 +innodb_write_io_threads 4 +interactive_timeout 28800 +join_buffer_size 131072 +keep_files_on_create OFF +key_buffer_size 16777216 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +large_files_support ON +large_page_size 0 +large_pages OFF +lc_messages en_US +lc_messages_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/share/ +lc_time_names en_US +license GPL +local_infile ON +lock_wait_timeout 31536000 +locked_in_memory OFF +log ON +log_bin ON +log_bin_trust_function_creators OFF +log_error /tmp/12345/data/mysqld.log +log_output FILE +log_queries_not_using_indexes OFF +log_slave_updates ON +log_slow_admin_statements OFF +log_slow_filter +log_slow_queries OFF +log_slow_rate_limit 1 +log_slow_rate_type session +log_slow_slave_statements OFF +log_slow_sp_statements ON +log_slow_verbosity +log_warnings 1 +log_warnings_suppress +long_query_time 10.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +max_allowed_packet 1048576 +max_binlog_cache_size 18446744073709547520 +max_binlog_files 0 +max_binlog_size 1073741824 +max_binlog_stmt_cache_size 18446744073709547520 +max_connect_errors 10 +max_connections 151 +max_delayed_threads 20 +max_error_count 64 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 1024 +max_long_data_size 1048576 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 4294967295 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_tmp_tables 32 +max_user_connections 0 +max_write_lock_count 4294967295 +metadata_locks_cache_size 1024 +min_examined_row_limit 0 +multi_range_count 256 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 2146435072 +myisam_mmap_size 4294967295 +myisam_recover_options OFF +myisam_repair_threads 1 +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +net_buffer_length 16384 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +old OFF +old_alter_table OFF +old_passwords OFF +open_files_limit 1024 +optimizer_fix ON +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on +performance_schema OFF +performance_schema_events_waits_history_long_size 10000 +performance_schema_events_waits_history_size 10 +performance_schema_max_cond_classes 80 +performance_schema_max_cond_instances 1000 +performance_schema_max_file_classes 50 +performance_schema_max_file_handles 32768 +performance_schema_max_file_instances 10000 +performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 +performance_schema_max_table_handles 100000 +performance_schema_max_table_instances 50000 +performance_schema_max_thread_classes 50 +performance_schema_max_thread_instances 1000 +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/lib/mysql/plugin/ +port 12345 +preload_buffer_size 32768 +profiling OFF +profiling_history_size 15 +protocol_version 10 +query_alloc_block_size 8192 +query_cache_limit 1048576 +query_cache_min_res_unit 4096 +query_cache_size 0 +query_cache_strip_comments OFF +query_cache_type ON +query_cache_wlock_invalidate OFF +query_prealloc_size 8192 +query_response_time_range_base 10 +query_response_time_stats OFF +range_alloc_block_size 4096 +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +relay_log mysql-relay-bin +relay_log_index +relay_log_info_file relay-log.info +relay_log_purge ON +relay_log_recovery OFF +relay_log_space_limit 0 +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +rpl_recovery_rank 0 +secure_auth OFF +secure_file_priv +server_id 12345 +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_show_database OFF +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_max_allowed_packet 1073741824 +slave_net_timeout 3600 +slave_skip_errors OFF +slave_transaction_retries 10 +slave_type_conversions +slow_launch_time 2 +slow_query_log OFF +slow_query_log_file /tmp/12345/data/hugmeir-slow.log +slow_query_log_timestamp_always OFF +slow_query_log_timestamp_precision second +slow_query_log_use_global_control +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 2097152 +sql_auto_is_null OFF +sql_big_selects ON +sql_big_tables OFF +sql_buffer_result OFF +sql_log_bin ON +sql_log_off OFF +sql_low_priority_updates OFF +sql_max_join_size 18446744073709551615 +sql_mode +sql_notes ON +sql_quote_show_create ON +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter 0 +sql_warnings OFF +ssl_ca +ssl_capath +ssl_cert +ssl_cipher +ssl_key +storage_engine InnoDB +stored_program_cache 256 +sync_binlog 0 +sync_frm ON +sync_master_info 0 +sync_relay_log 0 +sync_relay_log_info 0 +system_time_zone ART +table_definition_cache 400 +table_open_cache 400 +thread_cache_size 0 +thread_concurrency 10 +thread_handling one-thread-per-connection +thread_stack 196608 +thread_statistics OFF +time_format %H:%i:%s +time_zone SYSTEM +timed_mutexes OFF +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_prealloc_size 4096 +tx_isolation REPEATABLE-READ +unique_checks ON +updatable_views_with_limit YES +userstat OFF +version 5.5.28-23.7-log +version_comment Percona XtraDB Cluster (GPL) 5.5.28-23.7, Revision 373, wsrep_23.7.r3821 +version_compile_machine i686 +version_compile_os Linux +wait_timeout 28800 +wsrep_OSU_method TOI +wsrep_auto_increment_control ON +wsrep_causal_reads OFF +wsrep_certify_nonPK ON +wsrep_cluster_address gcomm:// +wsrep_cluster_name pt_sandbox_cluster +wsrep_convert_LOCK_to_trx OFF +wsrep_data_home_dir /tmp/12345/data/ +wsrep_dbug_option +wsrep_debug OFF +wsrep_drupal_282555_workaround OFF +wsrep_forced_binlog_format NONE +wsrep_log_conflicts OFF +wsrep_max_ws_rows 131072 +wsrep_max_ws_size 1073741824 +wsrep_mysql_replication_bundle 0 +wsrep_node_address +wsrep_node_incoming_address 192.168.0.100 +wsrep_node_name 12345 +wsrep_notify_cmd +wsrep_on ON +wsrep_provider /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/lib/libgalera_smm.so +wsrep_provider_options base_host = 192.168.122.1; base_port = 12355; cert.log_conflicts = no; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT15S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 1; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = PT5M; gcache.dir = /tmp/12345/data/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /tmp/12345/data//galera.cache; gcache.page_size = 128M; gcache.size = 128M; gcs.fc_debug = 0; gcs.fc_factor = 1; gcs.fc_limit = 16; gcs.fc_master_slave = NO; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 2147483647; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = NO; gmcast.listen_addr = tcp://192.168.0.100:12355; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.time_wait = PT5S; gmcast.version = 0; ist.recv_addr = 192.168.122.1; pc.checksum = true; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT2S; pc.npvo = false; pc.version = 0; protonet.backend = asio; protonet.version = 0; replicator.causal_read_timeout = PT30S; replicator.commit_order = 3 +wsrep_recover OFF +wsrep_replicate_myisam ON +wsrep_retry_autocommit 1 +wsrep_slave_threads 2 +wsrep_sst_auth +wsrep_sst_donor +wsrep_sst_donor_rejects_queries OFF +wsrep_sst_method rsync +wsrep_sst_receive_address 192.168.0.100:12365 +wsrep_start_position 00000000-0000-0000-0000-000000000000:-1 +internal::nice_of_32578 0 +internal::oom_of_32578 0 +internal::nice_of_32419 0 +internal::oom_of_32419 0 +internal::nice_of_32324 0 +internal::oom_of_32324 0 +pt-summary-internal-pid_file_exists 1 +pt-summary-internal-current_time 2012-11-27 16:56 +pt-summary-internal-Config_File_path +pt-summary-internal-mysql_executable /usr/bin/mysql +pt-summary-internal-now 2012-11-27 17:38:42 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 6 diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysqld-executables b/t/pt-mysql-summary/samples/temp_enc006/mysqld-executables new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc006/mysqld-instances new file mode 100644 index 000000000..492e9b91b --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysqld-instances @@ -0,0 +1,4 @@ + PID TTY STAT TIME COMMAND +32324 pts/6 Sl 0:25 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf +32419 pts/6 Sl 0:18 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld --defaults-file=/tmp/12346/my.sandbox.cnf +32578 pts/6 Sl 0:18 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld --defaults-file=/tmp/12347/my.sandbox.cnf diff --git a/t/pt-mysql-summary/samples/temp_enc006/mysqldump b/t/pt-mysql-summary/samples/temp_enc006/mysqldump new file mode 100644 index 000000000..3f6d4f9a3 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc006/mysqldump @@ -0,0 +1,1128 @@ + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `mysql`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `host` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` bigint(20) unsigned NOT NULL, + `updates` bigint(20) unsigned NOT NULL, + `deletes` bigint(20) unsigned NOT NULL, + `schemaops` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `plugin` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `authentication_string` text COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `percona_test` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `percona_test`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `load_data` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `sakila` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `sakila`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `actor_info` ( + `actor_id` smallint(5) unsigned, + `first_name` varchar(45), + `last_name` varchar(45), + `film_info` text +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER customer_create_date BEFORE INSERT ON customer + FOR EACH ROW SET NEW.create_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `customer_list` ( + `ID` smallint(5) unsigned, + `name` varchar(91), + `address` varchar(50), + `zip code` varchar(10), + `phone` varchar(20), + `city` varchar(50), + `country` varchar(50), + `notes` varchar(6), + `SID` tinyint(3) unsigned +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `ins_film` AFTER INSERT ON `film` FOR EACH ROW BEGIN + INSERT INTO film_text (film_id, title, description) + VALUES (new.film_id, new.title, new.description); + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `upd_film` AFTER UPDATE ON `film` FOR EACH ROW BEGIN + IF (old.title != new.title) or (old.description != new.description) + THEN + UPDATE film_text + SET title=new.title, + description=new.description, + film_id=new.film_id + WHERE film_id=old.film_id; + END IF; + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `del_film` AFTER DELETE ON `film` FOR EACH ROW BEGIN + DELETE FROM film_text WHERE film_id = old.film_id; + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `film_list` ( + `FID` smallint(5) unsigned, + `title` varchar(255), + `description` text, + `category` varchar(25), + `price` decimal(4,2), + `length` smallint(5) unsigned, + `rating` enum('G','PG','PG-13','R','NC-17'), + `actors` text +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `nicer_but_slower_film_list` ( + `FID` smallint(5) unsigned, + `title` varchar(255), + `description` text, + `category` varchar(25), + `price` decimal(4,2), + `length` smallint(5) unsigned, + `rating` enum('G','PG','PG-13','R','NC-17'), + `actors` text +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER payment_date BEFORE INSERT ON payment + FOR EACH ROW SET NEW.payment_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER rental_date BEFORE INSERT ON rental + FOR EACH ROW SET NEW.rental_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `sales_by_film_category` ( + `category` varchar(25), + `total_sales` decimal(27,2) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `sales_by_store` ( + `store` varchar(101), + `manager` varchar(91), + `total_sales` decimal(27,2) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `staff_list` ( + `ID` tinyint(3) unsigned, + `name` varchar(91), + `address` varchar(50), + `zip code` varchar(10), + `phone` varchar(20), + `city` varchar(50), + `country` varchar(50), + `SID` tinyint(3) unsigned +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `get_customer_balance`(p_customer_id INT, p_effective_date DATETIME) RETURNS decimal(5,2) + READS SQL DATA + DETERMINISTIC +BEGIN + + + + + + + + + DECLARE v_rentfees DECIMAL(5,2); + DECLARE v_overfees INTEGER; + DECLARE v_payments DECIMAL(5,2); + + SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees + FROM film, inventory, rental + WHERE film.film_id = inventory.film_id + AND inventory.inventory_id = rental.inventory_id + AND rental.rental_date <= p_effective_date + AND rental.customer_id = p_customer_id; + + SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration, + ((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees + FROM rental, inventory, film + WHERE film.film_id = inventory.film_id + AND inventory.inventory_id = rental.inventory_id + AND rental.rental_date <= p_effective_date + AND rental.customer_id = p_customer_id; + + + SELECT IFNULL(SUM(payment.amount),0) INTO v_payments + FROM payment + + WHERE payment.payment_date <= p_effective_date + AND payment.customer_id = p_customer_id; + + RETURN v_rentfees + v_overfees - v_payments; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `inventory_held_by_customer`(p_inventory_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE v_customer_id INT; + DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL; + + SELECT customer_id INTO v_customer_id + FROM rental + WHERE return_date IS NULL + AND inventory_id = p_inventory_id; + + RETURN v_customer_id; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `inventory_in_stock`(p_inventory_id INT) RETURNS tinyint(1) + READS SQL DATA +BEGIN + DECLARE v_rentals INT; + DECLARE v_out INT; + + + + + SELECT COUNT(*) INTO v_rentals + FROM rental + WHERE inventory_id = p_inventory_id; + + IF v_rentals = 0 THEN + RETURN TRUE; + END IF; + + SELECT COUNT(rental_id) INTO v_out + FROM inventory LEFT JOIN rental USING(inventory_id) + WHERE inventory.inventory_id = p_inventory_id + AND rental.return_date IS NULL; + + IF v_out > 0 THEN + RETURN FALSE; + ELSE + RETURN TRUE; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `film_in_stock`(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) + READS SQL DATA +BEGIN + SELECT inventory_id + FROM inventory + WHERE film_id = p_film_id + AND store_id = p_store_id + AND inventory_in_stock(inventory_id); + + SELECT FOUND_ROWS() INTO p_film_count; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `film_not_in_stock`(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) + READS SQL DATA +BEGIN + SELECT inventory_id + FROM inventory + WHERE film_id = p_film_id + AND store_id = p_store_id + AND NOT inventory_in_stock(inventory_id); + + SELECT FOUND_ROWS() INTO p_film_count; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `rewards_report`( + IN min_monthly_purchases TINYINT UNSIGNED + , IN min_dollar_amount_purchased DECIMAL(10,2) UNSIGNED + , OUT count_rewardees INT +) + READS SQL DATA + COMMENT 'Provides a customizable report on best customers' +proc: BEGIN + + DECLARE last_month_start DATE; + DECLARE last_month_end DATE; + + + IF min_monthly_purchases = 0 THEN + SELECT 'Minimum monthly purchases parameter must be > 0'; + LEAVE proc; + END IF; + IF min_dollar_amount_purchased = 0.00 THEN + SELECT 'Minimum monthly dollar amount purchased parameter must be > $0.00'; + LEAVE proc; + END IF; + + + SET last_month_start = DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH); + SET last_month_start = STR_TO_DATE(CONCAT(YEAR(last_month_start),'-',MONTH(last_month_start),'-01'),'%Y-%m-%d'); + SET last_month_end = LAST_DAY(last_month_start); + + + CREATE TEMPORARY TABLE tmpCustomer (customer_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY); + + + INSERT INTO tmpCustomer (customer_id) + SELECT p.customer_id + FROM payment AS p + WHERE DATE(p.payment_date) BETWEEN last_month_start AND last_month_end + GROUP BY customer_id + HAVING SUM(p.amount) > min_dollar_amount_purchased + AND COUNT(customer_id) > min_monthly_purchases; + + + SELECT COUNT(*) FROM tmpCustomer INTO count_rewardees; + + + SELECT c.* + FROM tmpCustomer AS t + INNER JOIN customer AS c ON t.customer_id = c.customer_id; + + + DROP TABLE tmpCustomer; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; + +USE `mysql`; + +USE `percona_test`; + +USE `sakila`; +/*!50001 DROP TABLE IF EXISTS `actor_info`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY INVOKER */ +/*!50001 VIEW `actor_info` AS select `a`.`actor_id` AS `actor_id`,`a`.`first_name` AS `first_name`,`a`.`last_name` AS `last_name`,group_concat(distinct concat(`c`.`name`,': ',(select group_concat(`f`.`title` order by `f`.`title` ASC separator ', ') from ((`film` `f` join `film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `film_actor` `fa` on((`f`.`film_id` = `fa`.`film_id`))) where ((`fc`.`category_id` = `c`.`category_id`) and (`fa`.`actor_id` = `a`.`actor_id`)))) order by `c`.`name` ASC separator '; ') AS `film_info` from (((`actor` `a` left join `film_actor` `fa` on((`a`.`actor_id` = `fa`.`actor_id`))) left join `film_category` `fc` on((`fa`.`film_id` = `fc`.`film_id`))) left join `category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `a`.`actor_id`,`a`.`first_name`,`a`.`last_name` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `customer_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `customer_list` AS select `cu`.`customer_id` AS `ID`,concat(`cu`.`first_name`,_utf8' ',`cu`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`city`.`city` AS `city`,`country`.`country` AS `country`,if(`cu`.`active`,_utf8'active',_utf8'') AS `notes`,`cu`.`store_id` AS `SID` from (((`customer` `cu` join `address` `a` on((`cu`.`address_id` = `a`.`address_id`))) join `city` on((`a`.`city_id` = `city`.`city_id`))) join `country` on((`city`.`country_id` = `country`.`country_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `film_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `film_list` AS select `film`.`film_id` AS `FID`,`film`.`title` AS `title`,`film`.`description` AS `description`,`category`.`name` AS `category`,`film`.`rental_rate` AS `price`,`film`.`length` AS `length`,`film`.`rating` AS `rating`,group_concat(concat(`actor`.`first_name`,_utf8' ',`actor`.`last_name`) separator ', ') AS `actors` from ((((`category` left join `film_category` on((`category`.`category_id` = `film_category`.`category_id`))) left join `film` on((`film_category`.`film_id` = `film`.`film_id`))) join `film_actor` on((`film`.`film_id` = `film_actor`.`film_id`))) join `actor` on((`film_actor`.`actor_id` = `actor`.`actor_id`))) group by `film`.`film_id` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `nicer_but_slower_film_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `nicer_but_slower_film_list` AS select `film`.`film_id` AS `FID`,`film`.`title` AS `title`,`film`.`description` AS `description`,`category`.`name` AS `category`,`film`.`rental_rate` AS `price`,`film`.`length` AS `length`,`film`.`rating` AS `rating`,group_concat(concat(concat(ucase(substr(`actor`.`first_name`,1,1)),lcase(substr(`actor`.`first_name`,2,length(`actor`.`first_name`))),_utf8' ',concat(ucase(substr(`actor`.`last_name`,1,1)),lcase(substr(`actor`.`last_name`,2,length(`actor`.`last_name`)))))) separator ', ') AS `actors` from ((((`category` left join `film_category` on((`category`.`category_id` = `film_category`.`category_id`))) left join `film` on((`film_category`.`film_id` = `film`.`film_id`))) join `film_actor` on((`film`.`film_id` = `film_actor`.`film_id`))) join `actor` on((`film_actor`.`actor_id` = `actor`.`actor_id`))) group by `film`.`film_id` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `sales_by_film_category`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `sales_by_film_category` AS select `c`.`name` AS `category`,sum(`p`.`amount`) AS `total_sales` from (((((`payment` `p` join `rental` `r` on((`p`.`rental_id` = `r`.`rental_id`))) join `inventory` `i` on((`r`.`inventory_id` = `i`.`inventory_id`))) join `film` `f` on((`i`.`film_id` = `f`.`film_id`))) join `film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `c`.`name` order by sum(`p`.`amount`) desc */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `sales_by_store`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `sales_by_store` AS select concat(`c`.`city`,_utf8',',`cy`.`country`) AS `store`,concat(`m`.`first_name`,_utf8' ',`m`.`last_name`) AS `manager`,sum(`p`.`amount`) AS `total_sales` from (((((((`payment` `p` join `rental` `r` on((`p`.`rental_id` = `r`.`rental_id`))) join `inventory` `i` on((`r`.`inventory_id` = `i`.`inventory_id`))) join `store` `s` on((`i`.`store_id` = `s`.`store_id`))) join `address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `city` `c` on((`a`.`city_id` = `c`.`city_id`))) join `country` `cy` on((`c`.`country_id` = `cy`.`country_id`))) join `staff` `m` on((`s`.`manager_staff_id` = `m`.`staff_id`))) group by `s`.`store_id` order by `cy`.`country`,`c`.`city` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `staff_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `staff_list` AS select `s`.`staff_id` AS `ID`,concat(`s`.`first_name`,_utf8' ',`s`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`city`.`city` AS `city`,`country`.`country` AS `country`,`s`.`store_id` AS `SID` from (((`staff` `s` join `address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `city` on((`a`.`city_id` = `city`.`city_id`))) join `country` on((`city`.`country_id` = `country`.`country_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; diff --git a/t/pt-mysql-summary/samples/temp_enc007/collect.err b/t/pt-mysql-summary/samples/temp_enc007/collect.err new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc007/innodb-status b/t/pt-mysql-summary/samples/temp_enc007/innodb-status new file mode 100644 index 000000000..6870f4aab --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/innodb-status @@ -0,0 +1,118 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +121127 18:59:59 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 32 seconds +----------------- +BACKGROUND THREAD +----------------- +srv_master_thread loops: 32 1_second, 32 sleeps, 3 10_second, 4 background, 4 flush +srv_master_thread log flush and writes: 35 +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 36, signal count 36 +Mutex spin waits 14, rounds 222, OS waits 4 +RW-shared spins 25, rounds 722, OS waits 24 +RW-excl spins 0, rounds 240, OS waits 8 +Spin rounds per wait: 15.86 mutex, 28.88 RW-shared, 240.00 RW-excl +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for completed aio requests (insert buffer thread) +I/O thread 1 state: waiting for completed aio requests (log thread) +I/O thread 2 state: waiting for completed aio requests (read thread) +I/O thread 3 state: waiting for completed aio requests (read thread) +I/O thread 4 state: waiting for completed aio requests (read thread) +I/O thread 5 state: waiting for completed aio requests (read thread) +I/O thread 6 state: waiting for completed aio requests (write thread) +I/O thread 7 state: waiting for completed aio requests (write thread) +I/O thread 8 state: waiting for completed aio requests (write thread) +I/O thread 9 state: waiting for completed aio requests (write thread) +Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] , + ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 +Pending flushes (fsync) log: 0; buffer pool: 0 +0 OS file reads, 955 OS file writes, 125 OS fsyncs +0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, 0 merges +merged operations: + insert 0, delete mark 0, delete 0 +discarded operations: + insert 0, delete mark 0, delete 0 +Hash table size 138337, node heap has 7 buffer(s) +0.00 hash searches/s, 0.00 non-hash searches/s +--- +LOG +--- +Log sequence number 8603780 +Log flushed up to 8603780 +Last checkpoint at 8603780 +Max checkpoint age 7782360 +Checkpoint age target 7539162 +Modified age 0 +Checkpoint age 0 +0 pending log writes, 0 pending chkp writes +89 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total memory allocated 34062336; in additional pool allocated 0 +Internal hash tables (constant factor + variable factor) + Adaptive hash index 672196 (553348 + 118848) + Page hash 17692 (buffer pool 0 only) + Dictionary cache 219018 (139064 + 79954) + File system 41792 (41336 + 456) + Lock system 42228 (41908 + 320) + Recovery system 0 (0 + 0) +Dictionary memory allocated 79954 +Buffer pool size 2047 +Buffer pool size, bytes 33538048 +Free buffers 1347 +Database pages 693 +Old database pages 235 +Modified db pages 0 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages made young 0, not young 0 +0.00 youngs/s, 0.00 non-youngs/s +Pages read 0, created 693, written 811 +0.00 reads/s, 0.00 creates/s, 0.00 writes/s +No buffer pool page gets since the last printout +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s +LRU len: 693, unzip_LRU len: 0 +I/O sum[0]:cur[0], unzip sum[0]:cur[0] +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +1 read views open inside InnoDB +---OLDEST VIEW--- +Normal read view +Read view low limit trx n:o 300 +Read view up limit trx id 300 +Read view low limit trx id 300 +Read view individually stored trx ids: +----------------- +Main thread process no. 30877, id 2895674176, state: waiting for server activity +Number of rows inserted 46315, updated 0, deleted 0, read 46274 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s +------------ +TRANSACTIONS +------------ +Trx id counter 348 +Purge done for trx's n:o < 0 undo n:o < 0 +History list length 0 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 0, not started +MySQL thread id 18, OS thread handle 0xb6f31b40, query id 1170 localhost msandbox +SHOW /*!50000 ENGINE*/ INNODB STATUS +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc007/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc007/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-databases b/t/pt-mysql-summary/samples/temp_enc007/mysql-databases new file mode 100644 index 000000000..ff1205b22 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-databases @@ -0,0 +1,5 @@ +information_schema +mysql +percona_test +performance_schema +sakila diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc007/mysql-master-logs new file mode 100644 index 000000000..051f73cf5 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-master-logs @@ -0,0 +1 @@ +mysql-bin.000001 3259054 diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc007/mysql-master-status new file mode 100644 index 000000000..842941740 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000001 3259054 diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc007/mysql-plugins new file mode 100644 index 000000000..95fb6b175 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-plugins @@ -0,0 +1,41 @@ +binlog ACTIVE STORAGE ENGINE NULL GPL +wsrep ACTIVE STORAGE ENGINE NULL GPL +mysql_native_password ACTIVE AUTHENTICATION NULL GPL +mysql_old_password ACTIVE AUTHENTICATION NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +PERFORMANCE_SCHEMA ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +INNODB_RSEG ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_UNDO_LOGS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCKS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_LOCK_WAITS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_TABLESTATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_COLUMNS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FIELDS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FOREIGN ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_FOREIGN_COLS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SYS_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLE_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_INDEX_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_INDEX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_PAGES_BLOB ACTIVE INFORMATION SCHEMA NULL GPL +XTRADB_ADMIN_COMMAND ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CHANGED_PAGES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE_LRU ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_STATS ACTIVE INFORMATION SCHEMA NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +partition ACTIVE STORAGE ENGINE NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc007/mysql-processlist new file mode 100644 index 000000000..53ecb70d6 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-processlist @@ -0,0 +1,24 @@ +*************************** 1. row *************************** + Id: 4 + User: msandbox + Host: localhost:49789 + db: NULL + Command: Binlog Dump + Time: 88 + State: Master has sent all binlog to slave; waiting for binlog to be updated + Info: NULL + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 2 +*************************** 2. row *************************** + Id: 19 + User: msandbox + Host: localhost + db: NULL + Command: Query + Time: 0 + State: NULL + Info: SHOW FULL PROCESSLIST + Rows_sent: 0 +Rows_examined: 0 + Rows_read: 1 diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-slave b/t/pt-mysql-summary/samples/temp_enc007/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-status b/t/pt-mysql-summary/samples/temp_enc007/mysql-status new file mode 100644 index 000000000..5cf3f1594 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-status @@ -0,0 +1,380 @@ +Aborted_clients 0 +Aborted_connects 0 +Binlog_cache_disk_use 1 +Binlog_cache_use 4 +Binlog_stmt_cache_disk_use 0 +Binlog_stmt_cache_use 1 +Bytes_received 3254928 +Bytes_sent 3284914 +Com_admin_commands 2 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_db_upgrade 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_procedure 0 +Com_alter_server 0 +Com_alter_table 0 +Com_alter_tablespace 0 +Com_analyze 0 +Com_begin 1 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 2 +Com_change_master 0 +Com_check 0 +Com_checksum 1 +Com_commit 2 +Com_create_db 2 +Com_create_event 0 +Com_create_function 3 +Com_create_index 0 +Com_create_procedure 3 +Com_create_server 0 +Com_create_table 19 +Com_create_trigger 6 +Com_create_udf 0 +Com_create_user 0 +Com_create_view 7 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_db 1 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_server 0 +Com_drop_table 1 +Com_drop_trigger 0 +Com_drop_user 0 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_flush 0 +Com_grant 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_insert 1059 +Com_insert_select 0 +Com_install_plugin 0 +Com_kill 0 +Com_load 1 +Com_lock_tables 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 0 +Com_replace_select 0 +Com_reset 0 +Com_resignal 0 +Com_revoke 0 +Com_revoke_all 0 +Com_rollback 1 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 17 +Com_set_option 12 +Com_signal 0 +Com_show_authors 0 +Com_show_binlog_events 0 +Com_show_binlogs 0 +Com_show_charsets 0 +Com_show_client_statistics 0 +Com_show_collations 0 +Com_show_contributors 0 +Com_show_create_db 0 +Com_show_create_event 0 +Com_show_create_func 0 +Com_show_create_proc 0 +Com_show_create_table 0 +Com_show_create_trigger 0 +Com_show_databases 0 +Com_show_engine_logs 0 +Com_show_engine_mutex 0 +Com_show_engine_status 1 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 0 +Com_show_function_status 0 +Com_show_grants 0 +Com_show_index_statistics 0 +Com_show_keys 0 +Com_show_master_status 0 +Com_show_open_tables 0 +Com_show_plugins 0 +Com_show_privileges 0 +Com_show_procedure_status 0 +Com_show_processlist 0 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_relaylog_events 0 +Com_show_slave_hosts 0 +Com_show_slave_status 0 +Com_show_slave_status_nolock 0 +Com_show_status 1 +Com_show_storage_engines 0 +Com_show_table_statistics 0 +Com_show_table_status 0 +Com_show_tables 1 +Com_show_temporary_tables 0 +Com_show_thread_statistics 0 +Com_show_triggers 0 +Com_show_user_statistics 0 +Com_show_variables 2 +Com_show_warnings 0 +Com_slave_start 0 +Com_slave_stop 0 +Com_stmt_close 0 +Com_stmt_execute 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reprepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_plugin 0 +Com_unlock_tables 0 +Com_update 1 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Compression OFF +Connections 15 +Created_tmp_disk_tables 0 +Created_tmp_files 7 +Created_tmp_tables 4 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Flashcache_enabled OFF +Flush_commands 1 +Handler_commit 141 +Handler_delete 0 +Handler_discover 0 +Handler_prepare 122 +Handler_read_first 19 +Handler_read_key 16 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 49487 +Handler_rollback 15 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 6 +Handler_write 47754 +Innodb_adaptive_hash_cells 138337 +Innodb_adaptive_hash_heap_buffers 6 +Innodb_adaptive_hash_hash_searches 128675 +Innodb_adaptive_hash_non_hash_searches 52783 +Innodb_background_log_sync 35 +Innodb_buffer_pool_pages_data 693 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_pages_flushed 811 +Innodb_buffer_pool_pages_LRU_flushed 0 +Innodb_buffer_pool_pages_free 1347 +Innodb_buffer_pool_pages_made_not_young 0 +Innodb_buffer_pool_pages_made_young 0 +Innodb_buffer_pool_pages_misc 7 +Innodb_buffer_pool_pages_old 235 +Innodb_buffer_pool_pages_total 2047 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead 0 +Innodb_buffer_pool_read_ahead_evicted 0 +Innodb_buffer_pool_read_requests 441583 +Innodb_buffer_pool_reads 0 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 234413 +Innodb_checkpoint_age 0 +Innodb_checkpoint_max_age 7782360 +Innodb_checkpoint_target_age 7539162 +Innodb_data_fsyncs 125 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 0 +Innodb_data_reads 0 +Innodb_data_writes 955 +Innodb_data_written 32364544 +Innodb_dblwr_pages_written 637 +Innodb_dblwr_writes 16 +Innodb_deadlocks 0 +Innodb_dict_tables 26 +Innodb_have_atomic_builtins ON +Innodb_history_list_length 0 +Innodb_ibuf_discarded_delete_marks 0 +Innodb_ibuf_discarded_deletes 0 +Innodb_ibuf_discarded_inserts 0 +Innodb_ibuf_free_list 0 +Innodb_ibuf_merged_delete_marks 0 +Innodb_ibuf_merged_deletes 0 +Innodb_ibuf_merged_inserts 0 +Innodb_ibuf_merges 0 +Innodb_ibuf_segment_size 2 +Innodb_ibuf_size 1 +Innodb_log_waits 0 +Innodb_log_write_requests 17776 +Innodb_log_writes 66 +Innodb_lsn_current 8603780 +Innodb_lsn_flushed 8603780 +Innodb_lsn_last_checkpoint 8603780 +Innodb_master_thread_1_second_loops 32 +Innodb_master_thread_10_second_loops 3 +Innodb_master_thread_background_loops 4 +Innodb_master_thread_main_flush_loops 4 +Innodb_master_thread_sleeps 32 +Innodb_max_trx_id 840 +Innodb_mem_adaptive_hash 672196 +Innodb_mem_dictionary 219018 +Innodb_mem_total 34062336 +Innodb_mutex_os_waits 4 +Innodb_mutex_spin_rounds 222 +Innodb_mutex_spin_waits 14 +Innodb_oldest_view_low_limit_trx_id 768 +Innodb_os_log_fsyncs 87 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 8628736 +Innodb_page_size 16384 +Innodb_pages_created 693 +Innodb_pages_read 0 +Innodb_pages_written 811 +Innodb_purge_trx_id 0 +Innodb_purge_undo_no 0 +Innodb_row_lock_current_waits 0 +Innodb_current_row_locks 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 46315 +Innodb_rows_read 46274 +Innodb_rows_updated 0 +Innodb_s_lock_os_waits 24 +Innodb_s_lock_spin_rounds 722 +Innodb_s_lock_spin_waits 25 +Innodb_truncated_status_writes 0 +Innodb_x_lock_os_waits 8 +Innodb_x_lock_spin_rounds 240 +Innodb_x_lock_spin_waits 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 14295 +Key_blocks_used 202 +Key_read_requests 28816 +Key_reads 1 +Key_write_requests 11127 +Key_writes 212 +Last_query_cost 0.000000 +Max_used_connections 2 +Not_flushed_delayed_rows 0 +Open_files 54 +Open_streams 0 +Open_table_definitions 60 +Open_tables 62 +Opened_files 235 +Opened_table_definitions 85 +Opened_tables 94 +Performance_schema_cond_classes_lost 0 +Performance_schema_cond_instances_lost 0 +Performance_schema_file_classes_lost 0 +Performance_schema_file_handles_lost 0 +Performance_schema_file_instances_lost 0 +Performance_schema_locker_lost 0 +Performance_schema_mutex_classes_lost 0 +Performance_schema_mutex_instances_lost 0 +Performance_schema_rwlock_classes_lost 0 +Performance_schema_rwlock_instances_lost 0 +Performance_schema_table_handles_lost 0 +Performance_schema_table_instances_lost 0 +Performance_schema_thread_classes_lost 0 +Performance_schema_thread_instances_lost 0 +Prepared_stmt_count 0 +Qcache_free_blocks 0 +Qcache_free_memory 0 +Qcache_hits 0 +Qcache_inserts 0 +Qcache_lowmem_prunes 0 +Qcache_not_cached 0 +Qcache_queries_in_cache 0 +Qcache_total_blocks 0 +Queries 1158 +Questions 158 +Rpl_status AUTH_MASTER +Select_full_join 0 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 5 +Slave_heartbeat_period 0.000 +Slave_open_temp_tables 0 +Slave_received_heartbeats 0 +Slave_retried_transactions 0 +Slave_running OFF +Slow_launch_threads 0 +Slow_queries 0 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 0 +Sort_scan 0 +Ssl_accept_renegotiates 0 +Ssl_accepts 0 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 0 +Ssl_ctx_verify_mode 0 +Ssl_default_timeout 0 +Ssl_finished_accepts 0 +Ssl_finished_connects 0 +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode NONE +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 0 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 189 +Table_locks_waited 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threads_cached 0 +Threads_connected 2 +Threads_created 14 +Threads_running 2 +Uptime 96 +Uptime_since_flush_status 96 +binlog_commits 5 +binlog_group_commits 5 +wsrep_cluster_conf_id 18446744073709551615 +wsrep_cluster_size 0 +wsrep_cluster_state_uuid +wsrep_cluster_status Disconnected +wsrep_connected OFF +wsrep_local_index 4294967295 +wsrep_provider_name +wsrep_provider_vendor +wsrep_provider_version +wsrep_ready ON diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc007/mysql-status-defer new file mode 100644 index 000000000..ccd34a8d3 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-status-defer @@ -0,0 +1,380 @@ +Aborted_clients 0 0 +Aborted_connects 0 0 +Binlog_cache_disk_use 1 1 +Binlog_cache_use 4 4 +Binlog_stmt_cache_disk_use 0 0 +Binlog_stmt_cache_use 1 1 +Bytes_received 3254928 3257215 +Bytes_sent 3284914 3309052 +Com_admin_commands 2 2 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_db_upgrade 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_procedure 0 0 +Com_alter_server 0 0 +Com_alter_table 0 0 +Com_alter_tablespace 0 0 +Com_analyze 0 0 +Com_begin 1 1 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 2 2 +Com_change_master 0 0 +Com_check 0 0 +Com_checksum 1 1 +Com_commit 2 2 +Com_create_db 2 2 +Com_create_event 0 0 +Com_create_function 3 3 +Com_create_index 0 0 +Com_create_procedure 3 3 +Com_create_server 0 0 +Com_create_table 19 19 +Com_create_trigger 6 6 +Com_create_udf 0 0 +Com_create_user 0 0 +Com_create_view 7 7 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_db 1 1 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_server 0 0 +Com_drop_table 1 1 +Com_drop_trigger 0 0 +Com_drop_user 0 0 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_flush 0 0 +Com_grant 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_insert 1059 1059 +Com_insert_select 0 0 +Com_install_plugin 0 0 +Com_kill 0 0 +Com_load 1 1 +Com_lock_tables 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 0 0 +Com_replace_select 0 0 +Com_reset 0 0 +Com_resignal 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_rollback 1 1 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 17 36 +Com_set_option 12 12 +Com_signal 0 0 +Com_show_authors 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 0 1 +Com_show_charsets 0 0 +Com_show_client_statistics 0 0 +Com_show_collations 0 0 +Com_show_contributors 0 0 +Com_show_create_db 0 0 +Com_show_create_event 0 0 +Com_show_create_func 0 0 +Com_show_create_proc 0 0 +Com_show_create_table 0 0 +Com_show_create_trigger 0 0 +Com_show_databases 0 1 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 0 0 +Com_show_engine_status 1 2 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 0 0 +Com_show_function_status 0 0 +Com_show_grants 0 0 +Com_show_index_statistics 0 0 +Com_show_keys 0 0 +Com_show_master_status 0 1 +Com_show_open_tables 0 0 +Com_show_plugins 0 1 +Com_show_privileges 0 0 +Com_show_procedure_status 0 0 +Com_show_processlist 0 1 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_relaylog_events 0 0 +Com_show_slave_hosts 0 0 +Com_show_slave_status 0 1 +Com_show_slave_status_nolock 0 0 +Com_show_status 1 2 +Com_show_storage_engines 0 0 +Com_show_table_statistics 0 0 +Com_show_table_status 0 0 +Com_show_tables 1 1 +Com_show_temporary_tables 0 0 +Com_show_thread_statistics 0 0 +Com_show_triggers 0 0 +Com_show_user_statistics 0 0 +Com_show_variables 2 2 +Com_show_warnings 0 0 +Com_slave_start 0 0 +Com_slave_stop 0 0 +Com_stmt_close 0 0 +Com_stmt_execute 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reprepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_tables 0 0 +Com_update 1 1 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Compression OFF OFF +Connections 15 29 +Created_tmp_disk_tables 0 11 +Created_tmp_files 7 7 +Created_tmp_tables 4 73 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Flashcache_enabled OFF OFF +Flush_commands 1 1 +Handler_commit 141 141 +Handler_delete 0 0 +Handler_discover 0 0 +Handler_prepare 122 122 +Handler_read_first 19 19 +Handler_read_key 16 16 +Handler_read_last 0 0 +Handler_read_next 0 0 +Handler_read_prev 0 0 +Handler_read_rnd 0 0 +Handler_read_rnd_next 49487 49926 +Handler_rollback 15 15 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 6 6 +Handler_write 47754 48186 +Innodb_adaptive_hash_cells 138337 138337 +Innodb_adaptive_hash_heap_buffers 6 6 +Innodb_adaptive_hash_hash_searches 128675 128675 +Innodb_adaptive_hash_non_hash_searches 52783 52783 +Innodb_background_log_sync 35 35 +Innodb_buffer_pool_pages_data 693 693 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_pages_flushed 811 811 +Innodb_buffer_pool_pages_LRU_flushed 0 0 +Innodb_buffer_pool_pages_free 1347 1347 +Innodb_buffer_pool_pages_made_not_young 0 0 +Innodb_buffer_pool_pages_made_young 0 0 +Innodb_buffer_pool_pages_misc 7 7 +Innodb_buffer_pool_pages_old 235 235 +Innodb_buffer_pool_pages_total 2047 2047 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead 0 0 +Innodb_buffer_pool_read_ahead_evicted 0 0 +Innodb_buffer_pool_read_requests 441583 441583 +Innodb_buffer_pool_reads 0 0 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 234413 234413 +Innodb_checkpoint_age 0 0 +Innodb_checkpoint_max_age 7782360 7782360 +Innodb_checkpoint_target_age 7539162 7539162 +Innodb_data_fsyncs 125 125 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 0 0 +Innodb_data_reads 0 0 +Innodb_data_writes 955 955 +Innodb_data_written 32364544 32364544 +Innodb_dblwr_pages_written 637 637 +Innodb_dblwr_writes 16 16 +Innodb_deadlocks 0 0 +Innodb_dict_tables 26 26 +Innodb_have_atomic_builtins ON ON +Innodb_history_list_length 0 0 +Innodb_ibuf_discarded_delete_marks 0 0 +Innodb_ibuf_discarded_deletes 0 0 +Innodb_ibuf_discarded_inserts 0 0 +Innodb_ibuf_free_list 0 0 +Innodb_ibuf_merged_delete_marks 0 0 +Innodb_ibuf_merged_deletes 0 0 +Innodb_ibuf_merged_inserts 0 0 +Innodb_ibuf_merges 0 0 +Innodb_ibuf_segment_size 2 2 +Innodb_ibuf_size 1 1 +Innodb_log_waits 0 0 +Innodb_log_write_requests 17776 17776 +Innodb_log_writes 66 66 +Innodb_lsn_current 8603780 8603780 +Innodb_lsn_flushed 8603780 8603780 +Innodb_lsn_last_checkpoint 8603780 8603780 +Innodb_master_thread_1_second_loops 32 32 +Innodb_master_thread_10_second_loops 3 3 +Innodb_master_thread_background_loops 4 4 +Innodb_master_thread_main_flush_loops 4 4 +Innodb_master_thread_sleeps 32 32 +Innodb_max_trx_id 840 840 +Innodb_mem_adaptive_hash 672196 672196 +Innodb_mem_dictionary 219018 219018 +Innodb_mem_total 34062336 34062336 +Innodb_mutex_os_waits 4 4 +Innodb_mutex_spin_rounds 222 222 +Innodb_mutex_spin_waits 14 14 +Innodb_oldest_view_low_limit_trx_id 768 768 +Innodb_os_log_fsyncs 87 87 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 8628736 8628736 +Innodb_page_size 16384 16384 +Innodb_pages_created 693 693 +Innodb_pages_read 0 0 +Innodb_pages_written 811 811 +Innodb_purge_trx_id 0 0 +Innodb_purge_undo_no 0 0 +Innodb_row_lock_current_waits 0 0 +Innodb_current_row_locks 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 46315 46315 +Innodb_rows_read 46274 46274 +Innodb_rows_updated 0 0 +Innodb_s_lock_os_waits 24 24 +Innodb_s_lock_spin_rounds 722 722 +Innodb_s_lock_spin_waits 25 25 +Innodb_truncated_status_writes 0 0 +Innodb_x_lock_os_waits 8 8 +Innodb_x_lock_spin_rounds 240 240 +Innodb_x_lock_spin_waits 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 14295 14295 +Key_blocks_used 202 202 +Key_read_requests 28816 28816 +Key_reads 1 1 +Key_write_requests 11127 11127 +Key_writes 212 212 +Last_query_cost 0.000000 0.000000 +Max_used_connections 2 2 +Not_flushed_delayed_rows 0 0 +Open_files 54 54 +Open_streams 0 0 +Open_table_definitions 60 60 +Open_tables 62 62 +Opened_files 235 284 +Opened_table_definitions 85 85 +Opened_tables 94 94 +Performance_schema_cond_classes_lost 0 0 +Performance_schema_cond_instances_lost 0 0 +Performance_schema_file_classes_lost 0 0 +Performance_schema_file_handles_lost 0 0 +Performance_schema_file_instances_lost 0 0 +Performance_schema_locker_lost 0 0 +Performance_schema_mutex_classes_lost 0 0 +Performance_schema_mutex_instances_lost 0 0 +Performance_schema_rwlock_classes_lost 0 0 +Performance_schema_rwlock_instances_lost 0 0 +Performance_schema_table_handles_lost 0 0 +Performance_schema_table_instances_lost 0 0 +Performance_schema_thread_classes_lost 0 0 +Performance_schema_thread_instances_lost 0 0 +Prepared_stmt_count 0 0 +Qcache_free_blocks 0 0 +Qcache_free_memory 0 0 +Qcache_hits 0 0 +Qcache_inserts 0 0 +Qcache_lowmem_prunes 0 0 +Qcache_not_cached 0 0 +Qcache_queries_in_cache 0 0 +Qcache_total_blocks 0 0 +Queries 1158 1200 +Questions 158 200 +Rpl_status AUTH_MASTER AUTH_MASTER +Select_full_join 0 0 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 5 10 +Slave_heartbeat_period 0.000 0.000 +Slave_open_temp_tables 0 0 +Slave_received_heartbeats 0 0 +Slave_retried_transactions 0 0 +Slave_running OFF OFF +Slow_launch_threads 0 0 +Slow_queries 0 0 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 0 0 +Sort_scan 0 0 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 0 0 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 0 0 +Ssl_ctx_verify_mode 0 0 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 0 0 +Ssl_finished_connects 0 0 +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode NONE NONE +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 0 0 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 189 190 +Table_locks_waited 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threads_cached 0 0 +Threads_connected 2 2 +Threads_created 14 28 +Threads_running 2 2 +Uptime 96 107 +Uptime_since_flush_status 96 107 +binlog_commits 5 5 +binlog_group_commits 5 5 +wsrep_cluster_conf_id 18446744073709551615 18446744073709551615 +wsrep_cluster_size 0 0 +wsrep_cluster_state_uuid +wsrep_cluster_status Disconnected Disconnected +wsrep_connected OFF OFF +wsrep_local_index 4294967295 4294967295 +wsrep_provider_name +wsrep_provider_vendor +wsrep_provider_version +wsrep_ready ON ON diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-users b/t/pt-mysql-summary/samples/temp_enc007/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysql-variables b/t/pt-mysql-summary/samples/temp_enc007/mysql-variables new file mode 100644 index 000000000..f6da32f55 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysql-variables @@ -0,0 +1,423 @@ +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +back_log 50 +basedir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686 +big_tables OFF +binlog_cache_size 32768 +binlog_direct_non_transactional_updates OFF +binlog_format STATEMENT +binlog_stmt_cache_size 32768 +bulk_insert_buffer_size 8388608 +character_set_client latin1 +character_set_connection latin1 +character_set_database latin1 +character_set_filesystem binary +character_set_results latin1 +character_set_server latin1 +character_set_system utf8 +character_sets_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/share/charsets/ +collation_connection latin1_swedish_ci +collation_database latin1_swedish_ci +collation_server latin1_swedish_ci +completion_type NO_CHAIN +concurrent_insert AUTO +connect_timeout 10 +datadir /tmp/12345/data/ +date_format %Y-%m-%d +datetime_format %Y-%m-%d %H:%i:%s +default_storage_engine InnoDB +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +div_precision_increment 4 +enforce_storage_engine +engine_condition_pushdown ON +event_scheduler OFF +expand_fast_index_creation OFF +expire_logs_days 0 +fast_index_creation ON +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_stopword_file (built-in) +general_log ON +general_log_file genlog +group_concat_max_len 1024 +have_compress YES +have_crypt YES +have_csv YES +have_dynamic_loading YES +have_flashcache YES +have_geometry YES +have_innodb YES +have_ndbcluster NO +have_openssl DISABLED +have_partitioning YES +have_profiling YES +have_query_cache YES +have_response_time_distribution YES +have_rtree_keys YES +have_ssl DISABLED +have_symlink YES +hostname hugmeir +ignore_builtin_innodb OFF +init_connect +init_file +init_slave +innodb_adaptive_flushing ON +innodb_adaptive_flushing_method estimate +innodb_adaptive_hash_index ON +innodb_adaptive_hash_index_partitions 1 +innodb_additional_mem_pool_size 8388608 +innodb_autoextend_increment 8 +innodb_autoinc_lock_mode 1 +innodb_blocking_buffer_pool_restore OFF +innodb_buffer_pool_instances 1 +innodb_buffer_pool_populate OFF +innodb_buffer_pool_restore_at_startup 0 +innodb_buffer_pool_shm_checksum ON +innodb_buffer_pool_shm_key 0 +innodb_buffer_pool_size 33554432 +innodb_change_buffering all +innodb_changed_pages_limit 1000000 +innodb_checkpoint_age_target 0 +innodb_checksums ON +innodb_commit_concurrency 0 +innodb_concurrency_tickets 500 +innodb_corrupt_table_action assert +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_dict_size_limit 0 +innodb_disallow_writes OFF +innodb_doublewrite ON +innodb_doublewrite_file +innodb_fake_changes OFF +innodb_fast_checksum OFF +innodb_fast_shutdown 1 +innodb_file_format Antelope +innodb_file_format_check ON +innodb_file_format_max Antelope +innodb_file_per_table OFF +innodb_flush_log_at_trx_commit 1 +innodb_flush_method +innodb_flush_neighbor_pages area +innodb_force_load_corrupted OFF +innodb_force_recovery 0 +innodb_ibuf_accel_rate 100 +innodb_ibuf_active_contract 1 +innodb_ibuf_max_size 16760832 +innodb_import_table_from_xtrabackup 0 +innodb_io_capacity 200 +innodb_kill_idle_transaction 0 +innodb_large_prefix OFF +innodb_lazy_drop_table 0 +innodb_lock_wait_timeout 3 +innodb_locks_unsafe_for_binlog OFF +innodb_log_block_size 512 +innodb_log_buffer_size 8388608 +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_max_dirty_pages_pct 75 +innodb_max_purge_lag 0 +innodb_merge_sort_block_size 1048576 +innodb_mirrored_log_groups 1 +innodb_old_blocks_pct 37 +innodb_old_blocks_time 0 +innodb_open_files 300 +innodb_page_size 16384 +innodb_purge_batch_size 20 +innodb_purge_threads 1 +innodb_random_read_ahead OFF +innodb_read_ahead linear +innodb_read_ahead_threshold 56 +innodb_read_io_threads 4 +innodb_recovery_stats OFF +innodb_recovery_update_relay_log OFF +innodb_replication_delay 0 +innodb_rollback_on_timeout OFF +innodb_rollback_segments 128 +innodb_show_locks_held 10 +innodb_show_verbose_locks 0 +innodb_spin_wait_delay 6 +innodb_stats_auto_update 1 +innodb_stats_method nulls_equal +innodb_stats_on_metadata ON +innodb_stats_sample_pages 8 +innodb_stats_update_need_lock 1 +innodb_strict_mode OFF +innodb_support_xa ON +innodb_sync_spin_loops 30 +innodb_table_locks ON +innodb_thread_concurrency 0 +innodb_thread_concurrency_timer_based OFF +innodb_thread_sleep_delay 10000 +innodb_track_changed_pages OFF +innodb_use_global_flush_log_at_trx_commit ON +innodb_use_native_aio ON +innodb_use_sys_malloc ON +innodb_use_sys_stats_table OFF +innodb_version 1.1.8-rel29.1 +innodb_write_io_threads 4 +interactive_timeout 28800 +join_buffer_size 131072 +keep_files_on_create OFF +key_buffer_size 16777216 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +large_files_support ON +large_page_size 0 +large_pages OFF +lc_messages en_US +lc_messages_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/share/ +lc_time_names en_US +license GPL +local_infile ON +lock_wait_timeout 31536000 +locked_in_memory OFF +log ON +log_bin ON +log_bin_trust_function_creators OFF +log_error /tmp/12345/data/mysqld.log +log_output FILE +log_queries_not_using_indexes OFF +log_slave_updates ON +log_slow_admin_statements OFF +log_slow_filter +log_slow_queries OFF +log_slow_rate_limit 1 +log_slow_rate_type session +log_slow_slave_statements OFF +log_slow_sp_statements ON +log_slow_verbosity +log_warnings 1 +log_warnings_suppress +long_query_time 10.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +max_allowed_packet 1048576 +max_binlog_cache_size 18446744073709547520 +max_binlog_files 0 +max_binlog_size 1073741824 +max_binlog_stmt_cache_size 18446744073709547520 +max_connect_errors 10 +max_connections 151 +max_delayed_threads 20 +max_error_count 64 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 1024 +max_long_data_size 1048576 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 4294967295 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_tmp_tables 32 +max_user_connections 0 +max_write_lock_count 4294967295 +metadata_locks_cache_size 1024 +min_examined_row_limit 0 +multi_range_count 256 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 2146435072 +myisam_mmap_size 4294967295 +myisam_recover_options OFF +myisam_repair_threads 1 +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +net_buffer_length 16384 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +old OFF +old_alter_table OFF +old_passwords OFF +open_files_limit 1024 +optimizer_fix ON +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on +performance_schema OFF +performance_schema_events_waits_history_long_size 10000 +performance_schema_events_waits_history_size 10 +performance_schema_max_cond_classes 80 +performance_schema_max_cond_instances 1000 +performance_schema_max_file_classes 50 +performance_schema_max_file_handles 32768 +performance_schema_max_file_instances 10000 +performance_schema_max_mutex_classes 200 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 +performance_schema_max_table_handles 100000 +performance_schema_max_table_instances 50000 +performance_schema_max_thread_classes 50 +performance_schema_max_thread_instances 1000 +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/lib/mysql/plugin/ +port 12345 +preload_buffer_size 32768 +profiling OFF +profiling_history_size 15 +protocol_version 10 +query_alloc_block_size 8192 +query_cache_limit 1048576 +query_cache_min_res_unit 4096 +query_cache_size 0 +query_cache_strip_comments OFF +query_cache_type ON +query_cache_wlock_invalidate OFF +query_prealloc_size 8192 +query_response_time_range_base 10 +query_response_time_stats OFF +range_alloc_block_size 4096 +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +relay_log mysql-relay-bin +relay_log_index +relay_log_info_file relay-log.info +relay_log_purge ON +relay_log_recovery OFF +relay_log_space_limit 0 +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +rpl_recovery_rank 0 +secure_auth OFF +secure_file_priv +server_id 12345 +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_show_database OFF +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_max_allowed_packet 1073741824 +slave_net_timeout 3600 +slave_skip_errors OFF +slave_transaction_retries 10 +slave_type_conversions +slow_launch_time 2 +slow_query_log OFF +slow_query_log_file /tmp/12345/data/hugmeir-slow.log +slow_query_log_timestamp_always OFF +slow_query_log_timestamp_precision second +slow_query_log_use_global_control +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 2097152 +sql_auto_is_null OFF +sql_big_selects ON +sql_big_tables OFF +sql_buffer_result OFF +sql_log_bin ON +sql_log_off OFF +sql_low_priority_updates OFF +sql_max_join_size 18446744073709551615 +sql_mode +sql_notes ON +sql_quote_show_create ON +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter 0 +sql_warnings OFF +ssl_ca +ssl_capath +ssl_cert +ssl_cipher +ssl_key +storage_engine InnoDB +stored_program_cache 256 +sync_binlog 0 +sync_frm ON +sync_master_info 0 +sync_relay_log 0 +sync_relay_log_info 0 +system_time_zone ART +table_definition_cache 400 +table_open_cache 400 +thread_cache_size 0 +thread_concurrency 10 +thread_handling one-thread-per-connection +thread_stack 196608 +thread_statistics OFF +time_format %H:%i:%s +time_zone SYSTEM +timed_mutexes OFF +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_prealloc_size 4096 +tx_isolation REPEATABLE-READ +unique_checks ON +updatable_views_with_limit YES +userstat OFF +version 5.5.28-23.7-log +version_comment Percona XtraDB Cluster (GPL) 5.5.28-23.7, Revision 373, wsrep_23.7.r3821 +version_compile_machine i686 +version_compile_os Linux +wait_timeout 28800 +wsrep_OSU_method TOI +wsrep_auto_increment_control ON +wsrep_causal_reads OFF +wsrep_certify_nonPK ON +wsrep_cluster_address +wsrep_cluster_name my_wsrep_cluster +wsrep_convert_LOCK_to_trx OFF +wsrep_data_home_dir +wsrep_dbug_option +wsrep_debug OFF +wsrep_drupal_282555_workaround OFF +wsrep_forced_binlog_format NONE +wsrep_log_conflicts OFF +wsrep_max_ws_rows 131072 +wsrep_max_ws_size 1073741824 +wsrep_mysql_replication_bundle 0 +wsrep_node_address +wsrep_node_incoming_address AUTO +wsrep_node_name +wsrep_notify_cmd +wsrep_on OFF +wsrep_provider none +wsrep_provider_options +wsrep_recover OFF +wsrep_replicate_myisam OFF +wsrep_retry_autocommit 1 +wsrep_slave_threads 1 +wsrep_sst_auth +wsrep_sst_donor +wsrep_sst_donor_rejects_queries OFF +wsrep_sst_method mysqldump +wsrep_sst_receive_address AUTO +wsrep_start_position 00000000-0000-0000-0000-000000000000:-1 +internal::nice_of_31026 0 +internal::oom_of_31026 0 +internal::nice_of_30949 0 +internal::oom_of_30949 0 +internal::nice_of_30877 0 +internal::oom_of_30877 0 +pt-summary-internal-pid_file_exists 1 +pt-summary-internal-current_time 2012-11-27 18:58 +pt-summary-internal-Config_File_path +pt-summary-internal-mysql_executable /usr/bin/mysql +pt-summary-internal-now 2012-11-27 18:59:59 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 6 +pt-summary-internal-mysqld_executable_1 Yes diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysqld-executables b/t/pt-mysql-summary/samples/temp_enc007/mysqld-executables new file mode 100644 index 000000000..0f2dcd699 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysqld-executables @@ -0,0 +1 @@ +/home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc007/mysqld-instances new file mode 100644 index 000000000..fc26351bb --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysqld-instances @@ -0,0 +1,4 @@ + PID TTY STAT TIME COMMAND +30877 pts/6 Sl 0:09 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf +30949 pts/6 Sl 0:09 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld --defaults-file=/tmp/12346/my.sandbox.cnf +31026 pts/6 Sl 0:09 /home/hugmeir/mysql5/mysqlbrew/mysqls/Percona-XtraDB-Cluster-5.5.28-23.7.373.Linux.i686/bin/mysqld --defaults-file=/tmp/12347/my.sandbox.cnf diff --git a/t/pt-mysql-summary/samples/temp_enc007/mysqldump b/t/pt-mysql-summary/samples/temp_enc007/mysqldump new file mode 100644 index 000000000..26628a280 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc007/mysqldump @@ -0,0 +1,1129 @@ + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `mysql`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `columns_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `db` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`,`User`), + KEY `User` (`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `event` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `execute_at` datetime DEFAULT NULL, + `interval_value` int(11) DEFAULT NULL, + `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `last_executed` datetime DEFAULT NULL, + `starts` datetime DEFAULT NULL, + `ends` datetime DEFAULT NULL, + `status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED', + `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `originator` int(10) unsigned NOT NULL, + `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `func` ( + `name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `ret` tinyint(1) NOT NULL DEFAULT '0', + `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', + `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_category` ( + `help_category_id` smallint(5) unsigned NOT NULL, + `name` char(64) NOT NULL, + `parent_category_id` smallint(5) unsigned DEFAULT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_category_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_keyword` ( + `help_keyword_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + PRIMARY KEY (`help_keyword_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_relation` ( + `help_topic_id` int(10) unsigned NOT NULL, + `help_keyword_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`help_keyword_id`,`help_topic_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `help_topic` ( + `help_topic_id` int(10) unsigned NOT NULL, + `name` char(64) NOT NULL, + `help_category_id` smallint(5) unsigned NOT NULL, + `description` text NOT NULL, + `example` text NOT NULL, + `url` char(128) NOT NULL, + PRIMARY KEY (`help_topic_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `host` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + PRIMARY KEY (`Host`,`Db`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ndb_binlog_index` ( + `Position` bigint(20) unsigned NOT NULL, + `File` varchar(255) NOT NULL, + `epoch` bigint(20) unsigned NOT NULL, + `inserts` bigint(20) unsigned NOT NULL, + `updates` bigint(20) unsigned NOT NULL, + `deletes` bigint(20) unsigned NOT NULL, + `schemaops` bigint(20) unsigned NOT NULL, + PRIMARY KEY (`epoch`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `plugin` ( + `name` varchar(64) NOT NULL DEFAULT '', + `dl` varchar(128) NOT NULL DEFAULT '', + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL plugins'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proc` ( + `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `name` char(64) NOT NULL DEFAULT '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL DEFAULT '', + `language` enum('SQL') NOT NULL DEFAULT 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER', + `param_list` blob NOT NULL, + `returns` longblob NOT NULL, + `body` longblob NOT NULL, + `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '', + `comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `body_utf8` longblob, + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `procs_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '', + `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL, + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `servers` ( + `Server_name` char(64) NOT NULL DEFAULT '', + `Host` char(64) NOT NULL DEFAULT '', + `Db` char(64) NOT NULL DEFAULT '', + `Username` char(64) NOT NULL DEFAULT '', + `Password` char(64) NOT NULL DEFAULT '', + `Port` int(4) NOT NULL DEFAULT '0', + `Socket` char(64) NOT NULL DEFAULT '', + `Wrapper` char(64) NOT NULL DEFAULT '', + `Owner` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`Server_name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `tables_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '', + `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', + PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone` ( + `Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N', + PRIMARY KEY (`Time_zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_leap_second` ( + `Transition_time` bigint(20) NOT NULL, + `Correction` int(11) NOT NULL, + PRIMARY KEY (`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_name` ( + `Name` char(64) NOT NULL, + `Time_zone_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_time` bigint(20) NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`Time_zone_id`,`Transition_time`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `time_zone_transition_type` ( + `Time_zone_id` int(10) unsigned NOT NULL, + `Transition_type_id` int(10) unsigned NOT NULL, + `Offset` int(11) NOT NULL DEFAULT '0', + `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0', + `Abbreviation` char(8) NOT NULL DEFAULT '', + PRIMARY KEY (`Time_zone_id`,`Transition_type_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types'; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '', + `ssl_cipher` blob NOT NULL, + `x509_issuer` blob NOT NULL, + `x509_subject` blob NOT NULL, + `max_questions` int(11) unsigned NOT NULL DEFAULT '0', + `max_updates` int(11) unsigned NOT NULL DEFAULT '0', + `max_connections` int(11) unsigned NOT NULL DEFAULT '0', + `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0', + `plugin` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `authentication_string` text COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`Host`,`User`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `percona_test` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `percona_test`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `checksums` ( + `db_tbl` varchar(128) NOT NULL, + `checksum` int(10) unsigned NOT NULL, + PRIMARY KEY (`db_tbl`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `load_data` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `sentinel` ( + `id` int(11) NOT NULL, + `ping` varchar(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `sakila` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `sakila`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `actor` ( + `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`), + KEY `idx_actor_last_name` (`last_name`) +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `actor_info` ( + `actor_id` smallint(5) unsigned, + `first_name` varchar(45), + `last_name` varchar(45), + `film_info` text +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `address` ( + `address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `address` varchar(50) NOT NULL, + `address2` varchar(50) DEFAULT NULL, + `district` varchar(20) NOT NULL, + `city_id` smallint(5) unsigned NOT NULL, + `postal_code` varchar(10) DEFAULT NULL, + `phone` varchar(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_fk_city_id` (`city_id`), + CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `category` ( + `category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(25) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `city` ( + `city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `city` varchar(50) NOT NULL, + `country_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`city_id`), + KEY `idx_fk_country_id` (`country_id`), + CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `country` ( + `country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `country` varchar(50) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`country_id`) +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `customer` ( + `customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `store_id` tinyint(3) unsigned NOT NULL, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `email` varchar(50) DEFAULT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `create_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`customer_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + KEY `idx_last_name` (`last_name`), + CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER customer_create_date BEFORE INSERT ON customer + FOR EACH ROW SET NEW.create_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `customer_list` ( + `ID` smallint(5) unsigned, + `name` varchar(91), + `address` varchar(50), + `zip code` varchar(10), + `phone` varchar(20), + `city` varchar(50), + `country` varchar(50), + `notes` varchar(6), + `SID` tinyint(3) unsigned +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film` ( + `film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `description` text, + `release_year` year(4) DEFAULT NULL, + `language_id` tinyint(3) unsigned NOT NULL, + `original_language_id` tinyint(3) unsigned DEFAULT NULL, + `rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3', + `rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99', + `length` smallint(5) unsigned DEFAULT NULL, + `replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99', + `rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G', + `special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`), + KEY `idx_title` (`title`), + KEY `idx_fk_language_id` (`language_id`), + KEY `idx_fk_original_language_id` (`original_language_id`), + CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `ins_film` AFTER INSERT ON `film` FOR EACH ROW BEGIN + INSERT INTO film_text (film_id, title, description) + VALUES (new.film_id, new.title, new.description); + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `upd_film` AFTER UPDATE ON `film` FOR EACH ROW BEGIN + IF (old.title != new.title) or (old.description != new.description) + THEN + UPDATE film_text + SET title=new.title, + description=new.description, + film_id=new.film_id + WHERE film_id=old.film_id; + END IF; + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER `del_film` AFTER DELETE ON `film` FOR EACH ROW BEGIN + DELETE FROM film_text WHERE film_id = old.film_id; + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_actor` ( + `actor_id` smallint(5) unsigned NOT NULL, + `film_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`actor_id`,`film_id`), + KEY `idx_fk_film_id` (`film_id`), + CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_category` ( + `film_id` smallint(5) unsigned NOT NULL, + `category_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`film_id`,`category_id`), + KEY `fk_film_category_category` (`category_id`), + CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `film_list` ( + `FID` smallint(5) unsigned, + `title` varchar(255), + `description` text, + `category` varchar(25), + `price` decimal(4,2), + `length` smallint(5) unsigned, + `rating` enum('G','PG','PG-13','R','NC-17'), + `actors` text +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `film_text` ( + `film_id` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `description` text, + PRIMARY KEY (`film_id`), + FULLTEXT KEY `idx_title_description` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `inventory` ( + `inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `film_id` smallint(5) unsigned NOT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`inventory_id`), + KEY `idx_fk_film_id` (`film_id`), + KEY `idx_store_id_film_id` (`store_id`,`film_id`), + CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `language` ( + `language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `name` char(20) NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`language_id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `nicer_but_slower_film_list` ( + `FID` smallint(5) unsigned, + `title` varchar(255), + `description` text, + `category` varchar(25), + `price` decimal(4,2), + `length` smallint(5) unsigned, + `rating` enum('G','PG','PG-13','R','NC-17'), + `actors` text +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `payment` ( + `payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `customer_id` smallint(5) unsigned NOT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `rental_id` int(11) DEFAULT NULL, + `amount` decimal(5,2) NOT NULL, + `payment_date` datetime NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_fk_staff_id` (`staff_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `fk_payment_rental` (`rental_id`), + CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER payment_date BEFORE INSERT ON payment + FOR EACH ROW SET NEW.payment_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rental` ( + `rental_id` int(11) NOT NULL AUTO_INCREMENT, + `rental_date` datetime NOT NULL, + `inventory_id` mediumint(8) unsigned NOT NULL, + `customer_id` smallint(5) unsigned NOT NULL, + `return_date` datetime DEFAULT NULL, + `staff_id` tinyint(3) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`rental_id`), + UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), + KEY `idx_fk_inventory_id` (`inventory_id`), + KEY `idx_fk_customer_id` (`customer_id`), + KEY `idx_fk_staff_id` (`staff_id`), + CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`msandbox`@`%`*/ /*!50003 TRIGGER rental_date BEFORE INSERT ON rental + FOR EACH ROW SET NEW.rental_date = NOW() */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `sales_by_film_category` ( + `category` varchar(25), + `total_sales` decimal(27,2) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `sales_by_store` ( + `store` varchar(101), + `manager` varchar(91), + `total_sales` decimal(27,2) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `staff` ( + `staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `first_name` varchar(45) NOT NULL, + `last_name` varchar(45) NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `picture` blob, + `email` varchar(50) DEFAULT NULL, + `store_id` tinyint(3) unsigned NOT NULL, + `active` tinyint(1) NOT NULL DEFAULT '1', + `username` varchar(16) NOT NULL, + `password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`staff_id`), + KEY `idx_fk_store_id` (`store_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `staff_list` ( + `ID` tinyint(3) unsigned, + `name` varchar(91), + `address` varchar(50), + `zip code` varchar(10), + `phone` varchar(20), + `city` varchar(50), + `country` varchar(50), + `SID` tinyint(3) unsigned +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `store` ( + `store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `manager_staff_id` tinyint(3) unsigned NOT NULL, + `address_id` smallint(5) unsigned NOT NULL, + `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), + KEY `idx_fk_address_id` (`address_id`), + CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE, + CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `get_customer_balance`(p_customer_id INT, p_effective_date DATETIME) RETURNS decimal(5,2) + READS SQL DATA + DETERMINISTIC +BEGIN + + + + + + + + + DECLARE v_rentfees DECIMAL(5,2); + DECLARE v_overfees INTEGER; + DECLARE v_payments DECIMAL(5,2); + + SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees + FROM film, inventory, rental + WHERE film.film_id = inventory.film_id + AND inventory.inventory_id = rental.inventory_id + AND rental.rental_date <= p_effective_date + AND rental.customer_id = p_customer_id; + + SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration, + ((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees + FROM rental, inventory, film + WHERE film.film_id = inventory.film_id + AND inventory.inventory_id = rental.inventory_id + AND rental.rental_date <= p_effective_date + AND rental.customer_id = p_customer_id; + + + SELECT IFNULL(SUM(payment.amount),0) INTO v_payments + FROM payment + + WHERE payment.payment_date <= p_effective_date + AND payment.customer_id = p_customer_id; + + RETURN v_rentfees + v_overfees - v_payments; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `inventory_held_by_customer`(p_inventory_id INT) RETURNS int(11) + READS SQL DATA +BEGIN + DECLARE v_customer_id INT; + DECLARE EXIT HANDLER FOR NOT FOUND RETURN NULL; + + SELECT customer_id INTO v_customer_id + FROM rental + WHERE return_date IS NULL + AND inventory_id = p_inventory_id; + + RETURN v_customer_id; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 FUNCTION `inventory_in_stock`(p_inventory_id INT) RETURNS tinyint(1) + READS SQL DATA +BEGIN + DECLARE v_rentals INT; + DECLARE v_out INT; + + + + + SELECT COUNT(*) INTO v_rentals + FROM rental + WHERE inventory_id = p_inventory_id; + + IF v_rentals = 0 THEN + RETURN TRUE; + END IF; + + SELECT COUNT(rental_id) INTO v_out + FROM inventory LEFT JOIN rental USING(inventory_id) + WHERE inventory.inventory_id = p_inventory_id + AND rental.return_date IS NULL; + + IF v_out > 0 THEN + RETURN FALSE; + ELSE + RETURN TRUE; + END IF; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `film_in_stock`(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) + READS SQL DATA +BEGIN + SELECT inventory_id + FROM inventory + WHERE film_id = p_film_id + AND store_id = p_store_id + AND inventory_in_stock(inventory_id); + + SELECT FOUND_ROWS() INTO p_film_count; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `film_not_in_stock`(IN p_film_id INT, IN p_store_id INT, OUT p_film_count INT) + READS SQL DATA +BEGIN + SELECT inventory_id + FROM inventory + WHERE film_id = p_film_id + AND store_id = p_store_id + AND NOT inventory_in_stock(inventory_id); + + SELECT FOUND_ROWS() INTO p_film_count; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50020 DEFINER=`msandbox`@`%`*/ /*!50003 PROCEDURE `rewards_report`( + IN min_monthly_purchases TINYINT UNSIGNED + , IN min_dollar_amount_purchased DECIMAL(10,2) UNSIGNED + , OUT count_rewardees INT +) + READS SQL DATA + COMMENT 'Provides a customizable report on best customers' +proc: BEGIN + + DECLARE last_month_start DATE; + DECLARE last_month_end DATE; + + + IF min_monthly_purchases = 0 THEN + SELECT 'Minimum monthly purchases parameter must be > 0'; + LEAVE proc; + END IF; + IF min_dollar_amount_purchased = 0.00 THEN + SELECT 'Minimum monthly dollar amount purchased parameter must be > $0.00'; + LEAVE proc; + END IF; + + + SET last_month_start = DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH); + SET last_month_start = STR_TO_DATE(CONCAT(YEAR(last_month_start),'-',MONTH(last_month_start),'-01'),'%Y-%m-%d'); + SET last_month_end = LAST_DAY(last_month_start); + + + CREATE TEMPORARY TABLE tmpCustomer (customer_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY); + + + INSERT INTO tmpCustomer (customer_id) + SELECT p.customer_id + FROM payment AS p + WHERE DATE(p.payment_date) BETWEEN last_month_start AND last_month_end + GROUP BY customer_id + HAVING SUM(p.amount) > min_dollar_amount_purchased + AND COUNT(customer_id) > min_monthly_purchases; + + + SELECT COUNT(*) FROM tmpCustomer INTO count_rewardees; + + + SELECT c.* + FROM tmpCustomer AS t + INNER JOIN customer AS c ON t.customer_id = c.customer_id; + + + DROP TABLE tmpCustomer; +END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; + +USE `mysql`; + +USE `percona_test`; + +USE `sakila`; +/*!50001 DROP TABLE IF EXISTS `actor_info`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY INVOKER */ +/*!50001 VIEW `actor_info` AS select `a`.`actor_id` AS `actor_id`,`a`.`first_name` AS `first_name`,`a`.`last_name` AS `last_name`,group_concat(distinct concat(`c`.`name`,': ',(select group_concat(`f`.`title` order by `f`.`title` ASC separator ', ') from ((`film` `f` join `film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `film_actor` `fa` on((`f`.`film_id` = `fa`.`film_id`))) where ((`fc`.`category_id` = `c`.`category_id`) and (`fa`.`actor_id` = `a`.`actor_id`)))) order by `c`.`name` ASC separator '; ') AS `film_info` from (((`actor` `a` left join `film_actor` `fa` on((`a`.`actor_id` = `fa`.`actor_id`))) left join `film_category` `fc` on((`fa`.`film_id` = `fc`.`film_id`))) left join `category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `a`.`actor_id`,`a`.`first_name`,`a`.`last_name` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `customer_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `customer_list` AS select `cu`.`customer_id` AS `ID`,concat(`cu`.`first_name`,_utf8' ',`cu`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`city`.`city` AS `city`,`country`.`country` AS `country`,if(`cu`.`active`,_utf8'active',_utf8'') AS `notes`,`cu`.`store_id` AS `SID` from (((`customer` `cu` join `address` `a` on((`cu`.`address_id` = `a`.`address_id`))) join `city` on((`a`.`city_id` = `city`.`city_id`))) join `country` on((`city`.`country_id` = `country`.`country_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `film_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `film_list` AS select `film`.`film_id` AS `FID`,`film`.`title` AS `title`,`film`.`description` AS `description`,`category`.`name` AS `category`,`film`.`rental_rate` AS `price`,`film`.`length` AS `length`,`film`.`rating` AS `rating`,group_concat(concat(`actor`.`first_name`,_utf8' ',`actor`.`last_name`) separator ', ') AS `actors` from ((((`category` left join `film_category` on((`category`.`category_id` = `film_category`.`category_id`))) left join `film` on((`film_category`.`film_id` = `film`.`film_id`))) join `film_actor` on((`film`.`film_id` = `film_actor`.`film_id`))) join `actor` on((`film_actor`.`actor_id` = `actor`.`actor_id`))) group by `film`.`film_id` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `nicer_but_slower_film_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `nicer_but_slower_film_list` AS select `film`.`film_id` AS `FID`,`film`.`title` AS `title`,`film`.`description` AS `description`,`category`.`name` AS `category`,`film`.`rental_rate` AS `price`,`film`.`length` AS `length`,`film`.`rating` AS `rating`,group_concat(concat(concat(ucase(substr(`actor`.`first_name`,1,1)),lcase(substr(`actor`.`first_name`,2,length(`actor`.`first_name`))),_utf8' ',concat(ucase(substr(`actor`.`last_name`,1,1)),lcase(substr(`actor`.`last_name`,2,length(`actor`.`last_name`)))))) separator ', ') AS `actors` from ((((`category` left join `film_category` on((`category`.`category_id` = `film_category`.`category_id`))) left join `film` on((`film_category`.`film_id` = `film`.`film_id`))) join `film_actor` on((`film`.`film_id` = `film_actor`.`film_id`))) join `actor` on((`film_actor`.`actor_id` = `actor`.`actor_id`))) group by `film`.`film_id` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `sales_by_film_category`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `sales_by_film_category` AS select `c`.`name` AS `category`,sum(`p`.`amount`) AS `total_sales` from (((((`payment` `p` join `rental` `r` on((`p`.`rental_id` = `r`.`rental_id`))) join `inventory` `i` on((`r`.`inventory_id` = `i`.`inventory_id`))) join `film` `f` on((`i`.`film_id` = `f`.`film_id`))) join `film_category` `fc` on((`f`.`film_id` = `fc`.`film_id`))) join `category` `c` on((`fc`.`category_id` = `c`.`category_id`))) group by `c`.`name` order by sum(`p`.`amount`) desc */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `sales_by_store`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `sales_by_store` AS select concat(`c`.`city`,_utf8',',`cy`.`country`) AS `store`,concat(`m`.`first_name`,_utf8' ',`m`.`last_name`) AS `manager`,sum(`p`.`amount`) AS `total_sales` from (((((((`payment` `p` join `rental` `r` on((`p`.`rental_id` = `r`.`rental_id`))) join `inventory` `i` on((`r`.`inventory_id` = `i`.`inventory_id`))) join `store` `s` on((`i`.`store_id` = `s`.`store_id`))) join `address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `city` `c` on((`a`.`city_id` = `c`.`city_id`))) join `country` `cy` on((`c`.`country_id` = `cy`.`country_id`))) join `staff` `m` on((`s`.`manager_staff_id` = `m`.`staff_id`))) group by `s`.`store_id` order by `cy`.`country`,`c`.`city` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP TABLE IF EXISTS `staff_list`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`msandbox`@`%` SQL SECURITY DEFINER */ +/*!50001 VIEW `staff_list` AS select `s`.`staff_id` AS `ID`,concat(`s`.`first_name`,_utf8' ',`s`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`city`.`city` AS `city`,`country`.`country` AS `country`,`s`.`store_id` AS `SID` from (((`staff` `s` join `address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `city` on((`a`.`city_id` = `city`.`city_id`))) join `country` on((`city`.`country_id` = `country`.`country_id`))) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; diff --git a/t/pt-mysql-summary/samples/temp_enc008/collect.err b/t/pt-mysql-summary/samples/temp_enc008/collect.err new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc008/encrypted-tables b/t/pt-mysql-summary/samples/temp_enc008/encrypted-tables new file mode 100644 index 000000000..6665d4710 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/encrypted-tables @@ -0,0 +1,6 @@ ++--------------+------------+----------------+ +| TABLE_SCHEMA | TABLE_NAME | CREATE_OPTIONS | ++--------------+------------+----------------+ +| test | t1 | ENCRYPTION='Y' | +| test | t2 | ENCRYPTION='Y' | ++--------------+------------+----------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc008/encrypted-tablespaces b/t/pt-mysql-summary/samples/temp_enc008/encrypted-tablespaces new file mode 100644 index 000000000..d65f62145 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/encrypted-tablespaces @@ -0,0 +1,6 @@ ++-------+---------+------------+ +| SPACE | NAME | SPACE_TYPE | ++-------+---------+------------+ +| 89 | foo | General | +| 90 | test/t2 | Single | ++-------+---------+------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc008/innodb-status b/t/pt-mysql-summary/samples/temp_enc008/innodb-status new file mode 100644 index 000000000..91ab281e3 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/innodb-status @@ -0,0 +1,127 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +2023-07-13 23:29:50 140536853775936 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 10 seconds +----------------- +BACKGROUND THREAD +----------------- +srv_master_thread loops: 170 srv_active, 0 srv_shutdown, 41116 srv_idle +srv_master_thread log flush and writes: 0 +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 674 +OS WAIT ARRAY INFO: signal count 462 +RW-shared spins 0, rounds 0, OS waits 0 +RW-excl spins 0, rounds 0, OS waits 0 +RW-sx spins 0, rounds 0, OS waits 0 +Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx +------------ +TRANSACTIONS +------------ +Trx id counter 3392 +Purge done for trx's n:o < 3392 undo n:o < 0 state: running but idle +History list length 9 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 422011977339912, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977339064, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977338216, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977337368, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977336520, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for completed aio requests (insert buffer thread) +I/O thread 1 state: waiting for completed aio requests (log thread) +I/O thread 2 state: waiting for completed aio requests (read thread) +I/O thread 3 state: waiting for completed aio requests (read thread) +I/O thread 4 state: waiting for completed aio requests (read thread) +I/O thread 5 state: waiting for completed aio requests (read thread) +I/O thread 6 state: waiting for completed aio requests (write thread) +I/O thread 7 state: waiting for completed aio requests (write thread) +I/O thread 8 state: waiting for completed aio requests (write thread) +I/O thread 9 state: waiting for completed aio requests (write thread) +Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] , + ibuf aio reads:, log i/o's: +Pending flushes (fsync) log: 0; buffer pool: 0 +14318 OS file reads, 15820 OS file writes, 8766 OS fsyncs +8.04 reads/s, 16384 avg bytes/read, 8.50 writes/s, 5.82 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, 0 merges +merged operations: + insert 0, delete mark 0, delete 0 +discarded operations: + insert 0, delete mark 0, delete 0 +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 2 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +3.10 hash searches/s, 53.09 non-hash searches/s +--- +LOG +--- +Log sequence number 32368884 +Log buffer assigned up to 32368884 +Log buffer completed up to 32368884 +Log written up to 32368884 +Log flushed up to 32368884 +Added dirty pages up to 32368884 +Pages flushed up to 32298273 +Last checkpoint at 32298273 +Log minimum file id is 96 +Log maximum file id is 99 +Modified age no less than 70611 +Checkpoint age 70611 +Max checkpoint age 7945216 +6389 log i/o's done, 7.27 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total large memory allocated 0 +Dictionary memory allocated 900158 +Buffer pool size 1023 +Buffer pool size, bytes 16760832 +Free buffers 653 +Database pages 361 +Old database pages 0 +Modified db pages 113 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages made young 384, not young 16590 +0.00 youngs/s, 0.00 non-youngs/s +Pages read 14292, created 1928, written 6724 +8.04 reads/s, 2.31 creates/s, 0.09 writes/s +Buffer pool hit rate 951 / 1000, young-making rate 0 / 1000 not 0 / 1000 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s +LRU len: 361, unzip_LRU len: 0 +I/O sum[408]:cur[80], unzip sum[0]:cur[0] +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +0 read views open inside InnoDB +0 RW transactions active inside InnoDB +Process ID=1088931, Main thread ID=140536702826048 , state=sleeping +Number of rows inserted 58153, updated 16, deleted 0, read 428801 +9.80 inserts/s, 0.00 updates/s, 0.00 deletes/s, 9.80 reads/s +Number of system rows inserted 2034, updated 2199, deleted 917, read 193943 +3.70 inserts/s, 1.80 updates/s, 1.00 deletes/s, 13.80 reads/s +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc008/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc008/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-config-file b/t/pt-mysql-summary/samples/temp_enc008/mysql-config-file new file mode 100644 index 000000000..676507cdb --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-config-file @@ -0,0 +1,42 @@ +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35 +datadir = /tmp/12345/data +general_log +general_log_file = genlog +innodb_buffer_pool_size = 16M +innodb_data_file_path = ibdata1:10M:autoextend +innodb_data_home_dir = /tmp/12345/data +innodb_lock_wait_timeout = 3 +innodb_log_file_size = 5M +innodb_log_group_home_dir = /tmp/12345/data +key_buffer_size = 5M +local-infile = 1 +log-bin = mysql-bin +log-error = /tmp/12345/data/mysqld.log +log_slave_updates +lower_case_table_names = 0 +relay_log = mysql-relay-bin +report-host = 127.0.0.1 +report-port = 12345 +server-id = 12345 +slow-query-log = 1 +slow-query-log-file = /tmp/12345/data/slow.log +log_slow_admin_statements = 1 +long_query_time = 0 +default_authentication_plugin=mysql_native_password + +# fkc test +binlog_format = STATEMENT +#performance_schema = ON +#performance-schema-instrument='wait/lock/metadata/sql/mdl=ON' +#performance-schema-instrument='transaction=ON' +secure-file-priv = diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-databases b/t/pt-mysql-summary/samples/temp_enc008/mysql-databases new file mode 100644 index 000000000..a3b70fc2a --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-databases @@ -0,0 +1,7 @@ +information_schema +mysql +percona_test +performance_schema +sakila +sys +test diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc008/mysql-master-logs new file mode 100644 index 000000000..55ddaf48c --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-master-logs @@ -0,0 +1,2 @@ +mysql-bin.000001 180 No +mysql-bin.000002 3445236 No diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc008/mysql-master-status new file mode 100644 index 000000000..bc42a3165 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000002 3445236 diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc008/mysql-plugins new file mode 100644 index 000000000..190991815 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-plugins @@ -0,0 +1,49 @@ +keyring_file ACTIVE KEYRING keyring_file.so GPL +binlog ACTIVE STORAGE ENGINE NULL GPL +mysql_native_password ACTIVE AUTHENTICATION NULL GPL +sha256_password ACTIVE AUTHENTICATION NULL GPL +caching_sha2_password ACTIVE AUTHENTICATION NULL GPL +sha2_cache_cleaner ACTIVE AUDIT NULL GPL +daemon_keyring_proxy_plugin ACTIVE DAEMON NULL GPL +PERFORMANCE_SCHEMA ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_PER_INDEX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_PER_INDEX_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE_LRU ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TEMP_TABLE_INFO ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_METRICS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_DEFAULT_STOPWORD ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_DELETED ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_BEING_DELETED ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_CONFIG ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_INDEX_CACHE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_INDEX_TABLE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLESTATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLESPACES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_COLUMNS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_VIRTUAL ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CACHED_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SESSION_TEMP_TABLESPACES ACTIVE INFORMATION SCHEMA NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL +TempTable ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +ndbcluster DISABLED STORAGE ENGINE NULL GPL +ndbinfo DISABLED STORAGE ENGINE NULL GPL +ndb_transid_mysql_connection_map DISABLED INFORMATION SCHEMA NULL GPL +ngram ACTIVE FTPARSER NULL GPL +mysqlx_cache_cleaner ACTIVE AUDIT NULL GPL +mysqlx ACTIVE DAEMON NULL GPL diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc008/mysql-processlist new file mode 100644 index 000000000..a3677dbf9 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-processlist @@ -0,0 +1,60 @@ +*************************** 1. row *************************** + Id: 5 + User: event_scheduler + Host: localhost + db: NULL + Command: Daemon + Time: 108231 + State: Waiting on empty queue + Info: NULL + Time_ms: 108231222 + Rows_sent: 0 +Rows_examined: 0 +*************************** 2. row *************************** + Id: 14 + User: msandbox + Host: localhost:42338 + db: NULL + Command: Binlog Dump + Time: 108226 + State: Source has sent all binlog to replica; waiting for more updates + Info: NULL + Time_ms: 108225558 + Rows_sent: 0 +Rows_examined: 0 +*************************** 3. row *************************** + Id: 2436 + User: msandbox + Host: localhost:41094 + db: NULL + Command: Sleep + Time: 2520 + State: + Info: NULL + Time_ms: 2519799 + Rows_sent: 0 +Rows_examined: 0 +*************************** 4. row *************************** + Id: 3175 + User: msandbox + Host: localhost:44620 + db: NULL + Command: Sleep + Time: 0 + State: + Info: NULL + Time_ms: 123 + Rows_sent: 0 +Rows_examined: 0 +*************************** 5. row *************************** + Id: 3259 + User: msandbox + Host: localhost + db: NULL + Command: Query + Time: 0 + State: init + Info: SHOW FULL PROCESSLIST + Time_ms: 0 + Rows_sent: 0 +Rows_examined: 0 diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-roles b/t/pt-mysql-summary/samples/temp_enc008/mysql-roles new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-slave b/t/pt-mysql-summary/samples/temp_enc008/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-slave-hosts b/t/pt-mysql-summary/samples/temp_enc008/mysql-slave-hosts new file mode 100644 index 000000000..66a9097d2 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-slave-hosts @@ -0,0 +1,6 @@ +*************************** 1. row *************************** + Server_id: 12346 + Host: 127.0.0.1 + Port: 12346 + Master_id: 12345 +Slave_UUID: 05c34f44-20c0-11ee-ad4c-7404f1a10a4a diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-status b/t/pt-mysql-summary/samples/temp_enc008/mysql-status new file mode 100644 index 000000000..5a4525b5d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-status @@ -0,0 +1,539 @@ +Aborted_clients 50 +Aborted_connects 0 +Acl_cache_items_count 0 +Binlog_snapshot_file mysql-bin.000002 +Binlog_snapshot_position 3445236 +Binlog_cache_disk_use 10 +Binlog_cache_use 324 +Binlog_snapshot_gtid_executed not-in-consistent-snapshot +Binlog_stmt_cache_disk_use 1 +Binlog_stmt_cache_use 31 +Bytes_received 5253784 +Bytes_sent 19111484 +Caching_sha2_password_rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Com_admin_commands 2 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_instance 0 +Com_alter_procedure 0 +Com_alter_resource_group 0 +Com_alter_server 0 +Com_alter_table 55 +Com_alter_tablespace 47 +Com_alter_user 3 +Com_alter_user_default_role 0 +Com_analyze 1 +Com_begin 0 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 957 +Com_change_master 0 +Com_change_repl_filter 0 +Com_change_replication_source 0 +Com_check 0 +Com_checksum 9 +Com_clone 0 +Com_commit 2 +Com_create_compression_dictionary 0 +Com_create_db 35 +Com_create_event 0 +Com_create_function 0 +Com_create_index 0 +Com_create_procedure 0 +Com_create_role 0 +Com_create_server 0 +Com_create_table 102 +Com_create_resource_group 0 +Com_create_trigger 3 +Com_create_udf 0 +Com_create_user 3 +Com_create_view 7 +Com_create_spatial_reference_system 0 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_compression_dictionary 0 +Com_drop_db 52 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_resource_group 0 +Com_drop_role 0 +Com_drop_server 0 +Com_drop_spatial_reference_system 0 +Com_drop_table 41 +Com_drop_trigger 0 +Com_drop_user 2 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_explain_other 0 +Com_flush 3 +Com_get_diagnostics 0 +Com_grant 3 +Com_grant_roles 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_import 0 +Com_insert 48 +Com_insert_select 0 +Com_install_component 0 +Com_install_plugin 0 +Com_kill 0 +Com_load 1 +Com_lock_instance 0 +Com_lock_tables 16 +Com_lock_tables_for_backup 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 1 +Com_replace_select 0 +Com_reset 0 +Com_resignal 0 +Com_restart 0 +Com_revoke 0 +Com_revoke_all 0 +Com_revoke_roles 0 +Com_rollback 1 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 6584 +Com_set_option 6756 +Com_set_password 0 +Com_set_resource_group 0 +Com_set_role 0 +Com_signal 0 +Com_show_binlog_events 0 +Com_show_binlogs 104 +Com_show_charsets 0 +Com_show_client_statistics 0 +Com_show_collations 0 +Com_show_create_db 29 +Com_show_create_event 0 +Com_show_create_func 0 +Com_show_create_proc 0 +Com_show_create_table 900 +Com_show_create_trigger 0 +Com_show_databases 124 +Com_show_engine_logs 0 +Com_show_engine_mutex 8 +Com_show_engine_status 113 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 1900 +Com_show_function_code 0 +Com_show_function_status 25 +Com_show_grants 0 +Com_show_index_statistics 0 +Com_show_keys 0 +Com_show_master_status 104 +Com_show_open_tables 8 +Com_show_plugins 131 +Com_show_privileges 0 +Com_show_procedure_code 0 +Com_show_procedure_status 25 +Com_show_processlist 118 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_relaylog_events 0 +Com_show_replicas 104 +Com_show_slave_hosts 104 +Com_show_replica_status 110 +Com_show_slave_status 110 +Com_show_status 350 +Com_show_storage_engines 295 +Com_show_table_statistics 0 +Com_show_table_status 950 +Com_show_tables 62 +Com_show_thread_statistics 0 +Com_show_triggers 900 +Com_show_user_statistics 0 +Com_show_variables 316 +Com_show_warnings 0 +Com_show_create_user 0 +Com_shutdown 0 +Com_replica_start 0 +Com_slave_start 0 +Com_replica_stop 0 +Com_slave_stop 0 +Com_group_replication_start 0 +Com_group_replication_stop 0 +Com_stmt_execute 0 +Com_stmt_close 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_component 0 +Com_uninstall_plugin 0 +Com_unlock_instance 0 +Com_unlock_tables 43 +Com_update 17 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Com_stmt_reprepare 0 +Connection_errors_accept 0 +Connection_errors_internal 0 +Connection_errors_max_connections 0 +Connection_errors_peer_address 0 +Connection_errors_select 0 +Connection_errors_tcpwrap 0 +Connections 3253 +Created_tmp_disk_tables 264 +Created_tmp_files 7 +Created_tmp_tables 4299 +Current_tls_ca ca.pem +Current_tls_capath +Current_tls_cert server-cert.pem +Current_tls_cipher +Current_tls_ciphersuites +Current_tls_crl +Current_tls_crlpath +Current_tls_key server-key.pem +Current_tls_version TLSv1.2,TLSv1.3 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Error_log_buffered_bytes 3952 +Error_log_buffered_events 22 +Error_log_expired_events 0 +Error_log_latest_write 1689171959141812 +Flush_commands 4 +Global_connection_memory 0 +Handler_commit 10564 +Handler_delete 895 +Handler_discover 0 +Handler_external_lock 99407 +Handler_mrr_init 0 +Handler_prepare 1270 +Handler_read_first 6717 +Handler_read_key 52435 +Handler_read_last 0 +Handler_read_next 109022 +Handler_read_prev 0 +Handler_read_rnd 15224 +Handler_read_rnd_next 1200810 +Handler_rollback 366 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 2203 +Handler_write 330235 +Innodb_background_log_sync 0 +Innodb_buffer_pool_dump_status Dumping of buffer pool not started +Innodb_buffer_pool_load_status Buffer pool(s) load completed at 230712 17:25:59 +Innodb_buffer_pool_resize_status +Innodb_buffer_pool_resize_status_code 0 +Innodb_buffer_pool_resize_status_progress 0 +Innodb_buffer_pool_pages_data 359 +Innodb_buffer_pool_bytes_data 5881856 +Innodb_buffer_pool_pages_dirty 110 +Innodb_buffer_pool_bytes_dirty 1802240 +Innodb_buffer_pool_pages_flushed 20192 +Innodb_buffer_pool_pages_free 655 +Innodb_buffer_pool_pages_LRU_flushed 0 +Innodb_buffer_pool_pages_made_not_young 16590 +Innodb_buffer_pool_pages_made_young 384 +Innodb_buffer_pool_pages_misc 10 +Innodb_buffer_pool_pages_old 0 +Innodb_buffer_pool_pages_total 1024 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead 12 +Innodb_buffer_pool_read_ahead_evicted 0 +Innodb_buffer_pool_read_requests 1009628 +Innodb_buffer_pool_reads 14281 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 292834 +Innodb_checkpoint_age 70611 +Innodb_checkpoint_max_age 7945216 +Innodb_data_fsyncs 8765 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 234245120 +Innodb_data_reads 14318 +Innodb_data_writes 15819 +Innodb_data_written 128580096 +Innodb_dblwr_pages_written 6353 +Innodb_dblwr_writes 1672 +Innodb_ibuf_free_list 0 +Innodb_ibuf_segment_size 2 +Innodb_redo_log_read_only OFF +Innodb_redo_log_uuid 1075899837 +Innodb_redo_log_checkpoint_lsn 32298273 +Innodb_redo_log_current_lsn 32368884 +Innodb_redo_log_flushed_to_disk_lsn 32368884 +Innodb_redo_log_logical_size 71168 +Innodb_redo_log_physical_size 1310720 +Innodb_redo_log_capacity_resized 10485760 +Innodb_redo_log_resize_status OK +Innodb_log_waits 0 +Innodb_log_write_requests 262213 +Innodb_log_writes 6387 +Innodb_lsn_current 32368884 +Innodb_lsn_flushed 32368884 +Innodb_lsn_last_checkpoint 32298273 +Innodb_master_thread_active_loops 170 +Innodb_master_thread_idle_loops 41116 +Innodb_max_trx_id 3392 +Innodb_oldest_view_low_limit_trx_id 0 +Innodb_os_log_fsyncs 3505 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 15046144 +Innodb_page_size 16384 +Innodb_pages_created 1925 +Innodb_pages_read 14292 +Innodb_pages0_read 8 +Innodb_pages_written 6724 +Innodb_purge_trx_id 3392 +Innodb_purge_undo_no 0 +Innodb_redo_log_enabled ON +Innodb_row_lock_current_waits 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 58104 +Innodb_rows_read 428752 +Innodb_rows_updated 16 +Innodb_system_rows_deleted 917 +Innodb_system_rows_inserted 2034 +Innodb_system_rows_read 193929 +Innodb_system_rows_updated 2199 +Innodb_sampled_pages_read 0 +Innodb_sampled_pages_skipped 0 +Innodb_num_open_files 34 +Innodb_truncated_status_writes 0 +Innodb_undo_tablespaces_total 2 +Innodb_undo_tablespaces_implicit 2 +Innodb_undo_tablespaces_explicit 0 +Innodb_undo_tablespaces_active 2 +Innodb_secondary_index_triggered_cluster_reads 103303 +Innodb_secondary_index_triggered_cluster_reads_avoided 0 +Innodb_buffered_aio_submitted 12 +Innodb_scan_pages_contiguous 0 +Innodb_scan_pages_disjointed 0 +Innodb_scan_pages_total_seek_distance 0 +Innodb_scan_data_size 0 +Innodb_scan_deleted_recs_size 0 +Innodb_encryption_n_merge_blocks_encrypted 0 +Innodb_encryption_n_merge_blocks_decrypted 0 +Innodb_encryption_n_rowlog_blocks_encrypted 0 +Innodb_encryption_n_rowlog_blocks_decrypted 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 4143 +Key_blocks_used 9 +Key_read_requests 1871 +Key_reads 0 +Key_write_requests 1014 +Key_writes 9 +Locked_connects 0 +Max_execution_time_exceeded 0 +Max_execution_time_set 0 +Max_execution_time_set_failed 0 +Max_used_connections 6 +Max_used_connections_time 2023-07-12 17:26:20 +Mysqlx_aborted_clients 0 +Mysqlx_address :: +Mysqlx_bytes_received 0 +Mysqlx_bytes_received_compressed_payload 0 +Mysqlx_bytes_received_uncompressed_frame 0 +Mysqlx_bytes_sent 0 +Mysqlx_bytes_sent_compressed_payload 0 +Mysqlx_bytes_sent_uncompressed_frame 0 +Mysqlx_compression_algorithm +Mysqlx_compression_level +Mysqlx_connection_accept_errors 0 +Mysqlx_connection_errors 0 +Mysqlx_connections_accepted 0 +Mysqlx_connections_closed 0 +Mysqlx_connections_rejected 0 +Mysqlx_crud_create_view 0 +Mysqlx_crud_delete 0 +Mysqlx_crud_drop_view 0 +Mysqlx_crud_find 0 +Mysqlx_crud_insert 0 +Mysqlx_crud_modify_view 0 +Mysqlx_crud_update 0 +Mysqlx_cursor_close 0 +Mysqlx_cursor_fetch 0 +Mysqlx_cursor_open 0 +Mysqlx_errors_sent 0 +Mysqlx_errors_unknown_message_type 0 +Mysqlx_expect_close 0 +Mysqlx_expect_open 0 +Mysqlx_init_error 0 +Mysqlx_messages_sent 0 +Mysqlx_notice_global_sent 0 +Mysqlx_notice_other_sent 0 +Mysqlx_notice_warning_sent 0 +Mysqlx_notified_by_group_replication 0 +Mysqlx_port 33060 +Mysqlx_prep_deallocate 0 +Mysqlx_prep_execute 0 +Mysqlx_prep_prepare 0 +Mysqlx_rows_sent 0 +Mysqlx_sessions 0 +Mysqlx_sessions_accepted 0 +Mysqlx_sessions_closed 0 +Mysqlx_sessions_fatal_error 0 +Mysqlx_sessions_killed 0 +Mysqlx_sessions_rejected 0 +Mysqlx_socket /tmp/mysqlx.sock +Mysqlx_ssl_accepts 0 +Mysqlx_ssl_active +Mysqlx_ssl_cipher +Mysqlx_ssl_cipher_list +Mysqlx_ssl_ctx_verify_depth 18446744073709551615 +Mysqlx_ssl_ctx_verify_mode 5 +Mysqlx_ssl_finished_accepts 0 +Mysqlx_ssl_server_not_after Jul 9 14:25:56 2033 GMT +Mysqlx_ssl_server_not_before Jul 12 14:25:56 2023 GMT +Mysqlx_ssl_verify_depth +Mysqlx_ssl_verify_mode +Mysqlx_ssl_version +Mysqlx_stmt_create_collection 0 +Mysqlx_stmt_create_collection_index 0 +Mysqlx_stmt_disable_notices 0 +Mysqlx_stmt_drop_collection 0 +Mysqlx_stmt_drop_collection_index 0 +Mysqlx_stmt_enable_notices 0 +Mysqlx_stmt_ensure_collection 0 +Mysqlx_stmt_execute_mysqlx 0 +Mysqlx_stmt_execute_sql 0 +Mysqlx_stmt_execute_xplugin 0 +Mysqlx_stmt_get_collection_options 0 +Mysqlx_stmt_kill_client 0 +Mysqlx_stmt_list_clients 0 +Mysqlx_stmt_list_notices 0 +Mysqlx_stmt_list_objects 0 +Mysqlx_stmt_modify_collection_options 0 +Mysqlx_stmt_ping 0 +Mysqlx_worker_threads 2 +Mysqlx_worker_threads_active 0 +Net_buffer_length 65536 +Not_flushed_delayed_rows 0 +Ongoing_anonymous_transaction_count 0 +Open_files 31 +Open_streams 0 +Open_table_definitions 112 +Open_tables 1190 +Opened_files 31 +Opened_table_definitions 381 +Opened_tables 1459 +Performance_schema_accounts_lost 0 +Performance_schema_cond_classes_lost 0 +Performance_schema_cond_instances_lost 0 +Performance_schema_digest_lost 0 +Performance_schema_file_classes_lost 0 +Performance_schema_file_handles_lost 0 +Performance_schema_file_instances_lost 0 +Performance_schema_hosts_lost 0 +Performance_schema_index_stat_lost 0 +Performance_schema_locker_lost 0 +Performance_schema_memory_classes_lost 0 +Performance_schema_metadata_lock_lost 0 +Performance_schema_mutex_classes_lost 0 +Performance_schema_mutex_instances_lost 0 +Performance_schema_nested_statement_lost 0 +Performance_schema_prepared_statements_lost 0 +Performance_schema_program_lost 0 +Performance_schema_rwlock_classes_lost 0 +Performance_schema_rwlock_instances_lost 0 +Performance_schema_session_connect_attrs_longest_seen 175 +Performance_schema_session_connect_attrs_lost 0 +Performance_schema_socket_classes_lost 0 +Performance_schema_socket_instances_lost 0 +Performance_schema_stage_classes_lost 0 +Performance_schema_statement_classes_lost 0 +Performance_schema_table_handles_lost 0 +Performance_schema_table_instances_lost 0 +Performance_schema_table_lock_stat_lost 0 +Performance_schema_thread_classes_lost 0 +Performance_schema_thread_instances_lost 0 +Performance_schema_users_lost 0 +Prepared_stmt_count 0 +Queries 24832 +Questions 24822 +Replica_open_temp_tables 0 +Resource_group_supported ON +Rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Secondary_engine_execution_count 0 +Select_full_join 543 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 7569 +Slave_open_temp_tables 0 +Slow_launch_threads 0 +Slow_queries 24820 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 21599 +Sort_scan 4082 +Ssl_accept_renegotiates 0 +Ssl_accepts 4 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 18446744073709551615 +Ssl_ctx_verify_mode 5 +Ssl_default_timeout 0 +Ssl_finished_accepts 4 +Ssl_finished_connects 0 +Ssl_server_not_after Jul 9 14:25:56 2033 GMT +Ssl_server_not_before Jul 12 14:25:56 2023 GMT +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode SERVER +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 128 +Ssl_session_cache_timeout 300 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 840 +Table_locks_waited 0 +Table_open_cache_hits 49357 +Table_open_cache_misses 1477 +Table_open_cache_overflows 0 +Table_open_cache_triggers_hits 0 +Table_open_cache_triggers_misses 0 +Table_open_cache_triggers_overflows 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threadpool_idle_threads 0 +Threadpool_threads 0 +Threads_cached 2 +Threads_connected 4 +Threads_created 6 +Threads_running 3 +Tls_library_version OpenSSL 3.0.2 15 Mar 2022 +Uptime 108232 +Uptime_since_flush_status 108232 diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc008/mysql-status-defer new file mode 100644 index 000000000..28771a05b --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-status-defer @@ -0,0 +1,539 @@ +Aborted_clients 50 50 +Aborted_connects 0 0 +Acl_cache_items_count 0 0 +Binlog_snapshot_file mysql-bin.000002 mysql-bin.000002 +Binlog_snapshot_position 3445236 3445236 +Binlog_cache_disk_use 10 10 +Binlog_cache_use 324 324 +Binlog_snapshot_gtid_executed not-in-consistent-snapshot not-in-consistent-snapshot +Binlog_stmt_cache_disk_use 1 1 +Binlog_stmt_cache_use 31 31 +Bytes_received 5253784 5260446 +Bytes_sent 19111484 19146726 +Caching_sha2_password_rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Com_admin_commands 2 2 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_instance 0 0 +Com_alter_procedure 0 0 +Com_alter_resource_group 0 0 +Com_alter_server 0 0 +Com_alter_table 55 55 +Com_alter_tablespace 47 47 +Com_alter_user 3 3 +Com_alter_user_default_role 0 0 +Com_analyze 1 1 +Com_begin 0 0 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 957 957 +Com_change_master 0 0 +Com_change_repl_filter 0 0 +Com_change_replication_source 0 0 +Com_check 0 0 +Com_checksum 9 9 +Com_clone 0 0 +Com_commit 2 2 +Com_create_compression_dictionary 0 0 +Com_create_db 35 35 +Com_create_event 0 0 +Com_create_function 0 0 +Com_create_index 0 0 +Com_create_procedure 0 0 +Com_create_role 0 0 +Com_create_server 0 0 +Com_create_table 102 102 +Com_create_resource_group 0 0 +Com_create_trigger 3 3 +Com_create_udf 0 0 +Com_create_user 3 3 +Com_create_view 7 7 +Com_create_spatial_reference_system 0 0 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_compression_dictionary 0 0 +Com_drop_db 52 52 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_resource_group 0 0 +Com_drop_role 0 0 +Com_drop_server 0 0 +Com_drop_spatial_reference_system 0 0 +Com_drop_table 41 41 +Com_drop_trigger 0 0 +Com_drop_user 2 2 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_explain_other 0 0 +Com_flush 3 3 +Com_get_diagnostics 0 0 +Com_grant 3 3 +Com_grant_roles 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_import 0 0 +Com_insert 48 48 +Com_insert_select 0 0 +Com_install_component 0 0 +Com_install_plugin 0 0 +Com_kill 0 0 +Com_load 1 1 +Com_lock_instance 0 0 +Com_lock_tables 16 16 +Com_lock_tables_for_backup 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 1 1 +Com_replace_select 0 0 +Com_reset 0 0 +Com_resignal 0 0 +Com_restart 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_revoke_roles 0 0 +Com_rollback 1 1 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 6584 6615 +Com_set_option 6756 6756 +Com_set_password 0 0 +Com_set_resource_group 0 0 +Com_set_role 0 0 +Com_signal 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 104 105 +Com_show_charsets 0 0 +Com_show_client_statistics 0 0 +Com_show_collations 0 0 +Com_show_create_db 29 29 +Com_show_create_event 0 0 +Com_show_create_func 0 0 +Com_show_create_proc 0 0 +Com_show_create_table 900 900 +Com_show_create_trigger 0 0 +Com_show_databases 124 125 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 8 8 +Com_show_engine_status 113 114 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 1900 1900 +Com_show_function_code 0 0 +Com_show_function_status 25 25 +Com_show_grants 0 0 +Com_show_index_statistics 0 0 +Com_show_keys 0 0 +Com_show_master_status 104 105 +Com_show_open_tables 8 8 +Com_show_plugins 131 132 +Com_show_privileges 0 0 +Com_show_procedure_code 0 0 +Com_show_procedure_status 25 25 +Com_show_processlist 118 119 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_relaylog_events 0 0 +Com_show_replicas 104 105 +Com_show_slave_hosts 104 105 +Com_show_replica_status 110 111 +Com_show_slave_status 110 111 +Com_show_status 350 351 +Com_show_storage_engines 295 295 +Com_show_table_statistics 0 0 +Com_show_table_status 950 950 +Com_show_tables 62 62 +Com_show_thread_statistics 0 0 +Com_show_triggers 900 900 +Com_show_user_statistics 0 0 +Com_show_variables 316 316 +Com_show_warnings 0 0 +Com_show_create_user 0 0 +Com_shutdown 0 0 +Com_replica_start 0 0 +Com_slave_start 0 0 +Com_replica_stop 0 0 +Com_slave_stop 0 0 +Com_group_replication_start 0 0 +Com_group_replication_stop 0 0 +Com_stmt_execute 0 0 +Com_stmt_close 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_component 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_instance 0 0 +Com_unlock_tables 43 43 +Com_update 17 17 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Com_stmt_reprepare 0 0 +Connection_errors_accept 0 0 +Connection_errors_internal 0 0 +Connection_errors_max_connections 0 0 +Connection_errors_peer_address 0 0 +Connection_errors_select 0 0 +Connection_errors_tcpwrap 0 0 +Connections 3253 3274 +Created_tmp_disk_tables 264 266 +Created_tmp_files 7 7 +Created_tmp_tables 4299 4304 +Current_tls_ca ca.pem ca.pem +Current_tls_capath +Current_tls_cert server-cert.pem server-cert.pem +Current_tls_cipher +Current_tls_ciphersuites +Current_tls_crl +Current_tls_crlpath +Current_tls_key server-key.pem server-key.pem +Current_tls_version TLSv1.2,TLSv1.3 TLSv1.2,TLSv1.3 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Error_log_buffered_bytes 3952 3952 +Error_log_buffered_events 22 22 +Error_log_expired_events 0 0 +Error_log_latest_write 1689171959141812 1689171959141812 +Flush_commands 4 4 +Global_connection_memory 0 0 +Handler_commit 10564 10569 +Handler_delete 895 895 +Handler_discover 0 0 +Handler_external_lock 99407 99451 +Handler_mrr_init 0 0 +Handler_prepare 1270 1270 +Handler_read_first 6717 6728 +Handler_read_key 52435 52497 +Handler_read_last 0 0 +Handler_read_next 109022 109025 +Handler_read_prev 0 0 +Handler_read_rnd 15224 15224 +Handler_read_rnd_next 1200810 1202448 +Handler_rollback 366 366 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 2203 2203 +Handler_write 330235 330898 +Innodb_background_log_sync 0 0 +Innodb_buffer_pool_dump_status Dumping of buffer pool not started Dumping of buffer pool not started +Innodb_buffer_pool_load_status Buffer pool(s) load completed at 230712 17:25:59 Buffer pool(s) load completed at 230712 17:25:59 +Innodb_buffer_pool_resize_status +Innodb_buffer_pool_resize_status_code 0 0 +Innodb_buffer_pool_resize_status_progress 0 0 +Innodb_buffer_pool_pages_data 359 256 +Innodb_buffer_pool_bytes_data 5881856 4194304 +Innodb_buffer_pool_pages_dirty 110 0 +Innodb_buffer_pool_bytes_dirty 1802240 0 +Innodb_buffer_pool_pages_flushed 20192 20429 +Innodb_buffer_pool_pages_free 655 758 +Innodb_buffer_pool_pages_LRU_flushed 0 0 +Innodb_buffer_pool_pages_made_not_young 16590 16590 +Innodb_buffer_pool_pages_made_young 384 384 +Innodb_buffer_pool_pages_misc 10 10 +Innodb_buffer_pool_pages_old 0 0 +Innodb_buffer_pool_pages_total 1024 1024 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead 12 12 +Innodb_buffer_pool_read_ahead_evicted 0 0 +Innodb_buffer_pool_read_requests 1009628 1010339 +Innodb_buffer_pool_reads 14281 14313 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 292834 292932 +Innodb_checkpoint_age 70611 0 +Innodb_checkpoint_max_age 7945216 7971328 +Innodb_data_fsyncs 8765 8851 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 234245120 234769408 +Innodb_data_reads 14318 14350 +Innodb_data_writes 15819 15960 +Innodb_data_written 128580096 130335232 +Innodb_dblwr_pages_written 6353 6459 +Innodb_dblwr_writes 1672 1700 +Innodb_ibuf_free_list 0 0 +Innodb_ibuf_segment_size 2 2 +Innodb_redo_log_read_only OFF OFF +Innodb_redo_log_uuid 1075899837 1075899837 +Innodb_redo_log_checkpoint_lsn 32298273 32369216 +Innodb_redo_log_current_lsn 32368884 32369216 +Innodb_redo_log_flushed_to_disk_lsn 32368884 32369216 +Innodb_redo_log_logical_size 71168 512 +Innodb_redo_log_physical_size 1310720 1310720 +Innodb_redo_log_capacity_resized 10485760 10485760 +Innodb_redo_log_resize_status OK OK +Innodb_log_waits 0 0 +Innodb_log_write_requests 262213 262219 +Innodb_log_writes 6387 6389 +Innodb_lsn_current 32368884 32369216 +Innodb_lsn_flushed 32368884 32369216 +Innodb_lsn_last_checkpoint 32298273 32369216 +Innodb_master_thread_active_loops 170 171 +Innodb_master_thread_idle_loops 41116 41126 +Innodb_max_trx_id 3392 3392 +Innodb_oldest_view_low_limit_trx_id 0 0 +Innodb_os_log_fsyncs 3505 3510 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 15046144 15047168 +Innodb_page_size 16384 16384 +Innodb_pages_created 1925 1931 +Innodb_pages_read 14292 14324 +Innodb_pages0_read 8 8 +Innodb_pages_written 6724 6831 +Innodb_purge_trx_id 3392 3392 +Innodb_purge_undo_no 0 0 +Innodb_redo_log_enabled ON ON +Innodb_row_lock_current_waits 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 58104 58202 +Innodb_rows_read 428752 428850 +Innodb_rows_updated 16 16 +Innodb_system_rows_deleted 917 917 +Innodb_system_rows_inserted 2034 2034 +Innodb_system_rows_read 193929 194406 +Innodb_system_rows_updated 2199 2199 +Innodb_sampled_pages_read 0 0 +Innodb_sampled_pages_skipped 0 0 +Innodb_num_open_files 34 36 +Innodb_truncated_status_writes 0 0 +Innodb_undo_tablespaces_total 2 2 +Innodb_undo_tablespaces_implicit 2 2 +Innodb_undo_tablespaces_explicit 0 0 +Innodb_undo_tablespaces_active 2 2 +Innodb_secondary_index_triggered_cluster_reads 103303 103303 +Innodb_secondary_index_triggered_cluster_reads_avoided 0 0 +Innodb_buffered_aio_submitted 12 12 +Innodb_scan_pages_contiguous 0 0 +Innodb_scan_pages_disjointed 0 0 +Innodb_scan_pages_total_seek_distance 0 0 +Innodb_scan_data_size 0 0 +Innodb_scan_deleted_recs_size 0 0 +Innodb_encryption_n_merge_blocks_encrypted 0 0 +Innodb_encryption_n_merge_blocks_decrypted 0 0 +Innodb_encryption_n_rowlog_blocks_encrypted 0 0 +Innodb_encryption_n_rowlog_blocks_decrypted 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 4143 4143 +Key_blocks_used 9 9 +Key_read_requests 1871 1871 +Key_reads 0 0 +Key_write_requests 1014 1014 +Key_writes 9 9 +Locked_connects 0 0 +Max_execution_time_exceeded 0 0 +Max_execution_time_set 0 0 +Max_execution_time_set_failed 0 0 +Max_used_connections 6 6 +Max_used_connections_time 2023-07-12 17:26:20 2023-07-12 17:26:20 +Mysqlx_aborted_clients 0 0 +Mysqlx_address :: :: +Mysqlx_bytes_received 0 0 +Mysqlx_bytes_received_compressed_payload 0 0 +Mysqlx_bytes_received_uncompressed_frame 0 0 +Mysqlx_bytes_sent 0 0 +Mysqlx_bytes_sent_compressed_payload 0 0 +Mysqlx_bytes_sent_uncompressed_frame 0 0 +Mysqlx_compression_algorithm +Mysqlx_compression_level +Mysqlx_connection_accept_errors 0 0 +Mysqlx_connection_errors 0 0 +Mysqlx_connections_accepted 0 0 +Mysqlx_connections_closed 0 0 +Mysqlx_connections_rejected 0 0 +Mysqlx_crud_create_view 0 0 +Mysqlx_crud_delete 0 0 +Mysqlx_crud_drop_view 0 0 +Mysqlx_crud_find 0 0 +Mysqlx_crud_insert 0 0 +Mysqlx_crud_modify_view 0 0 +Mysqlx_crud_update 0 0 +Mysqlx_cursor_close 0 0 +Mysqlx_cursor_fetch 0 0 +Mysqlx_cursor_open 0 0 +Mysqlx_errors_sent 0 0 +Mysqlx_errors_unknown_message_type 0 0 +Mysqlx_expect_close 0 0 +Mysqlx_expect_open 0 0 +Mysqlx_init_error 0 0 +Mysqlx_messages_sent 0 0 +Mysqlx_notice_global_sent 0 0 +Mysqlx_notice_other_sent 0 0 +Mysqlx_notice_warning_sent 0 0 +Mysqlx_notified_by_group_replication 0 0 +Mysqlx_port 33060 33060 +Mysqlx_prep_deallocate 0 0 +Mysqlx_prep_execute 0 0 +Mysqlx_prep_prepare 0 0 +Mysqlx_rows_sent 0 0 +Mysqlx_sessions 0 0 +Mysqlx_sessions_accepted 0 0 +Mysqlx_sessions_closed 0 0 +Mysqlx_sessions_fatal_error 0 0 +Mysqlx_sessions_killed 0 0 +Mysqlx_sessions_rejected 0 0 +Mysqlx_socket /tmp/mysqlx.sock /tmp/mysqlx.sock +Mysqlx_ssl_accepts 0 0 +Mysqlx_ssl_active +Mysqlx_ssl_cipher +Mysqlx_ssl_cipher_list +Mysqlx_ssl_ctx_verify_depth 18446744073709551615 18446744073709551615 +Mysqlx_ssl_ctx_verify_mode 5 5 +Mysqlx_ssl_finished_accepts 0 0 +Mysqlx_ssl_server_not_after Jul 9 14:25:56 2033 GMT Jul 9 14:25:56 2033 GMT +Mysqlx_ssl_server_not_before Jul 12 14:25:56 2023 GMT Jul 12 14:25:56 2023 GMT +Mysqlx_ssl_verify_depth +Mysqlx_ssl_verify_mode +Mysqlx_ssl_version +Mysqlx_stmt_create_collection 0 0 +Mysqlx_stmt_create_collection_index 0 0 +Mysqlx_stmt_disable_notices 0 0 +Mysqlx_stmt_drop_collection 0 0 +Mysqlx_stmt_drop_collection_index 0 0 +Mysqlx_stmt_enable_notices 0 0 +Mysqlx_stmt_ensure_collection 0 0 +Mysqlx_stmt_execute_mysqlx 0 0 +Mysqlx_stmt_execute_sql 0 0 +Mysqlx_stmt_execute_xplugin 0 0 +Mysqlx_stmt_get_collection_options 0 0 +Mysqlx_stmt_kill_client 0 0 +Mysqlx_stmt_list_clients 0 0 +Mysqlx_stmt_list_notices 0 0 +Mysqlx_stmt_list_objects 0 0 +Mysqlx_stmt_modify_collection_options 0 0 +Mysqlx_stmt_ping 0 0 +Mysqlx_worker_threads 2 2 +Mysqlx_worker_threads_active 0 0 +Net_buffer_length 65536 65536 +Not_flushed_delayed_rows 0 0 +Ongoing_anonymous_transaction_count 0 0 +Open_files 31 31 +Open_streams 0 0 +Open_table_definitions 112 112 +Open_tables 1190 1190 +Opened_files 31 31 +Opened_table_definitions 381 381 +Opened_tables 1459 1459 +Performance_schema_accounts_lost 0 0 +Performance_schema_cond_classes_lost 0 0 +Performance_schema_cond_instances_lost 0 0 +Performance_schema_digest_lost 0 0 +Performance_schema_file_classes_lost 0 0 +Performance_schema_file_handles_lost 0 0 +Performance_schema_file_instances_lost 0 0 +Performance_schema_hosts_lost 0 0 +Performance_schema_index_stat_lost 0 0 +Performance_schema_locker_lost 0 0 +Performance_schema_memory_classes_lost 0 0 +Performance_schema_metadata_lock_lost 0 0 +Performance_schema_mutex_classes_lost 0 0 +Performance_schema_mutex_instances_lost 0 0 +Performance_schema_nested_statement_lost 0 0 +Performance_schema_prepared_statements_lost 0 0 +Performance_schema_program_lost 0 0 +Performance_schema_rwlock_classes_lost 0 0 +Performance_schema_rwlock_instances_lost 0 0 +Performance_schema_session_connect_attrs_longest_seen 175 175 +Performance_schema_session_connect_attrs_lost 0 0 +Performance_schema_socket_classes_lost 0 0 +Performance_schema_socket_instances_lost 0 0 +Performance_schema_stage_classes_lost 0 0 +Performance_schema_statement_classes_lost 0 0 +Performance_schema_table_handles_lost 0 0 +Performance_schema_table_instances_lost 0 0 +Performance_schema_table_lock_stat_lost 0 0 +Performance_schema_thread_classes_lost 0 0 +Performance_schema_thread_instances_lost 0 0 +Performance_schema_users_lost 0 0 +Prepared_stmt_count 0 0 +Queries 24832 24895 +Questions 24822 24885 +Replica_open_temp_tables 0 0 +Resource_group_supported ON ON +Rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Secondary_engine_execution_count 0 0 +Select_full_join 543 547 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 7569 7579 +Slave_open_temp_tables 0 0 +Slow_launch_threads 0 0 +Slow_queries 24820 24883 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 21599 21606 +Sort_scan 4082 4083 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 4 4 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 18446744073709551615 18446744073709551615 +Ssl_ctx_verify_mode 5 5 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 4 4 +Ssl_finished_connects 0 0 +Ssl_server_not_after Jul 9 14:25:56 2033 GMT Jul 9 14:25:56 2033 GMT +Ssl_server_not_before Jul 12 14:25:56 2023 GMT Jul 12 14:25:56 2023 GMT +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode SERVER SERVER +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 128 128 +Ssl_session_cache_timeout 300 300 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 840 841 +Table_locks_waited 0 0 +Table_open_cache_hits 49357 49380 +Table_open_cache_misses 1477 1477 +Table_open_cache_overflows 0 0 +Table_open_cache_triggers_hits 0 0 +Table_open_cache_triggers_misses 0 0 +Table_open_cache_triggers_overflows 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threadpool_idle_threads 0 0 +Threadpool_threads 0 0 +Threads_cached 2 2 +Threads_connected 4 4 +Threads_created 6 6 +Threads_running 3 3 +Tls_library_version OpenSSL 3.0.2 15 Mar 2022 OpenSSL 3.0.2 15 Mar 2022 +Uptime 108232 108242 +Uptime_since_flush_status 108232 108242 diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-users b/t/pt-mysql-summary/samples/temp_enc008/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysql-variables b/t/pt-mysql-summary/samples/temp_enc008/mysql-variables new file mode 100644 index 000000000..e22e4d20f --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysql-variables @@ -0,0 +1,708 @@ +activate_all_roles_on_login OFF +admin_address +admin_port 33062 +admin_ssl_ca +admin_ssl_capath +admin_ssl_cert +admin_ssl_cipher +admin_ssl_crl +admin_ssl_crlpath +admin_ssl_key +admin_tls_ciphersuites +admin_tls_version TLSv1.2,TLSv1.3 +authentication_policy *,, +auto_generate_certs ON +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +avoid_temporal_upgrade OFF +back_log 151 +basedir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/ +big_tables OFF +bind_address * +binlog_cache_size 32768 +binlog_checksum CRC32 +binlog_ddl_skip_rewrite OFF +binlog_direct_non_transactional_updates OFF +binlog_encryption OFF +binlog_error_action ABORT_SERVER +binlog_expire_logs_auto_purge ON +binlog_expire_logs_seconds 2592000 +binlog_format STATEMENT +binlog_group_commit_sync_delay 0 +binlog_group_commit_sync_no_delay_count 0 +binlog_gtid_simple_recovery ON +binlog_max_flush_queue_time 0 +binlog_order_commits ON +binlog_rotate_encryption_master_key_at_startup OFF +binlog_row_event_max_size 8192 +binlog_row_image FULL +binlog_row_metadata MINIMAL +binlog_row_value_options +binlog_rows_query_log_events OFF +binlog_skip_flush_commands OFF +binlog_space_limit 0 +binlog_stmt_cache_size 32768 +binlog_transaction_compression OFF +binlog_transaction_compression_level_zstd 3 +binlog_transaction_dependency_history_size 25000 +binlog_transaction_dependency_tracking COMMIT_ORDER +block_encryption_mode aes-128-ecb +buffered_error_log_filename +buffered_error_log_size 0 +build_id 5a1ade9075641041401011f46939928e34d5f311 +bulk_insert_buffer_size 8388608 +caching_sha2_password_auto_generate_rsa_keys ON +caching_sha2_password_digest_rounds 5000 +caching_sha2_password_private_key_path private_key.pem +caching_sha2_password_public_key_path public_key.pem +character_set_client utf8mb4 +character_set_connection utf8mb4 +character_set_database utf8mb4 +character_set_filesystem binary +character_set_results utf8mb4 +character_set_server utf8mb4 +character_set_system utf8mb3 +character_sets_dir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/share/charsets/ +check_proxy_users OFF +collation_connection utf8mb4_0900_ai_ci +collation_database utf8mb4_0900_ai_ci +collation_server utf8mb4_0900_ai_ci +completion_type NO_CHAIN +concurrent_insert AUTO +connect_timeout 10 +connection_memory_chunk_size 8912 +connection_memory_limit 18446744073709551615 +core_file OFF +create_admin_listener_thread OFF +cte_max_recursion_depth 1000 +datadir /tmp/12345/data/ +default_authentication_plugin mysql_native_password +default_collation_for_utf8mb4 utf8mb4_0900_ai_ci +default_password_lifetime 0 +default_storage_engine InnoDB +default_table_encryption OFF +default_tmp_storage_engine InnoDB +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +disabled_storage_engines +disconnect_on_expired_password ON +div_precision_increment 4 +encrypt_tmp_files OFF +end_markers_in_json OFF +enforce_gtid_consistency OFF +enforce_storage_engine +eq_range_index_dive_limit 200 +event_scheduler ON +expand_fast_index_creation OFF +expire_logs_days 0 +explain_format TRADITIONAL +explicit_defaults_for_timestamp ON +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_query_extra_word_chars OFF +ft_stopword_file (built-in) +general_log ON +general_log_file genlog +generated_random_password_length 20 +global_connection_memory_limit 18446744073709551615 +global_connection_memory_tracking OFF +group_concat_max_len 1024 +group_replication_consistency EVENTUAL +gtid_executed +gtid_executed_compression_period 0 +gtid_mode OFF +gtid_owned +gtid_purged +have_backup_locks YES +have_backup_safe_binlog_info YES +have_compress YES +have_dynamic_loading YES +have_geometry YES +have_openssl YES +have_profiling YES +have_query_cache NO +have_rtree_keys YES +have_snapshot_cloning YES +have_ssl YES +have_statement_timeout YES +have_symlink DISABLED +histogram_generation_max_mem_size 20000000 +host_cache_size 279 +hostname s76 +information_schema_stats_expiry 86400 +init_connect +init_file /tmp/12345/mysql-init +init_replica +init_slave +innodb_adaptive_flushing ON +innodb_adaptive_flushing_lwm 10 +innodb_adaptive_hash_index ON +innodb_adaptive_hash_index_parts 8 +innodb_adaptive_max_sleep_delay 150000 +innodb_api_bk_commit_interval 5 +innodb_api_disable_rowlock OFF +innodb_api_enable_binlog OFF +innodb_api_enable_mdl OFF +innodb_api_trx_level 0 +innodb_autoextend_increment 64 +innodb_autoinc_lock_mode 2 +innodb_buffer_pool_chunk_size 16777216 +innodb_buffer_pool_dump_at_shutdown ON +innodb_buffer_pool_dump_now OFF +innodb_buffer_pool_dump_pct 25 +innodb_buffer_pool_filename ib_buffer_pool +innodb_buffer_pool_in_core_file ON +innodb_buffer_pool_instances 1 +innodb_buffer_pool_load_abort OFF +innodb_buffer_pool_load_at_startup ON +innodb_buffer_pool_load_now OFF +innodb_buffer_pool_size 16777216 +innodb_change_buffer_max_size 25 +innodb_change_buffering all +innodb_checksum_algorithm crc32 +innodb_cleaner_lsn_age_factor high_checkpoint +innodb_cmp_per_index_enabled OFF +innodb_commit_concurrency 0 +innodb_compressed_columns_threshold 96 +innodb_compressed_columns_zip_level 6 +innodb_compression_failure_threshold_pct 5 +innodb_compression_level 6 +innodb_compression_pad_pct_max 50 +innodb_concurrency_tickets 5000 +innodb_corrupt_table_action assert +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_ddl_buffer_size 1048576 +innodb_ddl_threads 4 +innodb_deadlock_detect ON +innodb_dedicated_server OFF +innodb_default_row_format dynamic +innodb_directories +innodb_disable_sort_file_cache OFF +innodb_doublewrite ON +innodb_doublewrite_batch_size 0 +innodb_doublewrite_dir +innodb_doublewrite_files 2 +innodb_doublewrite_pages 4 +innodb_empty_free_list_algorithm legacy +innodb_encrypt_online_alter_logs OFF +innodb_extend_and_initialize ON +innodb_fast_shutdown 1 +innodb_file_per_table ON +innodb_fill_factor 100 +innodb_flush_log_at_timeout 1 +innodb_flush_log_at_trx_commit 1 +innodb_flush_method fsync +innodb_flush_neighbors 0 +innodb_flush_sync ON +innodb_flushing_avg_loops 30 +innodb_force_index_records_in_range 0 +innodb_force_load_corrupted OFF +innodb_force_recovery 0 +innodb_fsync_threshold 0 +innodb_ft_aux_table +innodb_ft_cache_size 8000000 +innodb_ft_enable_diag_print OFF +innodb_ft_enable_stopword ON +innodb_ft_ignore_stopwords OFF +innodb_ft_max_token_size 84 +innodb_ft_min_token_size 3 +innodb_ft_num_word_optimize 2000 +innodb_ft_result_cache_limit 2000000000 +innodb_ft_server_stopword_table +innodb_ft_sort_pll_degree 2 +innodb_ft_total_cache_size 640000000 +innodb_ft_user_stopword_table +innodb_idle_flush_pct 100 +innodb_io_capacity 200 +innodb_io_capacity_max 2000 +innodb_lock_wait_timeout 3 +innodb_log_buffer_size 16777216 +innodb_log_checksums ON +innodb_log_compressed_pages ON +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_log_spin_cpu_abs_lwm 80 +innodb_log_spin_cpu_pct_hwm 50 +innodb_log_wait_for_flush_spin_hwm 400 +innodb_log_write_ahead_size 8192 +innodb_log_writer_threads ON +innodb_lru_scan_depth 1024 +innodb_max_dirty_pages_pct 90.000000 +innodb_max_dirty_pages_pct_lwm 10.000000 +innodb_max_purge_lag 0 +innodb_max_purge_lag_delay 0 +innodb_max_undo_log_size 1073741824 +innodb_monitor_disable +innodb_monitor_enable +innodb_monitor_reset +innodb_monitor_reset_all +innodb_numa_interleave OFF +innodb_old_blocks_pct 37 +innodb_old_blocks_time 1000 +innodb_online_alter_log_max_size 134217728 +innodb_open_files 4000 +innodb_optimize_fulltext_only OFF +innodb_page_cleaners 1 +innodb_page_size 16384 +innodb_parallel_dblwr_encrypt OFF +innodb_parallel_doublewrite_path xb_doublewrite +innodb_parallel_read_threads 4 +innodb_print_all_deadlocks OFF +innodb_print_ddl_logs OFF +innodb_print_lock_wait_timeout_info OFF +innodb_purge_batch_size 300 +innodb_purge_rseg_truncate_frequency 128 +innodb_purge_threads 4 +innodb_random_read_ahead OFF +innodb_read_ahead_threshold 56 +innodb_read_io_threads 4 +innodb_read_only OFF +innodb_records_in_range 0 +innodb_redo_log_archive_dirs +innodb_redo_log_capacity 104857600 +innodb_redo_log_encrypt OFF +innodb_replication_delay 0 +innodb_rollback_on_timeout OFF +innodb_rollback_segments 128 +innodb_segment_reserve_factor 12.500000 +innodb_show_locks_held 10 +innodb_sort_buffer_size 1048576 +innodb_spin_wait_delay 6 +innodb_spin_wait_pause_multiplier 50 +innodb_stats_auto_recalc ON +innodb_stats_include_delete_marked OFF +innodb_stats_method nulls_equal +innodb_stats_on_metadata OFF +innodb_stats_persistent ON +innodb_stats_persistent_sample_pages 20 +innodb_stats_transient_sample_pages 8 +innodb_status_output OFF +innodb_status_output_locks OFF +innodb_strict_mode ON +innodb_sync_array_size 1 +innodb_sync_spin_loops 30 +innodb_sys_tablespace_encrypt OFF +innodb_table_locks ON +innodb_temp_data_file_path ibtmp1:12M:autoextend +innodb_temp_tablespace_encrypt OFF +innodb_temp_tablespaces_dir ./#innodb_temp/ +innodb_thread_concurrency 0 +innodb_thread_sleep_delay 10000 +innodb_tmpdir +innodb_undo_directory ./ +innodb_undo_log_encrypt OFF +innodb_undo_log_truncate ON +innodb_undo_tablespaces 2 +innodb_use_fdatasync OFF +innodb_use_native_aio ON +innodb_validate_tablespace_paths ON +innodb_version 8.0.32-24 +innodb_write_io_threads 4 +interactive_timeout 28800 +internal_tmp_mem_storage_engine TempTable +jemalloc_detected OFF +jemalloc_profiling OFF +join_buffer_size 262144 +keep_files_on_create OFF +key_buffer_size 5242880 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +keyring_file_data /tmp/12345/data/keyring +keyring_operations ON +kill_idle_transaction 0 +large_files_support ON +large_page_size 0 +large_pages OFF +lc_messages en_US +lc_messages_dir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/share/ +lc_time_names en_US +license GPL +local_infile ON +lock_wait_timeout 31536000 +locked_in_memory OFF +log_bin ON +log_bin_basename /tmp/12345/data/mysql-bin +log_bin_index /tmp/12345/data/mysql-bin.index +log_bin_trust_function_creators OFF +log_bin_use_v1_row_events OFF +log_error /tmp/12345/data/mysqld.log +log_error_services log_filter_internal; log_sink_internal +log_error_suppression_list +log_error_verbosity 2 +log_output FILE +log_queries_not_using_indexes OFF +log_query_errors +log_raw OFF +log_replica_updates ON +log_slave_updates ON +log_slow_admin_statements ON +log_slow_extra OFF +log_slow_filter +log_slow_rate_limit 1 +log_slow_rate_type session +log_slow_replica_statements OFF +log_slow_slave_statements OFF +log_slow_sp_statements ON +log_slow_verbosity +log_statements_unsafe_for_binlog ON +log_throttle_queries_not_using_indexes 0 +log_timestamps UTC +long_query_time 0.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +mandatory_roles +master_info_repository TABLE +master_verify_checksum OFF +max_allowed_packet 67108864 +max_binlog_cache_size 18446744073709547520 +max_binlog_size 1073741824 +max_binlog_stmt_cache_size 18446744073709547520 +max_connect_errors 100 +max_connections 151 +max_delayed_threads 20 +max_digest_length 1024 +max_error_count 1024 +max_execution_time 0 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 4096 +max_points_in_geometry 65536 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 18446744073709551615 +max_slowlog_files 0 +max_slowlog_size 0 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_user_connections 0 +max_write_lock_count 18446744073709551615 +min_examined_row_limit 0 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 9223372036853727232 +myisam_mmap_size 18446744073709551615 +myisam_recover_options OFF +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +mysql_native_password_proxy_users OFF +mysqlx_bind_address * +mysqlx_compression_algorithms DEFLATE_STREAM,LZ4_MESSAGE,ZSTD_STREAM +mysqlx_connect_timeout 30 +mysqlx_deflate_default_compression_level 3 +mysqlx_deflate_max_client_compression_level 5 +mysqlx_document_id_unique_prefix 0 +mysqlx_enable_hello_notice ON +mysqlx_idle_worker_thread_timeout 60 +mysqlx_interactive_timeout 28800 +mysqlx_lz4_default_compression_level 2 +mysqlx_lz4_max_client_compression_level 8 +mysqlx_max_allowed_packet 67108864 +mysqlx_max_connections 100 +mysqlx_min_worker_threads 2 +mysqlx_port 33060 +mysqlx_port_open_timeout 0 +mysqlx_read_timeout 30 +mysqlx_socket /tmp/mysqlx.sock +mysqlx_ssl_ca +mysqlx_ssl_capath +mysqlx_ssl_cert +mysqlx_ssl_cipher +mysqlx_ssl_crl +mysqlx_ssl_crlpath +mysqlx_ssl_key +mysqlx_wait_timeout 28800 +mysqlx_write_timeout 60 +mysqlx_zstd_default_compression_level 3 +mysqlx_zstd_max_client_compression_level 11 +net_buffer_length 16384 +net_buffer_shrink_interval 0 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +ngram_token_size 2 +offline_mode OFF +old OFF +old_alter_table OFF +open_files_limit 8161 +optimizer_max_subgraph_pairs 100000 +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,use_invisible_indexes=off,skip_scan=on,hash_join=on,subquery_to_derived=off,prefer_ordering_index=on,hypergraph_optimizer=off,derived_condition_pushdown=on,favor_range_scan=off +optimizer_trace enabled=off,one_line=off +optimizer_trace_features greedy_search=on,range_optimizer=on,dynamic_range=on,repeated_subselect=on +optimizer_trace_limit 1 +optimizer_trace_max_mem_size 1048576 +optimizer_trace_offset -1 +parser_max_mem_size 18446744073709551615 +partial_revokes OFF +password_history 0 +password_require_current OFF +password_reuse_interval 0 +performance_schema ON +performance_schema_accounts_size -1 +performance_schema_digests_size 10000 +performance_schema_error_size 5335 +performance_schema_events_stages_history_long_size 10000 +performance_schema_events_stages_history_size 10 +performance_schema_events_statements_history_long_size 10000 +performance_schema_events_statements_history_size 10 +performance_schema_events_transactions_history_long_size 10000 +performance_schema_events_transactions_history_size 10 +performance_schema_events_waits_history_long_size 10000 +performance_schema_events_waits_history_size 10 +performance_schema_hosts_size -1 +performance_schema_max_cond_classes 150 +performance_schema_max_cond_instances -1 +performance_schema_max_digest_length 1024 +performance_schema_max_digest_sample_age 60 +performance_schema_max_file_classes 80 +performance_schema_max_file_handles 32768 +performance_schema_max_file_instances -1 +performance_schema_max_index_stat -1 +performance_schema_max_memory_classes 530 +performance_schema_max_metadata_locks -1 +performance_schema_max_mutex_classes 350 +performance_schema_max_mutex_instances -1 +performance_schema_max_prepared_statements_instances -1 +performance_schema_max_program_instances -1 +performance_schema_max_rwlock_classes 70 +performance_schema_max_rwlock_instances -1 +performance_schema_max_socket_classes 10 +performance_schema_max_socket_instances -1 +performance_schema_max_sql_text_length 1024 +performance_schema_max_stage_classes 175 +performance_schema_max_statement_classes 227 +performance_schema_max_statement_stack 10 +performance_schema_max_table_handles -1 +performance_schema_max_table_instances -1 +performance_schema_max_table_lock_stat -1 +performance_schema_max_thread_classes 100 +performance_schema_max_thread_instances -1 +performance_schema_session_connect_attrs_size 512 +performance_schema_setup_actors_size -1 +performance_schema_setup_objects_size -1 +performance_schema_show_processlist OFF +performance_schema_users_size -1 +persist_only_admin_x509_subject +persist_sensitive_variables_in_plaintext ON +persisted_globals_load ON +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ +port 12345 +preload_buffer_size 32768 +print_identified_with_as_hex OFF +profiling OFF +profiling_history_size 15 +protocol_compression_algorithms zlib,zstd,uncompressed +protocol_version 10 +proxy_protocol_networks +query_alloc_block_size 8192 +query_prealloc_size 8192 +range_alloc_block_size 4096 +range_optimizer_max_mem_size 8388608 +rbr_exec_mode STRICT +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +regexp_stack_limit 8000000 +regexp_time_limit 32 +relay_log mysql-relay-bin +relay_log_basename /tmp/12345/data/mysql-relay-bin +relay_log_index /tmp/12345/data/mysql-relay-bin.index +relay_log_info_file relay-log.info +relay_log_info_repository TABLE +relay_log_purge ON +relay_log_recovery OFF +relay_log_space_limit 0 +replica_allow_batching ON +replica_checkpoint_group 512 +replica_checkpoint_period 300 +replica_compressed_protocol OFF +replica_enable_event +replica_exec_mode STRICT +replica_load_tmpdir /tmp +replica_max_allowed_packet 1073741824 +replica_net_timeout 60 +replica_parallel_type LOGICAL_CLOCK +replica_parallel_workers 4 +replica_pending_jobs_size_max 134217728 +replica_preserve_commit_order ON +replica_skip_errors OFF +replica_sql_verify_checksum ON +replica_transaction_retries 10 +replica_type_conversions +replication_optimize_for_static_plugin_config OFF +replication_sender_observe_commit_only OFF +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +require_secure_transport OFF +rpl_read_size 8192 +rpl_stop_replica_timeout 31536000 +rpl_stop_slave_timeout 31536000 +schema_definition_cache 256 +secondary_engine_cost_threshold 100000.000000 +secure_file_priv +secure_log_path +select_into_buffer_size 131072 +select_into_disk_sync OFF +select_into_disk_sync_delay 0 +server_id 12345 +server_id_bits 32 +server_uuid 034c9da9-20c0-11ee-a7f4-7404f1a10a4a +session_track_gtids OFF +session_track_schema ON +session_track_state_change OFF +session_track_system_variables time_zone,autocommit,character_set_client,character_set_results,character_set_connection +session_track_transaction_info OFF +sha256_password_auto_generate_rsa_keys ON +sha256_password_private_key_path private_key.pem +sha256_password_proxy_users OFF +sha256_password_public_key_path public_key.pem +show_create_table_verbosity OFF +show_gipk_in_create_table_and_information_schema ON +show_old_temporals OFF +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_replica_start OFF +skip_show_database OFF +skip_slave_start OFF +slave_allow_batching ON +slave_checkpoint_group 512 +slave_checkpoint_period 300 +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_max_allowed_packet 1073741824 +slave_net_timeout 60 +slave_parallel_type LOGICAL_CLOCK +slave_parallel_workers 4 +slave_pending_jobs_size_max 134217728 +slave_preserve_commit_order ON +slave_rows_search_algorithms INDEX_SCAN,HASH_SCAN +slave_skip_errors OFF +slave_sql_verify_checksum ON +slave_transaction_retries 10 +slave_type_conversions +slow_launch_time 2 +slow_query_log ON +slow_query_log_always_write_time 10.000000 +slow_query_log_file /tmp/12345/data/slow.log +slow_query_log_use_global_control +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 262144 +source_verify_checksum OFF +sql_auto_is_null OFF +sql_big_selects ON +sql_buffer_result OFF +sql_generate_invisible_primary_key OFF +sql_log_off OFF +sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION +sql_notes ON +sql_quote_show_create ON +sql_replica_skip_counter 0 +sql_require_primary_key OFF +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter 0 +sql_warnings OFF +ssl_ca ca.pem +ssl_capath +ssl_cert server-cert.pem +ssl_cipher +ssl_crl +ssl_crlpath +ssl_fips_mode OFF +ssl_key server-key.pem +ssl_session_cache_mode ON +ssl_session_cache_timeout 300 +stored_program_cache 256 +stored_program_definition_cache 256 +super_read_only OFF +sync_binlog 1 +sync_master_info 10000 +sync_relay_log 10000 +sync_relay_log_info 10000 +sync_source_info 10000 +system_time_zone +03 +table_definition_cache 2000 +table_encryption_privilege_check OFF +table_open_cache 4000 +table_open_cache_instances 16 +table_open_cache_triggers 524288 +tablespace_definition_cache 256 +temptable_max_mmap 1073741824 +temptable_max_ram 1073741824 +temptable_use_mmap ON +terminology_use_previous NONE +tf_sequence_table_max_upper_bound 1048576 +thread_cache_size 9 +thread_handling one-thread-per-connection +thread_pool_high_prio_mode transactions +thread_pool_high_prio_tickets 4294967295 +thread_pool_idle_timeout 60 +thread_pool_max_threads 100000 +thread_pool_oversubscribe 3 +thread_pool_size 16 +thread_pool_stall_limit 500 +thread_stack 1048576 +thread_statistics OFF +time_zone SYSTEM +tls_ciphersuites +tls_version TLSv1.2,TLSv1.3 +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_isolation REPEATABLE-READ +transaction_prealloc_size 4096 +transaction_read_only OFF +transaction_write_set_extraction XXHASH64 +unique_checks ON +updatable_views_with_limit YES +userstat OFF +version 8.0.32-24 +version_comment Percona Server (GPL), Release 24, Revision e5c6e9d2 +version_compile_machine x86_64 +version_compile_os Linux +version_compile_zlib 1.2.13 +version_suffix +wait_timeout 28800 +windowing_use_high_precision ON +xa_detach_on_prepare ON +internal::nice_of_1089375 0 +internal::oom_of_1089375 0 +internal::nice_of_1089193 0 +internal::oom_of_1089193 0 +internal::nice_of_1088931 0 +internal::oom_of_1088931 0 +pt-summary-internal-pid_file_exists 1 +pt-summary-internal-current_time 2023-07-12 17:25 +pt-summary-internal-Config_File_path /tmp/12345/my.sandbox.cnf +pt-summary-internal-mysql_executable /usr/bin/mysql +pt-summary-internal-now 2023-07-13 23:29:50 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 5 +pt-summary-internal-mysqld_executable_1 Yes +pt-summary-internal-jemalloc_enabled_for_pid_1089375 1 +pt-summary-internal-jemalloc_enabled_for_pid_1089193 1 +pt-summary-internal-jemalloc_enabled_for_pid_1088931 1 +pt-summary-internal-jemalloc_location /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysqld-executables b/t/pt-mysql-summary/samples/temp_enc008/mysqld-executables new file mode 100644 index 000000000..b2851c789 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysqld-executables @@ -0,0 +1 @@ +/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld diff --git a/t/pt-mysql-summary/samples/temp_enc008/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc008/mysqld-instances new file mode 100644 index 000000000..76fa7490c --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc008/mysqld-instances @@ -0,0 +1,4 @@ + PID TTY STAT TIME COMMAND +1088931 pts/5 Sl 7:38 /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf -u root --init-file /tmp/12345/mysql-init --plugin-dir=/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ --early-plugin-load=keyring_file.so --loose-keyring_file_data=/tmp/12345/data/keyring +1089193 pts/5 Sl 7:41 /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld --defaults-file=/tmp/12346/my.sandbox.cnf -u root --init-file /tmp/12346/mysql-init --plugin-dir=/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ --early-plugin-load=keyring_file.so --loose-keyring_file_data=/tmp/12346/data/keyring +1089375 pts/5 Sl 7:31 /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld --defaults-file=/tmp/12347/my.sandbox.cnf -u root --init-file /tmp/12347/mysql-init --plugin-dir=/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ --early-plugin-load=keyring_file.so --loose-keyring_file_data=/tmp/12347/data/keyring diff --git a/t/pt-mysql-summary/samples/temp_enc008/ndb-status b/t/pt-mysql-summary/samples/temp_enc008/ndb-status new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc009/collect.err b/t/pt-mysql-summary/samples/temp_enc009/collect.err new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc009/encrypted-tables b/t/pt-mysql-summary/samples/temp_enc009/encrypted-tables new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc009/encrypted-tablespaces b/t/pt-mysql-summary/samples/temp_enc009/encrypted-tablespaces new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc009/innodb-status b/t/pt-mysql-summary/samples/temp_enc009/innodb-status new file mode 100644 index 000000000..af0d909c0 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/innodb-status @@ -0,0 +1,125 @@ +*************************** 1. row *************************** + Type: InnoDB + Name: +Status: +===================================== +2023-07-14 17:54:33 140536961435200 INNODB MONITOR OUTPUT +===================================== +Per second averages calculated from the last 26 seconds +----------------- +BACKGROUND THREAD +----------------- +srv_master_thread loops: 276 srv_active, 0 srv_shutdown, 59000 srv_idle +srv_master_thread log flush and writes: 0 +---------- +SEMAPHORES +---------- +OS WAIT ARRAY INFO: reservation count 719 +OS WAIT ARRAY INFO: signal count 505 +RW-shared spins 0, rounds 0, OS waits 0 +RW-excl spins 0, rounds 0, OS waits 0 +RW-sx spins 0, rounds 0, OS waits 0 +Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx +------------ +TRANSACTIONS +------------ +Trx id counter 4466 +Purge done for trx's n:o < 4466 undo n:o < 0 state: running but idle +History list length 0 +LIST OF TRANSACTIONS FOR EACH SESSION: +---TRANSACTION 422011977339064, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977338216, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977337368, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +---TRANSACTION 422011977336520, not started +0 lock struct(s), heap size 1128, 0 row lock(s) +-------- +FILE I/O +-------- +I/O thread 0 state: waiting for completed aio requests (insert buffer thread) +I/O thread 1 state: waiting for completed aio requests (log thread) +I/O thread 2 state: waiting for completed aio requests (read thread) +I/O thread 3 state: waiting for completed aio requests (read thread) +I/O thread 4 state: waiting for completed aio requests (read thread) +I/O thread 5 state: waiting for completed aio requests (read thread) +I/O thread 6 state: waiting for completed aio requests (write thread) +I/O thread 7 state: waiting for completed aio requests (write thread) +I/O thread 8 state: waiting for completed aio requests (write thread) +I/O thread 9 state: waiting for completed aio requests (write thread) +Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] , + ibuf aio reads:, log i/o's: +Pending flushes (fsync) log: 0; buffer pool: 0 +21427 OS file reads, 23672 OS file writes, 13449 OS fsyncs +0.31 reads/s, 16384 avg bytes/read, 0.04 writes/s, 0.04 fsyncs/s +------------------------------------- +INSERT BUFFER AND ADAPTIVE HASH INDEX +------------------------------------- +Ibuf: size 1, free list len 0, seg size 2, 0 merges +merged operations: + insert 0, delete mark 0, delete 0 +discarded operations: + insert 0, delete mark 0, delete 0 +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +Hash table size 4441, node heap has 1 buffer(s) +0.00 hash searches/s, 0.23 non-hash searches/s +--- +LOG +--- +Log sequence number 34408522 +Log buffer assigned up to 34408522 +Log buffer completed up to 34408522 +Log written up to 34408522 +Log flushed up to 34408522 +Added dirty pages up to 34408522 +Pages flushed up to 34408522 +Last checkpoint at 34408522 +Log minimum file id is 96 +Log maximum file id is 105 +Modified age no less than 34408522 +Checkpoint age 0 +Max checkpoint age 7971328 +8432 log i/o's done, 0.00 log i/o's/second +---------------------- +BUFFER POOL AND MEMORY +---------------------- +Total large memory allocated 0 +Dictionary memory allocated 877664 +Buffer pool size 1023 +Buffer pool size, bytes 16760832 +Free buffers 749 +Database pages 266 +Old database pages 0 +Modified db pages 3 +Pending reads 0 +Pending writes: LRU 0, flush list 0, single page 0 +Pages made young 591, not young 17587 +0.00 youngs/s, 0.00 non-youngs/s +Pages read 21401, created 2762, written 11009 +0.31 reads/s, 0.08 creates/s, 0.00 writes/s +Buffer pool hit rate 889 / 1000, young-making rate 0 / 1000 not 0 / 1000 +Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s +LRU len: 266, unzip_LRU len: 0 +I/O sum[0]:cur[8], unzip sum[0]:cur[0] +-------------- +ROW OPERATIONS +-------------- +0 queries inside InnoDB, 0 queries in queue +0 read views open inside InnoDB +0 RW transactions active inside InnoDB +Process ID=1088931, Main thread ID=140536702826048 , state=sleeping +Number of rows inserted 67051, updated 16, deleted 0, read 437734 +2.46 inserts/s, 0.00 updates/s, 0.00 deletes/s, 2.46 reads/s +Number of system rows inserted 2783, updated 2505, deleted 1483, read 302528 +0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.50 reads/s +---------------------------- +END OF INNODB MONITOR OUTPUT +============================ + diff --git a/t/pt-mysql-summary/samples/temp_enc009/keyring-plugins b/t/pt-mysql-summary/samples/temp_enc009/keyring-plugins new file mode 100644 index 000000000..fe25ef49d --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/keyring-plugins @@ -0,0 +1,5 @@ ++--------------+---------------+ +| PLUGIN_NAME | PLUGIN_STATUS | ++--------------+---------------+ +| keyring_file | ACTIVE | ++--------------+---------------+ diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-config-file b/t/pt-mysql-summary/samples/temp_enc009/mysql-config-file new file mode 100644 index 000000000..676507cdb --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-config-file @@ -0,0 +1,42 @@ +[client] +user = msandbox +password = msandbox +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock + +[mysqld] +port = 12345 +socket = /tmp/12345/mysql_sandbox12345.sock +pid-file = /tmp/12345/data/mysql_sandbox12345.pid +basedir = /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35 +datadir = /tmp/12345/data +general_log +general_log_file = genlog +innodb_buffer_pool_size = 16M +innodb_data_file_path = ibdata1:10M:autoextend +innodb_data_home_dir = /tmp/12345/data +innodb_lock_wait_timeout = 3 +innodb_log_file_size = 5M +innodb_log_group_home_dir = /tmp/12345/data +key_buffer_size = 5M +local-infile = 1 +log-bin = mysql-bin +log-error = /tmp/12345/data/mysqld.log +log_slave_updates +lower_case_table_names = 0 +relay_log = mysql-relay-bin +report-host = 127.0.0.1 +report-port = 12345 +server-id = 12345 +slow-query-log = 1 +slow-query-log-file = /tmp/12345/data/slow.log +log_slow_admin_statements = 1 +long_query_time = 0 +default_authentication_plugin=mysql_native_password + +# fkc test +binlog_format = STATEMENT +#performance_schema = ON +#performance-schema-instrument='wait/lock/metadata/sql/mdl=ON' +#performance-schema-instrument='transaction=ON' +secure-file-priv = diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-databases b/t/pt-mysql-summary/samples/temp_enc009/mysql-databases new file mode 100644 index 000000000..8e4e5ec14 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-databases @@ -0,0 +1,6 @@ +information_schema +mysql +percona_test +performance_schema +sakila +sys diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-master-logs b/t/pt-mysql-summary/samples/temp_enc009/mysql-master-logs new file mode 100644 index 000000000..af23bb294 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-master-logs @@ -0,0 +1,2 @@ +mysql-bin.000001 180 No +mysql-bin.000002 3480015 No diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-master-status b/t/pt-mysql-summary/samples/temp_enc009/mysql-master-status new file mode 100644 index 000000000..d0d1a707c --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-master-status @@ -0,0 +1 @@ +mysql-bin.000002 3480015 diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-plugins b/t/pt-mysql-summary/samples/temp_enc009/mysql-plugins new file mode 100644 index 000000000..aba08c672 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-plugins @@ -0,0 +1,64 @@ +keyring_file ACTIVE KEYRING keyring_file.so GPL +binlog ACTIVE STORAGE ENGINE NULL GPL +mysql_native_password ACTIVE AUTHENTICATION NULL GPL +sha256_password ACTIVE AUTHENTICATION NULL GPL +caching_sha2_password ACTIVE AUTHENTICATION NULL GPL +sha2_cache_cleaner ACTIVE AUDIT NULL GPL +daemon_keyring_proxy_plugin ACTIVE DAEMON NULL GPL +PERFORMANCE_SCHEMA ACTIVE STORAGE ENGINE NULL GPL +CSV ACTIVE STORAGE ENGINE NULL GPL +MEMORY ACTIVE STORAGE ENGINE NULL GPL +InnoDB ACTIVE STORAGE ENGINE NULL GPL +INNODB_TRX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMPMEM_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_PER_INDEX ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CMP_PER_INDEX_RESET ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_PAGE_LRU ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_BUFFER_POOL_STATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TEMP_TABLE_INFO ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_METRICS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_DEFAULT_STOPWORD ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_DELETED ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_BEING_DELETED ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_CONFIG ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_INDEX_CACHE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_FT_INDEX_TABLE ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLESTATS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_TABLESPACES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_COLUMNS ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_VIRTUAL ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_CACHED_INDEXES ACTIVE INFORMATION SCHEMA NULL GPL +INNODB_SESSION_TEMP_TABLESPACES ACTIVE INFORMATION SCHEMA NULL GPL +MyISAM ACTIVE STORAGE ENGINE NULL GPL +MRG_MYISAM ACTIVE STORAGE ENGINE NULL GPL +TempTable ACTIVE STORAGE ENGINE NULL GPL +ARCHIVE ACTIVE STORAGE ENGINE NULL GPL +BLACKHOLE ACTIVE STORAGE ENGINE NULL GPL +FEDERATED DISABLED STORAGE ENGINE NULL GPL +ndbcluster DISABLED STORAGE ENGINE NULL GPL +ndbinfo DISABLED STORAGE ENGINE NULL GPL +ndb_transid_mysql_connection_map DISABLED INFORMATION SCHEMA NULL GPL +ngram ACTIVE FTPARSER NULL GPL +mysqlx_cache_cleaner ACTIVE AUDIT NULL GPL +mysqlx ACTIVE DAEMON NULL GPL +ROCKSDB ACTIVE STORAGE ENGINE ha_rocksdb.so GPL +ROCKSDB_CFSTATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_DBSTATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_PERF_CONTEXT ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_PERF_CONTEXT_GLOBAL ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_CF_OPTIONS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_GLOBAL_INFO ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_COMPACTION_HISTORY ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_COMPACTION_STATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_ACTIVE_COMPACTION_STATS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_DDL ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_INDEX_FILE_MAP ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_LOCKS ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_TRX ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL +ROCKSDB_DEADLOCK ACTIVE INFORMATION SCHEMA ha_rocksdb.so GPL diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-processlist b/t/pt-mysql-summary/samples/temp_enc009/mysql-processlist new file mode 100644 index 000000000..36e76b23e --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-processlist @@ -0,0 +1,48 @@ +*************************** 1. row *************************** + Id: 5 + User: event_scheduler + Host: localhost + db: NULL + Command: Daemon + Time: 174514 + State: Waiting on empty queue + Info: NULL + Time_ms: 174514856 + Rows_sent: 0 +Rows_examined: 0 +*************************** 2. row *************************** + Id: 14 + User: msandbox + Host: localhost:42338 + db: NULL + Command: Binlog Dump + Time: 174509 + State: Source has sent all binlog to replica; waiting for more updates + Info: NULL + Time_ms: 174509192 + Rows_sent: 0 +Rows_examined: 0 +*************************** 3. row *************************** + Id: 5210 + User: msandbox + Host: localhost:58166 + db: NULL + Command: Sleep + Time: 849 + State: + Info: NULL + Time_ms: 849425 + Rows_sent: 64 +Rows_examined: 64 +*************************** 4. row *************************** + Id: 5364 + User: msandbox + Host: localhost + db: NULL + Command: Query + Time: 0 + State: init + Info: SHOW FULL PROCESSLIST + Time_ms: 0 + Rows_sent: 0 +Rows_examined: 0 diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-roles b/t/pt-mysql-summary/samples/temp_enc009/mysql-roles new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-slave b/t/pt-mysql-summary/samples/temp_enc009/mysql-slave new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-slave-hosts b/t/pt-mysql-summary/samples/temp_enc009/mysql-slave-hosts new file mode 100644 index 000000000..66a9097d2 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-slave-hosts @@ -0,0 +1,6 @@ +*************************** 1. row *************************** + Server_id: 12346 + Host: 127.0.0.1 + Port: 12346 + Master_id: 12345 +Slave_UUID: 05c34f44-20c0-11ee-ad4c-7404f1a10a4a diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-status b/t/pt-mysql-summary/samples/temp_enc009/mysql-status new file mode 100644 index 000000000..ad11bbbd2 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-status @@ -0,0 +1,659 @@ +Aborted_clients 68 +Aborted_connects 0 +Acl_cache_items_count 0 +Binlog_snapshot_file mysql-bin.000002 +Binlog_snapshot_position 3480015 +Binlog_cache_disk_use 10 +Binlog_cache_use 481 +Binlog_snapshot_gtid_executed not-in-consistent-snapshot +Binlog_stmt_cache_disk_use 1 +Binlog_stmt_cache_use 48 +Bytes_received 6476274 +Bytes_sent 30066859 +Caching_sha2_password_rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Com_admin_commands 2 +Com_assign_to_keycache 0 +Com_alter_db 0 +Com_alter_event 0 +Com_alter_function 0 +Com_alter_instance 0 +Com_alter_procedure 0 +Com_alter_resource_group 0 +Com_alter_server 0 +Com_alter_table 72 +Com_alter_tablespace 82 +Com_alter_user 3 +Com_alter_user_default_role 0 +Com_analyze 1 +Com_begin 0 +Com_binlog 0 +Com_call_procedure 0 +Com_change_db 1603 +Com_change_master 0 +Com_change_repl_filter 0 +Com_change_replication_source 0 +Com_check 0 +Com_checksum 9 +Com_clone 0 +Com_commit 2 +Com_create_compression_dictionary 0 +Com_create_db 52 +Com_create_event 0 +Com_create_function 0 +Com_create_index 0 +Com_create_procedure 0 +Com_create_role 0 +Com_create_server 0 +Com_create_table 136 +Com_create_resource_group 0 +Com_create_trigger 3 +Com_create_udf 0 +Com_create_user 3 +Com_create_view 7 +Com_create_spatial_reference_system 0 +Com_dealloc_sql 0 +Com_delete 0 +Com_delete_multi 0 +Com_do 0 +Com_drop_compression_dictionary 0 +Com_drop_db 87 +Com_drop_event 0 +Com_drop_function 0 +Com_drop_index 0 +Com_drop_procedure 0 +Com_drop_resource_group 0 +Com_drop_role 0 +Com_drop_server 0 +Com_drop_spatial_reference_system 0 +Com_drop_table 77 +Com_drop_trigger 0 +Com_drop_user 2 +Com_drop_view 0 +Com_empty_query 0 +Com_execute_sql 0 +Com_explain_other 0 +Com_flush 3 +Com_get_diagnostics 0 +Com_grant 3 +Com_grant_roles 0 +Com_ha_close 0 +Com_ha_open 0 +Com_ha_read 0 +Com_help 0 +Com_import 0 +Com_insert 48 +Com_insert_select 0 +Com_install_component 0 +Com_install_plugin 15 +Com_kill 0 +Com_load 1 +Com_lock_instance 0 +Com_lock_tables 16 +Com_lock_tables_for_backup 0 +Com_optimize 0 +Com_preload_keys 0 +Com_prepare_sql 0 +Com_purge 0 +Com_purge_before_date 0 +Com_release_savepoint 0 +Com_rename_table 0 +Com_rename_user 0 +Com_repair 0 +Com_replace 1 +Com_replace_select 0 +Com_reset 0 +Com_resignal 0 +Com_restart 0 +Com_revoke 0 +Com_revoke_all 0 +Com_revoke_roles 0 +Com_rollback 1 +Com_rollback_to_savepoint 0 +Com_savepoint 0 +Com_select 10777 +Com_set_option 11211 +Com_set_password 0 +Com_set_resource_group 0 +Com_set_role 0 +Com_signal 0 +Com_show_binlog_events 0 +Com_show_binlogs 183 +Com_show_charsets 0 +Com_show_client_statistics 0 +Com_show_collations 0 +Com_show_create_db 46 +Com_show_create_event 0 +Com_show_create_func 0 +Com_show_create_proc 0 +Com_show_create_table 1512 +Com_show_create_trigger 0 +Com_show_databases 203 +Com_show_engine_logs 0 +Com_show_engine_mutex 8 +Com_show_engine_status 192 +Com_show_events 0 +Com_show_errors 0 +Com_show_fields 3192 +Com_show_function_code 0 +Com_show_function_status 42 +Com_show_grants 0 +Com_show_index_statistics 0 +Com_show_keys 0 +Com_show_master_status 183 +Com_show_open_tables 8 +Com_show_plugins 228 +Com_show_privileges 0 +Com_show_procedure_code 0 +Com_show_procedure_status 42 +Com_show_processlist 197 +Com_show_profile 0 +Com_show_profiles 0 +Com_show_relaylog_events 0 +Com_show_replicas 183 +Com_show_slave_hosts 183 +Com_show_replica_status 189 +Com_show_slave_status 189 +Com_show_status 600 +Com_show_storage_engines 501 +Com_show_table_statistics 0 +Com_show_table_status 1596 +Com_show_tables 79 +Com_show_thread_statistics 0 +Com_show_triggers 1512 +Com_show_user_statistics 0 +Com_show_variables 482 +Com_show_warnings 0 +Com_show_create_user 0 +Com_shutdown 0 +Com_replica_start 0 +Com_slave_start 0 +Com_replica_stop 0 +Com_slave_stop 0 +Com_group_replication_start 0 +Com_group_replication_stop 0 +Com_stmt_execute 0 +Com_stmt_close 0 +Com_stmt_fetch 0 +Com_stmt_prepare 0 +Com_stmt_reset 0 +Com_stmt_send_long_data 0 +Com_truncate 0 +Com_uninstall_component 0 +Com_uninstall_plugin 0 +Com_unlock_instance 0 +Com_unlock_tables 60 +Com_update 17 +Com_update_multi 0 +Com_xa_commit 0 +Com_xa_end 0 +Com_xa_prepare 0 +Com_xa_recover 0 +Com_xa_rollback 0 +Com_xa_start 0 +Com_stmt_reprepare 0 +Connection_errors_accept 0 +Connection_errors_internal 0 +Connection_errors_max_connections 0 +Connection_errors_peer_address 0 +Connection_errors_select 0 +Connection_errors_tcpwrap 0 +Connections 5358 +Created_tmp_disk_tables 441 +Created_tmp_files 7 +Created_tmp_tables 7191 +Current_tls_ca ca.pem +Current_tls_capath +Current_tls_cert server-cert.pem +Current_tls_cipher +Current_tls_ciphersuites +Current_tls_crl +Current_tls_crlpath +Current_tls_key server-key.pem +Current_tls_version TLSv1.2,TLSv1.3 +Delayed_errors 0 +Delayed_insert_threads 0 +Delayed_writes 0 +Error_log_buffered_bytes 3952 +Error_log_buffered_events 22 +Error_log_expired_events 0 +Error_log_latest_write 1689171959141812 +Flush_commands 4 +Global_connection_memory 0 +Handler_commit 16140 +Handler_delete 1443 +Handler_discover 0 +Handler_external_lock 153617 +Handler_mrr_init 0 +Handler_prepare 1898 +Handler_read_first 10918 +Handler_read_key 81584 +Handler_read_last 0 +Handler_read_next 181042 +Handler_read_prev 0 +Handler_read_rnd 25560 +Handler_read_rnd_next 1697833 +Handler_rollback 366 +Handler_savepoint 0 +Handler_savepoint_rollback 0 +Handler_update 2509 +Handler_write 537484 +Innodb_background_log_sync 0 +Innodb_buffer_pool_dump_status Dumping of buffer pool not started +Innodb_buffer_pool_load_status Buffer pool(s) load completed at 230712 17:25:59 +Innodb_buffer_pool_resize_status +Innodb_buffer_pool_resize_status_code 0 +Innodb_buffer_pool_resize_status_progress 0 +Innodb_buffer_pool_pages_data 256 +Innodb_buffer_pool_bytes_data 4194304 +Innodb_buffer_pool_pages_dirty 0 +Innodb_buffer_pool_bytes_dirty 0 +Innodb_buffer_pool_pages_flushed 31782 +Innodb_buffer_pool_pages_free 759 +Innodb_buffer_pool_pages_LRU_flushed 0 +Innodb_buffer_pool_pages_made_not_young 17587 +Innodb_buffer_pool_pages_made_young 591 +Innodb_buffer_pool_pages_misc 9 +Innodb_buffer_pool_pages_old 0 +Innodb_buffer_pool_pages_total 1024 +Innodb_buffer_pool_read_ahead_rnd 0 +Innodb_buffer_pool_read_ahead 12 +Innodb_buffer_pool_read_ahead_evicted 0 +Innodb_buffer_pool_read_requests 1346717 +Innodb_buffer_pool_reads 21382 +Innodb_buffer_pool_wait_free 0 +Innodb_buffer_pool_write_requests 325423 +Innodb_checkpoint_age 0 +Innodb_checkpoint_max_age 7971328 +Innodb_data_fsyncs 13448 +Innodb_data_pending_fsyncs 0 +Innodb_data_pending_reads 0 +Innodb_data_pending_writes 0 +Innodb_data_read 350587904 +Innodb_data_reads 21419 +Innodb_data_writes 23671 +Innodb_data_written 202377216 +Innodb_dblwr_pages_written 10483 +Innodb_dblwr_writes 2755 +Innodb_ibuf_free_list 0 +Innodb_ibuf_segment_size 2 +Innodb_redo_log_read_only OFF +Innodb_redo_log_uuid 1075899837 +Innodb_redo_log_checkpoint_lsn 34408522 +Innodb_redo_log_current_lsn 34408522 +Innodb_redo_log_flushed_to_disk_lsn 34408522 +Innodb_redo_log_logical_size 512 +Innodb_redo_log_physical_size 3276800 +Innodb_redo_log_capacity_resized 10485760 +Innodb_redo_log_resize_status OK +Innodb_log_waits 0 +Innodb_log_write_requests 278095 +Innodb_log_writes 8430 +Innodb_lsn_current 34408522 +Innodb_lsn_flushed 34408522 +Innodb_lsn_last_checkpoint 34408522 +Innodb_master_thread_active_loops 276 +Innodb_master_thread_idle_loops 59000 +Innodb_max_trx_id 4466 +Innodb_oldest_view_low_limit_trx_id 0 +Innodb_os_log_fsyncs 5076 +Innodb_os_log_pending_fsyncs 0 +Innodb_os_log_pending_writes 0 +Innodb_os_log_written 17677824 +Innodb_page_size 16384 +Innodb_pages_created 2760 +Innodb_pages_read 21393 +Innodb_pages0_read 8 +Innodb_pages_written 11009 +Innodb_purge_trx_id 4466 +Innodb_purge_undo_no 0 +Innodb_redo_log_enabled ON +Innodb_row_lock_current_waits 0 +Innodb_row_lock_time 0 +Innodb_row_lock_time_avg 0 +Innodb_row_lock_time_max 0 +Innodb_row_lock_waits 0 +Innodb_rows_deleted 0 +Innodb_rows_inserted 66987 +Innodb_rows_read 437670 +Innodb_rows_updated 16 +Innodb_system_rows_deleted 1483 +Innodb_system_rows_inserted 2783 +Innodb_system_rows_read 302515 +Innodb_system_rows_updated 2505 +Innodb_sampled_pages_read 0 +Innodb_sampled_pages_skipped 0 +Innodb_num_open_files 34 +Innodb_truncated_status_writes 0 +Innodb_undo_tablespaces_total 2 +Innodb_undo_tablespaces_implicit 2 +Innodb_undo_tablespaces_explicit 0 +Innodb_undo_tablespaces_active 2 +Innodb_secondary_index_triggered_cluster_reads 174422 +Innodb_secondary_index_triggered_cluster_reads_avoided 0 +Innodb_buffered_aio_submitted 12 +Innodb_scan_pages_contiguous 0 +Innodb_scan_pages_disjointed 0 +Innodb_scan_pages_total_seek_distance 0 +Innodb_scan_data_size 0 +Innodb_scan_deleted_recs_size 0 +Innodb_encryption_n_merge_blocks_encrypted 0 +Innodb_encryption_n_merge_blocks_decrypted 0 +Innodb_encryption_n_rowlog_blocks_encrypted 0 +Innodb_encryption_n_rowlog_blocks_decrypted 0 +Key_blocks_not_flushed 0 +Key_blocks_unused 4143 +Key_blocks_used 9 +Key_read_requests 1871 +Key_reads 0 +Key_write_requests 1014 +Key_writes 9 +Locked_connects 0 +Max_execution_time_exceeded 0 +Max_execution_time_set 0 +Max_execution_time_set_failed 0 +Max_used_connections 6 +Max_used_connections_time 2023-07-12 17:26:20 +Mysqlx_aborted_clients 0 +Mysqlx_address :: +Mysqlx_bytes_received 0 +Mysqlx_bytes_received_compressed_payload 0 +Mysqlx_bytes_received_uncompressed_frame 0 +Mysqlx_bytes_sent 0 +Mysqlx_bytes_sent_compressed_payload 0 +Mysqlx_bytes_sent_uncompressed_frame 0 +Mysqlx_compression_algorithm +Mysqlx_compression_level +Mysqlx_connection_accept_errors 0 +Mysqlx_connection_errors 0 +Mysqlx_connections_accepted 0 +Mysqlx_connections_closed 0 +Mysqlx_connections_rejected 0 +Mysqlx_crud_create_view 0 +Mysqlx_crud_delete 0 +Mysqlx_crud_drop_view 0 +Mysqlx_crud_find 0 +Mysqlx_crud_insert 0 +Mysqlx_crud_modify_view 0 +Mysqlx_crud_update 0 +Mysqlx_cursor_close 0 +Mysqlx_cursor_fetch 0 +Mysqlx_cursor_open 0 +Mysqlx_errors_sent 0 +Mysqlx_errors_unknown_message_type 0 +Mysqlx_expect_close 0 +Mysqlx_expect_open 0 +Mysqlx_init_error 0 +Mysqlx_messages_sent 0 +Mysqlx_notice_global_sent 0 +Mysqlx_notice_other_sent 0 +Mysqlx_notice_warning_sent 0 +Mysqlx_notified_by_group_replication 0 +Mysqlx_port 33060 +Mysqlx_prep_deallocate 0 +Mysqlx_prep_execute 0 +Mysqlx_prep_prepare 0 +Mysqlx_rows_sent 0 +Mysqlx_sessions 0 +Mysqlx_sessions_accepted 0 +Mysqlx_sessions_closed 0 +Mysqlx_sessions_fatal_error 0 +Mysqlx_sessions_killed 0 +Mysqlx_sessions_rejected 0 +Mysqlx_socket /tmp/mysqlx.sock +Mysqlx_ssl_accepts 0 +Mysqlx_ssl_active +Mysqlx_ssl_cipher +Mysqlx_ssl_cipher_list +Mysqlx_ssl_ctx_verify_depth 18446744073709551615 +Mysqlx_ssl_ctx_verify_mode 5 +Mysqlx_ssl_finished_accepts 0 +Mysqlx_ssl_server_not_after Jul 9 14:25:56 2033 GMT +Mysqlx_ssl_server_not_before Jul 12 14:25:56 2023 GMT +Mysqlx_ssl_verify_depth +Mysqlx_ssl_verify_mode +Mysqlx_ssl_version +Mysqlx_stmt_create_collection 0 +Mysqlx_stmt_create_collection_index 0 +Mysqlx_stmt_disable_notices 0 +Mysqlx_stmt_drop_collection 0 +Mysqlx_stmt_drop_collection_index 0 +Mysqlx_stmt_enable_notices 0 +Mysqlx_stmt_ensure_collection 0 +Mysqlx_stmt_execute_mysqlx 0 +Mysqlx_stmt_execute_sql 0 +Mysqlx_stmt_execute_xplugin 0 +Mysqlx_stmt_get_collection_options 0 +Mysqlx_stmt_kill_client 0 +Mysqlx_stmt_list_clients 0 +Mysqlx_stmt_list_notices 0 +Mysqlx_stmt_list_objects 0 +Mysqlx_stmt_modify_collection_options 0 +Mysqlx_stmt_ping 0 +Mysqlx_worker_threads 2 +Mysqlx_worker_threads_active 0 +Net_buffer_length 49152 +Not_flushed_delayed_rows 0 +Ongoing_anonymous_transaction_count 0 +Open_files 37 +Open_streams 0 +Open_table_definitions 111 +Open_tables 1312 +Opened_files 37 +Opened_table_definitions 466 +Opened_tables 1616 +Performance_schema_accounts_lost 0 +Performance_schema_cond_classes_lost 0 +Performance_schema_cond_instances_lost 0 +Performance_schema_digest_lost 0 +Performance_schema_file_classes_lost 0 +Performance_schema_file_handles_lost 0 +Performance_schema_file_instances_lost 0 +Performance_schema_hosts_lost 0 +Performance_schema_index_stat_lost 0 +Performance_schema_locker_lost 0 +Performance_schema_memory_classes_lost 0 +Performance_schema_metadata_lock_lost 0 +Performance_schema_mutex_classes_lost 0 +Performance_schema_mutex_instances_lost 0 +Performance_schema_nested_statement_lost 0 +Performance_schema_prepared_statements_lost 0 +Performance_schema_program_lost 0 +Performance_schema_rwlock_classes_lost 0 +Performance_schema_rwlock_instances_lost 0 +Performance_schema_session_connect_attrs_longest_seen 175 +Performance_schema_session_connect_attrs_lost 0 +Performance_schema_socket_classes_lost 0 +Performance_schema_socket_instances_lost 0 +Performance_schema_stage_classes_lost 0 +Performance_schema_statement_classes_lost 0 +Performance_schema_table_handles_lost 0 +Performance_schema_table_instances_lost 0 +Performance_schema_table_lock_stat_lost 0 +Performance_schema_thread_classes_lost 0 +Performance_schema_thread_instances_lost 0 +Performance_schema_users_lost 0 +Prepared_stmt_count 0 +Queries 41080 +Questions 41070 +Replica_open_temp_tables 0 +Resource_group_supported ON +Rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Secondary_engine_execution_count 0 +Select_full_join 924 +Select_full_range_join 0 +Select_range 0 +Select_range_check 0 +Select_scan 12500 +Slave_open_temp_tables 0 +Slow_launch_threads 0 +Slow_queries 41068 +Sort_merge_passes 0 +Sort_range 0 +Sort_rows 33719 +Sort_scan 6796 +Ssl_accept_renegotiates 0 +Ssl_accepts 8 +Ssl_callback_cache_hits 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 +Ssl_connect_renegotiates 0 +Ssl_ctx_verify_depth 18446744073709551615 +Ssl_ctx_verify_mode 5 +Ssl_default_timeout 0 +Ssl_finished_accepts 8 +Ssl_finished_connects 0 +Ssl_server_not_after Jul 9 14:25:56 2033 GMT +Ssl_server_not_before Jul 12 14:25:56 2023 GMT +Ssl_session_cache_hits 0 +Ssl_session_cache_misses 0 +Ssl_session_cache_mode SERVER +Ssl_session_cache_overflows 0 +Ssl_session_cache_size 128 +Ssl_session_cache_timeout 300 +Ssl_session_cache_timeouts 0 +Ssl_sessions_reused 0 +Ssl_used_session_cache_entries 0 +Ssl_verify_depth 0 +Ssl_verify_mode 0 +Ssl_version +Table_locks_immediate 1273 +Table_locks_waited 0 +Table_open_cache_hits 77047 +Table_open_cache_misses 1634 +Table_open_cache_overflows 0 +Table_open_cache_triggers_hits 0 +Table_open_cache_triggers_misses 0 +Table_open_cache_triggers_overflows 0 +Tc_log_max_pages_used 0 +Tc_log_page_size 0 +Tc_log_page_waits 0 +Threadpool_idle_threads 0 +Threadpool_threads 0 +Threads_cached 3 +Threads_connected 3 +Threads_created 6 +Threads_running 3 +Tls_library_version OpenSSL 3.0.2 15 Mar 2022 +Uptime 174515 +Uptime_since_flush_status 174515 +rocksdb_rows_deleted 0 +rocksdb_rows_deleted_blind 0 +rocksdb_rows_inserted 0 +rocksdb_rows_read 0 +rocksdb_rows_updated 0 +rocksdb_rows_expired 0 +rocksdb_rows_filtered 0 +rocksdb_rows_unfiltered_no_snapshot 0 +rocksdb_system_rows_deleted 0 +rocksdb_system_rows_inserted 0 +rocksdb_system_rows_read 0 +rocksdb_system_rows_updated 0 +rocksdb_memtable_total 4096 +rocksdb_memtable_unflushed 4096 +rocksdb_queries_point 0 +rocksdb_queries_range 0 +rocksdb_table_index_stats_success 0 +rocksdb_table_index_stats_failure 0 +rocksdb_table_index_stats_req_queue_length 0 +rocksdb_covered_secondary_key_lookups 0 +rocksdb_additional_compaction_triggers 0 +rocksdb_block_cache_add 0 +rocksdb_block_cache_add_failures 0 +rocksdb_block_cache_bytes_read 0 +rocksdb_block_cache_bytes_write 0 +rocksdb_block_cache_compressed_hit 0 +rocksdb_block_cache_compressed_miss 0 +rocksdb_block_cache_data_add 0 +rocksdb_block_cache_data_bytes_insert 0 +rocksdb_block_cache_data_hit 0 +rocksdb_block_cache_data_miss 0 +rocksdb_block_cache_filter_add 0 +rocksdb_block_cache_filter_bytes_evict 0 +rocksdb_block_cache_filter_bytes_insert 0 +rocksdb_block_cache_filter_hit 0 +rocksdb_block_cache_filter_miss 0 +rocksdb_block_cache_hit 0 +rocksdb_block_cache_index_add 0 +rocksdb_block_cache_index_bytes_evict 0 +rocksdb_block_cache_index_bytes_insert 0 +rocksdb_block_cache_index_hit 0 +rocksdb_block_cache_index_miss 0 +rocksdb_block_cache_miss 0 +rocksdb_bloom_filter_full_positive 0 +rocksdb_bloom_filter_full_true_positive 0 +rocksdb_bloom_filter_prefix_checked 0 +rocksdb_bloom_filter_prefix_useful 0 +rocksdb_bloom_filter_useful 0 +rocksdb_bytes_read 24 +rocksdb_bytes_written 72 +rocksdb_compact_read_bytes 0 +rocksdb_compact_write_bytes 0 +rocksdb_compaction_key_drop_new 0 +rocksdb_compaction_key_drop_obsolete 0 +rocksdb_compaction_key_drop_user 0 +rocksdb_flush_write_bytes 0 +rocksdb_get_hit_l0 0 +rocksdb_get_hit_l1 0 +rocksdb_get_hit_l2_and_up 0 +rocksdb_get_updates_since_calls 0 +rocksdb_iter_bytes_read 14 +rocksdb_manual_compactions_cancelled 0 +rocksdb_manual_compactions_pending 0 +rocksdb_manual_compactions_processed 0 +rocksdb_manual_compactions_running 0 +rocksdb_memtable_hit 4 +rocksdb_memtable_miss 2 +rocksdb_no_file_closes 0 +rocksdb_no_file_errors 0 +rocksdb_no_file_opens 0 +rocksdb_num_iterators 0 +rocksdb_number_block_not_compressed 0 +rocksdb_number_db_next 0 +rocksdb_number_db_next_found 0 +rocksdb_number_db_prev 0 +rocksdb_number_db_prev_found 0 +rocksdb_number_db_seek 6 +rocksdb_number_db_seek_found 1 +rocksdb_number_deletes_filtered 0 +rocksdb_number_keys_read 6 +rocksdb_number_keys_updated 0 +rocksdb_number_keys_written 2 +rocksdb_number_merge_failures 0 +rocksdb_number_multiget_bytes_read 0 +rocksdb_number_multiget_get 0 +rocksdb_number_multiget_keys_read 0 +rocksdb_number_reseeks_iteration 0 +rocksdb_number_sst_entry_delete 0 +rocksdb_number_sst_entry_merge 0 +rocksdb_number_sst_entry_other 0 +rocksdb_number_sst_entry_put 0 +rocksdb_number_sst_entry_singledelete 0 +rocksdb_number_superversion_acquires 9 +rocksdb_number_superversion_cleanups 0 +rocksdb_number_superversion_releases 0 +rocksdb_partial_index_groups_materialized 0 +rocksdb_partial_index_groups_sorted 0 +rocksdb_partial_index_rows_materialized 0 +rocksdb_partial_index_rows_sorted 0 +rocksdb_row_lock_deadlocks 0 +rocksdb_row_lock_wait_timeouts 0 +rocksdb_snapshot_conflict_errors 0 +rocksdb_stall_l0_file_count_limit_slowdowns 0 +rocksdb_stall_locked_l0_file_count_limit_slowdowns 0 +rocksdb_stall_l0_file_count_limit_stops 0 +rocksdb_stall_locked_l0_file_count_limit_stops 0 +rocksdb_stall_pending_compaction_limit_stops 0 +rocksdb_stall_pending_compaction_limit_slowdowns 0 +rocksdb_stall_memtable_limit_stops 0 +rocksdb_stall_memtable_limit_slowdowns 0 +rocksdb_stall_total_stops 0 +rocksdb_stall_total_slowdowns 0 +rocksdb_stall_micros 0 +rocksdb_wal_bytes 72 +rocksdb_wal_group_syncs 10 +rocksdb_wal_synced 13 +rocksdb_write_other 0 +rocksdb_write_self 3 +rocksdb_write_timedout 0 +rocksdb_write_wal 3 diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-status-defer b/t/pt-mysql-summary/samples/temp_enc009/mysql-status-defer new file mode 100644 index 000000000..5883c35f5 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-status-defer @@ -0,0 +1,659 @@ +Aborted_clients 68 68 +Aborted_connects 0 0 +Acl_cache_items_count 0 0 +Binlog_snapshot_file mysql-bin.000002 mysql-bin.000002 +Binlog_snapshot_position 3480015 3480015 +Binlog_cache_disk_use 10 10 +Binlog_cache_use 481 481 +Binlog_snapshot_gtid_executed not-in-consistent-snapshot not-in-consistent-snapshot +Binlog_stmt_cache_disk_use 1 1 +Binlog_stmt_cache_use 48 48 +Bytes_received 6476274 6482936 +Bytes_sent 30066859 30107217 +Caching_sha2_password_rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Com_admin_commands 2 2 +Com_assign_to_keycache 0 0 +Com_alter_db 0 0 +Com_alter_event 0 0 +Com_alter_function 0 0 +Com_alter_instance 0 0 +Com_alter_procedure 0 0 +Com_alter_resource_group 0 0 +Com_alter_server 0 0 +Com_alter_table 72 72 +Com_alter_tablespace 82 82 +Com_alter_user 3 3 +Com_alter_user_default_role 0 0 +Com_analyze 1 1 +Com_begin 0 0 +Com_binlog 0 0 +Com_call_procedure 0 0 +Com_change_db 1603 1603 +Com_change_master 0 0 +Com_change_repl_filter 0 0 +Com_change_replication_source 0 0 +Com_check 0 0 +Com_checksum 9 9 +Com_clone 0 0 +Com_commit 2 2 +Com_create_compression_dictionary 0 0 +Com_create_db 52 52 +Com_create_event 0 0 +Com_create_function 0 0 +Com_create_index 0 0 +Com_create_procedure 0 0 +Com_create_role 0 0 +Com_create_server 0 0 +Com_create_table 136 136 +Com_create_resource_group 0 0 +Com_create_trigger 3 3 +Com_create_udf 0 0 +Com_create_user 3 3 +Com_create_view 7 7 +Com_create_spatial_reference_system 0 0 +Com_dealloc_sql 0 0 +Com_delete 0 0 +Com_delete_multi 0 0 +Com_do 0 0 +Com_drop_compression_dictionary 0 0 +Com_drop_db 87 87 +Com_drop_event 0 0 +Com_drop_function 0 0 +Com_drop_index 0 0 +Com_drop_procedure 0 0 +Com_drop_resource_group 0 0 +Com_drop_role 0 0 +Com_drop_server 0 0 +Com_drop_spatial_reference_system 0 0 +Com_drop_table 77 77 +Com_drop_trigger 0 0 +Com_drop_user 2 2 +Com_drop_view 0 0 +Com_empty_query 0 0 +Com_execute_sql 0 0 +Com_explain_other 0 0 +Com_flush 3 3 +Com_get_diagnostics 0 0 +Com_grant 3 3 +Com_grant_roles 0 0 +Com_ha_close 0 0 +Com_ha_open 0 0 +Com_ha_read 0 0 +Com_help 0 0 +Com_import 0 0 +Com_insert 48 48 +Com_insert_select 0 0 +Com_install_component 0 0 +Com_install_plugin 15 15 +Com_kill 0 0 +Com_load 1 1 +Com_lock_instance 0 0 +Com_lock_tables 16 16 +Com_lock_tables_for_backup 0 0 +Com_optimize 0 0 +Com_preload_keys 0 0 +Com_prepare_sql 0 0 +Com_purge 0 0 +Com_purge_before_date 0 0 +Com_release_savepoint 0 0 +Com_rename_table 0 0 +Com_rename_user 0 0 +Com_repair 0 0 +Com_replace 1 1 +Com_replace_select 0 0 +Com_reset 0 0 +Com_resignal 0 0 +Com_restart 0 0 +Com_revoke 0 0 +Com_revoke_all 0 0 +Com_revoke_roles 0 0 +Com_rollback 1 1 +Com_rollback_to_savepoint 0 0 +Com_savepoint 0 0 +Com_select 10777 10808 +Com_set_option 11211 11211 +Com_set_password 0 0 +Com_set_resource_group 0 0 +Com_set_role 0 0 +Com_signal 0 0 +Com_show_binlog_events 0 0 +Com_show_binlogs 183 184 +Com_show_charsets 0 0 +Com_show_client_statistics 0 0 +Com_show_collations 0 0 +Com_show_create_db 46 46 +Com_show_create_event 0 0 +Com_show_create_func 0 0 +Com_show_create_proc 0 0 +Com_show_create_table 1512 1512 +Com_show_create_trigger 0 0 +Com_show_databases 203 204 +Com_show_engine_logs 0 0 +Com_show_engine_mutex 8 8 +Com_show_engine_status 192 193 +Com_show_events 0 0 +Com_show_errors 0 0 +Com_show_fields 3192 3192 +Com_show_function_code 0 0 +Com_show_function_status 42 42 +Com_show_grants 0 0 +Com_show_index_statistics 0 0 +Com_show_keys 0 0 +Com_show_master_status 183 184 +Com_show_open_tables 8 8 +Com_show_plugins 228 229 +Com_show_privileges 0 0 +Com_show_procedure_code 0 0 +Com_show_procedure_status 42 42 +Com_show_processlist 197 198 +Com_show_profile 0 0 +Com_show_profiles 0 0 +Com_show_relaylog_events 0 0 +Com_show_replicas 183 184 +Com_show_slave_hosts 183 184 +Com_show_replica_status 189 190 +Com_show_slave_status 189 190 +Com_show_status 600 601 +Com_show_storage_engines 501 501 +Com_show_table_statistics 0 0 +Com_show_table_status 1596 1596 +Com_show_tables 79 79 +Com_show_thread_statistics 0 0 +Com_show_triggers 1512 1512 +Com_show_user_statistics 0 0 +Com_show_variables 482 482 +Com_show_warnings 0 0 +Com_show_create_user 0 0 +Com_shutdown 0 0 +Com_replica_start 0 0 +Com_slave_start 0 0 +Com_replica_stop 0 0 +Com_slave_stop 0 0 +Com_group_replication_start 0 0 +Com_group_replication_stop 0 0 +Com_stmt_execute 0 0 +Com_stmt_close 0 0 +Com_stmt_fetch 0 0 +Com_stmt_prepare 0 0 +Com_stmt_reset 0 0 +Com_stmt_send_long_data 0 0 +Com_truncate 0 0 +Com_uninstall_component 0 0 +Com_uninstall_plugin 0 0 +Com_unlock_instance 0 0 +Com_unlock_tables 60 60 +Com_update 17 17 +Com_update_multi 0 0 +Com_xa_commit 0 0 +Com_xa_end 0 0 +Com_xa_prepare 0 0 +Com_xa_recover 0 0 +Com_xa_rollback 0 0 +Com_xa_start 0 0 +Com_stmt_reprepare 0 0 +Connection_errors_accept 0 0 +Connection_errors_internal 0 0 +Connection_errors_max_connections 0 0 +Connection_errors_peer_address 0 0 +Connection_errors_select 0 0 +Connection_errors_tcpwrap 0 0 +Connections 5358 5379 +Created_tmp_disk_tables 441 443 +Created_tmp_files 7 7 +Created_tmp_tables 7191 7196 +Current_tls_ca ca.pem ca.pem +Current_tls_capath +Current_tls_cert server-cert.pem server-cert.pem +Current_tls_cipher +Current_tls_ciphersuites +Current_tls_crl +Current_tls_crlpath +Current_tls_key server-key.pem server-key.pem +Current_tls_version TLSv1.2,TLSv1.3 TLSv1.2,TLSv1.3 +Delayed_errors 0 0 +Delayed_insert_threads 0 0 +Delayed_writes 0 0 +Error_log_buffered_bytes 3952 3952 +Error_log_buffered_events 22 22 +Error_log_expired_events 0 0 +Error_log_latest_write 1689171959141812 1689171959141812 +Flush_commands 4 4 +Global_connection_memory 0 0 +Handler_commit 16140 16145 +Handler_delete 1443 1443 +Handler_discover 0 0 +Handler_external_lock 153617 153661 +Handler_mrr_init 0 0 +Handler_prepare 1898 1898 +Handler_read_first 10918 10929 +Handler_read_key 81584 81642 +Handler_read_last 0 0 +Handler_read_next 181042 181045 +Handler_read_prev 0 0 +Handler_read_rnd 25560 25560 +Handler_read_rnd_next 1697833 1699750 +Handler_rollback 366 366 +Handler_savepoint 0 0 +Handler_savepoint_rollback 0 0 +Handler_update 2509 2509 +Handler_write 537484 538295 +Innodb_background_log_sync 0 0 +Innodb_buffer_pool_dump_status Dumping of buffer pool not started Dumping of buffer pool not started +Innodb_buffer_pool_load_status Buffer pool(s) load completed at 230712 17:25:59 Buffer pool(s) load completed at 230712 17:25:59 +Innodb_buffer_pool_resize_status +Innodb_buffer_pool_resize_status_code 0 0 +Innodb_buffer_pool_resize_status_progress 0 0 +Innodb_buffer_pool_pages_data 256 256 +Innodb_buffer_pool_bytes_data 4194304 4194304 +Innodb_buffer_pool_pages_dirty 0 0 +Innodb_buffer_pool_bytes_dirty 0 0 +Innodb_buffer_pool_pages_flushed 31782 31834 +Innodb_buffer_pool_pages_free 759 759 +Innodb_buffer_pool_pages_LRU_flushed 0 0 +Innodb_buffer_pool_pages_made_not_young 17587 17587 +Innodb_buffer_pool_pages_made_young 591 591 +Innodb_buffer_pool_pages_misc 9 9 +Innodb_buffer_pool_pages_old 0 0 +Innodb_buffer_pool_pages_total 1024 1024 +Innodb_buffer_pool_read_ahead_rnd 0 0 +Innodb_buffer_pool_read_ahead 12 12 +Innodb_buffer_pool_read_ahead_evicted 0 0 +Innodb_buffer_pool_read_requests 1346717 1347448 +Innodb_buffer_pool_reads 21382 21433 +Innodb_buffer_pool_wait_free 0 0 +Innodb_buffer_pool_write_requests 325423 325515 +Innodb_checkpoint_age 0 0 +Innodb_checkpoint_max_age 7971328 7971328 +Innodb_data_fsyncs 13448 13450 +Innodb_data_pending_fsyncs 0 0 +Innodb_data_pending_reads 0 0 +Innodb_data_pending_writes 0 0 +Innodb_data_read 350587904 351423488 +Innodb_data_reads 21419 21470 +Innodb_data_writes 23671 23674 +Innodb_data_written 202377216 202393600 +Innodb_dblwr_pages_written 10483 10483 +Innodb_dblwr_writes 2755 2755 +Innodb_ibuf_free_list 0 0 +Innodb_ibuf_segment_size 2 2 +Innodb_redo_log_read_only OFF OFF +Innodb_redo_log_uuid 1075899837 1075899837 +Innodb_redo_log_checkpoint_lsn 34408522 34408522 +Innodb_redo_log_current_lsn 34408522 34408522 +Innodb_redo_log_flushed_to_disk_lsn 34408522 34408522 +Innodb_redo_log_logical_size 512 512 +Innodb_redo_log_physical_size 3276800 3276800 +Innodb_redo_log_capacity_resized 10485760 10485760 +Innodb_redo_log_resize_status OK OK +Innodb_log_waits 0 0 +Innodb_log_write_requests 278095 278095 +Innodb_log_writes 8430 8430 +Innodb_lsn_current 34408522 34408522 +Innodb_lsn_flushed 34408522 34408522 +Innodb_lsn_last_checkpoint 34408522 34408522 +Innodb_master_thread_active_loops 276 277 +Innodb_master_thread_idle_loops 59000 59009 +Innodb_max_trx_id 4466 4466 +Innodb_oldest_view_low_limit_trx_id 0 0 +Innodb_os_log_fsyncs 5076 5076 +Innodb_os_log_pending_fsyncs 0 0 +Innodb_os_log_pending_writes 0 0 +Innodb_os_log_written 17677824 17677824 +Innodb_page_size 16384 16384 +Innodb_pages_created 2760 2766 +Innodb_pages_read 21393 21444 +Innodb_pages0_read 8 8 +Innodb_pages_written 11009 11010 +Innodb_purge_trx_id 4466 4466 +Innodb_purge_undo_no 0 0 +Innodb_redo_log_enabled ON ON +Innodb_row_lock_current_waits 0 0 +Innodb_row_lock_time 0 0 +Innodb_row_lock_time_avg 0 0 +Innodb_row_lock_time_max 0 0 +Innodb_row_lock_waits 0 0 +Innodb_rows_deleted 0 0 +Innodb_rows_inserted 66987 67115 +Innodb_rows_read 437670 437798 +Innodb_rows_updated 16 16 +Innodb_system_rows_deleted 1483 1483 +Innodb_system_rows_inserted 2783 2783 +Innodb_system_rows_read 302515 303001 +Innodb_system_rows_updated 2505 2505 +Innodb_sampled_pages_read 0 0 +Innodb_sampled_pages_skipped 0 0 +Innodb_num_open_files 34 34 +Innodb_truncated_status_writes 0 0 +Innodb_undo_tablespaces_total 2 2 +Innodb_undo_tablespaces_implicit 2 2 +Innodb_undo_tablespaces_explicit 0 0 +Innodb_undo_tablespaces_active 2 2 +Innodb_secondary_index_triggered_cluster_reads 174422 174422 +Innodb_secondary_index_triggered_cluster_reads_avoided 0 0 +Innodb_buffered_aio_submitted 12 12 +Innodb_scan_pages_contiguous 0 0 +Innodb_scan_pages_disjointed 0 0 +Innodb_scan_pages_total_seek_distance 0 0 +Innodb_scan_data_size 0 0 +Innodb_scan_deleted_recs_size 0 0 +Innodb_encryption_n_merge_blocks_encrypted 0 0 +Innodb_encryption_n_merge_blocks_decrypted 0 0 +Innodb_encryption_n_rowlog_blocks_encrypted 0 0 +Innodb_encryption_n_rowlog_blocks_decrypted 0 0 +Key_blocks_not_flushed 0 0 +Key_blocks_unused 4143 4143 +Key_blocks_used 9 9 +Key_read_requests 1871 1871 +Key_reads 0 0 +Key_write_requests 1014 1014 +Key_writes 9 9 +Locked_connects 0 0 +Max_execution_time_exceeded 0 0 +Max_execution_time_set 0 0 +Max_execution_time_set_failed 0 0 +Max_used_connections 6 6 +Max_used_connections_time 2023-07-12 17:26:20 2023-07-12 17:26:20 +Mysqlx_aborted_clients 0 0 +Mysqlx_address :: :: +Mysqlx_bytes_received 0 0 +Mysqlx_bytes_received_compressed_payload 0 0 +Mysqlx_bytes_received_uncompressed_frame 0 0 +Mysqlx_bytes_sent 0 0 +Mysqlx_bytes_sent_compressed_payload 0 0 +Mysqlx_bytes_sent_uncompressed_frame 0 0 +Mysqlx_compression_algorithm +Mysqlx_compression_level +Mysqlx_connection_accept_errors 0 0 +Mysqlx_connection_errors 0 0 +Mysqlx_connections_accepted 0 0 +Mysqlx_connections_closed 0 0 +Mysqlx_connections_rejected 0 0 +Mysqlx_crud_create_view 0 0 +Mysqlx_crud_delete 0 0 +Mysqlx_crud_drop_view 0 0 +Mysqlx_crud_find 0 0 +Mysqlx_crud_insert 0 0 +Mysqlx_crud_modify_view 0 0 +Mysqlx_crud_update 0 0 +Mysqlx_cursor_close 0 0 +Mysqlx_cursor_fetch 0 0 +Mysqlx_cursor_open 0 0 +Mysqlx_errors_sent 0 0 +Mysqlx_errors_unknown_message_type 0 0 +Mysqlx_expect_close 0 0 +Mysqlx_expect_open 0 0 +Mysqlx_init_error 0 0 +Mysqlx_messages_sent 0 0 +Mysqlx_notice_global_sent 0 0 +Mysqlx_notice_other_sent 0 0 +Mysqlx_notice_warning_sent 0 0 +Mysqlx_notified_by_group_replication 0 0 +Mysqlx_port 33060 33060 +Mysqlx_prep_deallocate 0 0 +Mysqlx_prep_execute 0 0 +Mysqlx_prep_prepare 0 0 +Mysqlx_rows_sent 0 0 +Mysqlx_sessions 0 0 +Mysqlx_sessions_accepted 0 0 +Mysqlx_sessions_closed 0 0 +Mysqlx_sessions_fatal_error 0 0 +Mysqlx_sessions_killed 0 0 +Mysqlx_sessions_rejected 0 0 +Mysqlx_socket /tmp/mysqlx.sock /tmp/mysqlx.sock +Mysqlx_ssl_accepts 0 0 +Mysqlx_ssl_active +Mysqlx_ssl_cipher +Mysqlx_ssl_cipher_list +Mysqlx_ssl_ctx_verify_depth 18446744073709551615 18446744073709551615 +Mysqlx_ssl_ctx_verify_mode 5 5 +Mysqlx_ssl_finished_accepts 0 0 +Mysqlx_ssl_server_not_after Jul 9 14:25:56 2033 GMT Jul 9 14:25:56 2033 GMT +Mysqlx_ssl_server_not_before Jul 12 14:25:56 2023 GMT Jul 12 14:25:56 2023 GMT +Mysqlx_ssl_verify_depth +Mysqlx_ssl_verify_mode +Mysqlx_ssl_version +Mysqlx_stmt_create_collection 0 0 +Mysqlx_stmt_create_collection_index 0 0 +Mysqlx_stmt_disable_notices 0 0 +Mysqlx_stmt_drop_collection 0 0 +Mysqlx_stmt_drop_collection_index 0 0 +Mysqlx_stmt_enable_notices 0 0 +Mysqlx_stmt_ensure_collection 0 0 +Mysqlx_stmt_execute_mysqlx 0 0 +Mysqlx_stmt_execute_sql 0 0 +Mysqlx_stmt_execute_xplugin 0 0 +Mysqlx_stmt_get_collection_options 0 0 +Mysqlx_stmt_kill_client 0 0 +Mysqlx_stmt_list_clients 0 0 +Mysqlx_stmt_list_notices 0 0 +Mysqlx_stmt_list_objects 0 0 +Mysqlx_stmt_modify_collection_options 0 0 +Mysqlx_stmt_ping 0 0 +Mysqlx_worker_threads 2 2 +Mysqlx_worker_threads_active 0 0 +Net_buffer_length 49152 49152 +Not_flushed_delayed_rows 0 0 +Ongoing_anonymous_transaction_count 0 0 +Open_files 37 37 +Open_streams 0 0 +Open_table_definitions 111 111 +Open_tables 1312 1312 +Opened_files 37 37 +Opened_table_definitions 466 466 +Opened_tables 1616 1616 +Performance_schema_accounts_lost 0 0 +Performance_schema_cond_classes_lost 0 0 +Performance_schema_cond_instances_lost 0 0 +Performance_schema_digest_lost 0 0 +Performance_schema_file_classes_lost 0 0 +Performance_schema_file_handles_lost 0 0 +Performance_schema_file_instances_lost 0 0 +Performance_schema_hosts_lost 0 0 +Performance_schema_index_stat_lost 0 0 +Performance_schema_locker_lost 0 0 +Performance_schema_memory_classes_lost 0 0 +Performance_schema_metadata_lock_lost 0 0 +Performance_schema_mutex_classes_lost 0 0 +Performance_schema_mutex_instances_lost 0 0 +Performance_schema_nested_statement_lost 0 0 +Performance_schema_prepared_statements_lost 0 0 +Performance_schema_program_lost 0 0 +Performance_schema_rwlock_classes_lost 0 0 +Performance_schema_rwlock_instances_lost 0 0 +Performance_schema_session_connect_attrs_longest_seen 175 175 +Performance_schema_session_connect_attrs_lost 0 0 +Performance_schema_socket_classes_lost 0 0 +Performance_schema_socket_instances_lost 0 0 +Performance_schema_stage_classes_lost 0 0 +Performance_schema_statement_classes_lost 0 0 +Performance_schema_table_handles_lost 0 0 +Performance_schema_table_instances_lost 0 0 +Performance_schema_table_lock_stat_lost 0 0 +Performance_schema_thread_classes_lost 0 0 +Performance_schema_thread_instances_lost 0 0 +Performance_schema_users_lost 0 0 +Prepared_stmt_count 0 0 +Queries 41080 41143 +Questions 41070 41133 +Replica_open_temp_tables 0 0 +Resource_group_supported ON ON +Rsa_public_key -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n -----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAktN/T1mU0fMqbmfSblb3\n0obB5FkDBASK0RbFkZUIUQMkvCyZMYKctRsnpektMKBXXe+aYnTYf/de/UUMyxTg\n7RYZjP/P/Ss7Z1VXPfVJfdZPbknMceyWF7g62Y5qMNjekcM7SdL6S5Cp5EfYKRjL\nfPPPqYxc9/7YzUBb65lcoa+0B1bYLE8MWtegzcTpOP8lyLcKxwUFhiXxITR0gRXu\n2PkkHSDqghkGlyMlCtDWgbIWuMG7riozibQkFo7PC0T8jq3Mzfdh47F3q8RAMgie\nLoyoPLg2aV8FVAcSMzS3WWD5/GTLnanSkcEenRE3GpauPlkDuoNR0CFYCy2c1vxA\nxwIDAQAB\n-----END PUBLIC KEY-----\n +Secondary_engine_execution_count 0 0 +Select_full_join 924 928 +Select_full_range_join 0 0 +Select_range 0 0 +Select_range_check 0 0 +Select_scan 12500 12510 +Slave_open_temp_tables 0 0 +Slow_launch_threads 0 0 +Slow_queries 41068 41131 +Sort_merge_passes 0 0 +Sort_range 0 0 +Sort_rows 33719 33725 +Sort_scan 6796 6797 +Ssl_accept_renegotiates 0 0 +Ssl_accepts 8 8 +Ssl_callback_cache_hits 0 0 +Ssl_cipher +Ssl_cipher_list +Ssl_client_connects 0 0 +Ssl_connect_renegotiates 0 0 +Ssl_ctx_verify_depth 18446744073709551615 18446744073709551615 +Ssl_ctx_verify_mode 5 5 +Ssl_default_timeout 0 0 +Ssl_finished_accepts 8 8 +Ssl_finished_connects 0 0 +Ssl_server_not_after Jul 9 14:25:56 2033 GMT Jul 9 14:25:56 2033 GMT +Ssl_server_not_before Jul 12 14:25:56 2023 GMT Jul 12 14:25:56 2023 GMT +Ssl_session_cache_hits 0 0 +Ssl_session_cache_misses 0 0 +Ssl_session_cache_mode SERVER SERVER +Ssl_session_cache_overflows 0 0 +Ssl_session_cache_size 128 128 +Ssl_session_cache_timeout 300 300 +Ssl_session_cache_timeouts 0 0 +Ssl_sessions_reused 0 0 +Ssl_used_session_cache_entries 0 0 +Ssl_verify_depth 0 0 +Ssl_verify_mode 0 0 +Ssl_version +Table_locks_immediate 1273 1274 +Table_locks_waited 0 0 +Table_open_cache_hits 77047 77070 +Table_open_cache_misses 1634 1634 +Table_open_cache_overflows 0 0 +Table_open_cache_triggers_hits 0 0 +Table_open_cache_triggers_misses 0 0 +Table_open_cache_triggers_overflows 0 0 +Tc_log_max_pages_used 0 0 +Tc_log_page_size 0 0 +Tc_log_page_waits 0 0 +Threadpool_idle_threads 0 0 +Threadpool_threads 0 0 +Threads_cached 3 3 +Threads_connected 3 3 +Threads_created 6 6 +Threads_running 3 3 +Tls_library_version OpenSSL 3.0.2 15 Mar 2022 OpenSSL 3.0.2 15 Mar 2022 +Uptime 174515 174526 +Uptime_since_flush_status 174515 174526 +rocksdb_rows_deleted 0 0 +rocksdb_rows_deleted_blind 0 0 +rocksdb_rows_inserted 0 0 +rocksdb_rows_read 0 0 +rocksdb_rows_updated 0 0 +rocksdb_rows_expired 0 0 +rocksdb_rows_filtered 0 0 +rocksdb_rows_unfiltered_no_snapshot 0 0 +rocksdb_system_rows_deleted 0 0 +rocksdb_system_rows_inserted 0 0 +rocksdb_system_rows_read 0 0 +rocksdb_system_rows_updated 0 0 +rocksdb_memtable_total 4096 4096 +rocksdb_memtable_unflushed 4096 4096 +rocksdb_queries_point 0 0 +rocksdb_queries_range 0 0 +rocksdb_table_index_stats_success 0 0 +rocksdb_table_index_stats_failure 0 0 +rocksdb_table_index_stats_req_queue_length 0 0 +rocksdb_covered_secondary_key_lookups 0 0 +rocksdb_additional_compaction_triggers 0 0 +rocksdb_block_cache_add 0 0 +rocksdb_block_cache_add_failures 0 0 +rocksdb_block_cache_bytes_read 0 0 +rocksdb_block_cache_bytes_write 0 0 +rocksdb_block_cache_compressed_hit 0 0 +rocksdb_block_cache_compressed_miss 0 0 +rocksdb_block_cache_data_add 0 0 +rocksdb_block_cache_data_bytes_insert 0 0 +rocksdb_block_cache_data_hit 0 0 +rocksdb_block_cache_data_miss 0 0 +rocksdb_block_cache_filter_add 0 0 +rocksdb_block_cache_filter_bytes_evict 0 0 +rocksdb_block_cache_filter_bytes_insert 0 0 +rocksdb_block_cache_filter_hit 0 0 +rocksdb_block_cache_filter_miss 0 0 +rocksdb_block_cache_hit 0 0 +rocksdb_block_cache_index_add 0 0 +rocksdb_block_cache_index_bytes_evict 0 0 +rocksdb_block_cache_index_bytes_insert 0 0 +rocksdb_block_cache_index_hit 0 0 +rocksdb_block_cache_index_miss 0 0 +rocksdb_block_cache_miss 0 0 +rocksdb_bloom_filter_full_positive 0 0 +rocksdb_bloom_filter_full_true_positive 0 0 +rocksdb_bloom_filter_prefix_checked 0 0 +rocksdb_bloom_filter_prefix_useful 0 0 +rocksdb_bloom_filter_useful 0 0 +rocksdb_bytes_read 24 24 +rocksdb_bytes_written 72 72 +rocksdb_compact_read_bytes 0 0 +rocksdb_compact_write_bytes 0 0 +rocksdb_compaction_key_drop_new 0 0 +rocksdb_compaction_key_drop_obsolete 0 0 +rocksdb_compaction_key_drop_user 0 0 +rocksdb_flush_write_bytes 0 0 +rocksdb_get_hit_l0 0 0 +rocksdb_get_hit_l1 0 0 +rocksdb_get_hit_l2_and_up 0 0 +rocksdb_get_updates_since_calls 0 0 +rocksdb_iter_bytes_read 14 14 +rocksdb_manual_compactions_cancelled 0 0 +rocksdb_manual_compactions_pending 0 0 +rocksdb_manual_compactions_processed 0 0 +rocksdb_manual_compactions_running 0 0 +rocksdb_memtable_hit 4 4 +rocksdb_memtable_miss 2 2 +rocksdb_no_file_closes 0 0 +rocksdb_no_file_errors 0 0 +rocksdb_no_file_opens 0 0 +rocksdb_num_iterators 0 0 +rocksdb_number_block_not_compressed 0 0 +rocksdb_number_db_next 0 0 +rocksdb_number_db_next_found 0 0 +rocksdb_number_db_prev 0 0 +rocksdb_number_db_prev_found 0 0 +rocksdb_number_db_seek 6 6 +rocksdb_number_db_seek_found 1 1 +rocksdb_number_deletes_filtered 0 0 +rocksdb_number_keys_read 6 6 +rocksdb_number_keys_updated 0 0 +rocksdb_number_keys_written 2 2 +rocksdb_number_merge_failures 0 0 +rocksdb_number_multiget_bytes_read 0 0 +rocksdb_number_multiget_get 0 0 +rocksdb_number_multiget_keys_read 0 0 +rocksdb_number_reseeks_iteration 0 0 +rocksdb_number_sst_entry_delete 0 0 +rocksdb_number_sst_entry_merge 0 0 +rocksdb_number_sst_entry_other 0 0 +rocksdb_number_sst_entry_put 0 0 +rocksdb_number_sst_entry_singledelete 0 0 +rocksdb_number_superversion_acquires 9 9 +rocksdb_number_superversion_cleanups 0 0 +rocksdb_number_superversion_releases 0 0 +rocksdb_partial_index_groups_materialized 0 0 +rocksdb_partial_index_groups_sorted 0 0 +rocksdb_partial_index_rows_materialized 0 0 +rocksdb_partial_index_rows_sorted 0 0 +rocksdb_row_lock_deadlocks 0 0 +rocksdb_row_lock_wait_timeouts 0 0 +rocksdb_snapshot_conflict_errors 0 0 +rocksdb_stall_l0_file_count_limit_slowdowns 0 0 +rocksdb_stall_locked_l0_file_count_limit_slowdowns 0 0 +rocksdb_stall_l0_file_count_limit_stops 0 0 +rocksdb_stall_locked_l0_file_count_limit_stops 0 0 +rocksdb_stall_pending_compaction_limit_stops 0 0 +rocksdb_stall_pending_compaction_limit_slowdowns 0 0 +rocksdb_stall_memtable_limit_stops 0 0 +rocksdb_stall_memtable_limit_slowdowns 0 0 +rocksdb_stall_total_stops 0 0 +rocksdb_stall_total_slowdowns 0 0 +rocksdb_stall_micros 0 0 +rocksdb_wal_bytes 72 72 +rocksdb_wal_group_syncs 10 10 +rocksdb_wal_synced 13 13 +rocksdb_write_other 0 0 +rocksdb_write_self 3 3 +rocksdb_write_timedout 0 0 +rocksdb_write_wal 3 3 diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-users b/t/pt-mysql-summary/samples/temp_enc009/mysql-users new file mode 100644 index 000000000..6679bb645 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-users @@ -0,0 +1 @@ +2 0 0 0 diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysql-variables b/t/pt-mysql-summary/samples/temp_enc009/mysql-variables new file mode 100644 index 000000000..777edb902 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysql-variables @@ -0,0 +1,879 @@ +activate_all_roles_on_login OFF +admin_address +admin_port 33062 +admin_ssl_ca +admin_ssl_capath +admin_ssl_cert +admin_ssl_cipher +admin_ssl_crl +admin_ssl_crlpath +admin_ssl_key +admin_tls_ciphersuites +admin_tls_version TLSv1.2,TLSv1.3 +authentication_policy *,, +auto_generate_certs ON +auto_increment_increment 1 +auto_increment_offset 1 +autocommit ON +automatic_sp_privileges ON +avoid_temporal_upgrade OFF +back_log 151 +basedir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/ +big_tables OFF +bind_address * +binlog_cache_size 32768 +binlog_checksum CRC32 +binlog_ddl_skip_rewrite OFF +binlog_direct_non_transactional_updates OFF +binlog_encryption OFF +binlog_error_action ABORT_SERVER +binlog_expire_logs_auto_purge ON +binlog_expire_logs_seconds 2592000 +binlog_format STATEMENT +binlog_group_commit_sync_delay 0 +binlog_group_commit_sync_no_delay_count 0 +binlog_gtid_simple_recovery ON +binlog_max_flush_queue_time 0 +binlog_order_commits ON +binlog_rotate_encryption_master_key_at_startup OFF +binlog_row_event_max_size 8192 +binlog_row_image FULL +binlog_row_metadata MINIMAL +binlog_row_value_options +binlog_rows_query_log_events OFF +binlog_skip_flush_commands OFF +binlog_space_limit 0 +binlog_stmt_cache_size 32768 +binlog_transaction_compression OFF +binlog_transaction_compression_level_zstd 3 +binlog_transaction_dependency_history_size 25000 +binlog_transaction_dependency_tracking COMMIT_ORDER +block_encryption_mode aes-128-ecb +buffered_error_log_filename +buffered_error_log_size 0 +build_id 5a1ade9075641041401011f46939928e34d5f311 +bulk_insert_buffer_size 8388608 +caching_sha2_password_auto_generate_rsa_keys ON +caching_sha2_password_digest_rounds 5000 +caching_sha2_password_private_key_path private_key.pem +caching_sha2_password_public_key_path public_key.pem +character_set_client utf8mb4 +character_set_connection utf8mb4 +character_set_database utf8mb4 +character_set_filesystem binary +character_set_results utf8mb4 +character_set_server utf8mb4 +character_set_system utf8mb3 +character_sets_dir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/share/charsets/ +check_proxy_users OFF +collation_connection utf8mb4_0900_ai_ci +collation_database utf8mb4_0900_ai_ci +collation_server utf8mb4_0900_ai_ci +completion_type NO_CHAIN +concurrent_insert AUTO +connect_timeout 10 +connection_memory_chunk_size 8912 +connection_memory_limit 18446744073709551615 +core_file OFF +create_admin_listener_thread OFF +cte_max_recursion_depth 1000 +datadir /tmp/12345/data/ +default_authentication_plugin mysql_native_password +default_collation_for_utf8mb4 utf8mb4_0900_ai_ci +default_password_lifetime 0 +default_storage_engine InnoDB +default_table_encryption OFF +default_tmp_storage_engine InnoDB +default_week_format 0 +delay_key_write ON +delayed_insert_limit 100 +delayed_insert_timeout 300 +delayed_queue_size 1000 +disabled_storage_engines +disconnect_on_expired_password ON +div_precision_increment 4 +encrypt_tmp_files OFF +end_markers_in_json OFF +enforce_gtid_consistency OFF +enforce_storage_engine +eq_range_index_dive_limit 200 +event_scheduler ON +expand_fast_index_creation OFF +expire_logs_days 0 +explain_format TRADITIONAL +explicit_defaults_for_timestamp ON +flush OFF +flush_time 0 +foreign_key_checks ON +ft_boolean_syntax + -><()~*:""&| +ft_max_word_len 84 +ft_min_word_len 4 +ft_query_expansion_limit 20 +ft_query_extra_word_chars OFF +ft_stopword_file (built-in) +general_log ON +general_log_file genlog +generated_random_password_length 20 +global_connection_memory_limit 18446744073709551615 +global_connection_memory_tracking OFF +group_concat_max_len 1024 +group_replication_consistency EVENTUAL +gtid_executed +gtid_executed_compression_period 0 +gtid_mode OFF +gtid_owned +gtid_purged +have_backup_locks YES +have_backup_safe_binlog_info YES +have_compress YES +have_dynamic_loading YES +have_geometry YES +have_openssl YES +have_profiling YES +have_query_cache NO +have_rtree_keys YES +have_snapshot_cloning YES +have_ssl YES +have_statement_timeout YES +have_symlink DISABLED +histogram_generation_max_mem_size 20000000 +host_cache_size 279 +hostname s76 +information_schema_stats_expiry 86400 +init_connect +init_file /tmp/12345/mysql-init +init_replica +init_slave +innodb_adaptive_flushing ON +innodb_adaptive_flushing_lwm 10 +innodb_adaptive_hash_index ON +innodb_adaptive_hash_index_parts 8 +innodb_adaptive_max_sleep_delay 150000 +innodb_api_bk_commit_interval 5 +innodb_api_disable_rowlock OFF +innodb_api_enable_binlog OFF +innodb_api_enable_mdl OFF +innodb_api_trx_level 0 +innodb_autoextend_increment 64 +innodb_autoinc_lock_mode 2 +innodb_buffer_pool_chunk_size 16777216 +innodb_buffer_pool_dump_at_shutdown ON +innodb_buffer_pool_dump_now OFF +innodb_buffer_pool_dump_pct 25 +innodb_buffer_pool_filename ib_buffer_pool +innodb_buffer_pool_in_core_file ON +innodb_buffer_pool_instances 1 +innodb_buffer_pool_load_abort OFF +innodb_buffer_pool_load_at_startup ON +innodb_buffer_pool_load_now OFF +innodb_buffer_pool_size 16777216 +innodb_change_buffer_max_size 25 +innodb_change_buffering all +innodb_checksum_algorithm crc32 +innodb_cleaner_lsn_age_factor high_checkpoint +innodb_cmp_per_index_enabled OFF +innodb_commit_concurrency 0 +innodb_compressed_columns_threshold 96 +innodb_compressed_columns_zip_level 6 +innodb_compression_failure_threshold_pct 5 +innodb_compression_level 6 +innodb_compression_pad_pct_max 50 +innodb_concurrency_tickets 5000 +innodb_corrupt_table_action assert +innodb_data_file_path ibdata1:10M:autoextend +innodb_data_home_dir /tmp/12345/data +innodb_ddl_buffer_size 1048576 +innodb_ddl_threads 4 +innodb_deadlock_detect ON +innodb_dedicated_server OFF +innodb_default_row_format dynamic +innodb_directories +innodb_disable_sort_file_cache OFF +innodb_doublewrite ON +innodb_doublewrite_batch_size 0 +innodb_doublewrite_dir +innodb_doublewrite_files 2 +innodb_doublewrite_pages 4 +innodb_empty_free_list_algorithm legacy +innodb_encrypt_online_alter_logs OFF +innodb_extend_and_initialize ON +innodb_fast_shutdown 1 +innodb_file_per_table ON +innodb_fill_factor 100 +innodb_flush_log_at_timeout 1 +innodb_flush_log_at_trx_commit 1 +innodb_flush_method fsync +innodb_flush_neighbors 0 +innodb_flush_sync ON +innodb_flushing_avg_loops 30 +innodb_force_index_records_in_range 0 +innodb_force_load_corrupted OFF +innodb_force_recovery 0 +innodb_fsync_threshold 0 +innodb_ft_aux_table +innodb_ft_cache_size 8000000 +innodb_ft_enable_diag_print OFF +innodb_ft_enable_stopword ON +innodb_ft_ignore_stopwords OFF +innodb_ft_max_token_size 84 +innodb_ft_min_token_size 3 +innodb_ft_num_word_optimize 2000 +innodb_ft_result_cache_limit 2000000000 +innodb_ft_server_stopword_table +innodb_ft_sort_pll_degree 2 +innodb_ft_total_cache_size 640000000 +innodb_ft_user_stopword_table +innodb_idle_flush_pct 100 +innodb_io_capacity 200 +innodb_io_capacity_max 2000 +innodb_lock_wait_timeout 3 +innodb_log_buffer_size 16777216 +innodb_log_checksums ON +innodb_log_compressed_pages ON +innodb_log_file_size 5242880 +innodb_log_files_in_group 2 +innodb_log_group_home_dir /tmp/12345/data +innodb_log_spin_cpu_abs_lwm 80 +innodb_log_spin_cpu_pct_hwm 50 +innodb_log_wait_for_flush_spin_hwm 400 +innodb_log_write_ahead_size 8192 +innodb_log_writer_threads ON +innodb_lru_scan_depth 1024 +innodb_max_dirty_pages_pct 90.000000 +innodb_max_dirty_pages_pct_lwm 10.000000 +innodb_max_purge_lag 0 +innodb_max_purge_lag_delay 0 +innodb_max_undo_log_size 1073741824 +innodb_monitor_disable +innodb_monitor_enable +innodb_monitor_reset +innodb_monitor_reset_all +innodb_numa_interleave OFF +innodb_old_blocks_pct 37 +innodb_old_blocks_time 1000 +innodb_online_alter_log_max_size 134217728 +innodb_open_files 4000 +innodb_optimize_fulltext_only OFF +innodb_page_cleaners 1 +innodb_page_size 16384 +innodb_parallel_dblwr_encrypt OFF +innodb_parallel_doublewrite_path xb_doublewrite +innodb_parallel_read_threads 4 +innodb_print_all_deadlocks OFF +innodb_print_ddl_logs OFF +innodb_print_lock_wait_timeout_info OFF +innodb_purge_batch_size 300 +innodb_purge_rseg_truncate_frequency 128 +innodb_purge_threads 4 +innodb_random_read_ahead OFF +innodb_read_ahead_threshold 56 +innodb_read_io_threads 4 +innodb_read_only OFF +innodb_records_in_range 0 +innodb_redo_log_archive_dirs +innodb_redo_log_capacity 104857600 +innodb_redo_log_encrypt OFF +innodb_replication_delay 0 +innodb_rollback_on_timeout OFF +innodb_rollback_segments 128 +innodb_segment_reserve_factor 12.500000 +innodb_show_locks_held 10 +innodb_sort_buffer_size 1048576 +innodb_spin_wait_delay 6 +innodb_spin_wait_pause_multiplier 50 +innodb_stats_auto_recalc ON +innodb_stats_include_delete_marked OFF +innodb_stats_method nulls_equal +innodb_stats_on_metadata OFF +innodb_stats_persistent ON +innodb_stats_persistent_sample_pages 20 +innodb_stats_transient_sample_pages 8 +innodb_status_output OFF +innodb_status_output_locks OFF +innodb_strict_mode ON +innodb_sync_array_size 1 +innodb_sync_spin_loops 30 +innodb_sys_tablespace_encrypt OFF +innodb_table_locks ON +innodb_temp_data_file_path ibtmp1:12M:autoextend +innodb_temp_tablespace_encrypt OFF +innodb_temp_tablespaces_dir ./#innodb_temp/ +innodb_thread_concurrency 0 +innodb_thread_sleep_delay 10000 +innodb_tmpdir +innodb_undo_directory ./ +innodb_undo_log_encrypt OFF +innodb_undo_log_truncate ON +innodb_undo_tablespaces 2 +innodb_use_fdatasync OFF +innodb_use_native_aio ON +innodb_validate_tablespace_paths ON +innodb_version 8.0.32-24 +innodb_write_io_threads 4 +interactive_timeout 28800 +internal_tmp_mem_storage_engine TempTable +jemalloc_detected OFF +jemalloc_profiling OFF +join_buffer_size 262144 +keep_files_on_create OFF +key_buffer_size 5242880 +key_cache_age_threshold 300 +key_cache_block_size 1024 +key_cache_division_limit 100 +keyring_file_data /tmp/12345/data/keyring +keyring_operations ON +kill_idle_transaction 0 +large_files_support ON +large_page_size 0 +large_pages OFF +lc_messages en_US +lc_messages_dir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/share/ +lc_time_names en_US +license GPL +local_infile ON +lock_wait_timeout 31536000 +locked_in_memory OFF +log_bin ON +log_bin_basename /tmp/12345/data/mysql-bin +log_bin_index /tmp/12345/data/mysql-bin.index +log_bin_trust_function_creators OFF +log_bin_use_v1_row_events OFF +log_error /tmp/12345/data/mysqld.log +log_error_services log_filter_internal; log_sink_internal +log_error_suppression_list +log_error_verbosity 2 +log_output FILE +log_queries_not_using_indexes OFF +log_query_errors +log_raw OFF +log_replica_updates ON +log_slave_updates ON +log_slow_admin_statements ON +log_slow_extra OFF +log_slow_filter +log_slow_rate_limit 1 +log_slow_rate_type session +log_slow_replica_statements OFF +log_slow_slave_statements OFF +log_slow_sp_statements ON +log_slow_verbosity +log_statements_unsafe_for_binlog ON +log_throttle_queries_not_using_indexes 0 +log_timestamps UTC +long_query_time 0.000000 +low_priority_updates OFF +lower_case_file_system OFF +lower_case_table_names 0 +mandatory_roles +master_info_repository TABLE +master_verify_checksum OFF +max_allowed_packet 67108864 +max_binlog_cache_size 18446744073709547520 +max_binlog_size 1073741824 +max_binlog_stmt_cache_size 18446744073709547520 +max_connect_errors 100 +max_connections 151 +max_delayed_threads 20 +max_digest_length 1024 +max_error_count 1024 +max_execution_time 0 +max_heap_table_size 16777216 +max_insert_delayed_threads 20 +max_join_size 18446744073709551615 +max_length_for_sort_data 4096 +max_points_in_geometry 65536 +max_prepared_stmt_count 16382 +max_relay_log_size 0 +max_seeks_for_key 18446744073709551615 +max_slowlog_files 0 +max_slowlog_size 0 +max_sort_length 1024 +max_sp_recursion_depth 0 +max_user_connections 0 +max_write_lock_count 18446744073709551615 +min_examined_row_limit 0 +myisam_data_pointer_size 6 +myisam_max_sort_file_size 9223372036853727232 +myisam_mmap_size 18446744073709551615 +myisam_recover_options OFF +myisam_sort_buffer_size 8388608 +myisam_stats_method nulls_unequal +myisam_use_mmap OFF +mysql_native_password_proxy_users OFF +mysqlx_bind_address * +mysqlx_compression_algorithms DEFLATE_STREAM,LZ4_MESSAGE,ZSTD_STREAM +mysqlx_connect_timeout 30 +mysqlx_deflate_default_compression_level 3 +mysqlx_deflate_max_client_compression_level 5 +mysqlx_document_id_unique_prefix 0 +mysqlx_enable_hello_notice ON +mysqlx_idle_worker_thread_timeout 60 +mysqlx_interactive_timeout 28800 +mysqlx_lz4_default_compression_level 2 +mysqlx_lz4_max_client_compression_level 8 +mysqlx_max_allowed_packet 67108864 +mysqlx_max_connections 100 +mysqlx_min_worker_threads 2 +mysqlx_port 33060 +mysqlx_port_open_timeout 0 +mysqlx_read_timeout 30 +mysqlx_socket /tmp/mysqlx.sock +mysqlx_ssl_ca +mysqlx_ssl_capath +mysqlx_ssl_cert +mysqlx_ssl_cipher +mysqlx_ssl_crl +mysqlx_ssl_crlpath +mysqlx_ssl_key +mysqlx_wait_timeout 28800 +mysqlx_write_timeout 60 +mysqlx_zstd_default_compression_level 3 +mysqlx_zstd_max_client_compression_level 11 +net_buffer_length 16384 +net_buffer_shrink_interval 0 +net_read_timeout 30 +net_retry_count 10 +net_write_timeout 60 +new OFF +ngram_token_size 2 +offline_mode OFF +old OFF +old_alter_table OFF +open_files_limit 8161 +optimizer_max_subgraph_pairs 100000 +optimizer_prune_level 1 +optimizer_search_depth 62 +optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,use_invisible_indexes=off,skip_scan=on,hash_join=on,subquery_to_derived=off,prefer_ordering_index=on,hypergraph_optimizer=off,derived_condition_pushdown=on,favor_range_scan=off +optimizer_trace enabled=off,one_line=off +optimizer_trace_features greedy_search=on,range_optimizer=on,dynamic_range=on,repeated_subselect=on +optimizer_trace_limit 1 +optimizer_trace_max_mem_size 1048576 +optimizer_trace_offset -1 +parser_max_mem_size 18446744073709551615 +partial_revokes OFF +password_history 0 +password_require_current OFF +password_reuse_interval 0 +performance_schema ON +performance_schema_accounts_size -1 +performance_schema_digests_size 10000 +performance_schema_error_size 5335 +performance_schema_events_stages_history_long_size 10000 +performance_schema_events_stages_history_size 10 +performance_schema_events_statements_history_long_size 10000 +performance_schema_events_statements_history_size 10 +performance_schema_events_transactions_history_long_size 10000 +performance_schema_events_transactions_history_size 10 +performance_schema_events_waits_history_long_size 10000 +performance_schema_events_waits_history_size 10 +performance_schema_hosts_size -1 +performance_schema_max_cond_classes 150 +performance_schema_max_cond_instances -1 +performance_schema_max_digest_length 1024 +performance_schema_max_digest_sample_age 60 +performance_schema_max_file_classes 80 +performance_schema_max_file_handles 32768 +performance_schema_max_file_instances -1 +performance_schema_max_index_stat -1 +performance_schema_max_memory_classes 530 +performance_schema_max_metadata_locks -1 +performance_schema_max_mutex_classes 350 +performance_schema_max_mutex_instances -1 +performance_schema_max_prepared_statements_instances -1 +performance_schema_max_program_instances -1 +performance_schema_max_rwlock_classes 70 +performance_schema_max_rwlock_instances -1 +performance_schema_max_socket_classes 10 +performance_schema_max_socket_instances -1 +performance_schema_max_sql_text_length 1024 +performance_schema_max_stage_classes 175 +performance_schema_max_statement_classes 227 +performance_schema_max_statement_stack 10 +performance_schema_max_table_handles -1 +performance_schema_max_table_instances -1 +performance_schema_max_table_lock_stat -1 +performance_schema_max_thread_classes 100 +performance_schema_max_thread_instances -1 +performance_schema_session_connect_attrs_size 512 +performance_schema_setup_actors_size -1 +performance_schema_setup_objects_size -1 +performance_schema_show_processlist OFF +performance_schema_users_size -1 +persist_only_admin_x509_subject +persist_sensitive_variables_in_plaintext ON +persisted_globals_load ON +pid_file /tmp/12345/data/mysql_sandbox12345.pid +plugin_dir /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ +port 12345 +preload_buffer_size 32768 +print_identified_with_as_hex OFF +profiling OFF +profiling_history_size 15 +protocol_compression_algorithms zlib,zstd,uncompressed +protocol_version 10 +proxy_protocol_networks +query_alloc_block_size 8192 +query_prealloc_size 8192 +range_alloc_block_size 4096 +range_optimizer_max_mem_size 8388608 +rbr_exec_mode STRICT +read_buffer_size 131072 +read_only OFF +read_rnd_buffer_size 262144 +regexp_stack_limit 8000000 +regexp_time_limit 32 +relay_log mysql-relay-bin +relay_log_basename /tmp/12345/data/mysql-relay-bin +relay_log_index /tmp/12345/data/mysql-relay-bin.index +relay_log_info_file relay-log.info +relay_log_info_repository TABLE +relay_log_purge ON +relay_log_recovery OFF +relay_log_space_limit 0 +replica_allow_batching ON +replica_checkpoint_group 512 +replica_checkpoint_period 300 +replica_compressed_protocol OFF +replica_enable_event +replica_exec_mode STRICT +replica_load_tmpdir /tmp +replica_max_allowed_packet 1073741824 +replica_net_timeout 60 +replica_parallel_type LOGICAL_CLOCK +replica_parallel_workers 4 +replica_pending_jobs_size_max 134217728 +replica_preserve_commit_order ON +replica_skip_errors OFF +replica_sql_verify_checksum ON +replica_transaction_retries 10 +replica_type_conversions +replication_optimize_for_static_plugin_config OFF +replication_sender_observe_commit_only OFF +report_host 127.0.0.1 +report_password +report_port 12345 +report_user +require_secure_transport OFF +rocksdb_access_hint_on_compaction_start 1 +rocksdb_advise_random_on_open ON +rocksdb_allow_concurrent_memtable_write OFF +rocksdb_allow_mmap_reads OFF +rocksdb_allow_mmap_writes OFF +rocksdb_allow_to_start_after_corruption OFF +rocksdb_allow_unsafe_alter OFF +rocksdb_alter_column_default_inplace ON +rocksdb_blind_delete_primary_key OFF +rocksdb_block_cache_size 536870912 +rocksdb_block_restart_interval 16 +rocksdb_block_size 16384 +rocksdb_block_size_deviation 10 +rocksdb_bulk_load OFF +rocksdb_bulk_load_allow_sk OFF +rocksdb_bulk_load_allow_unsorted OFF +rocksdb_bulk_load_partial_index ON +rocksdb_bulk_load_size 1000 +rocksdb_bytes_per_sync 0 +rocksdb_cache_dump ON +rocksdb_cache_high_pri_pool_ratio 0.000000 +rocksdb_cache_index_and_filter_blocks ON +rocksdb_cache_index_and_filter_with_high_priority ON +rocksdb_cancel_manual_compactions OFF +rocksdb_checksums_pct 100 +rocksdb_collect_sst_properties ON +rocksdb_commit_in_the_middle OFF +rocksdb_commit_time_batch_for_recovery OFF +rocksdb_compact_cf +rocksdb_compaction_readahead_size 0 +rocksdb_compaction_sequential_deletes 0 +rocksdb_compaction_sequential_deletes_count_sd OFF +rocksdb_compaction_sequential_deletes_file_size 0 +rocksdb_compaction_sequential_deletes_window 0 +rocksdb_concurrent_prepare ON +rocksdb_create_checkpoint +rocksdb_create_if_missing ON +rocksdb_create_missing_column_families OFF +rocksdb_create_temporary_checkpoint +rocksdb_datadir ./.rocksdb +rocksdb_db_write_buffer_size 0 +rocksdb_deadlock_detect OFF +rocksdb_deadlock_detect_depth 50 +rocksdb_debug_cardinality_multiplier 2 +rocksdb_debug_manual_compaction_delay 0 +rocksdb_debug_optimizer_no_zero_cardinality ON +rocksdb_debug_ttl_ignore_pk OFF +rocksdb_debug_ttl_read_filter_ts 0 +rocksdb_debug_ttl_rec_ts 0 +rocksdb_debug_ttl_snapshot_ts 0 +rocksdb_default_cf_options block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true;compaction_pri=kMinOverlappingRatio;compression=kLZ4Compression;bottommost_compression=kLZ4Compression; +rocksdb_delayed_write_rate 0 +rocksdb_delete_cf +rocksdb_delete_obsolete_files_period_micros 21600000000 +rocksdb_disable_file_deletions OFF +rocksdb_enable_bulk_load_api ON +rocksdb_enable_insert_with_update_caching ON +rocksdb_enable_iterate_bounds ON +rocksdb_enable_pipelined_write OFF +rocksdb_enable_remove_orphaned_dropped_cfs ON +rocksdb_enable_thread_tracking ON +rocksdb_enable_tmp_table OFF +rocksdb_enable_ttl ON +rocksdb_enable_ttl_read_filtering ON +rocksdb_enable_write_thread_adaptive_yield OFF +rocksdb_error_if_exists OFF +rocksdb_error_on_suboptimal_collation OFF +rocksdb_fault_injection_options +rocksdb_flush_log_at_trx_commit 1 +rocksdb_force_compute_memtable_stats ON +rocksdb_force_compute_memtable_stats_cachetime 60000000 +rocksdb_force_flush_memtable_and_lzero_now OFF +rocksdb_force_flush_memtable_now ON +rocksdb_force_index_records_in_range 0 +rocksdb_fs_uri +rocksdb_ignore_unknown_options ON +rocksdb_index_type kBinarySearch +rocksdb_info_log_level error_level +rocksdb_instant_ddl OFF +rocksdb_is_fd_close_on_exec ON +rocksdb_keep_log_file_num 1000 +rocksdb_large_prefix ON +rocksdb_lock_scanned_rows OFF +rocksdb_lock_wait_timeout 1 +rocksdb_log_file_time_to_roll 0 +rocksdb_manifest_preallocation_size 4194304 +rocksdb_manual_compaction_bottommost_level kForceOptimized +rocksdb_manual_compaction_threads 0 +rocksdb_manual_wal_flush ON +rocksdb_master_skip_tx_api OFF +rocksdb_max_background_compactions -1 +rocksdb_max_background_flushes -1 +rocksdb_max_background_jobs 2 +rocksdb_max_bottom_pri_background_compactions 0 +rocksdb_max_compaction_history 64 +rocksdb_max_latest_deadlocks 5 +rocksdb_max_log_file_size 0 +rocksdb_max_manifest_file_size 1073741824 +rocksdb_max_manual_compactions 10 +rocksdb_max_open_files 4080 +rocksdb_max_row_locks 1048576 +rocksdb_max_subcompactions 1 +rocksdb_max_total_wal_size 2147483648 +rocksdb_merge_buf_size 67108864 +rocksdb_merge_combine_read_size 1073741824 +rocksdb_merge_tmp_file_removal_delay_ms 0 +rocksdb_no_block_cache OFF +rocksdb_no_create_column_family OFF +rocksdb_override_cf_options +rocksdb_paranoid_checks ON +rocksdb_partial_index_sort_max_mem 0 +rocksdb_pause_background_work OFF +rocksdb_perf_context_level 0 +rocksdb_persistent_cache_path +rocksdb_persistent_cache_size_mb 0 +rocksdb_pin_l0_filter_and_index_blocks_in_cache ON +rocksdb_print_snapshot_conflict_queries OFF +rocksdb_rate_limiter_bytes_per_sec 0 +rocksdb_read_free_rpl OFF +rocksdb_read_free_rpl_tables .* +rocksdb_records_in_range 0 +rocksdb_reset_stats OFF +rocksdb_rollback_on_timeout OFF +rocksdb_rpl_skip_tx_api OFF +rocksdb_seconds_between_stat_computes 3600 +rocksdb_signal_drop_index_thread OFF +rocksdb_sim_cache_size 0 +rocksdb_skip_bloom_filter_on_read OFF +rocksdb_skip_fill_cache OFF +rocksdb_skip_locks_if_skip_unique_check OFF +rocksdb_sst_mgr_rate_bytes_per_sec 0 +rocksdb_stats_dump_period_sec 600 +rocksdb_stats_level 1 +rocksdb_stats_recalc_rate 0 +rocksdb_store_row_debug_checksums OFF +rocksdb_strict_collation_check ON +rocksdb_strict_collation_exceptions +rocksdb_table_cache_numshardbits 6 +rocksdb_table_stats_background_thread_nice_value 19 +rocksdb_table_stats_max_num_rows_scanned 0 +rocksdb_table_stats_recalc_threshold_count 100 +rocksdb_table_stats_recalc_threshold_pct 10 +rocksdb_table_stats_sampling_pct 10 +rocksdb_table_stats_use_table_scan OFF +rocksdb_tmpdir +rocksdb_trace_block_cache_access +rocksdb_trace_queries +rocksdb_trace_sst_api OFF +rocksdb_track_and_verify_wals_in_manifest ON +rocksdb_two_write_queues ON +rocksdb_unsafe_for_binlog OFF +rocksdb_update_cf_options +rocksdb_use_adaptive_mutex OFF +rocksdb_use_default_sk_cf OFF +rocksdb_use_direct_io_for_flush_and_compaction OFF +rocksdb_use_direct_reads OFF +rocksdb_use_fsync OFF +rocksdb_validate_tables 1 +rocksdb_verify_row_debug_checksums OFF +rocksdb_wal_bytes_per_sync 0 +rocksdb_wal_dir +rocksdb_wal_recovery_mode 2 +rocksdb_wal_size_limit_mb 0 +rocksdb_wal_ttl_seconds 0 +rocksdb_whole_key_filtering ON +rocksdb_write_batch_flush_threshold 0 +rocksdb_write_batch_max_bytes 0 +rocksdb_write_disable_wal OFF +rocksdb_write_ignore_missing_column_families OFF +rocksdb_write_policy write_committed +rocksdb_wsenv_path +rpl_read_size 8192 +rpl_stop_replica_timeout 31536000 +rpl_stop_slave_timeout 31536000 +schema_definition_cache 256 +secondary_engine_cost_threshold 100000.000000 +secure_file_priv +secure_log_path +select_into_buffer_size 131072 +select_into_disk_sync OFF +select_into_disk_sync_delay 0 +server_id 12345 +server_id_bits 32 +server_uuid 034c9da9-20c0-11ee-a7f4-7404f1a10a4a +session_track_gtids OFF +session_track_schema ON +session_track_state_change OFF +session_track_system_variables time_zone,autocommit,character_set_client,character_set_results,character_set_connection +session_track_transaction_info OFF +sha256_password_auto_generate_rsa_keys ON +sha256_password_private_key_path private_key.pem +sha256_password_proxy_users OFF +sha256_password_public_key_path public_key.pem +show_create_table_verbosity OFF +show_gipk_in_create_table_and_information_schema ON +show_old_temporals OFF +skip_external_locking ON +skip_name_resolve OFF +skip_networking OFF +skip_replica_start OFF +skip_show_database OFF +skip_slave_start OFF +slave_allow_batching ON +slave_checkpoint_group 512 +slave_checkpoint_period 300 +slave_compressed_protocol OFF +slave_exec_mode STRICT +slave_load_tmpdir /tmp +slave_max_allowed_packet 1073741824 +slave_net_timeout 60 +slave_parallel_type LOGICAL_CLOCK +slave_parallel_workers 4 +slave_pending_jobs_size_max 134217728 +slave_preserve_commit_order ON +slave_rows_search_algorithms INDEX_SCAN,HASH_SCAN +slave_skip_errors OFF +slave_sql_verify_checksum ON +slave_transaction_retries 10 +slave_type_conversions +slow_launch_time 2 +slow_query_log ON +slow_query_log_always_write_time 10.000000 +slow_query_log_file /tmp/12345/data/slow.log +slow_query_log_use_global_control +socket /tmp/12345/mysql_sandbox12345.sock +sort_buffer_size 262144 +source_verify_checksum OFF +sql_auto_is_null OFF +sql_big_selects ON +sql_buffer_result OFF +sql_generate_invisible_primary_key OFF +sql_log_off OFF +sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION +sql_notes ON +sql_quote_show_create ON +sql_replica_skip_counter 0 +sql_require_primary_key OFF +sql_safe_updates OFF +sql_select_limit 18446744073709551615 +sql_slave_skip_counter 0 +sql_warnings OFF +ssl_ca ca.pem +ssl_capath +ssl_cert server-cert.pem +ssl_cipher +ssl_crl +ssl_crlpath +ssl_fips_mode OFF +ssl_key server-key.pem +ssl_session_cache_mode ON +ssl_session_cache_timeout 300 +stored_program_cache 256 +stored_program_definition_cache 256 +super_read_only OFF +sync_binlog 1 +sync_master_info 10000 +sync_relay_log 10000 +sync_relay_log_info 10000 +sync_source_info 10000 +system_time_zone +03 +table_definition_cache 2000 +table_encryption_privilege_check OFF +table_open_cache 4000 +table_open_cache_instances 16 +table_open_cache_triggers 524288 +tablespace_definition_cache 256 +temptable_max_mmap 1073741824 +temptable_max_ram 1073741824 +temptable_use_mmap ON +terminology_use_previous NONE +tf_sequence_table_max_upper_bound 1048576 +thread_cache_size 9 +thread_handling one-thread-per-connection +thread_pool_high_prio_mode transactions +thread_pool_high_prio_tickets 4294967295 +thread_pool_idle_timeout 60 +thread_pool_max_threads 100000 +thread_pool_oversubscribe 3 +thread_pool_size 16 +thread_pool_stall_limit 500 +thread_stack 1048576 +thread_statistics OFF +time_zone SYSTEM +tls_ciphersuites +tls_version TLSv1.2,TLSv1.3 +tmp_table_size 16777216 +tmpdir /tmp +transaction_alloc_block_size 8192 +transaction_isolation REPEATABLE-READ +transaction_prealloc_size 4096 +transaction_read_only OFF +transaction_write_set_extraction XXHASH64 +unique_checks ON +updatable_views_with_limit YES +userstat OFF +version 8.0.32-24 +version_comment Percona Server (GPL), Release 24, Revision e5c6e9d2 +version_compile_machine x86_64 +version_compile_os Linux +version_compile_zlib 1.2.13 +version_suffix +wait_timeout 28800 +windowing_use_high_precision ON +xa_detach_on_prepare ON +internal::nice_of_1089375 0 +internal::oom_of_1089375 0 +internal::nice_of_1089193 0 +internal::oom_of_1089193 0 +internal::nice_of_1088931 0 +internal::oom_of_1088931 0 +pt-summary-internal-pid_file_exists 1 +pt-summary-internal-current_time 2023-07-12 17:25 +pt-summary-internal-Config_File_path /tmp/12345/my.sandbox.cnf +pt-summary-internal-mysql_executable /usr/bin/mysql +pt-summary-internal-now 2023-07-14 17:54:34 +pt-summary-internal-user msandbox@% +pt-summary-internal-FNV_64 Unknown +pt-summary-internal-trigger_count 5 +pt-summary-internal-mysqld_executable_1 Yes +pt-summary-internal-jemalloc_enabled_for_pid_1089375 1 +pt-summary-internal-jemalloc_enabled_for_pid_1089193 1 +pt-summary-internal-jemalloc_enabled_for_pid_1088931 1 +pt-summary-internal-jemalloc_location /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysqld-executables b/t/pt-mysql-summary/samples/temp_enc009/mysqld-executables new file mode 100644 index 000000000..b2851c789 --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysqld-executables @@ -0,0 +1 @@ +/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld diff --git a/t/pt-mysql-summary/samples/temp_enc009/mysqld-instances b/t/pt-mysql-summary/samples/temp_enc009/mysqld-instances new file mode 100644 index 000000000..5bdf5aacd --- /dev/null +++ b/t/pt-mysql-summary/samples/temp_enc009/mysqld-instances @@ -0,0 +1,4 @@ + PID TTY STAT TIME COMMAND +1088931 pts/5 Sl 11:30 /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld --defaults-file=/tmp/12345/my.sandbox.cnf -u root --init-file /tmp/12345/mysql-init --plugin-dir=/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ --early-plugin-load=keyring_file.so --loose-keyring_file_data=/tmp/12345/data/keyring +1089193 pts/5 Sl 11:30 /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld --defaults-file=/tmp/12346/my.sandbox.cnf -u root --init-file /tmp/12346/mysql-init --plugin-dir=/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ --early-plugin-load=keyring_file.so --loose-keyring_file_data=/tmp/12346/data/keyring +1089375 pts/5 Sl 11:21 /home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/bin/mysqld --defaults-file=/tmp/12347/my.sandbox.cnf -u root --init-file /tmp/12347/mysql-init --plugin-dir=/home/sveta/mysqlpackages/Percona-Server-8.0.32-24-Linux.x86_64.glibc2.35/lib/plugin/ --early-plugin-load=keyring_file.so --loose-keyring_file_data=/tmp/12347/data/keyring diff --git a/t/pt-mysql-summary/samples/temp_enc009/ndb-status b/t/pt-mysql-summary/samples/temp_enc009/ndb-status new file mode 100644 index 000000000..e69de29bb diff --git a/t/pt-online-schema-change/basics.t b/t/pt-online-schema-change/basics.t index d596ee4e7..3370d1ce8 100644 --- a/t/pt-online-schema-change/basics.t +++ b/t/pt-online-schema-change/basics.t @@ -832,46 +832,50 @@ test_alter_table( # --recursion-method=dns (lp: 1523685) # ############################################################################# -$sb->load_file('master', "$sample/create_dsns.sql"); +SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); -($output, $exit) = full_output( - sub { pt_online_schema_change::main(@args, - "$dsn,D=sakila,t=actor", ('--recursion-method=dsn=D=test_recursion_method,t=dsns,h=127.0.0.1,P=12345,u=msandbox,p=msandbox', - '--alter-foreign-keys-method', 'rebuild_constraints', '--execute', '--alter', 'ENGINE=InnoDB')) - }, - stderr => 1, -); + $sb->load_file('master', "$sample/create_dsns.sql"); -like( + ($output, $exit) = full_output( + sub { pt_online_schema_change::main(@args, + "$dsn,D=sakila,t=actor", ('--recursion-method=dsn=D=test_recursion_method,t=dsns,h=127.0.0.1,P=12345,u=msandbox,p=msandbox', + '--alter-foreign-keys-method', 'rebuild_constraints', '--execute', '--alter', 'ENGINE=InnoDB')) + }, + stderr => 1, + ); + + like( $output, qr/Found 2 slaves.*Successfully altered/si, "--recursion-method=dns works" -); + ); -$master_dbh->do("DROP DATABASE test_recursion_method"); + $master_dbh->do("DROP DATABASE test_recursion_method"); -diag("Reloading sakila"); -my $master_port = $sb->port_for('master'); -system "$trunk/sandbox/load-sakila-db $master_port"; -$sb->wait_for_slaves(); + diag("Reloading sakila"); + my $master_port = $sb->port_for('master'); + system "$trunk/sandbox/load-sakila-db $master_port"; + $sb->wait_for_slaves(); -$sb->do_as_root("slave1", q/CREATE USER 'slave_user'@'%' IDENTIFIED BY 'slave_password'/); -$sb->do_as_root("slave1", q/GRANT SELECT, INSERT, UPDATE, SUPER, REPLICATION SLAVE ON *.* TO 'slave_user'@'%'/); + $sb->do_as_root("slave1", q/CREATE USER 'slave_user'@'%' IDENTIFIED BY 'slave_password'/); + $sb->do_as_root("slave1", q/GRANT SELECT, INSERT, UPDATE, SUPER, REPLICATION SLAVE ON *.* TO 'slave_user'@'%'/); -test_alter_table( - name => "--slave-user --slave-password", - file => "basic_no_fks_innodb.sql", - table => "pt_osc.t", - test_type => "add_col", - new_col => "bar", - cmds => [ - qw(--execute --slave-user slave_user --slave-password slave_password), '--alter', 'ADD COLUMN bar INT', - ], -); + test_alter_table( + name => "--slave-user --slave-password", + file => "basic_no_fks_innodb.sql", + table => "pt_osc.t", + test_type => "add_col", + new_col => "bar", + cmds => [ + qw(--execute --slave-user slave_user --slave-password slave_password), '--alter', 'ADD COLUMN bar INT', + ], + ); + $sb->do_as_root("slave1", q/DROP USER 'slave_user'@'%'/); +} # ############################################################################# # Done. # ############################################################################# -$sb->do_as_root("slave1", q/DROP USER 'slave_user'@'%'/); $sb->wipe_clean($master_dbh); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); diff --git a/t/pt-online-schema-change/bugs.t b/t/pt-online-schema-change/bugs.t index afc250c48..b4a378312 100644 --- a/t/pt-online-schema-change/bugs.t +++ b/t/pt-online-schema-change/bugs.t @@ -288,14 +288,20 @@ $sb->load_file('master', "$sample/del-trg-bug-1062324.sql"); "No delete trigger error after altering PK (bug 1062324)" ) or diag($output); - # The original row was (c1,c2,c3) = (1,1,1). We deleted where c1=1, - # so the row where c2=1 AND c3=1 should no longer exist. - my $row = $master_dbh->selectrow_arrayref("SELECT * FROM test._t1_new WHERE c2=1 AND c3=1"); - is( - $row, - undef, - "Delete trigger works after altering PK (bug 1062324)" - ); + my $row; + + SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); + + # The original row was (c1,c2,c3) = (1,1,1). We deleted where c1=1, + # so the row where c2=1 AND c3=1 should no longer exist. + my $row = $master_dbh->selectrow_arrayref("SELECT * FROM test._t1_new WHERE c2=1 AND c3=1"); + is( + $row, + undef, + "Delete trigger works after altering PK (bug 1062324)" + ); + } # Another instance of this bug: # https://bugs.launchpad.net/percona-toolkit/+bug/1103672 @@ -669,24 +675,28 @@ $master_dbh->do("DROP DATABASE IF EXISTS test"); # Test for --skip-check-slave-lag # Use the same files from previous test because for this test we are going to # run a nonop so, any file will work -$master_dbh->do("DROP DATABASE IF EXISTS test"); - -$sb->load_file('master', "$sample/bug-1613915.sql"); -$output = output( - sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=o1", - '--execute', - '--alter', "ENGINE=INNODB", - '--skip-check-slave-lag', "h=127.0.0.1,P=".$sb->port_for('slave1'), - ), - }, -); +SKIP: { + skip 'Not for PXC' if ( $sb->is_cluster_mode ); + + $master_dbh->do("DROP DATABASE IF EXISTS test"); + + $sb->load_file('master', "$sample/bug-1613915.sql"); + $output = output( + sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=o1", + '--execute', + '--alter', "ENGINE=INNODB", + '--skip-check-slave-lag', "h=127.0.0.1,P=".$sb->port_for('slave1'), + ), + }, + ); -my $skipping_str = "Skipping.*".$sb->port_for('slave1'); -like( - $output, - qr/$skipping_str/s, - "--skip-check-slave-lag", -); + my $skipping_str = "Skipping.*".$sb->port_for('slave1'); + like( + $output, + qr/$skipping_str/s, + "--skip-check-slave-lag", + ); +} # Use the same data than the previous test $master_dbh->do("DROP DATABASE IF EXISTS test"); diff --git a/t/pt-online-schema-change/charset.t b/t/pt-online-schema-change/charset.t index 8208aa957..ca3c54973 100644 --- a/t/pt-online-schema-change/charset.t +++ b/t/pt-online-schema-change/charset.t @@ -28,6 +28,9 @@ if ( !$master_dbh ) { elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave1'; } +elsif ($sb->is_cluster_mode) { + plan skip_all => 'Not for PXC'; +} # The sandbox servers run with lock_wait_timeout=3 and it's not dynamic # so we need to specify --set-vars innodb_lock_wait_timeout=3 else the diff --git a/t/pt-online-schema-change/cleanup.t b/t/pt-online-schema-change/cleanup.t index acbcb01b4..050b99124 100644 --- a/t/pt-online-schema-change/cleanup.t +++ b/t/pt-online-schema-change/cleanup.t @@ -33,6 +33,9 @@ if ( !$dbh1 || !$dbh2 ) { elsif ( $sandbox_version lt '5.5' ) { plan skip_all => "Metadata locks require MySQL 5.5 and newer"; } +elsif ($sb->is_cluster_mode) { + plan skip_all => 'Not for PXC'; +} my $output; my $master_dsn = $sb->dsn_for('master'); diff --git a/t/pt-online-schema-change/metadata_locks.t b/t/pt-online-schema-change/metadata_locks.t index ae6684129..60143789a 100644 --- a/t/pt-online-schema-change/metadata_locks.t +++ b/t/pt-online-schema-change/metadata_locks.t @@ -33,6 +33,9 @@ if ( !$dbh1 || !$dbh2 ) { elsif ( $sandbox_version lt '5.5' ) { plan skip_all => "Metadata locks require MySQL 5.5 and newer"; } +elsif ($sb->is_cluster_mode) { + plan skip_all => 'Not for PXC'; +} my $output; my $master_dsn = $sb->dsn_for('master'); diff --git a/t/pt-online-schema-change/pt-1455.t b/t/pt-online-schema-change/pt-1455.t index e60783e47..c65711108 100644 --- a/t/pt-online-schema-change/pt-1455.t +++ b/t/pt-online-schema-change/pt-1455.t @@ -25,8 +25,6 @@ if ($ENV{PERCONA_SLOW_BOX}) { plan skip_all => 'This test needs a fast machine'; } elsif ($sandbox_version lt '5.7') { plan skip_all => 'This tests needs MySQL 5.7+'; -} else { - plan tests => 3; } require "$trunk/bin/pt-online-schema-change"; @@ -34,6 +32,12 @@ require "$trunk/bin/pt-online-schema-change"; my $dp = new DSNParser(opts=>$dsn_opts); my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); +if ($sb->is_cluster_mode) { + plan skip_all => 'Not for PXC'; +} else { + plan tests => 3; +} + my $master_dbh = $sb->get_dbh_for("master"); my $master_dsn = $sb->dsn_for("master"); diff --git a/t/pt-online-schema-change/pt-1919.t b/t/pt-online-schema-change/pt-1919.t index 3fe14f179..014863efd 100644 --- a/t/pt-online-schema-change/pt-1919.t +++ b/t/pt-online-schema-change/pt-1919.t @@ -36,6 +36,9 @@ if ( !$master_dbh ) { elsif ( !$slave_dbh ) { plan skip_all => 'Cannot connect to sandbox slave'; } +elsif ($sb->is_cluster_mode) { + plan skip_all => 'Not for PXC'; +} my $q = new Quoter(); my $tp = new TableParser(Quoter => $q); diff --git a/t/pt-online-schema-change/samples/stats-execute.txt b/t/pt-online-schema-change/samples/stats-execute.txt index 47e7cd677..aeb313442 100644 --- a/t/pt-online-schema-change/samples/stats-execute.txt +++ b/t/pt-online-schema-change/samples/stats-execute.txt @@ -10,10 +10,9 @@ Operation, tries, wait: Altering `bug_1045317`.`bits`... TS Dropping triggers... TS Dropped triggers OK. -# Event Count -# ================== ===== -# INSERT 1 -# mysql_warning_1592 1 +# Event Count +# ====== ===== +# INSERT 1 Successfully altered `bug_1045317`.`bits`. Creating new table... Created new table bug_1045317._bits_new OK. diff --git a/t/pt-online-schema-change/slave_lag.t b/t/pt-online-schema-change/slave_lag.t index c57085850..0d9cae971 100644 --- a/t/pt-online-schema-change/slave_lag.t +++ b/t/pt-online-schema-change/slave_lag.t @@ -21,9 +21,7 @@ use File::Temp qw/ tempdir tempfile /; if ($ENV{PERCONA_SLOW_BOX}) { plan skip_all => 'This test needs a fast machine'; -} else { - plan tests => 6; -} +} our $delay = 30; @@ -35,6 +33,11 @@ require "$trunk/bin/pt-online-schema-change"; my $dp = new DSNParser(opts=>$dsn_opts); my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp); +if ($sb->is_cluster_mode) { + plan skip_all => 'Not for PXC'; +} else { + plan tests => 6; +} my $master_dbh = $sb->get_dbh_for('master'); my $slave_dbh = $sb->get_dbh_for('slave1'); my $master_dsn = 'h=127.0.0.1,P=12345,u=msandbox,p=msandbox'; diff --git a/t/pt-table-checksum/pt-1728.t b/t/pt-table-checksum/pt-1728.t index 329874766..d7e584f78 100644 --- a/t/pt-table-checksum/pt-1728.t +++ b/t/pt-table-checksum/pt-1728.t @@ -75,7 +75,6 @@ $output = output( stderr => 1, ); -diag($output); unlike( $output, qr/Can't use an undefined value as an ARRAY/, diff --git a/util/test-bash-functions b/util/test-bash-functions index 536391581..a850cc62e 100755 --- a/util/test-bash-functions +++ b/util/test-bash-functions @@ -8,6 +8,7 @@ # Standard startup, find the branch's root directory # ############################################################################ LANG='en_US.UTF-8' +LC_NUMERIC='POSIX' die() { echo $1 >&2