1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge branch '11.7' into 11.8

This commit is contained in:
Sergei Golubchik
2025-02-11 20:29:43 +01:00
511 changed files with 13256 additions and 7184 deletions

View File

@@ -501,7 +501,9 @@ IF(UNIX)
ADD_SUBDIRECTORY(man)
ENDIF()
INCLUDE(cmake/abi_check.cmake)
IF (NOT WITHOUT_ABI_CHECK)
INCLUDE(cmake/abi_check.cmake)
ENDIF()
INCLUDE(cmake/tags.cmake)
INCLUDE(for_clients)
ADD_SUBDIRECTORY(scripts)

View File

@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=11
MYSQL_VERSION_MINOR=8
MYSQL_VERSION_PATCH=0
SERVER_MATURITY=alpha
MYSQL_VERSION_PATCH=1
SERVER_MATURITY=gamma

View File

@@ -43,11 +43,6 @@
#include "sql_priv.h"
#include "sql_basic_types.h"
#include <atomic>
#if 0 /* FIXME: the following is broken for now */
# include "mariadb_rpl.h"
#else
enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT,ROW_RESULT,DECIMAL_RESULT};
#endif
#include "log_event.h"
#include "compat56.h"
#include "sql_common.h"
@@ -165,7 +160,9 @@ static Server_gtid_event_filter *server_id_gtid_filter= NULL;
static char *start_datetime_str, *stop_datetime_str;
static my_time_t start_datetime= 0, stop_datetime= 0;
static my_time_t last_processed_datetime= MY_TIME_T_MAX;
static bool stop_datetime_given= false;
static ulonglong rec_count= 0;
static MYSQL* mysql = NULL;
static const char* dirname_for_local_load= 0;
@@ -871,6 +868,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
DBUG_ENTER("process_event");
Exit_status retval= OK_CONTINUE;
IO_CACHE *const head= &print_event_info->head_cache;
my_time_t ev_when= ev->when;
/*
We use Gtid_list_log_event information to determine if there is missing
@@ -1371,6 +1369,7 @@ err:
end:
rec_count++;
end_skip_count:
last_processed_datetime= ev_when;
DBUG_PRINT("info", ("end event processing"));
/*
@@ -2935,6 +2934,7 @@ static Exit_status check_header(IO_CACHE* file,
uchar buf[PROBE_HEADER_LEN];
my_off_t tmp_pos, pos;
MY_STAT my_file_stat;
int read_error;
delete glob_description_event;
if (!(glob_description_event= new Format_description_log_event(4)))
@@ -3017,7 +3017,8 @@ static Exit_status check_header(IO_CACHE* file,
Format_description_log_event *new_description_event;
my_b_seek(file, tmp_pos); /* seek back to event's start */
if (!(new_description_event= (Format_description_log_event*)
Log_event::read_log_event(file, glob_description_event,
Log_event::read_log_event(file, &read_error,
glob_description_event,
opt_verify_binlog_checksum)))
/* EOF can't be hit here normally, so it's a real error */
{
@@ -3050,7 +3051,8 @@ static Exit_status check_header(IO_CACHE* file,
{
Log_event *ev;
my_b_seek(file, tmp_pos); /* seek back to event's start */
if (!(ev= Log_event::read_log_event(file, glob_description_event,
if (!(ev= Log_event::read_log_event(file, &read_error,
glob_description_event,
opt_verify_binlog_checksum)))
{
/* EOF can't be hit here normally, so it's a real error */
@@ -3090,7 +3092,6 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
IO_CACHE cache,*file= &cache;
uchar tmp_buff[BIN_LOG_HEADER_SIZE];
Exit_status retval= OK_CONTINUE;
my_time_t last_ev_when= MY_TIME_T_MAX;
if (logname && strcmp(logname, "-") != 0)
{
@@ -3164,8 +3165,10 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
{
char llbuff[21];
my_off_t old_off = my_b_tell(file);
int read_error;
Log_event* ev = Log_event::read_log_event(file, glob_description_event,
Log_event* ev = Log_event::read_log_event(file, &read_error,
glob_description_event,
opt_verify_binlog_checksum);
if (!ev)
{
@@ -3174,15 +3177,15 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
about a corruption, but treat it as EOF and move to the next binlog.
*/
if (glob_description_event->flags & LOG_EVENT_BINLOG_IN_USE_F)
file->error= 0;
else if (file->error)
read_error= 0;
else if (read_error)
{
error("Could not read entry at offset %s: "
"Error in log format or read error.",
llstr(old_off,llbuff));
goto err;
}
// else file->error == 0 means EOF, that's OK, we break in this case
// else read_error == 0 means EOF, that's OK, we break in this case
/*
Emit a warning in the event that we finished processing input
@@ -3196,21 +3199,8 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
"end of input", stop_position);
}
/*
Emit a warning in the event that we finished processing input
before reaching the boundary indicated by --stop-datetime.
*/
if (stop_datetime_given &&
stop_datetime > last_ev_when)
{
retval = OK_STOP;
warning("Did not reach stop datetime '%s' "
"before end of input", stop_datetime_str);
}
goto end;
}
last_ev_when= ev->when;
if ((retval= process_event(print_event_info, ev, old_off, logname)) !=
OK_CONTINUE)
goto end;
@@ -3389,6 +3379,10 @@ int main(int argc, char** argv)
start_position= BIN_LOG_HEADER_SIZE;
}
if (stop_datetime_given && stop_datetime > last_processed_datetime)
warning("Did not reach stop datetime '%s' before end of input",
stop_datetime_str);
/*
If enable flashback, need to print the events from the end to the
beginning

View File

@@ -103,6 +103,9 @@
#define DUMP_TABLE_TABLE 0
#define DUMP_TABLE_SEQUENCE 1
/* until MDEV-35831 is implemented, we'll have to detect VECTOR by name */
#define MYSQL_TYPE_VECTOR "V"
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);
@@ -147,7 +150,7 @@ static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0,
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static double opt_max_statement_time= 0.0;
static MYSQL *mysql=0;
static DYNAMIC_STRING insert_pat, select_field_names,
static DYNAMIC_STRING insert_pat, select_field_names, field_flags,
select_field_names_for_header, insert_field_names;
static char *opt_password=0,*current_user=0,
*current_host=0,*path=0,*fields_terminated=0,
@@ -2009,6 +2012,7 @@ static void free_resources()
dynstr_free(&dynamic_where);
dynstr_free(&insert_pat);
dynstr_free(&select_field_names);
dynstr_free(&field_flags);
dynstr_free(&select_field_names_for_header);
dynstr_free(&insert_field_names);
if (defaults_argv)
@@ -3181,6 +3185,7 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
{
select_field_names_inited= 1;
init_dynamic_string_checked(&select_field_names, "", 1024, 1024);
init_dynamic_string_checked(&field_flags, "", 1024, 1024);
init_dynamic_string_checked(&insert_field_names, "", 1024, 1024);
if (opt_header)
init_dynamic_string_checked(&select_field_names_for_header, "", 1024, 1024);
@@ -3188,6 +3193,7 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
else
{
dynstr_set_checked(&select_field_names, "");
dynstr_set_checked(&field_flags, "");
dynstr_set_checked(&insert_field_names, "");
if (opt_header)
dynstr_set_checked(&select_field_names_for_header, "");
@@ -3355,7 +3361,7 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
fprintf(sql_file,
"SET @saved_cs_client = @@character_set_client;\n"
"SET character_set_client = utf8;\n"
"SET character_set_client = utf8mb4;\n"
"/*!50001 CREATE VIEW %s AS SELECT\n",
result_table);
@@ -3423,7 +3429,7 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
{
fprintf(sql_file,
"/*!40101 SET @saved_cs_client = @@character_set_client */;\n"
"/*!40101 SET character_set_client = utf8 */;\n"
"/*!40101 SET character_set_client = utf8mb4 */;\n"
"%s%s;\n"
"/*!40101 SET character_set_client = @saved_cs_client */;\n",
is_log_table ? "CREATE TABLE IF NOT EXISTS " : "",
@@ -3489,6 +3495,11 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
if (opt_header)
dynstr_append_checked(&select_field_names_for_header,
quote_for_equal(row[0], name_buff));
/* VECTOR doesn't have a type code yet, must be detected by name */
if (row[3] && strcmp(row[3], "vector") == 0)
dynstr_append_checked(&field_flags, MYSQL_TYPE_VECTOR);
else
dynstr_append_checked(&field_flags, " ");
}
if (vers_hidden)
@@ -3502,6 +3513,7 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
"row_end" :
"row_end");
dynstr_append_checked(&insert_field_names, ", row_start, row_end");
dynstr_append_checked(&field_flags, " ");
}
/*
@@ -3608,6 +3620,11 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
while ((row= mysql_fetch_row(result)))
{
ulong *lengths= mysql_fetch_lengths(result);
/* VECTOR doesn't have a type code yet, must be detected by name */
if (strncmp(row[SHOW_TYPE], STRING_WITH_LEN("vector(")) == 0)
dynstr_append_checked(&field_flags, MYSQL_TYPE_VECTOR);
else
dynstr_append_checked(&field_flags, " ");
if (init)
{
if (!opt_xml && !opt_no_create_info)
@@ -4491,21 +4508,23 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
"Not enough fields from table %s! Aborting.\n",
result_table);
DBUG_ASSERT(field_flags.length > i);
/*
63 is my_charset_bin. If charsetnr is not 63,
we have not a BLOB but a TEXT column.
we'll dump in hex only BLOB columns.
*/
is_blob= (opt_hex_blob && field->charsetnr == 63 &&
(field->type == MYSQL_TYPE_BIT ||
field->type == MYSQL_TYPE_STRING ||
field->type == MYSQL_TYPE_VAR_STRING ||
field->type == MYSQL_TYPE_VARCHAR ||
field->type == MYSQL_TYPE_BLOB ||
field->type == MYSQL_TYPE_LONG_BLOB ||
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
field->type == MYSQL_TYPE_TINY_BLOB ||
field->type == MYSQL_TYPE_GEOMETRY)) ? 1 : 0;
is_blob= field->type == MYSQL_TYPE_GEOMETRY ||
field->type == MYSQL_TYPE_BIT ||
field_flags.str[i] == MYSQL_TYPE_VECTOR[0] ||
(opt_hex_blob && field->charsetnr == 63 &&
(field->type == MYSQL_TYPE_STRING ||
field->type == MYSQL_TYPE_VAR_STRING ||
field->type == MYSQL_TYPE_VARCHAR ||
field->type == MYSQL_TYPE_BLOB ||
field->type == MYSQL_TYPE_LONG_BLOB ||
field->type == MYSQL_TYPE_MEDIUM_BLOB ||
field->type == MYSQL_TYPE_TINY_BLOB));
if (extended_insert && !opt_xml)
{
if (i == 0)
@@ -4528,7 +4547,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
Also we need to reserve 1 byte for terminating '\0'.
*/
dynstr_realloc_checked(&extended_row,length * 2 + 2 + 1);
if (opt_hex_blob && is_blob)
if (is_blob)
{
dynstr_append_checked(&extended_row, "0x");
extended_row.length+= mysql_hex_string(extended_row.str +
@@ -4589,7 +4608,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
{
if (opt_xml)
{
if (opt_hex_blob && is_blob && length)
if (is_blob && length)
{
/* Define xsi:type="xs:hexBinary" for hex encoded data */
print_xml_tag(md_result_file, "\t\t", "", "field", "name=",
@@ -4604,7 +4623,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
}
fputs("</field>\n", md_result_file);
}
else if (opt_hex_blob && is_blob && length)
else if (is_blob && length)
{
fputs("0x", md_result_file);
print_blob_as_hex(md_result_file, row[i], length);

View File

@@ -879,8 +879,7 @@ LogFile progress_file;
void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, size_t len);
void replace_dynstr_append(DYNAMIC_STRING *ds, const char *val);
void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val);
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING* ds_input,
bool keep_header);
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING* ds_input);
static int match_expected_error(struct st_command *command,
unsigned int err_errno,
@@ -3493,7 +3492,7 @@ void do_exec(struct st_command *command)
if (display_result_sorted)
{
dynstr_append_sorted(&ds_res, &ds_sorted, 0);
dynstr_append_sorted(&ds_res, &ds_sorted);
dynstr_free(&ds_sorted);
}
#ifdef _WIN32
@@ -7838,16 +7837,29 @@ void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
uint num_fields= mysql_num_fields(res);
MYSQL_FIELD *fields= mysql_fetch_fields(res);
ulong *lengths;
DYNAMIC_STRING rs_unsorted, *rs= ds;
if (display_result_sorted)
{
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
rs= &rs_unsorted;
}
while ((row = mysql_fetch_row(res)))
{
uint i;
lengths = mysql_fetch_lengths(res);
for (i = 0; i < num_fields; i++)
append_field(ds, i, &fields[i],
append_field(rs, i, &fields[i],
row[i], lengths[i], !row[i]);
if (!display_result_vertically)
dynstr_append_mem(ds, "\n", 1);
dynstr_append_mem(rs, "\n", 1);
}
if (display_result_sorted)
{
dynstr_append_sorted(ds, &rs_unsorted);
dynstr_free(&rs_unsorted);
}
}
@@ -7865,6 +7877,13 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
ulong *length;
uint i;
int error;
DYNAMIC_STRING rs_unsorted, *rs= ds;
if (display_result_sorted)
{
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
rs= &rs_unsorted;
}
/* Allocate array with bind structs, lengths and NULL flags */
my_bind= (MYSQL_BIND*) my_malloc(PSI_NOT_INSTRUMENTED, num_fields * sizeof(MYSQL_BIND),
@@ -7896,10 +7915,10 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
while ((error=mysql_stmt_fetch(stmt)) == 0)
{
for (i= 0; i < num_fields; i++)
append_field(ds, i, &fields[i], (char*)my_bind[i].buffer,
append_field(rs, i, &fields[i], (char*)my_bind[i].buffer,
*my_bind[i].length, *my_bind[i].is_null);
if (!display_result_vertically)
dynstr_append_mem(ds, "\n", 1);
dynstr_append_mem(rs, "\n", 1);
}
if (error != MYSQL_NO_DATA)
@@ -7918,6 +7937,12 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
my_free(my_bind);
my_free(length);
my_free(is_null);
if (display_result_sorted)
{
dynstr_append_sorted(ds, &rs_unsorted);
dynstr_free(&rs_unsorted);
}
}
@@ -8120,7 +8145,7 @@ static void append_session_track_info(DYNAMIC_STRING *ds, MYSQL *mysql)
if (type == SESSION_TRACK_SYSTEM_VARIABLES)
{
dynstr_append_mem(ds_type, STRING_WITH_LEN("\n"));
dynstr_append_sorted(ds, ds_type, false);
dynstr_append_sorted(ds, ds_type);
dynstr_append_mem(ds, STRING_WITH_LEN("\n"));
dynstr_free(&ds_sort);
}
@@ -8162,7 +8187,6 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
{
uint count;
MYSQL_RES *warn_res;
DYNAMIC_STRING res;
DBUG_ENTER("append_warnings");
if (!(count= mysql_warning_count(mysql)))
@@ -8183,18 +8207,8 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
die("Warning count is %u but didn't get any warnings",
count);
init_dynamic_string(&res, "", 1024, 1024);
append_result(&res, warn_res);
append_result(ds, warn_res);
mysql_free_result(warn_res);
DBUG_PRINT("warnings", ("%s", res.str));
if (display_result_sorted)
dynstr_append_sorted(ds, &res, 0);
else
dynstr_append_mem(ds, res.str, res.length);
dynstr_free(&res);
DBUG_RETURN(count);
}
@@ -8709,8 +8723,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
DYNAMIC_STRING ds_prepare_warnings;
DYNAMIC_STRING ds_execute_warnings;
DYNAMIC_STRING ds_res_1st_execution;
DYNAMIC_STRING ds_res_2_execution_unsorted;
DYNAMIC_STRING *ds_res_2_output;
my_bool ds_res_1st_execution_init = FALSE;
my_bool compare_2nd_execution = TRUE;
int query_match_ps2_re;
@@ -8772,7 +8784,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
parameter markers.
*/
#if MYSQL_VERSION_ID >= 50000
if (cursor_protocol_enabled)
{
ps2_protocol_enabled = 0;
@@ -8792,7 +8803,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
}
}
#endif
query_match_ps2_re = match_re(&ps2_re, query);
@@ -8859,29 +8869,8 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
!disable_warnings)
append_warnings(&ds_execute_warnings, mysql);
if (!disable_result_log &&
compare_2nd_execution &&
ps2_protocol_enabled &&
query_match_ps2_re &&
display_result_sorted)
{
init_dynamic_string(&ds_res_2_execution_unsorted, "",
RESULT_STRING_INIT_MEM,
RESULT_STRING_INCREMENT_MEM);
ds_res_2_output= &ds_res_2_execution_unsorted;
}
else
ds_res_2_output= ds;
if (read_stmt_results(stmt, ds_res_2_output, command))
{
if (ds_res_2_output != ds)
{
dynstr_append_mem(ds, ds_res_2_output->str, ds_res_2_output->length);
dynstr_free(ds_res_2_output);
}
if (read_stmt_results(stmt, ds, command))
goto end;
}
if (!disable_result_log)
{
@@ -8891,35 +8880,12 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
*/
if (compare_2nd_execution && ps2_protocol_enabled && query_match_ps2_re)
{
DYNAMIC_STRING *ds_res_1_execution_compare;
DYNAMIC_STRING ds_res_1_execution_sorted;
if (display_result_sorted)
{
init_dynamic_string(&ds_res_1_execution_sorted, "",
RESULT_STRING_INIT_MEM,
RESULT_STRING_INCREMENT_MEM);
dynstr_append_sorted(&ds_res_1_execution_sorted,
&ds_res_1st_execution, 1);
dynstr_append_sorted(ds, &ds_res_2_execution_unsorted, 1);
ds_res_1_execution_compare= &ds_res_1_execution_sorted;
}
else
{
ds_res_1_execution_compare= &ds_res_1st_execution;
}
if (ds->length != ds_res_1_execution_compare->length ||
!(memcmp(ds_res_1_execution_compare->str, ds->str, ds->length) == 0))
if (ds->length != ds_res_1st_execution.length ||
!(memcmp(ds_res_1st_execution.str, ds->str, ds->length) == 0))
{
die("The result of the 1st execution does not match with \n"
"the result of the 2nd execution of ps-protocol:\n 1st:\n"
"%s\n 2nd:\n %s",
ds_res_1_execution_compare->str,
ds->str);
}
if (display_result_sorted)
{
dynstr_free(&ds_res_1_execution_sorted);
dynstr_free(&ds_res_2_execution_unsorted);
"%s\n 2nd:\n %s", ds_res_1st_execution.str, ds->str);
}
}
@@ -9514,10 +9480,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
DYNAMIC_STRING *rs_output; /* where to put results */
DYNAMIC_STRING rs_cmp_result; /* here we put results to compare with
pre-recrded file */
DYNAMIC_STRING rs_unsorted; /* if we need sorted results, here we store
results before sorting them */
DYNAMIC_STRING *rs_sorted_save= NULL; /* here we store where to put sorted
result if needed */
DYNAMIC_STRING rs_warnings;
char *query;
size_t query_len;
@@ -9688,18 +9650,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
dynstr_free(&query_str);
}
if (display_result_sorted)
{
/*
Collect the query output in a separate string
that can be sorted before it's added to the
global result string
*/
init_dynamic_string(&rs_unsorted, "", 1024, 1024);
rs_sorted_save= rs_output; /* Remember original ds */
rs_output= &rs_unsorted;
}
/*
Find out how to run this query
@@ -9726,14 +9676,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
dynstr_free(&rs_warnings);
ds_warn= 0;
if (display_result_sorted)
{
/* Sort the result set and append it to result */
dynstr_append_sorted(rs_sorted_save, &rs_unsorted, 1);
rs_output= rs_sorted_save;
dynstr_free(&rs_unsorted);
}
if (sp_created)
{
if (util_query(mysql, "DROP PROCEDURE mysqltest_tmp_sp "))
@@ -12277,7 +12219,6 @@ void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val)
dynstr_append_sorted()
ds string where the sorted output will be appended
ds_input string to be sorted
keep_header If header should not be sorted
*/
static int comp_lines(const void *a_, const void *b_)
@@ -12287,8 +12228,7 @@ static int comp_lines(const void *a_, const void *b_)
return (strcmp(*a,*b));
}
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
bool keep_header)
void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input)
{
unsigned i;
char *start= ds_input->str;
@@ -12300,15 +12240,6 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &lines, sizeof(const char*), 32, 32, MYF(0));
if (keep_header)
{
/* First line is result header, skip past it */
while (*start && *start != '\n')
start++;
start++; /* Skip past \n */
dynstr_append_mem(ds, ds_input->str, start - ds_input->str);
}
/* Insert line(s) in array */
while (*start)
{

View File

@@ -175,30 +175,40 @@ IF(UNIX)
# Default GCC flags
IF(CMAKE_COMPILER_IS_GNUCC)
SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized")
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_DEBUG " ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " ${COMMON_C_FLAGS}")
# MariaDB uses -O3 for release builds
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized")
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMMON_CXX_FLAGS}")
# MariaDB uses -O3 for release builds
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
ENDIF()
# IBM Z flags
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
IF(RPM MATCHES "(rhel|centos)6" OR RPM MATCHES "(suse|sles)11")
SET(z_flags "-funroll-loops -march=z9-109 -mtune=z10 ")
SET(z_flags "-funroll-loops -march=z9-109 -mtune=z10")
ELSEIF(RPM MATCHES "(rhel|centos)7" OR RPM MATCHES "(suse|sles)12")
SET(z_flags "-funroll-loops -march=z196 -mtune=zEC12 ")
SET(z_flags "-funroll-loops -march=z196 -mtune=zEC12")
ELSE()
SET(z_flags "")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${z_flags}${CMAKE_C_FLAGS_RELWITHDEBINFO}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " ${z_flags}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " ${z_flags}")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${z_flags}${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " ${z_flags}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${z_flags}")
ENDIF()
UNSET(z_flags)
ENDIF()
@@ -209,11 +219,13 @@ IF(UNIX)
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
SET(COMMON_C_FLAGS "+DSitanium2 -mt -AC99")
SET(COMMON_CXX_FLAGS "+DSitanium2 -mt -Aa")
SET(CMAKE_C_FLAGS_DEBUG "+O0 -g ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "+O0 -g ${COMMON_CXX_FLAGS}")
# We have seen compiler bugs with optimisation and -g, so disabled for now
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_DEBUG " +O0 -g ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " +O0 -g ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " +O0 -g ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " +O0 -g ${COMMON_CXX_FLAGS}")
# We have seen compiler bugs with optimisation and -g, so disabled for now
STRING(APPEND CMAKE_C_FLAGS_RELEASE " +O2 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " +O2 ${COMMON_CXX_FLAGS}")
ENDIF()
ENDIF()
SET(WITH_SSL no)
@@ -228,10 +240,18 @@ IF(UNIX)
SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -no-ftz -no-prefetch")
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -no-ftz -no-prefetch")
ENDIF()
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -unroll2 -ip ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_DEBUG " ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " -unroll2 -ip ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " -unroll2 -ip ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -unroll2 -ip ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -unroll2 -ip ${COMMON_CXX_FLAGS}")
# MariaDB uses -O3 for release builds.
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
SET(WITH_SSL no)
ENDIF()
ENDIF()
@@ -239,13 +259,21 @@ IF(UNIX)
# Default Clang flags
IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-parentheses-equality -Wno-string-plus-int")
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_DEBUG " ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " ${COMMON_C_FLAGS}")
# MariaDB uses -O3 for release builds.
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-parentheses-equality -Wno-string-plus-int")
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMMON_CXX_FLAGS}")
# MariaDB uses -O3 for release builds.
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
ENDIF()
# Solaris flags
@@ -258,27 +286,33 @@ IF(UNIX)
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
SET(COMMON_C_FLAGS "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
SET(COMMON_CXX_FLAGS "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic")
SET(CMAKE_C_FLAGS_DEBUG "-xO1 ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "-xO1 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_DEBUG " -xO1 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " -xO1 ${COMMON_CXX_FLAGS}")
IF(32BIT)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-xO2 ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO2 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " -xO2 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " -xO2 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -xO2 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -xO2 ${COMMON_CXX_FLAGS}")
ELSEIF(64BIT)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " -xO3 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " -xO3 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -xO3 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -xO3 ${COMMON_CXX_FLAGS}")
ENDIF()
ELSE()
ELSE()
# Assume !x86 is SPARC
SET(COMMON_C_FLAGS "-g -Xa -xstrconst -mt")
SET(COMMON_CXX_FLAGS "-g0 -noex -mt")
IF(32BIT)
SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -xarch=sparc")
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -xarch=sparc")
ENDIF()
SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-xO3 ${COMMON_CXX_FLAGS}")
STRING(APPEND COMMON_C_FLAGS " -xarch=sparc")
STRING(APPEND COMMON_CXX_FLAGS " -xarch=sparc")
ENDIF()
STRING(APPEND CMAKE_C_FLAGS_DEBUG " ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELEASE " -xO3 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " -xO3 ${COMMON_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -xO3 ${COMMON_C_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -xO3 ${COMMON_CXX_FLAGS}")
ENDIF()
ENDIF()
ENDIF()

View File

@@ -2,6 +2,8 @@ IF(RPM)
MESSAGE(STATUS "CPackRPM building with RPM configuration: ${RPM}")
INCLUDE(check_linker_flag)
SET(CPACK_GENERATOR "RPM")
SET(CPACK_RPM_PACKAGE_DEBUG 1)
SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
@@ -50,6 +52,19 @@ SET(CPACK_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
# The spec file depends on environment variables
SET(ENV{RPM_PACKAGE_NAME} ${CPACK_RPM_PACKAGE_NAME})
EXECUTE_PROCESS(COMMAND rpm --eval ${CPACK_RPM_PACKAGE_RELEASE} OUTPUT_VARIABLE RPM_PACKAGE_RELEASE_EXPANDED)
STRING(STRIP "${RPM_PACKAGE_RELEASE_EXPANDED}" RPM_PACKAGE_RELEASE_EXPANDED)
SET(ENV{RPM_PACKAGE_RELEASE} ${RPM_PACKAGE_RELEASE_EXPANDED})
SET(ENV{RPM_ARCH} ${CMAKE_SYSTEM_PROCESSOR})
SET(ENV{RPM_PACKAGE_VERSION} ${SERVER_VERSION})
MY_CHECK_AND_SET_LINKER_FLAG("-specs=/usr/lib/rpm/redhat/redhat-package-notes")
IF(HAVE_LINK_FLAG__specs_/usr/lib/rpm/redhat/redhat_package_notes)
SET(CMAKE_CXX_LINKER_LAUNCHER "env;RPM_PACKAGE_NAME=$ENV{RPM_PACKAGE_NAME};RPM_ARCH=$ENV{RPM_ARCH};RPM_PACKAGE_VERSION=$ENV{RPM_PACKAGE_VERSION};RPM_PACKAGE_RELEASE=$ENV{RPM_PACKAGE_RELEASE}")
SET(CMAKE_C_LINKER_LAUNCHER ${CMAKE_CXX_LINKER_LAUNCHER})
ENDIF()
SET(CPACK_RPM_shared_PACKAGE_VENDOR "MariaDB Corporation Ab")
SET(CPACK_RPM_shared_PACKAGE_LICENSE "LGPLv2.1")

View File

@@ -22,8 +22,8 @@ then
. /etc/default/mariadb
fi
MARIADB="/usr/bin/mariadb --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf"
MARIADB="/usr/bin/mariadb --defaults-extra-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mariadb-admin --defaults-extra-file=/etc/mysql/debian.cnf"
# Don't run full mariadb-upgrade on every server restart, use --version-check to do it only once
MYUPGRADE="/usr/bin/mariadb-upgrade --defaults-extra-file=/etc/mysql/debian.cnf --version-check --silent"
MYCHECK_SUBJECT="WARNING: mariadb-check has found corrupt tables"

View File

@@ -57,6 +57,12 @@ disable_libfmt()
sed '/libfmt-dev/d' -i debian/control
}
remove_package_notes()
{
# binutils >=2.39 + disto makefile /usr/share/debhelper/dh_package_notes/package-notes.mk
sed -e '/package.notes/d' -i debian/rules debian/control
}
architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)
uname_machine=$(uname -m)
@@ -94,6 +100,7 @@ in
;&
"bullseye")
add_lsb_base_depends
remove_package_notes
;&
"bookworm")
# mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools
@@ -114,6 +121,7 @@ in
;&
"jammy"|"kinetic")
add_lsb_base_depends
remove_package_notes
;&
"lunar"|"mantic")
if [[ ! "$architecture" =~ amd64|arm64|armhf|ppc64el|s390x ]]

1
debian/control vendored
View File

@@ -8,6 +8,7 @@ Build-Depends: bison,
debhelper (>= 11),
default-jdk,
dh-exec,
dh-package-notes,
flex [amd64],
gdb <!nocheck>,
libaio-dev [linux-any],

9
debian/rules vendored
View File

@@ -4,14 +4,15 @@
# https://wiki.debian.org/Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Disable LTO on Ubuntu, see LP: #1970634 and https://jira.mariadb.org/browse/MDEV-25633
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes)
export DEB_BUILD_MAINT_OPTIONS += optimize=-lto
endif
# LTO is generally enabled. Only ColumnStore doesn't support it (MCOL-5819)
# and disables it in storage/columnstore/CMakeLists.txt
DPKG_EXPORT_BUILDFLAGS = 1
# Include all defaults, including buildflags.mk
include /usr/share/dpkg/default.mk
# Include package notes in built executables
include /usr/share/debhelper/dh_package_notes/package-notes.mk
# CPPFLAGS are nor read by CMake, so copy them to CXXFLAGS
# See why at https://cmake.org/Bug/view.php?id=12928
# This is needed for e.g. all automatic Debian hardening flags to apply on all cmake builds.

View File

@@ -230,6 +230,7 @@ void encryption_plugin_prepare_init(int argc, char **argv)
char **new_argv = new char *[argc + 2];
new_argv[0] = XTRABACKUP_EXE;
memcpy(&new_argv[1], argv, argc*sizeof(char *));
new_argv[argc+1]= 0;
encryption_plugin_init(argc+1, new_argv);

View File

@@ -1225,7 +1225,8 @@ static void backup_file_op_fail(uint32_t space_id, int type,
static void backup_undo_trunc(uint32_t space_id)
{
undo_trunc_ids.insert(space_id);
if (space_id)
undo_trunc_ids.insert(space_id);
}
/* Function to store the space id of page0 INIT_PAGE
@@ -1331,9 +1332,7 @@ enum options_xtrabackup
OPT_INNODB_BUFFER_POOL_FILENAME,
OPT_INNODB_LOCK_WAIT_TIMEOUT,
OPT_INNODB_LOG_BUFFER_SIZE,
#ifdef HAVE_INNODB_MMAP
OPT_INNODB_LOG_FILE_MMAP,
#endif
#if defined __linux__ || defined _WIN32
OPT_INNODB_LOG_FILE_BUFFERING,
#endif
@@ -1897,13 +1896,11 @@ struct my_option xb_server_options[] =
(G_PTR*) &log_sys.buf_size, (G_PTR*) &log_sys.buf_size, 0,
GET_UINT, REQUIRED_ARG, 2U << 20,
2U << 20, log_sys.buf_size_max, 0, 4096, 0},
#ifdef HAVE_INNODB_MMAP
{"innodb_log_file_mmap", OPT_INNODB_LOG_FILE_SIZE,
"Whether ib_logfile0 should be memory-mapped",
(G_PTR*) &log_sys.log_mmap,
(G_PTR*) &log_sys.log_mmap, 0, GET_BOOL, NO_ARG,
log_sys.log_mmap_default, 0, 0, 0, 0, 0},
#endif
#if defined __linux__ || defined _WIN32
{"innodb_log_file_buffering", OPT_INNODB_LOG_FILE_BUFFERING,
"Whether the file system cache for ib_logfile0 is enabled during --backup",
@@ -3391,7 +3388,6 @@ skip:
return(FALSE);
}
#ifdef HAVE_INNODB_MMAP
static int
xtrabackup_copy_mmap_snippet(ds_file_t *ds, const byte *start, const byte *end)
{
@@ -3430,7 +3426,7 @@ static bool xtrabackup_copy_mmap_logfile()
/* Set the sequence bit (the backed-up log will not wrap around) */
size_t seqo= recv_sys.offset - seq_offset;
if (seqo < log_sys.START_OFFSET)
seqo+= log_sys.file_size - log_sys.START_OFFSET;
seqo+= static_cast<size_t>(log_sys.file_size - log_sys.START_OFFSET);
const byte *seq= &log_sys.buf[seqo];
ut_ad(*seq == log_sys.get_sequence_bit(recv_sys.lsn - seq_offset));
if (!*seq)
@@ -3491,7 +3487,6 @@ static bool xtrabackup_copy_mmap_logfile()
msg(">> log scanned up to (" LSN_PF ")", recv_sys.lsn);
return false;
}
#endif
/** Copy redo log until the current end of the log is reached
@return whether the operation failed */
@@ -3503,10 +3498,9 @@ static bool xtrabackup_copy_logfile()
ut_a(dst_log_file);
ut_ad(recv_sys.is_initialised());
#ifdef HAVE_INNODB_MMAP
if (log_sys.is_mmap())
return xtrabackup_copy_mmap_logfile();
#endif
const size_t sequence_offset{log_sys.is_encrypted() ? 8U + 5U : 5U};
const size_t block_size_1{log_sys.write_size - 1};

View File

@@ -134,6 +134,9 @@ if(MSVC)
if(CMAKE_C_COMPILER_ID MATCHES Clang)
target_compile_options(wolfssl PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-incompatible-function-pointer-types>)
endif()
remove_definitions(-DHAVE_CONFIG_H)
target_compile_definitions(wolfssl PRIVATE
WOLFSSL_HAVE_MIN WOLFSSL_HAVE_MAX)
endif()
set_property(TARGET wolfssl PROPERTY POSITION_INDEPENDENT_CODE ON)

View File

@@ -3,7 +3,21 @@
#define HAVE_CRL
#define WOLFSSL_HAVE_ERROR_QUEUE
/*
Workaround bug in 5.7.6
WOLFSSL_MYSQL_COMPATIBLE breaks building wolfssl
But it is needed to avoid redefinition of protocol_version
when its public header ssl.h is included
*/
#ifndef BUILDING_WOLFSSL
#define WOLFSSL_MYSQL_COMPATIBLE
#endif
#define SP_INT_BITS 8192
#define HAVE_EMPTY_AGGREGATES 0
#define HAVE_ECC
#define ECC_TIMING_RESISTANT
#define HAVE_HASHDRBG
@@ -24,7 +38,8 @@
#define HAVE_THREAD_LS
#define WOLFSSL_AES_COUNTER
#define NO_WOLFSSL_STUB
#define OPENSSL_ALL
// #define OPENSSL_ALL
#define OPENSSL_EXTRA
#define WOLFSSL_ALLOW_TLSV10
#define NO_OLD_TIMEVAL_NAME
#define HAVE_SECURE_RENEGOTIATION

View File

@@ -94,20 +94,13 @@ static inline void MY_RELAX_CPU(void)
__asm__ __volatile__ ("pause");
#endif
#elif defined(_ARCH_PWR8)
#ifdef __FreeBSD__
uint64_t __tb;
__asm__ volatile ("mfspr %0, 268" : "=r" (__tb));
#else
/* Changed from __ppc_get_timebase for musl compatibility */
/* Changed from __ppc_get_timebase for musl and clang compatibility */
__builtin_ppc_get_timebase();
#endif
#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
#elif defined __GNUC__ && defined __riscv
__builtin_riscv_pause();
#elif defined __GNUC__
/* Mainly, prevent the compiler from optimizing away delay loops */
__asm__ __volatile__ ("":::"memory");
#else
int32 var, oldval = 0;
my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,
MY_MEMORY_ORDER_RELAXED);
#endif
}

View File

@@ -616,6 +616,13 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr;
#endif
typedef uint64 my_thread_id;
/**
Long-standing formats (such as the client-server protocol and the binary log)
hard-coded `my_thread_id` to 32 bits in practice. (Though not all
`thread_id`s are typed as such, @ref my_thread_id itself among those.)
@see MDEV-35706
*/
#define MY_THREAD_ID_MAX UINT32_MAX
extern void my_threadattr_global_init(void);
extern my_bool my_thread_global_init(void);

View File

@@ -1145,8 +1145,8 @@ extern my_bool init_compiled_charsets(myf flags);
extern void add_compiled_collation(struct charset_info_st *cs);
extern void add_compiled_extra_collation(struct charset_info_st *cs);
extern my_bool add_alias_for_collation(LEX_CSTRING *collation_name,
LEX_CSTRING *alias,
uint alias_id);
uint collation_id,
LEX_CSTRING *alias, uint alias_id);
extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,

View File

@@ -50,7 +50,8 @@ class THD;
class Item;
#define MYSQL_THD THD*
#else
#define MYSQL_THD void*
struct THD;
typedef struct THD* MYSQL_THD;
#endif
typedef char my_bool;

View File

@@ -1018,7 +1018,7 @@ inline_mysql_file_create(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int create_flags, int access_flags, myf myFlags)
const char *filename, mode_t create_flags, int access_flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
@@ -1344,7 +1344,7 @@ inline_mysql_file_create_with_symlink(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *linkname, const char *filename, int create_flags,
const char *linkname, const char *filename, mode_t create_flags,
int access_flags, myf flags)
{
File file;

View File

@@ -351,7 +351,11 @@ extern void (*debug_sync_C_callback_ptr)(MYSQL_THD, const char *, size_t);
#endif /* defined(ENABLED_DEBUG_SYNC) */
/* compatibility macro */
#ifdef __cplusplus
#define DEBUG_SYNC_C(name) DEBUG_SYNC(nullptr, name)
#else
#define DEBUG_SYNC_C(name) DEBUG_SYNC(NULL, name)
#endif
#ifdef __cplusplus
}

View File

@@ -32,6 +32,11 @@ public:
{
}
template <typename F>
scope_exit(F &&f, bool engaged) : function_(std::forward<F>(f)), engaged_(engaged)
{
}
scope_exit(scope_exit &&rhs)
: function_(std::move(rhs.function_)), engaged_(rhs.engaged_)
{
@@ -43,6 +48,7 @@ public:
scope_exit &operator=(const scope_exit &)= delete;
void release() { engaged_= false; }
void engage() { assert(!engaged_); engaged_= true; }
~scope_exit()
{
@@ -58,17 +64,103 @@ private:
} // end namespace detail
template <typename Callable>
detail::scope_exit<typename std::decay<Callable>::type>
make_scope_exit(Callable &&f)
inline
::detail::scope_exit<typename std::decay<Callable>::type>
make_scope_exit(Callable &&f, bool engaged= true)
{
return detail::scope_exit<typename std::decay<Callable>::type>(
std::forward<Callable>(f));
return ::detail::scope_exit<typename std::decay<Callable>::type>(
std::forward<Callable>(f), engaged);
}
#define CONCAT_IMPL(x, y) x##y
#define CONCAT(x, y) CONCAT_IMPL(x, y)
#define ANONYMOUS_VARIABLE CONCAT(_anonymous_variable, __LINE__)
#define SCOPE_EXIT auto ANONYMOUS_VARIABLE= make_scope_exit
#define IF_CLASS(C) typename std::enable_if<std::is_class<C>::value>::type
#define IF_NOT_CLASS(C) typename std::enable_if<!std::is_class<C>::value>::type
namespace detail
{
template <typename T>
class Scope_value
{
public:
// Use SFINAE for passing structs by reference and plain types by value.
// This ctor is defined only if T is a class or struct:
template <typename U = T, typename = IF_CLASS(U)>
Scope_value(T &variable, const T &scope_value)
: variable_(&variable), saved_value_(variable)
{
variable= scope_value;
}
// This ctor is defined only if T is NOT a class or struct:
template <typename U = T, typename = IF_NOT_CLASS(U)>
Scope_value(T &variable, const T scope_value)
: variable_(&variable), saved_value_(variable)
{
variable= scope_value;
}
Scope_value(Scope_value &&rhs)
: variable_(rhs.variable_), saved_value_(rhs.saved_value_)
{
rhs.variable_= NULL;
}
Scope_value(const Scope_value &)= delete;
Scope_value &operator=(const Scope_value &)= delete;
Scope_value &operator=(Scope_value &&)= delete;
~Scope_value()
{
if (variable_)
*variable_= saved_value_;
}
private:
T *variable_;
T saved_value_;
};
} // namespace detail
// Use like this:
// auto _= make_scope_value(var, tmp_value);
template <typename T, typename = IF_CLASS(T)>
inline
::detail::Scope_value<T> make_scope_value(T &variable, const T &scope_value)
{
return ::detail::Scope_value<T>(variable, scope_value);
}
template <typename T, typename = IF_NOT_CLASS(T)>
inline
::detail::Scope_value<T> make_scope_value(T &variable, T scope_value)
{
return ::detail::Scope_value<T>(variable, scope_value);
}
/*
Note: perfect forwarding version can not pass const:
template <typename T, typename U>
inline
detail::Scope_value<T> make_scope_value(T &variable, U &&scope_value)
{
return detail::Scope_value<T>(variable, std::forward<U>(scope_value));
}
as `const U &&` fails with error `expects an rvalue for 2nd argument`. That
happens because const U && is treated as rvalue only (this is the exact syntax
for declaring rvalues).
*/
#define SCOPE_VALUE auto ANONYMOUS_VARIABLE= make_scope_value
#define SCOPE_SET(VAR, MASK) auto ANONYMOUS_VARIABLE= make_scope_value(VAR, VAR | MASK)
#define SCOPE_CLEAR(VAR, MASK) auto ANONYMOUS_VARIABLE= make_scope_value(VAR, VAR & ~MASK)

View File

@@ -43,9 +43,9 @@
#define VERSION_thd_wait 0x0100
#define VERSION_wsrep 0x0500
#define VERSION_json 0x0100
#define VERSION_sql_service 0x0102
#define VERSION_thd_mdl 0x0100
#define VERSION_print_check_msg 0x0100
#define VERSION_sql_service 0x0102
#define VERSION_provider_bzip2 0x0100
#define VERSION_provider_lz4 0x0100

View File

@@ -0,0 +1,26 @@
--eval CREATE TABLE t1 (a CHAR(8) DEFAULT REVERSE('aha')) $table_charset
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
--eval CREATE TABLE t2 (a CHAR(8) DEFAULT REVERSE('åäá')) $table_charset
SHOW CREATE TABLE t2;
INSERT INTO t2 VALUES ();
SELECT * FROM t2;
--eval CREATE TABLE t3 (a CHAR(8) DEFAULT REVERSE('😎😀')) $table_charset
SHOW CREATE TABLE t3;
INSERT INTO t3 VALUES ();
SELECT * FROM t3;
--eval CREATE TABLE t4 (a CHAR(8), b CHAR(8) AS (REVERSE('😎😀'))) $table_charset
SHOW CREATE TABLE t4;
INSERT INTO t4 (a) VALUES ('');
SELECT * FROM t4;
--eval CREATE TABLE t5 (a CHAR(8), b CHAR(8) CHECK (b=BINARY REVERSE('😎😀'))) $table_charset
SHOW CREATE TABLE t5;
--error ER_CONSTRAINT_FAILED
INSERT INTO t5 VALUES ('','😎😀');
INSERT INTO t5 VALUES ('','😀😎');
SELECT * FROM t5;

View File

@@ -1,9 +1,16 @@
--disable_query_log
--let $galera_variables_ok = `SELECT COUNT(*) = 51 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
let $_galera_variables_delta=$galera_variables_delta;
if (!$_galera_variables_delta) {
--let $galera_variables_delta=0
}
--if (!$galera_variables_ok) {
--skip Galera number of variables has changed!
--let $galera_variables_expected=`SELECT 51 + $galera_variables_delta`
--let $galera_variables_count=`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
--if ($galera_variables_count != $galera_variables_expected) {
--skip Galera number of variables has changed! ($galera_variables_count instead of $galera_variables_expected)
}
--enable_query_log

View File

@@ -1,9 +1,5 @@
--disable_query_log
# Now the number of variables for the release and debug versions
# of the library is equal to each other...
--let $galera_variables_delta=0
--let $galera_variables_ok = `SELECT COUNT(*) = 51 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep%'`
--if (!$galera_variables_ok) {
--skip Galera number of variables has changed!
}
--enable_query_log
--source include/galera_variables_ok.inc

View File

@@ -31,6 +31,7 @@ BEGIN
WHERE variable_name NOT IN ('timestamp')
AND variable_name not like "Last_IO_Err*"
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
AND variable_name != 'INNODB_LOG_FILE_BUFFERING'
AND variable_name != 'INNODB_USE_NATIVE_AIO'
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
AND variable_name not like 'GTID%POS'

View File

@@ -152,6 +152,24 @@ void handle_signal (int signal)
}
}
/**
Sets the append flag (FILE_APPEND_DATA) so that the handle inherited by the
child process will be in append mode.
Workaround for perl bug https://github.com/Perl/perl5/issues/17570
*/
static void fix_file_append_flag_inheritance(DWORD std_handle)
{
HANDLE old_handle = GetStdHandle(std_handle);
HANDLE new_handle = ReOpenFile(old_handle, FILE_APPEND_DATA,
FILE_SHARE_WRITE | FILE_SHARE_READ, 0);
if (new_handle != INVALID_HANDLE_VALUE)
{
SetHandleInformation(new_handle, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
SetStdHandle(std_handle, new_handle);
CloseHandle(old_handle);
}
}
int main(int argc, const char** argv )
{
@@ -270,6 +288,9 @@ int main(int argc, const char** argv )
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX
| SEM_NOOPENFILEERRORBOX);
fix_file_append_flag_inheritance(STD_OUTPUT_HANDLE);
fix_file_append_flag_inheritance(STD_ERROR_HANDLE);
#if 0
/* Setup stdin, stdout and stderr redirect */
si.dwFlags= STARTF_USESTDHANDLES;

View File

@@ -3075,8 +3075,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`altcol1` blob DEFAULT '',
KEY `altcol1` (`altcol1`(2300)),
KEY `h` (`altcol1`(2300))
KEY `altcol1` (`altcol1`(2300))
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
show create table t2;
Table Create Table

View File

@@ -266,7 +266,7 @@ send alter table t1 add b int NULL, algorithm= copy, lock= none;
--connection con2
evalp set @con= $con;
let $wait_condition= select stage = 4 and progress = 100
let $wait_condition= select stage = 4
and state= "Waiting for table metadata lock"
from information_schema.processlist where id = @con;
--source include/wait_condition.inc

View File

@@ -579,3 +579,23 @@ a
# This statement should work, since last statement committed.
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
#
# MDEV-35335 implicit commit at START TRANSACTION doesn't reset characteristics
#
create table t1 (a int) engine=innodb;
insert t1 values (1);
start transaction;
set session transaction isolation level serializable;
start transaction;
select * from t1;
a
1
connect con1,localhost,root;
set session innodb_lock_wait_timeout=0;
update t1 set a=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
disconnect con1;
connection default;
rollback;
drop table t1;
# End of 10.6 tests

View File

@@ -677,3 +677,23 @@ SELECT * FROM t1;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
--echo #
--echo # MDEV-35335 implicit commit at START TRANSACTION doesn't reset characteristics
--echo #
create table t1 (a int) engine=innodb;
insert t1 values (1);
start transaction;
set session transaction isolation level serializable;
start transaction;
select * from t1;
connect con1,localhost,root;
set session innodb_lock_wait_timeout=0;
--error ER_LOCK_WAIT_TIMEOUT
update t1 set a=2;
disconnect con1;
connection default;
rollback;
drop table t1;
--echo # End of 10.6 tests

View File

@@ -2070,3 +2070,62 @@ SHOW CREATE DATABASE `#testone#■■■■■■■■■■■■■■■■
ERROR 42000: Incorrect database name '#testone#■■■■■■■■■■■■■■■■■■■■■■■■■■■■■...'
SET NAMES DEFAULT;
# End of 10.5 Test
#
# MDEV-35318 Assertion `tl->jtbm_subselect' failed in JOIN::calc_allowed_top_level_tables on 2nd execution of PS
#
CREATE TABLE t (a INT);
INSERT INTO t VALUES (1),(2);
PREPARE stmt FROM 'CREATE TABLE tmp AS SELECT * FROM (select t1.* from t t1 join t t2 on(t1.a = t2.a)) sq WHERE "x"=0';
EXECUTE stmt;
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
EXECUTE stmt;
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
DEALLOCATE PREPARE stmt;
# Now, run the same in SP:
create procedure sp1()
begin
declare i int unsigned default 1;
declare continue handler for SQLEXCEPTION
begin
select 'In Continue handler' as printf;
end;
while i <= 3 do
begin
select concat('Iteration ', i) as printf;
CREATE temporary TABLE tmp AS
SELECT * FROM (select t1.* from t t1 join t t2 on(t1.a = t2.a)) sq WHERE "x"=0 ;
drop temporary table if exists tmp;
set i=i+1;
end;
end while;
end|
call sp1();
printf
Iteration 1
printf
In Continue handler
printf
Iteration 2
printf
In Continue handler
printf
Iteration 3
printf
In Continue handler
Warnings:
Note 1051 Unknown table 'test.tmp'
DROP PROCEDURE sp1;
DROP TABLE t;
#
# MDEV-36057: Assertion failure or unexpected outcome upon 2nd execution
# of parameterized PS (continues the above)
#
CREATE TABLE t (a INT);
INSERT INTO t VALUES (1),(2);
PREPARE stmt FROM 'UPDATE t SET a = 3 WHERE a IN (SELECT "" UNION SELECT ?)';
EXECUTE stmt USING 4;
ERROR 22007: Truncated incorrect DECIMAL value: ''
EXECUTE stmt USING 4;
ERROR 22007: Truncated incorrect DECIMAL value: ''
DROP TABLE t;
# End of 11.7 Test

View File

@@ -1945,3 +1945,60 @@ SHOW CREATE DATABASE `#testone#■■■■■■■■■■■■■■■■
SET NAMES DEFAULT;
--echo # End of 10.5 Test
--echo #
--echo # MDEV-35318 Assertion `tl->jtbm_subselect' failed in JOIN::calc_allowed_top_level_tables on 2nd execution of PS
--echo #
CREATE TABLE t (a INT);
INSERT INTO t VALUES (1),(2); # Optional, fails either way
PREPARE stmt FROM 'CREATE TABLE tmp AS SELECT * FROM (select t1.* from t t1 join t t2 on(t1.a = t2.a)) sq WHERE "x"=0';
--error ER_TRUNCATED_WRONG_VALUE
EXECUTE stmt;
--error ER_TRUNCATED_WRONG_VALUE
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
--echo # Now, run the same in SP:
delimiter |;
create procedure sp1()
begin
declare i int unsigned default 1;
declare continue handler for SQLEXCEPTION
begin
select 'In Continue handler' as printf;
end;
while i <= 3 do
begin
select concat('Iteration ', i) as printf;
CREATE temporary TABLE tmp AS
SELECT * FROM (select t1.* from t t1 join t t2 on(t1.a = t2.a)) sq WHERE "x"=0 ;
drop temporary table if exists tmp;
set i=i+1;
end;
end while;
end|
delimiter ;|
call sp1();
DROP PROCEDURE sp1;
DROP TABLE t;
--echo #
--echo # MDEV-36057: Assertion failure or unexpected outcome upon 2nd execution
--echo # of parameterized PS (continues the above)
--echo #
CREATE TABLE t (a INT);
INSERT INTO t VALUES (1),(2);
PREPARE stmt FROM 'UPDATE t SET a = 3 WHERE a IN (SELECT "" UNION SELECT ?)';
--error ER_TRUNCATED_WRONG_VALUE
EXECUTE stmt USING 4;
--error ER_TRUNCATED_WRONG_VALUE
EXECUTE stmt USING 4;
DROP TABLE t;
--echo # End of 11.7 Test

View File

@@ -5633,5 +5633,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid big5 character string: '\xA3\xC0'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_big5'' collate big5_chinese_nopad_ci, _big5 0x0001050001) as c1;
c1
-1
select strcmp(_big5'' collate big5_nopad_bin, _big5 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -291,6 +291,13 @@ SET NAMES big5;
SET @seq=_big5 0xA3C0;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_big5'' collate big5_chinese_nopad_ci, _big5 0x0001050001) as c1;
select strcmp(_big5'' collate big5_nopad_bin, _big5 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -928,5 +928,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid cp932 character string: '\x81'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_cp932'' collate cp932_japanese_nopad_ci, _cp932 0x0001050001) as c1;
c1
-1
select strcmp(_cp932'' collate cp932_nopad_bin, _cp932 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -70,6 +70,13 @@ SET NAMES cp932;
SET @seq=_cp932 0x81AD;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_cp932'' collate cp932_japanese_nopad_ci, _cp932 0x0001050001) as c1;
select strcmp(_cp932'' collate cp932_nopad_bin, _cp932 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -34822,5 +34822,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid eucjpms character string: '\x8F\xA1\xA1'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_eucjpms'' collate eucjpms_japanese_nopad_ci, _eucjpms 0x0001050001) as c1;
c1
-1
select strcmp(_eucjpms'' collate eucjpms_nopad_bin, _eucjpms 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -620,6 +620,13 @@ SET NAMES eucjpms;
SET @seq=_eucjpms 0x8FA1A1;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_eucjpms'' collate eucjpms_japanese_nopad_ci, _eucjpms 0x0001050001) as c1;
select strcmp(_eucjpms'' collate eucjpms_nopad_bin, _eucjpms 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -26335,5 +26335,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid euckr character string: '\xA2\xE8'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_euckr'' collate euckr_korean_nopad_ci, _euckr 0x0001050001) as c1;
c1
-1
select strcmp(_euckr'' collate euckr_nopad_bin, _euckr 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -250,6 +250,13 @@ SET NAMES euckr;
SET @seq=_euckr 0xA2E8;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_euckr'' collate euckr_korean_nopad_ci, _euckr 0x0001050001) as c1;
select strcmp(_euckr'' collate euckr_nopad_bin, _euckr 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -5323,5 +5323,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid gb2312 character string: '\xA2\xA1'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_gb2312'' collate gb2312_chinese_nopad_ci, _gb2312 0x0001050001) as c1;
c1
-1
select strcmp(_gb2312'' collate gb2312_nopad_bin, _gb2312 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -200,6 +200,13 @@ SET NAMES gb2312;
SET @seq=_gb2312 0xA2A1;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_gb2312'' collate gb2312_chinese_nopad_ci, _gb2312 0x0001050001) as c1;
select strcmp(_gb2312'' collate gb2312_nopad_bin, _gb2312 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -6793,5 +6793,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid gbk character string: '\xAA\xA1'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_gbk'' collate gbk_chinese_nopad_ci, _gbk 0x0001050001);
strcmp(_gbk'' collate gbk_chinese_nopad_ci, _gbk 0x0001050001)
-1
select strcmp(_gbk'' collate gbk_nopad_bin, _gbk 0x0001050001);
strcmp(_gbk'' collate gbk_nopad_bin, _gbk 0x0001050001)
-1
#
# End of 10.5 tests
#

View File

@@ -503,6 +503,13 @@ SET NAMES gbk;
SET @seq=_gbk 0xAAA1;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_gbk'' collate gbk_chinese_nopad_ci, _gbk 0x0001050001);
select strcmp(_gbk'' collate gbk_nopad_bin, _gbk 0x0001050001);
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -19659,5 +19659,14 @@ EXECUTE IMMEDIATE CONCAT('a.', @seq, ':=1');
ERROR HY000: Invalid sjis character string: '<27>_x81'
SET sql_mode=DEFAULT;
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_sjis'' collate sjis_japanese_nopad_ci, _sjis 0x0001050001) as c1;
c1
-1
select strcmp(_sjis'' collate sjis_nopad_bin, _sjis 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -328,6 +328,13 @@ SET NAMES sjis;
SET @seq=_sjis 0x81AD;
--source include/ctype_ident_sys.inc
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_sjis'' collate sjis_japanese_nopad_ci, _sjis 0x0001050001) as c1;
select strcmp(_sjis'' collate sjis_nopad_bin, _sjis 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -0,0 +1,23 @@
# Start of 10.5 tests
#
# MDEV-28328 Assertion failures in btr0cur.cc upon INSERT or in row0sel.cc afterwards
#
SET NAMES utf8mb3;
CREATE TABLE t (
a year(4) DEFAULT NULL,
b varbinary(2545) DEFAULT '',
c mediumtext COLLATE sjis_japanese_nopad_ci NOT NULL,
d decimal(7,7) DEFAULT NULL,
e char(219) COLLATE sjis_japanese_nopad_ci DEFAULT '',
f bigint(25) DEFAULT 0,
g bigint(20) DEFAULT NULL,
h datetime(1) DEFAULT '1900-01-01 00:00:00.0',
PRIMARY KEY (c(25),e)
) ENGINE=InnoDB DEFAULT CHARSET=sjis COLLATE=sjis_japanese_nopad_ci;
INSERT IGNORE INTO t VALUES ... a mixture of non-ASCII and binary content
SELECT * FROM t /*output suppressed, just make sure it does not crash*/;
CHECK TABLE t;
Table Op Msg_type Msg_text
test.t check status OK
DROP TABLE t;
# End of 10.5 tests

File diff suppressed because one or more lines are too long

View File

@@ -6794,6 +6794,15 @@ SELECT CAST(CONVERT('-9223372036854775808' USING ucs2) AS SIGNED) AS c1;
c1
-9223372036854775808
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_ucs2'' collate ucs2_general_nopad_ci, _ucs2 0x00000001000500000001) as c1;
c1
-1
select strcmp(_ucs2'' collate ucs2_nopad_bin, _ucs2 0x00000001000500000001) as c1;
c1
-1
#
# End of 10.5 tests
#
#

View File

@@ -1239,6 +1239,13 @@ DROP TABLE t1;
SELECT CAST(CONVERT('-9223372036854775808' USING ucs2) AS SIGNED) AS c1;
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_ucs2'' collate ucs2_general_nopad_ci, _ucs2 0x00000001000500000001) as c1;
select strcmp(_ucs2'' collate ucs2_nopad_bin, _ucs2 0x00000001000500000001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -27086,3 +27086,18 @@ SET DEFAULT_STORAGE_ENGINE=Default;
#
# End of 10.2 tests
#
#
# Start of 10.5 tests
#
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_ujis'' collate ujis_japanese_nopad_ci, _ujis 0x0001050001) as c1;
c1
-1
select strcmp(_ujis'' collate ujis_nopad_bin, _ujis 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#

View File

@@ -1446,3 +1446,18 @@ let $coll_pad='ujis_bin';
--echo #
--echo # End of 10.2 tests
--echo #
--echo #
--echo # Start of 10.5 tests
--echo #
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_ujis'' collate ujis_japanese_nopad_ci, _ujis 0x0001050001) as c1;
select strcmp(_ujis'' collate ujis_nopad_bin, _ujis 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests
--echo #

View File

@@ -3263,22 +3263,80 @@ DATE_FORMAT(TIME'11:22:33',@format)
SELECT HEX(DATE_FORMAT(TIME'11:22:33',@format));
HEX(DATE_FORMAT(TIME'11:22:33',@format))
31313F3232
#
# End of 10.4 tests
#
#
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
#
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
c1
-9223372036854775808
#
# MDEV-29968 Functions in default values in tables with some character sets break SHOW CREATE (and mysqldump)
#
SET NAMES utf8mb4;
CREATE TABLE t1 (a CHAR(8) DEFAULT REVERSE('aha')) CHARACTER SET utf32;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(8) DEFAULT reverse('aha')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
a
aha
CREATE TABLE t2 (a CHAR(8) DEFAULT REVERSE('åäá')) CHARACTER SET utf32;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(8) DEFAULT reverse('åäá')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t2 VALUES ();
SELECT * FROM t2;
a
áäå
CREATE TABLE t3 (a CHAR(8) DEFAULT REVERSE('😎😀')) CHARACTER SET utf32;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` char(8) DEFAULT reverse('😎😀')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t3 VALUES ();
SELECT * FROM t3;
a
😀😎
CREATE TABLE t4 (a CHAR(8), b CHAR(8) AS (REVERSE('😎😀'))) CHARACTER SET utf32;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` char(8) DEFAULT NULL,
`b` char(8) GENERATED ALWAYS AS (reverse('😎😀')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t4 (a) VALUES ('');
SELECT * FROM t4;
a b
😀😎
CREATE TABLE t5 (a CHAR(8), b CHAR(8) CHECK (b=BINARY REVERSE('😎😀'))) CHARACTER SET utf32;
SHOW CREATE TABLE t5;
Table Create Table
t5 CREATE TABLE `t5` (
`a` char(8) DEFAULT NULL,
`b` char(8) DEFAULT NULL CHECK (`b` = cast(reverse('😎😀') as char charset binary))
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t5 VALUES ('','😎😀');
ERROR 23000: CONSTRAINT `t5.b` failed for `test`.`t5`
INSERT INTO t5 VALUES ('','😀😎');
SELECT * FROM t5;
a b
😀😎
DROP TABLE t1, t2, t3, t4, t5;
#
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
#
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
c1
-9223372036854775808
# End of 10.5 tests
#
#
# Start of 10.11 tests
#
#
# MDEV-10865 COLLATE keyword doesn't work in PREPARE query
#
#
@@ -3357,28 +3415,12 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
SET NAMES utf8mb4;
#
# End of 10.11 tests
#
#
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
#
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
c1
-9223372036854775808
#
# End of 10.5 tests
#
#
# Start of 11.4 tests
#
#
# MDEV-33729 UBSAN negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoll_mb2_or_mb4
#
SET NAMES utf8mb3, character_set_connection=utf32;
SELECT CONV('-AzL8n0Y58m8', -62, -10);
CONV('-AzL8n0Y58m8', -62, -10)
-9223372036854775808
#
# End of 11.4 tests
#

View File

@@ -1159,9 +1159,7 @@ SELECT DATE_FORMAT(TIME'11:22:33',@format);
SELECT HEX(DATE_FORMAT(TIME'11:22:33',@format));
--enable_view_protocol
--echo #
--echo # End of 10.4 tests
--echo #
--echo #
--echo # MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
@@ -1170,13 +1168,22 @@ SELECT HEX(DATE_FORMAT(TIME'11:22:33',@format));
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
--echo #
--echo # End of 10.5 tests
--echo # MDEV-29968 Functions in default values in tables with some character sets break SHOW CREATE (and mysqldump)
--echo #
SET NAMES utf8mb4;
--let $table_charset=CHARACTER SET utf32
--source include/ctype_supplementary_chars.inc
DROP TABLE t1, t2, t3, t4, t5;
--echo #
--echo # Start of 10.11 tests
--echo # MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
--echo #
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
--echo # End of 10.5 tests
--echo #
--echo # MDEV-10865 COLLATE keyword doesn't work in PREPARE query
--echo #
@@ -1245,27 +1252,10 @@ DROP TABLE t1;
SET NAMES utf8mb4;
--echo #
--echo # End of 10.11 tests
--echo #
--enable_service_connection
--echo #
--echo # MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
--echo #
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
--echo #
--echo # End of 10.5 tests
--echo #
--echo #
--echo # Start of 11.4 tests
--echo #
--echo #
--echo # MDEV-33729 UBSAN negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoll_mb2_or_mb4
--echo #
@@ -1273,6 +1263,4 @@ SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
SET NAMES utf8mb3, character_set_connection=utf32;
SELECT CONV('-AzL8n0Y58m8', -62, -10);
--echo #
--echo # End of 11.4 tests
--echo #

View File

@@ -0,0 +1,106 @@
# Start of 10.5 tests
#
# MDEV-29968 Functions in default values in tables with some character sets break SHOW CREATE (and mysqldump)
#
SET NAMES utf8mb4;
CREATE TABLE t1 (a CHAR(8) DEFAULT REVERSE('aha')) CHARACTER SET utf32;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(8) DEFAULT reverse('aha')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
a
aha
CREATE TABLE t2 (a CHAR(8) DEFAULT REVERSE('åäá')) CHARACTER SET utf32;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(8) DEFAULT reverse('åäá')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t2 VALUES ();
SELECT * FROM t2;
a
áäå
CREATE TABLE t3 (a CHAR(8) DEFAULT REVERSE('😎😀')) CHARACTER SET utf32;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` char(8) DEFAULT reverse('😎😀')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t3 VALUES ();
SELECT * FROM t3;
a
😀😎
CREATE TABLE t4 (a CHAR(8), b CHAR(8) AS (REVERSE('😎😀'))) CHARACTER SET utf32;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` char(8) DEFAULT NULL,
`b` char(8) GENERATED ALWAYS AS (reverse('😎😀')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t4 (a) VALUES ('');
SELECT * FROM t4;
a b
😀😎
CREATE TABLE t5 (a CHAR(8), b CHAR(8) CHECK (b=BINARY REVERSE('😎😀'))) CHARACTER SET utf32;
SHOW CREATE TABLE t5;
Table Create Table
t5 CREATE TABLE `t5` (
`a` char(8) DEFAULT NULL,
`b` char(8) DEFAULT NULL CHECK (`b` = cast(reverse('😎😀') as char charset binary))
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
INSERT INTO t5 VALUES ('','😎😀');
ERROR 23000: CONSTRAINT `t5.b` failed for `test`.`t5`
INSERT INTO t5 VALUES ('','😀😎');
SELECT * FROM t5;
a b
😀😎
# Running dump
DROP TABLE t1, t2, t3, t4, t5;
# Running restore
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(8) DEFAULT reverse('aha')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
SELECT * FROM t1;
a
aha
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(8) DEFAULT reverse('åäá')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
SELECT * FROM t2;
a
áäå
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` char(8) DEFAULT reverse('😎😀')
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
SELECT * FROM t3;
a
😀😎
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` char(8) DEFAULT NULL,
`b` char(8) GENERATED ALWAYS AS (reverse('😎😀')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
SELECT * FROM t4;
a b
😀😎
SHOW CREATE TABLE t5;
Table Create Table
t5 CREATE TABLE `t5` (
`a` char(8) DEFAULT NULL,
`b` char(8) DEFAULT NULL CHECK (`b` = cast(reverse('😎😀') as char charset binary))
) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_uca1400_ai_ci
SELECT * FROM t5;
a b
😀😎
DROP TABLE t1, t2, t3, t4, t5;
# End of 10.5 tests

View File

@@ -0,0 +1,38 @@
# Embedded server doesn't support external clients
--source include/not_embedded.inc
--echo # Start of 10.5 tests
--echo #
--echo # MDEV-29968 Functions in default values in tables with some character sets break SHOW CREATE (and mysqldump)
--echo #
SET NAMES utf8mb4;
--let $table_charset=CHARACTER SET utf32
--source include/ctype_supplementary_chars.inc
--echo # Running dump
--let $mysqldumpfile = $MYSQLTEST_VARDIR/tmp/ctype_utf32_not_embedded_dump.sql
--exec $MYSQL_DUMP test > $mysqldumpfile
DROP TABLE t1, t2, t3, t4, t5;
--echo # Running restore
--exec $MYSQL test < $mysqldumpfile
SHOW CREATE TABLE t1;
SELECT * FROM t1;
SHOW CREATE TABLE t2;
SELECT * FROM t2;
SHOW CREATE TABLE t3;
SELECT * FROM t3;
SHOW CREATE TABLE t4;
SELECT * FROM t4;
SHOW CREATE TABLE t5;
SELECT * FROM t5;
DROP TABLE t1, t2, t3, t4, t5;
--error 0,1
--remove_file $mysqldumpfile
--echo # End of 10.5 tests

View File

@@ -10760,6 +10760,15 @@ CAST(_utf8 'яяя' AS INT)
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'яяя'
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
select strcmp(_utf8mb3'' collate utf8mb3_general_nopad_ci, _utf8mb3 0x0001050001) as c1;
c1
-1
select strcmp(_utf8mb3'' collate utf8mb3_nopad_bin, _utf8mb3 0x0001050001) as c1;
c1
-1
#
# End of 10.5 tests
#
#

View File

@@ -2493,6 +2493,12 @@ SELECT CAST(_utf8 'ëëë' AS INT);
SELECT CAST(_utf8 'œœœ' AS INT);
SELECT CAST(_utf8 'яяя' AS INT);
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
select strcmp(_utf8mb3'' collate utf8mb3_general_nopad_ci, _utf8mb3 0x0001050001) as c1;
select strcmp(_utf8mb3'' collate utf8mb3_nopad_bin, _utf8mb3 0x0001050001) as c1;
--echo #
--echo # End of 10.5 tests

View File

@@ -0,0 +1,39 @@
# Start of 10.5 tests
#
# MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
#
CREATE TABLE t (
a INT,
b VARCHAR(16),
c CHAR(8),
PRIMARY KEY (b,c),
KEY(c)
) ENGINE=InnoDB CHARACTER SET utf8mb3 COLLATE utf8mb3_general_nopad_ci;
INSERT INTO t VALUES (1,UNHEX('0001050001'),''),(2,UNHEX('0000'),'x');
UPDATE t SET a = 0;
INSERT INTO t VALUES (0,'','');
CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
DROP TABLE t;
#
# MDEV-32190 Index corruption with unique key and nopad collation (without DESC or HASH keys)
#
CREATE TABLE t (
id INT,
b TEXT,
KEY(id),
PRIMARY KEY (b(2),id)
) ENGINE=InnoDB COLLATE utf8mb3_general_nopad_ci;
INSERT INTO t VALUES
(1,''),(2,'x'),(3,'x'),(4,UNHEX('0010')),(5,'x'),(6,'x'),(7,'x'),(8,'x'),
(9,UNHEX('00')),(10,'x'),(11,''),(12,UNHEX('73')),(13,'+'),(14,'N');
CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
SELECT id FROM t WHERE id IN (4,8);
id
4
8
DROP TABLE t;
# End of 10.5 tests

View File

@@ -0,0 +1,39 @@
--source include/have_innodb.inc
--echo # Start of 10.5 tests
--echo #
--echo # MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
--echo #
CREATE TABLE t (
a INT,
b VARCHAR(16),
c CHAR(8),
PRIMARY KEY (b,c),
KEY(c)
) ENGINE=InnoDB CHARACTER SET utf8mb3 COLLATE utf8mb3_general_nopad_ci;
INSERT INTO t VALUES (1,UNHEX('0001050001'),''),(2,UNHEX('0000'),'x');
UPDATE t SET a = 0;
INSERT INTO t VALUES (0,'','');
CHECK TABLE t EXTENDED;
DROP TABLE t;
--echo #
--echo # MDEV-32190 Index corruption with unique key and nopad collation (without DESC or HASH keys)
--echo #
CREATE TABLE t (
id INT,
b TEXT,
KEY(id),
PRIMARY KEY (b(2),id)
) ENGINE=InnoDB COLLATE utf8mb3_general_nopad_ci;
INSERT INTO t VALUES
(1,''),(2,'x'),(3,'x'),(4,UNHEX('0010')),(5,'x'),(6,'x'),(7,'x'),(8,'x'),
(9,UNHEX('00')),(10,'x'),(11,''),(12,UNHEX('73')),(13,'+'),(14,'N');
CHECK TABLE t EXTENDED;
SELECT id FROM t WHERE id IN (4,8);
DROP TABLE t;
--echo # End of 10.5 tests

File diff suppressed because it is too large Load Diff

View File

@@ -15,37 +15,6 @@ where collation_name like "%0900%" order by collation_name;
select * from information_schema.COLLATIONS where collation_name like "%0900%";
SET NAMES utf8mb4;
CREATE TABLE t1 (c1 CHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin);
--source include/ctype_unicode_latin.inc
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_unicode_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_icelandic_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_latvian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_romanian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_slovenian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_polish_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_estonian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_spanish_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_swedish_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_turkish_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_czech_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_danish_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_lithuanian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_slovak_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_spanish2_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_roman_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_esperanto_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_hungarian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_croatian_mysql561_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_croatian_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_german2_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_unicode_520_ci;
SELECT GROUP_CONCAT(c1 ORDER BY c1 SEPARATOR '') FROM t1 GROUP BY c1 COLLATE utf8mb4_vietnamese_ci;
DROP TABLE t1;
--echo #
--echo # MDEV-20912 Add support for utf8mb4_0900_* collations in MariaDB Server
--echo #

View File

@@ -1731,13 +1731,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER
USE `mysqltest1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `log` (
`msg` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@@ -1814,13 +1814,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
USE `mysqltest2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `log` (
`msg` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

View File

@@ -1731,13 +1731,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER
USE `mysqltest1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `log` (
`msg` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@@ -1814,13 +1814,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
USE `mysqltest2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `log` (
`msg` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

View File

@@ -25,6 +25,33 @@ c1
SET sort_buffer_size=@save_sort_buffer_size;
DROP TABLE t1;
#
# MDEV-35944 DELETE fails to notice transaction abort, violating ACID
#
CREATE TABLE t1 (id INT PRIMARY KEY, col_varchar VARCHAR(8)) ENGINE=InnoDB;
INSERT INTO t1 (id) VALUES (1),(2);
CREATE TABLE t2 (id INT, f INT, s DATE, e DATE, PERIOD FOR p(s,e), PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,0,'2000-01-01','2000-01-02');
CREATE TABLE t3 (id INT, f BLOB, UNIQUE(f)) ENGINE=InnoDB;
connection default;
SET innodb_lock_wait_timeout=1;
START TRANSACTION;
DELETE FROM t1;
connect con1,localhost,root,,;
START TRANSACTION;
UPDATE t2 SET f = 20;
connection default;
DELETE FROM t2 FOR PORTION OF p FROM '2000-01-01' TO '2000-01-02';
connection con1;
INSERT INTO t3 (id) VALUES (1), (2);
UPDATE t1 SET col_varchar = 'bar';
COMMIT;
connection default;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
COMMIT;
UPDATE t3 SET f = 'foo' ORDER BY f LIMIT 1;
DROP TABLE t1, t2, t3;
# End of 10.5 tests
#
# MDEV-32212 DELETE with ORDER BY and semijoin optimization causing crash
#
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
@@ -583,4 +610,4 @@ count(*)
0
drop database dbt3_s001;
set default_storage_engine=@save_default_storage_engine;
End of 11.1 tests
# End of 11.1 tests

View File

@@ -23,10 +23,48 @@ SELECT * FROM t1;
SET sort_buffer_size=@save_sort_buffer_size;
DROP TABLE t1;
--echo #
--echo # MDEV-35944 DELETE fails to notice transaction abort, violating ACID
--echo #
CREATE TABLE t1 (id INT PRIMARY KEY, col_varchar VARCHAR(8)) ENGINE=InnoDB;
INSERT INTO t1 (id) VALUES (1),(2);
CREATE TABLE t2 (id INT, f INT, s DATE, e DATE, PERIOD FOR p(s,e), PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1,0,'2000-01-01','2000-01-02');
CREATE TABLE t3 (id INT, f BLOB, UNIQUE(f)) ENGINE=InnoDB;
--connection default
SET innodb_lock_wait_timeout=1;
START TRANSACTION;
DELETE FROM t1;
--connect (con1,localhost,root,,)
START TRANSACTION;
UPDATE t2 SET f = 20;
--connection default
--send
DELETE FROM t2 FOR PORTION OF p FROM '2000-01-01' TO '2000-01-02';
--connection con1
INSERT INTO t3 (id) VALUES (1), (2);
UPDATE t1 SET col_varchar = 'bar';
COMMIT;
--connection default
--error ER_LOCK_DEADLOCK
--reap
COMMIT;
UPDATE t3 SET f = 'foo' ORDER BY f LIMIT 1;
# Cleanup
DROP TABLE t1, t2, t3;
--echo # End of 10.5 tests
--echo #
--echo # MDEV-32212 DELETE with ORDER BY and semijoin optimization causing crash
--echo #
--source include/have_innodb.inc
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
CREATE TABLE t2 (c2 INT) ENGINE=InnoDB;
@@ -219,5 +257,4 @@ select count(*) from lineitem, second WHERE l_shipdate BETWEEN '1997-01-01' A
drop database dbt3_s001;
set default_storage_engine=@save_default_storage_engine;
--echo End of 11.1 tests
--echo # End of 11.1 tests

View File

@@ -102,13 +102,13 @@ eval $query;
# double reversion
let $query=
select max(200 - a) from t1;
replace_result 101 100;
replace_column 9 100;
eval explain $query;
eval $query;
let $query=
select min(200 - a) from t1;
replace_result 101 100;
replace_column 9 100;
eval explain $query;
eval $query;

View File

@@ -231,3 +231,16 @@ Error 1327 Undeclared variable: foo
Error 1305 PROCEDURE P1 does not exist
drop procedure P1;
# End of 10.4 tests
#
# MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
#
CREATE TEMPORARY TABLE t1 (a INT,b INT);
INSERT INTO t1 VALUES (1,1),(2,2);
SET
@tmp=@@max_session_mem_used,
max_session_mem_used=8192;
SELECT * FROM (t1 AS t2 LEFT JOIN t1 AS t3 USING (a)),t1;
ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
DROP TABLE t1;
SET max_session_mem_used=@tmp;
# End of 10.6 tests

View File

@@ -284,3 +284,23 @@ show warnings;
drop procedure P1;
-- echo # End of 10.4 tests
--echo #
--echo # MDEV-35828: Assertion fails in alloc_root() when memory causes it to call itself
--echo #
CREATE TEMPORARY TABLE t1 (a INT,b INT);
INSERT INTO t1 VALUES (1,1),(2,2);
SET
@tmp=@@max_session_mem_used,
max_session_mem_used=8192;
--error ER_OPTION_PREVENTS_STATEMENT
SELECT * FROM (t1 AS t2 LEFT JOIN t1 AS t3 USING (a)),t1;
DROP TABLE t1;
SET max_session_mem_used=@tmp;
--echo # End of 10.6 tests

View File

@@ -1854,3 +1854,24 @@ connection con2;
disconnect con2;
connection default;
SET DEBUG_SYNC= 'RESET';
# End of 10.4 tests
#
# MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
#
set global innodb_stats_persistent=0;
create table t (a int) engine=innodb;
set global innodb_stats_persistent=1;
alter table t add column b int;
flush tables with read lock and disable checkpoint;
insert into t values (1,2) ;
ERROR HY000: Can't execute the query because you have a conflicting read lock
unlock tables;
drop table t;
flush tables with read lock and disable checkpoint;
create temporary table t(a int) engine=innodb;
unlock tables;
drop table t;
# restart: --innodb-read-only
flush tables with read lock and disable checkpoint;
# restart
# End of 11.7 tests

View File

@@ -2269,3 +2269,35 @@ reap;
disconnect con2;
connection default;
SET DEBUG_SYNC= 'RESET';
--echo # End of 10.4 tests
--echo #
--echo # MDEV-35417 InnoDB crashes under ... AND DISABLE CHECKPOINT
--echo #
# case 1
set global innodb_stats_persistent=0;
create table t (a int) engine=innodb;
set global innodb_stats_persistent=1;
alter table t add column b int;
flush tables with read lock and disable checkpoint;
--error ER_CANT_UPDATE_WITH_READLOCK
insert into t values (1,2) ;
unlock tables;
drop table t;
# case 2
flush tables with read lock and disable checkpoint;
create temporary table t(a int) engine=innodb;
unlock tables;
drop table t;
# case 3
--let $restart_parameters=--innodb-read-only
--source include/restart_mysqld.inc
flush tables with read lock and disable checkpoint;
--let $restart_parameters=
--source include/restart_mysqld.inc
--echo # End of 11.7 tests

View File

@@ -1341,7 +1341,7 @@ table_schema='information_schema' and
group by column_type order by num;
column_type group_concat(table_schema, '.', table_name) num
varchar(7) information_schema.ROUTINES,information_schema.VIEWS,information_schema.SLAVE_STATUS 3
varchar(20) information_schema.ALL_PLUGINS,information_schema.ALL_PLUGINS,information_schema.ALL_PLUGINS,information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING,information_schema.SLAVE_STATUS 10
varchar(20) information_schema.ALL_PLUGINS,information_schema.ALL_PLUGINS,information_schema.ALL_PLUGINS,information_schema.FILES,information_schema.FILES,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PLUGINS,information_schema.PROFILING 9
create table t1(f1 char(1) not null, f2 char(9) not null)
default character set utf8;
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from

View File

@@ -238,3 +238,30 @@ select variable_value into @threads_cached from information_schema.global_status
set debug_sync='now SIGNAL go3';
drop table t1;
set debug_sync='reset';
#
# MDEV-33285 - Assertion `m_table' failed in ha_perfschema::rnd_end on
# CHECKSUM TABLE
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES(1);
SET debug_sync='mysql_checksum_table_after_calculate_checksum SIGNAL parked WAIT_FOR go';
CHECKSUM TABLE t1;
connect con1, localhost, root;
connection con1;
SET debug_sync='now WAIT_FOR parked';
KILL QUERY id;
SET debug_sync='now SIGNAL go';
connection default;
ERROR 70100: Query execution was interrupted
SET debug_sync='RESET';
SET debug_sync='mysql_checksum_table_before_calculate_checksum SIGNAL parked WAIT_FOR go';
CHECKSUM TABLE t1;
connection con1;
SET debug_sync='now WAIT_FOR parked';
KILL QUERY id;
SET debug_sync='now SIGNAL go';
connection default;
ERROR 70100: Query execution was interrupted
DROP TABLE t1;
disconnect con1;
SET debug_sync='RESET';

View File

@@ -324,3 +324,40 @@ if (`select @@thread_handling != 'pool-of-threads'`) {
}
drop table t1;
set debug_sync='reset';
--echo #
--echo # MDEV-33285 - Assertion `m_table' failed in ha_perfschema::rnd_end on
--echo # CHECKSUM TABLE
--echo #
let $id= `select connection_id()`;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES(1);
SET debug_sync='mysql_checksum_table_after_calculate_checksum SIGNAL parked WAIT_FOR go';
send CHECKSUM TABLE t1;
connect con1, localhost, root;
connection con1;
SET debug_sync='now WAIT_FOR parked';
replace_result $id id;
eval KILL QUERY $id;
SET debug_sync='now SIGNAL go';
connection default;
error ER_QUERY_INTERRUPTED;
reap;
SET debug_sync='RESET';
SET debug_sync='mysql_checksum_table_before_calculate_checksum SIGNAL parked WAIT_FOR go';
send CHECKSUM TABLE t1;
connection con1;
SET debug_sync='now WAIT_FOR parked';
replace_result $id id;
eval KILL QUERY $id;
SET debug_sync='now SIGNAL go';
connection default;
error ER_QUERY_INTERRUPTED;
reap;
DROP TABLE t1;
disconnect con1;
SET debug_sync='RESET';

View File

@@ -22,7 +22,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER
USE `mysqltest1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -32,7 +32,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
USE `mysqltest2`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
@@ -41,27 +41,27 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest3` /*!40100 DEFAULT CHARACTER
USE `mysqltest3`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v3` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v3i` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v3is` AS SELECT
1 AS `schema_name` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v3nt` AS SELECT
1 AS `1` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v3ps` AS SELECT
1 AS `user` */;
SET character_set_client = @saved_cs_client;
@@ -237,7 +237,7 @@ disconnect con1;
connection default;
/*M!999999\- enable the sandbox mode */
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;

View File

@@ -199,7 +199,9 @@ create database `a
b`;
use `a
b`;
select count(*) from mysql.global_priv where length(priv)>2;
create table t1 (a int);
insert t1 values (1),(2),(3),(4),(5),(6),(7);
select count(*) from t1 where a>2;
count(*)
5
drop database `a
@@ -212,7 +214,7 @@ set timestamp=default;
use `a
b`;
SET timestamp=1234567890;
select count(*) from mysql.global_priv where length(priv)>2
select count(*) from t1 where a>2
#
# MDEV-31366 Assertion `thd->start_time' failed in bool LOGGER::slow_log_print(THD*, const char*, size_t, ulonglong)
#

View File

@@ -207,9 +207,11 @@ create database `a
b`;
use `a
b`;
create table t1 (a int);
insert t1 values (1),(2),(3),(4),(5),(6),(7);
--disable_ps_protocol
--disable_view_protocol
select count(*) from mysql.global_priv where length(priv)>2;
select count(*) from t1 where a>2;
--enable_view_protocol
--enable_ps_protocol
drop database `a

View File

@@ -310,10 +310,9 @@ select @s1 > 2.00 and @s1 < 10.00 as "should be true";
should be true
1
disconnect con2;
connection default;
drop procedure p1;
disconnect con1;
connection default;
drop procedure p1;
SET GLOBAL long_query_time = @save_long_query_time;
SET GLOBAL log_output = @old_log_output;
SET global general_log = @old_general_log;

View File

@@ -328,7 +328,9 @@ SET GLOBAL general_log_file = @old_general_log_file;
connect (con2,localhost,root,,);
set @s1=(select variable_value from information_schema.session_status where
variable_name='query_time');
--disable_cursor_protocol
select sleep(3) into @a;
--enable_cursor_protocol
set @s2=(select variable_value from information_schema.session_status where
variable_name='query_time');
set @s3=(select variable_value from information_schema.global_status where
@@ -358,8 +360,6 @@ select @s1 > 2.00 and @s1 < 10.00 as "should be true";
# select @s1;
disconnect con2;
connection default;
drop procedure p1;
#
# Cleanup
@@ -368,6 +368,7 @@ drop procedure p1;
disconnect con1;
# set back the saved default values
connection default;
drop procedure p1;
# Reset global system variables to initial values if forgotten somewhere above.
SET GLOBAL long_query_time = @save_long_query_time;

View File

@@ -731,4 +731,43 @@ alter table t1 enable keys;
insert into t1 values (2);
ERROR 23000: Duplicate entry '2' for key 'i'
drop table t1;
#
# MDEV-25654 Unexpected ER_CRASHED_ON_USAGE and Assertion `limit >= trx_id' failed in purge_node_t::skip
#
create table t1 (a int, unique using hash (a)) engine=innodb
partition by range(a) (
partition p1 values less than (2),
partition p2 values less than (101)
);
insert into t1 select seq from seq_1_to_100;
alter table t1 add partition (partition p3 values less than (maxvalue));
alter table t1 force;
drop table t1;
#
# MDEV-33658 cannot add a foreign key on a table with a long UNIQUE
# multi-column index, that contains a foreign key as a prefix.
#
create table a (id int primary key) engine = innodb;
create table b (id int,
long_text varchar(1000),
constraint unique_b unique key (id, long_text)
) engine=innodb default charset utf8mb4;
alter table b add constraint b_fk_id foreign key (id) references a (id);
show create table b;
Table Create Table
b CREATE TABLE `b` (
`id` int(11) DEFAULT NULL,
`long_text` varchar(1000) DEFAULT NULL,
UNIQUE KEY `unique_b` (`id`,`long_text`) USING HASH,
KEY `b_fk_id` (`id`),
CONSTRAINT `b_fk_id` FOREIGN KEY (`id`) REFERENCES `a` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table b;
drop table a;
# veirfy that duplicate has unique is detected
create table t1 (a blob unique);
alter table t1 add constraint constraint_1 unique (a);
Warnings:
Note 1831 Duplicate index `constraint_1`. This is deprecated and will be disallowed in a future release
drop table t1;
# End of 10.5 tests

View File

@@ -710,4 +710,39 @@ alter table t1 enable keys;
insert into t1 values (2);
drop table t1;
--echo #
--echo # MDEV-25654 Unexpected ER_CRASHED_ON_USAGE and Assertion `limit >= trx_id' failed in purge_node_t::skip
--echo #
create table t1 (a int, unique using hash (a)) engine=innodb
partition by range(a) (
partition p1 values less than (2),
partition p2 values less than (101)
);
insert into t1 select seq from seq_1_to_100;
alter table t1 add partition (partition p3 values less than (maxvalue));
alter table t1 force;
drop table t1;
--echo #
--echo # MDEV-33658 cannot add a foreign key on a table with a long UNIQUE
--echo # multi-column index, that contains a foreign key as a prefix.
--echo #
create table a (id int primary key) engine = innodb;
create table b (id int,
long_text varchar(1000),
constraint unique_b unique key (id, long_text)
) engine=innodb default charset utf8mb4;
alter table b add constraint b_fk_id foreign key (id) references a (id);
show create table b;
drop table b;
drop table a;
--echo # veirfy that duplicate has unique is detected
create table t1 (a blob unique);
alter table t1 add constraint constraint_1 unique (a);
drop table t1;
--echo # End of 10.5 tests

View File

@@ -30,7 +30,7 @@ Create Table CREATE TABLE `Table2` (
PRIMARY KEY (`c1`),
KEY `fk1` (`c2`),
CONSTRAINT `fk1` FOREIGN KEY (`c2`) REFERENCES `Table1` (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
@@ -75,7 +75,7 @@ Create Table CREATE TABLE `Product_Order` (
KEY `Customer_Id` (`Customer_Id`),
CONSTRAINT `product_order_ibfk_1` FOREIGN KEY (`Product_Category`, `Product_Id`) REFERENCES `Product` (`Category`, `Id`) ON UPDATE CASCADE,
CONSTRAINT `product_order_ibfk_2` FOREIGN KEY (`Customer_Id`) REFERENCES `Customer` (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
SHOW CREATE TABLE Product;
Table Product
Create Table CREATE TABLE `Product` (
@@ -83,13 +83,13 @@ Create Table CREATE TABLE `Product` (
`Id` int(11) NOT NULL,
`Price` decimal(10,0) DEFAULT NULL,
PRIMARY KEY (`Category`,`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
SHOW CREATE TABLE Customer;
Table Customer
Create Table CREATE TABLE `Customer` (
`Id` int(11) NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test

View File

@@ -281,16 +281,16 @@ SELECT COALESCE(d, d), IFNULL(d, d), IF(i, d, d),
CASE i WHEN i THEN d ELSE d END, GREATEST(d, d), LEAST(d, d)
FROM t1 ORDER BY RAND();
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def COALESCE(d, d) COALESCE(d, d) 10 10 10 Y 128 0 63
def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
def IF(i, d, d) IF(i, d, d) 10 10 10 Y 128 0 63
def CASE i WHEN i THEN d ELSE d END CASE i WHEN i THEN d ELSE d END 10 10 10 Y 128 0 63
def GREATEST(d, d) GREATEST(d, d) 10 10 10 Y 128 0 63
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
COALESCE(d, d) IFNULL(d, d) IF(i, d, d) CASE i WHEN i THEN d ELSE d END GREATEST(d, d) LEAST(d, d)
2008-01-01 2008-01-01 2008-01-01 2008-01-01 2008-01-01 2008-01-01
2008-01-02 2008-01-02 2008-01-02 2008-01-02 2008-01-02 2008-01-02
2008-01-03 2008-01-03 2008-01-03 2008-01-03 2008-01-03 2008-01-03
COALESCE(d, d) IFNULL(d, d) IF(i, d, d) CASE i WHEN i THEN d ELSE d END GREATEST(d, d) LEAST(d, d)
def CASE i WHEN i THEN d ELSE d END CASE i WHEN i THEN d ELSE d END 10 10 10 Y 128 0 63
def COALESCE(d, d) COALESCE(d, d) 10 10 10 Y 128 0 63
def GREATEST(d, d) GREATEST(d, d) 10 10 10 Y 128 0 63
def IF(i, d, d) IF(i, d, d) 10 10 10 Y 128 0 63
def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
DROP TABLE t1;
#
# Bug#41788 mysql_fetch_field returns org_table == table by a view

View File

@@ -562,7 +562,7 @@ a1\`b1 CREATE TABLE `a1\``b1` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `a1\``b1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -594,7 +594,7 @@ a1\"b1 CREATE TABLE "a1\""b1" (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE "a1\""b1" (
"a" int(11) DEFAULT NULL
);

View File

@@ -20,6 +20,15 @@ show create table tempty;
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
select * from tempty;
ERROR HY000: Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
select table_name, table_comment from information_schema.tables where table_schema='test' and table_comment!='VIEW';
table_name table_comment
mysql_json_test Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
mysql_json_test_big Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
tempty Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
Warnings:
Warning 1707 Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test_big` FORCE" or dump/reload to fix it!
Warning 1707 Table rebuild required. Please do "ALTER TABLE `test.mysql_json_test` FORCE" or dump/reload to fix it!
Warning 1707 Table rebuild required. Please do "ALTER TABLE `test.tempty` FORCE" or dump/reload to fix it!
alter table tempty force;
show create table tempty;
Table Create Table

View File

@@ -43,6 +43,9 @@ show create table tempty;
--error ER_TABLE_NEEDS_REBUILD
select * from tempty;
--sorted_result
select table_name, table_comment from information_schema.tables where table_schema='test' and table_comment!='VIEW';
alter table tempty force;
show create table tempty;

View File

@@ -52,10 +52,10 @@ affected rows: 1
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
LENGTH(c1) 67108864
LENGTH(c1) 33554432
LENGTH(c1) 4194304
LENGTH(c1) 524288
LENGTH(c1) 67108864
affected rows: 4
#
# Grow the rows by updating.
@@ -68,8 +68,8 @@ info: Rows matched: 4 Changed: 4 Warnings: 0
# Do not display the column value itself, just its length.
#
SELECT LENGTH(c1) FROM t1;
LENGTH(c1) 134217728
LENGTH(c1) 1048576
LENGTH(c1) 134217728
LENGTH(c1) 67108864
LENGTH(c1) 8388608
affected rows: 4

View File

@@ -95,7 +95,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -112,7 +112,7 @@ INSERT DELAYED IGNORE INTO `t1` VALUES
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -129,7 +129,7 @@ INSERT DELAYED IGNORE INTO `t2` VALUES
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -146,7 +146,7 @@ INSERT DELAYED IGNORE INTO `t3` VALUES
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t4` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -163,7 +163,7 @@ INSERT DELAYED IGNORE INTO `t4` VALUES
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t5` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -180,7 +180,7 @@ INSERT DELAYED IGNORE INTO `t5` VALUES
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t6` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -223,7 +223,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -240,7 +240,7 @@ INSERT DELAYED INTO `t1` VALUES
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -257,7 +257,7 @@ INSERT DELAYED INTO `t2` VALUES
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -274,7 +274,7 @@ INSERT DELAYED INTO `t3` VALUES
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t4` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -291,7 +291,7 @@ INSERT DELAYED INTO `t4` VALUES
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t5` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL
@@ -308,7 +308,7 @@ INSERT DELAYED INTO `t5` VALUES
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t6` (
`id` int(8) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL

View File

@@ -34,7 +34,7 @@ USE `mysqltest1
--
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1
1t` (
`foobar
@@ -53,7 +53,7 @@ raboof` int(11) DEFAULT NULL
--
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1
1v` AS SELECT
1 AS `foobar

View File

@@ -23,25 +23,25 @@ test.t4 analyze Warning Engine-independent statistics are not collected for colu
test.t4 analyze status OK
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t4` (
`a` mediumblob DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`a` mediumblob DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` mediumblob DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` mediumblob DEFAULT NULL
);

View File

@@ -21,7 +21,7 @@ timeout without t1 contents expected
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -45,7 +45,7 @@ This would be a race condition otherwise, but default max_statement_time=0 makes
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;

View File

@@ -46,7 +46,7 @@ Testing text format output
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`point` varchar(10) NOT NULL,
`data` varchar(10) DEFAULT NULL,

View File

@@ -33,7 +33,7 @@ INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
("0987654321098765432109876543210987654321");
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` decimal(64,20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -53,7 +53,7 @@ Warnings:
Warning 1264 Out of range value for column 'a' at row 1
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -78,7 +78,7 @@ ERROR 42S22: Unknown column '1.2345' in 'VALUES'
SET SQL_MODE=@OLD_SQL_MODE;
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` decimal(10,5) DEFAULT NULL,
`b` float DEFAULT NULL
@@ -94,7 +94,7 @@ INSERT INTO `t1` VALUES
commit;
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` decimal(10,5) DEFAULT NULL,
`b` float DEFAULT NULL
@@ -122,7 +122,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` decimal(10,5) DEFAULT NULL,
`b` float DEFAULT NULL
@@ -159,7 +159,7 @@ commit;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` decimal(10,5) DEFAULT NULL,
`b` float DEFAULT NULL
@@ -249,7 +249,7 @@ INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=koi8r COLLATE=koi8r_general_ci;
@@ -342,7 +342,7 @@ DROP TABLE t1;
create table ```a` (i int);
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE ```a` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -368,7 +368,7 @@ create table t1(a int);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -399,7 +399,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS "t1";
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE "t1" (
"a" int(11) DEFAULT NULL
);
@@ -433,7 +433,7 @@ set global sql_mode='ANSI_QUOTES';
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -464,7 +464,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS "t1";
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE "t1" (
"a" int(11) DEFAULT NULL
);
@@ -502,7 +502,7 @@ insert into t1 values (1),(2),(3);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -599,7 +599,7 @@ INSERT INTO t1 VALUES (_latin1 '
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -733,7 +733,7 @@ INSERT INTO t2 VALUES (4),(5),(6);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -780,7 +780,7 @@ INSERT INTO `t1` VALUES (0x602010000280100005E71A);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`b` blob DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -824,7 +824,7 @@ INSERT INTO t1 VALUES (4),(5),(6);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -867,7 +867,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -1245,7 +1245,7 @@ insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`F_c4ca4238a0b923820dcc509a6f75849b` int(11) DEFAULT NULL,
`F_c81e728d9d4c2f636f067f89cc14862c` int(11) DEFAULT NULL,
@@ -1623,7 +1623,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -1673,14 +1673,14 @@ INSERT INTO t2 VALUES (1), (2);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -1709,14 +1709,14 @@ CREATE TABLE `t2` (
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -1916,7 +1916,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -1934,7 +1934,7 @@ UNLOCK TABLES;
commit;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`a` int(10) DEFAULT NULL,
@@ -2046,21 +2046,21 @@ mariadb-dump: Couldn't find table: "non_existing"
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -2096,7 +2096,7 @@ mariadb-dump: Got error: 1064: "You have an error in your SQL syntax; check the
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -2133,7 +2133,7 @@ insert into t1 values (0815, 4711, 2006);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS "t1";
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE "t1" (
"a b" int(11) NOT NULL,
"c""d" int(11) NOT NULL,
@@ -2171,7 +2171,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a b` int(11) NOT NULL,
`c"d` int(11) NOT NULL,
@@ -2229,7 +2229,7 @@ create view v2 as select * from t2 where a like 'a%' with check option;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` varchar(30) DEFAULT NULL,
KEY `a` (`a`(5))
@@ -2251,7 +2251,7 @@ commit;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
@@ -2331,7 +2331,7 @@ create view v1 as select * from t1;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -2346,7 +2346,7 @@ commit;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
@@ -2404,7 +2404,7 @@ create view v2 as select * from t2 where a like 'a%' with check option;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` varchar(30) DEFAULT NULL,
KEY `a` (`a`(5))
@@ -2426,7 +2426,7 @@ commit;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
@@ -2477,7 +2477,7 @@ INSERT INTO t1 VALUES ('\'');
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` char(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -2527,7 +2527,7 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
@@ -2548,7 +2548,7 @@ commit;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `a`,
1 AS `b`,
@@ -2557,14 +2557,14 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v3`;
/*!50001 DROP VIEW IF EXISTS `v3`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v3` AS SELECT
1 AS `a`,
1 AS `b`,
@@ -2686,7 +2686,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` bigint(20) DEFAULT NULL
@@ -2764,7 +2764,7 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -2824,7 +2824,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` bigint(20) DEFAULT NULL
@@ -2844,7 +2844,7 @@ UNLOCK TABLES;
commit;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -2978,7 +2978,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -3137,7 +3137,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
UNIQUE KEY `d` (`d`)
@@ -3179,7 +3179,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
UNIQUE KEY `d` (`d`)
@@ -3237,7 +3237,7 @@ a2
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS "t1 test";
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE "t1 test" (
"a1" int(11) DEFAULT NULL
);
@@ -3271,7 +3271,7 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
DROP TABLE IF EXISTS "t2 test";
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE "t2 test" (
"a2" int(11) DEFAULT NULL
);
@@ -3331,7 +3331,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` varchar(32) DEFAULT NULL,
@@ -3352,7 +3352,7 @@ commit;
DROP TABLE IF EXISTS `v0`;
/*!50001 DROP VIEW IF EXISTS `v0`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v0` AS SELECT
1 AS `a`,
1 AS `b`,
@@ -3361,7 +3361,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `a`,
1 AS `b`,
@@ -3370,7 +3370,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a`,
1 AS `b`,
@@ -3462,7 +3462,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET u
USE `test`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -3524,7 +3524,7 @@ insert into t1 values ('','');
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` binary(1) DEFAULT NULL,
`b` blob DEFAULT NULL
@@ -3562,7 +3562,7 @@ commit;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` binary(1) DEFAULT NULL,
`b` blob DEFAULT NULL
@@ -3750,7 +3750,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_test_db` /*!40100 DEFAULT CH
USE `mysqldump_test_db`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -3770,7 +3770,7 @@ commit;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
@@ -3817,7 +3817,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_tables` /*!40100 DEFAULT CHA
USE `mysqldump_tables`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `basetable` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`tag` varchar(64) DEFAULT NULL,
@@ -3831,7 +3831,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHAR
USE `mysqldump_views`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `nasishnasifu` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
@@ -3968,7 +3968,7 @@ use test;
/*M!999999\- enable the sandbox mode */
DROP TABLE IF EXISTS `TABLES`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TEMPORARY TABLE `TABLES` (
`TABLE_CATALOG` varchar(512) NOT NULL,
`TABLE_SCHEMA` varchar(64) NOT NULL,
@@ -4044,14 +4044,14 @@ CREATE TABLE t1 (a INT) ENGINE=merge UNION=(t2, t3);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci UNION=(`t2`,`t3`);
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -4065,7 +4065,7 @@ UNLOCK TABLES;
commit;
DROP TABLE IF EXISTS `t3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
@@ -4162,7 +4162,7 @@ CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL,
`c2` longblob DEFAULT NULL
@@ -4259,7 +4259,7 @@ create view db42635.v2 (c) as select * from db42635.t1;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -4274,7 +4274,7 @@ commit;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `c` */;
SET character_set_client = @saved_cs_client;
@@ -4417,7 +4417,7 @@ INSERT INTO t1 VALUES (3,4), (4,5);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
@@ -4701,7 +4701,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_test_db` /*!40100 DEFAULT CH
USE `mysqldump_test_db`;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -4721,7 +4721,7 @@ commit;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
@@ -4819,7 +4819,7 @@ create table test (a int);
/*M!999999\- enable the sandbox mode */
DROP TABLE IF EXISTS `test`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `test` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -5043,7 +5043,7 @@ ALTER DATABASE `test-database` CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `test` (
`c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@@ -5537,7 +5537,7 @@ CREATE TABLE t1 (a INT);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
);
@@ -5821,7 +5821,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET ut
USE `db1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `basetable` (
`id` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci;
@@ -5832,13 +5832,13 @@ INSERT INTO `basetable` VALUES
(6);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_name` (
`i3` smallint(6) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci INSERT_METHOD=LAST UNION=(`basetable`);
/*!40101 SET character_set_client = @saved_cs_client */;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
1 AS `1` */;
SET character_set_client = @saved_cs_client;
@@ -5847,7 +5847,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET ut
USE `db2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_name` (
`i1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `i1` (`i1`)
@@ -5859,7 +5859,7 @@ INSERT INTO `nonunique_table_name` VALUES
(2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_view_name` (
`i2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci;
@@ -5892,7 +5892,7 @@ USE `db2`;
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_name` (
`i1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `i1` (`i1`)
@@ -5904,7 +5904,7 @@ INSERT INTO `nonunique_table_name` VALUES
(2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_view_name` (
`i2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci;
@@ -5923,7 +5923,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET ut
USE `db2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_name` (
`i1` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
UNIQUE KEY `i1` (`i1`)
@@ -5935,7 +5935,7 @@ INSERT DELAYED INTO `nonunique_table_name` VALUES
(2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_view_name` (
`i2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci;
@@ -5950,7 +5950,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET ut
USE `db1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `basetable` (
`id` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci;
@@ -5961,7 +5961,7 @@ INSERT DELAYED INTO `basetable` VALUES
(6);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `nonunique_table_name` (
`i3` smallint(6) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_uca1400_ai_ci INSERT_METHOD=LAST UNION=(`basetable`);
@@ -5972,7 +5972,7 @@ INSERT INTO `nonunique_table_name` VALUES
(6);
commit;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
SET character_set_client = utf8mb4;
/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
1 AS `1` */;
SET character_set_client = @saved_cs_client;
@@ -6123,7 +6123,7 @@ DROP TABLE t1;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
@@ -6134,7 +6134,7 @@ CREATE TABLE IF NOT EXISTS `general_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='General log';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `slow_log` (
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
@@ -6153,7 +6153,7 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `innodb_index_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `innodb_index_stats` (
`database_name` varchar(64) NOT NULL,
`table_name` varchar(199) NOT NULL,
@@ -6168,7 +6168,7 @@ CREATE TABLE `innodb_index_stats` (
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `innodb_table_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `innodb_table_stats` (
`database_name` varchar(64) NOT NULL,
`table_name` varchar(199) NOT NULL,
@@ -6180,7 +6180,7 @@ CREATE TABLE `innodb_table_stats` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin STATS_PERSISTENT=0;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `transaction_registry` (
`transaction_id` bigint(20) unsigned NOT NULL,
`commit_id` bigint(20) unsigned NOT NULL,
@@ -6219,7 +6219,7 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` (
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
@@ -6230,7 +6230,7 @@ CREATE TABLE IF NOT EXISTS `general_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='General log';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `slow_log` (
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
@@ -6249,7 +6249,7 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `innodb_index_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `innodb_index_stats` (
`database_name` varchar(64) NOT NULL,
`table_name` varchar(199) NOT NULL,
@@ -6271,7 +6271,7 @@ UNLOCK TABLES;
commit;
DROP TABLE IF EXISTS `innodb_table_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `innodb_table_stats` (
`database_name` varchar(64) NOT NULL,
`table_name` varchar(199) NOT NULL,
@@ -6290,7 +6290,7 @@ set autocommit=0;
UNLOCK TABLES;
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `transaction_registry` (
`transaction_id` bigint(20) unsigned NOT NULL,
`commit_id` bigint(20) unsigned NOT NULL,
@@ -6329,7 +6329,7 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` (
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
@@ -6340,7 +6340,7 @@ CREATE TABLE IF NOT EXISTS `general_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='General log';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `slow_log` (
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
@@ -6359,7 +6359,7 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `innodb_index_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `innodb_index_stats` (
`database_name` varchar(64) NOT NULL,
`table_name` varchar(199) NOT NULL,
@@ -6381,7 +6381,7 @@ UNLOCK TABLES;
commit;
DROP TABLE IF EXISTS `innodb_table_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `innodb_table_stats` (
`database_name` varchar(64) NOT NULL,
`table_name` varchar(199) NOT NULL,
@@ -6400,7 +6400,7 @@ set autocommit=0;
UNLOCK TABLES;
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE IF NOT EXISTS `transaction_registry` (
`transaction_id` bigint(20) unsigned NOT NULL,
`commit_id` bigint(20) unsigned NOT NULL,
@@ -6447,7 +6447,7 @@ CREATE TABLE t4(ËÏÌÏÎËÁ1 INT);
insert into t4 values(1);
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL INVISIBLE
@@ -6458,7 +6458,7 @@ INSERT INTO `t1` (`a`, `b`) VALUES (1,NULL),
(1,2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
@@ -6470,7 +6470,7 @@ INSERT INTO `t2` VALUES
(1,2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`invisible` int(11) DEFAULT NULL,
`a b c & $!@#$%^&*( )` int(11) DEFAULT 4 INVISIBLE,
@@ -6484,7 +6484,7 @@ INSERT INTO `t3` (`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( )
(1,2,3);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t4` (
`ËÏÌÏÎËÁ1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -6496,7 +6496,7 @@ commit;
#Check side effect on --complete insert
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL INVISIBLE
@@ -6507,7 +6507,7 @@ INSERT INTO `t1` (`a`, `b`) VALUES (1,NULL),
(1,2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
@@ -6518,7 +6518,7 @@ INSERT INTO `t2` (`a`, `b`) VALUES (1,2),
(1,2);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t3` (
`invisible` int(11) DEFAULT NULL,
`a b c & $!@#$%^&*( )` int(11) DEFAULT 4 INVISIBLE,
@@ -6532,7 +6532,7 @@ INSERT INTO `t3` (`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( )
(1,2,3);
commit;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t4` (
`ËÏÌÏÎËÁ1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -6865,7 +6865,7 @@ update mysql.event set body ='select not_a_value' where db='test' and name='e1';
create table t1 (i int);
/*M!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
@@ -6921,7 +6921,7 @@ create table t1 (a int);
/*M!999999\- enable the sandbox mode */
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

View File

@@ -91,7 +91,7 @@ INSERT INTO t1 VALUES (1), (2);
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
);
@@ -128,7 +128,7 @@ UNLOCK TABLES;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
);
@@ -165,7 +165,7 @@ UNLOCK TABLES;
/*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
);

View File

@@ -780,3 +780,15 @@ deallocate prepare stmt;
drop table t1;
set in_predicate_conversion_threshold=default;
# End of 10.3 tests
#
# MDEV-32575 MSAN / Valgrind errors in test_if_cheaper_ordering
# upon reaching in_predicate_conversion_threshold
#
create table t1 (a int, b int, c int, primary key (a, b));
insert into t1 (a, b) values (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8);
set in_predicate_conversion_threshold = 2;
select * from t1 where a in (1, 2) and b = 2 order by a, b;
a b c
1 2 NULL
drop table t1;
# End of 11.4 tests

View File

@@ -474,3 +474,18 @@ drop table t1;
set in_predicate_conversion_threshold=default;
--echo # End of 10.3 tests
--echo #
--echo # MDEV-32575 MSAN / Valgrind errors in test_if_cheaper_ordering
--echo # upon reaching in_predicate_conversion_threshold
--echo #
create table t1 (a int, b int, c int, primary key (a, b));
insert into t1 (a, b) values (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8);
set in_predicate_conversion_threshold = 2;
select * from t1 where a in (1, 2) and b = 2 order by a, b;
drop table t1;
--echo # End of 11.4 tests

Some files were not shown because too many files have changed in this diff Show More