diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-25 21:57:52 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-25 21:57:52 +0300 |
commit | fbe2712705d464bf8488df249c36115e2c1f63f7 (patch) | |
tree | 274e728c719611769288afcb10f79549f6e11f8c | |
parent | 62903434eb009cb0bcd5003b0a45914bd4c09886 (diff) | |
parent | a19782522b1eac52d72f5e787b5d96f1fd1a2cb7 (diff) | |
download | mariadb-git-fbe2712705d464bf8488df249c36115e2c1f63f7.tar.gz |
Merge 10.4 into 10.5
The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1
(MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
202 files changed, 2951 insertions, 1709 deletions
diff --git a/client/client_priv.h b/client/client_priv.h index 9729fcf40fc..0f2cec47a08 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -1,6 +1,6 @@ /* Copyright (c) 2001, 2012, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -99,6 +99,7 @@ enum options_client OPT_REPORT_PROGRESS, OPT_SKIP_ANNOTATE_ROWS_EVENTS, OPT_SSL_CRL, OPT_SSL_CRLPATH, + OPT_IGNORE_DATA, OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS, OPT_SHUTDOWN_WAIT_FOR_SLAVES, OPT_COPY_S3_TABLES, diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 7447a96aecf..9c68aad2746 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -507,7 +507,7 @@ static void find_tool(char *tool_executable_name, const char *tool_name, len= (int)(last_fn_libchar - self_name); - my_snprintf(tool_executable_name, FN_REFLEN, "%.*s%c%s", + my_snprintf(tool_executable_name, FN_REFLEN, "%.*b%c%s", len, self_name, FN_LIBCHAR, tool_name); } diff --git a/client/mysqldump.c b/client/mysqldump.c index dfaecf16015..12c2831ec30 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -91,6 +91,7 @@ /* Max length GTID position that we will output. */ #define MAX_GTID_LENGTH 1024 +static my_bool ignore_table_data(const uchar *hash_key, size_t len); static void add_load_option(DYNAMIC_STRING *str, const char *option, const char *option_value); static ulong find_set(TYPELIB *, const char *, size_t, char **, uint *); @@ -211,7 +212,7 @@ TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1, #define MED_ENGINES "MRG_MyISAM, MRG_ISAM, CONNECT, OQGRAPH, SPIDER, VP, FEDERATED" -static HASH ignore_table; +static HASH ignore_table, ignore_data; static HASH ignore_database; @@ -387,6 +388,12 @@ static struct my_option my_long_options[] = "use the directive multiple times, once for each database. Only takes effect " "when used together with --all-databases|-A", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"ignore-table-data", OPT_IGNORE_DATA, + "Do not dump the specified table data. To specify more than one table " + "to ignore, use the directive multiple times, once for each table. " + "Each table must be specified with both database and table names, e.g., " + "--ignore-table-data=database.table.", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ignore-table", OPT_IGNORE_TABLE, "Do not dump the specified table. To specify more than one table to ignore, " "use the directive multiple times, once for each table. Each table must " @@ -912,6 +919,19 @@ get_one_option(const struct my_option *opt, (uchar*) my_strdup(PSI_NOT_INSTRUMENTED, argument, MYF(0)))) exit(EX_EOM); break; + case (int) OPT_IGNORE_DATA: + { + if (!strchr(argument, '.')) + { + fprintf(stderr, + "Illegal use of option --ignore-table-data=<database>.<table>\n"); + exit(1); + } + if (my_hash_insert(&ignore_data, (uchar*)my_strdup(PSI_NOT_INSTRUMENTED, + argument, MYF(0)))) + exit(EX_EOM); + break; + } case (int) OPT_IGNORE_TABLE: { if (!strchr(argument, '.')) @@ -1020,6 +1040,10 @@ static int get_options(int *argc, char ***argv) "mysql.transaction_registry", MYF(MY_WME)))) return(EX_EOM); + if (my_hash_init(PSI_NOT_INSTRUMENTED, &ignore_data, charset_info, 16, 0, 0, + (my_hash_get_key) get_table_key, my_free, 0)) + return(EX_EOM); + if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option))) return(ho_error); @@ -1676,6 +1700,8 @@ static void free_resources() my_hash_free(&ignore_database); if (my_hash_inited(&ignore_table)) my_hash_free(&ignore_table); + if (my_hash_inited(&ignore_data)) + my_hash_free(&ignore_data); dynstr_free(&extended_row); dynstr_free(&dynamic_where); dynstr_free(&insert_pat); @@ -3702,7 +3728,7 @@ static char *alloc_query_str(size_t size) */ -static void dump_table(char *table, char *db) +static void dump_table(char *table, char *db, const uchar *hash_key, size_t len) { char ignore_flag; char buf[200], table_buff[NAME_LEN+3]; @@ -3740,7 +3766,7 @@ static void dump_table(char *table, char *db) } /* Check --no-data flag */ - if (opt_no_data) + if (opt_no_data || (hash_key && ignore_table_data(hash_key, len))) { verbose_msg("-- Skipping dump data for table '%s', --no-data was used\n", table); @@ -4694,10 +4720,14 @@ static int init_dumping(char *database, int init_func(char*)) /* Return 1 if we should copy the table */ -my_bool include_table(const uchar *hash_key, size_t len) +static my_bool include_table(const uchar *hash_key, size_t len) { return ! my_hash_search(&ignore_table, hash_key, len); } +static my_bool ignore_table_data(const uchar *hash_key, size_t len) +{ + return my_hash_search(&ignore_data, hash_key, len) != NULL; +} static int dump_all_tables_in_db(char *database) @@ -4763,7 +4793,7 @@ static int dump_all_tables_in_db(char *database) char *end= strmov(afterdot, table); if (include_table((uchar*) hash_key, end - hash_key)) { - dump_table(table,database); + dump_table(table, database, (uchar*) hash_key, end - hash_key); my_free(order_by); order_by= 0; if (opt_dump_triggers && mysql_get_server_version(mysql) >= 50009) @@ -5161,7 +5191,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables) for (pos= dump_tables; pos < end; pos++) { DBUG_PRINT("info",("Dumping table %s", *pos)); - dump_table(*pos, db); + dump_table(*pos, db, NULL, 0); if (opt_dump_triggers && mysql_get_server_version(mysql) >= 50009) { diff --git a/client/mysqltest.cc b/client/mysqltest.cc index bc7247e09a1..150c99f80c4 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -588,8 +588,7 @@ static void cleanup_and_exit(int exit_code); ATTRIBUTE_NORETURN void really_die(const char *msg); -void report_or_die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2); -ATTRIBUTE_NORETURN ATTRIBUTE_FORMAT(printf, 1, 2) +void report_or_die(const char *fmt, ...); void die(const char *fmt, ...); static void make_error_message(char *buf, size_t len, const char *fmt, va_list args); ATTRIBUTE_NORETURN ATTRIBUTE_FORMAT(printf, 1, 2) @@ -718,7 +717,7 @@ public: DBUG_ASSERT(ds->str); #ifdef EXTRA_DEBUG - DBUG_PRINT("extra", ("str: %*s", (int) ds->length, ds->str)); + DBUG_DUMP("extra", (uchar*) ds->str, ds->length); #endif if (fwrite(ds->str, 1, ds->length, m_file) != ds->length) @@ -1141,71 +1140,6 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query, /* - Run query and dump the result to stderr in vertical format - - NOTE! This function should be safe to call when an error - has occurred and thus any further errors will be ignored (although logged) - - SYNOPSIS - show_query - mysql - connection to use - query - query to run - -*/ - -static void show_query(MYSQL* mysql, const char* query) -{ - MYSQL_RES* res; - DBUG_ENTER("show_query"); - - if (!mysql) - DBUG_VOID_RETURN; - - if (mysql_query(mysql, query)) - { - log_msg("Error running query '%s': %d %s", - query, mysql_errno(mysql), mysql_error(mysql)); - DBUG_VOID_RETURN; - } - - if ((res= mysql_store_result(mysql)) == NULL) - { - /* No result set returned */ - DBUG_VOID_RETURN; - } - - { - MYSQL_ROW row; - unsigned int i; - unsigned int row_num= 0; - unsigned int num_fields= mysql_num_fields(res); - MYSQL_FIELD *fields= mysql_fetch_fields(res); - - fprintf(stderr, "=== %s ===\n", query); - while ((row= mysql_fetch_row(res))) - { - unsigned long *lengths= mysql_fetch_lengths(res); - row_num++; - - fprintf(stderr, "---- %d. ----\n", row_num); - for(i= 0; i < num_fields; i++) - { - fprintf(stderr, "%s\t%.*s\n", - fields[i].name, - (int)lengths[i], row[i] ? row[i] : "NULL"); - } - } - for (i= 0; i < strlen(query)+8; i++) - fprintf(stderr, "="); - fprintf(stderr, "\n\n"); - } - mysql_free_result(res); - - DBUG_VOID_RETURN; -} - - -/* Show any warnings just before the error. Since the last error is added to the warning stack, only print @@warning_count-1 warnings. @@ -1363,7 +1297,7 @@ void check_command_args(struct st_command *command, /* Check required arg */ if (arg->ds->length == 0 && arg->required) - die("Missing required argument '%s' to command '%.*s'", arg->argname, + die("Missing required argument '%s' to command '%.*b'", arg->argname, command->first_word_len, command->query); } @@ -1372,7 +1306,7 @@ void check_command_args(struct st_command *command, while(ptr <= command->end && *ptr != '#') { if (*ptr && *ptr != ' ') - die("Extra argument '%s' passed to '%.*s'", + die("Extra argument '%s' passed to '%.*b'", ptr, command->first_word_len, command->query); ptr++; } @@ -1392,7 +1326,7 @@ void handle_command_error(struct st_command *command, uint error, if (command->abort_on_error) { - report_or_die("command \"%.*s\" failed with error: %u my_errno: %d " + report_or_die("command \"%.*b\" failed with error: %u my_errno: %d " "errno: %d", command->first_word_len, command->query, error, my_errno, sys_errno); @@ -1410,7 +1344,7 @@ void handle_command_error(struct st_command *command, uint error, DBUG_VOID_RETURN; } if (command->expected_errors.count > 0) - report_or_die("command \"%.*s\" failed with wrong error: %u " + report_or_die("command \"%.*b\" failed with wrong error: %u " "my_errno: %d errno: %d", command->first_word_len, command->query, error, my_errno, sys_errno); @@ -1419,7 +1353,7 @@ void handle_command_error(struct st_command *command, uint error, command->expected_errors.err[0].code.errnum != 0) { /* Error code we wanted was != 0, i.e. not an expected success */ - report_or_die("command \"%.*s\" succeeded - should have failed with " + report_or_die("command \"%.*b\" succeeded - should have failed with " "errno %d...", command->first_word_len, command->query, command->expected_errors.err[0].code.errnum); @@ -2372,7 +2306,7 @@ static int strip_surrounding(char* str, char c1, char c2) static void strip_parentheses(struct st_command *command) { if (strip_surrounding(command->first_argument, '(', ')')) - die("%.*s - argument list started with '%c' must be ended with '%c'", + die("%.*b - argument list started with '%c' must be ended with '%c'", command->first_word_len, command->query, '(', ')'); } @@ -3028,7 +2962,7 @@ void eval_expr(VAR *v, const char *p, const char **p_end, /* Make sure there was just a $variable and nothing else */ const char* end= *p_end + 1; if (end < expected_end && !open_end) - die("Found junk '%.*s' after $variable in expression", + die("Found junk '%.*b' after $variable in expression", (int)(expected_end - end - 1), end); DBUG_VOID_RETURN; @@ -3522,10 +3456,10 @@ int do_modify_var(struct st_command *command, const char *p= command->first_argument; VAR* v; if (!*p) - die("Missing argument to %.*s", command->first_word_len, + die("Missing argument to %.*b", command->first_word_len, command->query); if (*p != '$') - die("The argument to %.*s must be a variable (start with $)", + die("The argument to %.*b must be a variable (start with $)", command->first_word_len, command->query); v= var_get(p, &p, 1, 0); if (! v->is_int) @@ -4792,9 +4726,6 @@ void do_sync_with_master2(struct st_command *command, long offset, if (!result_str || result < 0) { /* master_pos_wait returned NULL or < 0 */ - show_query(mysql, "SHOW MASTER STATUS"); - show_query(mysql, "SHOW SLAVE STATUS"); - show_query(mysql, "SHOW PROCESSLIST"); fprintf(stderr, "analyze: sync_with_master\n"); if (!result_str) @@ -4805,18 +4736,18 @@ void do_sync_with_master2(struct st_command *command, long offset, information is not initialized, the arguments are incorrect, or an error has occurred */ - die("%.*s failed: '%s' returned NULL " \ + die("%.*b failed: '%s' returned NULL " \ "indicating slave SQL thread failure", command->first_word_len, command->query, query_buf); } if (result == -1) - die("%.*s failed: '%s' returned -1 " \ + die("%.*b failed: '%s' returned -1 " \ "indicating timeout after %d seconds", command->first_word_len, command->query, query_buf, timeout); else - die("%.*s failed: '%s' returned unknown result :%d", + die("%.*b failed: '%s' returned unknown result :%d", command->first_word_len, command->query, query_buf, result); } @@ -4981,17 +4912,17 @@ int do_sleep(struct st_command *command, my_bool real_sleep) while (my_isspace(charset_info, *p)) p++; if (!*p) - die("Missing argument to %.*s", command->first_word_len, + die("Missing argument to %.*b", command->first_word_len, command->query); sleep_start= p; /* Check that arg starts with a digit, not handled by my_strtod */ if (!my_isdigit(charset_info, *sleep_start)) - die("Invalid argument to %.*s \"%s\"", command->first_word_len, + die("Invalid argument to %.*b \"%s\"", command->first_word_len, command->query, sleep_start); sleep_val= my_strtod(sleep_start, &sleep_end, &error); check_eol_junk_line(sleep_end); if (error) - die("Invalid argument to %.*s \"%s\"", command->first_word_len, + die("Invalid argument to %.*b \"%s\"", command->first_word_len, command->query, command->first_argument); dynstr_free(&ds_sleep); @@ -6042,7 +5973,7 @@ void do_connect(struct st_command *command) csname= strdup(con_options + sizeof("CHARSET=") - 1); } else - die("Illegal option to connect: %.*s", + die("Illegal option to connect: %.*b", (int) (end - con_options), con_options); /* Process next option */ con_options= end; @@ -6343,7 +6274,7 @@ void do_block(enum block_cmd cmd, struct st_command* command) enum block_op operand= find_operand(curr_ptr); if (operand == ILLEG_OP) - die("Found junk '%.*s' after $variable in condition", + die("Found junk '%.*b' after $variable in condition", (int)(expr_end - curr_ptr), curr_ptr); /* We could silently allow this, but may be confusing */ @@ -9543,6 +9474,7 @@ int main(int argc, char **argv) case Q_LET: do_let(command); break; case Q_EVAL_RESULT: die("'eval_result' command is deprecated"); + break; // never called but keep compiler calm case Q_EVAL: case Q_EVALP: case Q_QUERY_VERTICAL: diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake index 49ef80ed11c..ab70ef3aea1 100644 --- a/cmake/maintainer.cmake +++ b/cmake/maintainer.cmake @@ -1,4 +1,5 @@ # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2020, MariaDB # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,11 +34,16 @@ SET(MY_WARNING_FLAGS -Wnon-virtual-dtor -Wvla -Wwrite-strings - -Werror ) +FOREACH(F ${MY_WARNING_FLAGS}) + MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO) +ENDFOREACH() + +SET(MY_ERROR_FLAGS -Werror) + IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0") - SET(MY_WARNING_FLAGS ${MY_WARNING_FLAGS} -Wno-error=maybe-uninitialized) + SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized) ENDIF() IF(MYSQL_MAINTAINER_MODE MATCHES "OFF") @@ -46,7 +52,7 @@ ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO") SET(WHERE DEBUG) ENDIF() -FOREACH(F ${MY_WARNING_FLAGS}) +FOREACH(F ${MY_ERROR_FLAGS}) MY_CHECK_AND_SET_COMPILER_FLAG(${F} ${WHERE}) ENDFOREACH() diff --git a/extra/crc32-vpmsum/clang_workaround.h b/extra/crc32-vpmsum/clang_workaround.h index b5e7dae011c..915f7e5282f 100644 --- a/extra/crc32-vpmsum/clang_workaround.h +++ b/extra/crc32-vpmsum/clang_workaround.h @@ -39,7 +39,12 @@ __vector unsigned long long __builtin_pack_vector (unsigned long __a, return __v; } -#ifndef vec_xxpermdi +/* + * Clang 7 changed the behavior of vec_xxpermdi in order to provide the same + * behavior of GCC. That means code adapted to Clang >= 7 does not work on + * Clang <= 6. So, fallback to __builtin_unpack_vector() on Clang <= 6. + */ +#if !defined vec_xxpermdi || __clang_major__ <= 6 static inline unsigned long __builtin_unpack_vector (__vector unsigned long long __v, @@ -62,9 +67,9 @@ static inline unsigned long __builtin_unpack_vector_0 (__vector unsigned long long __v) { #if defined(__BIG_ENDIAN__) - return vec_xxpermdi(__v, __v, 0x0)[1]; - #else return vec_xxpermdi(__v, __v, 0x0)[0]; + #else + return vec_xxpermdi(__v, __v, 0x3)[0]; #endif } @@ -72,9 +77,9 @@ static inline unsigned long __builtin_unpack_vector_1 (__vector unsigned long long __v) { #if defined(__BIG_ENDIAN__) - return vec_xxpermdi(__v, __v, 0x3)[1]; - #else return vec_xxpermdi(__v, __v, 0x3)[0]; + #else + return vec_xxpermdi(__v, __v, 0x0)[0]; #endif } #endif /* vec_xxpermdi */ diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index 6c13079a8fc..a3bd111745c 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -327,193 +327,203 @@ check_server_version(unsigned long version_number, /*********************************************************************//** Receive options important for XtraBackup from MySQL server. @return true on success. */ -bool -get_mysql_vars(MYSQL *connection) +bool get_mysql_vars(MYSQL *connection) { - char *gtid_mode_var = NULL; - char *version_var = NULL; - char *version_comment_var = NULL; - char *innodb_version_var = NULL; - char *have_backup_locks_var = NULL; - char *log_bin_var = NULL; - char *lock_wait_timeout_var= NULL; - char *wsrep_on_var = NULL; - char *slave_parallel_workers_var = NULL; - char *gtid_slave_pos_var = NULL; - char *innodb_buffer_pool_filename_var = NULL; - char *datadir_var = NULL; - char *innodb_log_group_home_dir_var = NULL; - char *innodb_log_file_size_var = NULL; - char *innodb_log_files_in_group_var = NULL; - char *innodb_data_file_path_var = NULL; - char *innodb_data_home_dir_var = NULL; - char *innodb_undo_directory_var = NULL; - char *innodb_page_size_var = NULL; - char *innodb_undo_tablespaces_var = NULL; - char *page_zip_level_var = NULL; - char *endptr; - unsigned long server_version = mysql_get_server_version(connection); - - bool ret = true; - - mysql_variable mysql_vars[] = { - {"have_backup_locks", &have_backup_locks_var}, - {"log_bin", &log_bin_var}, - {"lock_wait_timeout", &lock_wait_timeout_var}, - {"gtid_mode", >id_mode_var}, - {"version", &version_var}, - {"version_comment", &version_comment_var}, - {"innodb_version", &innodb_version_var}, - {"wsrep_on", &wsrep_on_var}, - {"slave_parallel_workers", &slave_parallel_workers_var}, - {"gtid_slave_pos", >id_slave_pos_var}, - {"innodb_buffer_pool_filename", - &innodb_buffer_pool_filename_var}, - {"datadir", &datadir_var}, - {"innodb_log_group_home_dir", &innodb_log_group_home_dir_var}, - {"innodb_log_file_size", &innodb_log_file_size_var}, - {"innodb_log_files_in_group", &innodb_log_files_in_group_var}, - {"innodb_data_file_path", &innodb_data_file_path_var}, - {"innodb_data_home_dir", &innodb_data_home_dir_var}, - {"innodb_undo_directory", &innodb_undo_directory_var}, - {"innodb_page_size", &innodb_page_size_var}, - {"innodb_undo_tablespaces", &innodb_undo_tablespaces_var}, - {"innodb_compression_level", &page_zip_level_var}, - {NULL, NULL} - }; - - read_mysql_variables(connection, "SHOW VARIABLES", - mysql_vars, true); - - if (have_backup_locks_var != NULL && !opt_no_backup_locks) { - have_backup_locks = true; - } + char *gtid_mode_var= NULL; + char *version_var= NULL; + char *version_comment_var= NULL; + char *innodb_version_var= NULL; + char *have_backup_locks_var= NULL; + char *log_bin_var= NULL; + char *lock_wait_timeout_var= NULL; + char *wsrep_on_var= NULL; + char *slave_parallel_workers_var= NULL; + char *gtid_slave_pos_var= NULL; + char *innodb_buffer_pool_filename_var= NULL; + char *datadir_var= NULL; + char *innodb_log_group_home_dir_var= NULL; + char *innodb_log_file_size_var= NULL; + char *innodb_log_files_in_group_var= NULL; + char *innodb_data_file_path_var= NULL; + char *innodb_data_home_dir_var= NULL; + char *innodb_undo_directory_var= NULL; + char *innodb_page_size_var= NULL; + char *innodb_undo_tablespaces_var= NULL; + char *page_zip_level_var= NULL; + char *ignore_db_dirs= NULL; + char *endptr; + unsigned long server_version= mysql_get_server_version(connection); + + bool ret= true; + + mysql_variable mysql_vars[]= { + {"have_backup_locks", &have_backup_locks_var}, + {"log_bin", &log_bin_var}, + {"lock_wait_timeout", &lock_wait_timeout_var}, + {"gtid_mode", >id_mode_var}, + {"version", &version_var}, + {"version_comment", &version_comment_var}, + {"innodb_version", &innodb_version_var}, + {"wsrep_on", &wsrep_on_var}, + {"slave_parallel_workers", &slave_parallel_workers_var}, + {"gtid_slave_pos", >id_slave_pos_var}, + {"innodb_buffer_pool_filename", &innodb_buffer_pool_filename_var}, + {"datadir", &datadir_var}, + {"innodb_log_group_home_dir", &innodb_log_group_home_dir_var}, + {"innodb_log_file_size", &innodb_log_file_size_var}, + {"innodb_log_files_in_group", &innodb_log_files_in_group_var}, + {"innodb_data_file_path", &innodb_data_file_path_var}, + {"innodb_data_home_dir", &innodb_data_home_dir_var}, + {"innodb_undo_directory", &innodb_undo_directory_var}, + {"innodb_page_size", &innodb_page_size_var}, + {"innodb_undo_tablespaces", &innodb_undo_tablespaces_var}, + {"innodb_compression_level", &page_zip_level_var}, + {"ignore_db_dirs", &ignore_db_dirs}, + {NULL, NULL}}; + + read_mysql_variables(connection, "SHOW VARIABLES", mysql_vars, true); + + if (have_backup_locks_var != NULL && !opt_no_backup_locks) + { + have_backup_locks= true; + } - if (opt_binlog_info == BINLOG_INFO_AUTO) { - if (log_bin_var != NULL && !strcmp(log_bin_var, "ON")) - opt_binlog_info = BINLOG_INFO_ON; - else - opt_binlog_info = BINLOG_INFO_OFF; - } + if (opt_binlog_info == BINLOG_INFO_AUTO) + { + if (log_bin_var != NULL && !strcmp(log_bin_var, "ON")) + opt_binlog_info= BINLOG_INFO_ON; + else + opt_binlog_info= BINLOG_INFO_OFF; + } - if (lock_wait_timeout_var != NULL) { - have_lock_wait_timeout = true; - } + if (lock_wait_timeout_var != NULL) + { + have_lock_wait_timeout= true; + } - if (wsrep_on_var != NULL) { - have_galera_enabled = true; - } + if (wsrep_on_var != NULL) + { + have_galera_enabled= true; + } - /* Check server version compatibility and detect server flavor */ + /* Check server version compatibility and detect server flavor */ - if (!(ret = check_server_version(server_version, version_var, - version_comment_var, - innodb_version_var))) { - goto out; - } + if (!(ret= check_server_version(server_version, version_var, + version_comment_var, innodb_version_var))) + { + goto out; + } - if (server_version > 50500) { - have_flush_engine_logs = true; - } + if (server_version > 50500) + { + have_flush_engine_logs= true; + } - if (slave_parallel_workers_var != NULL - && atoi(slave_parallel_workers_var) > 0) { - have_multi_threaded_slave = true; - } + if (slave_parallel_workers_var != NULL && + atoi(slave_parallel_workers_var) > 0) + { + have_multi_threaded_slave= true; + } - if (innodb_buffer_pool_filename_var != NULL) { - buffer_pool_filename = strdup(innodb_buffer_pool_filename_var); - } + if (innodb_buffer_pool_filename_var != NULL) + { + buffer_pool_filename= strdup(innodb_buffer_pool_filename_var); + } - if ((gtid_mode_var && strcmp(gtid_mode_var, "ON") == 0) || - (gtid_slave_pos_var && *gtid_slave_pos_var)) { - have_gtid_slave = true; - } + if ((gtid_mode_var && strcmp(gtid_mode_var, "ON") == 0) || + (gtid_slave_pos_var && *gtid_slave_pos_var)) + { + have_gtid_slave= true; + } - msg("Using server version %s", version_var); + msg("Using server version %s", version_var); - if (!(ret = detect_mysql_capabilities_for_backup())) { - goto out; - } + if (!(ret= detect_mysql_capabilities_for_backup())) + { + goto out; + } - /* make sure datadir value is the same in configuration file */ - if (check_if_param_set("datadir")) { - if (!directory_exists(mysql_data_home, false)) { - msg("Warning: option 'datadir' points to " - "nonexistent directory '%s'", mysql_data_home); - } - if (!directory_exists(datadir_var, false)) { - msg("Warning: MySQL variable 'datadir' points to " - "nonexistent directory '%s'", datadir_var); - } - if (!equal_paths(mysql_data_home, datadir_var)) { - msg("Warning: option 'datadir' has different " - "values:\n" - " '%s' in defaults file\n" - " '%s' in SHOW VARIABLES", - mysql_data_home, datadir_var); - } - } + /* make sure datadir value is the same in configuration file */ + if (check_if_param_set("datadir")) + { + if (!directory_exists(mysql_data_home, false)) + { + msg("Warning: option 'datadir' points to " + "nonexistent directory '%s'", + mysql_data_home); + } + if (!directory_exists(datadir_var, false)) + { + msg("Warning: MySQL variable 'datadir' points to " + "nonexistent directory '%s'", + datadir_var); + } + if (!equal_paths(mysql_data_home, datadir_var)) + { + msg("Warning: option 'datadir' has different " + "values:\n" + " '%s' in defaults file\n" + " '%s' in SHOW VARIABLES", + mysql_data_home, datadir_var); + } + } - /* get some default values is they are missing from my.cnf */ - if (datadir_var && *datadir_var) { - strmake(mysql_real_data_home, datadir_var, FN_REFLEN - 1); - mysql_data_home= mysql_real_data_home; - } + /* get some default values is they are missing from my.cnf */ + if (datadir_var && *datadir_var) + { + strmake(mysql_real_data_home, datadir_var, FN_REFLEN - 1); + mysql_data_home= mysql_real_data_home; + } - if (innodb_data_file_path_var && *innodb_data_file_path_var) { - innobase_data_file_path = my_strdup(PSI_NOT_INSTRUMENTED, - innodb_data_file_path_var, MYF(MY_FAE)); - } + if (innodb_data_file_path_var && *innodb_data_file_path_var) + innobase_data_file_path= my_strdup(PSI_NOT_INSTRUMENTED, + innodb_data_file_path_var, MYF(MY_FAE)); - if (innodb_data_home_dir_var) { - innobase_data_home_dir = my_strdup(PSI_NOT_INSTRUMENTED, - innodb_data_home_dir_var, MYF(MY_FAE)); - } + if (innodb_data_home_dir_var) + innobase_data_home_dir= my_strdup(PSI_NOT_INSTRUMENTED, + innodb_data_home_dir_var, MYF(MY_FAE)); - if (innodb_log_group_home_dir_var - && *innodb_log_group_home_dir_var) { - srv_log_group_home_dir = my_strdup(PSI_NOT_INSTRUMENTED, - innodb_log_group_home_dir_var, MYF(MY_FAE)); - } + if (innodb_log_group_home_dir_var && *innodb_log_group_home_dir_var) + srv_log_group_home_dir= my_strdup(PSI_NOT_INSTRUMENTED, + innodb_log_group_home_dir_var, + MYF(MY_FAE)); - if (innodb_undo_directory_var && *innodb_undo_directory_var) { - srv_undo_dir = my_strdup(PSI_NOT_INSTRUMENTED, - innodb_undo_directory_var, MYF(MY_FAE)); - } + if (innodb_undo_directory_var && *innodb_undo_directory_var) + srv_undo_dir= my_strdup(PSI_NOT_INSTRUMENTED, innodb_undo_directory_var, + MYF(MY_FAE)); - if (innodb_log_files_in_group_var) { - // deprecated - } + if (innodb_log_file_size_var) + { + srv_log_file_size= strtoll(innodb_log_file_size_var, &endptr, 10); + ut_ad(*endptr == 0); + } - if (innodb_log_file_size_var) { - srv_log_file_size = strtoll( - innodb_log_file_size_var, &endptr, 10); - ut_ad(*endptr == 0); - } + if (innodb_page_size_var) + { + innobase_page_size= strtoll(innodb_page_size_var, &endptr, 10); + ut_ad(*endptr == 0); + } - if (innodb_page_size_var) { - innobase_page_size = strtoll( - innodb_page_size_var, &endptr, 10); - ut_ad(*endptr == 0); - } + if (innodb_undo_tablespaces_var) + { + srv_undo_tablespaces= strtoul(innodb_undo_tablespaces_var, &endptr, 10); + ut_ad(*endptr == 0); + } - if (innodb_undo_tablespaces_var) { - srv_undo_tablespaces = strtoul(innodb_undo_tablespaces_var, - &endptr, 10); - ut_ad(*endptr == 0); - } + if (page_zip_level_var != NULL) + { + page_zip_level= static_cast<uint>(strtoul(page_zip_level_var, &endptr, + 10)); + ut_ad(*endptr == 0); + } - if (page_zip_level_var != NULL) { - page_zip_level = static_cast<uint>(strtoul(page_zip_level_var, - &endptr, 10)); - ut_ad(*endptr == 0); - } + if (ignore_db_dirs) + xb_load_list_string(ignore_db_dirs, ",", register_ignore_db_dirs_filter); out: - free_mysql_variables(mysql_vars); + free_mysql_variables(mysql_vars); - return(ret); + return (ret); } /*********************************************************************//** diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 23d9ae11de7..1cc13d89036 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -72,6 +72,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA #include <srv0start.h> #include "trx0sys.h" #include <buf0dblwr.h> +#include "ha_innodb.h" #include <list> #include <sstream> @@ -703,8 +704,8 @@ typedef struct { enum options_xtrabackup { - OPT_XTRA_TARGET_DIR = 1000, /* make sure it is larger - than OPT_MAX_CLIENT_OPTION */ + OPT_XTRA_TARGET_DIR= 1000, /* make sure it is larger + than OPT_MAX_CLIENT_OPTION */ OPT_XTRA_BACKUP, OPT_XTRA_PREPARE, OPT_XTRA_EXPORT, @@ -800,359 +801,399 @@ enum options_xtrabackup OPT_XTRA_CHECK_PRIVILEGES }; - -struct my_option xb_client_options[] = -{ - {"verbose", 'V', "display verbose output", - (G_PTR*) &verbose, (G_PTR*) &verbose, 0, GET_BOOL, NO_ARG, - FALSE, 0, 0, 0, 0, 0}, - {"version", 'v', "print xtrabackup version information", - (G_PTR *) &xtrabackup_version, (G_PTR *) &xtrabackup_version, 0, GET_BOOL, - NO_ARG, 0, 0, 0, 0, 0, 0}, - {"target-dir", OPT_XTRA_TARGET_DIR, "destination directory", (G_PTR*) &xtrabackup_target_dir, - (G_PTR*) &xtrabackup_target_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"backup", OPT_XTRA_BACKUP, "take backup to target-dir", - (G_PTR*) &xtrabackup_backup, (G_PTR*) &xtrabackup_backup, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"prepare", OPT_XTRA_PREPARE, "prepare a backup for starting mysql server on the backup.", - (G_PTR*) &xtrabackup_prepare, (G_PTR*) &xtrabackup_prepare, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"export", OPT_XTRA_EXPORT, "create files to import to another database when prepare.", - (G_PTR*) &xtrabackup_export, (G_PTR*) &xtrabackup_export, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"print-param", OPT_XTRA_PRINT_PARAM, "print parameter of mysqld needed for copyback.", - (G_PTR*) &xtrabackup_print_param, (G_PTR*) &xtrabackup_print_param, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"use-memory", OPT_XTRA_USE_MEMORY, "The value is used instead of buffer_pool_size", - (G_PTR*) &xtrabackup_use_memory, (G_PTR*) &xtrabackup_use_memory, - 0, GET_LL, REQUIRED_ARG, 100*1024*1024L, 1024*1024L, LONGLONG_MAX, 0, - 1024*1024L, 0}, - {"throttle", OPT_XTRA_THROTTLE, "limit count of IO operations (pairs of read&write) per second to IOS values (for '--backup')", - (G_PTR*) &xtrabackup_throttle, (G_PTR*) &xtrabackup_throttle, - 0, GET_LONG, REQUIRED_ARG, 0, 0, LONG_MAX, 0, 1, 0}, - {"log", OPT_LOG, "Ignored option for MySQL option compatibility", - (G_PTR*) &log_ignored_opt, (G_PTR*) &log_ignored_opt, 0, - GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"log-copy-interval", OPT_XTRA_LOG_COPY_INTERVAL, "time interval between checks done by log copying thread in milliseconds (default is 1 second).", - (G_PTR*) &xtrabackup_log_copy_interval, (G_PTR*) &xtrabackup_log_copy_interval, - 0, GET_LONG, REQUIRED_ARG, 1000, 0, LONG_MAX, 0, 1, 0}, - {"extra-lsndir", OPT_XTRA_EXTRA_LSNDIR, "(for --backup): save an extra copy of the xtrabackup_checkpoints file in this directory.", - (G_PTR*) &xtrabackup_extra_lsndir, (G_PTR*) &xtrabackup_extra_lsndir, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"incremental-lsn", OPT_XTRA_INCREMENTAL, "(for --backup): copy only .ibd pages newer than specified LSN 'high:low'. ##ATTENTION##: If a wrong LSN value is specified, it is impossible to diagnose this, causing the backup to be unusable. Be careful!", - (G_PTR*) &xtrabackup_incremental, (G_PTR*) &xtrabackup_incremental, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"incremental-basedir", OPT_XTRA_INCREMENTAL_BASEDIR, "(for --backup): copy only .ibd pages newer than backup at specified directory.", - (G_PTR*) &xtrabackup_incremental_basedir, (G_PTR*) &xtrabackup_incremental_basedir, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"incremental-dir", OPT_XTRA_INCREMENTAL_DIR, "(for --prepare): apply .delta files and logfile in the specified directory.", - (G_PTR*) &xtrabackup_incremental_dir, (G_PTR*) &xtrabackup_incremental_dir, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"tables", OPT_XTRA_TABLES, "filtering by regexp for table names.", - (G_PTR*) &xtrabackup_tables, (G_PTR*) &xtrabackup_tables, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"tables_file", OPT_XTRA_TABLES_FILE, "filtering by list of the exact database.table name in the file.", - (G_PTR*) &xtrabackup_tables_file, (G_PTR*) &xtrabackup_tables_file, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"databases", OPT_XTRA_DATABASES, "filtering by list of databases.", - (G_PTR*) &xtrabackup_databases, (G_PTR*) &xtrabackup_databases, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"databases_file", OPT_XTRA_DATABASES_FILE, - "filtering by list of databases in the file.", - (G_PTR*) &xtrabackup_databases_file, (G_PTR*) &xtrabackup_databases_file, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"tables-exclude", OPT_XTRA_TABLES_EXCLUDE, "filtering by regexp for table names. " - "Operates the same way as --tables, but matched names are excluded from backup. " - "Note that this option has a higher priority than --tables.", - (G_PTR*) &xtrabackup_tables_exclude, (G_PTR*) &xtrabackup_tables_exclude, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"databases-exclude", OPT_XTRA_DATABASES_EXCLUDE, "Excluding databases based on name, " - "Operates the same way as --databases, but matched names are excluded from backup. " - "Note that this option has a higher priority than --databases.", - (G_PTR*) &xtrabackup_databases_exclude, (G_PTR*) &xtrabackup_databases_exclude, - 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " - "in the specified format." - "Supported format is 'mbstream' or 'xbstream'." - , - (G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"compress", OPT_XTRA_COMPRESS, "Compress individual backup files using the " - "specified compression algorithm. Currently the only supported algorithm " - "is 'quicklz'. It is also the default algorithm, i.e. the one used when " - "--compress is used without an argument.", - (G_PTR*) &xtrabackup_compress_alg, (G_PTR*) &xtrabackup_compress_alg, 0, - GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - - {"compress-threads", OPT_XTRA_COMPRESS_THREADS, - "Number of threads for parallel data compression. The default value is 1.", - (G_PTR*) &xtrabackup_compress_threads, (G_PTR*) &xtrabackup_compress_threads, - 0, GET_UINT, REQUIRED_ARG, 1, 1, UINT_MAX, 0, 0, 0}, - - {"compress-chunk-size", OPT_XTRA_COMPRESS_CHUNK_SIZE, - "Size of working buffer(s) for compression threads in bytes. The default value is 64K.", - (G_PTR*) &xtrabackup_compress_chunk_size, (G_PTR*) &xtrabackup_compress_chunk_size, - 0, GET_ULL, REQUIRED_ARG, (1 << 16), 1024, ULONGLONG_MAX, 0, 0, 0}, - - {"incremental-force-scan", OPT_XTRA_INCREMENTAL_FORCE_SCAN, - "Perform a full-scan incremental backup even in the presence of changed " - "page bitmap data", - (G_PTR*)&xtrabackup_incremental_force_scan, - (G_PTR*)&xtrabackup_incremental_force_scan, 0, GET_BOOL, NO_ARG, - 0, 0, 0, 0, 0, 0}, - - - {"close_files", OPT_CLOSE_FILES, "do not keep files opened. Use at your own " - "risk.", (G_PTR*) &xb_close_files, (G_PTR*) &xb_close_files, 0, GET_BOOL, - NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"core-file", OPT_CORE_FILE, "Write core on fatal signals", 0, 0, 0, - GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - - - {"copy-back", OPT_COPY_BACK, "Copy all the files in a previously made " - "backup from the backup directory to their original locations.", - (uchar *) &xtrabackup_copy_back, (uchar *) &xtrabackup_copy_back, 0, - GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"move-back", OPT_MOVE_BACK, "Move all the files in a previously made " - "backup from the backup directory to the actual datadir location. " - "Use with caution, as it removes backup files.", - (uchar *) &xtrabackup_move_back, (uchar *) &xtrabackup_move_back, 0, - GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"galera-info", OPT_GALERA_INFO, "This options creates the " - "xtrabackup_galera_info file which contains the local node state at " - "the time of the backup. Option should be used when performing the " - "backup of MariaDB Galera Cluster. Has no effect when backup locks " - "are used to create the backup.", - (uchar *) &opt_galera_info, (uchar *) &opt_galera_info, 0, - GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"slave-info", OPT_SLAVE_INFO, "This option is useful when backing " - "up a replication slave server. It prints the binary log position " - "and name of the master server. It also writes this information to " - "the \"xtrabackup_slave_info\" file as a \"CHANGE MASTER\" command. " - "A new slave for this master can be set up by starting a slave server " - "on this backup and issuing a \"CHANGE MASTER\" command with the " - "binary log position saved in the \"xtrabackup_slave_info\" file.", - (uchar *) &opt_slave_info, (uchar *) &opt_slave_info, 0, - GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"no-lock", OPT_NO_LOCK, "Use this option to disable table lock " - "with \"FLUSH TABLES WITH READ LOCK\". Use it only if ALL your " - "tables are InnoDB and you DO NOT CARE about the binary log " - "position of the backup. This option shouldn't be used if there " - "are any DDL statements being executed or if any updates are " - "happening on non-InnoDB tables (this includes the system MyISAM " - "tables in the mysql database), otherwise it could lead to an " - "inconsistent backup. If you are considering to use --no-lock " - "because your backups are failing to acquire the lock, this could " - "be because of incoming replication events preventing the lock " - "from succeeding. Please try using --safe-slave-backup to " - "momentarily stop the replication slave thread, this may help " - "the backup to succeed and you then don't need to resort to " - "using this option.", - (uchar *) &opt_no_lock, (uchar *) &opt_no_lock, 0, - GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"safe-slave-backup", OPT_SAFE_SLAVE_BACKUP, "Stop slave SQL thread " - "and wait to start backup until Slave_open_temp_tables in " - "\"SHOW STATUS\" is zero. If there are no open temporary tables, " - "the backup will take place, otherwise the SQL thread will be " - "started and stopped until there are no open temporary tables. " - "The backup will fail if Slave_open_temp_tables does not become " - "zero after --safe-slave-backup-timeout seconds. The slave SQL " - "thread will be restarted when the backup finishes.", - (uchar *) &opt_safe_slave_backup, - (uchar *) &opt_safe_slave_backup, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"rsync", OPT_RSYNC, "Uses the rsync utility to optimize local file " - "transfers. When this option is specified, innobackupex uses rsync " - "to copy all non-InnoDB files instead of spawning a separate cp for " - "each file, which can be much faster for servers with a large number " - "of databases or tables. This option cannot be used together with " - "--stream.", - (uchar *) &opt_rsync, (uchar *) &opt_rsync, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS, "This " - "option, when specified, makes --copy-back or --move-back transfer " - "files to non-empty directories. Note that no existing files will be " - "overwritten. If --copy-back or --nove-back has to copy a file from " - "the backup directory which already exists in the destination " - "directory, it will still fail with an error.", - (uchar *) &opt_force_non_empty_dirs, - (uchar *) &opt_force_non_empty_dirs, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"no-version-check", OPT_NO_VERSION_CHECK, "This option disables the " - "version check which is enabled by the --version-check option.", - (uchar *) &opt_noversioncheck, - (uchar *) &opt_noversioncheck, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"no-backup-locks", OPT_NO_BACKUP_LOCKS, "This option controls if " - "backup locks should be used instead of FLUSH TABLES WITH READ LOCK " - "on the backup stage. The option has no effect when backup locks are " - "not supported by the server. This option is enabled by default, " - "disable with --no-backup-locks.", - (uchar *) &opt_no_backup_locks, - (uchar *) &opt_no_backup_locks, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"decompress", OPT_DECOMPRESS, "Decompresses all files with the .qp " - "extension in a backup previously made with the --compress option.", - (uchar *) &opt_decompress, - (uchar *) &opt_decompress, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"user", 'u', "This option specifies the MySQL username used " - "when connecting to the server, if that's not the current user. " - "The option accepts a string argument. See mysql --help for details.", - (uchar*) &opt_user, (uchar*) &opt_user, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"host", 'H', "This option specifies the host to use when " - "connecting to the database server with TCP/IP. The option accepts " - "a string argument. See mysql --help for details.", - (uchar*) &opt_host, (uchar*) &opt_host, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"port", 'P', "This option specifies the port to use when " - "connecting to the database server with TCP/IP. The option accepts " - "a string argument. See mysql --help for details.", - &opt_port, &opt_port, 0, GET_UINT, REQUIRED_ARG, - 0, 0, 0, 0, 0, 0}, - - {"password", 'p', "This option specifies the password to use " - "when connecting to the database. It accepts a string argument. " - "See mysql --help for details.", - 0, 0, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"protocol", OPT_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).", - 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"socket", 'S', "This option specifies the socket to use when " - "connecting to the local database server with a UNIX domain socket. " - "The option accepts a string argument. See mysql --help for details.", - (uchar*) &opt_socket, (uchar*) &opt_socket, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"incremental-history-name", OPT_INCREMENTAL_HISTORY_NAME, - "This option specifies the name of the backup series stored in the " - "PERCONA_SCHEMA.xtrabackup_history history record to base an " - "incremental backup on. Xtrabackup will search the history table " - "looking for the most recent (highest innodb_to_lsn), successful " - "backup in the series and take the to_lsn value to use as the " - "starting lsn for the incremental backup. This will be mutually " - "exclusive with --incremental-history-uuid, --incremental-basedir " - "and --incremental-lsn. If no valid lsn can be found (no series by " - "that name, no successful backups by that name) xtrabackup will " - "return with an error. It is used with the --incremental option.", - (uchar*) &opt_incremental_history_name, - (uchar*) &opt_incremental_history_name, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"incremental-history-uuid", OPT_INCREMENTAL_HISTORY_UUID, - "This option specifies the UUID of the specific history record " - "stored in the PERCONA_SCHEMA.xtrabackup_history to base an " - "incremental backup on. --incremental-history-name, " - "--incremental-basedir and --incremental-lsn. If no valid lsn can be " - "found (no success record with that uuid) xtrabackup will return " - "with an error. It is used with the --incremental option.", - (uchar*) &opt_incremental_history_uuid, - (uchar*) &opt_incremental_history_uuid, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"remove-original", OPT_REMOVE_ORIGINAL, "Remove .qp files after decompression.", - (uchar *) &opt_remove_original, - (uchar *) &opt_remove_original, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - - {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, - "This option specifies which types of queries are allowed to complete " - "before innobackupex will issue the global lock. Default is all.", - (uchar*) &opt_lock_wait_query_type, - (uchar*) &opt_lock_wait_query_type, &query_type_typelib, - GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0}, - - {"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE, - "This option specifies which types of queries should be killed to " - "unblock the global lock. Default is \"all\".", - (uchar*) &opt_kill_long_query_type, - (uchar*) &opt_kill_long_query_type, &query_type_typelib, - GET_ENUM, REQUIRED_ARG, QUERY_TYPE_SELECT, 0, 0, 0, 0, 0}, - - {"history", OPT_HISTORY, - "This option enables the tracking of backup history in the " - "PERCONA_SCHEMA.xtrabackup_history table. An optional history " - "series name may be specified that will be placed with the history " - "record for the current backup being taken.", - NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - - {"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT, - "This option specifies the number of seconds innobackupex waits " - "between starting FLUSH TABLES WITH READ LOCK and killing those " - "queries that block it. Default is 0 seconds, which means " - "innobackupex will not attempt to kill any queries.", - (uchar*) &opt_kill_long_queries_timeout, - (uchar*) &opt_kill_long_queries_timeout, 0, GET_UINT, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT, - "This option specifies time in seconds that innobackupex should wait " - "for queries that would block FTWRL before running it. If there are " - "still such queries when the timeout expires, innobackupex terminates " - "with an error. Default is 0, in which case innobackupex does not " - "wait for queries to complete and starts FTWRL immediately.", - (uchar*) &opt_lock_wait_timeout, - (uchar*) &opt_lock_wait_timeout, 0, GET_UINT, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD, - "This option specifies the query run time threshold which is used by " - "innobackupex to detect long-running queries with a non-zero value " - "of --ftwrl-wait-timeout. FTWRL is not started until such " - "long-running queries exist. This option has no effect if " - "--ftwrl-wait-timeout is 0. Default value is 60 seconds.", - (uchar*) &opt_lock_wait_threshold, - (uchar*) &opt_lock_wait_threshold, 0, GET_UINT, - REQUIRED_ARG, 60, 0, 0, 0, 0, 0}, - - {"debug-sleep-before-unlock", OPT_DEBUG_SLEEP_BEFORE_UNLOCK, - "This is a debug-only option used by the XtraBackup test suite.", - (uchar*) &opt_debug_sleep_before_unlock, - (uchar*) &opt_debug_sleep_before_unlock, 0, GET_UINT, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - - {"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT, - "How many seconds --safe-slave-backup should wait for " - "Slave_open_temp_tables to become zero. (default 300)", - (uchar*) &opt_safe_slave_backup_timeout, - (uchar*) &opt_safe_slave_backup_timeout, 0, GET_UINT, - REQUIRED_ARG, 300, 0, 0, 0, 0, 0}, - - {"binlog-info", OPT_BINLOG_INFO, - "This option controls how XtraBackup should retrieve server's binary log " - "coordinates corresponding to the backup. Possible values are OFF, ON, " - "LOCKLESS and AUTO. See the XtraBackup manual for more information", - &opt_binlog_info, &opt_binlog_info, - &binlog_info_typelib, GET_ENUM, OPT_ARG, BINLOG_INFO_AUTO, 0, 0, 0, 0, 0}, - - {"secure-auth", OPT_XB_SECURE_AUTH, "Refuse client connecting to server if it" - " uses old (pre-4.1.1) protocol.", &opt_secure_auth, - &opt_secure_auth, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, +struct my_option xb_client_options[]= { + {"verbose", 'V', "display verbose output", (G_PTR *) &verbose, + (G_PTR *) &verbose, 0, GET_BOOL, NO_ARG, FALSE, 0, 0, 0, 0, 0}, + {"version", 'v', "print xtrabackup version information", + (G_PTR *) &xtrabackup_version, (G_PTR *) &xtrabackup_version, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + {"target-dir", OPT_XTRA_TARGET_DIR, "destination directory", + (G_PTR *) &xtrabackup_target_dir, (G_PTR *) &xtrabackup_target_dir, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"backup", OPT_XTRA_BACKUP, "take backup to target-dir", + (G_PTR *) &xtrabackup_backup, (G_PTR *) &xtrabackup_backup, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + {"prepare", OPT_XTRA_PREPARE, + "prepare a backup for starting mysql server on the backup.", + (G_PTR *) &xtrabackup_prepare, (G_PTR *) &xtrabackup_prepare, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + {"export", OPT_XTRA_EXPORT, + "create files to import to another database when prepare.", + (G_PTR *) &xtrabackup_export, (G_PTR *) &xtrabackup_export, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + {"print-param", OPT_XTRA_PRINT_PARAM, + "print parameter of mysqld needed for copyback.", + (G_PTR *) &xtrabackup_print_param, (G_PTR *) &xtrabackup_print_param, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"use-memory", OPT_XTRA_USE_MEMORY, + "The value is used instead of buffer_pool_size", + (G_PTR *) &xtrabackup_use_memory, (G_PTR *) &xtrabackup_use_memory, 0, + GET_LL, REQUIRED_ARG, 100 * 1024 * 1024L, 1024 * 1024L, LONGLONG_MAX, 0, + 1024 * 1024L, 0}, + {"throttle", OPT_XTRA_THROTTLE, + "limit count of IO operations (pairs of read&write) per second to IOS " + "values (for '--backup')", + (G_PTR *) &xtrabackup_throttle, (G_PTR *) &xtrabackup_throttle, 0, + GET_LONG, REQUIRED_ARG, 0, 0, LONG_MAX, 0, 1, 0}, + {"log", OPT_LOG, "Ignored option for MySQL option compatibility", + (G_PTR *) &log_ignored_opt, (G_PTR *) &log_ignored_opt, 0, GET_STR, + OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"log-copy-interval", OPT_XTRA_LOG_COPY_INTERVAL, + "time interval between checks done by log copying thread in milliseconds " + "(default is 1 second).", + (G_PTR *) &xtrabackup_log_copy_interval, + (G_PTR *) &xtrabackup_log_copy_interval, 0, GET_LONG, REQUIRED_ARG, 1000, + 0, LONG_MAX, 0, 1, 0}, + {"extra-lsndir", OPT_XTRA_EXTRA_LSNDIR, + "(for --backup): save an extra copy of the xtrabackup_checkpoints file " + "in this directory.", + (G_PTR *) &xtrabackup_extra_lsndir, (G_PTR *) &xtrabackup_extra_lsndir, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"incremental-lsn", OPT_XTRA_INCREMENTAL, + "(for --backup): copy only .ibd pages newer than specified LSN " + "'high:low'. ##ATTENTION##: If a wrong LSN value is specified, it is " + "impossible to diagnose this, causing the backup to be unusable. Be " + "careful!", + (G_PTR *) &xtrabackup_incremental, (G_PTR *) &xtrabackup_incremental, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"incremental-basedir", OPT_XTRA_INCREMENTAL_BASEDIR, + "(for --backup): copy only .ibd pages newer than backup at specified " + "directory.", + (G_PTR *) &xtrabackup_incremental_basedir, + (G_PTR *) &xtrabackup_incremental_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + {"incremental-dir", OPT_XTRA_INCREMENTAL_DIR, + "(for --prepare): apply .delta files and logfile in the specified " + "directory.", + (G_PTR *) &xtrabackup_incremental_dir, + (G_PTR *) &xtrabackup_incremental_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, + 0, 0, 0}, + {"tables", OPT_XTRA_TABLES, "filtering by regexp for table names.", + (G_PTR *) &xtrabackup_tables, (G_PTR *) &xtrabackup_tables, 0, GET_STR, + REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"tables_file", OPT_XTRA_TABLES_FILE, + "filtering by list of the exact database.table name in the file.", + (G_PTR *) &xtrabackup_tables_file, (G_PTR *) &xtrabackup_tables_file, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"databases", OPT_XTRA_DATABASES, "filtering by list of databases.", + (G_PTR *) &xtrabackup_databases, (G_PTR *) &xtrabackup_databases, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"databases_file", OPT_XTRA_DATABASES_FILE, + "filtering by list of databases in the file.", + (G_PTR *) &xtrabackup_databases_file, + (G_PTR *) &xtrabackup_databases_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, + 0, 0, 0}, + {"tables-exclude", OPT_XTRA_TABLES_EXCLUDE, + "filtering by regexp for table names. " + "Operates the same way as --tables, but matched names are excluded from " + "backup. " + "Note that this option has a higher priority than --tables.", + (G_PTR *) &xtrabackup_tables_exclude, + (G_PTR *) &xtrabackup_tables_exclude, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, + 0, 0, 0}, + {"databases-exclude", OPT_XTRA_DATABASES_EXCLUDE, + "Excluding databases based on name, " + "Operates the same way as --databases, but matched names are excluded " + "from backup. " + "Note that this option has a higher priority than --databases.", + (G_PTR *) &xtrabackup_databases_exclude, + (G_PTR *) &xtrabackup_databases_exclude, 0, GET_STR, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"stream", OPT_XTRA_STREAM, + "Stream all backup files to the standard output " + "in the specified format." + "Supported format is 'mbstream' or 'xbstream'.", + (G_PTR *) &xtrabackup_stream_str, (G_PTR *) &xtrabackup_stream_str, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + + {"compress", OPT_XTRA_COMPRESS, + "Compress individual backup files using the " + "specified compression algorithm. Currently the only supported algorithm " + "is 'quicklz'. It is also the default algorithm, i.e. the one used when " + "--compress is used without an argument.", + (G_PTR *) &xtrabackup_compress_alg, (G_PTR *) &xtrabackup_compress_alg, 0, + GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + + {"compress-threads", OPT_XTRA_COMPRESS_THREADS, + "Number of threads for parallel data compression. The default value is " + "1.", + (G_PTR *) &xtrabackup_compress_threads, + (G_PTR *) &xtrabackup_compress_threads, 0, GET_UINT, REQUIRED_ARG, 1, 1, + UINT_MAX, 0, 0, 0}, + + {"compress-chunk-size", OPT_XTRA_COMPRESS_CHUNK_SIZE, + "Size of working buffer(s) for compression threads in bytes. The default " + "value is 64K.", + (G_PTR *) &xtrabackup_compress_chunk_size, + (G_PTR *) &xtrabackup_compress_chunk_size, 0, GET_ULL, REQUIRED_ARG, + (1 << 16), 1024, ULONGLONG_MAX, 0, 0, 0}, + + {"incremental-force-scan", OPT_XTRA_INCREMENTAL_FORCE_SCAN, + "Perform a full-scan incremental backup even in the presence of changed " + "page bitmap data", + (G_PTR *) &xtrabackup_incremental_force_scan, + (G_PTR *) &xtrabackup_incremental_force_scan, 0, GET_BOOL, NO_ARG, 0, 0, + 0, 0, 0, 0}, + + {"close_files", OPT_CLOSE_FILES, + "do not keep files opened. Use at your own " + "risk.", + (G_PTR *) &xb_close_files, (G_PTR *) &xb_close_files, 0, GET_BOOL, NO_ARG, + 0, 0, 0, 0, 0, 0}, + + {"core-file", OPT_CORE_FILE, "Write core on fatal signals", 0, 0, 0, + GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"copy-back", OPT_COPY_BACK, + "Copy all the files in a previously made " + "backup from the backup directory to their original locations.", + (uchar *) &xtrabackup_copy_back, (uchar *) &xtrabackup_copy_back, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"move-back", OPT_MOVE_BACK, + "Move all the files in a previously made " + "backup from the backup directory to the actual datadir location. " + "Use with caution, as it removes backup files.", + (uchar *) &xtrabackup_move_back, (uchar *) &xtrabackup_move_back, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"galera-info", OPT_GALERA_INFO, + "This options creates the " + "xtrabackup_galera_info file which contains the local node state at " + "the time of the backup. Option should be used when performing the " + "backup of MariaDB Galera Cluster. Has no effect when backup locks " + "are used to create the backup.", + (uchar *) &opt_galera_info, (uchar *) &opt_galera_info, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"slave-info", OPT_SLAVE_INFO, + "This option is useful when backing " + "up a replication slave server. It prints the binary log position " + "and name of the master server. It also writes this information to " + "the \"xtrabackup_slave_info\" file as a \"CHANGE MASTER\" command. " + "A new slave for this master can be set up by starting a slave server " + "on this backup and issuing a \"CHANGE MASTER\" command with the " + "binary log position saved in the \"xtrabackup_slave_info\" file.", + (uchar *) &opt_slave_info, (uchar *) &opt_slave_info, 0, GET_BOOL, NO_ARG, + 0, 0, 0, 0, 0, 0}, + + {"no-lock", OPT_NO_LOCK, + "Use this option to disable table lock " + "with \"FLUSH TABLES WITH READ LOCK\". Use it only if ALL your " + "tables are InnoDB and you DO NOT CARE about the binary log " + "position of the backup. This option shouldn't be used if there " + "are any DDL statements being executed or if any updates are " + "happening on non-InnoDB tables (this includes the system MyISAM " + "tables in the mysql database), otherwise it could lead to an " + "inconsistent backup. If you are considering to use --no-lock " + "because your backups are failing to acquire the lock, this could " + "be because of incoming replication events preventing the lock " + "from succeeding. Please try using --safe-slave-backup to " + "momentarily stop the replication slave thread, this may help " + "the backup to succeed and you then don't need to resort to " + "using this option.", + (uchar *) &opt_no_lock, (uchar *) &opt_no_lock, 0, GET_BOOL, NO_ARG, 0, 0, + 0, 0, 0, 0}, + + {"safe-slave-backup", OPT_SAFE_SLAVE_BACKUP, + "Stop slave SQL thread " + "and wait to start backup until Slave_open_temp_tables in " + "\"SHOW STATUS\" is zero. If there are no open temporary tables, " + "the backup will take place, otherwise the SQL thread will be " + "started and stopped until there are no open temporary tables. " + "The backup will fail if Slave_open_temp_tables does not become " + "zero after --safe-slave-backup-timeout seconds. The slave SQL " + "thread will be restarted when the backup finishes.", + (uchar *) &opt_safe_slave_backup, (uchar *) &opt_safe_slave_backup, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"rsync", OPT_RSYNC, + "Uses the rsync utility to optimize local file " + "transfers. When this option is specified, innobackupex uses rsync " + "to copy all non-InnoDB files instead of spawning a separate cp for " + "each file, which can be much faster for servers with a large number " + "of databases or tables. This option cannot be used together with " + "--stream.", + (uchar *) &opt_rsync, (uchar *) &opt_rsync, 0, GET_BOOL, NO_ARG, 0, 0, 0, + 0, 0, 0}, + + {"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS, + "This " + "option, when specified, makes --copy-back or --move-back transfer " + "files to non-empty directories. Note that no existing files will be " + "overwritten. If --copy-back or --nove-back has to copy a file from " + "the backup directory which already exists in the destination " + "directory, it will still fail with an error.", + (uchar *) &opt_force_non_empty_dirs, (uchar *) &opt_force_non_empty_dirs, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"no-version-check", OPT_NO_VERSION_CHECK, + "This option disables the " + "version check which is enabled by the --version-check option.", + (uchar *) &opt_noversioncheck, (uchar *) &opt_noversioncheck, 0, GET_BOOL, + NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"no-backup-locks", OPT_NO_BACKUP_LOCKS, + "This option controls if " + "backup locks should be used instead of FLUSH TABLES WITH READ LOCK " + "on the backup stage. The option has no effect when backup locks are " + "not supported by the server. This option is enabled by default, " + "disable with --no-backup-locks.", + (uchar *) &opt_no_backup_locks, (uchar *) &opt_no_backup_locks, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"decompress", OPT_DECOMPRESS, + "Decompresses all files with the .qp " + "extension in a backup previously made with the --compress option.", + (uchar *) &opt_decompress, (uchar *) &opt_decompress, 0, GET_BOOL, NO_ARG, + 0, 0, 0, 0, 0, 0}, + + {"user", 'u', + "This option specifies the MySQL username used " + "when connecting to the server, if that's not the current user. " + "The option accepts a string argument. See mysql --help for details.", + (uchar *) &opt_user, (uchar *) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"host", 'H', + "This option specifies the host to use when " + "connecting to the database server with TCP/IP. The option accepts " + "a string argument. See mysql --help for details.", + (uchar *) &opt_host, (uchar *) &opt_host, 0, GET_STR, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"port", 'P', + "This option specifies the port to use when " + "connecting to the database server with TCP/IP. The option accepts " + "a string argument. See mysql --help for details.", + &opt_port, &opt_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + + {"password", 'p', + "This option specifies the password to use " + "when connecting to the database. It accepts a string argument. " + "See mysql --help for details.", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + + {"protocol", OPT_PROTOCOL, + "The protocol to use for connection (tcp, socket, pipe, memory).", 0, 0, + 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + + {"socket", 'S', + "This option specifies the socket to use when " + "connecting to the local database server with a UNIX domain socket. " + "The option accepts a string argument. See mysql --help for details.", + (uchar *) &opt_socket, (uchar *) &opt_socket, 0, GET_STR, REQUIRED_ARG, 0, + 0, 0, 0, 0, 0}, + + {"incremental-history-name", OPT_INCREMENTAL_HISTORY_NAME, + "This option specifies the name of the backup series stored in the " + "PERCONA_SCHEMA.xtrabackup_history history record to base an " + "incremental backup on. Xtrabackup will search the history table " + "looking for the most recent (highest innodb_to_lsn), successful " + "backup in the series and take the to_lsn value to use as the " + "starting lsn for the incremental backup. This will be mutually " + "exclusive with --incremental-history-uuid, --incremental-basedir " + "and --incremental-lsn. If no valid lsn can be found (no series by " + "that name, no successful backups by that name) xtrabackup will " + "return with an error. It is used with the --incremental option.", + (uchar *) &opt_incremental_history_name, + (uchar *) &opt_incremental_history_name, 0, GET_STR, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"incremental-history-uuid", OPT_INCREMENTAL_HISTORY_UUID, + "This option specifies the UUID of the specific history record " + "stored in the PERCONA_SCHEMA.xtrabackup_history to base an " + "incremental backup on. --incremental-history-name, " + "--incremental-basedir and --incremental-lsn. If no valid lsn can be " + "found (no success record with that uuid) xtrabackup will return " + "with an error. It is used with the --incremental option.", + (uchar *) &opt_incremental_history_uuid, + (uchar *) &opt_incremental_history_uuid, 0, GET_STR, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"remove-original", OPT_REMOVE_ORIGINAL, + "Remove .qp files after decompression.", (uchar *) &opt_remove_original, + (uchar *) &opt_remove_original, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + + {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, + "This option specifies which types of queries are allowed to complete " + "before innobackupex will issue the global lock. Default is all.", + (uchar *) &opt_lock_wait_query_type, (uchar *) &opt_lock_wait_query_type, + &query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, + 0}, + + {"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE, + "This option specifies which types of queries should be killed to " + "unblock the global lock. Default is \"all\".", + (uchar *) &opt_kill_long_query_type, (uchar *) &opt_kill_long_query_type, + &query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_SELECT, 0, 0, 0, + 0, 0}, + + {"history", OPT_HISTORY, + "This option enables the tracking of backup history in the " + "PERCONA_SCHEMA.xtrabackup_history table. An optional history " + "series name may be specified that will be placed with the history " + "record for the current backup being taken.", + NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + + {"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT, + "This option specifies the number of seconds innobackupex waits " + "between starting FLUSH TABLES WITH READ LOCK and killing those " + "queries that block it. Default is 0 seconds, which means " + "innobackupex will not attempt to kill any queries.", + (uchar *) &opt_kill_long_queries_timeout, + (uchar *) &opt_kill_long_queries_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT, + "This option specifies time in seconds that innobackupex should wait " + "for queries that would block FTWRL before running it. If there are " + "still such queries when the timeout expires, innobackupex terminates " + "with an error. Default is 0, in which case innobackupex does not " + "wait for queries to complete and starts FTWRL immediately.", + (uchar *) &opt_lock_wait_timeout, (uchar *) &opt_lock_wait_timeout, 0, + GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + + {"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD, + "This option specifies the query run time threshold which is used by " + "innobackupex to detect long-running queries with a non-zero value " + "of --ftwrl-wait-timeout. FTWRL is not started until such " + "long-running queries exist. This option has no effect if " + "--ftwrl-wait-timeout is 0. Default value is 60 seconds.", + (uchar *) &opt_lock_wait_threshold, (uchar *) &opt_lock_wait_threshold, 0, + GET_UINT, REQUIRED_ARG, 60, 0, 0, 0, 0, 0}, + + {"debug-sleep-before-unlock", OPT_DEBUG_SLEEP_BEFORE_UNLOCK, + "This is a debug-only option used by the XtraBackup test suite.", + (uchar *) &opt_debug_sleep_before_unlock, + (uchar *) &opt_debug_sleep_before_unlock, 0, GET_UINT, REQUIRED_ARG, 0, 0, + 0, 0, 0, 0}, + + {"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT, + "How many seconds --safe-slave-backup should wait for " + "Slave_open_temp_tables to become zero. (default 300)", + (uchar *) &opt_safe_slave_backup_timeout, + (uchar *) &opt_safe_slave_backup_timeout, 0, GET_UINT, REQUIRED_ARG, 300, + 0, 0, 0, 0, 0}, + + {"binlog-info", OPT_BINLOG_INFO, + "This option controls how XtraBackup should retrieve server's binary log " + "coordinates corresponding to the backup. Possible values are OFF, ON, " + "LOCKLESS and AUTO. See the XtraBackup manual for more information", + &opt_binlog_info, &opt_binlog_info, &binlog_info_typelib, GET_ENUM, + OPT_ARG, BINLOG_INFO_AUTO, 0, 0, 0, 0, 0}, + + {"secure-auth", OPT_XB_SECURE_AUTH, + "Refuse client connecting to server if it" + " uses old (pre-4.1.1) protocol.", + &opt_secure_auth, &opt_secure_auth, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, + 0}, #define MYSQL_CLIENT #include "sslopt-longopts.h" #undef MYSQL_CLIENT - { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} -}; + {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}}; uint xb_client_options_count = array_elements(xb_client_options); @@ -3539,6 +3580,11 @@ xb_register_exclude_filter_entry( &tables_exclude_hash); } +void register_ignore_db_dirs_filter(const char *name) +{ + xb_add_filter(name, &databases_exclude_hash); +} + /*********************************************************************** Register new table for the filter. */ static @@ -3601,26 +3647,24 @@ xb_register_exclude_regex( typedef void (*insert_entry_func_t)(const char*); -/*********************************************************************** -Scan string and load filter entries from it. */ -static -void -xb_load_list_string( -/*================*/ - char* list, /*!< in: string representing a list */ - const char* delimiters, /*!< in: delimiters of entries */ - insert_entry_func_t ins) /*!< in: callback to add entry */ +/* Scan string and load filter entries from it. +@param[in] list string representing a list +@param[in] delimiters delimiters of entries +@param[in] ins callback to add entry */ +void xb_load_list_string(char *list, const char *delimiters, + insert_entry_func_t ins) { - char* p; - char* saveptr; + char *p; + char *saveptr; - p = strtok_r(list, delimiters, &saveptr); - while (p) { + p= strtok_r(list, delimiters, &saveptr); + while (p) + { - ins(p); + ins(p); - p = strtok_r(NULL, delimiters, &saveptr); - } + p= strtok_r(NULL, delimiters, &saveptr); + } } /*********************************************************************** @@ -5429,7 +5473,7 @@ static bool xtrabackup_prepare_func(char** argv) srv_max_dirty_pages_pct_lwm = srv_max_buf_pool_modified_pct; } - if (innodb_init()) { + if (innodb_init()) { goto error_cleanup; } @@ -5451,8 +5495,9 @@ static bool xtrabackup_prepare_func(char** argv) else if (ok) xb_write_galera_info(xtrabackup_incremental); #endif - innodb_shutdown(); - innodb_free_param(); + innodb_shutdown(); + + innodb_free_param(); /* output to metadata file */ if (ok) { diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h index 803cc644733..f18d79aea55 100644 --- a/extra/mariabackup/xtrabackup.h +++ b/extra/mariabackup/xtrabackup.h @@ -195,4 +195,14 @@ void mdl_lock_init(); void mdl_lock_table(ulint space_id); void mdl_unlock_all(); bool ends_with(const char *str, const char *suffix); + +typedef void (*insert_entry_func_t)(const char*); + +/* Scan string and load filter entries from it. +@param[in] list string representing a list +@param[in] delimiters delimiters of entries +@param[in] ins callback to add entry */ +void xb_load_list_string(char *list, const char *delimiters, + insert_entry_func_t ins); +void register_ignore_db_dirs_filter(const char *name); #endif /* XB_XTRABACKUP_H */ diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c index 195ad73a927..c4ed2a9ccd7 100644 --- a/extra/resolve_stack_dump.c +++ b/extra/resolve_stack_dump.c @@ -53,7 +53,7 @@ static struct my_option my_long_options[] = 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"symbols-file", 's', "Use specified symbols file.", &sym_fname, + {"symbols-file", 's', "Use specified symbols file", &sym_fname, &sym_fname, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"numeric-dump-file", 'n', "Read the dump from specified file.", &dump_fname, &dump_fname, 0, GET_STR, REQUIRED_ARG, @@ -63,7 +63,7 @@ static struct my_option my_long_options[] = static void verify_sort(); - +static void clean_up(); static void print_version(void) { @@ -97,9 +97,18 @@ static void die(const char* fmt, ...) vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); va_end(args); + clean_up(); + my_end(0); exit(1); } +void local_exit(int error) +{ + clean_up(); + my_end(0); + exit(error); +} + static my_bool get_one_option(const struct my_option *opt, @@ -109,10 +118,12 @@ get_one_option(const struct my_option *opt, switch(opt->id) { case 'V': print_version(); - exit(0); + local_exit(0); + break; case '?': usage(); - exit(0); + local_exit(0); + break; } return 0; } @@ -123,7 +134,7 @@ static int parse_args(int argc, char **argv) int ho_error; if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option))) - exit(ho_error); + local_exit(ho_error); /* The following code is to make the command compatible with the old @@ -144,13 +155,13 @@ static int parse_args(int argc, char **argv) else { usage(); - exit(1); + local_exit(1); } } else if (argc != 0 || !sym_fname) { usage(); - exit(1); + local_exit(1); } return 0; } @@ -243,6 +254,10 @@ static void init_sym_table() static void clean_up() { delete_dynamic(&sym_table); + if (fp_dump && fp_dump != stdin) + my_fclose(fp_dump, MYF(0)); + if (fp_sym) + my_fclose(fp_sym, MYF(0)); } static void verify_sort() @@ -284,7 +299,7 @@ static SYM_ENTRY* resolve_addr(uchar* addr, SYM_ENTRY* se) /* - Resolve anything that starts with [0x or (+0x or start of line and 0x + Resolve anything that starts with [0x or (+0x or 0x Skip '_end' as this is an indication of a wrong symbol (stack?) */ @@ -300,9 +315,7 @@ static void do_resolve() found= 3; if (p[0] == '(' && p[1] == '+' && p[2] == '0' && p[3] == 'x') found= 4; - - /* For stdin */ - if (p == buf && p[0] == '0' && p[1] == 'x') + if (p[0] == '0' && p[1] == 'x') found= 2; if (found) @@ -313,14 +326,15 @@ static void do_resolve() addr= (uchar*)read_addr(&tmp); if (resolve_addr(addr, &se) && strcmp(se.symbol, "_end")) { - fprintf(fp_out, "%c%p %s + %d", *p, addr, se.symbol, - (int) (addr - se.addr)); + found-= 2; /* Don't print 0x as it's added by %p */ + while (found--) + fputc(*p++, stdout); + fprintf(fp_out, "%p %s + %d", addr, + se.symbol, (int) (addr - se.addr)); p= tmp-1; } else - { fputc(*p, stdout); - } } else fputc(*p, stdout); @@ -337,5 +351,6 @@ int main(int argc, char** argv) init_sym_table(); do_resolve(); clean_up(); + my_end(0); return 0; } diff --git a/include/lf.h b/include/lf.h index 933eb4938f8..88ac644c349 100644 --- a/include/lf.h +++ b/include/lf.h @@ -17,7 +17,6 @@ #define INCLUDE_LF_INCLUDED #include <my_atomic.h> -#include <my_cpu.h> C_MODE_START diff --git a/include/my_pthread.h b/include/my_pthread.h index 175731a7b0b..8bdf02a1bac 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -23,8 +23,6 @@ #define ETIME ETIMEDOUT /* For FreeBSD */ #endif -#include <my_atomic.h> - #ifdef __cplusplus #define EXTERNC extern "C" extern "C" { @@ -797,26 +795,6 @@ extern my_bool safe_mutex_deadlock_detector; #define statistic_sub(V,C,L) (V)-=(C) #endif /* SAFE_STATISTICS */ -static inline void thread_safe_increment32(int32 *value) -{ - (void) my_atomic_add32_explicit(value, 1, MY_MEMORY_ORDER_RELAXED); -} - -static inline void thread_safe_decrement32(int32 *value) -{ - (void) my_atomic_add32_explicit(value, -1, MY_MEMORY_ORDER_RELAXED); -} - -static inline void thread_safe_increment64(int64 *value) -{ - (void) my_atomic_add64_explicit(value, 1, MY_MEMORY_ORDER_RELAXED); -} - -static inline void thread_safe_decrement64(int64 *value) -{ - (void) my_atomic_add64_explicit(value, -1, MY_MEMORY_ORDER_RELAXED); -} - /* No locking needed, the counter is owned by the thread */ diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index 8d132212d77..5ffa476fdfb 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -13,7 +13,7 @@ enum Wsrep_service_key_type #else -/* Copyright (c) 2015 MariaDB Corporation Ab +/* Copyright (c) 2015, 2020, MariaDB Corporation Ab 2018 Codership Oy <info@codership.com> This program is free software; you can redistribute it and/or modify @@ -100,7 +100,7 @@ extern struct wsrep_service_st { #define wsrep_is_wsrep_xid(X) wsrep_service->wsrep_is_wsrep_xid_func(X) #define wsrep_xid_seqno(X) wsrep_service->wsrep_xid_seqno_func(X) #define wsrep_xid_uuid(X) wsrep_service->wsrep_xid_uuid_func(X) -#define wsrep_on(X) wsrep_service->wsrep_on_func(X) +#define wsrep_on(thd) (thd) && WSREP_ON && wsrep_service->wsrep_on_func(thd) #define wsrep_prepare_key_for_innodb(A,B,C,D,E,F,G) wsrep_service->wsrep_prepare_key_for_innodb_func(A,B,C,D,E,F,G) #define wsrep_thd_LOCK(T) wsrep_service->wsrep_thd_LOCK_func(T) #define wsrep_thd_UNLOCK(T) wsrep_service->wsrep_thd_UNLOCK_func(T) diff --git a/mysql-test/include/wait_for_line_count_in_file.inc b/mysql-test/include/wait_for_line_count_in_file.inc new file mode 100644 index 00000000000..838a3ff342b --- /dev/null +++ b/mysql-test/include/wait_for_line_count_in_file.inc @@ -0,0 +1,18 @@ +perl; + use strict; + use Time::HiRes qw(sleep); + my $search_count= $ENV{'SEARCH_COUNT'} or die "SEARCH_COUNT not set"; + my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set"; + my $wait_counter= 100; # 10 seconds + while (1) + { + my $cnt= 0; + open(FILE, $search_file) or die("Unable to open '$search_file': $!\n"); + $cnt++ while (<FILE>); + close(FILE); + last if ($cnt == $search_count); + $wait_counter-- or + die "Timeout waiting for $search_count lines in $search_file\n"; + sleep(0.1); + } +EOF diff --git a/mysql-test/lib/My/Tee.pm b/mysql-test/lib/My/Tee.pm index 5985fe33739..8d6b4ddd52f 100644 --- a/mysql-test/lib/My/Tee.pm +++ b/mysql-test/lib/My/Tee.pm @@ -10,7 +10,7 @@ sub PUSHED open($copyfh, '>', "$::opt_vardir/log/stdout.log") or die "open(>$::opt_vardir/log/stdout.log): $!" unless $copyfh; - bless { }, shift; + bless { }, shift; } sub WRITE diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 44074d0838d..17b847b3b5a 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -20,7 +20,9 @@ # same name. package mtr_report; + use strict; +use Sys::Hostname; use base qw(Exporter); our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line @@ -253,6 +255,7 @@ sub mtr_report_stats ($$$$) { # Find out how we where doing # ---------------------------------------------------------------------- + my $tot_disabled = 0; my $tot_skipped= 0; my $tot_skipdetect= 0; my $tot_passed= 0; @@ -273,6 +276,7 @@ sub mtr_report_stats ($$$$) { { # Test was skipped (disabled not counted) $tot_skipped++ unless $tinfo->{'disable'}; + $tot_disabled++ if $tinfo->{'disable'}; $tot_skipdetect++ if $tinfo->{'skip_detected_by_test'}; } elsif ( $tinfo->{'result'} eq 'MTR_RES_PASSED' ) @@ -402,6 +406,92 @@ sub mtr_report_stats ($$$$) { print "All $tot_tests tests were successful.\n\n"; } + if ($::opt_xml_report) { + my $xml_report = ""; + my @sorted_tests = sort {$a->{'name'} cmp $b->{'name'}} @$tests; + my $last_suite = ""; + my $current_suite = ""; + my $timest = isotime(time); + my %suite_totals; + my %suite_time; + my %suite_tests; + my %suite_failed; + my %suite_disabled; + my %suite_skipped; + my $host = hostname; + my $suiteNo = 0; + + # loop through test results to count totals + foreach my $test ( @sorted_tests ) { + $current_suite = $test->{'suite'}->{'name'}; + + if ($test->{'timer'} eq "") { + $test->{'timer'} = 0; + } + + $suite_time{$current_suite} = $suite_time{$current_suite} + $test->{'timer'}; + $suite_tests{$current_suite} = $suite_tests{$current_suite} + 1; + + if ($test->{'result'} eq "MTR_RES_FAILED") { + $suite_failed{$current_suite} = $suite_failed{$current_suite} + 1; + } elsif ($test->{'result'} eq "MTR_RES_SKIPPED" && $test->{'disable'}) { + $suite_disabled{$current_suite} = $suite_disabled{$current_suite} + 1; + } elsif ($test->{'result'} eq "MTR_RES_SKIPPED") { + $suite_skipped{$current_suite} = $suite_skipped{$current_suite} + 1; + } + + $suite_totals{"all_time"} = $suite_totals{"all_time"} + $test->{'timer'}; + } + + my $all_time = sprintf("%.3f", $suite_totals{"all_time"} / 1000); + my $suite_time = 0; + my $test_time = 0; + + # generate xml + $xml_report = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; + $xml_report .= qq(<testsuites disabled="$tot_disabled" errors="" failures="$tot_failed" name="" tests="$tot_tests" time="$all_time">\n); + + foreach my $test ( @sorted_tests ) { + $current_suite = $test->{'suite'}->{'name'}; + + if ($current_suite ne $last_suite) { + if ($last_suite ne "") { + $xml_report .= "\t</testsuite>\n"; + $suiteNo++; + } + + $suite_time = sprintf("%.3f", $suite_time{$current_suite} / 1000); + $xml_report .= qq(\t<testsuite disabled="$suite_disabled{$current_suite}" errors="" failures="$suite_failed{$current_suite}" hostname="$host" id="$suiteNo" name="$current_suite" package="" skipped="$suite_skipped{$current_suite}" tests="$suite_tests{$current_suite}" time="$suite_time" timestamp="$timest">\n); + $last_suite = $current_suite; + } + + $test_time = sprintf("%.3f", $test->{timer} / 1000); + $xml_report .= qq(\t\t<testcase assertions="" classname="$current_suite" name="$test->{'name'}" status="$test->{'result'}" time="$test_time"); + + my $comment = $test->{'comment'}; + $comment =~ s/[\"]//g; + + if ($test->{'result'} eq "MTR_RES_FAILED") { + $xml_report .= qq(>\n\t\t\t<failure message="" type="$test->{'result'}">\n<![CDATA[$test->{'logfile'}]]>\n\t\t\t</failure>\n\t\t</testcase>\n); + } elsif ($test->{'result'} eq "MTR_RES_SKIPPED" && $test->{'disable'}) { + $xml_report .= qq(>\n\t\t\t<disabled message="$comment" type="$test->{'result'}"/>\n\t\t</testcase>\n); + } elsif ($test->{'result'} eq "MTR_RES_SKIPPED") { + $xml_report .= qq(>\n\t\t\t<skipped message="$comment" type="$test->{'result'}"/>\n\t\t</testcase>\n); + } else { + $xml_report .= " />\n"; + } + } + + $xml_report .= "\t</testsuite>\n</testsuites>\n"; + + # save to file + my $xml_file = $::opt_xml_report; + + open XML_FILE, ">", $xml_file or die "Cannot create file $xml_file: $!"; + print XML_FILE $xml_report; + close XML_FILE; + } + if (@$extra_warnings) { print <<MSG; diff --git a/mysql-test/main/cast.result b/mysql-test/main/cast.result index 977b34ea815..6f6de3c8e79 100644 --- a/mysql-test/main/cast.result +++ b/mysql-test/main/cast.result @@ -759,8 +759,8 @@ SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)), CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED)); Warnings: -Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999' -Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999' +Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...' +Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/main/column_compression.result b/mysql-test/main/column_compression.result index d9cc4aafac2..01f906b5f31 100644 --- a/mysql-test/main/column_compression.result +++ b/mysql-test/main/column_compression.result @@ -2664,6 +2664,15 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1 # +# MDEV-21348 - Memory leak in Storage-Engine Independent Column +# Compression +# +CREATE TABLE t1(a BLOB COMPRESSED); +SET column_compression_threshold=0; +INSERT INTO t1 VALUES('aa'); +SET column_compression_threshold=DEFAULT; +DROP TABLE t1; +# # End of 10.3 tests # # diff --git a/mysql-test/main/column_compression.test b/mysql-test/main/column_compression.test index bf311cb5097..2ae50be95d2 100644 --- a/mysql-test/main/column_compression.test +++ b/mysql-test/main/column_compression.test @@ -257,6 +257,16 @@ CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED); CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED); --echo # +--echo # MDEV-21348 - Memory leak in Storage-Engine Independent Column +--echo # Compression +--echo # +CREATE TABLE t1(a BLOB COMPRESSED); +SET column_compression_threshold=0; +INSERT INTO t1 VALUES('aa'); +SET column_compression_threshold=DEFAULT; +DROP TABLE t1; + +--echo # --echo # End of 10.3 tests --echo # diff --git a/mysql-test/main/create_utf8.result b/mysql-test/main/create_utf8.result index e1ccf7a08d7..bb48a0c8ef5 100644 --- a/mysql-test/main/create_utf8.result +++ b/mysql-test/main/create_utf8.result @@ -57,9 +57,9 @@ drop trigger имÑ_триггера_в_кодировке_утф8_длиной_ create trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; -ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66; -ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50() begin end; @@ -71,7 +71,7 @@ drop procedure имÑ_процедуры_в_кодировке_утф8_длинРcreate procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() begin end; -ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49() returns int return 0; @@ -83,7 +83,7 @@ drop function имÑ_функции_в_кодировке_утф8_длиной_Ð create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() returns int return 0; -ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; set names default; diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result index f105330976a..6ff33e6da29 100644 --- a/mysql-test/main/cte_nonrecursive.result +++ b/mysql-test/main/cte_nonrecursive.result @@ -1692,6 +1692,116 @@ connection default; disconnect con1; # End of 10.2 tests # +# MDEV-21673: several references to CTE that uses +# local variables / parameters of SP +# +CREATE TABLE t1 (col1 int); +CREATE TABLE t2 (col1 int, col2 date, col3 varchar(16), col4 int); +CREATE TABLE t3 (col1 int, col2 date); +CREATE TABLE t4 (col1 int, col2 date); +INSERT INTO t1 VALUES (3), (7), (9), (1); +INSERT INTO t2 VALUES +(3,'2019-09-01','AAA',2), (7,'2019-10-01','AAA',4), (3,'2019-10-01','AAA',8), +(1,'2019-10-01','BBB',9), (1,'2019-10-01','AAA',4), (1,'2019-10-01','AAA',6); +INSERT INTO t3 VALUES +(4,'2018-10-01'), (6,'2018-10-01'), (4,'2017-10-01'), (7,'2017-10-01'); +INSERT INTO t4 VALUES +(5,'2018-10-01'), (8,'2017-10-01'), (4,'2017-10-01'); +CREATE OR REPLACE PROCEDURE SP1() +BEGIN +DECLARE p_date date; +DECLARE p_var2 varchar(16); +SET p_date='2019-10-01'; +SET p_var2='AAA'; +WITH cte_first(col) AS +( +SELECT DISTINCT col4 +FROM t1, t2 +WHERE t2.col1 = t1.col1 AND t2.col2 = p_date AND t2.col3 = p_var2 +), +cte2 AS +( +SELECT DISTINCT col2 +FROM t3 +WHERE col1 IN ( SELECT col FROM cte_first ) +), +cte3 AS ( +SELECT distinct t4.col1 +FROM cte2, t4 +WHERE t4.col2 = cte2.col2 AND t4.col1 IN ( SELECT col FROM cte_first ) +) +SELECT * FROM cte3; +END| +CREATE PROCEDURE SP2(IN d date) +BEGIN +DECLARE p_var2 varchar(16); +SET p_var2='AAA'; +WITH cte_first(col) AS +( +SELECT DISTINCT col4 +FROM t1, t2 +WHERE t2.col1 = t1.col1 AND t2.col2 = d AND t2.col3 = p_var2 +), +cte2 AS +( +SELECT DISTINCT col2 +FROM t3 +WHERE col1 IN ( SELECT col FROM cte_first ) +), +cte3 AS ( +SELECT distinct t4.col1 +FROM cte2, t4 +WHERE t4.col2 = cte2.col2 AND t4.col1 IN ( SELECT col FROM cte_first ) +) +SELECT * FROM cte3; +END| +CREATE TABLE t AS +SELECT col4 AS col +FROM t1, t2 +WHERE t2.col1 = t1.col1 AND t2.col2 ='2019-10-01' AND t2.col3 = 'AAA'; +SELECT * FROM t; +col +4 +8 +4 +6 +CREATE TABLE tt AS +SELECT col2 +FROM t3 +WHERE col1 IN ( SELECT col FROM t ); +SELECT * FROM tt; +col2 +2018-10-01 +2018-10-01 +2017-10-01 +SELECT t4.col1 +FROM tt, t4 +WHERE t4.col2 = tt.col2 AND t4.col1 IN ( SELECT col FROM t ); +col1 +8 +4 +DROP TABLE t,tt; +CALL SP1(); +col1 +8 +4 +CALL SP1(); +col1 +8 +4 +CALL SP2('2019-10-01'); +col1 +8 +4 +CALL SP2('2019-10-01'); +col1 +8 +4 +DROP PROCEDURE SP1; +DROP PROCEDURE SP2; +DROP TABLE t1,t2,t3,t4; +# End of 10.3 tests +# # MDEV-20730: Syntax error on SELECT INTO @variable with CTE # with data as (select 1 as id) diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test index b39d6cde8a5..807e2e08bac 100644 --- a/mysql-test/main/cte_nonrecursive.test +++ b/mysql-test/main/cte_nonrecursive.test @@ -1216,6 +1216,109 @@ DROP TABLE test.t; --echo # End of 10.2 tests --echo # +--echo # MDEV-21673: several references to CTE that uses +--echo # local variables / parameters of SP +--echo # + +CREATE TABLE t1 (col1 int); +CREATE TABLE t2 (col1 int, col2 date, col3 varchar(16), col4 int); +CREATE TABLE t3 (col1 int, col2 date); +CREATE TABLE t4 (col1 int, col2 date); +INSERT INTO t1 VALUES (3), (7), (9), (1); +INSERT INTO t2 VALUES + (3,'2019-09-01','AAA',2), (7,'2019-10-01','AAA',4), (3,'2019-10-01','AAA',8), + (1,'2019-10-01','BBB',9), (1,'2019-10-01','AAA',4), (1,'2019-10-01','AAA',6); +INSERT INTO t3 VALUES + (4,'2018-10-01'), (6,'2018-10-01'), (4,'2017-10-01'), (7,'2017-10-01'); +INSERT INTO t4 VALUES + (5,'2018-10-01'), (8,'2017-10-01'), (4,'2017-10-01'); + +DELIMITER |; + +CREATE OR REPLACE PROCEDURE SP1() +BEGIN +DECLARE p_date date; +DECLARE p_var2 varchar(16); +SET p_date='2019-10-01'; +SET p_var2='AAA'; +WITH cte_first(col) AS +( + SELECT DISTINCT col4 + FROM t1, t2 + WHERE t2.col1 = t1.col1 AND t2.col2 = p_date AND t2.col3 = p_var2 +), +cte2 AS +( + SELECT DISTINCT col2 + FROM t3 + WHERE col1 IN ( SELECT col FROM cte_first ) +), +cte3 AS ( + SELECT distinct t4.col1 + FROM cte2, t4 + WHERE t4.col2 = cte2.col2 AND t4.col1 IN ( SELECT col FROM cte_first ) +) +SELECT * FROM cte3; +END| + +CREATE PROCEDURE SP2(IN d date) +BEGIN +DECLARE p_var2 varchar(16); +SET p_var2='AAA'; +WITH cte_first(col) AS +( + SELECT DISTINCT col4 + FROM t1, t2 + WHERE t2.col1 = t1.col1 AND t2.col2 = d AND t2.col3 = p_var2 +), +cte2 AS +( + SELECT DISTINCT col2 + FROM t3 + WHERE col1 IN ( SELECT col FROM cte_first ) +), +cte3 AS ( + SELECT distinct t4.col1 + FROM cte2, t4 + WHERE t4.col2 = cte2.col2 AND t4.col1 IN ( SELECT col FROM cte_first ) +) +SELECT * FROM cte3; +END| + +DELIMITER ;| + + +CREATE TABLE t AS +SELECT col4 AS col +FROM t1, t2 +WHERE t2.col1 = t1.col1 AND t2.col2 ='2019-10-01' AND t2.col3 = 'AAA'; +SELECT * FROM t; + +CREATE TABLE tt AS +SELECT col2 +FROM t3 +WHERE col1 IN ( SELECT col FROM t ); +SELECT * FROM tt; + +SELECT t4.col1 +FROM tt, t4 +WHERE t4.col2 = tt.col2 AND t4.col1 IN ( SELECT col FROM t ); + +DROP TABLE t,tt; + +CALL SP1(); +CALL SP1(); + +CALL SP2('2019-10-01'); +CALL SP2('2019-10-01'); + +DROP PROCEDURE SP1; +DROP PROCEDURE SP2; +DROP TABLE t1,t2,t3,t4; + +--echo # End of 10.3 tests + +--echo # --echo # MDEV-20730: Syntax error on SELECT INTO @variable with CTE --echo # diff --git a/mysql-test/main/default_storage_engine.result b/mysql-test/main/default_storage_engine.result index da3350c6eaf..38b867c8337 100644 --- a/mysql-test/main/default_storage_engine.result +++ b/mysql-test/main/default_storage_engine.result @@ -1 +1,3 @@ +# Kill the server "all ok" +# restart diff --git a/mysql-test/main/default_storage_engine.test b/mysql-test/main/default_storage_engine.test index dd6f4728f47..cce95cde6d9 100644 --- a/mysql-test/main/default_storage_engine.test +++ b/mysql-test/main/default_storage_engine.test @@ -1,3 +1,4 @@ +--source include/not_embedded.inc if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'innodb' AND PLUGIN_LIBRARY IS NULL`) { --skip Requires built-in InnoDB. @@ -5,6 +6,8 @@ if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'in let $cmd=`select replace("$MYSQLD_BOOTSTRAP_CMD --skip-innodb", " --default-storage-engine=myisam", "")`; +--source include/kill_mysqld.inc + # # Now it *must* fail, because if InnoDB is compiled in, it is used as a default # storage engine. but $cmd includes --skip-innodb @@ -14,3 +17,4 @@ exec $cmd; echo "all ok"; # to not have zero-length result file +--source include/start_mysqld.inc diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result index 8264e311f93..006f41236f5 100644 --- a/mysql-test/main/derived.result +++ b/mysql-test/main/derived.result @@ -217,7 +217,7 @@ a 2 drop table t1; select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mx...' at line 1 create table t1 (a int); insert into t1 values (1),(2),(3); update (select * from t1) as t1 set a = 5; diff --git a/mysql-test/main/drop.result b/mysql-test/main/drop.result index 6bbaba950bf..b239dce4e62 100644 --- a/mysql-test/main/drop.result +++ b/mysql-test/main/drop.result @@ -31,13 +31,13 @@ table7, table8, table9, table10, table11, table12, table13, table14, table15, table16, table17, table18, table19, table20, table21, table22, table23, table24, table25, table26, table27, table28; -ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table' +ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.ta...' drop table table1, table2, table3, table4, table5, table6, table7, table8, table9, table10, table11, table12, table13, table14, table15, table16, table17, table18, table19, table20, table21, table22, table23, table24, table25, table26, table27, table28, table29, table30; -ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table' +ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.ta...' use test; drop database mysqltest; flush tables with read lock; diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result index 4660cdc72e1..4241c10d96c 100644 --- a/mysql-test/main/dyncol.result +++ b/mysql-test/main/dyncol.result @@ -1261,7 +1261,7 @@ select id from t1 where column_get(str,4 as char(100)) = repeat("a", 100); id 5 Warnings: -Warning 1292 Truncated incorrect CHAR(100) value: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +Warning 1292 Truncated incorrect CHAR(100) value: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' update t1 set str=column_add(str, 4, repeat("b", 10000)) where id=5; select id from t1 where column_get(str,4 as char(100000)) = repeat("b", 10000); id diff --git a/mysql-test/main/errors.result b/mysql-test/main/errors.result index ba05a2b37d4..78695b07b8e 100644 --- a/mysql-test/main/errors.result +++ b/mysql-test/main/errors.result @@ -170,10 +170,23 @@ UPDATE t1 SET a = 'new' WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL; ERROR 22007: Illegal value used as argument of dynamic column function drop table t1; +set @max_session_mem_used_save= @@max_session_mem_used; set max_session_mem_used = 50000; select * from seq_1_to_1000; set max_session_mem_used = 8192; select * from seq_1_to_1000; +set max_session_mem_used = @max_session_mem_used_save; +# +# MDEV-20604: Duplicate key value is silently truncated to 64 +# characters in print_keydup_error +# +create table t1 (a varchar(100), UNIQUE KEY akey (a)); +insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end"); +# The value in the error message should show truncation with "..." +insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end"); +ERROR 23000: Duplicate entry '1234567890123456789012345678901234567890123456789012345678901...' for key 'akey' +drop table t1; +# End of 10.2 tests # # MDEV-14269 errors.test fails with valgrind (Conditional jump or move depends on uninitialised value) # @@ -182,3 +195,4 @@ SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,nu ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728' SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null); ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728' +# End of 10.3 tests diff --git a/mysql-test/main/errors.test b/mysql-test/main/errors.test index 73d94d10382..f3aedc8e491 100644 --- a/mysql-test/main/errors.test +++ b/mysql-test/main/errors.test @@ -203,6 +203,8 @@ drop table t1; # # errors caused by max_session_mem_used # +set @max_session_mem_used_save= @@max_session_mem_used; + --disable_result_log set max_session_mem_used = 50000; --error 0,ER_OPTION_PREVENTS_STATEMENT @@ -214,6 +216,24 @@ select * from seq_1_to_1000; # We may not be able to execute any more queries with this connection # because of too little memory# +set max_session_mem_used = @max_session_mem_used_save; + +--echo # +--echo # MDEV-20604: Duplicate key value is silently truncated to 64 +--echo # characters in print_keydup_error +--echo # + +create table t1 (a varchar(100), UNIQUE KEY akey (a)); + +insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end"); +--echo # The value in the error message should show truncation with "..." +--error ER_DUP_ENTRY +insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end"); + +drop table t1; + + +--echo # End of 10.2 tests --echo # --echo # MDEV-14269 errors.test fails with valgrind (Conditional jump or move depends on uninitialised value) @@ -224,3 +244,5 @@ SET NAMES utf8; SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,null); --error ER_DATA_OUT_OF_RANGE SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null); + +-- echo # End of 10.3 tests diff --git a/mysql-test/main/events_2.result b/mysql-test/main/events_2.result index 6dd1a9e5dc6..ec8dc0ff305 100644 --- a/mysql-test/main/events_2.result +++ b/mysql-test/main/events_2.result @@ -348,7 +348,7 @@ drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_бо create event очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 on schedule every 2 year do select 1; -ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длин...' is too long create event event_35981 on schedule every 6 month on completion preserve disable do diff --git a/mysql-test/main/frm-debug.result b/mysql-test/main/frm-debug.result index 332d7e00a8f..caf344e241d 100644 --- a/mysql-test/main/frm-debug.result +++ b/mysql-test/main/frm-debug.result @@ -13,8 +13,8 @@ CREATE TABLE t1 (c01 INT, c02 CHAR(20), c03 TEXT, c04 DOUBLE); Warnings: Note 1105 build_frm_image: Field data type info length: 14 Note 1105 DBUG: [0] name='c01' type_info='' -Note 1105 DBUG: [1] name='c02' type_info='xchar' -Note 1105 DBUG: [2] name='c03' type_info='xblob' +Note 1105 DBUG: [1] name='c02' type_info='xc...' +Note 1105 DBUG: [2] name='c03' type_info='xb...' Note 1105 DBUG: [3] name='c04' type_info='' SET SESSION debug_dbug="-d,frm_data_type_info_emulate"; SET SESSION debug_dbug="-d,frm_data_type_info"; diff --git a/mysql-test/main/fulltext.result b/mysql-test/main/fulltext.result index 3f4223eee07..dbc08144e30 100644 --- a/mysql-test/main/fulltext.result +++ b/mysql-test/main/fulltext.result @@ -776,3 +776,14 @@ CREATE FULLTEXT INDEX IF NOT EXISTS ft1 ON t1(title); Warnings: Note 1061 Duplicate key name 'ft1' DROP TABLE t1; +# +# MDEV-22275 (Memory leak) +# +CREATE TEMPORARY TABLE tmp (a TEXT) ENGINE=MyISAM; +ALTER TABLE tmp ADD FULLTEXT (a); +INSERT INTO tmp VALUES ('foo'); +DROP TABLE tmp; +CREATE TEMPORARY TABLE tmp (a TEXT) ENGINE=Aria; +ALTER TABLE tmp ADD FULLTEXT (a); +INSERT INTO tmp VALUES ('foo'); +DROP TABLE tmp; diff --git a/mysql-test/main/fulltext.test b/mysql-test/main/fulltext.test index 2e53ce7f112..d52f13ab978 100644 --- a/mysql-test/main/fulltext.test +++ b/mysql-test/main/fulltext.test @@ -716,3 +716,17 @@ CREATE TABLE t1 ( CREATE FULLTEXT INDEX IF NOT EXISTS ft1 ON t1(title); CREATE FULLTEXT INDEX IF NOT EXISTS ft1 ON t1(title); DROP TABLE t1; + +--echo # +--echo # MDEV-22275 (Memory leak) +--echo # + +CREATE TEMPORARY TABLE tmp (a TEXT) ENGINE=MyISAM; +ALTER TABLE tmp ADD FULLTEXT (a); +INSERT INTO tmp VALUES ('foo'); +DROP TABLE tmp; + +CREATE TEMPORARY TABLE tmp (a TEXT) ENGINE=Aria; +ALTER TABLE tmp ADD FULLTEXT (a); +INSERT INTO tmp VALUES ('foo'); +DROP TABLE tmp; diff --git a/mysql-test/main/func_gconcat.result b/mysql-test/main/func_gconcat.result index dcc15e78e17..e0da659f750 100644 --- a/mysql-test/main/func_gconcat.result +++ b/mysql-test/main/func_gconcat.result @@ -1329,7 +1329,7 @@ select group_concat(grp limit "sdjadjs") from t1 select grp,group_concat(c limit 5.5) from t1 group by grp ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"sdjadjs") from t1 --error ER_PARSE_ERROR -select grp,group_concat(c limit 5.5) f' at line 1 +select grp,group_concat(c limit 5.5...' at line 1 select grp,group_concat(distinct c limit 1,10 ) from t1 group by grp; grp group_concat(distinct c limit 1,10 ) 1 c diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result index 82dbb062e20..088ddf22e59 100644 --- a/mysql-test/main/func_group.result +++ b/mysql-test/main/func_group.result @@ -2111,8 +2111,8 @@ avg(export_set( 3, 'y', sha(i))) group_concat(d) 0 2008-10-02 0 2010-12-12 Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'y,y,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428ab,3' -Warning 1292 Truncated incorrect DOUBLE value: 'y,y,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b0,d' +Warning 1292 Truncated incorrect DOUBLE value: 'y,y,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428ab,356a192b7913b04c54574d18c28d46e6395428a...' +Warning 1292 Truncated incorrect DOUBLE value: 'y,y,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b0,da4b9237bacccdf19c0760cab7aec4a8359010b...' drop table t1; # # MDEV-4290: crash in st_select_lex::mark_as_dependent diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result index af76bcdb72c..50936e10cb6 100644 --- a/mysql-test/main/func_math.result +++ b/mysql-test/main/func_math.result @@ -727,7 +727,7 @@ foo 2 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '53064635.445796e3130837' -Warning 1292 Truncated incorrect DOUBLE value: '179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,' +Warning 1292 Truncated incorrect DOUBLE value: '179,769,313,486,231,570,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0...' # # Bug #58137 char(0) column cause: # my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed @@ -939,13 +939,13 @@ STDDEV_SAMP(EXPORT_SET(t1, -1379790335835635712, (i1 + 'o'), (MD5(d1)))) NULL Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: '98e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde242' +Warning 1292 Truncated incorrect DOUBLE value: '98e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde24200f376303-13797903358356357128e466c7ff40fe6b95cde...' Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315' +Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e315457d879863c6ccf2ddee5562fc24-1379790335835635712e...' Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: '7b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b527974-1379790335835635712b4dd517b6' +Warning 1292 Truncated incorrect DOUBLE value: '7b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b5279747b4dd517b633f1f6304b773523b527974-1379790335835635712b4dd51...' Warning 1292 Truncated incorrect DOUBLE value: 'o' -Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e1' +Warning 1292 Truncated incorrect DOUBLE value: '-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b0e107767ea830fd3318893e40412a43-1379790335835635712b...' DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(128)); INSERT INTO t1 VALUES ('1e310'); diff --git a/mysql-test/main/func_misc.result b/mysql-test/main/func_misc.result index 2db9a8e0957..260fcaa9116 100644 --- a/mysql-test/main/func_misc.result +++ b/mysql-test/main/func_misc.result @@ -815,13 +815,13 @@ select release_lock(repeat('a', 192)); release_lock(repeat('a', 192)) 1 select get_lock(repeat('a', 193), 0); -ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long select is_used_lock(repeat('a', 193)); -ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long select is_free_lock(repeat('a', 193)); -ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long select release_lock(repeat('a', 193)); -ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long +ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long # -- # -- WL#5787: IPv6-capable INET_ATON and INET_NTOA functions. diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result index 8372b8b2206..95f4a3f2f79 100644 --- a/mysql-test/main/gis.result +++ b/mysql-test/main/gis.result @@ -2265,6 +2265,13 @@ st_astext(p) POINT(0 0) drop table t1; # +# MDEV-21056 Memory leak after query with DEFAULT on a geometry field +# +CREATE TABLE t1 (f POINT DEFAULT ST_GEOMFROMTEXT('Point(0 0)')); +SELECT ST_GEOMFROMTEXT('Point(1 1)') IN ( DEFAULT( `f` ), ST_GEOMFROMTEXT('Point(2 2)') ) AS x FROM t1; +x +DROP TABLE t1; +# # End of 10.2 tests # # diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test index 3249b2579d3..c18966bc0fb 100644 --- a/mysql-test/main/gis.test +++ b/mysql-test/main/gis.test @@ -1796,6 +1796,14 @@ select st_astext(p) from t1; drop table t1; --echo # +--echo # MDEV-21056 Memory leak after query with DEFAULT on a geometry field +--echo # + +CREATE TABLE t1 (f POINT DEFAULT ST_GEOMFROMTEXT('Point(0 0)')); +SELECT ST_GEOMFROMTEXT('Point(1 1)') IN ( DEFAULT( `f` ), ST_GEOMFROMTEXT('Point(2 2)') ) AS x FROM t1; +DROP TABLE t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index e8efb8c9ef4..2b9609b51af 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -1128,7 +1128,7 @@ USE test; connection default; disconnect master; create user longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) CREATE DATABASE mysqltest1; CREATE TABLE mysqltest1.t1 ( int_field INTEGER UNSIGNED NOT NULL, @@ -1214,27 +1214,27 @@ DROP USER mysqltest_1@localhost; DROP DATABASE mysqltest1; USE test; GRANT CREATE ON mysqltest.* TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) REVOKE CREATE ON mysqltest.* FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) REVOKE CREATE ON mysqltest.* FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) GRANT CREATE ON t1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) GRANT CREATE ON t1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) REVOKE CREATE ON t1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) REVOKE CREATE ON t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) GRANT EXECUTE ON PROCEDURE p1 TO longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) GRANT EXECUTE ON PROCEDURE p1 TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) REVOKE EXECUTE ON PROCEDURE p1 FROM longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) CREATE USER bug23556@localhost; @@ -1709,7 +1709,7 @@ drop database mysqltest1; End of 5.0 tests set names utf8; grant select on test.* to очень_длинный_юзер890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@localhost; -ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890123' is too long for user name (should be no longer than 80) +ERROR HY000: String 'очень_длинный_юзер890123456789012345678901234567890...' is too long for user name (should be no longer than 80) set names default; create database mysqltest; use mysqltest; diff --git a/mysql-test/main/grant_lowercase.result b/mysql-test/main/grant_lowercase.result index a87f74721bc..0686977f55f 100644 --- a/mysql-test/main/grant_lowercase.result +++ b/mysql-test/main/grant_lowercase.result @@ -4,7 +4,7 @@ grant select on `a%`.* to user1@localhost with grant option; connect conn1,localhost,user1,,; connection conn1; grant file on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.* to 'user'@'%' identified by 'secret'; -ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' connection default; disconnect conn1; drop user user1@localhost; diff --git a/mysql-test/main/index_merge_myisam.result b/mysql-test/main/index_merge_myisam.result index c1597e583a4..eee12a3811f 100644 --- a/mysql-test/main/index_merge_myisam.result +++ b/mysql-test/main/index_merge_myisam.result @@ -1693,41 +1693,8 @@ id select_type table type possible_keys key key_len ref rows Extra DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; # -# MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union +# MDEV-21932: ROR union with index_merge_sort_union=off # -create table t0 -( -key1 int not null, -INDEX i1(key1) -); -insert into t0 select * from seq_1_to_1024; -alter table t0 add key2 int not null, add index i2(key2); -alter table t0 add key3 int not null, add index i3(key3); -alter table t0 add key8 int not null, add index i8(key8); -update t0 set key2=key1,key3=key1,key8=1024-key1; -analyze table t0; -Table Op Msg_type Msg_text -test.t0 analyze status Engine-independent statistics collected -test.t0 analyze status OK -set @optimizer_switch_save=@@optimizer_switch; -set optimizer_switch='derived_merge=off,derived_with_keys=off'; -explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where -2 DERIVED t0 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where -select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -key1 key2 key3 key8 -3 3 3 1021 -set optimizer_use_condition_selectivity=2; -explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where -2 DERIVED t0 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where -select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -key1 key2 key3 key8 -3 3 3 1021 -set @@optimizer_switch= @optimizer_switch_save; -drop table t0; create table t0 (a int); insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t0 select a+10 from t0; @@ -1779,3 +1746,40 @@ f1 f2 f3 f4 9 0 2 6 drop table t0,t1; set optimizer_switch= @optimizer_switch_save; +# +# MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union +# +create table t0 +( +key1 int not null, +INDEX i1(key1) +); +insert into t0 select * from seq_1_to_1024; +alter table t0 add key2 int not null, add index i2(key2); +alter table t0 add key3 int not null, add index i3(key3); +alter table t0 add key8 int not null, add index i8(key8); +update t0 set key2=key1,key3=key1,key8=1024-key1; +analyze table t0; +Table Op Msg_type Msg_text +test.t0 analyze status Engine-independent statistics collected +test.t0 analyze status OK +set @optimizer_switch_save=@@optimizer_switch; +set optimizer_switch='derived_merge=off,derived_with_keys=off'; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where +2 DERIVED t0 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +key1 key2 key3 key8 +3 3 3 1021 +set optimizer_use_condition_selectivity=2; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where +2 DERIVED t0 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +key1 key2 key3 key8 +3 3 3 1021 +set @@optimizer_switch= @optimizer_switch_save; +drop table t0; +# End of 10.1 tests diff --git a/mysql-test/main/index_merge_myisam.test b/mysql-test/main/index_merge_myisam.test index d172b6b0f61..e35ce567573 100644 --- a/mysql-test/main/index_merge_myisam.test +++ b/mysql-test/main/index_merge_myisam.test @@ -245,36 +245,9 @@ DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; --echo # ---echo # MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union +--echo # MDEV-21932: ROR union with index_merge_sort_union=off --echo # -create table t0 -( - key1 int not null, - INDEX i1(key1) -); - -insert into t0 select * from seq_1_to_1024; -alter table t0 add key2 int not null, add index i2(key2); -alter table t0 add key3 int not null, add index i3(key3); -alter table t0 add key8 int not null, add index i8(key8); - -update t0 set key2=key1,key3=key1,key8=1024-key1; -analyze table t0; - -set @optimizer_switch_save=@@optimizer_switch; -set optimizer_switch='derived_merge=off,derived_with_keys=off'; -explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -set optimizer_use_condition_selectivity=2; -explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; -set @@optimizer_switch= @optimizer_switch_save; -drop table t0; - -# -# MDEV-21932: ROR union with index_merge_sort_union=off -# create table t0 (a int); insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t0 select a+10 from t0; @@ -283,32 +256,69 @@ insert into t0 select a+40 from t0; insert into t0 select a+80 from t0; insert into t0 select a+160 from t0; delete from t0 where a > 300; + create table t1 ( -f1 int, f2 int, f3 int, f4 int, -primary key (f1), key (f3), key(f4) + f1 int, f2 int, f3 int, f4 int, + primary key (f1), key (f3), key(f4) ) engine=myisam; insert into t1 select a+100, a+100, a+100, a+100 from t0; insert into t1 VALUES (9,0,2,6), (9930,0,0,NULL); analyze table t1; + set optimizer_switch='index_merge_sort_union=off'; set optimizer_switch='index_merge_union=on'; -explain select * from t1 -where (( f3 = 1 or f1 = 7 ) and f1 < 10) or -(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); + +let $q1= select * from t1 -where (( f3 = 1 or f1 = 7 ) and f1 < 10) or -(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); + where (( f3 = 1 or f1 = 7 ) and f1 < 10) or + (f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); +eval explain $q1; +eval $q1; + insert into t1 values (52,0,1,0),(53,0,1,0); insert into t1 values (50,0,1,0),(51,0,1,0); insert into t1 values (48,0,1,0),(49,0,1,0); insert into t1 values (46,0,1,0),(47,0,1,0); insert into t1 values (44,0,1,0),(45,0,1,0); analyze table t1; -explain select * from t1 -where (( f3 = 1 or f1 = 7 ) and f1 < 10) or -(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); + +let $q2= select * from t1 -where (( f3 = 1 or f1 = 7 ) and f1 < 10) or -(f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); + where (( f3 = 1 or f1 = 7 ) and f1 < 10) or + (f3 between 2 and 2 and ( f3 = 1 or f4 < 7 )); +eval explain $q2; +eval $q2; + drop table t0,t1; + set optimizer_switch= @optimizer_switch_save; + +--echo # +--echo # MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union +--echo # + +create table t0 +( + key1 int not null, + INDEX i1(key1) +); + +insert into t0 select * from seq_1_to_1024; +alter table t0 add key2 int not null, add index i2(key2); +alter table t0 add key3 int not null, add index i3(key3); +alter table t0 add key8 int not null, add index i8(key8); + +update t0 set key2=key1,key3=key1,key8=1024-key1; +analyze table t0; + +set @optimizer_switch_save=@@optimizer_switch; +set optimizer_switch='derived_merge=off,derived_with_keys=off'; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +set optimizer_use_condition_selectivity=2; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +set @@optimizer_switch= @optimizer_switch_save; +drop table t0; + +--echo # End of 10.1 tests diff --git a/mysql-test/main/long_unique.result b/mysql-test/main/long_unique.result index 16e011f2953..f463af8ccea 100644 --- a/mysql-test/main/long_unique.result +++ b/mysql-test/main/long_unique.result @@ -122,7 +122,7 @@ maria sachin insert into t1 values(repeat('s',4000*10)),(repeat('s',4001*10)); insert into t1 values(repeat('m',4000*10)),(repeat('m',4000*10)); -ERROR 23000: Duplicate entry 'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm' for key 'a' +ERROR 23000: Duplicate entry 'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...' for key 'a' insert into t1 values(repeat('m',4001)),(repeat('m',4002)); truncate table t1; insert into t1 values(1),(2),(3),(4),(5),(8),(7); @@ -431,7 +431,7 @@ insert into t1 values(repeat('s',4000*10),100,repeat('s',4000*10),repeat('s',400 repeat('s',400)),(repeat('s',4001*10),1000,repeat('s',4001*10),repeat('s',4001*10), repeat('s',2995)); insert into t1 values(repeat('m',4000*11),10,repeat('s',4000*11),repeat('s',4000*11),repeat('s',2995)); -ERROR 23000: Duplicate entry 'ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss' for key 'e' +ERROR 23000: Duplicate entry 'sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...' for key 'e' truncate table t1; insert into t1 values(1,2,3,4,5),(2,11,22,33,44),(3111,222,333,444,555),(5611,2222,3333,4444,5555); #now some alter commands; @@ -1258,10 +1258,10 @@ insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachi concat(repeat('sachin',10000000),'1')); insert into t1 values(concat(repeat('sachin',10000000),'2'),concat(repeat('sachin',10000000),'2'), concat(repeat('sachin',10000000),'4')); -ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachinsach' for key 'a' +ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'a' insert into t1 values(concat(repeat('sachin',10000000),'3'),concat(repeat('sachin',10000000),'1'), concat(repeat('sachin',10000000),'1')); -ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachinsach' for key 'b' +ERROR 23000: Duplicate entry 'sachinsachinsachinsachinsachinsachinsachinsachinsachinsachins...' for key 'b' drop table t1; #long key unique with different key length create table t1(a blob, unique(a(3000))); @@ -1279,7 +1279,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 value(concat(repeat('s',3000),'1')); insert into t1 value(concat(repeat('s',3000),'2')); -ERROR 23000: Duplicate entry 'ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss' for key 'a' +ERROR 23000: Duplicate entry 'sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...' for key 'a' insert into t1 value(concat(repeat('a',3000),'2')); drop table t1; create table t1(a varchar(4000), b longblob , c varchar(5000), d longblob, diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result index 4ba5c360538..d792b2828b8 100644 --- a/mysql-test/main/multi_update.result +++ b/mysql-test/main/multi_update.result @@ -1081,3 +1081,20 @@ b c 2 0 drop view v1; drop table t0, t1,t2; +# +# MDEV-20515 multi-update tries to position updated table by null reference +# +create or replace table t1 (a int); +insert into t1 values (0), (2); +create or replace table t2 (b int); +insert into t2 values (1), (2); +select * from t1 left join t2 on a = b order by b; +a b +0 NULL +2 2 +update t1 left join t2 on a = b set b= 3 order by b; +select * from t2; +b +1 +3 +drop tables t1, t2; diff --git a/mysql-test/main/multi_update.test b/mysql-test/main/multi_update.test index b09d02cb5aa..8a32f626818 100644 --- a/mysql-test/main/multi_update.test +++ b/mysql-test/main/multi_update.test @@ -1019,3 +1019,18 @@ update v1,t0 set c=1 where b<3 and x=c order by x,b limit 1; select * from v1; drop view v1; drop table t0, t1,t2; + +--echo # +--echo # MDEV-20515 multi-update tries to position updated table by null reference +--echo # +create or replace table t1 (a int); +insert into t1 values (0), (2); + +create or replace table t2 (b int); +insert into t2 values (1), (2); + +select * from t1 left join t2 on a = b order by b; +update t1 left join t2 on a = b set b= 3 order by b; +select * from t2; + +drop tables t1, t2; diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result index b9ffd25ec0b..ec2760ce8a7 100644 --- a/mysql-test/main/mysql.result +++ b/mysql-test/main/mysql.result @@ -177,7 +177,7 @@ ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errn The commands reported in the bug report ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname -ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...' Too long hostname ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) 1 diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index 6c209e1b0d6..7cbcdbad2b2 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -1356,10 +1356,10 @@ The following specify which files/extra groups are read (specified before remain application layer.If set to 0, system dependent default is used. (Automatically configured unless set explicitly) --tcp-keepalive-time=# - Timeout, in milliseconds, with no activity until the - first TCP keep-alive packet is sent.If set to 0, system - dependent default is used. (Automatically configured - unless set explicitly) + Timeout, in seconds, with no activity until the first TCP + keep-alive packet is sent.If set to 0, system dependent + default is used. (Automatically configured unless set + explicitly) --tcp-nodelay Set option TCP_NODELAY (disable Nagle's algorithm) on socket (Defaults to on; use --skip-tcp-nodelay to disable.) diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index f6f55aa935c..bacf205d72c 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -3759,7 +3759,7 @@ DROP TABLE t1; # CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); -mysqldump: Input filename too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +mysqldump: Input filename too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... DROP TABLE t1; CREATE TABLE t2 (a INT) ENGINE=MyISAM; CREATE TABLE t3 (a INT) ENGINE=MyISAM; @@ -5658,9 +5658,27 @@ count(*) 2 drop tables t2, t1; # -# Test for --add-drop-trigger +# MDEV-22037: Add ability to skip content of some tables +# (work around for MDEV-20939) # +use mysql; +# check that all tables we need are not empty +select count(*) >= 1 from mysql.proc; +count(*) >= 1 +1 +select count(*) >= 1 from mysql.db; +count(*) >= 1 +1 +# for proc we have CREATE and INSERT for all other only CREATE +FOUND 1 /INSERT INTO `proc`/ in MDEV-20939.sql +NOT FOUND /INSERT INTO `db`/ in MDEV-20939.sql +FOUND 1 /CREATE TABLE `db`/ in MDEV-20939.sql +FOUND 1 /CREATE TABLE `proc`/ in MDEV-20939.sql use test; +# End of 10.1 tests +# +# Test for --add-drop-trigger +# CREATE TABLE t1 (a int, b int); CREATE TRIGGER tt1_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.b=NEW.a + 10; @@ -5706,6 +5724,7 @@ DELIMITER ; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; DROP TABLE t1; +# End of 10.2 tests # # Test for Invisible columns # @@ -5886,3 +5905,4 @@ invisible int(11) YES NULL a b c & $!@#$%^&*( ) int(11) YES 4 INVISIBLE ds=~!@ \# $% ^ & * ( ) _ - = + int(11) YES 5 INVISIBLE drop database d; +# End of 10.3 tests diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test index 3b06bd0d923..3f8777b9d48 100644 --- a/mysql-test/main/mysqldump.test +++ b/mysql-test/main/mysqldump.test @@ -2700,10 +2700,45 @@ select count(*) from t2; --remove_file $MYSQLTEST_VARDIR/tmp/t2.txt drop tables t2, t1; + --echo # ---echo # Test for --add-drop-trigger +--echo # MDEV-22037: Add ability to skip content of some tables +--echo # (work around for MDEV-20939) --echo # + +use mysql; + +--echo # check that all tables we need are not empty + +select count(*) >= 1 from mysql.proc; +select count(*) >= 1 from mysql.db; + + +--exec $MYSQL_DUMP mysql --ignore-table-data=mysql.db >$MYSQLTEST_VARDIR/tmp/MDEV-20939.sql + + +--echo # for proc we have CREATE and INSERT for all other only CREATE + +let SEARCH_RANGE=500000000; +let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20939.sql; +let SEARCH_PATTERN=INSERT INTO `proc`; +source include/search_pattern_in_file.inc; +let SEARCH_PATTERN=INSERT INTO `db`; +source include/search_pattern_in_file.inc; +let SEARCH_PATTERN=CREATE TABLE `db`; +source include/search_pattern_in_file.inc; +let SEARCH_PATTERN=CREATE TABLE `proc`; +source include/search_pattern_in_file.inc; + +--remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20939.sql use test; + +--echo # End of 10.1 tests + +--echo # +--echo # Test for --add-drop-trigger +--echo # + CREATE TABLE t1 (a int, b int); CREATE TRIGGER tt1_t1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.b=NEW.a + 10; @@ -2711,6 +2746,9 @@ CREATE TRIGGER tt1_t1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 (a) VALUES (1),(2),(3); --exec $MYSQL_DUMP --default-character-set=utf8mb4 --triggers --no-data --no-create-info --add-drop-trigger --skip-comments --databases test DROP TABLE t1; + +--echo # End of 10.2 tests + --echo # --echo # Test for Invisible columns --echo # @@ -2754,3 +2792,5 @@ select * from t2; select * from t3; desc t3; drop database d; + +--echo # End of 10.3 tests diff --git a/mysql-test/main/partition_alter.result b/mysql-test/main/partition_alter.result index ca6359f94de..d946f2b8822 100644 --- a/mysql-test/main/partition_alter.result +++ b/mysql-test/main/partition_alter.result @@ -129,3 +129,26 @@ ERROR HY000: Duplicate partition name p1 alter table t1 add partition (partition p1); ERROR HY000: Duplicate partition name p1 drop table t1; +# +# MDEV-17091 Assertion `old_part_id == m_last_part' failed in +# ha_partition::update_row or `part_id == m_last_part' in +# ha_partition::delete_row upon UPDATE/DELETE after dropping versioning +# +create or replace table t1 (pk int, f int, primary key(pk, f)) engine=innodb +partition by key() partitions 2; +insert into t1 values (1,10),(2,11); +# expected to hit same partition +select * from t1 partition (p0); +pk f +1 10 +2 11 +alter table t1 drop primary key, drop f, add primary key(pk); +# 1 and 2 are expected to be in different partitions +select * from t1 partition(p0); +pk +1 +select * from t1 partition(p1); +pk +2 +delete from t1; +drop table t1; diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test index cd3b4e8d3ce..779f12574d5 100644 --- a/mysql-test/main/partition_alter.test +++ b/mysql-test/main/partition_alter.test @@ -130,3 +130,22 @@ alter table t1 add partition (partition p1); --error ER_SAME_NAME_PARTITION alter table t1 add partition (partition p1); drop table t1; + +--echo # +--echo # MDEV-17091 Assertion `old_part_id == m_last_part' failed in +--echo # ha_partition::update_row or `part_id == m_last_part' in +--echo # ha_partition::delete_row upon UPDATE/DELETE after dropping versioning +--echo # +create or replace table t1 (pk int, f int, primary key(pk, f)) engine=innodb + partition by key() partitions 2; + +insert into t1 values (1,10),(2,11); +--echo # expected to hit same partition +select * from t1 partition (p0); + +alter table t1 drop primary key, drop f, add primary key(pk); +--echo # 1 and 2 are expected to be in different partitions +select * from t1 partition(p0); +select * from t1 partition(p1); +delete from t1; +drop table t1; diff --git a/mysql-test/main/partition_error.result b/mysql-test/main/partition_error.result index 5f42064219b..25c29938f91 100644 --- a/mysql-test/main/partition_error.result +++ b/mysql-test/main/partition_error.result @@ -851,7 +851,7 @@ partition x2 values in (3, 11, 5, 7) tablespace ts2, partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3); ERROR 42000: Partitioning can not be used stand-alone in query near 'partition by list (a) partitions 3 -(partition x1 values in (1,2,9,4) tablespace ' at line 1 +(partition x1 values in (1,2,9,4) tablespa...' at line 1 CREATE TABLE t1 ( a int not null, b int not null, @@ -885,7 +885,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp partitions 3 (partition x1 tablespace ts1, partition x2 tablespace ts2, -part' at line 6 +p...' at line 6 CREATE TABLE t1 ( a int not null, b int not null, @@ -965,7 +965,7 @@ partitions 2 (partition x1 values less than (0), partition x2 values less than (2)); ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ') partitions 2 -(partition x1 values less than (0), partition x2 values less than' at line 6 +(partition x1 values less than (0), partition x2 values less t...' at line 6 CREATE TABLE t1 ( a int not null, b int not null, @@ -1114,7 +1114,7 @@ subpartition by key (a+b) partition x2 values less than (2) (subpartition x21, subpartition x22)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '+b) (partition x1 values less than (1) (subpartition x11, subpartition x12), -par' at line 7 +...' at line 7 CREATE TABLE t1 ( a int not null, b int not null, @@ -1284,7 +1284,7 @@ subpartition x22 nodegroup 1) ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), partition x2 values in (3,5,6) ( subpartition x21 nodegroup 0, -subpartition x' at line 11 +subpartitio...' at line 11 CREATE TABLE t1 ( a int not null, b int not null, @@ -1319,7 +1319,7 @@ subpartition x22 engine myisam) ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'list (a+b) ( partition x1 ( subpartition x11 engine myisam, -subpartition x12 eng' at line 7 +subpartition x12 ...' at line 7 CREATE TABLE t1 ( a int not null, b int not null, @@ -1337,7 +1337,7 @@ subpartition x22 engine myisam values in (1)) ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'list (a+b) ( partition x1 ( subpartition x11 engine myisam values in (0), -subpar' at line 7 +sub...' at line 7 CREATE TABLE t1 ( a int not null, b int not null, diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result index 6abf9331771..837adf472f9 100644 --- a/mysql-test/main/range.result +++ b/mysql-test/main/range.result @@ -2177,6 +2177,26 @@ value1 1003560 12345 value1 1004807 12345 drop table t1; # +# MDEV-22191: Range access is not picked when index_merge_sort_union is turned off +# +set @save_optimizer_switch=@@optimizer_switch; +set @save_optimizer_switch="index_merge_sort_union=OFF"; +CREATE TABLE t1 (a INT, INDEX(a)); +INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +explain +SELECT * FROM t1 WHERE a > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index +SELECT * FROM t1 WHERE a > 5; +a +6 +7 +8 +9 +set @@optimizer_switch=@save_optimizer_switch; +drop table t1; +# End of 5.5 tests +# # BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE # CREATE TABLE t1 (pk INT PRIMARY KEY); diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test index d097a071335..f19ed39e58c 100644 --- a/mysql-test/main/range.test +++ b/mysql-test/main/range.test @@ -1718,6 +1718,22 @@ select * from t1; drop table t1; --echo # +--echo # MDEV-22191: Range access is not picked when index_merge_sort_union is turned off +--echo # + +set @save_optimizer_switch=@@optimizer_switch; +set @save_optimizer_switch="index_merge_sort_union=OFF"; +CREATE TABLE t1 (a INT, INDEX(a)); +INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +explain +SELECT * FROM t1 WHERE a > 5; +SELECT * FROM t1 WHERE a > 5; +set @@optimizer_switch=@save_optimizer_switch; +drop table t1; + +--echo # End of 5.5 tests + +--echo # --echo # BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE --echo # diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result index 56bf67b0e94..be7e89b9fd2 100644 --- a/mysql-test/main/range_innodb.result +++ b/mysql-test/main/range_innodb.result @@ -38,6 +38,33 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 1 SIMPLE t2 range a,b b 5 NULL 201 Using where; Using join buffer (flat, BNL join) drop table t0,t1,t2; +# +# MDEV-10466: constructing an invalid SEL_ARG +# +create table t1 ( +pk int, a int, b int, +primary key (pk), index idx1(b), index idx2(b) +) engine=innodb; +Warnings: +Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release +insert into t1 values (1,6,0),(2,1,0),(3,5,2),(4,8,0); +create table t2 (c int) engine=innodb; +insert into t2 values (1),(2); +create table t3 (d int) engine=innodb; +insert into t3 values (3),(-1),(4); +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; +explain +select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t1 ref PRIMARY,idx1,idx2 idx1 5 const 3 Using index condition +1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) +select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0'; +pk a b +1 6 0 +set optimizer_switch=@save_optimizer_switch; +drop table t1,t2,t3; CREATE TABLE t1 ( pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1), KEY(f1), KEY(f2) @@ -81,6 +108,7 @@ ERROR HY000: Table definition has changed, please retry transaction DROP TABLE t0,t1; SET @@GLOBAL.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; +# End of 10.1 tests # # MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, # [Warning] InnoDB: Using a partial-field key prefix in search @@ -99,3 +127,4 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0; a drop table t1; +# End of 10.4 tests diff --git a/mysql-test/main/range_innodb.test b/mysql-test/main/range_innodb.test index 28fb1df13cb..f79104fde85 100644 --- a/mysql-test/main/range_innodb.test +++ b/mysql-test/main/range_innodb.test @@ -46,6 +46,32 @@ explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250; drop table t0,t1,t2; + +--echo # +--echo # MDEV-10466: constructing an invalid SEL_ARG +--echo # + +create table t1 ( + pk int, a int, b int, + primary key (pk), index idx1(b), index idx2(b) +) engine=innodb; +insert into t1 values (1,6,0),(2,1,0),(3,5,2),(4,8,0); +create table t2 (c int) engine=innodb; +insert into t2 values (1),(2); +create table t3 (d int) engine=innodb; +insert into t3 values (3),(-1),(4); + +set @save_optimizer_switch=@@optimizer_switch; +set optimizer_switch='extended_keys=on'; + +explain +select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0'; +select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0'; + +set optimizer_switch=@save_optimizer_switch; + +drop table t1,t2,t3; + CREATE TABLE t1 ( pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1), KEY(f1), KEY(f2) @@ -89,6 +115,8 @@ DROP TABLE t0,t1; SET @@GLOBAL.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; +--echo # End of 10.1 tests + --echo # --echo # MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, --echo # [Warning] InnoDB: Using a partial-field key prefix in search @@ -107,3 +135,5 @@ INSERT INTO t1 VALUES (1,'a',1),(2,'b',2); explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0; SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0; drop table t1; + +-- echo # End of 10.4 tests diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result index d98f07d3272..cfbb66b06ad 100644 --- a/mysql-test/main/range_mrr_icp.result +++ b/mysql-test/main/range_mrr_icp.result @@ -2180,6 +2180,26 @@ value1 1003560 12345 value1 1004807 12345 drop table t1; # +# MDEV-22191: Range access is not picked when index_merge_sort_union is turned off +# +set @save_optimizer_switch=@@optimizer_switch; +set @save_optimizer_switch="index_merge_sort_union=OFF"; +CREATE TABLE t1 (a INT, INDEX(a)); +INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +explain +SELECT * FROM t1 WHERE a > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 5 NULL 4 Using where; Using index +SELECT * FROM t1 WHERE a > 5; +a +6 +7 +8 +9 +set @@optimizer_switch=@save_optimizer_switch; +drop table t1; +# End of 5.5 tests +# # BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE # CREATE TABLE t1 (pk INT PRIMARY KEY); diff --git a/mysql-test/main/signal.result b/mysql-test/main/signal.result index e329c58a47e..40b1609fc26 100644 --- a/mysql-test/main/signal.result +++ b/mysql-test/main/signal.result @@ -2358,21 +2358,21 @@ DECLARE céèçà foo CONDITION FOR SQLSTATE '12345'; SIGNAL céèçà SET MYSQL_ERRNO = 1000; end $$ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '©Ã¨Ã§Ã foo CONDITION FOR SQLSTATE '12345'; -SIGNAL céèçà SET ' at line 3 +SIGNAL céèçà S...' at line 3 create procedure test_signal() begin DECLARE "céèçà " CONDITION FOR SQLSTATE '12345'; SIGNAL "céèçà " SET MYSQL_ERRNO = 1000; end $$ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"céèçà " CONDITION FOR SQLSTATE '12345'; -SIGNAL "céèçà " S' at line 3 +SIGNAL "céèçà ...' at line 3 create procedure test_signal() begin DECLARE 'céèçà ' CONDITION FOR SQLSTATE '12345'; SIGNAL 'céèçà ' SET MYSQL_ERRNO = 1000; end $$ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''céèçà ' CONDITION FOR SQLSTATE '12345'; -SIGNAL 'céèçà ' S' at line 3 +SIGNAL 'céèçà ...' at line 3 create procedure test_signal() begin DECLARE `céèçà ` CONDITION FOR SQLSTATE '12345'; diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result index 3d4e7895fa4..b7d9a3a5cc8 100644 --- a/mysql-test/main/sp-error.result +++ b/mysql-test/main/sp-error.result @@ -1714,17 +1714,17 @@ DROP TABLE t1; # WITH OBSCURE QUERY # SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999(); -ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long +ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999(); -ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long +ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func(); -ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' +ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc(); -ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' +ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999(); -ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long +ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999(); -ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long +ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222...' is too long End of 5.1 tests # # Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result index f994f6f7fd6..376f44e3b01 100644 --- a/mysql-test/main/sp.result +++ b/mysql-test/main/sp.result @@ -5279,7 +5279,7 @@ CREATE DEFINER=longer_than_80_45678901234567890123456789012345678901234567890123 BEGIN SET @a = 1; END| -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY FUNCTION bug16899_f1() RETURNS INT BEGIN diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result index ab9dbc63888..339394a29c2 100644 --- a/mysql-test/main/trigger.result +++ b/mysql-test/main/trigger.result @@ -1187,7 +1187,7 @@ CREATE TABLE t1(c INT); CREATE TABLE t2(c INT); CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) diff --git a/mysql-test/main/udf.result b/mysql-test/main/udf.result index 6655982a38f..4077a85c813 100644 --- a/mysql-test/main/udf.result +++ b/mysql-test/main/udf.result @@ -552,19 +552,19 @@ pk a sum price avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 select pk, a, sum, price, tttttttt(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) from t1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) -from ' at line 1 +fr...' at line 1 select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) from t1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) -from ' at line 1 +fr...' at line 1 select pk, a, sum, price, round(sprice,sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) from t1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) -from ' at line 1 +fr...' at line 1 select pk, a, sum, price, myfunc_double(sum) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) from t1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) -from ' at line 1 +fr...' at line 1 set @save_sql_mode = @@sql_mode; set sql_mode="oracle"; select pk, a, sum, price, avg2(sum, price) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 0 FOLLOWING) diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result index 496cea70d81..55d95b2bb3b 100644 --- a/mysql-test/main/view.result +++ b/mysql-test/main/view.result @@ -2903,7 +2903,7 @@ DROP VIEW IF EXISTS v2; CREATE TABLE t1(a INT, b INT); CREATE DEFINER=longer_than_80_456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789@localhost VIEW v1 AS SELECT a FROM t1; -ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345678' is too long for user name (should be no longer than 80) +ERROR HY000: String 'longer_than_80_4567890123456789012345678901234567890123456789012345...' is too long for user name (should be no longer than 80) CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY VIEW v2 AS SELECT b FROM t1; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) diff --git a/mysql-test/main/xml.result b/mysql-test/main/xml.result index 25a1193934e..efaca961b4a 100644 --- a/mysql-test/main/xml.result +++ b/mysql-test/main/xml.result @@ -1007,11 +1007,11 @@ Warning 1292 Truncated incorrect INTEGER value: 'string ' Warning 1292 Truncated incorrect INTEGER value: 'string ' DROP PROCEDURE spxml; select UpdateXML('<a>a</a>',repeat('a b ',1000),''); -ERROR HY000: XPATH syntax error: 'b a b a b a b a b a b a b a b a ' +ERROR HY000: XPATH syntax error: 'b a b a b a b a b a b a b a b...' select ExtractValue('<a>a</a>', '/a[@x=@y0123456789_0123456789_0123456789_0123456789]'); -ERROR HY000: XPATH error: comparison of two nodesets is not supported: '=@y0123456789_0123456789_0123456' +ERROR HY000: XPATH error: comparison of two nodesets is not supported: '=@y0123456789_0123456789_0123...' select ExtractValue('<a>a</a>', '/a[@x=$y0123456789_0123456789_0123456789_0123456789]'); -ERROR HY000: Unknown XPATH variable at: '$y0123456789_0123456789_01234567' +ERROR HY000: Unknown XPATH variable at: '$y0123456789_0123456789_01234...' select updatexml(NULL, 1, 1), updatexml(1, NULL, 1), updatexml(1, 1, NULL); updatexml(NULL, 1, 1) updatexml(1, NULL, 1) updatexml(1, 1, NULL) NULL NULL NULL @@ -1110,9 +1110,9 @@ NULL # Bug#57279 updatexml dies with: Assertion failed: str_arg[length] == 0 # SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1); -ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing +ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...' value found during parsing SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1)); -ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing +ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...' value found during parsing # # Bug #44332 my_xml_scan reads behind the end of buffer # diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 0bfe08c73de..dc3177328ee 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -130,6 +130,7 @@ our $path_testlog; our $default_vardir; our $opt_vardir; # Path to use for var/ dir our $plugindir; +our $opt_xml_report; # XML output our $client_plugindir; my $path_vardir_trace; # unix formatted opt_vardir for trace files my $opt_tmpdir; # Path to use for tmp/ dir @@ -627,11 +628,7 @@ sub main { else { my $sys_info= My::SysInfo->new(); - $opt_parallel= $sys_info->num_cpus() + - int($sys_info->min_bogomips()/500) - 4; - for my $limit (2000, 1500, 1000, 500){ - $opt_parallel-- if ($sys_info->min_bogomips() < $limit); - } + $opt_parallel= $sys_info->num_cpus()+int($sys_info->min_bogomips()/500)-4; } my $max_par= $ENV{MTR_MAX_PARALLEL} || 8; $opt_parallel= $max_par if ($opt_parallel > $max_par); @@ -747,7 +744,6 @@ sub main { mtr_print_line(); print_total_times($opt_parallel) if $opt_report_times; - mtr_report_stats($prefix, $fail, $completed, $extra_warnings); if ($opt_gcov) { @@ -1250,6 +1246,7 @@ sub print_global_resfile { resfile_global("warnings", $opt_warnings ? 1 : 0); resfile_global("max-connections", $opt_max_connections); resfile_global("product", "MySQL"); + resfile_global("xml-report", $opt_xml_report); # Somewhat hacky code to convert numeric version back to dot notation my $v1= int($mysql_version_id / 10000); my $v2= int(($mysql_version_id % 10000)/100); @@ -1416,7 +1413,8 @@ sub command_line_setup { 'help|h' => \$opt_usage, # list-options is internal, not listed in help 'list-options' => \$opt_list_options, - 'skip-test-list=s' => \@opt_skip_test_list + 'skip-test-list=s' => \@opt_skip_test_list, + 'xml-report=s' => \$opt_xml_report ); # fix options (that take an optional argument and *only* after = sign @@ -3634,8 +3632,11 @@ sub do_before_run_mysqltest($) # to be able to distinguish them from manually created # version-controlled results, and to ignore them in git. my $dest = "$base_file$suites.result~"; - my @cmd = ($exe_patch, qw/--binary -r - -f -s -o/, - $dest, $base_result, $resfile); + my @cmd = ($exe_patch); + if ($^O eq "MSWin32") { + push @cmd, '--binary'; + } + push @cmd, (qw/-r - -f -s -o/, $dest, $base_result, $resfile); if (-w $resdir) { # don't rebuild a file if it's up to date unless (-e $dest and -M $dest < -M $resfile @@ -6681,6 +6682,7 @@ Misc options phases of test execution. stress=ARGS Run stress test, providing options to mysql-stress-test.pl. Options are separated by comma. + xml-report=<file> Output jUnit xml file of the results. tail-lines=N Number of lines of the result to include in a failure report. diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor-decl.result b/mysql-test/suite/compat/oracle/r/sp-cursor-decl.result index b75b5d5be9d..275e575620b 100644 --- a/mysql-test/suite/compat/oracle/r/sp-cursor-decl.result +++ b/mysql-test/suite/compat/oracle/r/sp-cursor-decl.result @@ -102,7 +102,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp BEGIN var1:=''; insert into t1 values (1); -SELE' at line 10 +S...' at line 10 drop table t1; # # Condition after handler declaration @@ -130,7 +130,7 @@ $$ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'divide_by_zero CONDITION FOR SQLSTATE '22012'; BEGIN var1:=''; -insert into t1 va' at line 11 +insert into t1...' at line 11 drop table t1; # # Variable after handler declaration @@ -158,7 +158,7 @@ $$ ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'divide_by_zero CONDITION FOR SQLSTATE '22012'; BEGIN var1:=''; -insert into t1 va' at line 11 +insert into t1...' at line 11 drop table t1; # # Variable after cursor (inner block) diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor.result b/mysql-test/suite/compat/oracle/r/sp-cursor.result index a09459ad7cd..2e0c43c8b87 100644 --- a/mysql-test/suite/compat/oracle/r/sp-cursor.result +++ b/mysql-test/suite/compat/oracle/r/sp-cursor.result @@ -776,7 +776,7 @@ FETCH c INTO a, b; EXIT WHEN c%NOTFOUND; SELECT a, b; END LOOP; -CLOSE ' at line 5 +CLO...' at line 5 DROP TABLE t1; # # MDEV-10577 sql_mode=ORACLE: %TYPE in variable declarations diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index e7e05016ecb..6004a478f56 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -2099,7 +2099,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -2115,7 +2115,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -2169,7 +2169,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -2185,7 +2185,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -2687,7 +2687,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; @@ -2704,7 +2704,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement DROP VIEW v1; @@ -2761,7 +2761,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; @@ -2778,7 +2778,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement DROP VIEW v1; @@ -3053,7 +3053,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3069,7 +3069,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3123,7 +3123,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3139,7 +3139,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -3414,7 +3414,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; @@ -3434,7 +3434,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3502,7 +3502,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; @@ -3522,7 +3522,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -3782,7 +3782,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 23 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3799,7 +3799,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 23 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3858,7 +3858,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 21 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3875,7 +3875,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 21 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -4136,7 +4136,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4154,7 +4154,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4214,7 +4214,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4232,7 +4232,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4492,7 +4492,7 @@ NULL -1 5 2005-06-27 2005-06-27 11 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4510,7 +4510,7 @@ NULL -1 5 2005-06-27 2005-06-27 11 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4570,7 +4570,7 @@ NULL -1 5 2005-06-27 2005-06-27 9 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4588,7 +4588,7 @@ NULL -1 5 2005-06-27 2005-06-27 9 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 6819e2356c3..33778d60ffc 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -488,8 +488,7 @@ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK SQLSTATE '23000'; END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -' at line 5 +DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5 CREATE PROCEDURE h1 () BEGIN DECLARE x1 INT DEFAULT 0; @@ -522,8 +521,7 @@ SELECT 'end of 1'; end;// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlexception select '1'; select * from tqq; -SELECT 'end of 1'; -' at line 3 +SELECT 'end of 1...' at line 3 create procedure p1 () begin declare exit handler for sqlexception select 'exit handler 1'; diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index b00d1a56c90..90d72b451b9 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -3569,7 +3569,7 @@ DROP VIEW v1; REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 FROM test.tb2 my_table WITH CASCADED CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 +FROM test.tb2 my_table WITH CASCADED CHE...' at line 1 CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 FROM test.tb2 my_table WITH CASCADED CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60 @@ -3598,7 +3598,7 @@ FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 FROM test.tb2 my_table WITH LOCAL CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 +FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1 CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 FROM test.tb2 my_table WITH LOCAL CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60 diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index fc8899375d9..906faee4234 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -2100,7 +2100,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -2116,7 +2116,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -2170,7 +2170,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -2186,7 +2186,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -2688,7 +2688,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; @@ -2705,7 +2705,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement DROP VIEW v1; @@ -2762,7 +2762,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; @@ -2779,7 +2779,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement DROP VIEW v1; @@ -3054,7 +3054,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3070,7 +3070,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3124,7 +3124,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3140,7 +3140,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -3415,7 +3415,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; @@ -3435,7 +3435,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3503,7 +3503,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; @@ -3523,7 +3523,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -3783,7 +3783,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 23 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3800,7 +3800,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 23 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3859,7 +3859,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 21 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3876,7 +3876,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 21 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -4137,7 +4137,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4155,7 +4155,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4215,7 +4215,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4233,7 +4233,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4493,7 +4493,7 @@ NULL -1 5 2005-06-27 2005-06-27 11 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4511,7 +4511,7 @@ NULL -1 5 2005-06-27 2005-06-27 11 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4571,7 +4571,7 @@ NULL -1 5 2005-06-27 2005-06-27 9 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4589,7 +4589,7 @@ NULL -1 5 2005-06-27 2005-06-27 9 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index fe23f9de0c5..6e9615c284f 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -489,8 +489,7 @@ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK SQLSTATE '23000'; END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -' at line 5 +DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5 CREATE PROCEDURE h1 () BEGIN DECLARE x1 INT DEFAULT 0; @@ -523,8 +522,7 @@ SELECT 'end of 1'; end;// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlexception select '1'; select * from tqq; -SELECT 'end of 1'; -' at line 3 +SELECT 'end of 1...' at line 3 create procedure p1 () begin declare exit handler for sqlexception select 'exit handler 1'; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 5ac5c838fb5..417c0e85188 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -3570,7 +3570,7 @@ DROP VIEW v1; REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 FROM test.tb2 my_table WITH CASCADED CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 +FROM test.tb2 my_table WITH CASCADED CHE...' at line 1 CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 FROM test.tb2 my_table WITH CASCADED CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60 @@ -3599,7 +3599,7 @@ FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 FROM test.tb2 my_table WITH LOCAL CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 +FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1 CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 FROM test.tb2 my_table WITH LOCAL CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60 diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index fc8899375d9..906faee4234 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -2100,7 +2100,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -2116,7 +2116,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -2170,7 +2170,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -2186,7 +2186,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 4 IS TRUE -1 5 Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' -Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DOUBLE value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DOUBLE value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -2688,7 +2688,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; @@ -2705,7 +2705,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement DROP VIEW v1; @@ -2762,7 +2762,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement SHOW CREATE VIEW v1; @@ -2779,7 +2779,7 @@ NULL NULL 1 18446744073709551615 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' Note 1105 Cast to unsigned converted negative integer to it's positive complement DROP VIEW v1; @@ -3054,7 +3054,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3070,7 +3070,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3124,7 +3124,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3140,7 +3140,7 @@ NULL NULL 1 -1 -1 5 Warnings: Warning 1292 Truncated incorrect INTEGER value: '' -Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect INTEGER value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -3415,7 +3415,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; @@ -3435,7 +3435,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3503,7 +3503,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; @@ -3523,7 +3523,7 @@ Warnings: Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1918 Encountered illegal value '' when converting to DECIMAL -Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1918 Encountered illegal value '' when converting to DECIMAL Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; @@ -3783,7 +3783,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 23 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3800,7 +3800,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 23 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3859,7 +3859,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 21 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3876,7 +3876,7 @@ NULL ---äÖüß@µ*$-- 4 41:58:00 1 17:58 21 Warnings: Warning 1292 Incorrect time value: '' -Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -4137,7 +4137,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4155,7 +4155,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 17 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4215,7 +4215,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4233,7 +4233,7 @@ NULL -1 5 2005-06-27 17:58:00 2005-06-27 17:58 15 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4493,7 +4493,7 @@ NULL -1 5 2005-06-27 2005-06-27 11 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4511,7 +4511,7 @@ NULL -1 5 2005-06-27 2005-06-27 11 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; @@ -4571,7 +4571,7 @@ NULL -1 5 2005-06-27 2005-06-27 9 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' SHOW CREATE VIEW v1; @@ -4589,7 +4589,7 @@ NULL -1 5 2005-06-27 2005-06-27 9 Warnings: Warning 1292 Incorrect datetime value: '' -Warning 1292 Incorrect datetime value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect datetime value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Incorrect datetime value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Incorrect datetime value: '-1' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index fe23f9de0c5..6e9615c284f 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -489,8 +489,7 @@ DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CHECK SQLSTATE '23000'; END; -DECLARE CONTINUE HANDLER FOR condname1 SET x1 = 1; -' at line 5 +DECLARE CONTINUE HANDLER FOR condname1 SET x1 = ...' at line 5 CREATE PROCEDURE h1 () BEGIN DECLARE x1 INT DEFAULT 0; @@ -523,8 +522,7 @@ SELECT 'end of 1'; end;// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlexception select '1'; select * from tqq; -SELECT 'end of 1'; -' at line 3 +SELECT 'end of 1...' at line 3 create procedure p1 () begin declare exit handler for sqlexception select 'exit handler 1'; diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result index 5021cbd5324..efd5ee1c568 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views-big.result +++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result @@ -4072,7 +4072,7 @@ DROP VIEW v1; REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 FROM test.tb2 my_table WITH CASCADED CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH CASCADED CHECK ' at line 1 +FROM test.tb2 my_table WITH CASCADED CHE...' at line 1 CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 FROM test.tb2 my_table WITH CASCADED CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60 @@ -4101,7 +4101,7 @@ FROM test.tb2 my_table WITH CASCADED CHECK OPTION VIEW v1' at line 1 REPLACE OR CREATE VIEW v1 AS SELECT F59, F60 FROM test.tb2 my_table WITH LOCAL CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR CREATE VIEW v1 AS SELECT F59, F60 -FROM test.tb2 my_table WITH LOCAL CHECK OPT' at line 1 +FROM test.tb2 my_table WITH LOCAL CHECK ...' at line 1 CREATE OR REPLACE VIEW v1 SELECT AS F59, F60 FROM test.tb2 my_table WITH LOCAL CHECK OPTION; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT AS F59, F60 diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index dce2f31768a..4005240aa49 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -2854,11 +2854,11 @@ return f1' at line 1 CREATE FUNCTION char binary not null(f1 char binary not null) returns char binary not null return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'char binary not null(f1 char binary not null) returns char binary not null -retur' at line 1 +re...' at line 1 CREATE FUNCTION char ascii not null(f1 char ascii not null) returns char ascii not null return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'char ascii not null(f1 char ascii not null) returns char ascii not null -return f' at line 1 +retur...' at line 1 CREATE FUNCTION tinytext(f1 tinytext) returns tinytext return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tinytext(f1 tinytext) returns tinytext @@ -2885,7 +2885,7 @@ return f1' at line 1 CREATE FUNCTION mediumtext not null(f1 mediumtext not null) returns mediumtext not null return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumtext not null(f1 mediumtext not null) returns mediumtext not null -return f' at line 1 +retur...' at line 1 CREATE FUNCTION longtext not null(f1 longtext not null) returns longtext not null return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'longtext not null(f1 longtext not null) returns longtext not null @@ -2917,7 +2917,7 @@ return f1' at line 1 CREATE FUNCTION mediumblob not null(f1 mediumblob not null) returns mediumblob not null return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumblob not null(f1 mediumblob not null) returns mediumblob not null -return f' at line 1 +retur...' at line 1 CREATE FUNCTION longblob not null(f1 longblob not null) returns longblob not null return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'longblob not null(f1 longblob not null) returns longblob not null @@ -2944,7 +2944,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsigned' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsig...' at line 1 CREATE FUNCTION smallint(f1 smallint) returns smallint return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'smallint(f1 smallint) returns smallint @@ -2959,7 +2959,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint unsig' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint un...' at line 1 CREATE FUNCTION mediumint(f1 mediumint) returns mediumint return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumint(f1 mediumint) returns mediumint @@ -2974,7 +2974,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint un' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint...' at line 1 CREATE FUNCTION int(f1 int) returns int return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int(f1 int) returns int @@ -3009,8 +3009,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill -re' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill...' at line 1 CREATE FUNCTION bigint(f1 bigint) returns bigint return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bigint(f1 bigint) returns bigint @@ -3025,7 +3024,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned ze' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned...' at line 1 CREATE FUNCTION decimal(f1 decimal) returns decimal return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal(f1 decimal) returns decimal @@ -3040,7 +3039,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsigned' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsig...' at line 1 CREATE FUNCTION numeric(f1 numeric) returns numeric return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'numeric(f1 numeric) returns numeric @@ -3055,7 +3054,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsigned' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsig...' at line 1 CREATE FUNCTION real(f1 real) returns real return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'real(f1 real) returns real @@ -3070,7 +3069,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerofill' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerof...' at line 1 CREATE FUNCTION float(f1 float) returns float return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float(f1 float) returns float @@ -3085,7 +3084,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp return f1' at line 1 CREATE FUNCTION float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned zerofill return f1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned zerof' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned ze...' at line 1 CREATE FUNCTION date(f1 date) returns date return f1; DROP FUNCTION date; @@ -3112,11 +3111,11 @@ return f1' at line 1 CREATE FUNCTION enum("1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum") return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum") -retu' at line 1 +r...' at line 1 CREATE FUNCTION set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set") return f1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set") -return f' at line 1 +retur...' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION db_storedproc.fn1 does not exist @@ -3801,7 +3800,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '!_fn1( f1 char(20) ) returns int BEGIN SELECT * from t1 where f2 = f1; -return 1;' at line 1 +return...' at line 1 CREATE FUNCTION fn1( f1 char(20) ) return int BEGIN SELECT * from t1 where f2 = f1; @@ -5790,8 +5789,7 @@ END begin_label// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BEGIN declare x char; declare y char; -SELECT f1, f2 into x, y from t2 limit 1; -E' at line 2 +SELECT f1, f2 into x, y from t2 limit 1...' at line 2 Testcase 4.2.11: ---------------- @@ -5903,7 +5901,7 @@ SELECT f1, f2 into x, y from t2 limit 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'char x, y1 integer default 0; declare char y; -SELECT f1, f2 into x, y from t2 li' at line 3 +SELECT f1, f2 into x, y from t2...' at line 3 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -6300,7 +6298,7 @@ declare decimal unsigned zerofill not null x; SELECT f36 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal unsigned zerofill not null x; -SELECT f36 into x from tb1 limit 9998, 1;' at line 3 +SELECT f36 into x from tb1 limit 9998,...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6362,7 +6360,7 @@ declare decimal (0) unsigned zerofill not null x; SELECT f43 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal (0) unsigned zerofill not null x; -SELECT f43 into x from tb1 limit 9998' at line 3 +SELECT f43 into x from tb1 limit 9...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6370,7 +6368,7 @@ declare decimal (64) unsigned zerofill not null x; SELECT f44 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal (64) unsigned zerofill not null x; -SELECT f44 into x from tb1 limit 999' at line 3 +SELECT f44 into x from tb1 limit ...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6405,7 +6403,7 @@ declare decimal (63, 30) unsigned not null x; SELECT f48 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal (63, 30) unsigned not null x; -SELECT f48 into x from tb1 limit 9998, 1;' at line 3 +SELECT f48 into x from tb1 limit 9998,...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6422,7 +6420,7 @@ declare decimal (63, 30) zerofill not null x; SELECT f50 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal (63, 30) zerofill not null x; -SELECT f50 into x from tb1 limit 9998, 1;' at line 3 +SELECT f50 into x from tb1 limit 9998,...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6430,7 +6428,7 @@ declare decimal (00) unsigned zerofill not null x; SELECT f51 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal (00) unsigned zerofill not null x; -SELECT f51 into x from tb1 limit 999' at line 3 +SELECT f51 into x from tb1 limit ...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6438,7 +6436,7 @@ declare decimal (63, 30) unsigned zerofill not null x; SELECT f52 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal (63, 30) unsigned zerofill not null x; -SELECT f52 into x from tb1 limit' at line 3 +SELECT f52 into x from tb1 li...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6473,7 +6471,7 @@ declare numeric unsigned zerofill not null x; SELECT f56 into x from tb1 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'numeric unsigned zerofill not null x; -SELECT f56 into x from tb1 limit 9998, 1;' at line 3 +SELECT f56 into x from tb1 limit 9998,...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6616,7 +6614,7 @@ declare numeric (63, 30) unsigned zerofill x; SELECT f72 into x from tb2 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'numeric (63, 30) unsigned zerofill x; -SELECT f72 into x from tb2 limit 9998, 1;' at line 3 +SELECT f72 into x from tb2 limit 9998,...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6723,8 +6721,7 @@ declare float unsigned zerofill not null x; SELECT f84 into x from tb2 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float unsigned zerofill not null x; -SELECT f84 into x from tb2 limit 9998, 1; -E' at line 3 +SELECT f84 into x from tb2 limit 9998, 1...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6786,7 +6783,7 @@ declare float(0) unsigned zerofill not null x; SELECT f91 into x from tb2 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float(0) unsigned zerofill not null x; -SELECT f91 into x from tb2 limit 9998, 1' at line 3 +SELECT f91 into x from tb2 limit 9998...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6794,7 +6791,7 @@ declare float(23) unsigned zerofill not null x; SELECT f92 into x from tb2 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float(23) unsigned zerofill not null x; -SELECT f92 into x from tb2 limit 9998, ' at line 3 +SELECT f92 into x from tb2 limit 999...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6856,7 +6853,7 @@ declare float(24) unsigned zerofill not null x; SELECT f99 into x from tb2 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float(24) unsigned zerofill not null x; -SELECT f99 into x from tb2 limit 9998, ' at line 3 +SELECT f99 into x from tb2 limit 999...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6864,7 +6861,7 @@ declare float(53) unsigned zerofill not null x; SELECT f100 into x from tb2 limit 9998, 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float(53) unsigned zerofill not null x; -SELECT f100 into x from tb2 limit 9998,' at line 3 +SELECT f100 into x from tb2 limit 99...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -9342,7 +9339,7 @@ declare accessible condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'accessible condition for sqlstate '02000'; -declare exit handler for add set @var' at line 3 +declare exit handler for add set @...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9352,8 +9349,7 @@ declare add condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'add condition for sqlstate '02000'; -declare exit handler for add set @var2 = 1; -' at line 3 +declare exit handler for add set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9363,8 +9359,7 @@ declare all condition for sqlstate '02000'; declare exit handler for all set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'all condition for sqlstate '02000'; -declare exit handler for all set @var2 = 1; -' at line 3 +declare exit handler for all set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9374,7 +9369,7 @@ declare alter condition for sqlstate '02000'; declare exit handler for alter set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'alter condition for sqlstate '02000'; -declare exit handler for alter set @var2 =' at line 3 +declare exit handler for alter set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9384,7 +9379,7 @@ declare analyze condition for sqlstate '02000'; declare exit handler for analyze set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'analyze condition for sqlstate '02000'; -declare exit handler for analyze set @va' at line 3 +declare exit handler for analyze set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9394,8 +9389,7 @@ declare and condition for sqlstate '02000'; declare exit handler for and set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and condition for sqlstate '02000'; -declare exit handler for and set @var2 = 1; -' at line 3 +declare exit handler for and set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9405,8 +9399,7 @@ declare as condition for sqlstate '02000'; declare exit handler for as set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as condition for sqlstate '02000'; -declare exit handler for as set @var2 = 1; -EN' at line 3 +declare exit handler for as set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9416,8 +9409,7 @@ declare asc condition for sqlstate '02000'; declare exit handler for asc set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asc condition for sqlstate '02000'; -declare exit handler for asc set @var2 = 1; -' at line 3 +declare exit handler for asc set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9427,7 +9419,7 @@ declare asensitive condition for sqlstate '02000'; declare exit handler for asensitive set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'asensitive condition for sqlstate '02000'; -declare exit handler for asensitive s' at line 3 +declare exit handler for asensitiv...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9437,7 +9429,7 @@ declare before condition for sqlstate '02000'; declare exit handler for before set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'before condition for sqlstate '02000'; -declare exit handler for before set @var2' at line 3 +declare exit handler for before set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9447,7 +9439,7 @@ declare between condition for sqlstate '02000'; declare exit handler for between set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'between condition for sqlstate '02000'; -declare exit handler for between set @va' at line 3 +declare exit handler for between set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9457,7 +9449,7 @@ declare bigint condition for sqlstate '02000'; declare exit handler for bigint set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'bigint condition for sqlstate '02000'; -declare exit handler for bigint set @var2' at line 3 +declare exit handler for bigint set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9467,7 +9459,7 @@ declare binary condition for sqlstate '02000'; declare exit handler for binary set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'binary condition for sqlstate '02000'; -declare exit handler for binary set @var2' at line 3 +declare exit handler for binary set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9477,7 +9469,7 @@ declare blob condition for sqlstate '02000'; declare exit handler for blob set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'blob condition for sqlstate '02000'; -declare exit handler for blob set @var2 = 1' at line 3 +declare exit handler for blob set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9487,7 +9479,7 @@ declare both condition for sqlstate '02000'; declare exit handler for both set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'both condition for sqlstate '02000'; -declare exit handler for both set @var2 = 1' at line 3 +declare exit handler for both set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9497,8 +9489,7 @@ declare by condition for sqlstate '02000'; declare exit handler for by set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'by condition for sqlstate '02000'; -declare exit handler for by set @var2 = 1; -EN' at line 3 +declare exit handler for by set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9508,7 +9499,7 @@ declare call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'call condition for sqlstate '02000'; -declare exit handler for CALL set @var2 = 1' at line 3 +declare exit handler for CALL set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9518,7 +9509,7 @@ declare cascade condition for sqlstate '02000'; declare exit handler for cascade set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'cascade condition for sqlstate '02000'; -declare exit handler for cascade set @va' at line 3 +declare exit handler for cascade set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9528,7 +9519,7 @@ declare case condition for sqlstate '02000'; declare exit handler for case set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'case condition for sqlstate '02000'; -declare exit handler for case set @var2 = 1' at line 3 +declare exit handler for case set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9538,7 +9529,7 @@ declare change condition for sqlstate '02000'; declare exit handler for change set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'change condition for sqlstate '02000'; -declare exit handler for change set @var2' at line 3 +declare exit handler for change set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9548,7 +9539,7 @@ declare char condition for sqlstate '02000'; declare exit handler for char set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'char condition for sqlstate '02000'; -declare exit handler for char set @var2 = 1' at line 3 +declare exit handler for char set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9558,7 +9549,7 @@ declare character condition for sqlstate '02000'; declare exit handler for character set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'character condition for sqlstate '02000'; -declare exit handler for character set' at line 3 +declare exit handler for character ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9568,7 +9559,7 @@ declare check condition for sqlstate '02000'; declare exit handler for check set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'check condition for sqlstate '02000'; -declare exit handler for check set @var2 =' at line 3 +declare exit handler for check set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9578,7 +9569,7 @@ declare collate condition for sqlstate '02000'; declare exit handler for collate set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'collate condition for sqlstate '02000'; -declare exit handler for collate set @va' at line 3 +declare exit handler for collate set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9588,7 +9579,7 @@ declare column condition for sqlstate '02000'; declare exit handler for column set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'column condition for sqlstate '02000'; -declare exit handler for column set @var2' at line 3 +declare exit handler for column set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9598,7 +9589,7 @@ declare condition condition for sqlstate '02000'; declare exit handler for condition set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition condition for sqlstate '02000'; -declare exit handler for condition set' at line 3 +declare exit handler for condition ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9614,7 +9605,7 @@ declare constraint condition for sqlstate '02000'; declare exit handler for constraint set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'constraint condition for sqlstate '02000'; -declare exit handler for constraint s' at line 3 +declare exit handler for constrain...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9624,7 +9615,7 @@ declare continue condition for sqlstate '02000'; declare exit handler for continue set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition for sqlstate '02000'; -declare exit handler for continue set @var2 = 1;' at line 3 +declare exit handler for continue set @var2 =...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9634,7 +9625,7 @@ declare convert condition for sqlstate '02000'; declare exit handler for convert set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'convert condition for sqlstate '02000'; -declare exit handler for convert set @va' at line 3 +declare exit handler for convert set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9644,7 +9635,7 @@ declare create condition for sqlstate '02000'; declare exit handler for create set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'create condition for sqlstate '02000'; -declare exit handler for create set @var2' at line 3 +declare exit handler for create set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9654,7 +9645,7 @@ declare cross condition for sqlstate '02000'; declare exit handler for cross set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'cross condition for sqlstate '02000'; -declare exit handler for cross set @var2 =' at line 3 +declare exit handler for cross set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9664,7 +9655,7 @@ declare current_date condition for sqlstate '02000'; declare exit handler for current_date set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_date condition for sqlstate '02000'; -declare exit handler for current_da' at line 3 +declare exit handler for current...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9674,7 +9665,7 @@ declare current_time condition for sqlstate '02000'; declare exit handler for current_time set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_time condition for sqlstate '02000'; -declare exit handler for current_ti' at line 3 +declare exit handler for current...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9684,7 +9675,7 @@ declare current_timestamp condition for sqlstate '02000'; declare exit handler for current_timestamp set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_timestamp condition for sqlstate '02000'; -declare exit handler for curre' at line 3 +declare exit handler for cu...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9694,7 +9685,7 @@ declare current_user condition for sqlstate '02000'; declare exit handler for current_user set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'current_user condition for sqlstate '02000'; -declare exit handler for current_us' at line 3 +declare exit handler for current...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9704,7 +9695,7 @@ declare cursor condition for sqlstate '02000'; declare exit handler for cursor set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'cursor condition for sqlstate '02000'; -declare exit handler for cursor set @var2' at line 3 +declare exit handler for cursor set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9714,7 +9705,7 @@ declare database condition for sqlstate '02000'; declare exit handler for database set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'database condition for sqlstate '02000'; -declare exit handler for database set @' at line 3 +declare exit handler for database se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9724,7 +9715,7 @@ declare databases condition for sqlstate '02000'; declare exit handler for databases set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'databases condition for sqlstate '02000'; -declare exit handler for databases set' at line 3 +declare exit handler for databases ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9734,7 +9725,7 @@ declare day_hour condition for sqlstate '02000'; declare exit handler for day_hour set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'day_hour condition for sqlstate '02000'; -declare exit handler for day_hour set @' at line 3 +declare exit handler for day_hour se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9744,7 +9735,7 @@ declare day_microsecond condition for sqlstate '02000'; declare exit handler for day_microsecond set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'day_microsecond condition for sqlstate '02000'; -declare exit handler for day_mic' at line 3 +declare exit handler for day_...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9754,7 +9745,7 @@ declare day_minute condition for sqlstate '02000'; declare exit handler for day_minute set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'day_minute condition for sqlstate '02000'; -declare exit handler for day_minute s' at line 3 +declare exit handler for day_minut...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9764,7 +9755,7 @@ declare day_second condition for sqlstate '02000'; declare exit handler for day_second set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'day_second condition for sqlstate '02000'; -declare exit handler for day_second s' at line 3 +declare exit handler for day_secon...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9774,8 +9765,7 @@ declare dec condition for sqlstate '02000'; declare exit handler for dec set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'dec condition for sqlstate '02000'; -declare exit handler for dec set @var2 = 1; -' at line 3 +declare exit handler for dec set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9785,7 +9775,7 @@ declare decimal condition for sqlstate '02000'; declare exit handler for decimal set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'decimal condition for sqlstate '02000'; -declare exit handler for decimal set @va' at line 3 +declare exit handler for decimal set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9795,7 +9785,7 @@ declare declare condition for sqlstate '02000'; declare exit handler for declare set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'declare condition for sqlstate '02000'; -declare exit handler for declare set @va' at line 3 +declare exit handler for declare set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9805,7 +9795,7 @@ declare default condition for sqlstate '02000'; declare exit handler for default set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'default condition for sqlstate '02000'; -declare exit handler for default set @va' at line 3 +declare exit handler for default set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9815,7 +9805,7 @@ declare delayed condition for sqlstate '02000'; declare exit handler for delayed set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delayed condition for sqlstate '02000'; -declare exit handler for delayed set @va' at line 3 +declare exit handler for delayed set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9825,7 +9815,7 @@ declare delete condition for sqlstate '02000'; declare exit handler for delete set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'delete condition for sqlstate '02000'; -declare exit handler for delete set @var2' at line 3 +declare exit handler for delete set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9835,7 +9825,7 @@ declare desc condition for sqlstate '02000'; declare exit handler for desc set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc condition for sqlstate '02000'; -declare exit handler for desc set @var2 = 1' at line 3 +declare exit handler for desc set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9845,7 +9835,7 @@ declare describe condition for sqlstate '02000'; declare exit handler for describe set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'describe condition for sqlstate '02000'; -declare exit handler for describe set @' at line 3 +declare exit handler for describe se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9855,7 +9845,7 @@ declare deterministic condition for sqlstate '02000'; declare exit handler for deterministic set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'deterministic condition for sqlstate '02000'; -declare exit handler for determini' at line 3 +declare exit handler for determ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9865,7 +9855,7 @@ declare distinct condition for sqlstate '02000'; declare exit handler for distinct set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'distinct condition for sqlstate '02000'; -declare exit handler for distinct set @' at line 3 +declare exit handler for distinct se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9875,7 +9865,7 @@ declare distinctrow condition for sqlstate '02000'; declare exit handler for distinctrow set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'distinctrow condition for sqlstate '02000'; -declare exit handler for distinctrow' at line 3 +declare exit handler for distinct...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9885,8 +9875,7 @@ declare div condition for sqlstate '02000'; declare exit handler for div set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'div condition for sqlstate '02000'; -declare exit handler for div set @var2 = 1; -' at line 3 +declare exit handler for div set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9896,7 +9885,7 @@ declare double condition for sqlstate '02000'; declare exit handler for double set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'double condition for sqlstate '02000'; -declare exit handler for double set @var2' at line 3 +declare exit handler for double set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9906,7 +9895,7 @@ declare drop condition for sqlstate '02000'; declare exit handler for drop set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'drop condition for sqlstate '02000'; -declare exit handler for drop set @var2 = 1' at line 3 +declare exit handler for drop set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9916,7 +9905,7 @@ declare dual condition for sqlstate '02000'; declare exit handler for dual set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'dual condition for sqlstate '02000'; -declare exit handler for dual set @var2 = 1' at line 3 +declare exit handler for dual set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9926,7 +9915,7 @@ declare each condition for sqlstate '02000'; declare exit handler for each set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'each condition for sqlstate '02000'; -declare exit handler for each set @var2 = 1' at line 3 +declare exit handler for each set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9936,7 +9925,7 @@ declare else condition for sqlstate '02000'; declare exit handler for else set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'else condition for sqlstate '02000'; -declare exit handler for else set @var2 = 1' at line 3 +declare exit handler for else set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9946,7 +9935,7 @@ declare elseif condition for sqlstate '02000'; declare exit handler for elseif set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'elseif condition for sqlstate '02000'; -declare exit handler for elseif set @var2' at line 3 +declare exit handler for elseif set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9956,7 +9945,7 @@ declare enclosed condition for sqlstate '02000'; declare exit handler for enclosed set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'enclosed condition for sqlstate '02000'; -declare exit handler for enclosed set @' at line 3 +declare exit handler for enclosed se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9966,7 +9955,7 @@ declare escaped condition for sqlstate '02000'; declare exit handler for escaped set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'escaped condition for sqlstate '02000'; -declare exit handler for escaped set @va' at line 3 +declare exit handler for escaped set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9976,7 +9965,7 @@ declare exists condition for sqlstate '02000'; declare exit handler for exists set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'exists condition for sqlstate '02000'; -declare exit handler for exists set @var2' at line 3 +declare exit handler for exists set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -9997,7 +9986,7 @@ declare explain condition for sqlstate '02000'; declare exit handler for explain set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'explain condition for sqlstate '02000'; -declare exit handler for explain set @va' at line 3 +declare exit handler for explain set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10007,7 +9996,7 @@ declare false condition for sqlstate '02000'; declare exit handler for false set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'false condition for sqlstate '02000'; -declare exit handler for false set @var2 =' at line 3 +declare exit handler for false set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10017,7 +10006,7 @@ declare fetch condition for sqlstate '02000'; declare exit handler for fetch set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'fetch condition for sqlstate '02000'; -declare exit handler for fetch set @var2 =' at line 3 +declare exit handler for fetch set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10027,7 +10016,7 @@ declare float condition for sqlstate '02000'; declare exit handler for float set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float condition for sqlstate '02000'; -declare exit handler for float set @var2 =' at line 3 +declare exit handler for float set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10037,7 +10026,7 @@ declare float4 condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float4 condition for sqlstate '02000'; -declare exit handler for add set @var2 = ' at line 3 +declare exit handler for add set @var2...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10047,7 +10036,7 @@ declare float8 condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'float8 condition for sqlstate '02000'; -declare exit handler for add set @var2 = ' at line 3 +declare exit handler for add set @var2...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10057,8 +10046,7 @@ declare for condition for sqlstate '02000'; declare exit handler for for set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'for condition for sqlstate '02000'; -declare exit handler for for set @var2 = 1; -' at line 3 +declare exit handler for for set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10068,7 +10056,7 @@ declare force condition for sqlstate '02000'; declare exit handler for force set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'force condition for sqlstate '02000'; -declare exit handler for force set @var2 =' at line 3 +declare exit handler for force set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10078,7 +10066,7 @@ declare foreign condition for sqlstate '02000'; declare exit handler for foreign set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'foreign condition for sqlstate '02000'; -declare exit handler for foreign set @va' at line 3 +declare exit handler for foreign set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10088,7 +10076,7 @@ declare from condition for sqlstate '02000'; declare exit handler for from set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from condition for sqlstate '02000'; -declare exit handler for from set @var2 = 1' at line 3 +declare exit handler for from set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10098,7 +10086,7 @@ declare fulltext condition for sqlstate '02000'; declare exit handler for fulltext set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'fulltext condition for sqlstate '02000'; -declare exit handler for fulltext set @' at line 3 +declare exit handler for fulltext se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10108,7 +10096,7 @@ declare grant condition for sqlstate '02000'; declare exit handler for grant set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'grant condition for sqlstate '02000'; -declare exit handler for grant set @var2 =' at line 3 +declare exit handler for grant set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10118,7 +10106,7 @@ declare group condition for sqlstate '02000'; declare exit handler for group set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'group condition for sqlstate '02000'; -declare exit handler for group set @var2 =' at line 3 +declare exit handler for group set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10128,7 +10116,7 @@ declare having condition for sqlstate '02000'; declare exit handler for having set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'having condition for sqlstate '02000'; -declare exit handler for having set @var2' at line 3 +declare exit handler for having set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10138,7 +10126,7 @@ declare high_priority condition for sqlstate '02000'; declare exit handler for high_priority set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'high_priority condition for sqlstate '02000'; -declare exit handler for high_prio' at line 3 +declare exit handler for high_p...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10148,7 +10136,7 @@ declare hour_microsecond condition for sqlstate '02000'; declare exit handler for hour_microsecond set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'hour_microsecond condition for sqlstate '02000'; -declare exit handler for hour_m' at line 3 +declare exit handler for hou...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10158,7 +10146,7 @@ declare hour_minute condition for sqlstate '02000'; declare exit handler for hour_minute set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'hour_minute condition for sqlstate '02000'; -declare exit handler for hour_minute' at line 3 +declare exit handler for hour_min...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10168,7 +10156,7 @@ declare hour_second condition for sqlstate '02000'; declare exit handler for hour_second set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'hour_second condition for sqlstate '02000'; -declare exit handler for hour_second' at line 3 +declare exit handler for hour_sec...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10178,8 +10166,7 @@ declare if condition for sqlstate '02000'; declare exit handler for if set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'if condition for sqlstate '02000'; -declare exit handler for if set @var2 = 1; -EN' at line 3 +declare exit handler for if set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10189,7 +10176,7 @@ declare ignore condition for sqlstate '02000'; declare exit handler for ignore set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ignore condition for sqlstate '02000'; -declare exit handler for ignore set @var2' at line 3 +declare exit handler for ignore set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10199,8 +10186,7 @@ declare in condition for sqlstate '02000'; declare exit handler for in set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'in condition for sqlstate '02000'; -declare exit handler for in set @var2 = 1; -EN' at line 3 +declare exit handler for in set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10210,7 +10196,7 @@ declare index condition for sqlstate '02000'; declare exit handler for index set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'index condition for sqlstate '02000'; -declare exit handler for index set @var2 =' at line 3 +declare exit handler for index set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10220,7 +10206,7 @@ declare infile condition for sqlstate '02000'; declare exit handler for infile set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'infile condition for sqlstate '02000'; -declare exit handler for infile set @var2' at line 3 +declare exit handler for infile set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10230,7 +10216,7 @@ declare inner condition for sqlstate '02000'; declare exit handler for inner set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'inner condition for sqlstate '02000'; -declare exit handler for inner set @var2 =' at line 3 +declare exit handler for inner set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10240,7 +10226,7 @@ declare inout condition for sqlstate '02000'; declare exit handler for inout set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'inout condition for sqlstate '02000'; -declare exit handler for inout set @var2 =' at line 3 +declare exit handler for inout set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10250,7 +10236,7 @@ declare insensitive condition for sqlstate '02000'; declare exit handler for insensitive set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'insensitive condition for sqlstate '02000'; -declare exit handler for insensitive' at line 3 +declare exit handler for insensit...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10260,7 +10246,7 @@ declare insert condition for sqlstate '02000'; declare exit handler for insert set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'insert condition for sqlstate '02000'; -declare exit handler for insert set @var2' at line 3 +declare exit handler for insert set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10270,8 +10256,7 @@ declare int condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1; -' at line 3 +declare exit handler for int set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10281,7 +10266,7 @@ declare int1 condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int1 condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1;' at line 3 +declare exit handler for int set @var2 =...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10291,7 +10276,7 @@ declare int2 condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int2 condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1;' at line 3 +declare exit handler for int set @var2 =...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10301,7 +10286,7 @@ declare int3 condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int3 condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1;' at line 3 +declare exit handler for int set @var2 =...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10311,7 +10296,7 @@ declare int4 condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int4 condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1;' at line 3 +declare exit handler for int set @var2 =...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10321,7 +10306,7 @@ declare int8 condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'int8 condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1;' at line 3 +declare exit handler for int set @var2 =...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10331,7 +10316,7 @@ declare integer condition for sqlstate '02000'; declare exit handler for integer set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'integer condition for sqlstate '02000'; -declare exit handler for integer set @va' at line 3 +declare exit handler for integer set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10341,7 +10326,7 @@ declare interval condition for sqlstate '02000'; declare exit handler for interval set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'interval condition for sqlstate '02000'; -declare exit handler for interval set @' at line 3 +declare exit handler for interval se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10351,7 +10336,7 @@ declare into condition for sqlstate '02000'; declare exit handler for into set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'into condition for sqlstate '02000'; -declare exit handler for into set @var2 = 1' at line 3 +declare exit handler for into set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10361,8 +10346,7 @@ declare is condition for sqlstate '02000'; declare exit handler for is set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'is condition for sqlstate '02000'; -declare exit handler for is set @var2 = 1; -EN' at line 3 +declare exit handler for is set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10372,7 +10356,7 @@ declare iterate condition for sqlstate '02000'; declare exit handler for iterate set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'iterate condition for sqlstate '02000'; -declare exit handler for iterate set @va' at line 3 +declare exit handler for iterate set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10382,7 +10366,7 @@ declare join condition for sqlstate '02000'; declare exit handler for join set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'join condition for sqlstate '02000'; -declare exit handler for join set @var2 = 1' at line 3 +declare exit handler for join set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10392,8 +10376,7 @@ declare key condition for sqlstate '02000'; declare exit handler for key set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'key condition for sqlstate '02000'; -declare exit handler for key set @var2 = 1; -' at line 3 +declare exit handler for key set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10403,7 +10386,7 @@ declare keys condition for sqlstate '02000'; declare exit handler for keys set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'keys condition for sqlstate '02000'; -declare exit handler for keys set @var2 = 1' at line 3 +declare exit handler for keys set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10413,7 +10396,7 @@ declare kill condition for sqlstate '02000'; declare exit handler for kill set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'kill condition for sqlstate '02000'; -declare exit handler for kill set @var2 = 1' at line 3 +declare exit handler for kill set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10423,7 +10406,7 @@ declare leading condition for sqlstate '02000'; declare exit handler for leading set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'leading condition for sqlstate '02000'; -declare exit handler for leading set @va' at line 3 +declare exit handler for leading set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10433,7 +10416,7 @@ declare leave condition for sqlstate '02000'; declare exit handler for leave set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'leave condition for sqlstate '02000'; -declare exit handler for leave set @var2 =' at line 3 +declare exit handler for leave set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10443,7 +10426,7 @@ declare left condition for sqlstate '02000'; declare exit handler for left set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'left condition for sqlstate '02000'; -declare exit handler for left set @var2 = 1' at line 3 +declare exit handler for left set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10453,7 +10436,7 @@ declare like condition for sqlstate '02000'; declare exit handler for like set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'like condition for sqlstate '02000'; -declare exit handler for like set @var2 = 1' at line 3 +declare exit handler for like set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10463,7 +10446,7 @@ declare limit condition for sqlstate '02000'; declare exit handler for limit set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'limit condition for sqlstate '02000'; -declare exit handler for limit set @var2 =' at line 3 +declare exit handler for limit set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10473,7 +10456,7 @@ declare linear condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'linear condition for sqlstate '02000'; -declare exit handler for int set @var2 = ' at line 3 +declare exit handler for int set @var2...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10483,7 +10466,7 @@ declare lines condition for sqlstate '02000'; declare exit handler for lines set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'lines condition for sqlstate '02000'; -declare exit handler for lines set @var2 =' at line 3 +declare exit handler for lines set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10493,7 +10476,7 @@ declare load condition for sqlstate '02000'; declare exit handler for load set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'load condition for sqlstate '02000'; -declare exit handler for load set @var2 = 1' at line 3 +declare exit handler for load set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10503,7 +10486,7 @@ declare localtime condition for sqlstate '02000'; declare exit handler for localtime set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'localtime condition for sqlstate '02000'; -declare exit handler for localtime set' at line 3 +declare exit handler for localtime ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10513,7 +10496,7 @@ declare localtimestamp condition for sqlstate '02000'; declare exit handler for localtimestamp set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'localtimestamp condition for sqlstate '02000'; -declare exit handler for localtim' at line 3 +declare exit handler for local...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10523,7 +10506,7 @@ declare lock condition for sqlstate '02000'; declare exit handler for lock set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'lock condition for sqlstate '02000'; -declare exit handler for lock set @var2 = 1' at line 3 +declare exit handler for lock set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10533,7 +10516,7 @@ declare long condition for sqlstate '02000'; declare exit handler for long set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'long condition for sqlstate '02000'; -declare exit handler for long set @var2 = 1' at line 3 +declare exit handler for long set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10543,7 +10526,7 @@ declare longblob condition for sqlstate '02000'; declare exit handler for longblob set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'longblob condition for sqlstate '02000'; -declare exit handler for longblob set @' at line 3 +declare exit handler for longblob se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10553,7 +10536,7 @@ declare longtext condition for sqlstate '02000'; declare exit handler for longtext set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'longtext condition for sqlstate '02000'; -declare exit handler for longtext set @' at line 3 +declare exit handler for longtext se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10563,7 +10546,7 @@ declare loop condition for sqlstate '02000'; declare exit handler for loop set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'loop condition for sqlstate '02000'; -declare exit handler for loop set @var2 = 1' at line 3 +declare exit handler for loop set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10573,7 +10556,7 @@ declare low_priority condition for sqlstate '02000'; declare exit handler for low_priority set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'low_priority condition for sqlstate '02000'; -declare exit handler for low_priori' at line 3 +declare exit handler for low_pri...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10583,7 +10566,7 @@ declare master_ssl_verify_server_cert condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'master_ssl_verify_server_cert condition for sqlstate '02000'; -declare exit handl' at line 3 +declare exit ha...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10593,7 +10576,7 @@ declare match condition for sqlstate '02000'; declare exit handler for match set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'match condition for sqlstate '02000'; -declare exit handler for match set @var2 =' at line 3 +declare exit handler for match set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10603,7 +10586,7 @@ declare mediumblob condition for sqlstate '02000'; declare exit handler for mediumblob set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumblob condition for sqlstate '02000'; -declare exit handler for mediumblob s' at line 3 +declare exit handler for mediumblo...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10613,7 +10596,7 @@ declare mediumint condition for sqlstate '02000'; declare exit handler for mediumint set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumint condition for sqlstate '02000'; -declare exit handler for mediumint set' at line 3 +declare exit handler for mediumint ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10623,7 +10606,7 @@ declare mediumtext condition for sqlstate '02000'; declare exit handler for mediumtext set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mediumtext condition for sqlstate '02000'; -declare exit handler for mediumtext s' at line 3 +declare exit handler for mediumtex...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10633,7 +10616,7 @@ declare middleint condition for sqlstate '02000'; declare exit handler for middleint set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'middleint condition for sqlstate '02000'; -declare exit handler for middleint set' at line 3 +declare exit handler for middleint ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10643,7 +10626,7 @@ declare minute_microsecond condition for sqlstate '02000'; declare exit handler for minute_microsecond set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'minute_microsecond condition for sqlstate '02000'; -declare exit handler for minu' at line 3 +declare exit handler for m...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10653,7 +10636,7 @@ declare minute_second condition for sqlstate '02000'; declare exit handler for minute_second set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'minute_second condition for sqlstate '02000'; -declare exit handler for minute_se' at line 3 +declare exit handler for minute...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10663,8 +10646,7 @@ declare mod condition for sqlstate '02000'; declare exit handler for mod set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mod condition for sqlstate '02000'; -declare exit handler for mod set @var2 = 1; -' at line 3 +declare exit handler for mod set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10674,7 +10656,7 @@ declare modifies condition for sqlstate '02000'; declare exit handler for modifies set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'modifies condition for sqlstate '02000'; -declare exit handler for modifies set @' at line 3 +declare exit handler for modifies se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10684,7 +10666,7 @@ declare natural condition for sqlstate '02000'; declare exit handler for natural set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'natural condition for sqlstate '02000'; -declare exit handler for natural set @va' at line 3 +declare exit handler for natural set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10694,8 +10676,7 @@ declare not condition for sqlstate '02000'; declare exit handler for not set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not condition for sqlstate '02000'; -declare exit handler for not set @var2 = 1; -' at line 3 +declare exit handler for not set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10705,7 +10686,7 @@ declare no_write_to_binlog condition for sqlstate '02000'; declare exit handler for no_write_to_binlog set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'no_write_to_binlog condition for sqlstate '02000'; -declare exit handler for no_w' at line 3 +declare exit handler for n...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10715,7 +10696,7 @@ declare null condition for sqlstate '02000'; declare exit handler for null set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null condition for sqlstate '02000'; -declare exit handler for null set @var2 = 1' at line 3 +declare exit handler for null set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10725,7 +10706,7 @@ declare numeric condition for sqlstate '02000'; declare exit handler for numeric set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'numeric condition for sqlstate '02000'; -declare exit handler for numeric set @va' at line 3 +declare exit handler for numeric set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10735,8 +10716,7 @@ declare on condition for sqlstate '02000'; declare exit handler for on set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on condition for sqlstate '02000'; -declare exit handler for on set @var2 = 1; -EN' at line 3 +declare exit handler for on set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10746,7 +10726,7 @@ declare optimize condition for sqlstate '02000'; declare exit handler for optimize set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'optimize condition for sqlstate '02000'; -declare exit handler for optimize set @' at line 3 +declare exit handler for optimize se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10762,7 +10742,7 @@ declare optionally condition for sqlstate '02000'; declare exit handler for optionally set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'optionally condition for sqlstate '02000'; -declare exit handler for optionally s' at line 3 +declare exit handler for optionall...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10772,8 +10752,7 @@ declare or condition for sqlstate '02000'; declare exit handler for or set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or condition for sqlstate '02000'; -declare exit handler for or set @var2 = 1; -EN' at line 3 +declare exit handler for or set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10783,7 +10762,7 @@ declare order condition for sqlstate '02000'; declare exit handler for order set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'order condition for sqlstate '02000'; -declare exit handler for order set @var2 =' at line 3 +declare exit handler for order set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10793,8 +10772,7 @@ declare out condition for sqlstate '02000'; declare exit handler for out set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'out condition for sqlstate '02000'; -declare exit handler for out set @var2 = 1; -' at line 3 +declare exit handler for out set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10804,7 +10782,7 @@ declare outer condition for sqlstate '02000'; declare exit handler for outer set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'outer condition for sqlstate '02000'; -declare exit handler for outer set @var2 =' at line 3 +declare exit handler for outer set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10814,7 +10792,7 @@ declare outfile condition for sqlstate '02000'; declare exit handler for outfile set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'outfile condition for sqlstate '02000'; -declare exit handler for outfile set @va' at line 3 +declare exit handler for outfile set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10824,7 +10802,7 @@ declare precision condition for sqlstate '02000'; declare exit handler for precision set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'precision condition for sqlstate '02000'; -declare exit handler for precision set' at line 3 +declare exit handler for precision ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10834,7 +10812,7 @@ declare primary condition for sqlstate '02000'; declare exit handler for primary set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'primary condition for sqlstate '02000'; -declare exit handler for primary set @va' at line 3 +declare exit handler for primary set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10844,7 +10822,7 @@ declare procedure condition for sqlstate '02000'; declare exit handler for procedure set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'procedure condition for sqlstate '02000'; -declare exit handler for procedure set' at line 3 +declare exit handler for procedure ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10854,7 +10832,7 @@ declare purge condition for sqlstate '02000'; declare exit handler for purge set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'purge condition for sqlstate '02000'; -declare exit handler for purge set @var2 =' at line 3 +declare exit handler for purge set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10864,7 +10842,7 @@ declare range condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'range condition for sqlstate '02000'; -declare exit handler for int set @var2 = 1' at line 3 +declare exit handler for int set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10874,7 +10852,7 @@ declare read condition for sqlstate '02000'; declare exit handler for read set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'read condition for sqlstate '02000'; -declare exit handler for read set @var2 = 1' at line 3 +declare exit handler for read set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10884,7 +10862,7 @@ declare reads condition for sqlstate '02000'; declare exit handler for reads set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'reads condition for sqlstate '02000'; -declare exit handler for reads set @var2 =' at line 3 +declare exit handler for reads set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10904,7 +10882,7 @@ declare read_write condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'read_write condition for sqlstate '02000'; -declare exit handler for int set @var' at line 3 +declare exit handler for int set @...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10914,7 +10892,7 @@ declare real condition for sqlstate '02000'; declare exit handler for real set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'real condition for sqlstate '02000'; -declare exit handler for real set @var2 = 1' at line 3 +declare exit handler for real set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10924,7 +10902,7 @@ declare references condition for sqlstate '02000'; declare exit handler for references set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'references condition for sqlstate '02000'; -declare exit handler for references s' at line 3 +declare exit handler for reference...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10934,7 +10912,7 @@ declare regexp condition for sqlstate '02000'; declare exit handler for regexp set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'regexp condition for sqlstate '02000'; -declare exit handler for regexp set @var2' at line 3 +declare exit handler for regexp set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10944,7 +10922,7 @@ declare release condition for sqlstate '02000'; declare exit handler for int set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'release condition for sqlstate '02000'; -declare exit handler for int set @var2 =' at line 3 +declare exit handler for int set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10954,7 +10932,7 @@ declare rename condition for sqlstate '02000'; declare exit handler for rename set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rename condition for sqlstate '02000'; -declare exit handler for rename set @var2' at line 3 +declare exit handler for rename set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10964,7 +10942,7 @@ declare repeat condition for sqlstate '02000'; declare exit handler for repeat set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'repeat condition for sqlstate '02000'; -declare exit handler for repeat set @var2' at line 3 +declare exit handler for repeat set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10974,7 +10952,7 @@ declare replace condition for sqlstate '02000'; declare exit handler for replace set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'replace condition for sqlstate '02000'; -declare exit handler for replace set @va' at line 3 +declare exit handler for replace set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10984,7 +10962,7 @@ declare require condition for sqlstate '02000'; declare exit handler for require set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'require condition for sqlstate '02000'; -declare exit handler for require set @va' at line 3 +declare exit handler for require set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -10994,7 +10972,7 @@ declare restrict condition for sqlstate '02000'; declare exit handler for restrict set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'restrict condition for sqlstate '02000'; -declare exit handler for restrict set @' at line 3 +declare exit handler for restrict se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11004,7 +10982,7 @@ declare return condition for sqlstate '02000'; declare exit handler for return set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'return condition for sqlstate '02000'; -declare exit handler for return set @var2' at line 3 +declare exit handler for return set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11014,7 +10992,7 @@ declare revoke condition for sqlstate '02000'; declare exit handler for revoke set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'revoke condition for sqlstate '02000'; -declare exit handler for revoke set @var2' at line 3 +declare exit handler for revoke set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11024,7 +11002,7 @@ declare right condition for sqlstate '02000'; declare exit handler for right set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'right condition for sqlstate '02000'; -declare exit handler for right set @var2 =' at line 3 +declare exit handler for right set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11034,7 +11012,7 @@ declare rlike condition for sqlstate '02000'; declare exit handler for rlike set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rlike condition for sqlstate '02000'; -declare exit handler for rlike set @var2 =' at line 3 +declare exit handler for rlike set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11044,7 +11022,7 @@ declare schema condition for sqlstate '02000'; declare exit handler for schema set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'schema condition for sqlstate '02000'; -declare exit handler for schema set @var2' at line 3 +declare exit handler for schema set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11054,7 +11032,7 @@ declare schemas condition for sqlstate '02000'; declare exit handler for schemas set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'schemas condition for sqlstate '02000'; -declare exit handler for schemas set @va' at line 3 +declare exit handler for schemas set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11064,7 +11042,7 @@ declare second_microsecond condition for sqlstate '02000'; declare exit handler for second_microsecond set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'second_microsecond condition for sqlstate '02000'; -declare exit handler for seco' at line 3 +declare exit handler for s...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11074,7 +11052,7 @@ declare select condition for sqlstate '02000'; declare exit handler for SELECT set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select condition for sqlstate '02000'; -declare exit handler for SELECT set @var2' at line 3 +declare exit handler for SELECT set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11084,7 +11062,7 @@ declare sensitive condition for sqlstate '02000'; declare exit handler for sensitive set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sensitive condition for sqlstate '02000'; -declare exit handler for sensitive set' at line 3 +declare exit handler for sensitive ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11094,7 +11072,7 @@ declare separator condition for sqlstate '02000'; declare exit handler for separator set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'separator condition for sqlstate '02000'; -declare exit handler for separator set' at line 3 +declare exit handler for separator ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11104,8 +11082,7 @@ declare set condition for sqlstate '02000'; declare exit handler for set set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'set condition for sqlstate '02000'; -declare exit handler for set set @var2 = 1; -' at line 3 +declare exit handler for set set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11115,7 +11092,7 @@ declare show condition for sqlstate '02000'; declare exit handler for show set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'show condition for sqlstate '02000'; -declare exit handler for show set @var2 = 1' at line 3 +declare exit handler for show set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11125,7 +11102,7 @@ declare smallint condition for sqlstate '02000'; declare exit handler for smallint set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'smallint condition for sqlstate '02000'; -declare exit handler for smallint set @' at line 3 +declare exit handler for smallint se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11135,7 +11112,7 @@ declare spatial condition for sqlstate '02000'; declare exit handler for spatial set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'spatial condition for sqlstate '02000'; -declare exit handler for spatial set @va' at line 3 +declare exit handler for spatial set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11145,7 +11122,7 @@ declare specific condition for sqlstate '02000'; declare exit handler for specific set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'specific condition for sqlstate '02000'; -declare exit handler for specific set @' at line 3 +declare exit handler for specific se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11155,8 +11132,7 @@ declare sql condition for sqlstate '02000'; declare exit handler for sql set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sql condition for sqlstate '02000'; -declare exit handler for sql set @var2 = 1; -' at line 3 +declare exit handler for sql set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11166,7 +11142,7 @@ declare sqlexception condition for sqlstate '02000'; declare exit handler for sqlexception set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sqlexception condition for sqlstate '02000'; -declare exit handler for sqlexcepti' at line 3 +declare exit handler for sqlexce...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11176,7 +11152,7 @@ declare sqlstate condition for sqlstate '02000'; declare exit handler for sqlstate set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sqlstate condition for sqlstate '02000'; -declare exit handler for sqlstate set @' at line 3 +declare exit handler for sqlstate se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11186,7 +11162,7 @@ declare sqlwarning condition for sqlstate '02000'; declare exit handler for sqlwarning set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sqlwarning condition for sqlstate '02000'; -declare exit handler for sqlwarning s' at line 3 +declare exit handler for sqlwarnin...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11196,7 +11172,7 @@ declare sql_big_result condition for sqlstate '02000'; declare exit handler for sql_big_result set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sql_big_result condition for sqlstate '02000'; -declare exit handler for sql_big_' at line 3 +declare exit handler for sql_b...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11206,7 +11182,7 @@ declare sql_calc_found_rows condition for sqlstate '02000'; declare exit handler for sql_calc_found_rows set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sql_calc_found_rows condition for sqlstate '02000'; -declare exit handler for sql' at line 3 +declare exit handler for ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11216,7 +11192,7 @@ declare sql_small_result condition for sqlstate '02000'; declare exit handler for sql_small_result set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sql_small_result condition for sqlstate '02000'; -declare exit handler for sql_sm' at line 3 +declare exit handler for sql...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11226,8 +11202,7 @@ declare ssl condition for sqlstate '02000'; declare exit handler for ssl set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ssl condition for sqlstate '02000'; -declare exit handler for ssl set @var2 = 1; -' at line 3 +declare exit handler for ssl set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11237,7 +11212,7 @@ declare starting condition for sqlstate '02000'; declare exit handler for starting set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'starting condition for sqlstate '02000'; -declare exit handler for starting set @' at line 3 +declare exit handler for starting se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11247,7 +11222,7 @@ declare straight_join condition for sqlstate '02000'; declare exit handler for straight_join set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'straight_join condition for sqlstate '02000'; -declare exit handler for straight_' at line 3 +declare exit handler for straig...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11257,7 +11232,7 @@ declare table condition for sqlstate '02000'; declare exit handler for table set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'table condition for sqlstate '02000'; -declare exit handler for table set @var2 =' at line 3 +declare exit handler for table set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11267,7 +11242,7 @@ declare terminated condition for sqlstate '02000'; declare exit handler for terminated set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'terminated condition for sqlstate '02000'; -declare exit handler for terminated s' at line 3 +declare exit handler for terminate...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11277,7 +11252,7 @@ declare then condition for sqlstate '02000'; declare exit handler for then set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'then condition for sqlstate '02000'; -declare exit handler for then set @var2 = 1' at line 3 +declare exit handler for then set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11287,7 +11262,7 @@ declare tinyblob condition for sqlstate '02000'; declare exit handler for tinyblob set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tinyblob condition for sqlstate '02000'; -declare exit handler for tinyblob set @' at line 3 +declare exit handler for tinyblob se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11297,7 +11272,7 @@ declare tinyint condition for sqlstate '02000'; declare exit handler for tinyint set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tinyint condition for sqlstate '02000'; -declare exit handler for tinyint set @va' at line 3 +declare exit handler for tinyint set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11307,7 +11282,7 @@ declare tinytext condition for sqlstate '02000'; declare exit handler for tinytext set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'tinytext condition for sqlstate '02000'; -declare exit handler for tinytext set @' at line 3 +declare exit handler for tinytext se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11317,8 +11292,7 @@ declare to condition for sqlstate '02000'; declare exit handler for to set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'to condition for sqlstate '02000'; -declare exit handler for to set @var2 = 1; -EN' at line 3 +declare exit handler for to set @var2 = 1;...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11328,7 +11302,7 @@ declare trailing condition for sqlstate '02000'; declare exit handler for trailing set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'trailing condition for sqlstate '02000'; -declare exit handler for trailing set @' at line 3 +declare exit handler for trailing se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11338,7 +11312,7 @@ declare trigger condition for sqlstate '02000'; declare exit handler for trigger set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'trigger condition for sqlstate '02000'; -declare exit handler for trigger set @va' at line 3 +declare exit handler for trigger set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11348,7 +11322,7 @@ declare true condition for sqlstate '02000'; declare exit handler for true set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'true condition for sqlstate '02000'; -declare exit handler for true set @var2 = 1' at line 3 +declare exit handler for true set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11358,7 +11332,7 @@ declare undo condition for sqlstate '02000'; declare exit handler for undo set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo condition for sqlstate '02000'; -declare exit handler for undo set @var2 = 1' at line 3 +declare exit handler for undo set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11368,7 +11342,7 @@ declare union condition for sqlstate '02000'; declare exit handler for union set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'union condition for sqlstate '02000'; -declare exit handler for union set @var2 =' at line 3 +declare exit handler for union set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11378,7 +11352,7 @@ declare unique condition for sqlstate '02000'; declare exit handler for unique set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unique condition for sqlstate '02000'; -declare exit handler for unique set @var2' at line 3 +declare exit handler for unique set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11388,7 +11362,7 @@ declare unlock condition for sqlstate '02000'; declare exit handler for unlock set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unlock condition for sqlstate '02000'; -declare exit handler for unlock set @var2' at line 3 +declare exit handler for unlock set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11398,7 +11372,7 @@ declare unsigned condition for sqlstate '02000'; declare exit handler for unsigned set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unsigned condition for sqlstate '02000'; -declare exit handler for unsigned set @' at line 3 +declare exit handler for unsigned se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11408,7 +11382,7 @@ declare update condition for sqlstate '02000'; declare exit handler for update set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'update condition for sqlstate '02000'; -declare exit handler for update set @var2' at line 3 +declare exit handler for update set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11418,7 +11392,7 @@ declare usage condition for sqlstate '02000'; declare exit handler for usage set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'usage condition for sqlstate '02000'; -declare exit handler for usage set @var2 =' at line 3 +declare exit handler for usage set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11428,8 +11402,7 @@ declare use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'use condition for sqlstate '02000'; -declare exit handler for USE set @var2 = 1; -' at line 3 +declare exit handler for USE set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11439,7 +11412,7 @@ declare using condition for sqlstate '02000'; declare exit handler for using set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'using condition for sqlstate '02000'; -declare exit handler for using set @var2 =' at line 3 +declare exit handler for using set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11449,7 +11422,7 @@ declare utc_date condition for sqlstate '02000'; declare exit handler for utc_date set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'utc_date condition for sqlstate '02000'; -declare exit handler for utc_date set @' at line 3 +declare exit handler for utc_date se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11459,7 +11432,7 @@ declare utc_time condition for sqlstate '02000'; declare exit handler for utc_time set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'utc_time condition for sqlstate '02000'; -declare exit handler for utc_time set @' at line 3 +declare exit handler for utc_time se...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11469,7 +11442,7 @@ declare utc_timestamp condition for sqlstate '02000'; declare exit handler for utc_timestamp set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'utc_timestamp condition for sqlstate '02000'; -declare exit handler for utc_times' at line 3 +declare exit handler for utc_ti...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11479,7 +11452,7 @@ declare values condition for sqlstate '02000'; declare exit handler for values set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'values condition for sqlstate '02000'; -declare exit handler for values set @var2' at line 3 +declare exit handler for values set @v...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11489,7 +11462,7 @@ declare varbinary condition for sqlstate '02000'; declare exit handler for varbinary set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'varbinary condition for sqlstate '02000'; -declare exit handler for varbinary set' at line 3 +declare exit handler for varbinary ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11499,7 +11472,7 @@ declare varchar condition for sqlstate '02000'; declare exit handler for varchar set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'varchar condition for sqlstate '02000'; -declare exit handler for varchar set @va' at line 3 +declare exit handler for varchar set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11509,7 +11482,7 @@ declare varcharacter condition for sqlstate '02000'; declare exit handler for varcharacter set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'varcharacter condition for sqlstate '02000'; -declare exit handler for varcharact' at line 3 +declare exit handler for varchar...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11519,7 +11492,7 @@ declare varying condition for sqlstate '02000'; declare exit handler for varying set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'varying condition for sqlstate '02000'; -declare exit handler for varying set @va' at line 3 +declare exit handler for varying set ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11529,7 +11502,7 @@ declare when condition for sqlstate '02000'; declare exit handler for when set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'when condition for sqlstate '02000'; -declare exit handler for when set @var2 = 1' at line 3 +declare exit handler for when set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11539,7 +11512,7 @@ declare where condition for sqlstate '02000'; declare exit handler for where set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where condition for sqlstate '02000'; -declare exit handler for where set @var2 =' at line 3 +declare exit handler for where set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11549,7 +11522,7 @@ declare while condition for sqlstate '02000'; declare exit handler for while set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'while condition for sqlstate '02000'; -declare exit handler for while set @var2 =' at line 3 +declare exit handler for while set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11559,7 +11532,7 @@ declare with condition for sqlstate '02000'; declare exit handler for with set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'with condition for sqlstate '02000'; -declare exit handler for with set @var2 = 1' at line 3 +declare exit handler for with set @var2 ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11569,7 +11542,7 @@ declare write condition for sqlstate '02000'; declare exit handler for write set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'write condition for sqlstate '02000'; -declare exit handler for write set @var2 =' at line 3 +declare exit handler for write set @var...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11579,8 +11552,7 @@ declare xor condition for sqlstate '02000'; declare exit handler for xor set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xor condition for sqlstate '02000'; -declare exit handler for xor set @var2 = 1; -' at line 3 +declare exit handler for xor set @var2 = ...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11590,7 +11562,7 @@ declare year_month condition for sqlstate '02000'; declare exit handler for year_month set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'year_month condition for sqlstate '02000'; -declare exit handler for year_month s' at line 3 +declare exit handler for year_mont...' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE db_storedproc.sp1 does not exist @@ -11600,7 +11572,7 @@ declare zerofill condition for sqlstate '02000'; declare exit handler for zerofill set @var2 = 1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'zerofill condition for sqlstate '02000'; -declare exit handler for zerofill set @' at line 3 +declare exit handler for zerofill se...' at line 3 Testcase : ---------- @@ -11635,7 +11607,7 @@ set @x = 3; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'undo handler for sqlstate '23000' set @x2 = 1; set @x = 1; -insert into t values ' at line 3 +insert into t valu...' at line 3 DROP PROCEDURE IF EXISTS handler1; Warnings: Note 1305 PROCEDURE db_storedproc.handler1 does not exist @@ -14469,7 +14441,7 @@ insert into tnull values( 1); END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1234567890; declare continue handler for cond1 set @var2 = 1; -insert into tnull ' at line 3 +insert into tnu...' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -15318,7 +15290,7 @@ END case label1; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'case when action = 'delete' then -delete from res_t3_itisalongname_1381742_itsav' at line 3 +delete from res_t3_itisalongname_1381742_it...' at line 3 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -15335,7 +15307,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'then delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; else -set' at line 5 +...' at line 5 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -15350,7 +15322,7 @@ iterate label1; END case; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'then action = 'truncate' when -truncate from res_t3_itisalongname_1381742_itsave' at line 6 +truncate from res_t3_itisalongname_1381742_its...' at line 6 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -15367,7 +15339,7 @@ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; END case; END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'when 'delete' then -delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 11 +delete from res_t3_itisalongname_1381742_itsaverylongname...' at line 11 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -15430,8 +15402,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp leave label1; END if; iterate label1; -END loop label1; -EN' at line 9 +END loop label1;...' at line 9 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4() BEGIN @@ -15451,7 +15422,7 @@ set count = count + 1; if count > 20 then leave label1; END if; -iterate lab' at line 6 +iterate ...' at line 6 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4() BEGIN @@ -15471,7 +15442,7 @@ leave label1; else set count=count+1; END if; -iterate lab' at line 6 +iterate ...' at line 6 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4() BEGIN @@ -15491,7 +15462,7 @@ if count > 20 then leave label1; else set count=count+1; -iterate label1;' at line 6 +iterate labe...' at line 6 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4() BEGIN @@ -15513,8 +15484,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp set count = 1; label1: loop if count > 20 then -leave label1; -' at line 7 +leave label...' at line 7 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4() BEGIN @@ -15574,7 +15544,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'when case count = 1 then set count = 10; when count = 2 then -set count = count' at line 3 +set count = co...' at line 3 DROP PROCEDURE IF EXISTS sp5; CREATE PROCEDURE sp5(count int) BEGIN @@ -15589,7 +15559,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp when count = 1 then set count = 10; when count = 2 then -set count = coun' at line 3 +set count = c...' at line 3 DROP PROCEDURE IF EXISTS sp5; CREATE PROCEDURE sp5(count int) BEGIN @@ -15602,7 +15572,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'when count = 1 then set count = 10; case when count = 2 then -set count = count' at line 3 +set count = co...' at line 3 Testcase 4.3.6: --------------- @@ -15634,7 +15604,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'until count1 > 5 repeat set count1 = count1 + 1; -if count1 > 5 then leave label1' at line 4 +if count1 > 5 then leave lab...' at line 4 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6() BEGIN @@ -15648,7 +15618,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'END repeat set count1 = count1 + 1; if count1 > 5 then leave label1; END if; -unt' at line 4 +...' at line 4 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6() BEGIN @@ -15719,7 +15689,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'END loop; set @dummystring = 'temp value'; if count > 10 then leave label1; -END ' at line 3 +E...' at line 3 DROP PROCEDURE IF EXISTS sp7; CREATE PROCEDURE sp7() BEGIN @@ -15733,7 +15703,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'iterate label1; loop set @dummystring = 'temp value'; -if count > 10 then leave l' at line 3 +if count > 10 then leav...' at line 3 Testcase 4.3.8: -------------------------------------------------------------------------------- @@ -15861,7 +15831,7 @@ END// ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'loop if count1 > 2 then leave lable1; END if; -insert into res_t3_itisalongname_1' at line 4 +insert into res_t3_itisalongnam...' at line 4 Testcase 4.3.16: ---------------- diff --git a/mysql-test/suite/galera/r/MDEV-22051.result b/mysql-test/suite/galera/r/MDEV-22051.result new file mode 100644 index 00000000000..9f5394637c2 --- /dev/null +++ b/mysql-test/suite/galera/r/MDEV-22051.result @@ -0,0 +1,20 @@ +connection node_2; +connection node_1; +FLUSH TABLES WITH READ LOCK; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +ERROR 08S01: Aborting TOI: Global Read-Lock (FTWRL) in place. +SET wsrep_OSU_method=RSU; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +ERROR 08S01: Aborting TOI: Global Read-Lock (FTWRL) in place. +SET wsrep_OSU_method=TOI; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +ERROR 08S01: Aborting TOI: Global Read-Lock (FTWRL) in place. +connection node_1; +UNLOCK TABLES; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +FLUSH TABLES WITH READ LOCK; +INSERT INTO t1 VALUES (1); +ERROR HY000: Can't execute the query because you have a conflicting read lock +UNLOCK TABLES; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/mdev_21025.result b/mysql-test/suite/galera/r/mdev_21025.result new file mode 100644 index 00000000000..6a8d5ac8367 --- /dev/null +++ b/mysql-test/suite/galera/r/mdev_21025.result @@ -0,0 +1,11 @@ +connection node_2; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); +START TRANSACTION; +INSERT INTO t1 (f1) VALUES (1); +START TRANSACTION; +INSERT IGNORE INTO t1 (f1) VALUES (1); +Warnings: +Warning 1062 Duplicate entry '1' for key 'PRIMARY' +START TRANSACTION; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MDEV-22051.test b/mysql-test/suite/galera/t/MDEV-22051.test new file mode 100644 index 00000000000..b7332c47d69 --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-22051.test @@ -0,0 +1,33 @@ +# +# If FTWRL is issued on node, DDL statement should report error back to +# user. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +FLUSH TABLES WITH READ LOCK; + +--error ER_UNKNOWN_COM_ERROR +CREATE TABLE t1 (a INT) ENGINE=InnoDB; + +SET wsrep_OSU_method=RSU; +--error ER_UNKNOWN_COM_ERROR +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +SET wsrep_OSU_method=TOI; + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--error ER_UNKNOWN_COM_ERROR +CREATE TABLE t1 (a INT) ENGINE=InnoDB; + +--connection node_1 +UNLOCK TABLES; + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; + +FLUSH TABLES WITH READ LOCK; +--error ER_CANT_UPDATE_WITH_READLOCK +INSERT INTO t1 VALUES (1); +UNLOCK TABLES; + +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test index 9fe863bf340..4e99872bf4d 100644 --- a/mysql-test/suite/galera/t/MW-86-wait1.test +++ b/mysql-test/suite/galera/t/MW-86-wait1.test @@ -5,6 +5,7 @@ # --source include/galera_cluster.inc --source include/have_binlog_format_row.inc +--source include/have_debug.inc --source include/have_debug_sync.inc SET @orig_debug=@@debug_dbug; diff --git a/mysql-test/suite/galera/t/mdev_21025.test b/mysql-test/suite/galera/t/mdev_21025.test new file mode 100644 index 00000000000..5179b0639ef --- /dev/null +++ b/mysql-test/suite/galera/t/mdev_21025.test @@ -0,0 +1,22 @@ +# +# MDEV-21205 +# +# Start transaction after INSERT IGNORE which had no effect and +# kept the transaction open caused an assertion on the following +# START TRANSACTION because the empty transaction was not properly +# terminated. +# + +--source include/galera_cluster.inc +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); +START TRANSACTION; +INSERT INTO t1 (f1) VALUES (1); + +START TRANSACTION; +# This INSERT succeeds with duplicate key warning due to IGNORE clause +# and keeps the transaction open. The following START TRANSACTION causes +# an assertion if the bug is present. +INSERT IGNORE INTO t1 (f1) VALUES (1); +START TRANSACTION; + +DROP TABLE t1; diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result index 23c1069e54a..0ef38360caf 100644 --- a/mysql-test/suite/heap/heap.result +++ b/mysql-test/suite/heap/heap.result @@ -697,7 +697,7 @@ ERROR 42000: Incorrect table definition; there can be only one auto column and i create table t1 (c char(255), primary key(c(90))); insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); -ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 'PRIMARY' +ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi...' for key 'PRIMARY' drop table t1; CREATE TABLE t1 (a int, key(a)) engine=heap; insert into t1 values (0); diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result index 5b91418ef01..2cb2d829e53 100644 --- a/mysql-test/suite/innodb/r/foreign_key.result +++ b/mysql-test/suite/innodb/r/foreign_key.result @@ -270,6 +270,13 @@ CREATE TABLE t2 (f INT, KEY(f)) ENGINE=InnoDB; ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t2 (f); ALTER IGNORE TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f1); DROP TABLE t1, t2; +CREATE TABLE t1 (a INT, b INT, KEY idx(a)) ENGINE=InnoDB; +SET FOREIGN_KEY_CHECKS= OFF; +ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES tx(x); +ALTER TABLE t1 DROP KEY idx; +ALTER TABLE t1 CHANGE a c INT; +DROP TABLE t1; +SET FOREIGN_KEY_CHECKS=1; # Start of 10.2 tests # # MDEV-13246 Stale rows despite ON DELETE CASCADE constraint diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result index f5cb95b7cf2..24cf44c90e0 100644 --- a/mysql-test/suite/innodb/r/innodb-alter.result +++ b/mysql-test/suite/innodb/r/innodb-alter.result @@ -198,11 +198,11 @@ t3 CREATE TABLE `t3` ( ALTER TABLE t3 CHANGE `1234567890123456789012345678901234567890123456789012345678901234` `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾å€¿å€` INT; -ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ ' is too long +ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿ...' is too long ALTER TABLE t3 CHANGE `1234567890123456789012345678901234567890123456789012345678901234` `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾å€¿Ã¤` INT; -ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ ' is too long +ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿ...' is too long ALTER TABLE t3 CHANGE `1234567890123456789012345678901234567890123456789012345678901234` `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾Ã¤` INT; @@ -210,7 +210,7 @@ ALTER TABLE t3 CHANGE `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾Ã„` c3 INT; ALTER TABLE t3 CHANGE c3 ðŒ€ðŒðŒ‚ðŒƒðŒ„ðŒ…ðŒ†ðŒ‡ðŒˆðŒ‰ðŒŠðŒ‹ðŒŒðŒðŒŽðŒðŒðŒ‘ðŒ’ðŒ“ðŒ”ðŒ•ðŒ–ðŒ—ðŒ˜ðŒ™ðŒšðŒ›ðŒœ INT; -ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83' +ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\...' ALTER TABLE t3 CHANGE c3 😲 INT; ERROR HY000: Invalid utf8mb4 character string: '\xF0\x9F\x98\xB2' ALTER TABLE t3 RENAME TO t2; diff --git a/mysql-test/suite/innodb/r/innodb-analyze.result b/mysql-test/suite/innodb/r/innodb-analyze.result index b622992a422..f3285a817e0 100644 --- a/mysql-test/suite/innodb/r/innodb-analyze.result +++ b/mysql-test/suite/innodb/r/innodb-analyze.result @@ -1,4 +1,4 @@ Warnings: -Warning 1292 Truncated incorrect innodb_stats_transient_sample_pa value: '0' +Warning 1292 Truncated incorrect innodb_stats_transient_sample... value: '0' Variable_name Value innodb_stats_transient_sample_pages 1 diff --git a/mysql-test/suite/innodb/r/innodb-stats-sample.result b/mysql-test/suite/innodb/r/innodb-stats-sample.result index dcd1a2592d7..0670903ca28 100644 --- a/mysql-test/suite/innodb/r/innodb-stats-sample.result +++ b/mysql-test/suite/innodb/r/innodb-stats-sample.result @@ -1,5 +1,5 @@ Warnings: -Warning 1292 Truncated incorrect innodb_stats_transient_sample_pa value: '0' +Warning 1292 Truncated incorrect innodb_stats_transient_sample... value: '0' Variable_name Value innodb_stats_transient_sample_pages 1 Variable_name Value diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result index 6142d419bb6..08ee9688603 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result +++ b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result @@ -324,11 +324,11 @@ t3 CREATE TABLE `t3` ( ALTER TABLE t3 CHANGE `1234567890123456789012345678901234567890123456789012345678901234` `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾å€¿å€` INT; -ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ ' is too long +ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿ...' is too long ALTER TABLE t3 CHANGE `1234567890123456789012345678901234567890123456789012345678901234` `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾å€¿Ã¤` INT; -ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ ' is too long +ERROR 42000: Identifier name '倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿ...' is too long ALTER TABLE t3 CHANGE `1234567890123456789012345678901234567890123456789012345678901234` `倀å€å€‚倃倄倅倆倇倈倉倊個倌å€å€Žå€å€å€‘倒倓倔倕倖倗倘候倚倛倜å€å€žå€Ÿå€ 倡倢倣値倥倦倧倨倩倪倫倬å€å€®å€¯å€°å€±å€²å€³å€´å€µå€¶å€·å€¸å€¹å€ºå€»å€¼å€½å€¾Ã¤` INT; @@ -370,7 +370,7 @@ t3.isl t1c.ibd t3.ibd ALTER TABLE t3 CHANGE c3 ðŒ€ðŒðŒ‚ðŒƒðŒ„ðŒ…ðŒ†ðŒ‡ðŒˆðŒ‰ðŒŠðŒ‹ðŒŒðŒðŒŽðŒðŒðŒ‘ðŒ’ðŒ“ðŒ”ðŒ•ðŒ–ðŒ—ðŒ˜ðŒ™ðŒšðŒ›ðŒœ INT; -ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\x83' +ERROR HY000: Invalid utf8mb4 character string: '\xF0\x90\x8C\x80\xF0\x90\x8C\x81\xF0\x90\x8C\x82\xF0\x90\x8C\...' ALTER TABLE t3 CHANGE c3 😲 INT; ERROR HY000: Invalid utf8mb4 character string: '\xF0\x9F\x98\xB2' ALTER TABLE t3 RENAME TO t2; diff --git a/mysql-test/suite/innodb/r/xa_recovery_debug.result b/mysql-test/suite/innodb/r/xa_recovery_debug.result new file mode 100644 index 00000000000..d387bca29b1 --- /dev/null +++ b/mysql-test/suite/innodb/r/xa_recovery_debug.result @@ -0,0 +1,27 @@ +# +# Bug#20872655 XA ROLLBACK IS NOT CRASH-SAFE +# +CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=INNODB; +INSERT INTO t SET a=0; +connect con1,localhost,root; +XA START 'zombie'; +INSERT INTO t SET a=1; +UPDATE t SET b=1 WHERE a=1; +SELECT COUNT(*) FROM t; +COUNT(*) +2 +XA END 'zombie'; +XA PREPARE 'zombie'; +SET DEBUG_SYNC='trx_after_rollback_row SIGNAL s1 WAIT_FOR s2'; +XA ROLLBACK 'zombie'; +connection default; +SET DEBUG_SYNC='now WAIT_FOR s1'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t LIMIT 1; +# restart +disconnect con1; +XA COMMIT 'zombie'; +ERROR XAE04: XAER_NOTA: Unknown XID +SELECT * FROM t; +a b +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test index d1f3943d832..330d718e5e4 100644 --- a/mysql-test/suite/innodb/t/foreign_key.test +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -257,6 +257,17 @@ ALTER TABLE t1 ADD FOREIGN KEY (f2) REFERENCES t2 (f); ALTER IGNORE TABLE t1 ADD FOREIGN KEY (f3) REFERENCES t1 (f1); DROP TABLE t1, t2; +# MDEV-19092 Server crash when renaming the column when +# FOREIGN_KEY_CHECKS is disabled +CREATE TABLE t1 (a INT, b INT, KEY idx(a)) ENGINE=InnoDB; +SET FOREIGN_KEY_CHECKS= OFF; +ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES tx(x); +ALTER TABLE t1 DROP KEY idx; +ALTER TABLE t1 CHANGE a c INT; +# Cleanup +DROP TABLE t1; +SET FOREIGN_KEY_CHECKS=1; + --echo # Start of 10.2 tests --echo # diff --git a/mysql-test/suite/innodb/t/xa_recovery_debug.test b/mysql-test/suite/innodb/t/xa_recovery_debug.test new file mode 100644 index 00000000000..21a38854adb --- /dev/null +++ b/mysql-test/suite/innodb/t/xa_recovery_debug.test @@ -0,0 +1,39 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +# Embedded server does not support restarting +--source include/not_embedded.inc + +--echo # +--echo # Bug#20872655 XA ROLLBACK IS NOT CRASH-SAFE +--echo # + +CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=INNODB; +INSERT INTO t SET a=0; +connect (con1,localhost,root); +XA START 'zombie'; +INSERT INTO t SET a=1; +UPDATE t SET b=1 WHERE a=1; +SELECT COUNT(*) FROM t; +XA END 'zombie'; +XA PREPARE 'zombie'; +SET DEBUG_SYNC='trx_after_rollback_row SIGNAL s1 WAIT_FOR s2'; +--send XA ROLLBACK 'zombie' +connection default; +SET DEBUG_SYNC='now WAIT_FOR s1'; +# Ensure that the state change from XA PREPARE to ACTIVE gets flushed +# to the redo log. Without this, it could be that we will recover to +# a state that precedes the start of the XA ROLLBACK. +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t LIMIT 1; +let $shutdown_timeout=0; +--source include/restart_mysqld.inc +disconnect con1; +# If the trx_undo_set_state_at_prepare() is omitted at the start of +# XA ROLLBACK, then the XA COMMIT would succeed and the table would +# incorrectly show the result of the INSERT but not the UPDATE, +# because we would commit a partially rolled back transaction. +--error ER_XAER_NOTA +XA COMMIT 'zombie'; +SELECT * FROM t; +DROP TABLE t; diff --git a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result index a8359293116..52420da2409 100644 --- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result +++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result @@ -269,7 +269,7 @@ c1 ST_Astext(c2) ST_Astext(c4) 9 POINT(120 120) POLYGON((4010 4010,4020 4020,4030 4030,4040 4030,4020 4010,4010 4010)) UPDATE tab SET c2 = ST_GeomFromText('POINT(4000 4000)') WHERE MBRIntersects(tab.c4, @g1); -ERROR 23000: Duplicate entry '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00@\xAF@\x' for key 'PRIMARY' +ERROR 23000: Duplicate entry '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00@\xAF...' for key 'PRIMARY' SELECT c1,ST_Astext(c2),ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c2) ST_Astext(c4) 7 POINT(60 70) POLYGON((3010 3010,3020 3020,3030 3030,3040 3030,3020 3010,3010 3010)) diff --git a/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result index 145f6a8a2e8..2c66133404c 100644 --- a/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result +++ b/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result @@ -1093,7 +1093,7 @@ col_1_varchar = REPEAT("c", 4000) ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' +ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' for key 'PRIMARY' DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; col_1_varchar = REPEAT("c", 4000) @@ -1126,7 +1126,7 @@ ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' +ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' for key 'PRIMARY' DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; col_1_varchar = REPEAT("c", 4000) @@ -1390,7 +1390,7 @@ REPEAT("o", 4000)); INSERT INTO worklog5743 VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000)); -ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' +ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' for key 'PRIMARY' DROP TABLE worklog5743; set global innodb_large_prefix=0; ERROR HY000: Variable 'innodb_large_prefix' is a read only variable diff --git a/mysql-test/suite/mariabackup/partial_exclude.opt b/mysql-test/suite/mariabackup/partial_exclude.opt new file mode 100644 index 00000000000..872335edb71 --- /dev/null +++ b/mysql-test/suite/mariabackup/partial_exclude.opt @@ -0,0 +1,2 @@ +--ignore-db-dirs=db3 +--ignore-db-dirs=db4 diff --git a/mysql-test/suite/mariabackup/partial_exclude.result b/mysql-test/suite/mariabackup/partial_exclude.result index 0da9b547caa..628613040e0 100644 --- a/mysql-test/suite/mariabackup/partial_exclude.result +++ b/mysql-test/suite/mariabackup/partial_exclude.result @@ -1,3 +1,6 @@ +select @@ignore_db_dirs; +@@ignore_db_dirs +db3,db4 CREATE TABLE t1(i INT) ENGINE INNODB; INSERT INTO t1 VALUES(1); CREATE TABLE t2(i int) ENGINE INNODB; diff --git a/mysql-test/suite/mariabackup/partial_exclude.test b/mysql-test/suite/mariabackup/partial_exclude.test index cd21ecff29b..99d14e58231 100644 --- a/mysql-test/suite/mariabackup/partial_exclude.test +++ b/mysql-test/suite/mariabackup/partial_exclude.test @@ -1,6 +1,13 @@ #--source include/innodb_page_size.inc # Test --databases-exclude and --tables-exclude feature of xtrabackup 2.3.8 +select @@ignore_db_dirs; + +let $MYSQLD_DATADIR= `select @@datadir`; + +mkdir $MYSQLD_DATADIR/db3; +mkdir $MYSQLD_DATADIR/db4; +mkdir $MYSQLD_DATADIR/db5; CREATE TABLE t1(i INT) ENGINE INNODB; INSERT INTO t1 VALUES(1); @@ -24,8 +31,19 @@ list_files $targetdir/test *.ibd; # check that db2 database is not in the backup (excluded) --error 1 list_files $targetdir/db2 *.ibd; +# check that db3 database is not in the backup (excluded) +--error 1 +list_files $targetdir/db3 *.ibd; +# check that db4 database is not in the backup (excluded) +--error 1 +list_files $targetdir/db4 *.ibd; +# check that db5 database is in the backup +list_files $targetdir/db5 *.ibd; DROP TABLE t1; DROP TABLE t2; DROP DATABASE db2; +rmdir $MYSQLD_DATADIR/db3; +rmdir $MYSQLD_DATADIR/db4; +rmdir $MYSQLD_DATADIR/db5; rmdir $targetdir; diff --git a/mysql-test/suite/parts/r/longname.result b/mysql-test/suite/parts/r/longname.result index c95e666625e..2d2802d8b38 100644 --- a/mysql-test/suite/parts/r/longname.result +++ b/mysql-test/suite/parts/r/longname.result @@ -24,5 +24,5 @@ SUBPARTITION BY HASH ( id2 ) SUBPARTITIONS 2 ( PARTITION çççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç VALUES LESS THAN (1000) ENGINE = InnoDB, PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB); -ERROR HY000: The path specified for @0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@ is too long +ERROR HY000: The path specified for @0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@0n@... is too long drop database mysqltest1; diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result index a5d257f64e0..8171141127a 100644 --- a/mysql-test/suite/parts/r/partition_syntax_innodb.result +++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result @@ -770,7 +770,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LES...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -779,7 +779,7 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LES...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -797,7 +797,7 @@ PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES (SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPART' at line 7 +(SUBPARTITION subpart31 , SUBP...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -987,7 +987,7 @@ SUBPARTITIONS -1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1032,7 +1032,7 @@ SUBPARTITIONS 2.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '2.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1055,7 +1055,7 @@ SUBPARTITIONS -2.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1078,7 +1078,7 @@ SUBPARTITIONS 0.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1101,7 +1101,7 @@ SUBPARTITIONS 1.6 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1.6 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1123,7 +1123,7 @@ SUBPARTITIONS 999999999999999999999999999999.999999999999999999999999999999 (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999 -(PARTITION part1 V' at line 9 +(PARTITION part...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1146,7 +1146,7 @@ SUBPARTITIONS 0.000000000000000000000000000001 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.000000000000000000000000000001 (PARTITION part1 VALUES LESS THAN (10), -PARTITI' at line 9 +PART...' at line 9 # 4.2.3 partition/subpartition numbers FLOAT notation CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1170,7 +1170,7 @@ SUBPARTITIONS 2.0E+0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '2.0E+0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1193,7 +1193,7 @@ SUBPARTITIONS 0.2E+1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.2E+1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1216,7 +1216,7 @@ SUBPARTITIONS -2.0E+0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2.0E+0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1239,7 +1239,7 @@ SUBPARTITIONS 0.16E+1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.16E+1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1262,7 +1262,7 @@ SUBPARTITIONS 0.0E+300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.0E+300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1285,7 +1285,7 @@ SUBPARTITIONS 1E+300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1E+300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1308,7 +1308,7 @@ SUBPARTITIONS 1E-300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1E-300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 # 4.2.4 partition/subpartition numbers STRING notation CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1332,7 +1332,7 @@ SUBPARTITIONS '2' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1355,7 +1355,7 @@ SUBPARTITIONS '2.0' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2.0' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (' at line 9 +PARTITION part2 VALUES LESS THA...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1378,7 +1378,7 @@ SUBPARTITIONS '0.2E+1' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0.2E+1' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1401,7 +1401,7 @@ SUBPARTITIONS '2A' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2A' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1424,7 +1424,7 @@ SUBPARTITIONS 'A2' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''A2' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1447,7 +1447,7 @@ SUBPARTITIONS '' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1470,7 +1470,7 @@ SUBPARTITIONS 'GARBAGE' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''GARBAGE' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 +PARTITION part2 VALUES LESS...' at line 9 # 4.2.5 partition/subpartition numbers other notations CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1494,7 +1494,7 @@ SUBPARTITIONS 2A PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2A (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1517,7 +1517,7 @@ SUBPARTITIONS A2 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'A2 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1540,7 +1540,7 @@ SUBPARTITIONS GARBAGE PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GARBAGE (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1563,7 +1563,7 @@ SUBPARTITIONS "2" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"2" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1586,7 +1586,7 @@ SUBPARTITIONS "2A" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"2A" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1609,7 +1609,7 @@ SUBPARTITIONS "A2" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"A2" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1632,7 +1632,7 @@ SUBPARTITIONS "GARBAGE" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"GARBAGE" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 +PARTITION part2 VALUES LESS...' at line 9 # 4.2.6 (negative) partition/subpartition numbers per @variables SET @aux = 5; CREATE TABLE t1 ( @@ -1657,7 +1657,7 @@ SUBPARTITIONS @aux = 5 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@aux = 5 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 #------------------------------------------------------------------------ # 4.3 Mixups of assigned partition/subpartition numbers and names #------------------------------------------------------------------------ @@ -1750,7 +1750,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1769,7 +1769,7 @@ PARTITION part3 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPAR' at line 13 +(SUBPARTITION subpart31, SUB...' at line 13 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1812,7 +1812,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1831,7 +1831,7 @@ PARTITION part3 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ' at line 11 +(SUBPARTITION subpart21 ...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1848,7 +1848,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 #======================================================================== # 5. Checks of logical partition/subpartition name diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result index 765280f35c6..16882b33176 100644 --- a/mysql-test/suite/parts/r/partition_syntax_myisam.result +++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result @@ -802,7 +802,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LES...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -811,7 +811,7 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LES...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -829,7 +829,7 @@ PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES (SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPART' at line 7 +(SUBPARTITION subpart31 , SUBP...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -1069,7 +1069,7 @@ SUBPARTITIONS -1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1114,7 +1114,7 @@ SUBPARTITIONS 2.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '2.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1137,7 +1137,7 @@ SUBPARTITIONS -2.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1160,7 +1160,7 @@ SUBPARTITIONS 0.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1183,7 +1183,7 @@ SUBPARTITIONS 1.6 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1.6 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1205,7 +1205,7 @@ SUBPARTITIONS 999999999999999999999999999999.999999999999999999999999999999 (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999 -(PARTITION part1 V' at line 9 +(PARTITION part...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1228,7 +1228,7 @@ SUBPARTITIONS 0.000000000000000000000000000001 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.000000000000000000000000000001 (PARTITION part1 VALUES LESS THAN (10), -PARTITI' at line 9 +PART...' at line 9 # 4.2.3 partition/subpartition numbers FLOAT notation CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1252,7 +1252,7 @@ SUBPARTITIONS 2.0E+0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '2.0E+0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1275,7 +1275,7 @@ SUBPARTITIONS 0.2E+1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.2E+1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1298,7 +1298,7 @@ SUBPARTITIONS -2.0E+0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2.0E+0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1321,7 +1321,7 @@ SUBPARTITIONS 0.16E+1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.16E+1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1344,7 +1344,7 @@ SUBPARTITIONS 0.0E+300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.0E+300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1367,7 +1367,7 @@ SUBPARTITIONS 1E+300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1E+300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1390,7 +1390,7 @@ SUBPARTITIONS 1E-300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1E-300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 # 4.2.4 partition/subpartition numbers STRING notation CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1414,7 +1414,7 @@ SUBPARTITIONS '2' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1437,7 +1437,7 @@ SUBPARTITIONS '2.0' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2.0' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (' at line 9 +PARTITION part2 VALUES LESS THA...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1460,7 +1460,7 @@ SUBPARTITIONS '0.2E+1' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0.2E+1' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1483,7 +1483,7 @@ SUBPARTITIONS '2A' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2A' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1506,7 +1506,7 @@ SUBPARTITIONS 'A2' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''A2' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1529,7 +1529,7 @@ SUBPARTITIONS '' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1552,7 +1552,7 @@ SUBPARTITIONS 'GARBAGE' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''GARBAGE' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 +PARTITION part2 VALUES LESS...' at line 9 # 4.2.5 partition/subpartition numbers other notations CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1576,7 +1576,7 @@ SUBPARTITIONS 2A PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2A (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1599,7 +1599,7 @@ SUBPARTITIONS A2 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'A2 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1622,7 +1622,7 @@ SUBPARTITIONS GARBAGE PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GARBAGE (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1645,7 +1645,7 @@ SUBPARTITIONS "2" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"2" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1668,7 +1668,7 @@ SUBPARTITIONS "2A" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"2A" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1691,7 +1691,7 @@ SUBPARTITIONS "A2" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"A2" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1714,7 +1714,7 @@ SUBPARTITIONS "GARBAGE" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"GARBAGE" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 +PARTITION part2 VALUES LESS...' at line 9 # 4.2.6 (negative) partition/subpartition numbers per @variables SET @aux = 5; CREATE TABLE t1 ( @@ -1739,7 +1739,7 @@ SUBPARTITIONS @aux = 5 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@aux = 5 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 #------------------------------------------------------------------------ # 4.3 Mixups of assigned partition/subpartition numbers and names #------------------------------------------------------------------------ @@ -1852,7 +1852,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1871,7 +1871,7 @@ PARTITION part3 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPAR' at line 13 +(SUBPARTITION subpart31, SUB...' at line 13 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1914,7 +1914,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1933,7 +1933,7 @@ PARTITION part3 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ' at line 11 +(SUBPARTITION subpart21 ...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1950,7 +1950,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 #======================================================================== # 5. Checks of logical partition/subpartition name diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index afbc29c57aa..82e16c9be25 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -22,17 +22,16 @@ set global server_audit_file_path='server_audit.log'; set global server_audit_output_type=file; set global server_audit_logging=on; set global server_audit_incl_users= repeat("'root',", 10000); -ERROR 42000: Variable 'server_audit_incl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','roo' +ERROR 42000: Variable 'server_audit_incl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','...' show variables like 'server_audit_incl_users'; Variable_name Value server_audit_incl_users set global server_audit_excl_users= repeat("'root',", 10000); -ERROR 42000: Variable 'server_audit_excl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','roo' +ERROR 42000: Variable 'server_audit_excl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','...' show variables like 'server_audit_excl_users'; Variable_name Value server_audit_excl_users connect con1,localhost,root,,mysql; -connection default; disconnect con1; connect(localhost,no_such_user,,mysql,MASTER_PORT,MASTER_SOCKET); connect con1,localhost,no_such_user,,mysql; @@ -99,7 +98,6 @@ set global server_audit_mode=1; set global server_audit_events=''; create database sa_db; connect con1,localhost,root,,test; -connection con1; create table t1 (id2 int); insert into t1 values (1), (2); select * from t1; @@ -112,8 +110,8 @@ create table sa_t1(id int); insert into sa_t1 values (1), (2); drop table sa_t1; drop database sa_db; -connection default; disconnect con1; +connection default; create database sa_db; use sa_db; CREATE USER u1 IDENTIFIED BY 'pwd-123'; @@ -219,7 +217,7 @@ grant all on sa_db.* to user1@localhost; connect cn1,localhost,user1,,sa_db; connection cn1; create table t1(id int) engine=myisam; -insert delayed into t1 values (1), (2); +insert delayed into t1 values (1); connection default; # Waiting until INSERT DELAYED thread does the insert. drop table t1; diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 9833b972725..2a76c1eaadc 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -5,6 +5,13 @@ if (!$SERVER_AUDIT_SO) { skip No SERVER_AUDIT plugin; } +# An unfortunate wait for check-testcase.test to complete disconnect. +let count_sessions= 1; +source include/wait_until_count_sessions.inc; + +let $MYSQLD_DATADIR= `SELECT @@datadir`; +let SEARCH_FILE= $MYSQLD_DATADIR/server_audit.log; + install plugin server_audit soname 'server_audit'; show variables like 'server_audit%'; @@ -20,18 +27,21 @@ show variables like 'server_audit_incl_users'; --error ER_WRONG_VALUE_FOR_VAR set global server_audit_excl_users= repeat("'root',", 10000); show variables like 'server_audit_excl_users'; +let SEARCH_COUNT= 5; +source include/wait_for_line_count_in_file.inc; ---sleep 2 connect (con1,localhost,root,,mysql); -connection default; disconnect con1; ---sleep 2 ---sleep 2 +let SEARCH_COUNT= 7; +source include/wait_for_line_count_in_file.inc; + --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_ACCESS_DENIED_ERROR connect (con1,localhost,no_such_user,,mysql); +let SEARCH_COUNT= 9; +source include/wait_for_line_count_in_file.inc; + connection default; ---sleep 2 set global server_audit_incl_users='odin, dva, tri'; create table t1 (id int); set global server_audit_incl_users='odin, root, dva, tri'; @@ -61,11 +71,10 @@ show variables like 'server_audit%'; set global server_audit_mode=1; set global server_audit_events=''; create database sa_db; ---sleep 2 +let SEARCH_COUNT= 47; +source include/wait_for_line_count_in_file.inc; + connect (con1,localhost,root,,test); -connection con1; ---sleep 2 ---sleep 2 create table t1 (id2 int); insert into t1 values (1), (2); select * from t1; @@ -75,10 +84,11 @@ create table sa_t1(id int); insert into sa_t1 values (1), (2); drop table sa_t1; drop database sa_db; -connection default; disconnect con1; ---sleep 2 ---sleep 2 +let SEARCH_COUNT= 80; +source include/wait_for_line_count_in_file.inc; + +connection default; create database sa_db; use sa_db; CREATE USER u1 IDENTIFIED BY 'pwd-123'; @@ -146,10 +156,10 @@ connect (cn1,localhost,user1,,sa_db); connection cn1; create table t1(id int) engine=myisam; -insert delayed into t1 values (1), (2); +insert delayed into t1 values (1); connection default; --echo # Waiting until INSERT DELAYED thread does the insert. -let $wait_condition= SELECT COUNT(*) = 2 FROM t1; +let $wait_condition= SELECT COUNT(*) = 1 FROM t1; --source include/wait_condition.inc drop table t1; @@ -182,7 +192,6 @@ show status like 'server_audit_current_log'; show variables like 'server_audit%'; uninstall plugin server_audit; -let $MYSQLD_DATADIR= `SELECT @@datadir`; # replace the timestamp and the hostname with constant values --replace_regex /[0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\,[^,]*\,/TIME,HOSTNAME,/ /\,[1-9][0-9]*\,/,1,/ /\,[1-9][0-9]*/,ID/ cat_file $MYSQLD_DATADIR/server_audit.log; diff --git a/mysql-test/suite/rpl/r/rpl_current_user.result b/mysql-test/suite/rpl/r/rpl_current_user.result index efb036023e9..bddd25405e8 100644 --- a/mysql-test/suite/rpl/r/rpl_current_user.result +++ b/mysql-test/suite/rpl/r/rpl_current_user.result @@ -15,7 +15,7 @@ GRANT ALL PRIVILEGES ON *.* TO 'bug48321_1-01234'@'localhost' WITH GRANT OPTION; # Test the max lengths of user and host names # the user name is too long GRANT CREATE USER ON *.* TO '012345678901234567890123456789012345678901234567890123456789012345678901234567890'@'fakehost'; -ERROR HY000: String '0123456789012345678901234567890123456789012345678901234567890123456789' is too long for user name (should be no longer than 80) +ERROR HY000: String '0123456789012345678901234567890123456789012345678901234567890123456...' is too long for user name (should be no longer than 80) # the host name is too long GRANT CREATE USER ON *.* TO 'fakename'@'0123456789012345678901234567890123456789012345678901234567890'; ERROR HY000: String '0123456789012345678901234567890123456789012345678901234567890' is too long for host name (should be no longer than 60) diff --git a/mysql-test/suite/rpl/r/rpl_password_boundaries.result b/mysql-test/suite/rpl/r/rpl_password_boundaries.result index eeee4c9ad58..8370213ad0e 100644 --- a/mysql-test/suite/rpl/r/rpl_password_boundaries.result +++ b/mysql-test/suite/rpl/r/rpl_password_boundaries.result @@ -24,11 +24,11 @@ set sql_log_bin=1; connection slave; include/stop_slave.inc change master to master_user='rpl33',master_password='0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef!'; -ERROR HY000: String '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012345' is too long for MASTER_PASSWORD (should be no longer than 96) +ERROR HY000: String '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012...' is too long for MASTER_PASSWORD (should be no longer than 96) change master to master_user='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; -ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long for MASTER_USER (should be no longer than 128) +ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' is too long for MASTER_USER (should be no longer than 128) change master to master_host='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'; -ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbb' is too long for MASTER_HOST (should be no longer than 60) +ERROR HY000: String 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb...' is too long for MASTER_HOST (should be no longer than 60) connection master; set sql_log_bin=0; grant replication slave on *.* to rpl16cyr@127.0.0.1 identified by 'воттакойужпарольвоттакойужпарольвоттакойужпароль'; @@ -50,7 +50,7 @@ set sql_log_bin=1; connection slave; include/stop_slave.inc change master to master_user='rpl17mix',master_password='воттакойужпарольвоттакойужпарольвоттакойужпароль!'; -ERROR HY000: String 'воттакойужпарольвоттакойужпарольвот' is too long for MASTER_PASSWORD (should be no longer than 96) +ERROR HY000: String 'воттакойужпарольвоттакойужпарольв...' is too long for MASTER_PASSWORD (should be no longer than 96) connection master; set sql_log_bin=0; drop user rpl32@127.0.0.1, rpl33@127.0.0.1, rpl16cyr@127.0.0.1, rpl17mix@127.0.0.1; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_select.result b/mysql-test/suite/rpl/r/rpl_row_create_select.result index b064d42982f..cbe84f20786 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_select.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_select.result @@ -10,7 +10,7 @@ connection master; SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a; Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -19,7 +19,7 @@ t1 CREATE TABLE `t1` ( SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a; Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' +Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...' SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/suite/sql_sequence/replication.result b/mysql-test/suite/sql_sequence/replication.result index d5e5dcc75eb..7bf0eac8c47 100644 --- a/mysql-test/suite/sql_sequence/replication.result +++ b/mysql-test/suite/sql_sequence/replication.result @@ -87,7 +87,7 @@ CREATE SEQUENCE `s2` ( ) ENGINE=InnoDB sequence=1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '( `next_not_cached_value` bigint(21) NOT NULL, -`minimum_value` bigint(21) NOT NU' at line 1 +`minimum_value` bigint(21) NOT...' at line 1 CREATE TABLE `s2` ( `next_not_cached_value` bigint(21) NOT NULL, `minimum_value` bigint(21) NOT NULL, diff --git a/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result index ae556ceedb2..3a5eb46df68 100644 --- a/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result @@ -36,7 +36,7 @@ SELECT @@global.innodb_compression_failure_threshold_pct; '#--------------------FN_DYNVARS_046_04-------------------------#' SET @@global.innodb_compression_failure_threshold_pct = -1; Warnings: -Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '-1' +Warning 1292 Truncated incorrect innodb_compression_failure_th... value: '-1' SELECT @@global.innodb_compression_failure_threshold_pct; @@global.innodb_compression_failure_threshold_pct 0 @@ -57,7 +57,7 @@ SELECT @@global.innodb_compression_failure_threshold_pct; 0 SET @@global.innodb_compression_failure_threshold_pct = 101; Warnings: -Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '101' +Warning 1292 Truncated incorrect innodb_compression_failure_th... value: '101' SELECT @@global.innodb_compression_failure_threshold_pct; @@global.innodb_compression_failure_threshold_pct 100 diff --git a/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result b/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result index ffbeb39fe33..a8ca081d0f0 100644 --- a/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_defragment_fill_factor_n_recs_basic.result @@ -19,13 +19,13 @@ SELECT @@global.innodb_defragment_fill_factor_n_recs; 1 SET @@global.innodb_defragment_fill_factor_n_recs = -1; Warnings: -Warning 1292 Truncated incorrect innodb_defragment_fill_factor_n_ value: '-1' +Warning 1292 Truncated incorrect innodb_defragment_fill_factor... value: '-1' SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 1 SET @@global.innodb_defragment_fill_factor_n_recs = 10000; Warnings: -Warning 1292 Truncated incorrect innodb_defragment_fill_factor_n_ value: '10000' +Warning 1292 Truncated incorrect innodb_defragment_fill_factor... value: '10000' SELECT @@global.innodb_defragment_fill_factor_n_recs; @@global.innodb_defragment_fill_factor_n_recs 100 diff --git a/mysql-test/suite/sys_vars/r/innodb_limit_optimistic_insert_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_limit_optimistic_insert_debug_basic.result index 3d4f401aad1..589de8fa5fc 100644 --- a/mysql-test/suite/sys_vars/r/innodb_limit_optimistic_insert_debug_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_limit_optimistic_insert_debug_basic.result @@ -49,7 +49,7 @@ set global innodb_limit_optimistic_insert_debug='foo'; ERROR 42000: Incorrect argument type to variable 'innodb_limit_optimistic_insert_debug' set global innodb_limit_optimistic_insert_debug=-2; Warnings: -Warning 1292 Truncated incorrect innodb_limit_optimistic_insert_d value: '-2' +Warning 1292 Truncated incorrect innodb_limit_optimistic_inser... value: '-2' set global innodb_limit_optimistic_insert_debug=1e1; ERROR 42000: Incorrect argument type to variable 'innodb_limit_optimistic_insert_debug' SET @@global.innodb_limit_optimistic_insert_debug = @start_global_value; diff --git a/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result index 6e325d0be38..c05432fe2b9 100644 --- a/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result @@ -10,13 +10,13 @@ SELECT @@global.innodb_merge_threshold_set_all_debug; 1 set global innodb_merge_threshold_set_all_debug = 51; Warnings: -Warning 1292 Truncated incorrect innodb_merge_threshold_set_all_d value: '51' +Warning 1292 Truncated incorrect innodb_merge_threshold_set_al... value: '51' SELECT @@global.innodb_merge_threshold_set_all_debug; @@global.innodb_merge_threshold_set_all_debug 50 set global innodb_merge_threshold_set_all_debug = 0; Warnings: -Warning 1292 Truncated incorrect innodb_merge_threshold_set_all_d value: '0' +Warning 1292 Truncated incorrect innodb_merge_threshold_set_al... value: '0' SELECT @@global.innodb_merge_threshold_set_all_debug; @@global.innodb_merge_threshold_set_all_debug 1 diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result index 79eb0743dfa..65387032dc6 100644 --- a/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result @@ -36,13 +36,13 @@ SELECT @@global.innodb_purge_rseg_truncate_frequency; '#--------------------FN_DYNVARS_046_05-------------------------#' SET @@global.innodb_purge_rseg_truncate_frequency = -1; Warnings: -Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '-1' +Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1' SELECT @@global.innodb_purge_rseg_truncate_frequency; @@global.innodb_purge_rseg_truncate_frequency 1 SET @@global.innodb_purge_rseg_truncate_frequency = -1024; Warnings: -Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '-1024' +Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1024' SELECT @@global.innodb_purge_rseg_truncate_frequency; @@global.innodb_purge_rseg_truncate_frequency 1 @@ -103,7 +103,7 @@ SELECT @@global.innodb_purge_rseg_truncate_frequency; 1 SET @@global.innodb_purge_rseg_truncate_frequency = FALSE; Warnings: -Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '0' +Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '0' SELECT @@global.innodb_purge_rseg_truncate_frequency; @@global.innodb_purge_rseg_truncate_frequency 1 diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result index ec211b693df..68ba8bbfb4a 100644 --- a/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result @@ -45,7 +45,7 @@ select @@global.innodb_stats_persistent_sample_pages; 20 SET global innodb_stats_persistent_sample_pages=0; Warnings: -Warning 1292 Truncated incorrect innodb_stats_persistent_sample_p value: '0' +Warning 1292 Truncated incorrect innodb_stats_persistent_sampl... value: '0' SELECT @@global.innodb_stats_persistent_sample_pages; @@global.innodb_stats_persistent_sample_pages 1 @@ -71,7 +71,7 @@ SELECT @@global.innodb_stats_persistent_sample_pages; 10 SET global innodb_stats_persistent_sample_pages=-7; Warnings: -Warning 1292 Truncated incorrect innodb_stats_persistent_sample_p value: '-7' +Warning 1292 Truncated incorrect innodb_stats_persistent_sampl... value: '-7' SELECT @@global.innodb_stats_persistent_sample_pages; @@global.innodb_stats_persistent_sample_pages 1 diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result index abd6beec929..89000c3136b 100644 --- a/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result @@ -53,7 +53,7 @@ SET global innodb_stats_transient_sample_pages=' '; ERROR 42000: Incorrect argument type to variable 'innodb_stats_transient_sample_pages' SET global innodb_stats_transient_sample_pages=-7; Warnings: -Warning 1292 Truncated incorrect innodb_stats_transient_sample_pa value: '-7' +Warning 1292 Truncated incorrect innodb_stats_transient_sample... value: '-7' SELECT @@global.innodb_stats_transient_sample_pages; @@global.innodb_stats_transient_sample_pages 1 diff --git a/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result b/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result index be10c93b56b..0eebc758cf6 100644 --- a/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_tmpdir_basic.result @@ -24,11 +24,11 @@ ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir' set global innodb_tmpdir=1e1; ERROR 42000: Incorrect argument type to variable 'innodb_tmpdir' set global innodb_tmpdir=repeat('a',1000); -ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +ERROR 42000: Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' show warnings; Level Code Message Warning 1210 Path length should not exceed 512 bytes -Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +Error 1231 Variable 'innodb_tmpdir' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...' SET @@global.innodb_tmpdir = @start_global_value; SELECT @@global.innodb_tmpdir; @@global.innodb_tmpdir diff --git a/mysql-test/suite/sys_vars/r/optimizer_selectivity_sampling_limit_basic.result b/mysql-test/suite/sys_vars/r/optimizer_selectivity_sampling_limit_basic.result index 4df024b9cec..54d5e796267 100644 --- a/mysql-test/suite/sys_vars/r/optimizer_selectivity_sampling_limit_basic.result +++ b/mysql-test/suite/sys_vars/r/optimizer_selectivity_sampling_limit_basic.result @@ -30,7 +30,7 @@ SELECT @@global.optimizer_selectivity_sampling_limit; 100 SET @@global.optimizer_selectivity_sampling_limit = 9; Warnings: -Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '9' +Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '9' SELECT @@global.optimizer_selectivity_sampling_limit; @@global.optimizer_selectivity_sampling_limit 10 @@ -56,7 +56,7 @@ SELECT @@global.optimizer_selectivity_sampling_limit; 4294967295 SET @@global.optimizer_selectivity_sampling_limit = 4294967296; Warnings: -Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '4294967296' +Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '4294967296' SELECT @@global.optimizer_selectivity_sampling_limit; @@global.optimizer_selectivity_sampling_limit 4294967295 @@ -66,7 +66,7 @@ SELECT @@session.optimizer_selectivity_sampling_limit; 100 SET @@session.optimizer_selectivity_sampling_limit = 9; Warnings: -Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '9' +Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '9' SELECT @@session.optimizer_selectivity_sampling_limit; @@session.optimizer_selectivity_sampling_limit 10 @@ -92,7 +92,7 @@ SELECT @@session.optimizer_selectivity_sampling_limit; 4294967295 SET @@session.optimizer_selectivity_sampling_limit = 4294967296; Warnings: -Warning 1292 Truncated incorrect optimizer_selectivity_sampling_l value: '4294967296' +Warning 1292 Truncated incorrect optimizer_selectivity_samplin... value: '4294967296' SELECT @@session.optimizer_selectivity_sampling_limit; @@session.optimizer_selectivity_sampling_limit 4294967295 diff --git a/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result b/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result index 1e6d420a9d7..4b92a80be03 100644 --- a/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result +++ b/mysql-test/suite/sys_vars/r/optimizer_use_condition_selectivity_basic.result @@ -3,7 +3,7 @@ SET @start_session_value = @@session.optimizer_use_condition_selectivity; '#--------------------FN_DYNVARS_115_03-------------------------#' SET @@global.optimizer_use_condition_selectivity = 0; Warnings: -Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0' +Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '0' SELECT @@global.optimizer_use_condition_selectivity; @@global.optimizer_use_condition_selectivity 1 @@ -29,14 +29,14 @@ SELECT @@global.optimizer_use_condition_selectivity; 5 SET @@global.optimizer_use_condition_selectivity = 6; Warnings: -Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '6' +Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '6' SELECT @@global.optimizer_use_condition_selectivity; @@global.optimizer_use_condition_selectivity 5 '#--------------------FN_DYNVARS_115_04-------------------------#' SET @@session.optimizer_use_condition_selectivity = 0; Warnings: -Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '0' +Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '0' SELECT @@session.optimizer_use_condition_selectivity; @@session.optimizer_use_condition_selectivity 1 @@ -62,7 +62,7 @@ SELECT @@session.optimizer_use_condition_selectivity; 5 SET @@session.optimizer_use_condition_selectivity = 6; Warnings: -Warning 1292 Truncated incorrect optimizer_use_condition_selectiv value: '6' +Warning 1292 Truncated incorrect optimizer_use_condition_selec... value: '6' SELECT @@session.optimizer_use_condition_selectivity; @@session.optimizer_use_condition_selectivity 5 diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result index 2824f82cfff..924005a3001 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -3516,7 +3516,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME TCP_KEEPALIVE_TIME VARIABLE_SCOPE GLOBAL VARIABLE_TYPE INT -VARIABLE_COMMENT Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used. +VARIABLE_COMMENT Timeout, in seconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2147483 NUMERIC_BLOCK_SIZE 1 diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index f1b73b0e1c8..e07d2c503e4 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -4216,7 +4216,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME TCP_KEEPALIVE_TIME VARIABLE_SCOPE GLOBAL VARIABLE_TYPE INT -VARIABLE_COMMENT Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used. +VARIABLE_COMMENT Timeout, in seconds, with no activity until the first TCP keep-alive packet is sent.If set to 0, system dependent default is used. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 2147483 NUMERIC_BLOCK_SIZE 1 diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index c8114822897..3cdba78b973 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -54,7 +54,7 @@ add column trx_end timestamp(6) not null as row end invisible, add period for system_time(trx_start, trx_end), add system versioning; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as row start invisible, -add column trx_end timestamp(6) not null as row end invi' at line 2 +add column trx_end timestamp(6) not null as row end i...' at line 2 alter table t add column trx_start timestamp(6) as row start invisible, add column trx_end timestamp(6) as row end invisible, @@ -688,6 +688,15 @@ change column c c int, change column b b int without system versioning; drop table t; # +# MDEV-21688 Assertion or ER_WARN_DATA_OUT_OF_RANGE upon ALTER on previously versioned table +# +create or replace table t1 (a int) with system versioning; +insert into t1 values (128); +delete from t1; +set statement system_versioning_alter_history=keep for +alter table t1 drop system versioning, modify column a tinyint; +drop table t1; +# # MDEV-21941 RENAME doesn't work for system time or period fields # create or replace table t1 (a int) with system versioning; @@ -710,3 +719,4 @@ t1 CREATE TABLE `t1` ( PERIOD FOR SYSTEM_TIME (`x`, `y`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING drop table t1; +# End of 10.5 tests diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index a7047cbd11b..bb0284a8f06 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -1010,6 +1010,17 @@ insert into t2 values (1),(2); update t1, t2 set a = 1; drop table t1, t2; # +# MDEV-20515 multi-update tries to position updated table by null reference +# +create or replace table t1 (a int); +insert into t1 values (0), (1); +create or replace table t2 (b int) with system versioning +partition by system_time +(partition p1 history, partition pn current); +insert into t2 values (0), (2); +update t1 left join t2 on a > b set b= 2 order by b; +drop table t1, t2; +# # MDEV-22153 ALTER add default history partitions breaks table # create or replace table t1 (x int) with system versioning partition by system_time; @@ -1044,3 +1055,32 @@ t1 CREATE TABLE `t1` ( PARTITION BY SYSTEM_TIME PARTITIONS 8 drop tables t1; +# +# MDEV-17091 Assertion `old_part_id == m_last_part' failed in +# ha_partition::update_row or `part_id == m_last_part' in +# ha_partition::delete_row upon UPDATE/DELETE after dropping versioning +# +create or replace table t1 (pk int primary key, f int) engine=innodb +with system versioning +partition by key() partitions 2; +insert into t1 values (1,10),(2,20); +# expected to hit same partition +select * from t1 partition (p0); +pk f +1 10 +2 20 +alter table t1 drop system versioning; +# 1 and 2 are expected to be in different partitions +select * from t1 partition(p0); +pk f +1 10 +select * from t1 partition(p1); +pk f +2 20 +update t1 set f=pk; +delete from t1; +drop table t1; +# End of 10.5 tests +# Test cleanup +drop database test; +create database test; diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result index a2ec02a7ec1..f7901d11d2a 100644 --- a/mysql-test/suite/versioning/r/update.result +++ b/mysql-test/suite/versioning/r/update.result @@ -312,3 +312,10 @@ ERROR 42S22: Unknown column 'xx' in 'field list' drop procedure sp; drop view v1; drop table t1; +# +# MDEV-21342 Assertion in set_ok_status() upon spatial field error on system-versioned table +# +create or replace table t1 (f point, key(f)) with system versioning engine=myisam; +update t1 set f = null where f = 'foo'; +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +drop table t1; diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test index 05e7fbd962f..9e0ed7cabb9 100644 --- a/mysql-test/suite/versioning/t/alter.test +++ b/mysql-test/suite/versioning/t/alter.test @@ -583,6 +583,18 @@ alter table t drop table t; --echo # +--echo # MDEV-21688 Assertion or ER_WARN_DATA_OUT_OF_RANGE upon ALTER on previously versioned table +--echo # +create or replace table t1 (a int) with system versioning; +insert into t1 values (128); +delete from t1; +set statement system_versioning_alter_history=keep for +alter table t1 drop system versioning, modify column a tinyint; + +# cleanup +drop table t1; + +--echo # --echo # MDEV-21941 RENAME doesn't work for system time or period fields --echo # create or replace table t1 (a int) with system versioning; @@ -602,3 +614,5 @@ alter table t1 rename column row_end to y; show create table t1; # cleanup drop table t1; + +--echo # End of 10.5 tests diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index d49fdf530dd..417052c2bb1 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -838,6 +838,22 @@ update t1, t2 set a = 1; drop table t1, t2; --echo # +--echo # MDEV-20515 multi-update tries to position updated table by null reference +--echo # +create or replace table t1 (a int); +insert into t1 values (0), (1); + +create or replace table t2 (b int) with system versioning +partition by system_time +(partition p1 history, partition pn current); + +insert into t2 values (0), (2); +update t1 left join t2 on a > b set b= 2 order by b; + +# cleanup +drop table t1, t2; + +--echo # --echo # MDEV-22153 ALTER add default history partitions breaks table --echo # create or replace table t1 (x int) with system versioning partition by system_time; @@ -853,3 +869,29 @@ show create table t1; drop tables t1; --source suite/versioning/common_finish.inc +--echo # +--echo # MDEV-17091 Assertion `old_part_id == m_last_part' failed in +--echo # ha_partition::update_row or `part_id == m_last_part' in +--echo # ha_partition::delete_row upon UPDATE/DELETE after dropping versioning +--echo # +create or replace table t1 (pk int primary key, f int) engine=innodb + with system versioning + partition by key() partitions 2; +insert into t1 values (1,10),(2,20); +--echo # expected to hit same partition +select * from t1 partition (p0); +alter table t1 drop system versioning; + +--echo # 1 and 2 are expected to be in different partitions +select * from t1 partition(p0); +select * from t1 partition(p1); + +update t1 set f=pk; +delete from t1; +drop table t1; + +--echo # End of 10.5 tests + +--echo # Test cleanup +drop database test; +create database test; diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test index 71e946e6c2b..5b0a9eb5c42 100644 --- a/mysql-test/suite/versioning/t/update.test +++ b/mysql-test/suite/versioning/t/update.test @@ -235,4 +235,14 @@ drop procedure sp; drop view v1; drop table t1; +--echo # +--echo # MDEV-21342 Assertion in set_ok_status() upon spatial field error on system-versioned table +--echo # +create or replace table t1 (f point, key(f)) with system versioning engine=myisam; +--error ER_CANT_CREATE_GEOMETRY_OBJECT +update t1 set f = null where f = 'foo'; + +# cleanup +drop table t1; + source suite/versioning/common_finish.inc; diff --git a/mysys/hash.c b/mysys/hash.c index 347e0cfda8a..87d714d6148 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -116,17 +116,23 @@ my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size, static inline void my_hash_free_elements(HASH *hash) { uint records= hash->records; + if (records == 0) + return; + /* Set records to 0 early to guard against anyone looking at the structure during the free process */ hash->records= 0; + if (hash->free) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); HASH_LINK *end= data + records; - while (data < end) + do + { (*hash->free)((data++)->data); + } while (data < end); } } diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c index 86464b3eaeb..2162e1771ba 100644 --- a/mysys/lf_alloc-pin.c +++ b/mysys/lf_alloc-pin.c @@ -101,6 +101,7 @@ */ #include "mysys_priv.h" #include <lf.h> +#include "my_cpu.h" /* when using alloca() leave at least that many bytes of the stack - diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c index 6a1e69f529f..fd005b4584b 100644 --- a/mysys/lf_hash.c +++ b/mysys/lf_hash.c @@ -27,6 +27,7 @@ #include <mysys_err.h> #include <my_bit.h> #include <lf.h> +#include "my_cpu.h" /* An element of the list */ typedef struct { diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index e7a94da5040..25b492846e5 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -18,6 +18,7 @@ #include "my_static.h" #include <errno.h> #include "mysys_err.h" +#include "my_atomic.h" static void make_ftype(char * to,int flag); @@ -222,7 +223,8 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags) { if (my_file_info[Filedes].type != UNOPEN) { - thread_safe_decrement32(&my_file_opened); /* File is opened with my_open ! */ + /* File is opened with my_open ! */ + my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED); } else { diff --git a/mysys/my_getncpus.c b/mysys/my_getncpus.c index 6890de4f827..0d081b72d11 100644 --- a/mysys/my_getncpus.c +++ b/mysys/my_getncpus.c @@ -39,7 +39,11 @@ int my_getncpus(void) configured via core affinity. */ #if (defined(__linux__) || defined(__FreeBSD__)) && defined(HAVE_PTHREAD_GETAFFINITY_NP) +#ifdef __linux__ cpu_set_t set; +#else + cpuset_t set; +#endif if (pthread_getaffinity_np(pthread_self(), sizeof(set), &set) == 0) { #ifdef CPU_COUNT diff --git a/mysys/my_lib.c b/mysys/my_lib.c index 32fb35fd65b..ca50699b4c3 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -1,4 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2008, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -109,7 +110,7 @@ static char *directory_file_name (char * dst, const char *src) MY_DIR *my_dir(const char *path, myf MyFlags) { - MY_DIR_HANDLE *dirh= 0; + MY_DIR_HANDLE *dirh; FILEINFO finfo; DIR *dirp; struct dirent *dp; @@ -122,11 +123,14 @@ MY_DIR *my_dir(const char *path, myf MyFlags) tmp_file= directory_file_name(tmp_path, path); if (!(dirp= opendir(tmp_path))) - goto error; + { + my_errno= errno; + goto err_open; + } if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh), MYF(MyFlags | MY_ZEROFILL)))) - goto error; + goto err_alloc; if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO), ENTRIES_START_SIZE, ENTRIES_INCREMENT, @@ -180,11 +184,11 @@ MY_DIR *my_dir(const char *path, myf MyFlags) DBUG_RETURN(&dirh->dir); - error: - my_errno=errno; - if (dirp) - (void) closedir(dirp); +error: my_dirend(&dirh->dir); +err_alloc: + (void) closedir(dirp); +err_open: if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_DIR, MYF(ME_BELL), path, my_errno); DBUG_RETURN(NULL); diff --git a/mysys/my_open.c b/mysys/my_open.c index a6cbffa0806..8b5f4f9435e 100644 --- a/mysys/my_open.c +++ b/mysys/my_open.c @@ -17,6 +17,7 @@ #include "mysys_err.h" #include <m_string.h> #include <errno.h> +#include "my_atomic.h" CREATE_NOSYMLINK_FUNCTION( open_nosymlinks(const char *pathname, int flags, int mode), @@ -105,7 +106,7 @@ int my_close(File fd, myf MyFlags) { my_free(name); } - thread_safe_decrement32(&my_file_opened); + my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED); DBUG_RETURN(err); } /* my_close */ @@ -133,7 +134,7 @@ File my_register_filename(File fd, const char *FileName, enum file_type DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { - thread_safe_increment32(&my_file_opened); + my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c index 2a97c6133e8..dd60088d534 100644 --- a/mysys/waiting_threads.c +++ b/mysys/waiting_threads.c @@ -175,6 +175,7 @@ #include <my_global.h> #include <waiting_threads.h> #include <m_string.h> +#include "my_cpu.h" /* status variables */ diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c index 251078b1492..9add1aab298 100644 --- a/plugin/server_audit/server_audit.c +++ b/plugin/server_audit/server_audit.c @@ -1,5 +1,5 @@ /* Copyright (C) 2013, 2015, Alexey Botchkov and SkySQL Ab - Copyright (c) 2019, MariaDB Corporation. + Copyright (c) 2019, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -764,7 +764,7 @@ static int user_coll_fill(struct user_coll *c, char *users, if (cmp_user && take_over_cmp) { ADD_ATOMIC(internal_stop_logging, 1); - CLIENT_ERROR(1, "User '%.*s' was removed from the" + CLIENT_ERROR(1, "User '%.*b' was removed from the" " server_audit_excl_users.", MYF(ME_WARNING), (int) cmp_length, users); ADD_ATOMIC(internal_stop_logging, -1); @@ -774,7 +774,7 @@ static int user_coll_fill(struct user_coll *c, char *users, else if (cmp_user) { ADD_ATOMIC(internal_stop_logging, 1); - CLIENT_ERROR(1, "User '%.*s' is in the server_audit_incl_users, " + CLIENT_ERROR(1, "User '%.*b' is in the server_audit_incl_users, " "so wasn't added.", MYF(ME_WARNING), (int) cmp_length, users); ADD_ATOMIC(internal_stop_logging, -1); remove_user(users); diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6-debug.result b/plugin/type_inet/mysql-test/type_inet/type_inet6-debug.result index 0e879aad58f..e21fb47fea8 100644 --- a/plugin/type_inet/mysql-test/type_inet/type_inet6-debug.result +++ b/plugin/type_inet/mysql-test/type_inet/type_inet6-debug.result @@ -6,8 +6,8 @@ SET debug_dbug="+d,frm_data_type_info"; CREATE TABLE t1 (c01 INET6, c02 INET6); Warnings: Note 1105 build_frm_image: Field data type info length: 14 -Note 1105 DBUG: [0] name='c01' type_info='inet6' -Note 1105 DBUG: [1] name='c02' type_info='inet6' +Note 1105 DBUG: [0] name='c01' type_info='in...' +Note 1105 DBUG: [1] name='c02' type_info='in...' SET debug_dbug=@old_debug_dbug; SHOW CREATE TABLE t1; Table Create Table diff --git a/plugin/type_test/mysql-test/type_test/type_test_double-debug.result b/plugin/type_test/mysql-test/type_test/type_test_double-debug.result index 975decca11e..ba4c8ea7b6a 100644 --- a/plugin/type_test/mysql-test/type_test/type_test_double-debug.result +++ b/plugin/type_test/mysql-test/type_test/type_test_double-debug.result @@ -8,14 +8,14 @@ SET @@debug_dbug="+d,frm_data_type_info"; CREATE TABLE t1 (a TEST_DOUBLE); Warnings: Note 1105 build_frm_image: Field data type info length: 13 -Note 1105 DBUG: [0] name='a' type_info='test_double' +Note 1105 DBUG: [0] name='a' type_info='test_dou...' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` test_double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Warnings: -Note 1105 DBUG: [0] name='a' type_info='test_double' +Note 1105 DBUG: [0] name='a' type_info='test_dou...' DROP TABLE t1; SET @@debug_dbug=@old_debug_dbug; # Testing what happens on failure to resolve a type handler by name @@ -24,7 +24,7 @@ SET @@debug_dbug="+d,frm_data_type_info"; CREATE TABLE t1 (a TEST_DOUBLE); Warnings: Note 1105 build_frm_image: Field data type info length: 13 -Note 1105 DBUG: [0] name='a' type_info='test_double' +Note 1105 DBUG: [0] name='a' type_info='test_dou...' FLUSH TABLES; SET @@debug_dbug="+d,emulate_handler_by_name_or_error_failure"; SHOW CREATE TABLE t1; diff --git a/plugin/type_test/mysql-test/type_test/type_test_int8-debug.result b/plugin/type_test/mysql-test/type_test/type_test_int8-debug.result index 952a63c8476..e348b5b5f18 100644 --- a/plugin/type_test/mysql-test/type_test/type_test_int8-debug.result +++ b/plugin/type_test/mysql-test/type_test/type_test_int8-debug.result @@ -8,14 +8,14 @@ SET @@debug_dbug="+d,frm_data_type_info"; CREATE TABLE t1 (a TEST_INT8); Warnings: Note 1105 build_frm_image: Field data type info length: 11 -Note 1105 DBUG: [0] name='a' type_info='test_int8' +Note 1105 DBUG: [0] name='a' type_info='test_i...' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` test_int8(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Warnings: -Note 1105 DBUG: [0] name='a' type_info='test_int8' +Note 1105 DBUG: [0] name='a' type_info='test_i...' DROP TABLE t1; SET @@debug_dbug=@old_debug_dbug; # Testing what happens on failure to resolve a type handler by name @@ -24,7 +24,7 @@ SET @@debug_dbug="+d,frm_data_type_info"; CREATE TABLE t1 (a TEST_INT8); Warnings: Note 1105 build_frm_image: Field data type info length: 11 -Note 1105 DBUG: [0] name='a' type_info='test_int8' +Note 1105 DBUG: [0] name='a' type_info='test_i...' FLUSH TABLES; SET @@debug_dbug="+d,emulate_handler_by_name_or_error_failure"; SHOW CREATE TABLE t1; diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index b452e55c1da..1518bbd5a2a 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -171,6 +171,14 @@ ALTER TABLE user ALTER TABLE user ADD Password char(41) character set latin1 collate latin1_bin NOT NULL default '' AFTER User; +# In MySQL the Unix socket authentication plugin has a different name. Thus the +# references to it need to be renamed in the user table. Thanks to the WHERE +# clauses this applies only to MySQL->MariaDB upgrades and nothing else. +UPDATE user + SET plugin='unix_socket' WHERE plugin='auth_socket'; +DELETE FROM plugin + WHERE name='auth_socket'; + ALTER TABLE user MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '', MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, diff --git a/sql/field_comp.cc b/sql/field_comp.cc index eb4ae42aa4d..ab97c8ccf08 100644 --- a/sql/field_comp.cc +++ b/sql/field_comp.cc @@ -67,10 +67,12 @@ static uint compress_zlib(THD *thd, char *to, const char *from, uint length) stream.zfree= 0; stream.opaque= 0; - if (deflateInit2(&stream, level, Z_DEFLATED, wbits, 8, strategy) == Z_OK && - deflate(&stream, Z_FINISH) == Z_STREAM_END && - deflateEnd(&stream) == Z_OK) - return (uint) (stream.next_out - (Bytef*) to); + if (deflateInit2(&stream, level, Z_DEFLATED, wbits, 8, strategy) == Z_OK) + { + int res= deflate(&stream, Z_FINISH); + if (deflateEnd(&stream) == Z_OK && res == Z_STREAM_END) + return (uint) (stream.next_out - (Bytef*) to); + } } return 0; } @@ -117,12 +119,14 @@ static int uncompress_zlib(String *to, const uchar *from, uint from_length, stream.zfree= 0; stream.opaque= 0; - if (inflateInit2(&stream, wbits) == Z_OK && - inflate(&stream, Z_FINISH) == Z_STREAM_END && - inflateEnd(&stream) == Z_OK) + if (inflateInit2(&stream, wbits) == Z_OK) { - to->length(stream.total_out); - return 0; + int res= inflate(&stream, Z_FINISH); + if (inflateEnd(&stream) == Z_OK && res == Z_STREAM_END) + { + to->length(stream.total_out); + return 0; + } } my_error(ER_ZLIB_Z_DATA_ERROR, MYF(0)); return 1; diff --git a/sql/handler.cc b/sql/handler.cc index 893453ba1c2..4f99b6e675f 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1808,7 +1808,8 @@ end: thd->mdl_context.release_lock(mdl_request.ticket); } #ifdef WITH_WSREP - if (wsrep_is_active(thd) && is_real_trans && !error && (rw_ha_count == 0) && + if (wsrep_is_active(thd) && is_real_trans && !error && + (rw_ha_count == 0 || all) && wsrep_not_committed(thd)) { wsrep_commit_empty(thd, all); @@ -2105,29 +2106,33 @@ int ha_commit_or_rollback_by_xid(XID *xid, bool commit) #ifndef DBUG_OFF -/** - @note - This does not need to be multi-byte safe or anything -*/ -static char* xid_to_str(char *buf, XID *xid) +/** Converts XID to string. + +@param[out] buf output buffer +@param[in] xid XID to convert + +@return pointer to converted string + +@note This does not need to be multi-byte safe or anything */ +static char *xid_to_str(char *buf, const XID &xid) { int i; char *s=buf; *s++='\''; - for (i=0; i < xid->gtrid_length+xid->bqual_length; i++) + for (i= 0; i < xid.gtrid_length + xid.bqual_length; i++) { - uchar c=(uchar)xid->data[i]; + uchar c= (uchar) xid.data[i]; /* is_next_dig is set if next character is a number */ bool is_next_dig= FALSE; if (i < XIDDATASIZE) { - char ch= xid->data[i+1]; + char ch= xid.data[i + 1]; is_next_dig= (ch >= '0' && ch <='9'); } - if (i == xid->gtrid_length) + if (i == xid.gtrid_length) { *s++='\''; - if (xid->bqual_length) + if (xid.bqual_length) { *s++='.'; *s++='\''; @@ -2237,6 +2242,11 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, the prepare. */ my_xid wsrep_limit __attribute__((unused))= 0; + + /* Note that we could call this for binlog also that + will not have WSREP(thd) but global wsrep on might + be true. + */ if (WSREP_ON) wsrep_limit= wsrep_order_and_check_continuity(info->list, got); @@ -2250,7 +2260,7 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, { DBUG_EXECUTE("info",{ char buf[XIDDATASIZE*4+6]; - _db_doprnt_("ignore xid %s", xid_to_str(buf, info->list+i)); + _db_doprnt_("ignore xid %s", xid_to_str(buf, info->list[i])); }); xid_cache_insert(info->list + i); info->found_foreign_xids++; @@ -2277,7 +2287,7 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, { DBUG_EXECUTE("info",{ char buf[XIDDATASIZE*4+6]; - _db_doprnt_("commit xid %s", xid_to_str(buf, info->list+i)); + _db_doprnt_("commit xid %s", xid_to_str(buf, info->list[i])); }); } } @@ -2288,7 +2298,7 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, { DBUG_EXECUTE("info",{ char buf[XIDDATASIZE*4+6]; - _db_doprnt_("rollback xid %s", xid_to_str(buf, info->list+i)); + _db_doprnt_("rollback xid %s", xid_to_str(buf, info->list[i])); }); } } diff --git a/sql/item.cc b/sql/item.cc index 4c1fe99e222..0c08169db2b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -9257,8 +9257,10 @@ bool Item_default_value::fix_fields(THD *thd, Item **items) } if (!(def_field= (Field*) thd->alloc(field_arg->field->size_of()))) goto error; + cached_field= def_field; memcpy((void *)def_field, (void *)field_arg->field, field_arg->field->size_of()); + def_field->reset_fields(); // If non-constant default value expression if (def_field->default_value && def_field->default_value->flags) { @@ -9286,6 +9288,12 @@ error: return TRUE; } +void Item_default_value::cleanup() +{ + delete cached_field; // Free cached blob data + cached_field= 0; + Item_field::cleanup(); +} void Item_default_value::print(String *str, enum_query_type query_type) { diff --git a/sql/item.h b/sql/item.h index 5eab1d049f0..3073a4d240d 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2,7 +2,7 @@ #define SQL_ITEM_INCLUDED /* Copyright (c) 2000, 2017, Oracle and/or its affiliates. - Copyright (c) 2009, 2019, MariaDB Corporation. + Copyright (c) 2009, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -6241,19 +6241,18 @@ class Item_default_value : public Item_field { void calculate(); public: - Item *arg; - Item_default_value(THD *thd, Name_resolution_context *context_arg) - :Item_field(thd, context_arg), - arg(NULL) {} - Item_default_value(THD *thd, Name_resolution_context *context_arg, Item *a) - :Item_field(thd, context_arg), - arg(a) {} + Item *arg= nullptr; + Field *cached_field= nullptr; + Item_default_value(THD *thd, Name_resolution_context *context_arg) : + Item_field(thd, context_arg) {} + Item_default_value(THD *thd, Name_resolution_context *context_arg, Item *a) : + Item_field(thd, context_arg), arg(a) {} Item_default_value(THD *thd, Name_resolution_context *context_arg, Field *a) - :Item_field(thd, context_arg), - arg(NULL) {} + :Item_field(thd, context_arg) {} enum Type type() const { return DEFAULT_VALUE_ITEM; } bool eq(const Item *item, bool binary_cmp) const; bool fix_fields(THD *, Item **); + void cleanup(); void print(String *str, enum_query_type query_type); String *val_str(String *str); double val_real(); diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index e494e9d84e1..4bbb33d4eb7 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -729,7 +729,7 @@ bool Item_subselect::exec() push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, ER_UNKNOWN_ERROR, "DBUG: Item_subselect::exec %.*s", - print.length(),print.ptr()); + print.length(),print.c_ptr()); ); /* Do not execute subselect in case of a fatal error diff --git a/sql/lock.cc b/sql/lock.cc index 487f2c3115f..f427ee0e115 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -1,5 +1,6 @@ /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. + Copyright (c) 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1124,13 +1125,15 @@ void Global_read_lock::unlock_global_read_lock(THD *thd) { Wsrep_server_state& server_state= Wsrep_server_state::instance(); if (server_state.state() == Wsrep_server_state::s_donor || - (wsrep_on(thd) && server_state.state() != Wsrep_server_state::s_synced)) + (WSREP_NNULL(thd) && + server_state.state() != Wsrep_server_state::s_synced)) { /* TODO: maybe redundant here?: */ wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; server_state.resume(); } - else if (wsrep_on(thd) && server_state.state() == Wsrep_server_state::s_synced) + else if (WSREP_NNULL(thd) && + server_state.state() == Wsrep_server_state::s_synced) { server_state.resume_and_resync(); } @@ -1186,11 +1189,13 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd) Wsrep_server_state& server_state= Wsrep_server_state::instance(); wsrep::seqno paused_seqno; if (server_state.state() == Wsrep_server_state::s_donor || - (wsrep_on(thd) && server_state.state() != Wsrep_server_state::s_synced)) + (WSREP_NNULL(thd) && + server_state.state() != Wsrep_server_state::s_synced)) { paused_seqno= server_state.pause(); } - else if (wsrep_on(thd) && server_state.state() == Wsrep_server_state::s_synced) + else if (WSREP_NNULL(thd) && + server_state.state() == Wsrep_server_state::s_synced) { paused_seqno= server_state.desync_and_pause(); } diff --git a/sql/log.cc b/sql/log.cc index fce768b2e4c..731bb3e98f0 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1834,7 +1834,7 @@ binlog_commit_flush_stmt_cache(THD *thd, bool all, #ifdef WITH_WSREP if (thd->wsrep_mysql_replicated > 0) { - DBUG_ASSERT(WSREP_ON); + DBUG_ASSERT(WSREP(thd)); WSREP_DEBUG("avoiding binlog_commit_flush_trx_cache: %d", thd->wsrep_mysql_replicated); return 0; @@ -6924,14 +6924,15 @@ int MYSQL_BIN_LOG::rotate(bool force_rotate, bool* check_purge) int error= 0; DBUG_ENTER("MYSQL_BIN_LOG::rotate"); - if (wsrep_to_isolation) +#ifdef WITH_WSREP + if (WSREP_ON && wsrep_to_isolation) { - DBUG_ASSERT(WSREP_ON); *check_purge= false; - WSREP_DEBUG("avoiding binlog rotate due to TO isolation: %d", + WSREP_DEBUG("avoiding binlog rotate due to TO isolation: %d", wsrep_to_isolation); DBUG_RETURN(0); } +#endif /* WITH_WSREP */ //todo: fix the macro def and restore safe_mutex_assert_owner(&LOCK_log); *check_purge= false; diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index feb8fd643b7..9c69b67bce1 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2019, Oracle and/or its affiliates. - Copyright (c) 2009, 2019, MariaDB + Copyright (c) 2009, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1396,9 +1396,14 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, /* If Query_log_event will contain non trans keyword (not BEGIN, COMMIT, SAVEPOINT or ROLLBACK) we disable PA for this transaction. + Note that here WSREP(thd) might not be true e.g. when wsrep_shcema + is created we create tables with thd->variables.wsrep_on=false + to avoid replicating wsrep_schema tables to other nodes. */ if (WSREP_ON && !is_trans_keyword()) + { thd->wsrep_PA_safe= false; + } #endif /* WITH_WSREP */ memset(&user, 0, sizeof(user)); @@ -2115,7 +2120,7 @@ Query_log_event::do_shall_skip(rpl_group_info *rgi) } } #ifdef WITH_WSREP - else if (WSREP_ON && wsrep_mysql_replication_bundle && opt_slave_domain_parallel_threads == 0 && + else if (WSREP(thd) && wsrep_mysql_replication_bundle && opt_slave_domain_parallel_threads == 0 && thd->wsrep_mysql_replicated > 0 && (is_begin() || is_commit())) { @@ -2129,7 +2134,7 @@ Query_log_event::do_shall_skip(rpl_group_info *rgi) thd->wsrep_mysql_replicated = 0; } } -#endif +#endif /* WITH_WSREP */ DBUG_RETURN(Log_event::do_shall_skip(rgi)); } @@ -3976,7 +3981,7 @@ Xid_apply_log_event::do_shall_skip(rpl_group_info *rgi) DBUG_RETURN(Log_event::EVENT_SKIP_COUNT); } #ifdef WITH_WSREP - else if (wsrep_mysql_replication_bundle && WSREP_ON && + else if (wsrep_mysql_replication_bundle && WSREP(thd) && opt_slave_domain_parallel_threads == 0) { if (++thd->wsrep_mysql_replicated < (int)wsrep_mysql_replication_bundle) diff --git a/sql/mdl.cc b/sql/mdl.cc index 98a9d8f0d01..287e0cb5f65 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -1242,12 +1242,12 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket) wsrep_thd_is_BF(ticket->get_ctx()->get_thd(), false)) { Ticket_iterator itw(ticket->get_lock()->m_waiting); - - DBUG_ASSERT(WSREP_ON); MDL_ticket *waiting; MDL_ticket *prev=NULL; bool added= false; + DBUG_ASSERT(WSREP(ticket->get_ctx()->get_thd())); + while ((waiting= itw++) && !added) { if (!wsrep_thd_is_BF(waiting->get_ctx()->get_thd(), true)) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 97dfca47beb..f6aac3adfd8 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -54,6 +54,7 @@ #include <m_ctype.h> #include <my_dir.h> #include <my_bit.h> +#include "my_cpu.h" #include "slave.h" #include "rpl_mi.h" #include "sql_repl.h" @@ -446,7 +447,7 @@ uint lower_case_table_names; ulong tc_heuristic_recover= 0; Atomic_counter<uint32_t> thread_count; bool shutdown_wait_for_slaves; -int32 slave_open_temp_tables; +Atomic_counter<uint32_t> slave_open_temp_tables; ulong thread_created; ulong back_log, connect_timeout, server_id; ulong what_to_log; @@ -1135,6 +1136,14 @@ PSI_file_key key_file_map; PSI_statement_info stmt_info_new_packet; #endif +#ifdef WITH_WSREP +/** Whether the Galera write-set replication is enabled. A cached copy of +global_system_variables.wsrep_on && wsrep_provider && + strcmp(wsrep_provider, WSREP_NONE) +*/ +bool WSREP_ON_; +#endif /* WITH_WSREP */ + #ifndef EMBEDDED_LIBRARY void net_before_header_psi(struct st_net *net, void *thd, size_t /* unused: count */) { @@ -1873,6 +1882,9 @@ extern "C" void unireg_abort(int exit_code) disable_log_notes= 1; #ifdef WITH_WSREP + // Note that we do not have thd here, thus can't use + // WSREP(thd) + if (WSREP_ON && Wsrep_server_state::is_inited() && Wsrep_server_state::instance().state() != wsrep::server_state::s_disconnected) @@ -1888,6 +1900,7 @@ extern "C" void unireg_abort(int exit_code) sleep(1); /* so give some time to exit for those which can */ WSREP_INFO("Some threads may fail to exit."); } + if (WSREP_ON) { /* In bootstrap mode we deinitialize wsrep here. */ @@ -1932,11 +1945,7 @@ static void mysqld_exit(int exit_code) shutdown_performance_schema(); // we do it as late as possible #endif set_malloc_size_cb(NULL); - if (opt_endinfo && global_status_var.global_memory_used) - fprintf(stderr, "Warning: Memory not freed: %ld\n", - (long) global_status_var.global_memory_used); - if (!opt_debugging && !my_disable_leak_check && exit_code == 0 && - debug_assert_on_not_freed_memory) + if (global_status_var.global_memory_used) { #ifdef SAFEMALLOC sf_report_leaked_memory(0); @@ -4645,7 +4654,6 @@ static int init_default_storage_engine_impl(const char *opt_name, return 0; } - static int init_gtid_pos_auto_engines(void) { @@ -4672,7 +4680,6 @@ init_gtid_pos_auto_engines(void) return 0; } - static int init_server_components() { DBUG_ENTER("init_server_components"); @@ -5531,7 +5538,13 @@ int mysqld_main(int argc, char **argv) set_user(mysqld_user, user_info); } +#ifdef WITH_WSREP + WSREP_ON_= (global_system_variables.wsrep_on && + wsrep_provider && + strcmp(wsrep_provider, WSREP_NONE)); + if (WSREP_ON && wsrep_check_opts()) unireg_abort(1); +#endif /* The subsequent calls may take a long time : e.g. innodb log read. @@ -6954,18 +6967,6 @@ static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff, } -/* How many slaves are connected to this master */ - -static int show_slaves_connected(THD *thd, SHOW_VAR *var, char *buff) -{ - - var->type= SHOW_LONGLONG; - var->value= buff; - *((longlong*) buff)= uint32_t(binlog_dump_thread_count); - return 0; -} - - /* How many masters this slave is connected to */ @@ -7531,9 +7532,9 @@ SHOW_VAR status_vars[]= { {"Select_range", (char*) offsetof(STATUS_VAR, select_range_count_), SHOW_LONG_STATUS}, {"Select_range_check", (char*) offsetof(STATUS_VAR, select_range_check_count_), SHOW_LONG_STATUS}, {"Select_scan", (char*) offsetof(STATUS_VAR, select_scan_count_), SHOW_LONG_STATUS}, - {"Slave_open_temp_tables", (char*) &slave_open_temp_tables, SHOW_INT}, + {"Slave_open_temp_tables", (char*) &slave_open_temp_tables, SHOW_ATOMIC_COUNTER_UINT32_T}, #ifdef HAVE_REPLICATION - {"Slaves_connected", (char*) &show_slaves_connected, SHOW_SIMPLE_FUNC }, + {"Slaves_connected", (char*) &binlog_dump_thread_count, SHOW_ATOMIC_COUNTER_UINT32_T}, {"Slaves_running", (char*) &show_slaves_running, SHOW_SIMPLE_FUNC }, {"Slave_connections", (char*) offsetof(STATUS_VAR, com_register_slave), SHOW_LONG_STATUS}, {"Slave_heartbeat_period", (char*) &show_heartbeat_period, SHOW_SIMPLE_FUNC}, diff --git a/sql/mysqld.h b/sql/mysqld.h index 2649a3ac61b..8adfda0dfec 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -221,7 +221,7 @@ extern ulong delayed_insert_timeout; extern ulong delayed_insert_limit, delayed_queue_size; extern ulong delayed_insert_threads, delayed_insert_writes; extern ulong delayed_rows_in_use,delayed_insert_errors; -extern int32 slave_open_temp_tables; +extern Atomic_counter<uint32_t> slave_open_temp_tables; extern ulonglong query_cache_size; extern ulong query_cache_limit; extern ulong query_cache_min_res_unit; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 7390345ed29..384b2d5ced2 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -356,7 +356,8 @@ QUICK_RANGE_SELECT *get_quick_select(PARAM *param,uint index, static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree, bool index_read_must_be_used, bool update_tbl_stats, - double read_time); + double read_time, + bool ror_scans_required); static TRP_INDEX_INTERSECT *get_best_index_intersect(PARAM *param, SEL_TREE *tree, double read_time); @@ -2632,7 +2633,7 @@ static int fill_used_fields_bitmap(PARAM *param) force_quick_range is really needed. RETURN - -1 if impossible select (i.e. certainly no rows will be selected) + -1 if error or impossible select (i.e. certainly no rows will be selected) 0 if can't use quick_select 1 if found usable ranges and quick select has been successfully created. */ @@ -2745,7 +2746,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, { thd->no_errors=0; free_root(&alloc,MYF(0)); // Return memory & allocator - DBUG_RETURN(0); // Can't use range + DBUG_RETURN(-1); // Error } key_parts= param.key_parts; @@ -2813,7 +2814,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, { thd->no_errors=0; free_root(&alloc,MYF(0)); // Return memory & allocator - DBUG_RETURN(0); // Can't use range + DBUG_RETURN(-1); // Error } thd->mem_root= &alloc; @@ -2873,6 +2874,13 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, tree= NULL; } } + else if (thd->is_error()) + { + thd->no_errors=0; + thd->mem_root= param.old_root; + free_root(&alloc, MYF(0)); + DBUG_RETURN(-1); + } } if (tree) @@ -2896,7 +2904,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, /* Get best 'range' plan and prepare data for making other plans */ if ((range_trp= get_key_scans_params(¶m, tree, only_single_index_range_scan, TRUE, - best_read_time))) + best_read_time, FALSE))) { best_trp= range_trp; best_read_time= best_trp->read_cost; @@ -5050,8 +5058,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, double roru_index_costs; ha_rows roru_total_records; double roru_intersect_part= 1.0; - double limit_read_time= read_time; size_t n_child_scans; + double limit_read_time= read_time; THD *thd= param->thd; DBUG_ENTER("get_best_disjunct_quick"); DBUG_PRINT("info", ("Full table scan cost: %g", read_time)); @@ -5078,6 +5086,10 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, sizeof(TRP_RANGE*)* n_child_scans))) DBUG_RETURN(NULL); + + const bool only_ror_scans_required= !optimizer_flag(param->thd, + OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION); + Json_writer_object trace_best_disjunct(thd); Json_writer_array to_merge(thd, "indexes_to_merge"); /* @@ -5092,7 +5104,9 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, DBUG_EXECUTE("info", print_sel_tree(param, *ptree, &(*ptree)->keys_map, "tree in SEL_IMERGE");); Json_writer_object trace_idx(thd); - if (!(*cur_child= get_key_scans_params(param, *ptree, TRUE, FALSE, read_time))) + if (!(*cur_child= get_key_scans_params(param, *ptree, TRUE, FALSE, + read_time, + only_ror_scans_required))) { /* One of index scans in this index_merge is more expensive than entire @@ -5452,7 +5466,7 @@ TABLE_READ_PLAN *merge_same_index_scans(PARAM *param, SEL_IMERGE *imerge, index merge retrievals are not well calibrated */ trp= get_key_scans_params(param, *imerge->trees, FALSE, TRUE, - read_time); + read_time, FALSE); } DBUG_RETURN(trp); @@ -7338,6 +7352,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param, index_read_must_be_used if TRUE, assume 'index only' option will be set (except for clustered PK indexes) read_time don't create read plans with cost > read_time. + only_ror_scans_required set to TRUE when we are only interested + in ROR scan RETURN Best range read plan NULL if no plan found or error occurred @@ -7346,7 +7362,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param, static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree, bool index_read_must_be_used, bool update_tbl_stats, - double read_time) + double read_time, + bool only_ror_scans_required) { uint idx, UNINIT_VAR(best_idx); SEL_ARG *key_to_read= NULL; @@ -7400,8 +7417,7 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree, found_records= check_quick_select(param, idx, read_index_only, key, update_tbl_stats, &mrr_flags, &buf_size, &cost, &is_ror_scan); - if (!is_ror_scan && - !optimizer_flag(param->thd, OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION)) + if (only_ror_scans_required && !is_ror_scan) continue; if (found_records != HA_POS_ERROR && tree->index_scans && @@ -9789,7 +9805,7 @@ key_and(RANGE_OPT_PARAM *param, SEL_ARG *key1, SEL_ARG *key2, uint clone_flag) if (key2->next_key_part) { key1->use_count--; // Incremented in and_all_keys - return and_all_keys(param, key1, key2, clone_flag); + return and_all_keys(param, key1, key2->next_key_part, clone_flag); } key2->use_count--; // Key2 doesn't have a tree } diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 4a15dd709db..d33e26d2ecc 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -60,7 +60,7 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev, rgi->last_master_timestamp= ev->when + (time_t)ev->exec_time; err= apply_event_and_update_pos_for_parallel(ev, thd, rgi); - thread_safe_increment64(&rli->executed_entries); + rli->executed_entries++; #ifdef WITH_WSREP if (wsrep_after_statement(thd)) { diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 29ca0931fb8..7da296b47d9 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -329,22 +329,6 @@ unpack_row(rpl_group_info *rgi, (int) (pack_ptr - old_pack_ptr))); if (!pack_ptr) { -#ifdef WITH_WSREP - if (WSREP_ON) - { - /* - Debug message to troubleshoot bug: - https://mariadb.atlassian.net/browse/MDEV-4404 - Galera Node throws "Could not read field" error and drops out of cluster - */ - WSREP_WARN("ROW event unpack field: %s metadata: 0x%x;" - " conv_table %p conv_field %p table %s" - " row_end: %p", - f->field_name.str, metadata, conv_table, conv_field, - (table_found) ? "found" : "not found", row_end - ); - } -#endif /* WITH_WSREP */ rgi->rli->report(ERROR_LEVEL, ER_SLAVE_CORRUPT_EVENT, rgi->gtid_info(), "Could not read field '%s' of table '%s.%s'", diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 5d2d33c397f..fafe8ead63d 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -347,7 +347,7 @@ public: Number of executed events for SLAVE STATUS. Protected by slave_executed_entries_lock */ - int64 executed_entries; + Atomic_counter<uint32_t> executed_entries; /* If the end of the hot relay log is made of master's events ignored by the diff --git a/sql/slave.cc b/sql/slave.cc index 754c8df3638..381417c353b 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3476,7 +3476,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full, { protocol->store((uint32) mi->rli.retried_trans); protocol->store((ulonglong) mi->rli.max_relay_log_size); - protocol->store((uint32) mi->rli.executed_entries); + protocol->store(mi->rli.executed_entries); protocol->store((uint32) mi->received_heartbeats); protocol->store((double) mi->heartbeat_period, 3, &tmp); protocol->store(gtid_pos->ptr(), gtid_pos->length(), &my_charset_bin); @@ -3996,7 +3996,8 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi, exec_res= ev->apply_event(rgi); #ifdef WITH_WSREP - if (WSREP_ON) { + if (WSREP(thd)) { + if (exec_res) { mysql_mutex_lock(&thd->LOCK_thd_data); switch(thd->wsrep_trx().state()) { @@ -4574,7 +4575,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, } } - thread_safe_increment64(&rli->executed_entries); + rli->executed_entries++; #ifdef WITH_WSREP wsrep_after_statement(thd); #endif /* WITH_WSREP */ @@ -5650,7 +5651,7 @@ pthread_handler_t handle_slave_sql(void *arg) if (exec_relay_log_event(thd, rli, serial_rgi)) { #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { mysql_mutex_lock(&thd->LOCK_thd_data); @@ -5668,8 +5669,10 @@ pthread_handler_t handle_slave_sql(void *arg) if (!sql_slave_killed(serial_rgi)) { slave_output_error_info(serial_rgi, thd); - if (WSREP_ON && rli->last_error().number == ER_UNKNOWN_COM_ERROR) + if (WSREP(thd) && rli->last_error().number == ER_UNKNOWN_COM_ERROR) + { wsrep_node_dropped= TRUE; + } } goto err; } @@ -5806,7 +5809,7 @@ err_during_init: If slave stopped due to node going non primary, we set global flag to trigger automatic restart of slave when node joins back to cluster. */ - if (WSREP_ON && wsrep_node_dropped && wsrep_restart_slave) + if (WSREP(thd) && wsrep_node_dropped && wsrep_restart_slave) { if (wsrep_ready_get()) { diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1606e8cb7eb..e22a23d197e 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4366,7 +4366,7 @@ restart: } #ifdef WITH_WSREP - if (WSREP_ON && + if (WSREP(thd) && wsrep_replicate_myisam && (*start) && (*start)->table && diff --git a/sql/sql_class.h b/sql/sql_class.h index 07136c10e1d..96ebfca3723 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3414,7 +3414,7 @@ public: void awake_no_mutex(killed_state state_to_set); void awake(killed_state state_to_set) { - bool wsrep_on_local= WSREP_ON; + bool wsrep_on_local= WSREP_NNULL(this); /* mutex locking order (LOCK_thd_data - LOCK_thd_kill)) requires to grab LOCK_thd_data here diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 70cefa8e977..59990e11e71 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -8083,7 +8083,8 @@ Item *LEX::create_item_limit(THD *thd, const Lex_ident_cli_st *ca) if (unlikely(!(item= new (thd->mem_root) Item_splocal(thd, rh, &sa, spv->offset, spv->type_handler(), - pos.pos(), pos.length())))) + clone_spec_offset ? 0 : pos.pos(), + clone_spec_offset ? 0 : pos.length())))) return NULL; #ifdef DBUG_ASSERT_EXISTS item->m_sp= sphead; @@ -8183,14 +8184,15 @@ Item *LEX::create_item_ident_sp(THD *thd, Lex_ident_sys_st *name, } Query_fragment pos(thd, sphead, start, end); + uint f_pos= clone_spec_offset ? 0 : pos.pos(); + uint f_length= clone_spec_offset ? 0 : pos.length(); Item_splocal *splocal= spv->field_def.is_column_type_ref() ? new (thd->mem_root) Item_splocal_with_delayed_data_type(thd, rh, name, spv->offset, - pos.pos(), - pos.length()) : + f_pos, f_length) : new (thd->mem_root) Item_splocal(thd, rh, name, spv->offset, spv->type_handler(), - pos.pos(), pos.length()); + f_pos, f_length); if (unlikely(splocal == NULL)) return NULL; #ifdef DBUG_ASSERT_EXISTS diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b1756b83056..273e5b79233 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1751,7 +1751,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { mysqld_stmt_bulk_execute(thd, packet, packet_length); #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { (void)wsrep_after_statement(thd); } @@ -1762,7 +1762,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { mysqld_stmt_execute(thd, packet, packet_length); #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { (void)wsrep_after_statement(thd); } @@ -1820,7 +1820,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { if (wsrep_mysql_parse(thd, thd->query(), thd->query_length(), &parser_state, @@ -1922,7 +1922,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, parser_state.reset(beginning_of_next_stmt, length); #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { if (wsrep_mysql_parse(thd, beginning_of_next_stmt, length, &parser_state, @@ -3530,7 +3530,7 @@ mysql_execute_command(THD *thd) * and dirty reads (if configured) */ if (!(thd->wsrep_applier) && - !(wsrep_ready_get() && wsrep_reject_queries == WSREP_REJECT_NONE) && + !(wsrep_ready_get() && wsrep_reject_queries == WSREP_REJECT_NONE) && !(thd->variables.wsrep_dirty_reads && (sql_command_flags[lex->sql_command] & CF_CHANGES_DATA) == 0) && !wsrep_tables_accessible_when_detached(all_tables) && diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index de2d5c2f253..d6c7066e655 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -5915,6 +5915,24 @@ the generated partition syntax in a correct manner. *partition_changed= true; } } + + // In case of PARTITION BY KEY(), check if primary key has changed + // System versioning also implicitly adds/removes primary key parts + if (alter_info->partition_flags == 0 && part_info->list_of_part_fields + && part_info->part_field_list.elements == 0) + { + if (alter_info->flags & (ALTER_DROP_SYSTEM_VERSIONING | + ALTER_ADD_SYSTEM_VERSIONING)) + *partition_changed= true; + + List_iterator<Key> it(alter_info->key_list); + Key *key; + while((key= it++) && !*partition_changed) + { + if (key->type == Key::PRIMARY) + *partition_changed= true; + } + } /* Set up partition default_engine_type either from the create_info or from the previus table diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 8b200cfc6fd..e1360794a3b 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -25,7 +25,7 @@ SHOW_LONG_STATUS, SHOW_DOUBLE_STATUS, \ SHOW_HAVE, SHOW_MY_BOOL, SHOW_HA_ROWS, SHOW_SYS, \ SHOW_LONG_NOFLUSH, SHOW_LONGLONG_STATUS, SHOW_UINT32_STATUS, \ - SHOW_LEX_STRING + SHOW_LEX_STRING, SHOW_ATOMIC_COUNTER_UINT32_T #include "mariadb.h" #undef SHOW_always_last diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index ce49378204d..e7988d2c423 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -153,6 +153,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, if (mysql_bin_log.rotate_and_purge(true, drop_gtid_domain)) *write_to_binlog= -1; + /* Note that WSREP(thd) might not be true here e.g. during + SST. */ if (WSREP_ON) { /* Wait for last binlog checkpoint event to be logged. */ diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index b8de0d411e0..55e5e940b19 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -3941,7 +3941,7 @@ int reset_master(THD* thd, rpl_gtid *init_state, uint32 init_state_len, } #ifdef WITH_WSREP - if (WSREP_ON) + if (WSREP(thd)) { /* RESET MASTER will initialize GTID sequence, and that would happen locally in this node, so better reject it diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 755ae547db3..2528134f4ee 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -64,6 +64,7 @@ #endif #include "transaction.h" #include "opt_trace.h" +#include "my_cpu.h" enum enum_i_s_events_fields { @@ -3630,6 +3631,11 @@ const char* get_one_variable(THD *thd, end= pos + ls->length; break; } + case SHOW_ATOMIC_COUNTER_UINT32_T: + end= int10_to_str( + static_cast<long>(*static_cast<Atomic_counter<uint32_t>*>(value)), + buff, 10); + break; case SHOW_UNDEF: break; // Return empty string case SHOW_SYS: // Cannot happen diff --git a/sql/sql_string.h b/sql/sql_string.h index 37225e17c1e..2d38f6d5d13 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -86,7 +86,7 @@ public: Well_formed_prefix(CHARSET_INFO *cs, const char *str, size_t length) :Well_formed_prefix_status(cs, str, str + length, length), m_str(str) { } - Well_formed_prefix(CHARSET_INFO *cs, LEX_STRING str, size_t nchars) + Well_formed_prefix(CHARSET_INFO *cs, LEX_CSTRING str, size_t nchars) :Well_formed_prefix_status(cs, str.str, str.str + str.length, nchars), m_str(str.str) { } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 86eba4a521b..e7fbae9e0f7 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4470,9 +4470,9 @@ bool validate_comment_length(THD *thd, LEX_CSTRING *comment, size_t max_len, DBUG_ENTER("validate_comment_length"); if (comment->length == 0) DBUG_RETURN(false); - size_t tmp_len= system_charset_info->charpos(comment->str, - comment->str + comment->length, - max_len); + + size_t tmp_len= + Well_formed_prefix(system_charset_info, *comment, max_len).length(); if (tmp_len < comment->length) { if (thd->is_strict_mode()) @@ -5728,9 +5728,11 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, DBUG_ENTER("mysql_create_like_table"); #ifdef WITH_WSREP - if (WSREP_ON && !thd->wsrep_applier && + if (WSREP(thd) && !thd->wsrep_applier && wsrep_create_like_table(thd, table, src_table, create_info)) + { DBUG_RETURN(res); + } #endif /* @@ -10980,7 +10982,6 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, bool make_versioned= !from->versioned() && to->versioned(); bool make_unversioned= from->versioned() && !to->versioned(); bool keep_versioned= from->versioned() && to->versioned(); - bool drop_history= false; // XXX Field *to_row_start= NULL, *to_row_end= NULL, *from_row_end= NULL; MYSQL_TIME query_start; DBUG_ENTER("copy_data_between_tables"); @@ -11111,10 +11112,6 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, { from_row_end= from->vers_end_field(); } - else if (keep_versioned && drop_history) - { - from_row_end= from->vers_end_field(); - } if (from_row_end) bitmap_set_bit(from->read_set, from_row_end->field_index); @@ -11153,6 +11150,13 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, error= 1; break; } + + if (make_unversioned) + { + if (!from_row_end->is_max()) + continue; // Drop history rows. + } + if (unlikely(++thd->progress.counter >= time_to_report_progress)) { time_to_report_progress+= MY_HOW_OFTEN_TO_WRITE/10; @@ -11172,20 +11176,12 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to, copy_ptr->do_copy(copy_ptr); } - if (drop_history && from_row_end && !from_row_end->is_max()) - continue; - if (make_versioned) { to_row_start->set_notnull(); to_row_start->store_time(&query_start); to_row_end->set_max(); } - else if (make_unversioned) - { - if (!from_row_end->is_max()) - continue; // Drop history rows. - } prev_insert_id= to->file->next_insert_id; if (to->default_field) diff --git a/sql/sql_type_geom.cc b/sql/sql_type_geom.cc index 047f56d220b..d6fb06f34a5 100644 --- a/sql/sql_type_geom.cc +++ b/sql/sql_type_geom.cc @@ -872,7 +872,7 @@ int Field_geom::store(const char *from, size_t length, CHARSET_INFO *cs) my_error(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, MYF(0), Geometry::ci_collection[m_type_handler->geometry_type()]->m_name.str, - wkt.c_ptr(), + wkt.c_ptr_safe(), db, tab_name, field_name.str, (ulong) table->in_use->get_stmt_da()-> current_row_for_warning()); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 75824d3fbcf..8e6eb4c815a 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2011, 2016, MariaDB + Copyright (c) 2011, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2592,6 +2592,9 @@ int multi_update::send_data(List<Item> ¬_used_values) TABLE *tmp_table= tmp_tables[offset]; if (copy_funcs(tmp_table_param[offset].items_to_copy, thd)) DBUG_RETURN(1); + /* rowid field is NULL if join tmp table has null row from outer join */ + if (tmp_table->field[0]->is_null()) + continue; /* Store regular updated fields in the row. */ DBUG_ASSERT(1 + unupdated_check_opt_tables.elements == tmp_table_param[offset].func_count); @@ -2789,6 +2792,7 @@ int multi_update::do_updates() uint field_num= 0; do { + DBUG_ASSERT(!tmp_table->field[field_num]->is_null()); String rowid; tmp_table->field[field_num]->val_str(&rowid); if (unlikely((local_error= tbl->file->ha_rnd_pos(tbl->record[0], diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 09a617cece1..df6f9933e36 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -6080,7 +6080,7 @@ vio_keepalive_opts opt_vio_keepalive; static Sys_var_int Sys_keepalive_time( "tcp_keepalive_time", - "Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent." + "Timeout, in seconds, with no activity until the first TCP keep-alive packet is sent." "If set to 0, system dependent default is used.", AUTO_SET GLOBAL_VAR(opt_vio_keepalive.idle), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, INT_MAX32/1000), DEFAULT(0), diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc index 9491a23793b..ef6f1c42434 100644 --- a/sql/temporary_tables.cc +++ b/sql/temporary_tables.cc @@ -1139,9 +1139,7 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share, /* Increment Slave_open_temp_table_definitions status variable count. */ if (rgi_slave) - { - thread_safe_increment32(&slave_open_temp_tables); - } + slave_open_temp_tables++; DBUG_PRINT("tmptable", ("Opened table: '%s'.'%s table: %p", table->s->db.str, @@ -1247,7 +1245,7 @@ void THD::close_temporary_table(TABLE *table) /* Natural invariant of temporary_tables */ DBUG_ASSERT(slave_open_temp_tables || !temporary_tables); /* Decrement Slave_open_temp_table_definitions status variable count. */ - thread_safe_decrement32(&slave_open_temp_tables); + slave_open_temp_tables--; } DBUG_VOID_RETURN; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 6c2f20081a7..49880b2e827 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -269,6 +269,45 @@ char* wsrep_cluster_capabilities = NULL; wsp::Config_state *wsrep_config_state; +void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...) +{ + /* Allocate short buffer from stack. If the vsnprintf() return value + indicates that the message was truncated, a new buffer will be allocated + dynamically and the message will be reprinted. */ + char msg[128] = {'\0'}; + va_list arglist; + va_start(arglist, fmt); + int n= vsnprintf(msg, sizeof(msg) - 1, fmt, arglist); + va_end(arglist); + if (n < 0) + { + sql_print_warning("WSREP: Printing message failed"); + } + else if (n < (int)sizeof(msg)) + { + fun("WSREP: %s", msg); + } + else + { + size_t dynbuf_size= std::max(n, 4096); + char* dynbuf= (char*) my_malloc(PSI_NOT_INSTRUMENTED, dynbuf_size, MYF(0)); + if (dynbuf) + { + va_start(arglist, fmt); + (void)vsnprintf(&dynbuf[0], dynbuf_size - 1, fmt, arglist); + va_end(arglist); + dynbuf[dynbuf_size - 1] = '\0'; + fun("WSREP: %s", &dynbuf[0]); + my_free(dynbuf); + } + else + { + /* Memory allocation for vector failed, print truncated message. */ + fun("WSREP: %s", msg); + } + } +} + wsrep_uuid_t local_uuid = WSREP_UUID_UNDEFINED; wsrep_seqno_t local_seqno = WSREP_SEQNO_UNDEFINED; @@ -756,6 +795,7 @@ void wsrep_init_globals() wsrep_gtid_server.seqno(gtid.seqno); } wsrep_init_schema(); + if (WSREP_ON) { Wsrep_server_state::instance().initialized(); @@ -793,6 +833,8 @@ int wsrep_init() global_system_variables.wsrep_on= 1; + WSREP_ON_= wsrep_provider && strcmp(wsrep_provider, WSREP_NONE); + if (wsrep_gtid_mode && opt_bin_log && !opt_log_slave_updates) { WSREP_ERROR("Option --log-slave-updates is required if " @@ -2217,8 +2259,10 @@ int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_, DBUG_ASSERT(wsrep_thd_is_local(thd)); DBUG_ASSERT(thd->wsrep_trx().ws_meta().seqno().is_undefined()); - if (thd->global_read_lock.is_acquired()) + if (Wsrep_server_state::instance().desynced_on_pause()) { + my_message(ER_UNKNOWN_COM_ERROR, + "Aborting TOI: Global Read-Lock (FTWRL) in place.", MYF(0)); WSREP_DEBUG("Aborting TOI: Global Read-Lock (FTWRL) in place: %s %llu", wsrep_thd_query(thd), thd->thread_id); return -1; diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 46ca4959741..cf2404e329e 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -19,6 +19,7 @@ #include <wsrep.h> #ifdef WITH_WSREP +extern bool WSREP_ON_; #include <mysql/plugin.h> #include "mysql/service_wsrep.h" @@ -214,15 +215,12 @@ extern void wsrep_prepend_PATH (const char* path); /* Other global variables */ extern wsrep_seqno_t wsrep_locked_seqno; -#define WSREP_ON \ - ((global_system_variables.wsrep_on) && \ - wsrep_provider && \ - strcmp(wsrep_provider, WSREP_NONE)) +#define WSREP_ON unlikely(WSREP_ON_) /* use xxxxxx_NNULL macros when thd pointer is guaranteed to be non-null to * avoid compiler warnings (GCC 6 and later) */ -#define WSREP_NNULL(thd) \ - (thd->variables.wsrep_on && WSREP_ON) + +#define WSREP_NNULL(thd) (WSREP_ON && thd->variables.wsrep_on) #define WSREP(thd) \ (thd && WSREP_NNULL(thd)) @@ -243,13 +241,9 @@ extern wsrep_seqno_t wsrep_locked_seqno; ((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) ? \ wsrep_forced_binlog_format : my_format) -// prefix all messages with "WSREP" -#define WSREP_LOG(fun, ...) \ - do { \ - char msg[1024]= {'\0'}; \ - snprintf(msg, sizeof(msg) - 1, ## __VA_ARGS__); \ - fun("WSREP: %s", msg); \ - } while(0) +/* A wrapper function for MySQL log functions. The call will prefix + the log message with WSREP and forward the result buffer to fun. */ +void WSREP_LOG(void (*fun)(const char* fmt, ...), const char* fmt, ...); #define WSREP_DEBUG(...) \ if (wsrep_debug) sql_print_information( "WSREP: " __VA_ARGS__) @@ -615,9 +609,9 @@ enum wsrep::streaming_context::fragment_unit wsrep_fragment_unit(ulong unit); /* These macros are needed to compile MariaDB without WSREP support * (e.g. embedded) */ +#define WSREP_ON false #define WSREP(T) (0) #define WSREP_NNULL(T) (0) -#define WSREP_ON (0) #define WSREP_EMULATE_BINLOG(thd) (0) #define WSREP_EMULATE_BINLOG_NNULL(thd) (0) #define WSREP_BINLOG_FORMAT(my_format) ((ulong)my_format) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 0bb8a9eb675..8ffcb32e10a 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -367,6 +367,7 @@ void wsrep_sst_received (THD* thd, my_pthread_setspecific_ptr(THR_THD, NULL); } + /* During sst WSREP(thd) is not yet set for joiner. */ if (WSREP_ON) { int const rcode(seqno < 0 ? seqno : 0); diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 94d01b273c5..0f72c132d84 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -320,10 +320,15 @@ int wsrep_abort_thd(THD *bf_thd_ptr, THD *victim_thd_ptr, my_bool signal) DBUG_ENTER("wsrep_abort_thd"); THD *victim_thd= (THD *) victim_thd_ptr; THD *bf_thd= (THD *) bf_thd_ptr; + mysql_mutex_lock(&victim_thd->LOCK_thd_data); - if ( (WSREP(bf_thd) || - ( (WSREP_ON || bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU) && - wsrep_thd_is_toi(bf_thd)) ) && + + /* Note that when you use RSU node is desynced from cluster, thus WSREP(thd) + might not be true. + */ + if ((WSREP(bf_thd) || + ((WSREP_ON || bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU) && + wsrep_thd_is_toi(bf_thd))) && victim_thd && !wsrep_thd_is_aborting(victim_thd)) { @@ -337,6 +342,7 @@ int wsrep_abort_thd(THD *bf_thd_ptr, THD *victim_thd_ptr, my_bool signal) { WSREP_DEBUG("wsrep_abort_thd not effective: %p %p", bf_thd, victim_thd); } + mysql_mutex_unlock(&victim_thd->LOCK_thd_data); DBUG_RETURN(1); } diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h index cb58026207b..55bb7462d99 100644 --- a/sql/wsrep_trans_observer.h +++ b/sql/wsrep_trans_observer.h @@ -431,7 +431,7 @@ static inline void wsrep_after_apply(THD* thd) static inline void wsrep_open(THD* thd) { DBUG_ENTER("wsrep_open"); - if (wsrep_on(thd)) + if (WSREP(thd)) { thd->wsrep_cs().open(wsrep::client_id(thd->thread_id)); thd->wsrep_cs().debug_log_level(wsrep_debug); diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 28dbe4096f7..4fffc3ddc8a 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -91,6 +91,12 @@ static bool refresh_provider_options() } } +static void wsrep_set_wsrep_on() +{ + WSREP_ON_= global_system_variables.wsrep_on && wsrep_provider && + strcmp(wsrep_provider, WSREP_NONE); +} + /* This is intentionally declared as a weak global symbol, so that linking will succeed even if the server is built with a dynamically linked InnoDB. */ @@ -125,6 +131,8 @@ bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type) thd->variables.wsrep_on= global_system_variables.wsrep_on= saved_wsrep_on; } + wsrep_set_wsrep_on(); + return false; } @@ -418,6 +426,7 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type) if (!rcode) refresh_provider_options(); + wsrep_set_wsrep_on(); mysql_mutex_lock(&LOCK_global_system_variables); return rcode; @@ -437,6 +446,7 @@ void wsrep_provider_init (const char* value) if (wsrep_provider) my_free((void *)wsrep_provider); wsrep_provider= my_strdup(PSI_INSTRUMENT_MEM, value, MYF(0)); + wsrep_set_wsrep_on(); } bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var) @@ -924,6 +934,8 @@ static void export_wsrep_status_to_mysql(THD* thd) int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff) { + /* Note that we should allow show status like 'wsrep%' even + when WSREP(thd) is false. */ if (WSREP_ON) { export_wsrep_status_to_mysql(thd); diff --git a/sql/xa.cc b/sql/xa.cc index cde6350f38d..69e9fd70af6 100644 --- a/sql/xa.cc +++ b/sql/xa.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2009, 2019, MariaDB Corporation. + Copyright (c) 2009, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include "mariadb.h" #include "sql_class.h" #include "transaction.h" +#include "my_cpu.h" #include <pfs_transaction_provider.h> #include <mysql/psi/mysql_transaction.h> diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index 1b13e8fab0c..c3b4ae76dd4 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -611,9 +611,10 @@ dict_mem_table_col_rename_low( foreign->foreign_col_names, foreign->n_fields, NULL, true, false, NULL, NULL, NULL); - /* There must be an equivalent index in this case. */ - ut_ad(new_index != NULL); + /* New index can be null if InnoDB already dropped + the foreign index when FOREIGN_KEY_CHECKS is + disabled */ foreign->foreign_index = new_index; } else { diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index ee26b5bd302..f1b3dbaff0b 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2019, MariaDB Corporation. +Copyright (c) 2017, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -169,9 +169,8 @@ void dict_stats_update_if_needed_func(dict_table_t* table) generated row locks and allow BF thread lock waits to be enqueued at head of waiting queue. */ - if (thd + if (wsrep_on(thd) && !wsrep_thd_is_applying(thd) - && wsrep_on(thd) && wsrep_thd_is_BF(thd, 0)) { WSREP_DEBUG("Avoiding background statistics" " calculation for table %s.", diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 79d69441f4b..fa64b86ed8a 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -1255,18 +1255,6 @@ innobase_commit_by_xid( handlerton* hton, /*!< in: InnoDB handlerton */ XID* xid); /*!< in: X/Open XA transaction identification */ -/*******************************************************************//** -This function is used to rollback one X/Open XA distributed transaction -which is in the prepared state -@return 0 or error number */ -static -int -innobase_rollback_by_xid( -/*=====================*/ - handlerton* hton, /*!< in: InnoDB handlerton */ - XID* xid); /*!< in: X/Open XA transaction - identification */ - /** Remove all tables in the named database inside InnoDB. @param[in] hton handlerton from InnoDB @param[in] path Database path; Inside InnoDB the name of the last @@ -3319,12 +3307,8 @@ ha_innobase::init_table_handle_for_HANDLER(void) reset_template(); } -/*********************************************************************//** -Free tablespace resources allocated. */ -static -void -innobase_space_shutdown() -/*=====================*/ +/** Free tablespace resources allocated. */ +void innobase_space_shutdown() { DBUG_ENTER("innobase_space_shutdown"); @@ -4160,7 +4144,7 @@ innobase_commit_low( #ifdef WITH_WSREP THD* thd = (THD*)trx->mysql_thd; const char* tmp = 0; - if (thd && wsrep_on(thd)) { + if (wsrep_on(thd)) { #ifdef WSREP_PROC_INFO char info[64]; info[sizeof(info) - 1] = '\0'; @@ -4180,7 +4164,7 @@ innobase_commit_low( } trx->will_lock = 0; #ifdef WITH_WSREP - if (thd && wsrep_on(thd)) { thd_proc_info(thd, tmp); } + if (wsrep_on(thd)) { thd_proc_info(thd, tmp); } #endif /* WITH_WSREP */ } @@ -17346,17 +17330,14 @@ innobase_commit_by_xid( } } -/*******************************************************************//** -This function is used to rollback one X/Open XA distributed transaction +/** This function is used to rollback one X/Open XA distributed transaction which is in the prepared state + +@param[in] hton InnoDB handlerton +@param[in] xid X/Open XA transaction identification + @return 0 or error number */ -static -int -innobase_rollback_by_xid( -/*=====================*/ - handlerton* hton, /*!< in: InnoDB handlerton */ - XID* xid) /*!< in: X/Open XA transaction - identification */ +int innobase_rollback_by_xid(handlerton* hton, XID* xid) { DBUG_ASSERT(hton == innodb_hton_ptr); diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index d48c14da970..8a246991f8e 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -972,3 +972,15 @@ ib_push_frm_error( @return true if index column length exceeds limit */ MY_ATTRIBUTE((warn_unused_result)) bool too_big_key_part_length(size_t max_field_len, const KEY& key); + +/** This function is used to rollback one X/Open XA distributed transaction +which is in the prepared state + +@param[in] hton InnoDB handlerton +@param[in] xid X/Open XA transaction identification + +@return 0 or error number */ +int innobase_rollback_by_xid(handlerton* hton, XID* xid); + +/** Free tablespace resources allocated. */ +void innobase_space_shutdown(); diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index cbefee298a9..bdeba94e610 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -982,7 +982,7 @@ lock_get_info( /*******************************************************************//** @return whether wsrep_on is true on trx->mysql_thd*/ -#define wsrep_on_trx(trx) ((trx)->mysql_thd && wsrep_on((trx)->mysql_thd)) +#define wsrep_on_trx(trx) wsrep_on((trx)->mysql_thd) #endif /* WITH_WSREP */ diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index 6c90184a95a..397787802d4 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -37,6 +37,7 @@ Created 12/15/2009 Jimmy Yang #endif /* __STDC_LIMIT_MACROS */ #include <stdint.h> +#include "my_atomic.h" /** Possible status values for "mon_status" in "struct monitor_value" */ enum monitor_running_status { diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index a8ccac6a01c..6f5ef55d958 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -3100,7 +3100,8 @@ recv_init_missing_space(dberr_t err, const recv_spaces_t::const_iterator& i) { if (srv_operation == SRV_OPERATION_RESTORE || srv_operation == SRV_OPERATION_RESTORE_EXPORT) { - if (i->second.name.find(TEMP_TABLE_PATH_PREFIX) != std::string::npos) { + if (i->second.name.find(TEMP_TABLE_PATH_PREFIX) + != std::string::npos) { ib::warn() << "Tablespace " << i->first << " was not" " found at " << i->second.name << " when" " restoring a (partial?) backup. All redo log" diff --git a/storage/innobase/row/row0undo.cc b/storage/innobase/row/row0undo.cc index a9682d00ae5..e7f4d6dde69 100644 --- a/storage/innobase/row/row0undo.cc +++ b/storage/innobase/row/row0undo.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2019, MariaDB Corporation. +Copyright (c) 2017, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -491,6 +491,12 @@ row_undo_step( err = row_undo(node, thr); +#ifdef ENABLED_DEBUG_SYNC + if (trx->mysql_thd) { + DEBUG_SYNC_C("trx_after_rollback_row"); + } +#endif /* ENABLED_DEBUG_SYNC */ + trx->error_state = err; if (err != DB_SUCCESS) { diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index e55bf5ebc4b..f0b7b9e2766 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2016, 2019, MariaDB Corporation. +Copyright (c) 2016, 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -244,10 +244,21 @@ dberr_t trx_rollback_for_mysql(trx_t* trx) case TRX_STATE_PREPARED_RECOVERED: ut_ad(!trx_is_autocommit_non_locking(trx)); if (trx->rsegs.m_redo.undo || trx->rsegs.m_redo.old_insert) { - /* Change the undo log state back from - TRX_UNDO_PREPARED to TRX_UNDO_ACTIVE - so that if the system gets killed, - recovery will perform the rollback. */ + /* The XA ROLLBACK of a XA PREPARE transaction + will consist of multiple mini-transactions. + + As the very first step of XA ROLLBACK, we must + change the undo log state back from + TRX_UNDO_PREPARED to TRX_UNDO_ACTIVE, in order + to ensure that recovery will complete the + rollback. + + Failure to perform this step could cause a + situation where we would roll back part of + a XA PREPARE transaction, the server would be + killed, and finally, the transaction would be + recovered in XA PREPARE state, with some of + the actions already having been rolled back. */ ut_ad(!trx->rsegs.m_redo.undo || trx->rsegs.m_redo.undo->rseg == trx->rsegs.m_redo.rseg); @@ -266,29 +277,15 @@ dberr_t trx_rollback_for_mysql(trx_t* trx) &mtr); } mutex_exit(&trx->rsegs.m_redo.rseg->mutex); - /* Persist the XA ROLLBACK, so that crash - recovery will replay the rollback in case - the redo log gets applied past this point. */ + /* Write the redo log for the XA ROLLBACK + state change to the global buffer. It is + not necessary to flush the redo log. If + a durable log write of a later mini-transaction + takes place for whatever reason, then this state + change will be durable as well. */ mtr.commit(); ut_ad(mtr.commit_lsn() > 0); } -#ifdef ENABLED_DEBUG_SYNC - if (trx->mysql_thd == NULL) { - /* We could be executing XA ROLLBACK after - XA PREPARE and a server restart. */ - } else if (!trx->has_logged_persistent()) { - /* innobase_close_connection() may roll back a - transaction that did not generate any - persistent undo log. The DEBUG_SYNC - would cause an assertion failure for a - disconnected thread. - - NOTE: InnoDB will not know about the XID - if no persistent undo log was generated. */ - } else { - DEBUG_SYNC_C("trx_xa_rollback"); - } -#endif /* ENABLED_DEBUG_SYNC */ return(trx_rollback_for_mysql_low(trx)); case TRX_STATE_COMMITTED_IN_MEMORY: diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 724d4022f16..c5d280ddc72 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -3719,7 +3719,10 @@ static int ha_maria_init(void *p) maria_assert_if_crashed_table= debug_assert_if_crashed_table; if (res) + { maria_hton= 0; + maria_panic(HA_PANIC_CLOSE); + } ma_killed= ma_killed_in_mariadb; if (res) diff --git a/storage/maria/lockman.c b/storage/maria/lockman.c index 2eeb3c339bf..4cf6a46eff4 100644 --- a/storage/maria/lockman.c +++ b/storage/maria/lockman.c @@ -109,6 +109,7 @@ #include <my_sys.h> #include <my_bit.h> #include <lf.h> +#include "my_cpu.h" #include "lockman.h" /* diff --git a/storage/maria/ma_close.c b/storage/maria/ma_close.c index 2885b788e6b..c1747148b9f 100644 --- a/storage/maria/ma_close.c +++ b/storage/maria/ma_close.c @@ -20,7 +20,7 @@ to open other files during the time we flush the cache and close this file */ -#include "maria_def.h" +#include "ma_ftdefs.h" #include "ma_crypt.h" #ifdef WITH_S3_STORAGE_ENGINE #include "s3_func.h" @@ -89,6 +89,7 @@ int maria_close(register MARIA_HA *info) share->open_list= list_delete(share->open_list, &info->share_list); } + maria_ftparser_call_deinitializer(info); my_free(info->rec_buff); (*share->end)(info); diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result index 015afdb5cf6..cb8a1c61306 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_decimal.result @@ -30,7 +30,7 @@ c2 c3 123.456000000000000000000000000000 0.000000000000000000000000000001 98765432109876543210987654321098765.432109876543210987654321098765 -123.456000000000000000000000000000 insert into t1 values(6,123.456,0.000000000000000000000000000001); -ERROR 23000: Duplicate entry '123.456000000000000000000000000000-0.000000000000000000000000000' for key 'uk1' +ERROR 23000: Duplicate entry '123.456000000000000000000000000000-0.000000000000000000000000...' for key 'uk1' delete from t1 where c1 = 1; insert into t1 values(1,123.456,0.000000000000000000000000000001); drop table t1; diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c index 5f84eb89c28..56197729251 100644 --- a/storage/myisam/mi_close.c +++ b/storage/myisam/mi_close.c @@ -20,7 +20,7 @@ to open other files during the time we flush the cache and close this file */ -#include "myisamdef.h" +#include "ftdefs.h" int mi_close(register MI_INFO *info) { @@ -60,6 +60,8 @@ int mi_close(register MI_INFO *info) mysql_mutex_unlock(&share->intern_lock); my_free(mi_get_rec_buff_ptr(info, info->rec_buff)); + ftparser_call_deinitializer(info); + if (flag) { DBUG_EXECUTE_IF("crash_before_flush_keys", diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index 51d775ce06d..1a3b2076c82 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -35,7 +35,7 @@ endif() # Optional compression libraries. -foreach(compression_lib LZ4 BZIP2 zstd snappy) +foreach(compression_lib LZ4 BZip2 ZSTD snappy) FIND_PACKAGE(${compression_lib} QUIET) SET(WITH_ROCKSDB_${compression_lib} AUTO CACHE STRING @@ -54,20 +54,20 @@ if(LZ4_FOUND AND (NOT WITH_ROCKSDB_LZ4 STREQUAL "OFF")) list(APPEND THIRDPARTY_LIBS ${LZ4_LIBRARY}) endif() -if(BZIP2_FOUND AND (NOT WITH_ROCKSDB_BZIP2 STREQUAL "OFF")) +if(BZIP2_FOUND AND (NOT WITH_ROCKSDB_BZip2 STREQUAL "OFF")) add_definitions(-DBZIP2) include_directories(${BZIP2_INCLUDE_DIR}) list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES}) endif() -if(snappy_FOUND AND (NOT WITH_ROCKSDB_SNAPPY STREQUAL "OFF")) +if(SNAPPY_FOUND AND (NOT WITH_ROCKSDB_snappy STREQUAL "OFF")) add_definitions(-DSNAPPY) include_directories(${snappy_INCLUDE_DIR}) list(APPEND THIRDPARTY_LIBS ${snappy_LIBRARIES}) endif() include(CheckFunctionExists) -if(ZSTD_FOUND AND (NOT WITH_ROCKSDB_ZSTD STREQUAL "OFF")) +if(ZSTD_FOUND AND (NOT WITH_ROCKSDB_zstd STREQUAL "OFF")) SET(CMAKE_REQUIRED_LIBRARIES zstd) CHECK_FUNCTION_EXISTS(ZDICT_trainFromBuffer ZSTD_VALID) UNSET(CMAKE_REQUIRED_LIBRARIES) diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_compaction_readahead_size_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_compaction_readahead_size_basic.result index d971396f9e8..206cfa8188e 100644 --- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_compaction_readahead_size_basic.result +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_compaction_readahead_size_basic.result @@ -7,7 +7,7 @@ INSERT INTO invalid_values VALUES('\'aaa\''); INSERT INTO invalid_values VALUES('\'bbb\''); SET @@global.rocksdb_compaction_readahead_size = -1; Warnings: -Warning 1292 Truncated incorrect rocksdb_compaction_readahead_siz value: '-1' +Warning 1292 Truncated incorrect rocksdb_compaction_readahead_... value: '-1' SELECT @@global.rocksdb_compaction_readahead_size; @@global.rocksdb_compaction_readahead_size 0 diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_force_index_records_in_range_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_force_index_records_in_range_basic.result index 1a7a21c3a9f..d4768cfde1e 100644 --- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_force_index_records_in_range_basic.result +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_force_index_records_in_range_basic.result @@ -7,7 +7,7 @@ INSERT INTO invalid_values VALUES('\'aaa\''); INSERT INTO invalid_values VALUES('\'bbb\''); SET @@session.rocksdb_force_index_records_in_range = -1; Warnings: -Warning 1292 Truncated incorrect rocksdb_force_index_records_in_r value: '-1' +Warning 1292 Truncated incorrect rocksdb_force_index_records_i... value: '-1' SELECT @@session.rocksdb_force_index_records_in_range; @@session.rocksdb_force_index_records_in_range 0 diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_rate_limiter_bytes_per_sec_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_rate_limiter_bytes_per_sec_basic.result index 94eb9e34057..9d194ad718c 100644 --- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_rate_limiter_bytes_per_sec_basic.result +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_rate_limiter_bytes_per_sec_basic.result @@ -97,5 +97,5 @@ Warnings: Warning 1210 RocksDB: rocksdb_rate_limiter_bytes_per_sec cannot be dynamically changed to or from 0. Do a clean shutdown if you want to change it from or to 0. SET @@global.rocksdb_rate_limiter_bytes_per_sec = -1; Warnings: -Warning 1292 Truncated incorrect rocksdb_rate_limiter_bytes_per_s value: '-1' +Warning 1292 Truncated incorrect rocksdb_rate_limiter_bytes_pe... value: '-1' Warning 1210 RocksDB: rocksdb_rate_limiter_bytes_per_sec cannot be dynamically changed to or from 0. Do a clean shutdown if you want to change it from or to 0. diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result index 1a4bf02cc7c..f1e4d4d5e53 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result @@ -770,7 +770,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646)) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LES...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -779,7 +779,7 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (20) (SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS T' at line 7 +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LES...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -797,7 +797,7 @@ PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) (PARTITION part1 VALUES (SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (20), PARTITION part3 VALUES LESS THAN (2147483646) (SUBPARTITION subpart31 , SUBPARTITION subpart32 )) ; ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ' PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31 , SUBPART' at line 7 +(SUBPARTITION subpart31 , SUBP...' at line 7 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, f_char1 CHAR(20), @@ -987,7 +987,7 @@ SUBPARTITIONS -1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1032,7 +1032,7 @@ SUBPARTITIONS 2.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '2.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1055,7 +1055,7 @@ SUBPARTITIONS -2.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1078,7 +1078,7 @@ SUBPARTITIONS 0.0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1101,7 +1101,7 @@ SUBPARTITIONS 1.6 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1.6 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1123,7 +1123,7 @@ SUBPARTITIONS 999999999999999999999999999999.999999999999999999999999999999 (PARTITION part1 VALUES LESS THAN (10), PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '999999999999999999999999999999.999999999999999999999999999999 -(PARTITION part1 V' at line 9 +(PARTITION part...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1146,7 +1146,7 @@ SUBPARTITIONS 0.000000000000000000000000000001 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.000000000000000000000000000001 (PARTITION part1 VALUES LESS THAN (10), -PARTITI' at line 9 +PART...' at line 9 # 4.2.3 partition/subpartition numbers FLOAT notation CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1170,7 +1170,7 @@ SUBPARTITIONS 2.0E+0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '2.0E+0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1193,7 +1193,7 @@ SUBPARTITIONS 0.2E+1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.2E+1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1216,7 +1216,7 @@ SUBPARTITIONS -2.0E+0 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2.0E+0 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1239,7 +1239,7 @@ SUBPARTITIONS 0.16E+1 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.16E+1 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1262,7 +1262,7 @@ SUBPARTITIONS 0.0E+300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '0.0E+300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1285,7 +1285,7 @@ SUBPARTITIONS 1E+300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1E+300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1308,7 +1308,7 @@ SUBPARTITIONS 1E-300 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: Only integers allowed as number here near '1E-300 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN ' at line 9 +PARTITION part2 VALUES LESS TH...' at line 9 # 4.2.4 partition/subpartition numbers STRING notation CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1332,7 +1332,7 @@ SUBPARTITIONS '2' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1355,7 +1355,7 @@ SUBPARTITIONS '2.0' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2.0' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (' at line 9 +PARTITION part2 VALUES LESS THA...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1378,7 +1378,7 @@ SUBPARTITIONS '0.2E+1' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0.2E+1' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1401,7 +1401,7 @@ SUBPARTITIONS '2A' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''2A' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1424,7 +1424,7 @@ SUBPARTITIONS 'A2' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''A2' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1447,7 +1447,7 @@ SUBPARTITIONS '' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1470,7 +1470,7 @@ SUBPARTITIONS 'GARBAGE' PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''GARBAGE' (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 +PARTITION part2 VALUES LESS...' at line 9 # 4.2.5 partition/subpartition numbers other notations CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, @@ -1494,7 +1494,7 @@ SUBPARTITIONS 2A PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2A (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1517,7 +1517,7 @@ SUBPARTITIONS A2 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'A2 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (214' at line 9 +PARTITION part2 VALUES LESS THAN (...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1540,7 +1540,7 @@ SUBPARTITIONS GARBAGE PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GARBAGE (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN' at line 9 +PARTITION part2 VALUES LESS T...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1563,7 +1563,7 @@ SUBPARTITIONS "2" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"2" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (21' at line 9 +PARTITION part2 VALUES LESS THAN ...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1586,7 +1586,7 @@ SUBPARTITIONS "2A" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"2A" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1609,7 +1609,7 @@ SUBPARTITIONS "A2" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"A2" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THAN (2' at line 9 +PARTITION part2 VALUES LESS THAN...' at line 9 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1632,7 +1632,7 @@ SUBPARTITIONS "GARBAGE" PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"GARBAGE" (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS TH' at line 9 +PARTITION part2 VALUES LESS...' at line 9 # 4.2.6 (negative) partition/subpartition numbers per @variables SET @aux = 5; CREATE TABLE t1 ( @@ -1657,7 +1657,7 @@ SUBPARTITIONS @aux = 5 PARTITION part2 VALUES LESS THAN (2147483646)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@aux = 5 (PARTITION part1 VALUES LESS THAN (10), -PARTITION part2 VALUES LESS THA' at line 9 +PARTITION part2 VALUES LESS ...' at line 9 #------------------------------------------------------------------------ # 4.3 Mixups of assigned partition/subpartition numbers and names #------------------------------------------------------------------------ @@ -1750,7 +1750,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1769,7 +1769,7 @@ PARTITION part3 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part3 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart31, SUBPAR' at line 13 +(SUBPARTITION subpart31, SUB...' at line 13 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1812,7 +1812,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1831,7 +1831,7 @@ PARTITION part3 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ' at line 11 +(SUBPARTITION subpart21 ...' at line 11 CREATE TABLE t1 ( f_int1 INTEGER DEFAULT 0, f_int2 INTEGER DEFAULT 0, @@ -1848,7 +1848,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ); ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), PARTITION part2 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart21, SUBPAR' at line 11 +(SUBPARTITION subpart21, SUB...' at line 11 #======================================================================== # 5. Checks of logical partition/subpartition name diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index cf4a7eedabf..6b7af39d51d 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -153,12 +153,15 @@ static const char *check_longlong(const char *fmt, uint *have_longlong) */ static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end, - char *par, size_t par_len, char quote_char) + char *par, size_t par_len, char quote_char, + my_bool cut) { + char *last[3]= {0,0,0}; uint char_len; char *start= to; char *par_end= par + par_len; size_t buff_length= (size_t) (end - to); + uint index= 0; if (buff_length <= par_len) goto err; @@ -167,6 +170,11 @@ static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end, for ( ; par < par_end; par+= char_len) { uchar c= *(uchar *) par; + if (cut) + { + last[index]= start; + index= (index + 1) % 3; + } char_len= my_ci_charlen_fix(cs, (const uchar *) par, (const uchar *) par_end); if (char_len == 1 && c == (uchar) quote_char ) { @@ -178,9 +186,30 @@ static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end, goto err; start= strnmov(start, par, char_len); } - + if (start + 1 >= end) goto err; + + if (cut) + { + uint dots= 0; + start= NULL; + for (; dots < 3; dots++) + { + if (index == 0) + index= 2; + else + index--; + if (!last[index]) + break; + start= last[index]; + } + if (start == NULL) + goto err; // there was no characters at all + for (; dots; dots--) + *start++= '.'; + + } *start++= quote_char; return start; @@ -198,18 +227,45 @@ static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end, size_t width, char *par, uint print_type) { int well_formed_error; - size_t plen, left_len= (size_t) (end - to) + 1; + uint dots= 0; + size_t plen, left_len= (size_t) (end - to) + 1, slen=0; if (!par) par = (char*) "(null)"; - plen= strnlen(par, width); + plen= slen= strnlen(par, width + 1); + if (plen > width) + plen= width; if (left_len <= plen) plen = left_len - 1; + if ((slen > plen)) + { + if (plen < 3) + { + dots= (uint) plen; + plen= 0; + } + else + { + dots= 3; + plen-= 3; + } + } + plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error); if (print_type & ESCAPED_ARG) - to= backtick_string(cs, to, end, par, plen, '`'); + { + to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots)); + dots= 0; + } else to= strnmov(to,par,plen); + + if (dots) + { + for (; dots; dots--) + *(to++)= '.'; + *(to)= 0; + } return to; } diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in index e61e35c52ee..6db3545e86d 100644 --- a/support-files/mariadb.service.in +++ b/support-files/mariadb.service.in @@ -78,7 +78,7 @@ PermissionsStartOnly=true # Do not panic if galera_recovery script is not available. (MDEV-10538) ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION" ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \ - VAR=`@bindir@/galera_recovery`; [ $? -eq 0 ] \ + VAR=`cd @bindir@/..; @bindir@/galera_recovery`; [ $? -eq 0 ] \ && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1" # Needed to create system tables etc. diff --git a/support-files/rpm/my.cnf b/support-files/rpm/my.cnf index 913b88f8328..8c6a7139de5 100644 --- a/support-files/rpm/my.cnf +++ b/support-files/rpm/my.cnf @@ -5,7 +5,7 @@ [client-server] # -# include all files from the config directory +# include *.cnf from the config directory # !includedir /etc/my.cnf.d diff --git a/unittest/mysys/my_atomic-t.c b/unittest/mysys/my_atomic-t.c index 52bced7ce3b..1995a8e8950 100644 --- a/unittest/mysys/my_atomic-t.c +++ b/unittest/mysys/my_atomic-t.c @@ -14,6 +14,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ #include "thr_template.c" +#include "my_atomic.h" volatile uint32 b32; volatile int32 c32; diff --git a/unittest/mysys/my_vsnprintf-t.c b/unittest/mysys/my_vsnprintf-t.c index 6ba0a42cf7e..872e88ddd7e 100644 --- a/unittest/mysys/my_vsnprintf-t.c +++ b/unittest/mysys/my_vsnprintf-t.c @@ -61,7 +61,7 @@ static void test_many(const char **res, const char *fmt, ...) int main(void) { - plan(39); + plan(43); test1("Constant string", "Constant string"); @@ -99,12 +99,28 @@ int main(void) test1("Width is ignored for strings <x> <y>", "Width is ignored for strings <%04s> <%5s>", "x", "y"); - test1("Precision works for strings <abcde>", + test1("Precision works for strings <ab...>", "Precision works for strings <%.5s>", "abcdef!"); - test1("Flag '`' (backtick) works: `abcd` `op``q` (mysql extension)", - "Flag '`' (backtick) works: %`s %`.4s (mysql extension)", - "abcd", "op`qrst"); + test1("Flag '`' (backtick) works: `abcd` `op``q...` (mysql extension)", + "Flag '`' (backtick) works: %`s %`.7s (mysql extension)", + "abcd", "op`qrstuuuuuuuuu"); + + test1("Flag '`' (backtick) works: `abcd` `.` (mysql extension)", + "Flag '`' (backtick) works: %`s %`.1s (mysql extension)", + "abcd", "op`qrstuuuuuuuuu"); + + test1("Flag '`' (backtick) works: `abcd` `...` (mysql extension)", + "Flag '`' (backtick) works: %`s %`.3s (mysql extension)", + "abcd", "op`qrstuuuuuuuuu"); + + test1("Flag '`' (backtick) works: `abcd` `op...` (mysql extension)", + "Flag '`' (backtick) works: %`s %`.5s (mysql extension)", + "abcd", "op`qrstuuuuuuuuu"); + + test1("Flag '`' (backtick) works: `abcd` `op``...` (mysql extension)", + "Flag '`' (backtick) works: %`s %`.6s (mysql extension)", + "abcd", "op`qrstuuuuuuuuu"); test1("Length modifiers work: 1 * -1 * 2 * 3", "Length modifiers work: %d * %ld * %lld * %zd", 1, -1L, 2LL, (size_t)3); @@ -125,13 +141,13 @@ int main(void) test1("Asterisk '*' as a width works: < 4>", "Asterisk '*' as a width works: <%*d>", 5, 4); - test1("Asterisk '*' as a precision works: <qwerty>", + test1("Asterisk '*' as a precision works: <qwe...>", "Asterisk '*' as a precision works: <%.*s>", 6, "qwertyuiop"); test1("Positional arguments for a width: < 4>", "Positional arguments for a width: <%1$*2$d>", 4, 5); - test1("Positional arguments for a precision: <qwerty>", + test1("Positional arguments for a precision: <qwe...>", "Positional arguments for a precision: <%1$.*2$s>", "qwertyuiop", 6); test1("Positional arguments and a width: <0000ab>", @@ -168,14 +184,14 @@ int main(void) test1("M with positional: 0 \"Internal error/check (Not system error)\"", "M with positional: %1$M", 0); - test1("M with width: 0 \"Internal error/ch", + test1("M with width: 0 \"Internal error...", "M with width: %.20M", 0); - test1("M with width positional: 0 \"Internal error/ch", + test1("M with width positional: 0 \"Internal error...", "M with width positional: %2$.*1$M", 20, 0); - test_w_len("M small buf: 0 \"In", + test_w_len("M small buf: 0 \"..", 19, "M small buf: %M", 0); - test_w_len("M small buf positional: 0 \"In", + test_w_len("M small buf positional: 0 \"..", 30, "M small buf positional: %1$M", 0); return exit_status(); diff --git a/win/packaging/heidisql.cmake b/win/packaging/heidisql.cmake index 9fee823b75b..1d66c812ec0 100644 --- a/win/packaging/heidisql.cmake +++ b/win/packaging/heidisql.cmake @@ -1,4 +1,4 @@ -SET(HEIDISQL_BASE_NAME "HeidiSQL_10.2_32_Portable") +SET(HEIDISQL_BASE_NAME "HeidiSQL_11.0_32_Portable") SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip") SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}") SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME}) diff --git a/win/packaging/heidisql.wxi.in b/win/packaging/heidisql.wxi.in index 4244b47d0d8..58d95210783 100644 --- a/win/packaging/heidisql.wxi.in +++ b/win/packaging/heidisql.wxi.in @@ -33,20 +33,25 @@ <RegistryValue Root="HKCU" Key="Software\@CPACK_WIX_PACKAGE_NAME@\Uninstall" Name="shortcuts.heidisql" Value="1" Type="string" KeyPath="yes" /> <Shortcut Id="startmenuHeidiSQL" Directory="ShortcutFolder" Name="HeidiSQL" Target="[D.HeidiSQL]\heidisql.exe"/> </Component> + + <Component Id="component.HeidiSQL_libmysql.dll" Guid="*" Win64="no"> <File Id="heidisql.libmysql.dll" Name="libmysql.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libmysql.dll" /> </Component> + <Component Id="component.HeidiSQL_libmysql_6.1.dll" Guid="*" Win64="no"> + <File Id="heidisql.libmysql_6.1.dll" Name="libmysql-6.1.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libmysql-6.1.dll" /> + </Component> <Component Id="component.HeidiSQL_libmariadb.dll" Guid="*" Win64="no"> <File Id="heidisql.libmariadb.dll" Name="libmariadb.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libmariadb.dll" /> </Component> - <Component Id="component.HeidiSQL_libeay32.dll" Guid="*" Win64="no"> - <File Id="heidisql.libeay32.dll" Name="libeay32.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libeay32.dll" /> + <Component Id="component.HeidiSQL_libssl_1_1.dll" Guid="*" Win64="no"> + <File Id="heidisql.libssl_1_1.dll" Name="libssl-1_1.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libssl-1_1.dll" /> </Component> - <Component Id="component.HeidiSQL_libpq.dll" Guid="*" Win64="no"> - <File Id="heidisql.libpq.dll" Name="libpq.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libpq.dll" /> + <Component Id="component.HeidiSQL_libpq_10.dll" Guid="*" Win64="no"> + <File Id="heidisql.libpq_10.dll" Name="libpq-10.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libpq-10.dll" /> </Component> - <Component Id="component.HeidiSQL_ssleay32.dll" Guid="*" Win64="no"> - <File Id="heidisql.ssleay32.dll" Name="ssleay32.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\ssleay32.dll" /> + <Component Id="component.HeidiSQL_libcrypto_1_1.dll" Guid="*" Win64="no"> + <File Id="heidisql.libcrypto_1_1.dll" Name="libcrypto-1_1.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libcrypto-1_1.dll" /> </Component> <Component Id="component.HeidiSQL_libintl_8.dll" Guid="*" Win64="no"> <File Id="heidisql.libintl_8.dll" Name="libintl-8.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libintl-8.dll" /> @@ -54,6 +59,9 @@ <Component Id="component.HeidiSQL_libiconv_2.dll" Guid="*" Win64="no"> <File Id="heidisql.libiconv_2.dll" Name="libiconv-2.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\libiconv-2.dll" /> </Component> + <Component Id="component.HeidiSQL_sqlite3.dll" Guid="*" Win64="no"> + <File Id="heidisql.sqlite3.dll" Name="sqlite3.dll" Source="${HEIDISQL_DOWNLOAD_DIR}\sqlite3.dll" /> + </Component> <Directory Id="D.HeidiSQL.plugins" Name="plugins"> <?foreach dll in $(var.pluginlist) ?> @@ -76,11 +84,13 @@ <ComponentRef Id="component.HeidiSQL_MenuShortcut"/> <ComponentRef Id="component.HeidiSQL_libmysql.dll"/> <ComponentRef Id="component.HeidiSQL_libmariadb.dll"/> - <ComponentRef Id="component.HeidiSQL_libeay32.dll" /> - <ComponentRef Id="component.HeidiSQL_libpq.dll" /> - <ComponentRef Id="component.HeidiSQL_ssleay32.dll" /> + <ComponentRef Id="component.HeidiSQL_libssl_1_1.dll" /> + <ComponentRef Id="component.HeidiSQL_libpq_10.dll" /> + <ComponentRef Id="component.HeidiSQL_libcrypto_1_1.dll" /> <ComponentRef Id="component.HeidiSQL_libintl_8.dll" /> <ComponentRef Id="component.HeidiSQL_libiconv_2.dll" /> + <ComponentRef Id="component.HeidiSQL_sqlite3.dll" /> + <ComponentRef Id="component.HeidiSQL_libmysql_6.1.dll" /> <?foreach dll in $(var.pluginlist)?> <ComponentRef Id="component.HeidiSQL_$(var.dll)" /> <?endforeach?> diff --git a/wsrep-lib b/wsrep-lib -Subproject dcdd7435bdf63a4e1ec5f9b3fd508c6a8def4a3 +Subproject d0255569b0154e23c5461ed13928f9b0a18008e |