MySQL 9.1.0
Source Code Documentation
|
#include "my_config.h"
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string>
#include <unordered_map>
#include "client/include/client_priv.h"
#include "client/multi_option.h"
#include "compression.h"
#include "m_string.h"
#include "map_helpers.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_default.h"
#include "my_hostname.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_macros.h"
#include "my_sys.h"
#include "my_systime.h"
#include "my_user.h"
#include "mysql.h"
#include "mysql/service_mysql_alloc.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_version.h"
#include "mysqld_error.h"
#include "nulls.h"
#include "prealloced_array.h"
#include "print_version.h"
#include "scope_guard.h"
#include "string_with_len.h"
#include "strmake.h"
#include "strxmov.h"
#include "template_utils.h"
#include "typelib.h"
#include "welcome_copyright_notice.h"
#include "client/include/authentication_kerberos_clientopt-vars.h"
#include "client/include/caching_sha2_passwordopt-vars.h"
#include "client/include/multi_factor_passwordopt-vars.h"
#include "client/include/sslopt-vars.h"
#include "client/include/multi_factor_passwordopt-longopts.h"
#include "client/include/caching_sha2_passwordopt-longopts.h"
#include "client/include/sslopt-longopts.h"
#include "client/include/authentication_kerberos_clientopt-longopts.h"
#include "client/include/sslopt-case.h"
#include "client/include/authentication_kerberos_clientopt-case.h"
Macros | |
#define | DUMP_VERSION "10.13" |
#define | EX_USAGE 1 |
#define | EX_MYSQLERR 2 |
#define | EX_CONSCHECK 3 |
#define | EX_EOM 4 |
#define | EX_EOF 5 /* ferror for output file was got */ |
#define | EX_ILLEGAL_TABLE 6 |
#define | SHOW_FIELDNAME 0 |
#define | SHOW_TYPE 1 |
#define | SHOW_NULL 2 |
#define | SHOW_DEFAULT 4 |
#define | SHOW_EXTRA 5 |
#define | QUERY_LENGTH 1536 |
#define | COMMENT_LENGTH 2048 |
#define | IGNORE_NONE 0x00 /* no ignore */ |
#define | IGNORE_DATA 0x01 /* don't dump data for this table */ |
#define | MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8mb4" |
#define | MAX_FIELDS 4000 |
#define | LONG_TIMEOUT (3600UL * 24UL * 365UL) |
#define | FIRST_COLUMN_STATISTICS_VERSION 80002 |
#define | FIRST_REPLICA_COMMAND_VERSION 80023 |
#define | FIRST_SOURCE_COMMAND_VERSION 80200 |
#define | MYSQL_OPT_SOURCE_DATA_EFFECTIVE_SQL 1 |
#define | MYSQL_OPT_SOURCE_DATA_COMMENTED_SQL 2 |
#define | MYSQL_OPT_REPLICA_DATA_EFFECTIVE_SQL 1 |
#define | MYSQL_OPT_REPLICA_DATA_COMMENTED_SQL 2 |
#define | DYNAMIC_STR_ERROR_MSG "Couldn't perform DYNAMIC_STRING operation" |
Enumerations | |
enum | enum_set_gtid_purged_mode { SET_GTID_PURGED_OFF = 0 , SET_GTID_PURGED_AUTO = 1 , SET_GTID_PURGED_ON = 2 , SET_GTID_PURGED_COMMENTED = 3 } |
enum class | Output_as_version_mode { SERVER = 0 , BEFORE_8_0_23 = 1 , BEFORE_8_2_0 = 2 } |
Functions | |
static void | add_load_option (DYNAMIC_STRING *str, const char *option, const char *option_value) |
static char * | alloc_query_str (size_t size) |
static void | field_escape (DYNAMIC_STRING *in, const char *from) |
static int | parse_ignore_error () |
Parse the list of error numbers to be ignored and store into a dynamic array. More... | |
static void | init_dynamic_string_checked (DYNAMIC_STRING *str, const char *init_str, size_t init_alloc) |
static void | dynstr_append_checked (DYNAMIC_STRING *dest, const char *src) |
static void | dynstr_set_checked (DYNAMIC_STRING *str, const char *init_str) |
static void | dynstr_append_mem_checked (DYNAMIC_STRING *str, const char *append, size_t length) |
static void | dynstr_realloc_checked (DYNAMIC_STRING *str, size_t additional_size) |
static void | maybe_exit (int error) |
static void | die (int error, const char *reason,...) |
static void | maybe_die (int error, const char *reason,...) |
static void | write_header (FILE *sql_file, char *db_name) |
static void | print_value (FILE *file, MYSQL_RES *result, MYSQL_ROW row, const char *prefix, const char *name, int string_value) |
static int | dump_selected_tables (char *db, char **table_names, int tables) |
static int | dump_all_tables_in_db (char *db) |
static int | init_dumping_views (char *) |
static int | init_dumping_tables (char *) |
static int | init_dumping (char *, int init_func(char *)) |
static int | dump_databases (char **) |
static int | dump_all_databases () |
static char * | quote_name (char *name, char *buff, bool force) |
static const char * | quote_name (const char *name, char *buff, bool force) |
char | check_if_ignore_table (const char *table_name, char *table_type) |
bool | is_infoschema_db (const char *db) |
Check if the database is 'information_schema' and write a verbose message stating that dumping the database is not supported. More... | |
static char * | primary_key_fields (const char *table_name) |
static bool | get_view_structure (char *table, char *db) |
static bool | dump_all_views_in_db (char *database) |
static bool | get_gtid_mode (MYSQL *mysql_con) |
This function checks if GTIDs are enabled on the server. More... | |
static Output_as_version_mode | get_output_as_version_mode () |
This function checks what should be the outputted terminology according to the server version. More... | |
static int | set_terminology_use_previous_session_value (MYSQL *mysql_con, Output_as_version_mode mode_to_set) |
This method will set depending on the arguments given the server value for terminology_use_previous. More... | |
static int | dump_all_tablespaces () |
static int | dump_tablespaces_for_tables (char *db, char **table_names, int tables) |
static int | dump_tablespaces_for_databases (char **databases) |
static int | dump_tablespaces (char *ts_where) |
static void | print_comment (FILE *sql_file, bool is_error, const char *format,...) |
static void | verbose_msg (const char *fmt,...) |
static char const * | fix_identifier_with_newline (char const *object_name, bool *freemem) |
Accepts object names and prefixes them with "-- " wherever end-of-line character (' ') is found. More... | |
static string | get_compatible_rpl_source_query (string command) |
static string | get_compatible_rpl_replica_query (string command) |
static string | get_compatible_rpl_replica_command (string command) |
static void | check_io (FILE *file) |
static void | short_usage_sub (void) |
static void | usage (void) |
static void | short_usage (void) |
static void | get_safe_server_info (char *safe_server_info, size_t safe_server_info_len) |
static void | write_footer (FILE *sql_file) |
static bool | get_one_option (int optid, const struct my_option *opt, char *argument) |
static int | get_options (int *argc, char ***argv) |
static void | DB_error (MYSQL *mysql_arg, const char *when) |
static int | mysql_query_with_error_report (MYSQL *mysql_con, MYSQL_RES **res, const char *query) |
static int | fetch_db_collation (const char *db_name, char *db_cl_name, int db_cl_size) |
static char * | my_case_str (char *str, size_t str_len, const char *token, size_t token_len) |
static int | switch_db_collation (FILE *sql_file, const char *db_name, const char *delimiter, const char *current_db_cl_name, const char *required_db_cl_name, int *db_cl_altered) |
static int | restore_db_collation (FILE *sql_file, const char *db_name, const char *delimiter, const char *db_cl_name) |
static void | switch_cs_variables (FILE *sql_file, const char *delimiter, const char *character_set_client, const char *character_set_results, const char *collation_connection) |
static void | restore_cs_variables (FILE *sql_file, const char *delimiter) |
static void | switch_sql_mode (FILE *sql_file, const char *delimiter, const char *sql_mode) |
static void | restore_sql_mode (FILE *sql_file, const char *delimiter) |
static void | switch_time_zone (FILE *sql_file, const char *delimiter, const char *time_zone) |
static void | restore_time_zone (FILE *sql_file, const char *delimiter) |
static int | switch_character_set_results (MYSQL *mysql, const char *cs_name) |
Switch charset for results to some specified charset. More... | |
static char * | cover_definer_clause (char *stmt_str, size_t stmt_length, const char *definer_version_str, size_t definer_version_length, const char *stmt_version_str, size_t stmt_version_length, const char *keyword_str, size_t keyword_length) |
Rewrite statement, enclosing DEFINER clause in version-specific comment. More... | |
static FILE * | open_sql_file_for_table (const char *table, int flags) |
static void | free_resources () |
static bool | do_ignore_error () |
Check if the last error should be ignored. More... | |
static int | connect_to_db (char *host, char *user) |
static void | dbDisconnect (char *host) |
static void | unescape (FILE *file, char *pos, size_t length) |
static bool | test_if_special_chars (const char *str) |
static char * | quote_for_like (const char *name, char *buff) |
static void | print_quoted_xml (FILE *xml_file, const char *str, size_t len, bool is_attribute_name) |
Quote and print a string. More... | |
static void | print_xml_tag (FILE *xml_file, const char *sbeg, const char *line_end, const char *tag_name, const char *first_attribute_name,...) |
static void | print_xml_null_tag (FILE *xml_file, const char *sbeg, const char *stag_atr, const char *sval, const char *line_end) |
static void | print_xml_cdata (FILE *xml_file, const char *str, ulong len) |
Print xml CDATA section. More... | |
static void | print_xml_row (FILE *xml_file, const char *row_name, MYSQL_RES *tableRes, MYSQL_ROW *row, const char *str_create) |
static void | print_xml_comment (FILE *xml_file, size_t len, const char *comment_string) |
Print xml comments. More... | |
static char * | create_delimiter (char *query, char *delimiter_buff, int delimiter_max_size) |
static void | fprintf_string (char *row, ulong row_len, char quote, bool needs_newline) |
static bool | is_string_integer (const char *str, ulong str_len) |
static uint | dump_events_for_db (char *db) |
static void | print_blob_as_hex (FILE *output_file, const char *str, ulong len) |
static uint | dump_routines_for_db (char *db) |
static bool | general_log_or_slow_log_tables (const char *db, const char *table) |
static bool | replication_metadata_tables (const char *db, const char *table) |
static bool | innodb_stats_tables (const char *db, const char *table) |
Check if the table is innodb stats table in mysql database. More... | |
static bool | is_innodb_stats_tables_included (int argc, char **argv) |
Check if the command line option includes innodb stats table or in any way mysql database. More... | |
static uint | get_table_structure (const char *table, char *db, char *table_type, char *ignore_flag, bool real_columns[], std::string *column_list) |
static void | dump_trigger_old (FILE *sql_file, MYSQL_RES *show_triggers_rs, MYSQL_ROW *show_trigger_row, const char *table_name) |
static int | dump_trigger (FILE *sql_file, MYSQL_RES *show_create_trigger_rs, const char *db_name, const char *db_cl_name) |
static int | dump_triggers_for_table (char *table_name, char *db_name) |
Dump the triggers for a given table. More... | |
static bool | dump_column_statistics_for_table (char *table_name, char *db_name) |
static void | dump_table (char *table, char *db) |
static char * | getTableName (int reset) |
static int | is_ndbinfo (MYSQL *mysql, const char *dbname) |
static bool | include_table (const char *hash_key, size_t len) |
static char * | get_actual_table_name (const char *old_table_name, MEM_ROOT *root) |
static int | do_show_binary_log_status (MYSQL *mysql_con) |
static int | do_stop_replica_sql (MYSQL *mysql_con) |
static int | add_stop_replica (void) |
static int | add_replica_statements (void) |
static int | do_show_replica_status (MYSQL *mysql_con) |
static int | do_start_replica_sql (MYSQL *mysql_con) |
static int | do_flush_tables_read_lock (MYSQL *mysql_con) |
static int | do_unlock_tables (MYSQL *mysql_con) |
static int | get_bin_log_name (MYSQL *mysql_con, char *buff_log_name, uint buff_len) |
static int | purge_bin_logs_to (MYSQL *mysql_con, char *log_name) |
static int | start_transaction (MYSQL *mysql_con) |
static int | replace (DYNAMIC_STRING *ds_str, const char *search_str, size_t search_len, const char *replace_str, size_t replace_len) |
static void | set_session_binlog (bool flag) |
This function sets the session binlog in the dump file. More... | |
static bool | add_set_gtid_purged (MYSQL *mysql_con) |
This function gets the GTID_EXECUTED sets from the server and assigns those sets to GTID_PURGED in the dump file. More... | |
static bool | process_set_gtid_purged (MYSQL *mysql_con, bool is_gtid_enabled) |
This function processes the opt_set_gtid_purged option. More... | |
int | main (int argc, char **argv) |
Variables | |
static bool | verbose = false |
static bool | opt_no_create_info = false |
static bool | opt_no_data = false |
static bool | quick = true |
static bool | extended_insert = true |
static bool | lock_tables = true |
static bool | opt_force = false |
static bool | flush_logs = false |
static bool | flush_privileges = false |
static bool | opt_drop = true |
static bool | opt_keywords = false |
static bool | opt_lock = true |
static bool | opt_compress = false |
static bool | create_options = true |
static bool | opt_quoted = false |
static bool | opt_databases = false |
static bool | opt_alldbs = false |
static bool | opt_create_db = false |
static bool | opt_lock_all_tables = false |
static bool | opt_set_charset = false |
static bool | opt_dump_date = true |
static bool | opt_autocommit = false |
static bool | opt_disable_keys = true |
static bool | opt_xml = false |
static bool | opt_delete_source_logs = false |
static bool | opt_single_transaction = false |
static bool | opt_comments = false |
static bool | opt_compact = false |
static bool | opt_hex_blob = false |
static bool | opt_order_by_primary = false |
static bool | opt_ignore = false |
static bool | opt_complete_insert = false |
static bool | opt_drop_database = false |
static bool | opt_replace_into = false |
static bool | opt_dump_triggers = false |
static bool | opt_routines = false |
static bool | opt_tz_utc = true |
static bool | opt_replica_apply = false |
static bool | opt_include_source_host_port = false |
static bool | opt_events = false |
static bool | opt_comments_used = false |
static bool | opt_alltspcs = false |
static bool | opt_notspcs = false |
static bool | opt_drop_trigger = false |
static bool | opt_network_timeout = false |
static bool | stats_tables_included = false |
static bool | column_statistics = false |
static bool | opt_show_create_table_skip_secondary_engine = false |
static bool | opt_ignore_views = false |
static bool | insert_pat_inited = false |
static bool | debug_info_flag = false |
static bool | debug_check_flag = false |
static ulong | opt_max_allowed_packet |
static ulong | opt_net_buffer_length |
static MYSQL | mysql_connection |
static MYSQL * | mysql = nullptr |
static DYNAMIC_STRING | insert_pat |
static char * | current_user = nullptr |
static char * | current_host = nullptr |
static char * | path = nullptr |
static char * | fields_terminated = nullptr |
static char * | lines_terminated = nullptr |
static char * | enclosed = nullptr |
static char * | opt_enclosed = nullptr |
static char * | escaped = nullptr |
static char * | where = nullptr |
static char * | opt_compatible_mode_str = nullptr |
static char * | opt_ignore_error = nullptr |
static char * | log_error_file = nullptr |
static Multi_option | opt_init_commands |
static MEM_ROOT | argv_alloc {PSI_NOT_INSTRUMENTED, 512} |
static bool | ansi_mode = false |
Force the "ANSI" SQL_MODE. More... | |
static bool | server_supports_switching_charsets = true |
static bool | ansi_quotes_mode = false |
Use double quotes ("") like in the standard to quote identifiers if true, otherwise backticks (``, non-standard MySQL feature). More... | |
static uint | opt_zstd_compress_level = default_zstd_compression_level |
static char * | opt_compress_algorithm = nullptr |
static uint | opt_enable_cleartext_plugin = 0 |
static bool | using_opt_enable_cleartext_plugin = false |
static uint | opt_mysql_port = 0 |
static uint | opt_source_data |
static uint | opt_replica_data |
static ulong | opt_long_query_time = 0 |
static bool | long_query_time_opt_provided = false |
static uint | my_end_arg |
static char * | opt_mysql_unix_port = nullptr |
static char * | opt_bind_addr = nullptr |
static int | first_error = 0 |
FILE * | md_result_file = nullptr |
FILE * | stderror_file = nullptr |
const char * | set_gtid_purged_mode_names [] |
static TYPELIB | set_gtid_purged_mode_typelib |
static enum enum_set_gtid_purged_mode | opt_set_gtid_purged_mode = SET_GTID_PURGED_AUTO |
static uint | opt_protocol = 0 |
static char * | opt_plugin_dir = nullptr |
static char * | opt_default_auth = nullptr |
static bool | opt_skip_gipk = false |
const char * | set_output_as_version_mode [] |
static TYPELIB | set_output_as_version_mode_typelib |
static ulong | opt_server_version {0} |
enum Output_as_version_mode | opt_output_as_version_mode = Output_as_version_mode::SERVER |
Prealloced_array< uint, 12 > | ignore_error (PSI_NOT_INSTRUMENTED) |
static const char * | mysql_universal_client_charset |
static const char * | default_charset |
static CHARSET_INFO * | charset_info = &my_charset_latin1 |
const char * | default_dbug_option = "d:t:o,/tmp/mysqldump.trace" |
bool | seen_views = false |
collation_unordered_set< string > * | ignore_table |
static struct my_option | my_long_options [] |
static const char * | load_default_groups [] = {"mysqldump", "client", nullptr} |
static std::unordered_map< string, string > | compatibility_rpl_replica_commands |
static std::unordered_map< string, string > | compatibility_rpl_source_commands |
#define COMMENT_LENGTH 2048 |
#define DUMP_VERSION "10.13" |
#define DYNAMIC_STR_ERROR_MSG "Couldn't perform DYNAMIC_STRING operation" |
#define EX_CONSCHECK 3 |
#define EX_EOF 5 /* ferror for output file was got */ |
#define EX_EOM 4 |
#define EX_ILLEGAL_TABLE 6 |
#define EX_MYSQLERR 2 |
#define EX_USAGE 1 |
#define FIRST_COLUMN_STATISTICS_VERSION 80002 |
#define FIRST_REPLICA_COMMAND_VERSION 80023 |
#define FIRST_SOURCE_COMMAND_VERSION 80200 |
#define IGNORE_DATA 0x01 /* don't dump data for this table */ |
#define IGNORE_NONE 0x00 /* no ignore */ |
#define LONG_TIMEOUT (3600UL * 24UL * 365UL) |
#define MAX_FIELDS 4000 |
#define MYSQL_OPT_REPLICA_DATA_COMMENTED_SQL 2 |
#define MYSQL_OPT_REPLICA_DATA_EFFECTIVE_SQL 1 |
#define MYSQL_OPT_SOURCE_DATA_COMMENTED_SQL 2 |
#define MYSQL_OPT_SOURCE_DATA_EFFECTIVE_SQL 1 |
#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8mb4" |
#define QUERY_LENGTH 1536 |
#define SHOW_DEFAULT 4 |
#define SHOW_EXTRA 5 |
#define SHOW_FIELDNAME 0 |
#define SHOW_NULL 2 |
#define SHOW_TYPE 1 |
|
strong |
|
static |
|
static |
|
static |
This function gets the GTID_EXECUTED sets from the server and assigns those sets to GTID_PURGED in the dump file.
[in] | mysql_con | connection to the server |
false | successfully printed GTID_PURGED sets in the dump file. |
true | failed. |
|
static |
|
static |
char check_if_ignore_table | ( | const char * | table_name, |
char * | table_type | ||
) |
|
static |
|
static |
|
static |
Rewrite statement, enclosing DEFINER clause in version-specific comment.
This function parses any CREATE statement and encloses DEFINER-clause in version-specific comment: input query: CREATE DEFINER=aFUNCTION ... rewritten query: CREATE * / / *!50020 DEFINER=a* / / *!50003 FUNCTION ...
[in] | stmt_str | CREATE statement string. |
[in] | stmt_length | Length of the stmt_str. |
[in] | definer_version_str | Minimal MySQL version number when DEFINER clause is supported in the given statement. |
[in] | definer_version_length | Length of definer_version_str. |
[in] | stmt_version_str | Minimal MySQL version number when the given statement is supported. |
[in] | stmt_version_length | Length of stmt_version_str. |
[in] | keyword_str | Keyword to look for after CREATE. |
[in] | keyword_length | Length of keyword_str. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Check if the last error should be ignored.
1 | yes 0 no |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
ROLLBACK TO SAVEPOINT in –single-transaction mode to release metadata lock on table which was already dumped. This allows to avoid blocking concurrent DDL on this table without sacrificing correctness, as we won't access table second time and dumps created by –single-transaction mode have validity point at the start of transaction anyway. Note that this doesn't make –single-transaction mode with concurrent DDL safe in general case. It just improves situation for people for whom it might be working.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
ROLLBACK TO SAVEPOINT in –single-transaction mode to release metadata lock on table which was already dumped. This allows to avoid blocking concurrent DDL on this table without sacrificing correctness, as we won't access table second time and dumps created by –single-transaction mode have validity point at the start of transaction anyway. Note that this doesn't make –single-transaction mode with concurrent DDL safe in general case. It just improves situation for people for whom it might be working.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Dump the triggers for a given table.
This should be called after the tables have been dumped in case a trigger depends on the existence of a table.
[in] | table_name | table name |
[in] | db_name | db name |
true | error has occurred. |
false | operation succeed. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Accepts object names and prefixes them with "-- " wherever end-of-line character ('
') is found.
[in] | object_name | object name list (concatenated string) |
[out] | freemem | should buffer be released after usage |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
This function checks if GTIDs are enabled on the server.
[in] | mysql_con | the connection to the server |
true | if GTIDs are enabled on the server |
false | if GTIDs are disabled on the server |
|
static |
|
static |
|
static |
This function checks what should be the outputted terminology according to the server version.
SERVER | if no compatibility mode is needed |
BEFORE_8_0_23 | if the server version is lower than 8.0.23 |
BEFORE_8_2_0 | if the server version is lower than 8.2.0 |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
Check if the table is innodb stats table in mysql database.
[in] | db | Database name |
[in] | table | Table name |
true | if it is innodb stats table else false |
bool is_infoschema_db | ( | const char * | db | ) |
Check if the database is 'information_schema' and write a verbose message stating that dumping the database is not supported.
db | Database Name. |
true | If database should be ignored. |
false | If database shouldn't be ignored. |
|
inlinestatic |
Check if the command line option includes innodb stats table or in any way mysql database.
[in] | argc | Total count of positional arguments |
[in] | argv | Pointer to positional arguments |
true | if dump contains innodb stats table or else false |
|
static |
|
static |
int main | ( | int | argc, |
char ** | argv | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Parse the list of error numbers to be ignored and store into a dynamic array.
0 | Success |
>0 | Failure |
|
static |
|
static |
|
static |
|
static |
Quote and print a string.
Quote '<' '>' '&' '"' chars and print a string to the xml_file.
xml_file | Output file. |
str | String to print. |
len | Its length. |
is_attribute_name | A check for attribute name or value. |
|
static |
|
static |
Print xml CDATA section.
xml_file | - output file |
str | - string to print |
len | - length of the string |
|
static |
Print xml comments.
Print the comment message in the format: "<!-- \n comment string \n -->\n"
xml_file | output file |
len | length of comment message |
comment_string | comment message |
|
static |
|
static |
|
static |
|
static |
This function processes the opt_set_gtid_purged option.
This function also calls set_session_binlog() function before setting the SET @GLOBAL.GTID_PURGED in the output.
[in] | mysql_con | the connection to the server |
[in] | is_gtid_enabled | true if server has gtid_mode on |
false | successful according to the value of opt_set_gtid_purged. |
true | fail. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
This function sets the session binlog in the dump file.
When –set-gtid-purged is used, this function is called to disable the session binlog and at the end of the dump, to restore the session binlog.
[in] | flag | If false, disable binlog. If true and binlog disabled previously, restore the session binlog. |
|
static |
This method will set depending on the arguments given the server value for terminology_use_previous.
[in] | mysql_con | the connection to the server |
[in] | mode_to_set | what mode to set |
1 | if an query error ocurred, 0 otherwise. |
|
static |
|
static |
|
static |
|
static |
Switch charset for results to some specified charset.
If the server does not support character_set_results variable, nothing can be done here. As for whether something should be done here, future new callers of this function should be aware that the server lacking the facility of switching charsets is treated as success.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Force the "ANSI" SQL_MODE.
|
static |
Use double quotes ("") like in the standard to quote identifiers if true, otherwise backticks (``, non-standard MySQL feature).
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
const char* default_dbug_option = "d:t:o,/tmp/mysqldump.trace" |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Prealloced_array< uint, 12 > ignore_error(PSI_NOT_INSTRUMENTED) | ( | PSI_NOT_INSTRUMENTED | ) |
collation_unordered_set<string>* ignore_table |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
FILE* md_result_file = nullptr |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
enum Output_as_version_mode opt_output_as_version_mode = Output_as_version_mode::SERVER |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
bool seen_views = false |
|
static |
const char* set_gtid_purged_mode_names[] |
|
static |
const char* set_output_as_version_mode[] |
|
static |
|
static |
FILE* stderror_file = nullptr |
|
static |
|
static |
|
static |