mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
*.reject
|
||||
*.spec
|
||||
*.bak
|
||||
*.dgcov
|
||||
*.rpm
|
||||
.*.swp
|
||||
*.ninja
|
||||
@ -80,6 +81,9 @@ mysql-test/lib/My/SafeProcess/my_safe_process
|
||||
mysql-test/mtr
|
||||
mysql-test/mysql-test-run
|
||||
mysql-test/var
|
||||
mysql-test-gcov.err
|
||||
mysql-test-gcov.msg
|
||||
mysys/test_hash
|
||||
mysys/thr_lock
|
||||
mysys/thr_timer
|
||||
packaging/rpm-oel/mysql.spec
|
||||
|
@ -32,9 +32,9 @@ then
|
||||
configure="$configure --verbose"
|
||||
fi
|
||||
|
||||
# git clean -fdX removes all ignored (build) files
|
||||
commands="\
|
||||
/bin/rm -rf configure;
|
||||
/bin/rm -rf CMakeCache.txt CMakeFiles/
|
||||
git clean -fdX
|
||||
|
||||
path=`dirname $0`
|
||||
. \"$path/autorun.sh\""
|
||||
|
@ -42,7 +42,7 @@ Usage: $0 [-h|-n] [configure-options]
|
||||
Influences the debug flags. Old is default.
|
||||
--prefix=path Build with prefix 'path'.
|
||||
|
||||
Note: this script is intended for internal use by MySQL developers.
|
||||
Note: this script is intended for internal use by MariaDB developers.
|
||||
EOF
|
||||
}
|
||||
|
||||
@ -120,10 +120,9 @@ path=`dirname $0`
|
||||
get_make_parallel_flag
|
||||
|
||||
# SSL library to use.--with-ssl will select our bundled yaSSL
|
||||
# implementation of SSL. To use OpenSSL you will need to specify
|
||||
# the location of OpenSSL headers and libs on your system.
|
||||
# Ex --with-ssl=/usr
|
||||
SSL_LIBRARY=--with-ssl
|
||||
# implementation of SSL. --with-ssl=yes will first try system library
|
||||
# then the boundled one --with-ssl=system will use the system library.
|
||||
SSL_LIBRARY=--with-ssl=system
|
||||
|
||||
if [ "x$warning_mode" = "xpedantic" ]; then
|
||||
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
|
||||
@ -293,7 +292,7 @@ gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov"
|
||||
# GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well
|
||||
# as on the compiler command line), and this requires setting LDFLAGS for BDB.
|
||||
|
||||
gcov_link_flags="-fprofile-arcs -ftest-coverage"
|
||||
gcov_link_flags="-fprofile-arcs -ftest-coverage -lgcov"
|
||||
|
||||
gcov_configs="--with-gcov"
|
||||
|
||||
|
@ -28,6 +28,6 @@ export LDFLAGS="$gcov_link_flags"
|
||||
extra_flags="$pentium64_cflags $max_cflags $gcov_compile_flags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --with-zlib-dir=bundled"
|
||||
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -183,18 +183,18 @@ INCLUDE(check_compiler_flag)
|
||||
OPTION(WITH_ASAN "Enable address sanitizer" OFF)
|
||||
IF (WITH_ASAN)
|
||||
# gcc 4.8.1 and new versions of clang
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -O1 -Wno-error -fPIC"
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC"
|
||||
DEBUG RELWITHDEBINFO)
|
||||
SET(HAVE_C_FSANITIZE ${HAVE_C__fsanitize_address__O1__Wno_error__fPIC})
|
||||
SET(HAVE_CXX_FSANITIZE ${HAVE_CXX__fsanitize_address__O1__Wno_error__fPIC})
|
||||
SET(HAVE_C_FSANITIZE ${have_C__fsanitize_address__fPIC})
|
||||
SET(HAVE_CXX_FSANITIZE ${have_CXX__fsanitize_address__fPIC})
|
||||
IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE)
|
||||
SET(WITH_ASAN_OK 1)
|
||||
ELSE()
|
||||
# older versions of clang
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -O1 -fPIC"
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -fPIC"
|
||||
DEBUG RELWITHDEBINFO)
|
||||
SET(HAVE_C_FADDRESS ${HAVE_C__faddress_sanitizer__O1__fPIC})
|
||||
SET(HAVE_CXX_FADDRESS ${HAVE_CXX__faddress_sanitizer__O1__fPIC})
|
||||
SET(HAVE_C_FADDRESS ${have_C__faddress_sanitizer__fPIC})
|
||||
SET(HAVE_CXX_FADDRESS ${have_CXX__faddress_sanitizer__fPIC})
|
||||
IF(HAVE_C_FADDRESS AND HAVE_CXX_FADDRESS)
|
||||
SET(WITH_ASAN_OK 1)
|
||||
ENDIF()
|
||||
@ -274,7 +274,7 @@ ENDIF()
|
||||
|
||||
# Set commonly used variables
|
||||
IF(WIN32)
|
||||
SET(DEFAULT_MYSQL_HOME "C:/MariaDB${MYSQL_BASE_VERSION}")
|
||||
SET(DEFAULT_MYSQL_HOME "C:/Program Files/MariaDB ${MYSQL_BASE_VERSION}")
|
||||
SET(SHAREDIR share)
|
||||
ELSE()
|
||||
SET(DEFAULT_MYSQL_HOME ${CMAKE_INSTALL_PREFIX})
|
||||
|
@ -66,6 +66,10 @@ enum options_client
|
||||
OPT_MYSQLDUMP_SLAVE_APPLY,
|
||||
OPT_MYSQLDUMP_SLAVE_DATA,
|
||||
OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
OPT_REVIEW,
|
||||
OPT_REVIEW_DBNAME, OPT_REVIEW_TABLENAME,
|
||||
#endif
|
||||
OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING,
|
||||
OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
|
||||
OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
|
||||
|
@ -66,6 +66,10 @@ Rpl_filter *binlog_filter= 0;
|
||||
/* Needed for Rpl_filter */
|
||||
CHARSET_INFO* system_charset_info= &my_charset_utf8_general_ci;
|
||||
|
||||
/* Needed for Flashback */
|
||||
DYNAMIC_ARRAY binlog_events; // Storing the events output string
|
||||
String stop_event_string; // Storing the STOP_EVENT output string
|
||||
|
||||
char server_version[SERVER_VERSION_LENGTH];
|
||||
ulong server_id = 0;
|
||||
|
||||
@ -89,7 +93,7 @@ static const char *load_groups[]=
|
||||
static void error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
|
||||
static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
|
||||
static bool one_database=0, one_table=0, to_last_remote_log= 0, disable_log_bin= 0;
|
||||
static bool opt_hexdump= 0, opt_version= 0;
|
||||
const char *base64_output_mode_names[]=
|
||||
{"NEVER", "AUTO", "ALWAYS", "UNSPEC", "DECODE-ROWS", NullS};
|
||||
@ -99,6 +103,7 @@ TYPELIB base64_output_mode_typelib=
|
||||
static enum_base64_output_mode opt_base64_output_mode= BASE64_OUTPUT_UNSPEC;
|
||||
static char *opt_base64_output_mode_str= NullS;
|
||||
static char* database= 0;
|
||||
static char* table= 0;
|
||||
static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
|
||||
static my_bool debug_info_flag, debug_check_flag;
|
||||
static my_bool force_if_open_opt= 1;
|
||||
@ -132,6 +137,12 @@ static MYSQL* mysql = NULL;
|
||||
static const char* dirname_for_local_load= 0;
|
||||
static bool opt_skip_annotate_row_events= 0;
|
||||
|
||||
static my_bool opt_flashback;
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
static my_bool opt_flashback_review;
|
||||
static char *flashback_review_dbname, *flashback_review_tablename;
|
||||
#endif
|
||||
|
||||
/**
|
||||
Pointer to the Format_description_log_event of the currently active binlog.
|
||||
|
||||
@ -790,6 +801,23 @@ print_skip_replication_statement(PRINT_EVENT_INFO *pinfo, const Log_event *ev)
|
||||
pinfo->skip_replication= cur_val;
|
||||
}
|
||||
|
||||
/**
|
||||
Indicates whether the given table should be filtered out,
|
||||
according to the --table=X option.
|
||||
|
||||
@param log_tblname Name of table.
|
||||
|
||||
@return nonzero if the table with the given name should be
|
||||
filtered out, 0 otherwise.
|
||||
*/
|
||||
static bool shall_skip_table(const char *log_tblname)
|
||||
{
|
||||
return one_table &&
|
||||
(log_tblname != NULL) &&
|
||||
strcmp(log_tblname, table);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Prints the given event in base64 format.
|
||||
|
||||
@ -952,6 +980,12 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
Exit_status retval= OK_CONTINUE;
|
||||
IO_CACHE *const head= &print_event_info->head_cache;
|
||||
|
||||
/* Bypass flashback settings to event */
|
||||
ev->is_flashback= opt_flashback;
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
ev->need_flashback_review= opt_flashback_review;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Format events are not concerned by --offset and such, we always need to
|
||||
read them to be able to process the wanted events.
|
||||
@ -988,7 +1022,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
retval= OK_STOP;
|
||||
goto end;
|
||||
}
|
||||
if (!short_form)
|
||||
if (!short_form && !opt_flashback)
|
||||
fprintf(result_file, "# at %s\n",llstr(pos,ll_buff));
|
||||
|
||||
if (!opt_hexdump)
|
||||
@ -1214,12 +1248,128 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
case TABLE_MAP_EVENT:
|
||||
{
|
||||
Table_map_log_event *map= ((Table_map_log_event *)ev);
|
||||
if (shall_skip_database(map->get_db_name()))
|
||||
if (shall_skip_database(map->get_db_name()) ||
|
||||
shall_skip_table(map->get_table_name()))
|
||||
{
|
||||
print_event_info->m_table_map_ignored.set_table(map->get_table_id(), map);
|
||||
destroy_evt= FALSE;
|
||||
goto end;
|
||||
}
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
/* Create review table for Flashback */
|
||||
if (opt_flashback_review)
|
||||
{
|
||||
// Check if the table was already created?
|
||||
Table_map_log_event *exist_table;
|
||||
exist_table= print_event_info->m_table_map.get_table(map->get_table_id());
|
||||
|
||||
if (!exist_table)
|
||||
{
|
||||
|
||||
MYSQL *conn;
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
char tmp_sql[8096];
|
||||
int tmp_sql_offset;
|
||||
|
||||
conn = mysql_init(NULL);
|
||||
if (!mysql_real_connect(conn, host, user, pass,
|
||||
map->get_db_name(), port, sock, 0))
|
||||
{
|
||||
fprintf(stderr, "%s\n", mysql_error(conn));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (mysql_query(conn, "SET group_concat_max_len=10000;"))
|
||||
{
|
||||
fprintf(stderr, "%s\n", mysql_error(conn));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
memset(tmp_sql, 0, sizeof(tmp_sql));
|
||||
sprintf(tmp_sql, " "
|
||||
"SELECT Group_concat(cols) "
|
||||
"FROM (SELECT 'op_type char(1)' cols "
|
||||
" UNION ALL "
|
||||
" SELECT Concat('`', column_name, '_old` ', column_type, ' ', "
|
||||
" IF(character_set_name IS NOT NULL, "
|
||||
" Concat('character set ', character_set_name, ' '), ' '), "
|
||||
" IF(collation_name IS NOT NULL, "
|
||||
" Concat('collate ', collation_name, ' '), ' ')) cols "
|
||||
" FROM information_schema.columns "
|
||||
" WHERE table_schema = '%s' "
|
||||
" AND table_name = '%s' "
|
||||
" UNION ALL "
|
||||
" SELECT Concat('`', column_name, '_new` ', column_type, ' ', "
|
||||
" IF(character_set_name IS NOT NULL, "
|
||||
" Concat('character set ', character_set_name, ' '), ' '), "
|
||||
" IF(collation_name IS NOT NULL, "
|
||||
" Concat('collate ', collation_name, ' '), ' ')) cols "
|
||||
" FROM information_schema.columns "
|
||||
" WHERE table_schema = '%s' "
|
||||
" AND table_name = '%s') tmp;",
|
||||
map->get_db_name(), map->get_table_name(),
|
||||
map->get_db_name(), map->get_table_name());
|
||||
|
||||
if (mysql_query(conn, tmp_sql))
|
||||
{
|
||||
fprintf(stderr, "%s\n", mysql_error(conn));
|
||||
exit(1);
|
||||
}
|
||||
res = mysql_use_result(conn);
|
||||
if ((row = mysql_fetch_row(res)) != NULL) // only one row
|
||||
{
|
||||
if (flashback_review_dbname)
|
||||
{
|
||||
ev->set_flashback_review_dbname(flashback_review_dbname);
|
||||
}
|
||||
else
|
||||
{
|
||||
ev->set_flashback_review_dbname(map->get_db_name());
|
||||
}
|
||||
if (flashback_review_tablename)
|
||||
{
|
||||
ev->set_flashback_review_tablename(flashback_review_tablename);
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(tmp_sql, 0, sizeof(tmp_sql));
|
||||
sprintf(tmp_sql, "__%s", map->get_table_name());
|
||||
ev->set_flashback_review_tablename(tmp_sql);
|
||||
}
|
||||
memset(tmp_sql, 0, sizeof(tmp_sql));
|
||||
tmp_sql_offset= sprintf(tmp_sql, "CREATE TABLE IF NOT EXISTS");
|
||||
tmp_sql_offset+= sprintf(tmp_sql + tmp_sql_offset, " `%s`.`%s` (%s) %s",
|
||||
ev->get_flashback_review_dbname(),
|
||||
ev->get_flashback_review_tablename(),
|
||||
row[0],
|
||||
print_event_info->delimiter);
|
||||
}
|
||||
fprintf(result_file, "%s\n", tmp_sql);
|
||||
mysql_free_result(res);
|
||||
mysql_close(conn);
|
||||
}
|
||||
else
|
||||
{
|
||||
char tmp_str[128];
|
||||
|
||||
if (flashback_review_dbname)
|
||||
ev->set_flashback_review_dbname(flashback_review_dbname);
|
||||
else
|
||||
ev->set_flashback_review_dbname(map->get_db_name());
|
||||
|
||||
if (flashback_review_tablename)
|
||||
ev->set_flashback_review_tablename(flashback_review_tablename);
|
||||
else
|
||||
{
|
||||
memset(tmp_str, 0, sizeof(tmp_str));
|
||||
sprintf(tmp_str, "__%s", map->get_table_name());
|
||||
ev->set_flashback_review_tablename(tmp_str);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
The Table map is to be printed, so it's just the time when we may
|
||||
print the kept Annotate event (if there is any).
|
||||
@ -1294,6 +1444,38 @@ end:
|
||||
*/
|
||||
if (ev)
|
||||
{
|
||||
/* Holding event output if needed */
|
||||
if (!ev->output_buf.is_empty())
|
||||
{
|
||||
LEX_STRING tmp_str;
|
||||
|
||||
tmp_str.length= ev->output_buf.length();
|
||||
tmp_str.str= ev->output_buf.release();
|
||||
|
||||
if (opt_flashback)
|
||||
{
|
||||
if (ev_type == STOP_EVENT)
|
||||
stop_event_string.reset(tmp_str.str, tmp_str.length, tmp_str.length,
|
||||
&my_charset_bin);
|
||||
else
|
||||
{
|
||||
if (push_dynamic(&binlog_events, (uchar *) &tmp_str))
|
||||
{
|
||||
error("Out of memory: can't allocate memory to store the flashback events.");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my_fwrite(result_file, (const uchar *) tmp_str.str, tmp_str.length,
|
||||
MYF(MY_NABP));
|
||||
my_free(tmp_str.str);
|
||||
}
|
||||
}
|
||||
|
||||
if (remote_opt)
|
||||
ev->temp_buf= 0;
|
||||
if (destroy_evt) /* destroy it later if not set (ignored table map) */
|
||||
delete ev;
|
||||
}
|
||||
@ -1352,6 +1534,13 @@ static struct my_option my_options[] =
|
||||
"already have. NOTE: you will need a SUPER privilege to use this option.",
|
||||
&disable_log_bin, &disable_log_bin, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"flashback", 'B', "Flashback feature can rollback you committed data to a special time point.",
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
"before Flashback feature writing a row, original row can insert to review-dbname.review-tablename,"
|
||||
"and mysqlbinlog will login mysql by user(-u) and password(-p) and host(-h).",
|
||||
#endif
|
||||
&opt_flashback, &opt_flashback, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"force-if-open", 'F', "Force if binlog was not closed properly.",
|
||||
&force_if_open_opt, &force_if_open_opt, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
@ -1395,6 +1584,19 @@ static struct my_option my_options[] =
|
||||
"prefix for the file names.",
|
||||
&result_file_name, &result_file_name, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
{"review", opt_flashback_review, "Print review sql in output file.",
|
||||
&opt_flashback_review, &opt_flashback_review, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"review-dbname", opt_flashback_flashback_review_dbname,
|
||||
"Writing flashback original row data into this db",
|
||||
&flashback_review_dbname, &flashback_review_dbname,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"review-tablename", opt_flashback_flashback_review_tablename,
|
||||
"Writing flashback original row data into this table",
|
||||
&flashback_review_tablename, &flashback_review_tablename,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"server-id", 0,
|
||||
"Extract only binlog entries created by the server having the given id.",
|
||||
&server_id, &server_id, 0, GET_ULONG,
|
||||
@ -1458,6 +1660,9 @@ static struct my_option my_options[] =
|
||||
&stop_position, &stop_position, 0, GET_ULL,
|
||||
REQUIRED_ARG, (longlong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
|
||||
(ulonglong)(~(my_off_t)0), 0, 0, 0},
|
||||
{"table", 'T', "List entries for just this table (local log only).",
|
||||
&table, &table, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
|
||||
requested binlog but rather continue printing until the end of the last \
|
||||
binlog of the MySQL server. If you send the output to the same MySQL server, \
|
||||
@ -1567,6 +1772,7 @@ static void cleanup()
|
||||
{
|
||||
my_free(pass);
|
||||
my_free(database);
|
||||
my_free(table);
|
||||
my_free(host);
|
||||
my_free(user);
|
||||
my_free(const_cast<char*>(dirname_for_local_load));
|
||||
@ -1637,6 +1843,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
break;
|
||||
#endif
|
||||
#include <sslopt-case.h>
|
||||
case 'B':
|
||||
opt_flashback= 1;
|
||||
break;
|
||||
case 'd':
|
||||
one_database = 1;
|
||||
break;
|
||||
@ -1658,10 +1867,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case 'R':
|
||||
remote_opt= 1;
|
||||
break;
|
||||
case 'T':
|
||||
one_table= 1;
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
break;
|
||||
#ifdef WHEN_FLASHBACK_REVIEW_READY
|
||||
case opt_flashback_review:
|
||||
opt_flashback_review= 1;
|
||||
break;
|
||||
#endif
|
||||
case OPT_START_DATETIME:
|
||||
start_datetime= convert_str_to_timestamp(start_datetime_str);
|
||||
break;
|
||||
@ -1862,7 +2079,7 @@ static Exit_status dump_log_entries(const char* logname)
|
||||
dump_local_log_entries(&print_event_info, logname));
|
||||
|
||||
/* Set delimiter back to semicolon */
|
||||
if (!opt_raw_mode)
|
||||
if (!opt_raw_mode && !opt_flashback)
|
||||
fprintf(result_file, "DELIMITER ;\n");
|
||||
strmov(print_event_info.delimiter, ";");
|
||||
return rc;
|
||||
@ -2697,6 +2914,10 @@ int main(int argc, char** argv)
|
||||
|
||||
my_set_max_open_files(open_files_limit);
|
||||
|
||||
if (opt_flashback)
|
||||
my_init_dynamic_array(&binlog_events, sizeof(LEX_STRING), 1024, 1024,
|
||||
MYF(0));
|
||||
|
||||
if (opt_stop_never)
|
||||
to_last_remote_log= TRUE;
|
||||
|
||||
@ -2795,6 +3016,29 @@ int main(int argc, char** argv)
|
||||
start_position= BIN_LOG_HEADER_SIZE;
|
||||
}
|
||||
|
||||
/*
|
||||
If enable flashback, need to print the events from the end to the
|
||||
beginning
|
||||
*/
|
||||
if (opt_flashback)
|
||||
{
|
||||
for (uint i= binlog_events.elements; i > 0; --i)
|
||||
{
|
||||
LEX_STRING *event_str= dynamic_element(&binlog_events, i - 1,
|
||||
LEX_STRING*);
|
||||
fprintf(result_file, "%s", event_str->str);
|
||||
my_free(event_str->str);
|
||||
}
|
||||
fprintf(result_file, "COMMIT\n/*!*/;\n");
|
||||
delete_dynamic(&binlog_events);
|
||||
}
|
||||
|
||||
/* Set delimiter back to semicolon */
|
||||
if (!stop_event_string.is_empty())
|
||||
fprintf(result_file, "%s", stop_event_string.ptr());
|
||||
if (!opt_raw_mode && opt_flashback)
|
||||
fprintf(result_file, "DELIMITER ;\n");
|
||||
|
||||
if (!opt_raw_mode)
|
||||
{
|
||||
/*
|
||||
|
@ -5156,6 +5156,7 @@ uint get_errcode_from_name(const char *error_name, const char *error_end)
|
||||
handler_error_names)))
|
||||
return tmp;
|
||||
die("Unknown SQL error name '%s'", error_name);
|
||||
return 0; // Keep compiler happy
|
||||
}
|
||||
|
||||
const char *unknown_error= "<Unknown>";
|
||||
@ -5786,6 +5787,7 @@ void do_connect(struct st_command *command)
|
||||
my_bool con_shm __attribute__ ((unused))= 0;
|
||||
int read_timeout= 0;
|
||||
int write_timeout= 0;
|
||||
int connect_timeout= 0;
|
||||
struct st_connection* con_slot;
|
||||
|
||||
static DYNAMIC_STRING ds_connection_name;
|
||||
@ -5892,6 +5894,11 @@ void do_connect(struct st_command *command)
|
||||
{
|
||||
write_timeout= atoi(con_options + sizeof("write_timeout=")-1);
|
||||
}
|
||||
else if (strncasecmp(con_options, "connect_timeout=",
|
||||
sizeof("connect_timeout=")-1) == 0)
|
||||
{
|
||||
connect_timeout= atoi(con_options + sizeof("connect_timeout=")-1);
|
||||
}
|
||||
else
|
||||
die("Illegal option to connect: %.*s",
|
||||
(int) (end - con_options), con_options);
|
||||
@ -5976,6 +5983,12 @@ void do_connect(struct st_command *command)
|
||||
(char*)&write_timeout);
|
||||
}
|
||||
|
||||
if (connect_timeout)
|
||||
{
|
||||
mysql_options(con_slot->mysql, MYSQL_OPT_CONNECT_TIMEOUT,
|
||||
(char*)&connect_timeout);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
if (con_shm)
|
||||
{
|
||||
|
@ -165,21 +165,26 @@ foreach my $option (@ARGV)
|
||||
$cmakeargs = $cmakeargs." -DWITH_LIBEVENT=bundled";
|
||||
next;
|
||||
}
|
||||
if($option =~ /with-ssl=/)
|
||||
if($option =~ /with-ssl=yes/)
|
||||
{
|
||||
$cmakeargs = $cmakeargs." -DWITH_SSL=yes";
|
||||
next;
|
||||
}
|
||||
if($option =~ /with-ssl=system/)
|
||||
{
|
||||
$cmakeargs = $cmakeargs." -DWITH_SSL=system";
|
||||
next;
|
||||
}
|
||||
if($option =~ /with-ssl$/)
|
||||
{
|
||||
$cmakeargs = $cmakeargs." -DWITH_SSL=bundled";
|
||||
next;
|
||||
}
|
||||
if($option =~ /with-debug/)
|
||||
{
|
||||
$cmakeargs = $cmakeargs." -DCMAKE_BUILD_TYPE=Debug -DSECURITY_HARDENED=OFF";
|
||||
next;
|
||||
}
|
||||
if($option =~ /with-ssl/)
|
||||
{
|
||||
$cmakeargs = $cmakeargs." -DWITH_SSL=bundled";
|
||||
next;
|
||||
}
|
||||
if($option =~ /prefix=/)
|
||||
{
|
||||
$cmake_install_prefix= substr($option, 7);
|
||||
|
@ -19,9 +19,13 @@ MACRO (MYSQL_CHECK_LZ4)
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO")
|
||||
CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H)
|
||||
CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB)
|
||||
CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
|
||||
IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4=1)
|
||||
IF (HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
|
||||
ENDIF()
|
||||
LINK_LIBRARIES(lz4)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON")
|
||||
@ -35,9 +39,13 @@ MACRO (MYSQL_CHECK_LZ4_STATIC)
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO")
|
||||
CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H)
|
||||
CHECK_LIBRARY_EXISTS(liblz4.a LZ4_compress_limitedOutput "" HAVE_LZ4_LIB)
|
||||
CHECK_LIBRARY_EXISTS(liblz3.a LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
|
||||
IF(HAVE_LZ4_LIB AND HAVE_LZ4_H)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4=1)
|
||||
IF (HAVE_LZ4_COMPRESS_DEFAULT)
|
||||
ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
|
||||
ENDIF()
|
||||
LINK_LIBRARIES(liblz4.a)
|
||||
ELSE()
|
||||
IF (WITH_INNODB_LZ4 STREQUAL "ON")
|
||||
|
@ -58,13 +58,13 @@ IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT user.ps
|
||||
DEPENDS user.r ${OUTPUT_INC} ${SOURCE_INC}
|
||||
COMMAND ${GROFF} -mm ${CMAKE_CURRENT_SOURCE_DIR}/user.r > user.ps || touch user.ps)
|
||||
ADD_CUSTOM_TARGET(user.ps ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.ps)
|
||||
ADD_CUSTOM_TARGET(user_ps ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.ps)
|
||||
ENDIF(GROFF)
|
||||
IF(NROFF)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT user.t
|
||||
DEPENDS user.r ${OUTPUT_INC} ${SOURCE_INC}
|
||||
COMMAND ${NROFF} -mm ${CMAKE_CURRENT_SOURCE_DIR}/user.r > user.t || touch user.t)
|
||||
ADD_CUSTOM_TARGET(user.t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t)
|
||||
ADD_CUSTOM_TARGET(user_t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/user.t)
|
||||
ENDIF(NROFF)
|
||||
|
||||
ENDIF()
|
||||
|
35
dbug/dbug.c
35
dbug/dbug.c
@ -1213,7 +1213,7 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_)
|
||||
*
|
||||
* SYNOPSIS
|
||||
*
|
||||
* VOID _db_pargs_(_line_, keyword)
|
||||
* int _db_pargs_(_line_, keyword)
|
||||
* int _line_;
|
||||
* char *keyword;
|
||||
*
|
||||
@ -1226,12 +1226,14 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_)
|
||||
*
|
||||
*/
|
||||
|
||||
void _db_pargs_(uint _line_, const char *keyword)
|
||||
int _db_pargs_(uint _line_, const char *keyword)
|
||||
{
|
||||
CODE_STATE *cs;
|
||||
get_code_state_or_return;
|
||||
get_code_state_or_return 0;
|
||||
cs->u_line= _line_;
|
||||
cs->u_keyword= keyword;
|
||||
|
||||
return DEBUGGING && _db_keyword_(cs, cs->u_keyword, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1265,27 +1267,24 @@ void _db_doprnt_(const char *format,...)
|
||||
{
|
||||
va_list args;
|
||||
CODE_STATE *cs;
|
||||
int save_errno;
|
||||
|
||||
get_code_state_or_return;
|
||||
|
||||
va_start(args,format);
|
||||
|
||||
if (!cs->locked)
|
||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||
if (_db_keyword_(cs, cs->u_keyword, 0))
|
||||
{
|
||||
int save_errno=errno;
|
||||
DoPrefix(cs, cs->u_line);
|
||||
if (TRACING)
|
||||
Indent(cs, cs->level + 1);
|
||||
else
|
||||
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->func);
|
||||
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword);
|
||||
DbugVfprintf(cs->stack->out_file->file, format, args);
|
||||
DbugFlush(cs);
|
||||
errno=save_errno;
|
||||
}
|
||||
else if (!cs->locked)
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
save_errno=errno;
|
||||
DoPrefix(cs, cs->u_line);
|
||||
if (TRACING)
|
||||
Indent(cs, cs->level + 1);
|
||||
else
|
||||
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->func);
|
||||
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword);
|
||||
DbugVfprintf(cs->stack->out_file->file, format, args);
|
||||
DbugFlush(cs);
|
||||
errno=save_errno;
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
2
debian/mariadb-test.install
vendored
2
debian/mariadb-test.install
vendored
@ -17,7 +17,7 @@ usr/lib/mysql/plugin/qa_auth_client.so
|
||||
usr/lib/mysql/plugin/qa_auth_interface.so
|
||||
usr/lib/mysql/plugin/qa_auth_server.so
|
||||
usr/share/mysql/mysql-test/README
|
||||
usr/share/mysql/mysql-test/README.gcov
|
||||
usr/share/mysql/mysql-test/README-gcov
|
||||
usr/share/mysql/mysql-test/README.stress
|
||||
usr/share/mysql/mysql-test/disabled.def
|
||||
usr/share/mysql/mysql-test/lib
|
||||
|
@ -80,6 +80,7 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)
|
||||
../storage/innobase/buf/buf0buf.cc
|
||||
../storage/innobase/page/page0zip.cc
|
||||
../storage/innobase/os/os0file.cc
|
||||
../storage/innobase/fil/fil0crypt.cc
|
||||
)
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2014, 2016, MariaDB Corporation.
|
||||
Copyright (c) 2014, 2017, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -70,6 +70,24 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
|
||||
#define PRIuMAX "llu"
|
||||
#endif
|
||||
|
||||
/*********************************************************************
|
||||
Verify checksum for a page (iff it's encrypted)
|
||||
NOTE: currently this function can only be run in single threaded mode
|
||||
as it modifies srv_checksum_algorithm (temporarily)
|
||||
@param[in] src_fame page to verify
|
||||
@param[in] page_size page_size
|
||||
@param[in] page_no page number of given read_buf
|
||||
@param[in] strict_check true if strict-check option is enabled
|
||||
@return true if page is encrypted AND OK, false otherwise */
|
||||
UNIV_INTERN
|
||||
bool
|
||||
fil_space_verify_crypt_checksum(
|
||||
/*============================*/
|
||||
const byte* src_frame, /*!< in: page the verify */
|
||||
const page_size_t& page_size /*!< in: page size */
|
||||
,uintmax_t page_no,
|
||||
bool strict_check);
|
||||
|
||||
/* Global variables */
|
||||
static bool verbose;
|
||||
static bool just_count;
|
||||
@ -564,9 +582,25 @@ is_page_corrupted(
|
||||
}
|
||||
}
|
||||
|
||||
is_corrupted = buf_page_is_corrupted(
|
||||
true, buf, page_size, false, cur_page_num, strict_verify,
|
||||
is_log_enabled, log_file);
|
||||
/* If page is encrypted, use different checksum calculation
|
||||
as innochecksum can't decrypt pages. Note that some old InnoDB
|
||||
versions did not initialize FIL_PAGE_FILE_FLUSH_LSN field
|
||||
so if crypt checksum does not match we verify checksum using
|
||||
normal method.
|
||||
*/
|
||||
if (mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) {
|
||||
is_corrupted = fil_space_verify_crypt_checksum(buf, page_size,
|
||||
cur_page_num, strict_verify);
|
||||
} else {
|
||||
is_corrupted = true;
|
||||
}
|
||||
|
||||
if (is_corrupted) {
|
||||
is_corrupted = buf_page_is_corrupted(
|
||||
true, buf, page_size, false,
|
||||
cur_page_num, strict_verify,
|
||||
is_log_enabled, log_file);
|
||||
}
|
||||
|
||||
return(is_corrupted);
|
||||
}
|
||||
@ -1312,10 +1346,8 @@ static struct my_option innochecksum_options[] = {
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"verbose", 'v', "Verbose (prints progress every 5 seconds).",
|
||||
&verbose, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifndef DBUG_OFF
|
||||
{"debug", '#', "Output debug log. See " REFMAN "dbug-package.html",
|
||||
&dbug_setting, &dbug_setting, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif /* !DBUG_OFF */
|
||||
{"count", 'c', "Print the count of pages in the file and exits.",
|
||||
&just_count, &just_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"start_page", 's', "Start on this page number (0 based).",
|
||||
@ -1347,7 +1379,7 @@ static struct my_option innochecksum_options[] = {
|
||||
{"log", 'l', "log output.",
|
||||
&log_filename, &log_filename, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"leaf", 'l', "Examine leaf index pages",
|
||||
{"leaf", 'e', "Examine leaf index pages",
|
||||
&do_leaf, &do_leaf, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"merge", 'm', "leaf page count if merge given number of consecutive pages",
|
||||
&n_merge, &n_merge, 0, GET_ULONG, REQUIRED_ARG, 0, 0, (longlong)10L, 0, 1, 0},
|
||||
@ -1377,7 +1409,7 @@ static void usage(void)
|
||||
printf("Usage: %s [-c] [-s <start page>] [-e <end page>] "
|
||||
"[-p <page>] [-v] [-a <allow mismatches>] [-n] "
|
||||
"[-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] "
|
||||
"[-l <log>] <filename or [-]>\n", my_progname);
|
||||
"[-l <log>] [-e] <filename or [-]>\n", my_progname);
|
||||
printf("See " REFMAN "innochecksum.html for usage hints.\n");
|
||||
my_print_help(innochecksum_options);
|
||||
my_print_variables(innochecksum_options);
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
||||
#define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */
|
||||
#define HASH_THREAD_SPECIFIC 2 /* Mark allocated memory THREAD_SPECIFIC */
|
||||
|
||||
typedef uint my_hash_value_type;
|
||||
typedef uint32 my_hash_value_type;
|
||||
typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool);
|
||||
typedef my_hash_value_type (*my_hash_function)(CHARSET_INFO *,
|
||||
const uchar *, size_t);
|
||||
|
@ -219,7 +219,7 @@ typedef struct st_json_engine_t
|
||||
/* string constants. */
|
||||
|
||||
int stack[JSON_DEPTH_LIMIT]; /* Keeps the stack of nested JSON structures. */
|
||||
int *stack_p; /* The 'stack' pointer. */
|
||||
int stack_p; /* The 'stack' pointer. */
|
||||
} json_engine_t;
|
||||
|
||||
|
||||
@ -308,7 +308,7 @@ typedef const int *json_level_t;
|
||||
*/
|
||||
#define json_get_level(j) (j->stack_p)
|
||||
|
||||
int json_skip_to_level(json_engine_t *j, json_level_t level);
|
||||
int json_skip_to_level(json_engine_t *j, int level);
|
||||
|
||||
/*
|
||||
json_skip_level() works as above with just current structre.
|
||||
@ -391,6 +391,27 @@ int json_append_ascii(CHARSET_INFO *json_cs,
|
||||
uchar *json, uchar *json_end,
|
||||
const uchar *ascii, const uchar *ascii_end);
|
||||
|
||||
|
||||
/*
|
||||
Scan the JSON and return paths met one-by-one.
|
||||
json_get_path_start(&p)
|
||||
while (json_get_path_next(&p))
|
||||
{
|
||||
handle_the_next_path();
|
||||
}
|
||||
*/
|
||||
|
||||
int json_get_path_start(json_engine_t *je, CHARSET_INFO *i_cs,
|
||||
const uchar *str, const uchar *end,
|
||||
json_path_t *p);
|
||||
|
||||
|
||||
int json_get_path_next(json_engine_t *je, json_path_t *p);
|
||||
|
||||
|
||||
int json_path_compare(const json_path_t *a, const json_path_t *b);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates.
|
||||
Copyright (C) 2000-2011 Monty Program Ab
|
||||
Copyright (C) 2000, 2017, MariaDB Corporation Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -50,7 +50,7 @@ extern void _db_set_init_(const char *control);
|
||||
extern void _db_enter_(const char *_func_, const char *_file_, uint _line_,
|
||||
struct _db_stack_frame_ *_stack_frame_);
|
||||
extern void _db_return_(struct _db_stack_frame_ *_stack_frame_);
|
||||
extern void _db_pargs_(uint _line_,const char *keyword);
|
||||
extern int _db_pargs_(uint _line_,const char *keyword);
|
||||
extern void _db_doprnt_(const char *format,...)
|
||||
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
extern void _db_dump_(uint _line_,const char *keyword,
|
||||
@ -91,7 +91,7 @@ extern const char* _db_get_func_(void);
|
||||
#define DBUG_EVALUATE_IF(keyword,a1,a2) \
|
||||
(_db_keyword_(0,(keyword), 1) ? (a1) : (a2))
|
||||
#define DBUG_PRINT(keyword,arglist) \
|
||||
do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0)
|
||||
do if (_db_pargs_(__LINE__,keyword)) _db_doprnt_ arglist; while(0)
|
||||
#define DBUG_PUSH(a1) _db_push_ (a1)
|
||||
#define DBUG_POP() _db_pop_ ()
|
||||
#define DBUG_SET(a1) _db_set_ (a1)
|
||||
@ -193,8 +193,18 @@ void debug_sync_point(const char* lock_name, uint lock_timeout);
|
||||
#define DBUG_SYNC_POINT(lock_name,lock_timeout)
|
||||
#endif /* EXTRA_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# ifdef DBUG_OFF
|
||||
# define DBUG_LOG(keyword, v) do {} while (0)
|
||||
# else
|
||||
# include <sstream>
|
||||
# define DBUG_LOG(keyword, v) do { \
|
||||
if (_db_pargs_(__LINE__, keyword)) { \
|
||||
std::ostringstream _db_s; _db_s << v; \
|
||||
_db_doprnt_("%s", _db_s.str().c_str()); \
|
||||
}} while (0)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _my_dbug_h */
|
||||
|
@ -192,6 +192,14 @@ extern void my_large_free(uchar *ptr);
|
||||
#define my_large_free(A) my_free_lock((A))
|
||||
#endif /* HAVE_LARGE_PAGES */
|
||||
|
||||
void my_init_atomic_write(void);
|
||||
#ifdef __linux__
|
||||
my_bool my_test_if_atomic_write(File handle, int pagesize);
|
||||
#else
|
||||
#define my_test_if_atomic_write(A, B) 0
|
||||
#endif /* __linux__ */
|
||||
extern my_bool my_may_have_atomic_write;
|
||||
|
||||
#if defined(HAVE_ALLOCA) && !defined(HAVE_valgrind)
|
||||
#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
|
||||
#pragma alloca
|
||||
|
@ -76,3 +76,9 @@ then put your .test file and .result file(s) into a tar.gz archive,
|
||||
add a README that explains the problem, ftp the archive to
|
||||
ftp://ftp.askmonty.org/private and submit a report to
|
||||
http://mariadb.org/jira about it.
|
||||
|
||||
The latest information about mysql-test-run can be found at:
|
||||
https://mariadb.com/kb/en/mariadb/mysqltest/
|
||||
|
||||
If you want to create .rdiff files, check
|
||||
https://mariadb.com/kb/en/mariadb/mysql-test-auxiliary-files/
|
||||
|
@ -2,12 +2,14 @@ To be able to see the level of coverage with the current test suite,
|
||||
do the following:
|
||||
|
||||
- Make sure gcov is installed
|
||||
- Compile the MySQL distribution with BUILD/compile-pentium-gcov (if your
|
||||
- Compile the MySQL distribution with BUILD/compile-pentium64-gcov (if your
|
||||
machine does not have a pentium CPU, hack this script, or just live with
|
||||
the pentium-specific stuff)
|
||||
- In the mysql-test directory, run this command: ./mysql-test-run -gcov
|
||||
- To see the level of coverage for a given source file:
|
||||
grep source_file_name /tmp/gcov.out
|
||||
grep -1 source_file_name ../mysql-test-gcov.msg
|
||||
- To see which lines are not yet covered, look at source_file_name.gcov in
|
||||
the source tree. Then think hard about a test case that will cover those
|
||||
lines, and write one!
|
||||
the source tree. You can find this by doing something like:
|
||||
find source-directory -name "mysqld.cc.gcov"
|
||||
Then think hard about a test case that will cover those lines, and write
|
||||
one!
|
198
mysql-test/dgcov.pl
Executable file
198
mysql-test/dgcov.pl
Executable file
@ -0,0 +1,198 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
# Copyright (C) 2003,2008 MySQL AB
|
||||
# Copyright (C) 2010,2017 Sergei Golubchik and MariaDB Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# Run gcov and report test coverage on only those code lines touched by
|
||||
# a given list of commits.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
use File::Find;
|
||||
use Cwd qw/realpath/;
|
||||
|
||||
my $opt_verbose=0;
|
||||
my $opt_generate;
|
||||
my $opt_help;
|
||||
my $opt_purge;
|
||||
my $opt_only_gcov;
|
||||
my $opt_skip_gcov;
|
||||
|
||||
my %cov;
|
||||
my $file_no=0;
|
||||
|
||||
GetOptions
|
||||
("v|verbose+" => \$opt_verbose,
|
||||
"h|help" => \$opt_help,
|
||||
"p|purge" => \$opt_purge,
|
||||
"g|generate" => \$opt_generate,
|
||||
"o|only-gcov" => \$opt_only_gcov,
|
||||
"s|skip-gcov" => \$opt_skip_gcov,
|
||||
) or usage();
|
||||
|
||||
usage() if $opt_help;
|
||||
|
||||
sub logv(@) { print STDERR @_,"\n" if $opt_verbose; }
|
||||
sub gcov_prefix($) { defined($_[0]) ? $_[0] || '#####' : '-' }
|
||||
|
||||
my $root= `git rev-parse --show-toplevel`;
|
||||
chomp $root;
|
||||
|
||||
die "Failed to find tree root" unless $root;
|
||||
$root=realpath($root).'/';
|
||||
logv "Chdir $root";
|
||||
chdir $root or die "chdir($root): $!";
|
||||
|
||||
my $res;
|
||||
my $cmd;
|
||||
if ($opt_purge)
|
||||
{
|
||||
$cmd= "find . -name '*.da' -o -name '*.gcda' -o -name '*.gcov' -o ".
|
||||
"-name '*.dgcov' | grep -v 'README\.gcov' | xargs rm -f ''";
|
||||
logv "Running: $cmd";
|
||||
system($cmd)==0 or die "system($cmd): $? $!";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
find(\&gcov_one_file, $root);
|
||||
find(\&write_coverage, $root) if $opt_generate;
|
||||
exit 0 if $opt_only_gcov;
|
||||
|
||||
if (@ARGV) {
|
||||
print_gcov_for_diff(@ARGV);
|
||||
} else {
|
||||
print_gcov_for_diff('HEAD') or print_gcov_for_diff('HEAD^');
|
||||
}
|
||||
exit 0;
|
||||
|
||||
sub print_gcov_for_diff {
|
||||
$cmd="git diff --no-prefix --ignore-space-change @_";
|
||||
logv "Running: $cmd";
|
||||
open PIPE, '-|', $cmd or die "Failed to popen '$cmd': $!: $?";
|
||||
my ($lnum, $cnt, $fcov, $acc, $printme, $fname);
|
||||
while (<PIPE>) {
|
||||
if (/^diff --git (.*) \1\n/) {
|
||||
print $acc if $printme;
|
||||
$fname=$1;
|
||||
$acc="dgcov $fname";
|
||||
$acc=('*' x length($acc)) . "\n$acc\n" . ('*' x length($acc));
|
||||
$lnum=undef;
|
||||
$fcov=$cov{realpath($fname)};
|
||||
$printme=0;
|
||||
logv "File: $fname";
|
||||
next;
|
||||
}
|
||||
if (/^@@ -\d+,\d+ \+(\d+),(\d+) @@/ and $fcov) {
|
||||
$lnum=$1;
|
||||
$cnt=$2;
|
||||
$acc.="\n@@ +$lnum,$cnt @\@$'";
|
||||
logv " lines: $lnum,",$lnum+$cnt;
|
||||
next;
|
||||
}
|
||||
next unless $lnum and $cnt;
|
||||
$acc.=sprintf '%9s:%5s:%s', '', $lnum, $' if /^ /;
|
||||
++$printme, $acc.=sprintf '%9s:%5s:%s', gcov_prefix($fcov->{$lnum}), $lnum, $' if /^\+/;
|
||||
die "$_^^^ dying", unless /^[- +]/;
|
||||
++$lnum;
|
||||
--$cnt;
|
||||
}
|
||||
print $acc if $printme;
|
||||
close PIPE or die "command '$cmd' failed: $!: $?";
|
||||
return defined($fname);
|
||||
}
|
||||
|
||||
sub usage {
|
||||
print <<END;
|
||||
Usage: $0 --help
|
||||
$0 [options] [git diff arguments]
|
||||
|
||||
The dgcov program runs gcov for code coverage analysis, and reports missing
|
||||
coverage only for those lines that are changed by the specified commit(s).
|
||||
Commits are specified in the format of git diff arguments. For example:
|
||||
* All unpushed commits: $0 \@{u} HEAD
|
||||
* All uncommitted changes: $0 HEAD
|
||||
* Specific commit: $0 <commit>^ <commit>
|
||||
|
||||
If no arguments are specified, it prints the coverage for all uncommitted
|
||||
changes, if any, otherwise for the last commit.
|
||||
|
||||
Options:
|
||||
|
||||
-h --help This help.
|
||||
-v --verbose Show commands run.
|
||||
-p --purge Delete all test coverage information, to prepare for a
|
||||
new coverage test.
|
||||
-o --only-gcov Stop after running gcov, don't run git
|
||||
-s --skip-gcov Do not run gcov, assume .gcov files are already in place
|
||||
-g --generate Create .dgcov files for all source files
|
||||
|
||||
Prior to running this tool, MariaDB should be built with
|
||||
|
||||
cmake -DENABLE_GCOV=ON
|
||||
|
||||
and the testsuite should be run. dgcov will report the coverage
|
||||
for all lines modified in the specified commits.
|
||||
END
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
||||
sub gcov_one_file {
|
||||
return unless /\.gcda$/;
|
||||
unless ($opt_skip_gcov) {
|
||||
$cmd= "gcov -i '$_' 2>/dev/null >/dev/null";
|
||||
print STDERR ++$file_no,"\r" if not $opt_verbose and -t STDERR;
|
||||
logv "Running: $cmd";
|
||||
system($cmd)==0 or die "system($cmd): $? $!";
|
||||
}
|
||||
|
||||
# now, read the generated file
|
||||
open FH, '<', "$_.gcov" or die "open(<$_.gcov): $!";
|
||||
my $fname;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if (/^function:/) {
|
||||
next;
|
||||
}
|
||||
if (/^file:/) {
|
||||
$fname=realpath($');
|
||||
next;
|
||||
}
|
||||
next if /^lcount:\d+,-\d+/; # whatever that means
|
||||
unless (/^lcount:(\d+),(\d+)/ and $fname) {
|
||||
warn "unknown line '$_' after running '$cmd'";
|
||||
next;
|
||||
}
|
||||
$cov{$fname}->{$1}+=$2;
|
||||
}
|
||||
close(FH);
|
||||
}
|
||||
|
||||
sub write_coverage {
|
||||
my $fn=$File::Find::name;
|
||||
my $h=$cov{$fn};
|
||||
return unless $h and $root eq substr $fn, 0, length($root);
|
||||
open I, '<', $fn or die "open(<$fn): $!";
|
||||
open O, '>', "$fn.dgcov" or die "open(>$fn.dgcov): $!";
|
||||
logv "Annotating: ", substr $fn, length($root);
|
||||
while (<I>) {
|
||||
printf O '%9s:%5s:%s', gcov_prefix($h->{$.}), $., $_;
|
||||
}
|
||||
close I;
|
||||
close O;
|
||||
}
|
@ -71,7 +71,7 @@ source include/binlog_inject_error.inc;
|
||||
let $query= DROP VIEW v1;
|
||||
source include/binlog_inject_error.inc;
|
||||
|
||||
let $query= CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
|
||||
let $query= CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
|
||||
source include/binlog_inject_error.inc;
|
||||
|
||||
let $query= DROP PROCEDURE p1;
|
||||
|
3
mysql-test/include/have_unzip.inc
Normal file
3
mysql-test/include/have_unzip.inc
Normal file
@ -0,0 +1,3 @@
|
||||
#
|
||||
# empty. the real check happens in suite.pm
|
||||
#
|
@ -47,8 +47,8 @@ if ($rpl_debug)
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
shutdown_server 10;
|
||||
# it 60 seconds to die before zapping it
|
||||
shutdown_server 60;
|
||||
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
|
@ -82,8 +82,14 @@ perl;
|
||||
}
|
||||
$ENV{'SEARCH_FILE'} =~ s{^.*?([^/\\]+)$}{$1};
|
||||
if ($content =~ m{$search_pattern}) {
|
||||
die "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
if $ENV{SEARCH_ABORT} eq 'FOUND';
|
||||
print "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
unless defined $ENV{SEARCH_ABORT};
|
||||
} else {
|
||||
die "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
if $ENV{SEARCH_ABORT} eq 'NOT FOUND';
|
||||
print "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
unless defined $ENV{SEARCH_ABORT};
|
||||
}
|
||||
EOF
|
||||
|
@ -1,7 +1,14 @@
|
||||
# Include this script only after using shutdown_mysqld.inc
|
||||
# where $_expect_file_name was initialized.
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
if ($restart_parameters)
|
||||
{
|
||||
--exec echo "restart: $restart_parameters" > $_expect_file_name
|
||||
}
|
||||
if (!$restart_parameters)
|
||||
{
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
}
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
@ -1,71 +0,0 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# This is a library file used by the Perl version of mysql-test-run,
|
||||
# and is part of the translation of the Bourne shell script with the
|
||||
# same name.
|
||||
|
||||
use strict;
|
||||
|
||||
our $basedir;
|
||||
|
||||
sub gcov_prepare ($) {
|
||||
my ($dir)= @_;
|
||||
print "Purging gcov information from '$dir'...\n";
|
||||
|
||||
system("find $dir -name \*.gcov -o -name \*.da"
|
||||
. " -o -name \*.gcda | grep -v 'README.gcov\$' | xargs rm");
|
||||
}
|
||||
|
||||
#
|
||||
# Collect gcov statistics.
|
||||
# Arguments:
|
||||
# $dir basedir, normally build directory
|
||||
# $gcov gcov utility program [path] name
|
||||
# $gcov_msg message file name
|
||||
# $gcov_err error file name
|
||||
#
|
||||
sub gcov_collect ($$$) {
|
||||
my ($dir, $gcov, $gcov_msg, $gcov_err)= @_;
|
||||
|
||||
# Get current directory to return to later.
|
||||
my $start_dir= cwd();
|
||||
|
||||
print "Collecting source coverage info using '$gcov'...$basedir\n";
|
||||
-f "$dir/$gcov_msg" and unlink("$dir/$gcov_msg");
|
||||
-f "$dir/$gcov_err" and unlink("$dir/$gcov_err");
|
||||
|
||||
my @dirs= `find "$dir" -type d -print | sort`;
|
||||
#print "List of directories:\n@dirs\n";
|
||||
|
||||
foreach my $d ( @dirs ) {
|
||||
chomp($d);
|
||||
chdir($d) or next;
|
||||
|
||||
my @flist= glob("*.*.gcno");
|
||||
print ("Collecting in '$d'...\n") if @flist;
|
||||
|
||||
foreach my $f (@flist) {
|
||||
system("$gcov $f 2>>$dir/$gcov_err >>$dir/$gcov_msg");
|
||||
system("perl", "$basedir/mysql-test/lib/process-purecov-annotations.pl", "$f.gcov");
|
||||
}
|
||||
chdir($start_dir);
|
||||
}
|
||||
print "gcov info in $dir/$gcov_msg, errors in $dir/$gcov_err\n";
|
||||
}
|
||||
|
||||
|
||||
1;
|
@ -104,7 +104,6 @@ use IO::Select;
|
||||
|
||||
require "mtr_process.pl";
|
||||
require "mtr_io.pl";
|
||||
require "mtr_gcov.pl";
|
||||
require "mtr_gprof.pl";
|
||||
require "mtr_misc.pl";
|
||||
|
||||
@ -183,6 +182,7 @@ my @DEFAULT_SUITES= qw(
|
||||
innodb_fts-
|
||||
innodb_gis-
|
||||
innodb_zip-
|
||||
json-
|
||||
maria-
|
||||
multi_source-
|
||||
optimizer_unfixed_bugs-
|
||||
@ -248,11 +248,6 @@ our $opt_mem= $ENV{'MTR_MEM'};
|
||||
our $opt_clean_vardir= $ENV{'MTR_CLEAN_VARDIR'};
|
||||
|
||||
our $opt_gcov;
|
||||
our $opt_gcov_src_dir;
|
||||
our $opt_gcov_exe= "gcov";
|
||||
our $opt_gcov_err= "mysql-test-gcov.err";
|
||||
our $opt_gcov_msg= "mysql-test-gcov.msg";
|
||||
|
||||
our $opt_gprof;
|
||||
our %gprof_dirs;
|
||||
|
||||
@ -383,11 +378,6 @@ sub main {
|
||||
# --help will not reach here, so now it's safe to assume we have binaries
|
||||
My::SafeProcess::find_bin();
|
||||
|
||||
if ( $opt_gcov ) {
|
||||
gcov_prepare($basedir . "/" . $opt_gcov_src_dir);
|
||||
}
|
||||
|
||||
|
||||
print "vardir: $opt_vardir\n";
|
||||
initialize_servers();
|
||||
init_timers();
|
||||
@ -431,6 +421,10 @@ sub main {
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($opt_gcov) {
|
||||
system './dgcov.pl --purge';
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
my $num_tests= @$tests;
|
||||
if ( $opt_parallel eq "auto" ) {
|
||||
@ -555,15 +549,15 @@ sub main {
|
||||
|
||||
mtr_print_line();
|
||||
|
||||
if ( $opt_gcov ) {
|
||||
gcov_collect($basedir . "/" . $opt_gcov_src_dir, $opt_gcov_exe,
|
||||
$opt_gcov_msg, $opt_gcov_err);
|
||||
}
|
||||
|
||||
print_total_times($opt_parallel) if $opt_report_times;
|
||||
|
||||
mtr_report_stats($prefix, $fail, $completed, $extra_warnings);
|
||||
|
||||
if ($opt_gcov) {
|
||||
mtr_report("Running dgcov");
|
||||
system "./dgcov.pl --generate > $opt_vardir/last_changes.dgcov";
|
||||
}
|
||||
|
||||
if ( @$completed != $num_tests)
|
||||
{
|
||||
mtr_error("Not all tests completed (only ". scalar(@$completed) .
|
||||
@ -1148,7 +1142,6 @@ sub command_line_setup {
|
||||
|
||||
# Coverage, profiling etc
|
||||
'gcov' => \$opt_gcov,
|
||||
'gcov-src-dir=s' => \$opt_gcov_src_dir,
|
||||
'gprof' => \$opt_gprof,
|
||||
'valgrind|valgrind-all' => \$opt_valgrind,
|
||||
'valgrind-mysqltest' => \$opt_valgrind_mysqltest,
|
||||
@ -6180,9 +6173,6 @@ Misc options
|
||||
actions. Disable facility with NUM=0.
|
||||
gcov Collect coverage information after the test.
|
||||
The result is a gcov file per source and header file.
|
||||
gcov-src-dir=subdir Collect coverage only within the given subdirectory.
|
||||
For example, if you're only developing the SQL layer,
|
||||
it makes sense to use --gcov-src-dir=sql
|
||||
gprof Collect profiling information using gprof.
|
||||
experimental=<file> Refer to list of tests considered experimental;
|
||||
failures will be marked exp-fail instead of fail.
|
||||
|
@ -2089,6 +2089,21 @@ tab1 CREATE TABLE `tab1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE `tab1`;
|
||||
#
|
||||
# MDEV-11548 Reproducible server crash after the 2nd ALTER TABLE ADD FOREIGN KEY IF NOT EXISTS
|
||||
#
|
||||
CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY);
|
||||
CREATE TABLE t2 (id1 INT UNSIGNED NOT NULL);
|
||||
ALTER TABLE t2
|
||||
ADD FOREIGN KEY IF NOT EXISTS (id1)
|
||||
REFERENCES t1 (id);
|
||||
ALTER TABLE t2
|
||||
ADD FOREIGN KEY IF NOT EXISTS (id1)
|
||||
REFERENCES t1 (id);
|
||||
Warnings:
|
||||
Note 1061 Duplicate key name 'id1'
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
|
@ -45,70 +45,6 @@ repeat('a',10000) desc,
|
||||
repeat('a',10000)
|
||||
with rollup
|
||||
;
|
||||
col435
|
||||
0.00000000000000000
|
||||
0.00000000000000000
|
||||
0.00000000000000000
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00k\xBF\xC0\x00\x00\x00\x00\x00j\xF8@'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x006\x0E\xFD\xB9PVh,;b\xC2\xBA\xF6$\xEE\xB0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC0\xAE\xDB\xC0'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00j\xF8@\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||
ERROR HY000: Illegal parameter data types int and geometry for operation '='
|
||||
set session sort_buffer_size= default;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
@ -583,7 +583,7 @@ show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`cast(1 as unsigned)` int(1) unsigned NOT NULL,
|
||||
`cast(1 as signed)` int(1) NOT NULL,
|
||||
`cast(1 as signed)` int(2) NOT NULL,
|
||||
`cast(1 as double(5,2))` double(5,2) DEFAULT NULL,
|
||||
`cast(1 as decimal(5,3))` decimal(5,3) NOT NULL,
|
||||
`cast("A" as binary)` varbinary(1) NOT NULL,
|
||||
@ -822,3 +822,74 @@ utf8_bin
|
||||
select collation(cast("a" as char(10) binary ascii));
|
||||
collation(cast("a" as char(10) binary ascii))
|
||||
latin1_bin
|
||||
#
|
||||
# MDEV-11030 Assertion `precision > 0' failed in decimal_bin_size
|
||||
#
|
||||
SELECT * FROM (SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL)) sq;
|
||||
IFNULL(CONVERT(NULL, UNSIGNED), NULL)
|
||||
NULL
|
||||
CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`IFNULL(CONVERT(NULL, UNSIGNED), NULL)` decimal(1,0) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT COALESCE(CONVERT(NULL, UNSIGNED), NULL);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`COALESCE(CONVERT(NULL, UNSIGNED), NULL)` decimal(1,0) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT CASE WHEN TRUE THEN CONVERT(NULL, UNSIGNED) ELSE NULL END;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`CASE WHEN TRUE THEN CONVERT(NULL, UNSIGNED) ELSE NULL END` decimal(1,0) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL,SIGNED),CONVERT(NULL,UNSIGNED)) AS a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` decimal(1,0) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT
|
||||
-1,
|
||||
CONVERT(NULL,SIGNED),
|
||||
CONCAT(CONVERT(NULL,SIGNED)),
|
||||
1,
|
||||
CONVERT(NULL,UNSIGNED),
|
||||
CONCAT(CONVERT(NULL,UNSIGNED));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`-1` int(2) NOT NULL,
|
||||
`CONVERT(NULL,SIGNED)` int(2) DEFAULT NULL,
|
||||
`CONCAT(CONVERT(NULL,SIGNED))` varchar(2) DEFAULT NULL,
|
||||
`1` int(1) NOT NULL,
|
||||
`CONVERT(NULL,UNSIGNED)` int(1) unsigned DEFAULT NULL,
|
||||
`CONCAT(CONVERT(NULL,UNSIGNED))` varchar(1) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT
|
||||
CONVERT('',SIGNED),
|
||||
CONCAT(CONVERT('',SIGNED)),
|
||||
CONVERT('',UNSIGNED),
|
||||
CONCAT(CONVERT('',UNSIGNED));
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`CONVERT('',SIGNED)` int(2) NOT NULL,
|
||||
`CONCAT(CONVERT('',SIGNED))` varchar(2) NOT NULL,
|
||||
`CONVERT('',UNSIGNED)` int(1) unsigned NOT NULL,
|
||||
`CONCAT(CONVERT('',UNSIGNED))` varchar(1) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
@ -927,3 +927,15 @@ Sergei Golubchik Development DE
|
||||
Claudio Nanni Support ES
|
||||
Sergei Petrunia Development RU
|
||||
drop table employees;
|
||||
#
|
||||
# MDEV-11818: EXPLAIN EXTENDED for a query with optimized away CTE table
|
||||
#
|
||||
CREATE TABLE t1 (i INT, c VARCHAR(3));
|
||||
INSERT INTO t1 VALUES (1,'foo');
|
||||
EXPLAIN EXTENDED
|
||||
WITH cte AS ( SELECT * FROM t1 ) SELECT i FROM cte;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 with cte as (select `test`.`t1`.`i` AS `i`,`test`.`t1`.`c` AS `c` from `test`.`t1`)select 1 AS `i` from dual
|
||||
DROP TABLE t1;
|
||||
|
@ -2327,3 +2327,84 @@ a b dist
|
||||
7 6 3
|
||||
DROP VIEW edges2;
|
||||
DROP TABLE edges;
|
||||
#
|
||||
# MDEV-11674: recursive CTE table that cannot be stored
|
||||
# in a heap table
|
||||
#
|
||||
create table t1 (id int, test_data varchar(36));
|
||||
insert into t1(id, test_data)
|
||||
select id, test_data
|
||||
from (
|
||||
with recursive data_generator(id, test_data) as (
|
||||
select 1 as id, uuid() as test_data
|
||||
union all
|
||||
select id + 1, uuid() from data_generator where id < 150000
|
||||
)
|
||||
select * from data_generator
|
||||
) as a;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-10773: ANALYZE for query with recursive CTE
|
||||
#
|
||||
analyze format=json
|
||||
with recursive src(counter) as
|
||||
(select 1
|
||||
union
|
||||
select counter+1 from src where counter<10
|
||||
) select * from src;
|
||||
ANALYZE
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"r_loops": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 1,
|
||||
"rows": 2,
|
||||
"r_rows": 10,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
"r_filtered": 100,
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"recursive_union": {
|
||||
"table_name": "<union2,3>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 0,
|
||||
"r_rows": null,
|
||||
"query_specifications": [
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"table": {
|
||||
"message": "No tables used"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"r_loops": 10,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ALL",
|
||||
"r_loops": 10,
|
||||
"rows": 2,
|
||||
"r_rows": 1,
|
||||
"r_total_time_ms": "REPLACED",
|
||||
"filtered": 100,
|
||||
"r_filtered": 90,
|
||||
"attached_condition": "src.counter < 10"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -480,6 +480,10 @@ a b
|
||||
2 2
|
||||
3 4
|
||||
drop table t1;
|
||||
CREATE OR REPLACE TABLE t1 (a INT DEFAULT @v);
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a INT DEFAULT @v:=1);
|
||||
drop table t1;
|
||||
#
|
||||
# Error handling
|
||||
#
|
||||
@ -516,10 +520,6 @@ CREATE TABLE t1 (a INT DEFAULT(?));
|
||||
Got one of the listed errors
|
||||
CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a));
|
||||
ERROR 01000: Expression for field `a` is refering to uninitialized field `b`
|
||||
CREATE TABLE t1 (a INT DEFAULT @v);
|
||||
ERROR HY000: Function or expression '@v' cannot be used in the DEFAULT clause of `a`
|
||||
CREATE TABLE t1 (a INT DEFAULT @v:=1);
|
||||
ERROR HY000: Function or expression '@v' cannot be used in the DEFAULT clause of `a`
|
||||
CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy'));
|
||||
ERROR HY000: Function or expression 'name_const()' cannot be used in the DEFAULT clause of `a`
|
||||
CREATE TABLE t1 (a INT DEFAULT COUNT(*));
|
||||
@ -3269,6 +3269,44 @@ INSERT INTO t1 VALUES (1),(2),(3);
|
||||
EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFAULT,DEFAULT;
|
||||
ERROR HY000: Default/ignore value is not supported for such parameter usage
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-11134 Assertion `fixed' failed in Item::const_charset_converter(THD*, CHARSET_INFO*, bool, const char*)
|
||||
#
|
||||
SET NAMES utf8;
|
||||
PREPARE stmt FROM "CREATE OR REPLACE TABLE t1 (c CHAR(8) DEFAULT ?)";
|
||||
SET @a='';
|
||||
EXECUTE stmt USING @a;
|
||||
EXECUTE stmt USING @a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(8) DEFAULT ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET @a='A';
|
||||
EXECUTE stmt USING @a;
|
||||
EXECUTE stmt USING @a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(8) DEFAULT 'A'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET @a=_utf8 0xC380;
|
||||
EXECUTE stmt USING @a;
|
||||
EXECUTE stmt USING @a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(8) DEFAULT 'À'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET @a=_utf8 0xD18F;
|
||||
EXECUTE stmt USING @a;
|
||||
ERROR 42000: Invalid default value for 'c'
|
||||
EXECUTE stmt USING @a;
|
||||
ERROR 42000: Invalid default value for 'c'
|
||||
DEALLOCATE PREPARE stmt;
|
||||
# end of 10.2 test
|
||||
set sql_mode=ansi_quotes;
|
||||
create table t1 (a int, b int default (a+1));
|
||||
|
@ -8241,3 +8241,112 @@ SELECT * FROM v1 WHERE v1.d IN ( SELECT MIN(d) FROM t2 WHERE 0 );
|
||||
d
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-11820: second execution of PS for query
|
||||
# with false subquery predicate in WHERE
|
||||
#
|
||||
CREATE TABLE t1 (c VARCHAR(3)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('foo'),('bar');
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
|
||||
CREATE TABLE t2 (a INT);
|
||||
INSERT INTO t2 VALUES (3), (4);
|
||||
PREPARE stmt1 FROM
|
||||
" SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'";
|
||||
PREPARE stmt2 FROM
|
||||
"EXPLAIN FORMAT=JSON
|
||||
SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'";
|
||||
EXECUTE stmt1;
|
||||
c
|
||||
foo
|
||||
EXECUTE stmt2;
|
||||
EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "v1.c = 'foo'",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t1.c = 'foo'"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"subqueries": [
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "1 = t2.a"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
INSERT INTO t2 SELECT a+1 FROM t2;
|
||||
INSERT INTO t2 SELECT a+1 FROM t2;
|
||||
INSERT INTO t2 SELECT a+1 FROM t2;
|
||||
INSERT INTO t2 SELECT a+1 FROM t2;
|
||||
INSERT INTO t2 SELECT a+1 FROM t2;
|
||||
INSERT INTO t2 SELECT a+1 FROM t2;
|
||||
EXECUTE stmt1;
|
||||
c
|
||||
foo
|
||||
EXECUTE stmt2;
|
||||
EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "<in_optimizer>(1,<exists>(subquery#2)) or v1.c = 'foo'",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"subqueries": [
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 128,
|
||||
"filtered": 100,
|
||||
"attached_condition": "1 = t2.a"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
DEALLOCATE PREPARE stmt2;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -212,6 +212,12 @@ json_extract('1', '$')
|
||||
select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]');
|
||||
json_extract('[10, 20, [30, 40], 1, 10]', '$[1]')
|
||||
20
|
||||
select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]');
|
||||
json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]')
|
||||
[20]
|
||||
select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a');
|
||||
json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a')
|
||||
[[3, 4]]
|
||||
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word');
|
||||
json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word')
|
||||
{"a":1, "b":{"c":1, "k1":"word"}, "d":[1, 2]}
|
||||
@ -438,3 +444,53 @@ json CREATE TABLE `json` (
|
||||
`j` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table json;
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' )
|
||||
1
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' )
|
||||
1
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0]' )
|
||||
1
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0][0]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0][0][0]' )
|
||||
1
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2]' )
|
||||
2
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0]' )
|
||||
2
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0]' )
|
||||
2
|
||||
select json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0][0]' );
|
||||
json_length( '[ 1, [ 2, 3, 4 ], {"a":5, "b":6} ]', '$[2][0][0][0]' )
|
||||
2
|
||||
select json_length( '{"a":{"b":{"d":1}}, "a":{"c":{"d":1, "j":2}}}', '$.a[0][0][0].c' );
|
||||
json_length( '{"a":{"b":{"d":1}}, "a":{"c":{"d":1, "j":2}}}', '$.a[0][0][0].c' )
|
||||
2
|
||||
select json_set('1', '$[0]', 100);
|
||||
json_set('1', '$[0]', 100)
|
||||
100
|
||||
select json_set('1', '$[0][0]', 100);
|
||||
json_set('1', '$[0][0]', 100)
|
||||
100
|
||||
select json_set('1', '$[1]', 100);
|
||||
json_set('1', '$[1]', 100)
|
||||
[1, 100]
|
||||
select json_set('{"a":12}', '$[0]', 100);
|
||||
json_set('{"a":12}', '$[0]', 100)
|
||||
100
|
||||
select json_set('{"a":12}', '$[0].a', 100);
|
||||
json_set('{"a":12}', '$[0].a', 100)
|
||||
{"a":100}
|
||||
select json_set('{"a":12}', '$[0][0].a', 100);
|
||||
json_set('{"a":12}', '$[0][0].a', 100)
|
||||
{"a":100}
|
||||
select json_set('{"a":12}', '$[0][1].a', 100);
|
||||
json_set('{"a":12}', '$[0][1].a', 100)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_set'
|
||||
|
@ -305,3 +305,50 @@ ERROR HY000: Function or expression 'st_gis_debug()' cannot be used in the DEFAU
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.3 tests
|
||||
#
|
||||
#
|
||||
# Comparison data type aggregation for pluggable data types
|
||||
#
|
||||
SET SESSION debug_dbug="+d,Item_func_in";
|
||||
SET SESSION debug_dbug="+d,Predicant_to_list_comparator";
|
||||
CREATE TABLE t1 (a POINT);
|
||||
INSERT INTO t1 VALUES (POINT(1,1)),(POINT(1,2)),(POINT(1,3));
|
||||
SELECT COUNT(*) FROM t1 WHERE a IN (POINT(1,1),POINT(10,20),POINT(10,30));
|
||||
COUNT(*)
|
||||
1
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (geometry)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (geometry)
|
||||
Note 1105 DBUG: [2] arg=3 handler=0 (geometry)
|
||||
Note 1105 DBUG: types_compatible=yes bisect=yes
|
||||
SELECT COUNT(*) FROM t1 WHERE a IN (POINT(1,1),POINT(10,20),POINT(10,30),'test');
|
||||
COUNT(*)
|
||||
1
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (geometry)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (geometry)
|
||||
Note 1105 DBUG: [2] arg=3 handler=0 (geometry)
|
||||
Note 1105 DBUG: [3] arg=4 handler=3 (longblob)
|
||||
Note 1105 DBUG: types_compatible=no bisect=no
|
||||
SELECT COUNT(*) FROM t1 WHERE a IN ('test','test1');
|
||||
COUNT(*)
|
||||
0
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (longblob)
|
||||
Note 1105 DBUG: types_compatible=yes bisect=yes
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TEXT);
|
||||
INSERT INTO t1 VALUES ('test'),('test1'),('test2');
|
||||
SELECT * FROM t1 WHERE a IN ('test',POINT(1,1));
|
||||
a
|
||||
test
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (longblob)
|
||||
Note 1105 DBUG: types_compatible=yes bisect=yes
|
||||
DROP TABLE t1;
|
||||
SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
|
||||
SET SESSION debug_dbug="-d,Item_func_in";
|
||||
|
66
mysql-test/r/gis-json.result
Normal file
66
mysql-test/r/gis-json.result
Normal file
@ -0,0 +1,66 @@
|
||||
select st_asgeojson(geomfromtext('POINT(1 1)'));
|
||||
st_asgeojson(geomfromtext('POINT(1 1)'))
|
||||
{"type": "Point", "coordinates": [1, 1]}
|
||||
select st_asgeojson(geomfromtext('LINESTRING(10 10,20 10,20 20,10 20,10 10)'));
|
||||
st_asgeojson(geomfromtext('LINESTRING(10 10,20 10,20 20,10 20,10 10)'))
|
||||
{"type": "LineString", "coordinates": [[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]}
|
||||
select st_asgeojson(geomfromtext('POLYGON((10 10,20 10,20 20,10 20,10 10))'));
|
||||
st_asgeojson(geomfromtext('POLYGON((10 10,20 10,20 20,10 20,10 10))'))
|
||||
{"type": "Polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}
|
||||
select st_asgeojson(geomfromtext('MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10)))'));
|
||||
st_asgeojson(geomfromtext('MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10)))'))
|
||||
{"type": "MultiPolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}
|
||||
select st_asgeojson(geomfromtext('multilinestring((10 10,20 10,20 20,10 20,10 10))'));
|
||||
st_asgeojson(geomfromtext('multilinestring((10 10,20 10,20 20,10 20,10 10))'))
|
||||
{"type": "MultiLineString", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}
|
||||
select st_asgeojson(geomfromtext('multipoint(10 10,20 10,20 20,10 20,10 10)'));
|
||||
st_asgeojson(geomfromtext('multipoint(10 10,20 10,20 20,10 20,10 10)'))
|
||||
{"type": "MultiPoint", "coordinates": [[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]}
|
||||
select st_asgeojson(st_geomfromtext('GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1))'));
|
||||
st_asgeojson(st_geomfromtext('GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1))'))
|
||||
{"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [100, 0]}, {"type": "LineString", "coordinates": [[101, 0], [102, 1]]}]}
|
||||
SELECT st_astext(st_geomfromgeojson('{"type":"point","coordinates":[1,2]}'));
|
||||
st_astext(st_geomfromgeojson('{"type":"point","coordinates":[1,2]}'))
|
||||
POINT(1 2)
|
||||
SELECT st_astext(st_geomfromgeojson('{"type":"LineString","coordinates":[[1,2],[4,5],[7,8]]}'));
|
||||
st_astext(st_geomfromgeojson('{"type":"LineString","coordinates":[[1,2],[4,5],[7,8]]}'))
|
||||
LINESTRING(1 2,4 5,7 8)
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}'));
|
||||
st_astext(st_geomfromgeojson('{"type": "polygon", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}'))
|
||||
POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
SELECT st_astext(st_geomfromgeojson('{"type":"multipoint","coordinates":[[1,2],[4,5],[7,8]]}'));
|
||||
st_astext(st_geomfromgeojson('{"type":"multipoint","coordinates":[[1,2],[4,5],[7,8]]}'))
|
||||
MULTIPOINT(1 2,4 5,7 8)
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "multilinestring", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}'));
|
||||
st_astext(st_geomfromgeojson('{"type": "multilinestring", "coordinates": [[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]}'))
|
||||
MULTILINESTRING((10 10,20 10,20 20,10 20,10 10))
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "multipolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}'));
|
||||
st_astext(st_geomfromgeojson('{"type": "multipolygon", "coordinates": [[[[10, 10], [20, 10], [20, 20], [10, 20], [10, 10]]]]}'))
|
||||
MULTIPOLYGON(((10 10,20 10,20 20,10 20,10 10)))
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "GeometryCollection", "geometries": [{"type": "Point","coordinates": [100.0, 0.0]}, {"type": "LineString","coordinates": [[101.0, 0.0],[102.0, 1.0]]}]}'));
|
||||
st_astext(st_geomfromgeojson('{"type": "GeometryCollection", "geometries": [{"type": "Point","coordinates": [100.0, 0.0]}, {"type": "LineString","coordinates": [[101.0, 0.0],[102.0, 1.0]]}]}'))
|
||||
GEOMETRYCOLLECTION(POINT(100 0),LINESTRING(101 0,102 1))
|
||||
SELECT st_astext(st_geomfromgeojson('{"type":"point"}'));
|
||||
st_astext(st_geomfromgeojson('{"type":"point"}'))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4048 Incorrect GeoJSON format specified for st_geomfromgeojson function.
|
||||
SELECT st_astext(st_geomfromgeojson('{"type":"point"'));
|
||||
st_astext(st_geomfromgeojson('{"type":"point"'))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4037 Unexpected end of JSON text in argument 1 to function 'st_geomfromgeojson'
|
||||
SELECT st_astext(st_geomfromgeojson('{"type""point"}'));
|
||||
st_astext(st_geomfromgeojson('{"type""point"}'))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4038 Syntax error in JSON text in argument 1 to function 'st_geomfromgeojson' at position 7
|
||||
SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'));
|
||||
st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'))
|
||||
POINT(102 0.5)
|
||||
SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'));
|
||||
st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'))
|
||||
GEOMETRYCOLLECTION(POINT(102 0.5))
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
@ -1017,7 +1017,7 @@ GEOMFROMTEXT(
|
||||
'multipolygon(((1 2,3 4,5 6,7 8,9 8),(7 6,5 4,3 2,1 2,3 4)))'));
|
||||
# must not crash
|
||||
SELECT 1 FROM t1 WHERE a <> (SELECT GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
|
||||
1
|
||||
ERROR HY000: Illegal parameter data types int and geometry for operation '<>'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49250 : spatial btree index corruption and crash
|
||||
@ -1645,11 +1645,7 @@ FLUSH TABLES;
|
||||
SELECT 1 FROM g1
|
||||
FORCE INDEX(i) WHERE a = date_sub(now(), interval 2808.4 year_month)
|
||||
;
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?'
|
||||
Warning 1441 Datetime function: datetime field overflow
|
||||
Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\x00@'
|
||||
ERROR HY000: Illegal parameter data types geometry and datetime for operation '='
|
||||
DROP TABLE g1;
|
||||
#
|
||||
# Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE
|
||||
@ -2814,5 +2810,906 @@ DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
#
|
||||
# MDEV-11692 Comparison data type aggregation for pluggable data types
|
||||
#
|
||||
CREATE PROCEDURE p2(query TEXT)
|
||||
BEGIN
|
||||
DECLARE errcount INT DEFAULT 0;
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
SET errcount = errcount+1;
|
||||
GET DIAGNOSTICS CONDITION 1 @p= MESSAGE_TEXT;
|
||||
SELECT @p AS `ERROR: `;
|
||||
END;
|
||||
SELECT query AS ``;
|
||||
EXECUTE IMMEDIATE query;
|
||||
END;
|
||||
$$
|
||||
CREATE PROCEDURE p1(query TEXT)
|
||||
BEGIN
|
||||
SELECT query AS `-------------------------------------`;
|
||||
EXECUTE IMMEDIATE query;
|
||||
CALL p2('SELECT a=b FROM t1');
|
||||
CALL p2('SELECT b=a FROM t1');
|
||||
CALL p2('SELECT a BETWEEN b AND c FROM t1');
|
||||
CALL p2('SELECT a IN (b,c) FROM t1');
|
||||
CALL p2('SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1');
|
||||
CALL p2('SELECT a=POINT(1,1) FROM t1');
|
||||
CALL p2('SELECT POINT(1,1)=a FROM t1');
|
||||
CALL p2('SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1');
|
||||
CALL p2('SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1');
|
||||
CALL p2('SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1');
|
||||
DROP TABLE t1;
|
||||
END;
|
||||
$$
|
||||
CALL p1('CREATE TABLE t1 (a CHAR(10), b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a CHAR(10), b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a VARCHAR(10), b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a VARCHAR(10), b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a TINYTEXT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a TINYTEXT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a TEXT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a TEXT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a MEDIUMTEXT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a MEDIUMTEXT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a LONGTEXT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a LONGTEXT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a ENUM("a","b"), b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a ENUM("a","b"), b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
CALL p1('CREATE TABLE t1 (a TINYINT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a TINYINT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and tinyint for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and tinyint for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types tinyint and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a SMALLINT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a SMALLINT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and smallint for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and smallint for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types smallint and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a MEDIUMINT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a MEDIUMINT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and mediumint for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and mediumint for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types mediumint and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a INT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a INT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and int for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and int for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types int and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a BIGINT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a BIGINT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and bigint for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and bigint for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bigint and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a FLOAT, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a FLOAT, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and float for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and float for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types float and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a DOUBLE, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a DOUBLE, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and double for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and double for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types double and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a DECIMAL(10,2), b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a DECIMAL(10,2), b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and decimal for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and decimal for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types decimal and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a BIT(8), b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a BIT(8), b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and bit for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and bit for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types bit and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a TIME, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a TIME, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and time for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and time for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types time and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a DATE, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a DATE, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and date for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and date for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types date and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a DATETIME, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a DATETIME, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and datetime for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and datetime for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types datetime and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a TIMESTAMP, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a TIMESTAMP, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and timestamp for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and timestamp for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types timestamp and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a YEAR, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a YEAR, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation '='
|
||||
|
||||
SELECT b=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and year for operation '='
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation 'case..when'
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation '='
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types geometry and year for operation '='
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation 'between'
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation 'in'
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
ERROR:
|
||||
Illegal parameter data types year and geometry for operation 'case..when'
|
||||
CALL p1('CREATE TABLE t1 (a Point, b Point, c Point)');
|
||||
-------------------------------------
|
||||
CREATE TABLE t1 (a Point, b Point, c Point)
|
||||
|
||||
SELECT a=b FROM t1
|
||||
a=b
|
||||
|
||||
SELECT b=a FROM t1
|
||||
b=a
|
||||
|
||||
SELECT a BETWEEN b AND c FROM t1
|
||||
a BETWEEN b AND c
|
||||
|
||||
SELECT a IN (b,c) FROM t1
|
||||
a IN (b,c)
|
||||
|
||||
SELECT CASE a WHEN b THEN "a" WHEN c THEN "b" END FROM t1
|
||||
CASE a WHEN b THEN "a" WHEN c THEN "b" END
|
||||
|
||||
SELECT a=POINT(1,1) FROM t1
|
||||
a=POINT(1,1)
|
||||
|
||||
SELECT POINT(1,1)=a FROM t1
|
||||
POINT(1,1)=a
|
||||
|
||||
SELECT a BETWEEN POINT(1,1) AND POINT(1,2) FROM t1
|
||||
a BETWEEN POINT(1,1) AND POINT(1,2)
|
||||
|
||||
SELECT a IN (POINT(1,1),POINT(1,2)) FROM t1
|
||||
a IN (POINT(1,1),POINT(1,2))
|
||||
|
||||
SELECT CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END FROM t1
|
||||
CASE a WHEN POINT(1,1) THEN "a" WHEN POINT(1,2) THEN "b" END
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -276,6 +276,57 @@ ERROR HY000: Unknown system variable 'option'
|
||||
set option option=1;
|
||||
ERROR HY000: Unknown system variable 'option'
|
||||
#
|
||||
# MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved
|
||||
#
|
||||
CREATE TABLE EXCLUDE (EXCLUDE INT);
|
||||
SELECT EXCLUDE FROM EXCLUDE;
|
||||
EXCLUDE
|
||||
SELECT EXCLUDE EXCLUDE FROM EXCLUDE;
|
||||
EXCLUDE
|
||||
SELECT EXCLUDE AS EXCLUDE FROM EXCLUDE;
|
||||
EXCLUDE
|
||||
DROP TABLE EXCLUDE;
|
||||
CREATE TABLE UNBOUNDED (UNBOUNDED INT);
|
||||
SELECT UNBOUNDED FROM UNBOUNDED;
|
||||
UNBOUNDED
|
||||
SELECT UNBOUNDED UNBOUNDEX FROM UNBOUNDED;
|
||||
UNBOUNDEX
|
||||
SELECT UNBOUNDED AS UNBOUNDEX FROM UNBOUNDED;
|
||||
UNBOUNDEX
|
||||
DROP TABLE UNBOUNDED;
|
||||
CREATE TABLE PRECEDING (PRECEDING INT);
|
||||
SELECT PRECEDING FROM PRECEDING;
|
||||
PRECEDING
|
||||
SELECT PRECEDING PRECEDING FROM PRECEDING;
|
||||
PRECEDING
|
||||
SELECT PRECEDING AS PRECEDING FROM PRECEDING;
|
||||
PRECEDING
|
||||
DROP TABLE PRECEDING;
|
||||
CREATE TABLE FOLLOWING (FOLLOWING INT);
|
||||
SELECT FOLLOWING FROM FOLLOWING;
|
||||
FOLLOWING
|
||||
SELECT FOLLOWING FOLLOWING FROM FOLLOWING;
|
||||
FOLLOWING
|
||||
SELECT FOLLOWING AS FOLLOWING FROM FOLLOWING;
|
||||
FOLLOWING
|
||||
DROP TABLE FOLLOWING;
|
||||
CREATE TABLE TIES (TIES INT);
|
||||
SELECT TIES FROM TIES;
|
||||
TIES
|
||||
SELECT TIES TIES FROM TIES;
|
||||
TIES
|
||||
SELECT TIES AS TIES FROM TIES;
|
||||
TIES
|
||||
DROP TABLE TIES;
|
||||
CREATE TABLE OTHERS (OTHERS INT);
|
||||
SELECT OTHERS FROM OTHERS;
|
||||
OTHERS
|
||||
SELECT OTHERS OTHERS FROM OTHERS;
|
||||
OTHERS
|
||||
SELECT OTHERS AS OTHERS FROM OTHERS;
|
||||
OTHERS
|
||||
DROP TABLE OTHERS;
|
||||
#
|
||||
# MDEV-10585 EXECUTE IMMEDIATE statement
|
||||
#
|
||||
CREATE TABLE immediate (immediate int);
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- mysqld--help.result 2016-09-21 13:50:58.682767100 +0000
|
||||
+++ mysqld--help,win.reject 2016-09-21 13:57:57.494626000 +0000
|
||||
--- mysqld--help.result 2016-11-04 13:35:06.665881700 +0000
|
||||
+++ mysqld--help,win.reject 2016-11-04 13:58:39.030512500 +0000
|
||||
@@ -318,7 +318,6 @@
|
||||
The number of segments in a key cache
|
||||
-L, --language=name Client error messages in given language. May be given as
|
||||
@ -8,7 +8,7 @@
|
||||
--lc-messages=name Set the language used for the error messages.
|
||||
-L, --lc-messages-dir=name
|
||||
Directory where error messages are
|
||||
@@ -517,6 +516,7 @@
|
||||
@@ -521,6 +520,7 @@
|
||||
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
|
||||
DATETIME, TIMESTAMP columns.
|
||||
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
|
||||
@ -16,7 +16,7 @@
|
||||
--net-buffer-length=#
|
||||
Buffer length for TCP/IP and socket communication
|
||||
--net-read-timeout=#
|
||||
@@ -924,6 +924,9 @@
|
||||
@@ -931,6 +931,9 @@
|
||||
characteristics (isolation level, read only/read
|
||||
write,snapshot - but not any work done / data modified
|
||||
within the transaction).
|
||||
@ -26,7 +26,7 @@
|
||||
--show-slave-auth-info
|
||||
Show user and password in SHOW SLAVE HOSTS on this
|
||||
master.
|
||||
@@ -1036,6 +1039,10 @@
|
||||
@@ -1043,6 +1046,10 @@
|
||||
Log slow queries to given log file. Defaults logging to
|
||||
'hostname'-slow.log. Must be enabled to activate other
|
||||
slow log options
|
||||
@ -37,7 +37,7 @@
|
||||
--socket=name Socket file to use for connection
|
||||
--sort-buffer-size=#
|
||||
Each thread that needs to do a sort allocates a buffer of
|
||||
@@ -1054,6 +1061,7 @@
|
||||
@@ -1061,6 +1068,7 @@
|
||||
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
|
||||
--stack-trace Print a symbolic stack trace on failure
|
||||
(Defaults to on; use --skip-stack-trace to disable.)
|
||||
@ -45,7 +45,7 @@
|
||||
--standards-compliant-cte
|
||||
Allow only standards compiant CTE
|
||||
(Defaults to on; use --skip-standards-compliant-cte to disable.)
|
||||
@@ -1102,6 +1110,11 @@
|
||||
@@ -1109,6 +1117,11 @@
|
||||
--thread-pool-max-threads=#
|
||||
Maximum allowed number of worker threads in the thread
|
||||
pool
|
||||
@ -57,7 +57,7 @@
|
||||
--thread-pool-oversubscribe=#
|
||||
How many additional active worker threads in a group are
|
||||
allowed.
|
||||
@@ -1132,8 +1145,8 @@
|
||||
@@ -1139,8 +1152,8 @@
|
||||
size, MySQL will automatically convert it to an on-disk
|
||||
MyISAM or Aria table
|
||||
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
|
||||
@ -68,7 +68,7 @@
|
||||
--transaction-alloc-block-size=#
|
||||
Allocation block size for transactions to be stored in
|
||||
binary log
|
||||
@@ -1257,7 +1270,6 @@
|
||||
@@ -1264,7 +1277,6 @@
|
||||
key-cache-division-limit 100
|
||||
key-cache-file-hash-size 512
|
||||
key-cache-segments 0
|
||||
@ -76,7 +76,7 @@
|
||||
lc-messages en_US
|
||||
lc-messages-dir MYSQL_SHAREDIR/
|
||||
lc-time-names en_US
|
||||
@@ -1324,6 +1336,7 @@
|
||||
@@ -1333,6 +1345,7 @@
|
||||
myisam-stats-method NULLS_UNEQUAL
|
||||
myisam-use-mmap FALSE
|
||||
mysql56-temporal-format TRUE
|
||||
@ -84,7 +84,7 @@
|
||||
net-buffer-length 16384
|
||||
net-read-timeout 30
|
||||
net-retry-count 10
|
||||
@@ -1424,6 +1437,8 @@
|
||||
@@ -1434,6 +1447,8 @@
|
||||
session-track-state-change FALSE
|
||||
session-track-system-variables
|
||||
session-track-transaction-info OFF
|
||||
@ -93,7 +93,7 @@
|
||||
show-slave-auth-info FALSE
|
||||
silent-startup FALSE
|
||||
skip-grant-tables TRUE
|
||||
@@ -1448,6 +1463,7 @@
|
||||
@@ -1458,6 +1473,7 @@
|
||||
slave-type-conversions
|
||||
slow-launch-time 2
|
||||
slow-query-log FALSE
|
||||
@ -101,7 +101,7 @@
|
||||
sort-buffer-size 2097152
|
||||
sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||
stack-trace TRUE
|
||||
@@ -1461,14 +1477,16 @@
|
||||
@@ -1471,14 +1487,16 @@
|
||||
sync-relay-log 10000
|
||||
sync-relay-log-info 10000
|
||||
sysdate-is-now FALSE
|
||||
@ -114,7 +114,7 @@
|
||||
tc-heuristic-recover OFF
|
||||
thread-cache-size 151
|
||||
thread-pool-idle-timeout 60
|
||||
thread-pool-max-threads 1000
|
||||
thread-pool-max-threads 65536
|
||||
+thread-pool-min-threads 1
|
||||
+thread-pool-mode windows
|
||||
thread-pool-oversubscribe 3
|
||||
|
@ -208,6 +208,9 @@ The following options may be given as the first argument:
|
||||
--extra-port=# Extra port number to use for tcp connections in a
|
||||
one-thread-per-connection manner. 0 means don't use
|
||||
another port
|
||||
--flashback Setup the server to use flashback. This enables binary
|
||||
log in row mode and will enable extra logging for DDL's
|
||||
needed by flashback feature
|
||||
--flush Flush MyISAM tables to disk between SQL commands
|
||||
--flush-time=# A dedicated thread is created to flush all tables at the
|
||||
given interval
|
||||
@ -461,6 +464,10 @@ The following options may be given as the first argument:
|
||||
--max-seeks-for-key=#
|
||||
Limit assumed max number of seeks when looking up rows
|
||||
based on a key
|
||||
--max-session-mem-used=#
|
||||
Amount of memory a single user session is allowed to
|
||||
allocate. This limits the value of the session variable
|
||||
MEM_USED
|
||||
--max-sort-length=# The number of bytes to use when sorting BLOB or TEXT
|
||||
values (only the first max_sort_length bytes of each
|
||||
value are used; the rest are ignored)
|
||||
@ -1229,6 +1236,7 @@ explicit-defaults-for-timestamp FALSE
|
||||
external-locking FALSE
|
||||
extra-max-connections 1
|
||||
extra-port 0
|
||||
flashback FALSE
|
||||
flush FALSE
|
||||
flush-time 0
|
||||
ft-boolean-syntax + -><()~*:""&|
|
||||
@ -1311,6 +1319,7 @@ max-prepared-stmt-count 16382
|
||||
max-recursive-iterations 18446744073709551615
|
||||
max-relay-log-size 1073741824
|
||||
max-seeks-for-key 18446744073709551615
|
||||
max-session-mem-used 9223372036854775807
|
||||
max-sort-length 1024
|
||||
max-sp-recursion-depth 0
|
||||
max-statement-time 0
|
||||
@ -1478,7 +1487,7 @@ table-open-cache-instances 8
|
||||
tc-heuristic-recover OFF
|
||||
thread-cache-size 151
|
||||
thread-pool-idle-timeout 60
|
||||
thread-pool-max-threads 1000
|
||||
thread-pool-max-threads 65536
|
||||
thread-pool-oversubscribe 3
|
||||
thread-pool-prio-kickup-timer 1000
|
||||
thread-pool-priority auto
|
||||
|
@ -2439,7 +2439,7 @@ SELECT 1 FROM t1 WHERE b < SOME
|
||||
GROUP BY b WITH ROLLUP
|
||||
HAVING b > geomfromtext("")
|
||||
);
|
||||
1
|
||||
ERROR HY000: Illegal parameter data types mediumint and geometry for operation '>'
|
||||
DROP TABLE t1;
|
||||
|
||||
MDEV-612 Valgrind error in ha_maria::check_if_incompatible_data
|
||||
|
@ -37,14 +37,10 @@ call mtr.add_suppression("InnoDB: Error: table `test`.`t1` .* InnoDB internal");
|
||||
#
|
||||
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
|
||||
#
|
||||
SET @old_innodb_file_format = @@global.innodb_file_format;
|
||||
SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
|
||||
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = Barracuda,
|
||||
@@global.innodb_file_per_table = ON,
|
||||
SET @@global.innodb_file_per_table = ON,
|
||||
@@global.innodb_strict_mode = ON;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
connect con1,localhost,root,,;
|
||||
CREATE TABLE t1 (id INT NOT NULL
|
||||
PRIMARY KEY,
|
||||
@ -106,9 +102,6 @@ DROP TABLE t1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = @old_innodb_file_format;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
@ -160,4 +153,3 @@ ROLLBACK;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE `t``\""e`;
|
||||
SET NAMES DEFAULT;
|
||||
|
@ -2158,35 +2158,31 @@ Warning 1052 Column 'kundentyp' in group statement is ambiguous
|
||||
drop table t1;
|
||||
SET optimizer_switch=@save_optimizer_switch;
|
||||
connection default;
|
||||
SELECT sleep(5.5);
|
||||
SELECT sleep(50);
|
||||
connect con2,localhost,root,,;
|
||||
connection con2;
|
||||
SELECT sleep(5);
|
||||
SELECT sleep(50);
|
||||
# -- Success: more than --thread_pool_max_threads normal connections not possible
|
||||
connection default;
|
||||
sleep(5.5)
|
||||
0
|
||||
connection con2;
|
||||
sleep(5)
|
||||
0
|
||||
connection default;
|
||||
SELECT sleep(5);
|
||||
connection con2;
|
||||
SELECT sleep(5);
|
||||
connect extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,;
|
||||
connection extracon;
|
||||
SELECT 'Connection on extra port ok';
|
||||
Connection on extra port ok
|
||||
Connection on extra port ok
|
||||
SELECT sleep(5.5);
|
||||
connect extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,;
|
||||
connection extracon2;
|
||||
SELECT 'Connection on extra port 2 ok';
|
||||
Connection on extra port 2 ok
|
||||
Connection on extra port 2 ok
|
||||
# -- Success: more than --extra-max-connections + 1 normal connections not possible
|
||||
connection extracon2;
|
||||
KILL QUERY <default_connection_ID>;
|
||||
KILL QUERY <con2_connection_ID>;
|
||||
connection default;
|
||||
sleep(5)
|
||||
0
|
||||
sleep(50)
|
||||
1
|
||||
connection con2;
|
||||
sleep(5)
|
||||
sleep(50)
|
||||
1
|
||||
connection extracon;
|
||||
sleep(5.5)
|
||||
0
|
||||
|
@ -4747,3 +4747,26 @@ INSERT INTO t1 VALUES (1),(2),(3);
|
||||
EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFAULT,DEFAULT;
|
||||
ERROR HY000: Default/ignore value is not supported for such parameter usage
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-11780 Crash with PREPARE + SP out parameter + literal
|
||||
#
|
||||
CREATE OR REPLACE PROCEDURE p1(OUT a INT)
|
||||
BEGIN
|
||||
SET a=10;
|
||||
END;
|
||||
$$
|
||||
PREPARE stmt FROM 'CALL p1(?)';
|
||||
EXECUTE stmt USING 10;
|
||||
ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
|
||||
EXECUTE stmt USING DEFAULT;
|
||||
ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
|
||||
EXECUTE stmt USING IGNORE;
|
||||
ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
|
||||
DEALLOCATE PREPARE stmt;
|
||||
EXECUTE IMMEDIATE 'CALL p1(?)' USING 10;
|
||||
ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
|
||||
EXECUTE IMMEDIATE 'CALL p1(?)' USING DEFAULT;
|
||||
ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
|
||||
EXECUTE IMMEDIATE 'CALL p1(?)' USING IGNORE;
|
||||
ERROR 42000: OUT or INOUT argument 1 for routine test.p1 is not a variable or NEW pseudo-variable in BEFORE trigger
|
||||
DROP PROCEDURE p1;
|
||||
|
@ -652,7 +652,9 @@ v1 v2
|
||||
3 4
|
||||
ALTER TABLE t1 ADD COLUMN v3 int;
|
||||
execute stmt;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.* FROM t1' at line 1
|
||||
v1 v2 v3
|
||||
1 2 NULL
|
||||
3 4 NULL
|
||||
ALTER TABLE t1 drop COLUMN v3;
|
||||
deallocate prepare stmt;
|
||||
''
|
||||
@ -670,7 +672,9 @@ v1 v2
|
||||
3 4
|
||||
ALTER TABLE t1 ADD COLUMN v3 int;
|
||||
execute stmt;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.* FROM t1' at line 1
|
||||
v1 v2 v3
|
||||
1 2 NULL
|
||||
3 4 NULL
|
||||
ALTER TABLE t1 drop COLUMN v3;
|
||||
deallocate prepare stmt;
|
||||
SELECT @@sql_mode;
|
||||
|
@ -340,3 +340,26 @@ f1()
|
||||
DROP FUNCTION f1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #16672723 "CAN'T FIND TEMPORARY TABLE".
|
||||
#
|
||||
CREATE FUNCTION f1() RETURNS INT RETURN 1;
|
||||
CREATE TEMPORARY TABLE tmp1(a INT);
|
||||
PREPARE stmt1 FROM "CREATE TEMPORARY TABLE tmp2 AS SELECT b FROM (SELECT f1() AS b FROM tmp1) AS t";
|
||||
# The below statement failed before the fix.
|
||||
EXECUTE stmt1;
|
||||
DROP TEMPORARY TABLES tmp1, tmp2;
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
DROP FUNCTION f1;
|
||||
create procedure sp1()
|
||||
begin
|
||||
drop table if exists t1, t2;
|
||||
create temporary table t1 select 1 v;
|
||||
create table t2 (col varchar(45)) select distinct col from (select sf1() as col from t1) t;
|
||||
end$$
|
||||
create function sf1() returns text return 'blah';
|
||||
call test.sp1();
|
||||
call test.sp1();
|
||||
drop procedure sp1;
|
||||
drop function sf1;
|
||||
drop table t2;
|
||||
|
@ -742,3 +742,20 @@ DROP FUNCTION test_function;
|
||||
test_function(@to_var9)
|
||||
wxyz\_ef
|
||||
|
||||
# END OF CASE - STRING LILTERAL WITH BACKSLASH IN FUNCTION RETURNING STRING
|
||||
DROP TABLE test_table;
|
||||
DROP FUNCTION test_function;
|
||||
SET @@sql_mode= @org_mode;
|
||||
|
||||
#End of Test for Bug#12601974
|
||||
#
|
||||
# MDEV-11848 Automatic statement repreparation changes query semantics
|
||||
#
|
||||
SET sql_mode=DEFAULT;
|
||||
CREATE OR REPLACE TABLE t1 (a TEXT);
|
||||
PREPARE stmt FROM 'INSERT INTO t1 (a) VALUES (2||3)';
|
||||
EXECUTE stmt;
|
||||
SET sql_mode=ORACLE;
|
||||
EXECUTE stmt;
|
||||
ALTER TABLE t1 ADD b INT;
|
||||
EXECUTE stmt;
|
||||
|
@ -1318,5 +1318,18 @@ id
|
||||
1
|
||||
2
|
||||
drop table t1,t2,t3;
|
||||
#
|
||||
# MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (c INT) ENGINE=InnoDB;
|
||||
CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
|
||||
SELECT * FROM t1, t2
|
||||
WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ;
|
||||
a pk b
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP VIEW v3;
|
||||
# This must be the last in the file:
|
||||
set optimizer_switch=@subselect_sj2_tmp;
|
||||
|
@ -1333,6 +1333,19 @@ id
|
||||
1
|
||||
2
|
||||
drop table t1,t2,t3;
|
||||
#
|
||||
# MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (c INT) ENGINE=InnoDB;
|
||||
CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
|
||||
SELECT * FROM t1, t2
|
||||
WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ;
|
||||
a pk b
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP VIEW v3;
|
||||
# This must be the last in the file:
|
||||
set optimizer_switch=@subselect_sj2_tmp;
|
||||
#
|
||||
|
@ -1320,6 +1320,19 @@ id
|
||||
1
|
||||
2
|
||||
drop table t1,t2,t3;
|
||||
#
|
||||
# MDEV-11108: Assertion `uniq_tuple_length_arg <= table->file->max_key_length()' failed in SJ_TMP_TABLE::create_sj_weedout_tmp_table
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (pk BLOB, b INT, PRIMARY KEY(pk(1000))) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (c INT) ENGINE=InnoDB;
|
||||
CREATE OR REPLACE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
|
||||
SELECT * FROM t1, t2
|
||||
WHERE a IN ( SELECT b FROM t2 LEFT JOIN v3 ON ( c = b ) ) ;
|
||||
a pk b
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP VIEW v3;
|
||||
# This must be the last in the file:
|
||||
set optimizer_switch=@subselect_sj2_tmp;
|
||||
set optimizer_switch=default;
|
||||
|
@ -354,3 +354,13 @@ show columns from t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) NO PRI NULL
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
pk int primary key,
|
||||
i int,
|
||||
v1 int as (i) virtual,
|
||||
v2 int as (i) virtual
|
||||
);
|
||||
create trigger tr before update on t1 for each row set @a = 1;
|
||||
insert into t1 (pk, i) values (null, null);
|
||||
ERROR 23000: Column 'pk' cannot be null
|
||||
drop table t1;
|
||||
|
@ -5848,6 +5848,31 @@ f1 f2
|
||||
drop table t1, t2;
|
||||
SELECT 1 FROM (SELECT 1 as a) AS b HAVING (SELECT `SOME_GARBAGE`.b.a)=1;
|
||||
ERROR 42S22: Unknown column 'SOME_GARBAGE.b.a' in 'field list'
|
||||
#
|
||||
# MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1
|
||||
# FOR UPDATE
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
insert into t1 values (1),(2);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` for update latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
1
|
||||
2
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` lock in share mode latin1 latin1_swedish_ci
|
||||
select * from v1;
|
||||
a
|
||||
1
|
||||
2
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 10.0 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
@ -2382,3 +2382,81 @@ pk c CNT
|
||||
10 2 0.5000
|
||||
drop view v1,v2,v3,v4;
|
||||
drop table t0,t1;
|
||||
#
|
||||
# MDEV-10875: window function in subquery
|
||||
#
|
||||
CREATE TABLE t1 (i INT);
|
||||
INSERT INTO t1 VALUES (3),(1);
|
||||
CREATE TABLE t2 (c VARCHAR(8));
|
||||
INSERT INTO t2 VALUES ('foo'),('bar'),('foo');
|
||||
SELECT COUNT(*) OVER (PARTITION BY c) FROM t2;
|
||||
COUNT(*) OVER (PARTITION BY c)
|
||||
2
|
||||
1
|
||||
2
|
||||
SELECT * FROM t1 WHERE i IN ( SELECT COUNT(*) OVER (PARTITION BY c) FROM t2 );
|
||||
i
|
||||
1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# MDEV-9976: window function without PARTITION BY and ORDER BY
|
||||
#
|
||||
CREATE TABLE t1 (id int, a int);
|
||||
INSERT INTO t1 VALUES
|
||||
(1,1000), (2,1100), (3,1800), (4,1500), (5,1700), (6,1200),
|
||||
(7,2000), (8,2100), (9,1600);
|
||||
SELECT id, sum(a) OVER (PARTITION BY id
|
||||
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
|
||||
FROM t1;
|
||||
id sum(a) OVER (PARTITION BY id
|
||||
1 1000
|
||||
2 1100
|
||||
3 1800
|
||||
4 1500
|
||||
5 1700
|
||||
6 1200
|
||||
7 2000
|
||||
8 2100
|
||||
9 1600
|
||||
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
|
||||
SELECT id, sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
|
||||
FROM t1;
|
||||
id sum(a) OVER (ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
|
||||
1 14000
|
||||
2 13000
|
||||
3 5900
|
||||
4 10700
|
||||
5 7600
|
||||
6 11900
|
||||
7 4100
|
||||
8 2100
|
||||
9 9200
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-11867: window function with aggregation
|
||||
# over the result of grouping
|
||||
#
|
||||
create table t1 (
|
||||
username varchar(32),
|
||||
amount int
|
||||
);
|
||||
insert into t1 values
|
||||
('user1',1),
|
||||
('user1',5),
|
||||
('user1',3),
|
||||
('user2',10),
|
||||
('user2',20),
|
||||
('user2',30);
|
||||
select username, sum(amount) as s, avg(sum(amount)) over (order by s desc)
|
||||
from t1
|
||||
group by username;
|
||||
username s avg(sum(amount)) over (order by s desc)
|
||||
user1 9 34.5000
|
||||
user2 60 60.0000
|
||||
select username, sum(amount), avg(sum(amount)) over (order by sum(amount) desc)
|
||||
from t1
|
||||
group by username;
|
||||
username sum(amount) avg(sum(amount)) over (order by sum(amount) desc)
|
||||
user1 9 34.5000
|
||||
user2 60 60.0000
|
||||
drop table t1;
|
||||
|
@ -68,6 +68,8 @@ sub skip_combinations {
|
||||
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
|
||||
and $1 ge "1.0.1d";
|
||||
|
||||
$skip{'include/have_unzip.inc'} = 'no unzip executable' unless `unzip`;
|
||||
|
||||
%skip;
|
||||
}
|
||||
|
||||
|
@ -139,3 +139,10 @@ flush tables;
|
||||
create table t1 (a int) engine=archive;
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
drop table t1;
|
||||
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
||||
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
||||
DROP TABLE t1;
|
||||
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
DROP TABLE t1;
|
||||
|
@ -132,3 +132,13 @@ flush tables;
|
||||
create table t1 (a int) engine=archive;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-11317: Error in deleting non existing .frm for tables with disocvery
|
||||
#
|
||||
|
||||
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
||||
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
||||
DROP TABLE t1;
|
||||
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
86
mysql-test/suite/binlog/r/binlog_stm_sp.result
Normal file
86
mysql-test/suite/binlog/r/binlog_stm_sp.result
Normal file
@ -0,0 +1,86 @@
|
||||
#
|
||||
# MDEV-11815 SP variables of temporal data types do not replicate correctly
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 123;
|
||||
DECLARE b8 BIT(8) DEFAULT 0x61;
|
||||
DECLARE t0 TIME DEFAULT '01:01:01';
|
||||
DECLARE t6 TIME(6) DEFAULT '01:01:01.123456';
|
||||
DECLARE d DATE DEFAULT '2001-01-01';
|
||||
DECLARE dt0 DATETIME DEFAULT '2001-01-01 01:01:01';
|
||||
DECLARE dt6 DATETIME(6) DEFAULT '2001-01-01 01:01:01.123456';
|
||||
DECLARE ts0 TIMESTAMP DEFAULT '2001-01-01 01:01:01';
|
||||
DECLARE ts6 TIMESTAMP(6) DEFAULT '2001-01-01 01:01:01.123456';
|
||||
INSERT INTO t1 VALUES (i=0x61);
|
||||
INSERT INTO t1 VALUES (b8=0x61);
|
||||
INSERT INTO t1 VALUES (t0=10101);
|
||||
INSERT INTO t1 VALUES (t6=10101);
|
||||
INSERT INTO t1 VALUES (d=20010101);
|
||||
INSERT INTO t1 VALUES (dt0=20010101010101);
|
||||
INSERT INTO t1 VALUES (dt6=20010101010101);
|
||||
INSERT INTO t1 VALUES (ts0=20010101010101);
|
||||
INSERT INTO t1 VALUES (ts6=20010101010101);
|
||||
END;
|
||||
$$
|
||||
CALL p1;
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(a INT)
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 123;
|
||||
DECLARE b8 BIT(8) DEFAULT 0x61;
|
||||
DECLARE t0 TIME DEFAULT '01:01:01';
|
||||
DECLARE t6 TIME(6) DEFAULT '01:01:01.123456';
|
||||
DECLARE d DATE DEFAULT '2001-01-01';
|
||||
DECLARE dt0 DATETIME DEFAULT '2001-01-01 01:01:01';
|
||||
DECLARE dt6 DATETIME(6) DEFAULT '2001-01-01 01:01:01.123456';
|
||||
DECLARE ts0 TIMESTAMP DEFAULT '2001-01-01 01:01:01';
|
||||
DECLARE ts6 TIMESTAMP(6) DEFAULT '2001-01-01 01:01:01.123456';
|
||||
INSERT INTO t1 VALUES (i=0x61);
|
||||
INSERT INTO t1 VALUES (b8=0x61);
|
||||
INSERT INTO t1 VALUES (t0=10101);
|
||||
INSERT INTO t1 VALUES (t6=10101);
|
||||
INSERT INTO t1 VALUES (d=20010101);
|
||||
INSERT INTO t1 VALUES (dt0=20010101010101);
|
||||
INSERT INTO t1 VALUES (dt6=20010101010101);
|
||||
INSERT INTO t1 VALUES (ts0=20010101010101);
|
||||
INSERT INTO t1 VALUES (ts6=20010101010101);
|
||||
END
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('i',123)=0x61)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('b8',_binary'a' COLLATE 'binary')=0x61)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('t0',TIME'01:01:01')=10101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('t6',TIME'01:01:01.123456')=10101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('d',DATE'2001-01-01')=20010101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('dt0',TIMESTAMP'2001-01-01 01:01:01')=20010101010101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('dt6',TIMESTAMP'2001-01-01 01:01:01.123456')=20010101010101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('ts0',TIMESTAMP'2001-01-01 01:01:01')=20010101010101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES ( NAME_CONST('ts6',TIMESTAMP'2001-01-01 01:01:01.123456')=20010101010101)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP PROCEDURE p1
|
@ -59,8 +59,8 @@ DROP VIEW v1;
|
||||
ERROR HY000: Error writing file 'master-bin' ((errno: #)
|
||||
SET GLOBAL debug_dbug='';
|
||||
SET GLOBAL debug_dbug='d,injecting_fault_writing';
|
||||
CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
|
||||
CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
|
||||
CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
|
||||
CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
|
||||
ERROR HY000: Error writing file 'master-bin' ((errno: #)
|
||||
SET GLOBAL debug_dbug='';
|
||||
SET GLOBAL debug_dbug='d,injecting_fault_writing';
|
||||
|
480
mysql-test/suite/binlog/r/flashback.result
Normal file
480
mysql-test/suite/binlog/r/flashback.result
Normal file
@ -0,0 +1,480 @@
|
||||
#
|
||||
# Preparatory cleanup.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
#
|
||||
# We need a fixed timestamp to avoid varying results.
|
||||
#
|
||||
SET timestamp=1000000000;
|
||||
#
|
||||
# Delete all existing binary logs.
|
||||
#
|
||||
RESET MASTER;
|
||||
CREATE TABLE t1 (
|
||||
c01 tinyint,
|
||||
c02 smallint,
|
||||
c03 mediumint,
|
||||
c04 int,
|
||||
c05 bigint,
|
||||
c06 char(10),
|
||||
c07 varchar(20),
|
||||
c08 TEXT
|
||||
) ENGINE=InnoDB;
|
||||
#
|
||||
# Insert data to t1
|
||||
#
|
||||
INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
|
||||
INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
|
||||
INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255));
|
||||
#
|
||||
# Update t1
|
||||
#
|
||||
UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3;
|
||||
#
|
||||
# Clear t1
|
||||
#
|
||||
DELETE FROM t1;
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Show mysqlbinlog result without -B
|
||||
#
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 9:46:40 at startup
|
||||
ROLLBACK/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
|
||||
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
use `test`/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=#/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=1342177280/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
||||
SET @@session.lc_time_names=0/*!*/;
|
||||
SET @@session.collation_database=DEFAULT/*!*/;
|
||||
CREATE TABLE t1 (
|
||||
c01 tinyint,
|
||||
c02 smallint,
|
||||
c03 mediumint,
|
||||
c04 int,
|
||||
c05 bigint,
|
||||
c06 char(10),
|
||||
c07 varchar(20),
|
||||
c08 TEXT
|
||||
) ENGINE=InnoDB
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE `test`.`t1`
|
||||
### WHERE
|
||||
### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### UPDATE `test`.`t1`
|
||||
### WHERE
|
||||
### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM `test`.`t1`
|
||||
### WHERE
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### DELETE FROM `test`.`t1`
|
||||
### WHERE
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### DELETE FROM `test`.`t1`
|
||||
### WHERE
|
||||
### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
|
||||
#
|
||||
# Show mysqlbinlog result with -B
|
||||
#
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 9:46:40 at startup
|
||||
ROLLBACK/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
BEGIN/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### INSERT INTO `test`.`t1`
|
||||
### SET
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
COMMIT
|
||||
/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
BEGIN/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE `test`.`t1`
|
||||
### WHERE
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### UPDATE `test`.`t1`
|
||||
### WHERE
|
||||
### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
COMMIT
|
||||
/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
BEGIN/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM `test`.`t1`
|
||||
### WHERE
|
||||
### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
COMMIT
|
||||
/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
BEGIN/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM `test`.`t1`
|
||||
### WHERE
|
||||
### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=4 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
COMMIT
|
||||
/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
|
||||
BEGIN/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM `test`.`t1`
|
||||
### WHERE
|
||||
### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
|
||||
### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
|
||||
### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
|
||||
### @4=0 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
|
||||
### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
|
||||
### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
|
||||
COMMIT
|
||||
/*!*/;
|
||||
#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
use `test`/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=#/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=1342177280/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
||||
SET @@session.lc_time_names=0/*!*/;
|
||||
SET @@session.collation_database=DEFAULT/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
|
||||
#
|
||||
# Insert data to t1
|
||||
#
|
||||
TRUNCATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
|
||||
INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
|
||||
INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 60));
|
||||
#
|
||||
# Delete all existing binary logs.
|
||||
#
|
||||
RESET MASTER;
|
||||
SELECT * FROM t1;
|
||||
c01 c02 c03 c04 c05 c06 c07 c08
|
||||
0 0 0 0 0
|
||||
1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz
|
||||
127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
#
|
||||
# Operate some data
|
||||
#
|
||||
UPDATE t1 SET c01=20;
|
||||
UPDATE t1 SET c02=200;
|
||||
UPDATE t1 SET c03=2000;
|
||||
DELETE FROM t1;
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Flashback & Check the result
|
||||
#
|
||||
SELECT * FROM t1;
|
||||
c01 c02 c03 c04 c05 c06 c07 c08
|
||||
127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz
|
||||
0 0 0 0 0
|
||||
RESET MASTER;
|
||||
#
|
||||
# UPDATE multi-rows in one event
|
||||
#
|
||||
BEGIN;
|
||||
UPDATE t1 SET c01=10 WHERE c01=0;
|
||||
UPDATE t1 SET c01=20 WHERE c01=10;
|
||||
COMMIT;
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Flashback & Check the result
|
||||
#
|
||||
SELECT * FROM t1;
|
||||
c01 c02 c03 c04 c05 c06 c07 c08
|
||||
127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz
|
||||
0 0 0 0 0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Self-referencing foreign keys
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, FOREIGN KEY my_fk(b) REFERENCES t1(a)) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (1, NULL);
|
||||
INSERT INTO t1 VALUES (2, 1), (3, 2), (4, 3);
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 NULL
|
||||
2 1
|
||||
3 2
|
||||
4 3
|
||||
RESET MASTER;
|
||||
DELETE FROM t1 ORDER BY a DESC;
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Flashback & Check the result
|
||||
#
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 NULL
|
||||
2 1
|
||||
3 2
|
||||
4 3
|
||||
DROP TABLE t1;
|
41
mysql-test/suite/binlog/t/binlog_stm_sp.test
Normal file
41
mysql-test/suite/binlog/t/binlog_stm_sp.test
Normal file
@ -0,0 +1,41 @@
|
||||
--source include/have_binlog_format_statement.inc
|
||||
|
||||
--disable_query_log
|
||||
reset master; # get rid of previous tests binlog
|
||||
--enable_query_log
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-11815 SP variables of temporal data types do not replicate correctly
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
DELIMITER $$;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE i INT DEFAULT 123;
|
||||
DECLARE b8 BIT(8) DEFAULT 0x61;
|
||||
DECLARE t0 TIME DEFAULT '01:01:01';
|
||||
DECLARE t6 TIME(6) DEFAULT '01:01:01.123456';
|
||||
DECLARE d DATE DEFAULT '2001-01-01';
|
||||
DECLARE dt0 DATETIME DEFAULT '2001-01-01 01:01:01';
|
||||
DECLARE dt6 DATETIME(6) DEFAULT '2001-01-01 01:01:01.123456';
|
||||
DECLARE ts0 TIMESTAMP DEFAULT '2001-01-01 01:01:01';
|
||||
DECLARE ts6 TIMESTAMP(6) DEFAULT '2001-01-01 01:01:01.123456';
|
||||
INSERT INTO t1 VALUES (i=0x61);
|
||||
INSERT INTO t1 VALUES (b8=0x61);
|
||||
INSERT INTO t1 VALUES (t0=10101);
|
||||
INSERT INTO t1 VALUES (t6=10101);
|
||||
INSERT INTO t1 VALUES (d=20010101);
|
||||
INSERT INTO t1 VALUES (dt0=20010101010101);
|
||||
INSERT INTO t1 VALUES (dt6=20010101010101);
|
||||
INSERT INTO t1 VALUES (ts0=20010101010101);
|
||||
INSERT INTO t1 VALUES (ts6=20010101010101);
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
CALL p1;
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
--let $binlog_file = LAST
|
||||
source include/show_binlog_events.inc;
|
2
mysql-test/suite/binlog/t/flashback-master.opt
Normal file
2
mysql-test/suite/binlog/t/flashback-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--flashback
|
||||
--timezone=GMT-8
|
163
mysql-test/suite/binlog/t/flashback.test
Normal file
163
mysql-test/suite/binlog/t/flashback.test
Normal file
@ -0,0 +1,163 @@
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # Preparatory cleanup.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # We need a fixed timestamp to avoid varying results.
|
||||
--echo #
|
||||
SET timestamp=1000000000;
|
||||
|
||||
--echo #
|
||||
--echo # Delete all existing binary logs.
|
||||
--echo #
|
||||
RESET MASTER;
|
||||
|
||||
|
||||
CREATE TABLE t1 (
|
||||
c01 tinyint,
|
||||
c02 smallint,
|
||||
c03 mediumint,
|
||||
c04 int,
|
||||
c05 bigint,
|
||||
c06 char(10),
|
||||
c07 varchar(20),
|
||||
c08 TEXT
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--echo #
|
||||
--echo # Insert data to t1
|
||||
--echo #
|
||||
INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
|
||||
INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
|
||||
INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Update t1
|
||||
--echo #
|
||||
UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3;
|
||||
|
||||
--echo #
|
||||
--echo # Clear t1
|
||||
--echo #
|
||||
DELETE FROM t1;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--echo #
|
||||
--echo # Show mysqlbinlog result without -B
|
||||
--echo #
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
|
||||
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
|
||||
|
||||
--echo #
|
||||
--echo # Show mysqlbinlog result with -B
|
||||
--echo #
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
|
||||
--exec $MYSQL_BINLOG -B --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
|
||||
|
||||
--echo #
|
||||
--echo # Insert data to t1
|
||||
--echo #
|
||||
TRUNCATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
|
||||
INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
|
||||
INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 60));
|
||||
|
||||
--echo #
|
||||
--echo # Delete all existing binary logs.
|
||||
--echo #
|
||||
RESET MASTER;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo #
|
||||
--echo # Operate some data
|
||||
--echo #
|
||||
|
||||
UPDATE t1 SET c01=20;
|
||||
UPDATE t1 SET c02=200;
|
||||
UPDATE t1 SET c03=2000;
|
||||
|
||||
DELETE FROM t1;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--echo #
|
||||
--echo # Flashback & Check the result
|
||||
--echo #
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_1.sql
|
||||
--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_1.sql;"
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
--echo #
|
||||
--echo # UPDATE multi-rows in one event
|
||||
--echo #
|
||||
BEGIN;
|
||||
UPDATE t1 SET c01=10 WHERE c01=0;
|
||||
UPDATE t1 SET c01=20 WHERE c01=10;
|
||||
COMMIT;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--echo #
|
||||
--echo # Flashback & Check the result
|
||||
--echo #
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_2.sql
|
||||
--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_2.sql;"
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Self-referencing foreign keys
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, FOREIGN KEY my_fk(b) REFERENCES t1(a)) ENGINE=InnoDB;
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (1, NULL);
|
||||
INSERT INTO t1 VALUES (2, 1), (3, 2), (4, 3);
|
||||
COMMIT;
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
# New binlog
|
||||
RESET MASTER;
|
||||
|
||||
DELETE FROM t1 ORDER BY a DESC;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--echo #
|
||||
--echo # Flashback & Check the result
|
||||
--echo #
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_3.sql
|
||||
--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_3.sql;"
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
@ -0,0 +1,6 @@
|
||||
[cmpr]
|
||||
log-bin-compress=1
|
||||
log-bin-compress-min-len=10
|
||||
|
||||
[ncmpr]
|
||||
log-bin-compress=0
|
@ -59,8 +59,8 @@ DROP VIEW v1;
|
||||
ERROR HY000: Error writing file 'master-bin' ((errno: #)
|
||||
SET GLOBAL debug_dbug='';
|
||||
SET GLOBAL debug_dbug='d,injecting_fault_writing';
|
||||
CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
|
||||
CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
|
||||
CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
|
||||
CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
|
||||
ERROR HY000: Error writing file 'master-bin' ((errno: #)
|
||||
SET GLOBAL debug_dbug='';
|
||||
SET GLOBAL debug_dbug='d,injecting_fault_writing';
|
||||
|
@ -0,0 +1,6 @@
|
||||
[cmpr]
|
||||
log-bin-compress=1
|
||||
log-bin-compress-min-len=10
|
||||
|
||||
[ncmpr]
|
||||
log-bin-compress=0
|
@ -0,0 +1,6 @@
|
||||
[cmpr]
|
||||
log-bin-compress=1
|
||||
log-bin-compress-min-len=10
|
||||
|
||||
[ncmpr]
|
||||
log-bin-compress=0
|
@ -10,7 +10,5 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
innodb_scrub : MDEV-8139
|
||||
innodb_scrub_compressed : MDEV-8139
|
||||
innodb_scrub_background : MDEV-8139
|
||||
innochecksum: see buf_page_is_corrupted()
|
||||
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
||||
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
# Create and populate a tables
|
||||
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
@ -23,5 +19,3 @@ CREATE TABLE t5 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB PAGE_CO
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
# Cleanup
|
||||
DROP TABLE t1, t2, t3, t4, t5;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -11,10 +11,6 @@ call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption s
|
||||
call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*");
|
||||
|
||||
# Start server with keys2.txt
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
|
||||
INSERT INTO t1 VALUES ('foobar');
|
||||
ALTER TABLE t1 ADD COLUMN c2 INT;
|
||||
|
@ -1,7 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
|
||||
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
SHOW WARNINGS;
|
||||
@ -23,8 +21,6 @@ backup: t1
|
||||
UNLOCK TABLES;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
restore: t1 .ibd and .cfg files
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
SHOW CREATE TABLE t1;
|
||||
|
@ -4,16 +4,8 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th
|
||||
call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem.");
|
||||
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Warning Table test/t1 in tablespace # is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
@ -22,5 +14,3 @@ test.t1 check error Corrupt
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -4,16 +4,8 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th
|
||||
call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem.");
|
||||
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table.
|
||||
@ -30,5 +22,3 @@ Level Code Message
|
||||
Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,6 +1,4 @@
|
||||
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_compression_algorithm = 1;
|
||||
create table t1(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
|
||||
create table t2(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
|
@ -1,7 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
|
||||
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_compression_algorithm = 1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
|
||||
show warnings;
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_encrypt_tables = ON;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=4;
|
||||
@ -53,5 +49,3 @@ Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
set innodb_default_encryption_key_id = 1;
|
||||
drop table t1,t2;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted");
|
||||
call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match.");
|
||||
call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file.");
|
||||
@ -44,5 +40,3 @@ select * from t5;
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
drop table t1;
|
||||
drop table t5;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1(c1 bigint not null, b char(200), c varchar(200)) engine=innodb encrypted=yes encryption_key_id=1;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@ -15,14 +11,14 @@ set current_num = current_num + 1;
|
||||
end while;
|
||||
end//
|
||||
commit;
|
||||
set autocommit=0;
|
||||
begin;
|
||||
call innodb_insert_proc(2000);
|
||||
commit;
|
||||
set autocommit=1;
|
||||
update t1 set c1 = c1 +1;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
2000
|
||||
# Kill the server
|
||||
# ibdata1 yes on expecting NOT FOUND
|
||||
NOT FOUND /privatejanprivate/ in ibdata1
|
||||
# t1 yes on expecting NOT FOUND
|
||||
@ -55,5 +51,3 @@ FOUND /publicmessage/ in ib_logfile0
|
||||
NOT FOUND /publicmessage/ in ib_logfile1
|
||||
drop procedure innodb_insert_proc;
|
||||
drop table t1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,9 +1,14 @@
|
||||
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
|
||||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=3;
|
||||
ERROR HY000: Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 140 InnoDB: ENCRYPTION_KEY_ID 3 not available
|
||||
Error 1005 Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=33;
|
||||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=4;
|
||||
show create table innodb_compact;
|
||||
Table Create Table
|
||||
@ -16,7 +21,7 @@ Table Create Table
|
||||
innodb_dynamic CREATE TABLE `innodb_dynamic` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=3
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=33
|
||||
show create table innodb_redundant;
|
||||
Table Create Table
|
||||
innodb_redundant CREATE TABLE `innodb_redundant` (
|
||||
@ -72,9 +77,6 @@ innodb_compact CREATE TABLE `innodb_compact` (
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
|
||||
show create table innodb_dynamic;
|
||||
Table Create Table
|
||||
innodb_dynamic CREATE TABLE `innodb_dynamic` (
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@ -122,10 +118,6 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
@ -201,10 +193,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
show create table innodb_compact;
|
||||
Table Create Table
|
||||
innodb_compact CREATE TABLE `innodb_compact` (
|
||||
@ -281,5 +269,3 @@ drop table innodb_compressed;
|
||||
drop table innodb_dynamic;
|
||||
drop table innodb_redundant;
|
||||
drop table innodb_defkey;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb page_compressed=1;
|
||||
show warnings;
|
||||
@ -76,10 +72,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
|
||||
variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
|
||||
variable_value >= 0
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
update innodb_normal set c1 = c1 + 1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
@ -132,10 +124,6 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
show create table innodb_normal;
|
||||
Table Create Table
|
||||
innodb_normal CREATE TABLE `innodb_normal` (
|
||||
@ -188,5 +176,3 @@ drop procedure innodb_insert_proc;
|
||||
drop table innodb_normal;
|
||||
drop table innodb_compact;
|
||||
drop table innodb_dynamic;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,10 +1,6 @@
|
||||
call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*");
|
||||
call mtr.add_suppression("Disabling redo log encryp*");
|
||||
call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@ -101,10 +97,6 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
update innodb_normal set c1 = c1 +1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_compressed set c1 = c1 + 1;
|
||||
@ -172,10 +164,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
show create table innodb_compact;
|
||||
Table Create Table
|
||||
innodb_compact CREATE TABLE `innodb_compact` (
|
||||
@ -253,5 +241,3 @@ pk
|
||||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
3
mysql-test/suite/encryption/r/innodb-scrub-log.result
Normal file
3
mysql-test/suite/encryption/r/innodb-scrub-log.result
Normal file
@ -0,0 +1,3 @@
|
||||
create table t1(a int not null primary key auto_increment,
|
||||
b varchar(200), c char(100), d varchar(150)) engine=innodb;
|
||||
DROP TABLE t1;
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
@ -264,5 +260,3 @@ drop table innodb_page_compressed6;
|
||||
drop table innodb_page_compressed7;
|
||||
drop table innodb_page_compressed8;
|
||||
drop table innodb_page_compressed9;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,7 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
|
||||
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
|
||||
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
|
||||
|
@ -1,8 +1,4 @@
|
||||
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
|
||||
@ -65,7 +61,5 @@ COUNT(1)
|
||||
SELECT COUNT(1) FROM t5;
|
||||
COUNT(1)
|
||||
400
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
drop table t1,t2,t3,t4, t5;
|
||||
set GLOBAL innodb_default_encryption_key_id=1;
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
||||
CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
|
||||
INSERT INTO t1 VALUES ('foobar');
|
||||
@ -14,5 +10,3 @@ NAME ENCRYPTION_SCHEME MIN_KEY_VERSION CURRENT_KEY_VERSION CURRENT_KEY_ID
|
||||
test/t1 1 1 1 1
|
||||
test/t2 1 1 1 2
|
||||
DROP TABLE t1, t2;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
|
||||
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
|
||||
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
|
||||
@ -27,10 +23,6 @@ NOT FOUND /private/ in innodb_compressed2.ibd
|
||||
NOT FOUND /private/ in innodb_compressed3.ibd
|
||||
# t4 yes on expecting NOT FOUND
|
||||
NOT FOUND /private/ in innodb_compressed4.ibd
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
select * from innodb_compressed1 where d = 20;
|
||||
c1 d a b
|
||||
1 20 private evenmoreprivate
|
||||
@ -155,5 +147,3 @@ drop table innodb_compressed1;
|
||||
drop table innodb_compressed2;
|
||||
drop table innodb_compressed3;
|
||||
drop table innodb_compressed4;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
|
||||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
|
||||
@ -105,10 +101,6 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
variable_value >= 0
|
||||
1
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
update innodb_normal set c1 = c1 + 1;
|
||||
update innodb_compact set c1 = c1 + 1;
|
||||
update innodb_dynamic set c1 = c1 + 1;
|
||||
@ -163,5 +155,3 @@ drop table innodb_compact;
|
||||
drop table innodb_dynamic;
|
||||
drop table innodb_compressed;
|
||||
drop table innodb_redundant;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,5 +1,4 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||
Variable_name Value
|
||||
innodb_encrypt_log OFF
|
||||
@ -87,44 +86,44 @@ Innodb_pages0_read 3
|
||||
# Restart Success!
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
use test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
use innodb_encrypted_1;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
use innodb_encrypted_2;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
use innodb_encrypted_3;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
use innodb_encrypted_1;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 3
|
||||
Innodb_pages0_read 303
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 103
|
||||
Innodb_pages0_read 303
|
||||
use innodb_encrypted_2;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 103
|
||||
Innodb_pages0_read 303
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 203
|
||||
Innodb_pages0_read 303
|
||||
use innodb_encrypted_3;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 203
|
||||
Innodb_pages0_read 303
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 303
|
||||
|
@ -1,7 +1,3 @@
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
|
||||
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t3 (id INT, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
|
||||
@ -176,5 +172,3 @@ NOT FOUND /mangled/ in t6.ibd
|
||||
NOT FOUND /mysql/ in t7.ibd
|
||||
DROP PROCEDURE innodb_insert_proc;
|
||||
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,8 +1,4 @@
|
||||
# Restart mysqld --loose-file-key-management-filename=keys2.txt
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@ -106,10 +102,6 @@ variable_value >= 0
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
alter table innodb_compact engine=innodb encryption_key_id = 2;
|
||||
alter table innodb_compressed engine=innodb encryption_key_id = 3;
|
||||
alter table innodb_dynamic engine=innodb encryption_key_id = 4;
|
||||
@ -155,5 +147,3 @@ drop table innodb_compact;
|
||||
drop table innodb_compressed;
|
||||
drop table innodb_dynamic;
|
||||
drop table innodb_redundant;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
@ -1,207 +1,121 @@
|
||||
create table snapshot_status engine = myisam
|
||||
select * from information_schema.global_status
|
||||
where variable_name like 'innodb_scrub%';
|
||||
#
|
||||
# Test delete of records
|
||||
#
|
||||
create table t1 (
|
||||
where variable_name like 'innodb_scrub_background%';
|
||||
# MDEV-8139 Fix scrubbing tests
|
||||
# FIXME: Add index(b) to each table; ensure that undo logs are scrubbed.
|
||||
create table delete_3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compressed;
|
||||
delete from delete_3;
|
||||
create table delete_rollback_delete_3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compressed;
|
||||
begin;
|
||||
delete from delete_rollback_delete_3;
|
||||
rollback;
|
||||
delete from delete_rollback_delete_3;
|
||||
create table insert_rollback_3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compressed;
|
||||
begin;
|
||||
rollback;
|
||||
create table delete_2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compact;
|
||||
# Populate table with rows
|
||||
delete from t1;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# compact: delete from: grep -c bicycle t1.ibd
|
||||
0
|
||||
# compact: delete from: grep -c bicycle ibdata1
|
||||
0
|
||||
# compact: delete from: grep -c repairman t1.ibd
|
||||
0
|
||||
# compact: delete from: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test delete+rollback+delete
|
||||
#
|
||||
create table t1 (
|
||||
delete from delete_2;
|
||||
create table delete_rollback_delete_2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compact;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from t1;
|
||||
delete from delete_rollback_delete_2;
|
||||
rollback;
|
||||
delete from t1;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# compact: delete rollback: grep -c bicycle t1.ibd
|
||||
0
|
||||
# compact: delete rollback: grep -c bicycle ibdata1
|
||||
0
|
||||
# compact: delete rollback: grep -c repairman t1.ibd
|
||||
0
|
||||
# compact: delete rollback: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test insert+rollback
|
||||
#
|
||||
create table t1 (
|
||||
delete from delete_rollback_delete_2;
|
||||
create table insert_rollback_2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compact;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# compact: insert rollback: grep -c bicycle t1.ibd
|
||||
0
|
||||
# compact: insert rollback: grep -c bicycle ibdata1
|
||||
0
|
||||
# compact: insert rollback: grep -c repairman t1.ibd
|
||||
0
|
||||
# compact: insert rollback: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test delete of records
|
||||
#
|
||||
create table t1 (
|
||||
create table delete_1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=redundant;
|
||||
# Populate table with rows
|
||||
delete from t1;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# redundant: delete from: grep -c bicycle t1.ibd
|
||||
0
|
||||
# redundant: delete from: grep -c bicycle ibdata1
|
||||
0
|
||||
# redundant: delete from: grep -c repairman t1.ibd
|
||||
0
|
||||
# redundant: delete from: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test delete+rollback+delete
|
||||
#
|
||||
create table t1 (
|
||||
delete from delete_1;
|
||||
create table delete_rollback_delete_1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=redundant;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from t1;
|
||||
delete from delete_rollback_delete_1;
|
||||
rollback;
|
||||
delete from t1;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# redundant: delete rollback: grep -c bicycle t1.ibd
|
||||
0
|
||||
# redundant: delete rollback: grep -c bicycle ibdata1
|
||||
0
|
||||
# redundant: delete rollback: grep -c repairman t1.ibd
|
||||
0
|
||||
# redundant: delete rollback: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test insert+rollback
|
||||
#
|
||||
create table t1 (
|
||||
delete from delete_rollback_delete_1;
|
||||
create table insert_rollback_1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=redundant;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# redundant: insert rollback: grep -c bicycle t1.ibd
|
||||
0
|
||||
# redundant: insert rollback: grep -c bicycle ibdata1
|
||||
0
|
||||
# redundant: insert rollback: grep -c repairman t1.ibd
|
||||
0
|
||||
# redundant: insert rollback: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test delete of records
|
||||
#
|
||||
create table t1 (
|
||||
create table delete_0 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=dynamic;
|
||||
# Populate table with rows
|
||||
delete from t1;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# dynamic: delete from: grep -c bicycle t1.ibd
|
||||
0
|
||||
# dynamic: delete from: grep -c bicycle ibdata1
|
||||
0
|
||||
# dynamic: delete from: grep -c repairman t1.ibd
|
||||
0
|
||||
# dynamic: delete from: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test delete+rollback+delete
|
||||
#
|
||||
create table t1 (
|
||||
delete from delete_0;
|
||||
create table delete_rollback_delete_0 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=dynamic;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from t1;
|
||||
delete from delete_rollback_delete_0;
|
||||
rollback;
|
||||
delete from t1;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# dynamic: delete rollback: grep -c bicycle t1.ibd
|
||||
0
|
||||
# dynamic: delete rollback: grep -c bicycle ibdata1
|
||||
0
|
||||
# dynamic: delete rollback: grep -c repairman t1.ibd
|
||||
0
|
||||
# dynamic: delete rollback: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
#
|
||||
# Test insert+rollback
|
||||
#
|
||||
create table t1 (
|
||||
delete from delete_rollback_delete_0;
|
||||
create table insert_rollback_0 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=dynamic;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# dynamic: insert rollback: grep -c bicycle t1.ibd
|
||||
0
|
||||
# dynamic: insert rollback: grep -c bicycle ibdata1
|
||||
0
|
||||
# dynamic: insert rollback: grep -c repairman t1.ibd
|
||||
0
|
||||
# dynamic: insert rollback: grep -c repairman ibdata1
|
||||
0
|
||||
drop table t1;
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
# delete_3.ibd
|
||||
# delete_rollback_delete_3.ibd
|
||||
# insert_rollback_3.ibd
|
||||
# delete_2.ibd
|
||||
# delete_rollback_delete_2.ibd
|
||||
# insert_rollback_2.ibd
|
||||
# delete_1.ibd
|
||||
# delete_rollback_delete_1.ibd
|
||||
# insert_rollback_1.ibd
|
||||
# delete_0.ibd
|
||||
# delete_rollback_delete_0.ibd
|
||||
# insert_rollback_0.ibd
|
||||
check table delete_3, delete_rollback_delete_3, insert_rollback_3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_3 check status OK
|
||||
test.delete_rollback_delete_3 check status OK
|
||||
test.insert_rollback_3 check status OK
|
||||
drop table delete_3, delete_rollback_delete_3, insert_rollback_3;
|
||||
check table delete_2, delete_rollback_delete_2, insert_rollback_2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_2 check status OK
|
||||
test.delete_rollback_delete_2 check status OK
|
||||
test.insert_rollback_2 check status OK
|
||||
drop table delete_2, delete_rollback_delete_2, insert_rollback_2;
|
||||
check table delete_1, delete_rollback_delete_1, insert_rollback_1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_1 check status OK
|
||||
test.delete_rollback_delete_1 check status OK
|
||||
test.insert_rollback_1 check status OK
|
||||
drop table delete_1, delete_rollback_delete_1, insert_rollback_1;
|
||||
check table delete_0, delete_rollback_delete_0, insert_rollback_0;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_0 check status OK
|
||||
test.delete_rollback_delete_0 check status OK
|
||||
test.insert_rollback_0 check status OK
|
||||
drop table delete_0, delete_rollback_delete_0, insert_rollback_0;
|
||||
show variables like 'innodb_%scrub_data%';
|
||||
Variable_name Value
|
||||
innodb_background_scrub_data_check_interval 3600
|
||||
|
@ -11,66 +11,146 @@ innodb_background_scrub_data_uncompressed ON
|
||||
innodb_immediate_scrub_data_uncompressed OFF
|
||||
# make sure spaces are checked quickly
|
||||
SET GLOBAL innodb_background_scrub_data_check_interval=1;
|
||||
create table snapshot_status engine = myisam
|
||||
select * from information_schema.global_status
|
||||
where variable_name like 'innodb_scrub%';
|
||||
truncate table snapshot_status;
|
||||
insert into snapshot_status
|
||||
select * from information_schema.global_status
|
||||
where variable_name like 'innodb_scrub%';
|
||||
#
|
||||
# Test delete of records
|
||||
#
|
||||
create table t1 (
|
||||
create table delete_3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text, index(b)) engine = innodb row_format=dynamic;
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=compressed;
|
||||
# Populate table with rows
|
||||
delete from t1;
|
||||
#
|
||||
# Test delete+rollback+delete
|
||||
#
|
||||
create table t2 (
|
||||
delete from delete_3;
|
||||
create table delete_rollback_delete_3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text, index(b)) engine = innodb row_format=dynamic;
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=compressed;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from t2;
|
||||
delete from delete_rollback_delete_3;
|
||||
rollback;
|
||||
delete from t2;
|
||||
#
|
||||
# Test insert+rollback
|
||||
#
|
||||
create table t3 (
|
||||
delete from delete_rollback_delete_3;
|
||||
create table insert_rollback_3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text, index(b)) engine = innodb row_format=dynamic;
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=compressed;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
create table delete_2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=compact;
|
||||
# Populate table with rows
|
||||
delete from delete_2;
|
||||
create table delete_rollback_delete_2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=compact;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from delete_rollback_delete_2;
|
||||
rollback;
|
||||
delete from delete_rollback_delete_2;
|
||||
create table insert_rollback_2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=compact;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
create table delete_1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=redundant;
|
||||
# Populate table with rows
|
||||
delete from delete_1;
|
||||
create table delete_rollback_delete_1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=redundant;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from delete_rollback_delete_1;
|
||||
rollback;
|
||||
delete from delete_rollback_delete_1;
|
||||
create table insert_rollback_1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=redundant;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
create table delete_0 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=dynamic;
|
||||
# Populate table with rows
|
||||
delete from delete_0;
|
||||
create table delete_rollback_delete_0 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=dynamic;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from delete_rollback_delete_0;
|
||||
rollback;
|
||||
delete from delete_rollback_delete_0;
|
||||
create table insert_rollback_0 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text,
|
||||
index(b)) engine = innodb row_format=dynamic;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
# start scrubbing threads
|
||||
SET GLOBAL innodb_encryption_threads=5;
|
||||
# Wait max 10 min for scrubbing
|
||||
# Success!
|
||||
# stop scrubbing threads
|
||||
SET GLOBAL innodb_encryption_threads=0;
|
||||
# restart mysqld so that all pages are flushed
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
# dynamic: delete: grep -c bicycle t1.ibd
|
||||
0
|
||||
# dynamic: delete: grep -c repairman t1.ibd
|
||||
0
|
||||
# dynamic: delete rollback: grep -c bicycle t2.ibd
|
||||
0
|
||||
# dynamic: delete rollback: grep -c repairman t2.ibd
|
||||
0
|
||||
# dynamic: insert rollback: grep -c bicycle t3.ibd
|
||||
0
|
||||
# dynamic: insert rollback: grep -c repairman t3.ibd
|
||||
0
|
||||
drop table t1, t2, t3;
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
# delete_3.ibd
|
||||
# delete_rollback_delete_3.ibd
|
||||
# insert_rollback_3.ibd
|
||||
# delete_2.ibd
|
||||
# delete_rollback_delete_2.ibd
|
||||
# insert_rollback_2.ibd
|
||||
# delete_1.ibd
|
||||
# delete_rollback_delete_1.ibd
|
||||
# insert_rollback_1.ibd
|
||||
# delete_0.ibd
|
||||
# delete_rollback_delete_0.ibd
|
||||
# insert_rollback_0.ibd
|
||||
check table delete_3, delete_rollback_delete_3, insert_rollback_3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_3 check status OK
|
||||
test.delete_rollback_delete_3 check status OK
|
||||
test.insert_rollback_3 check status OK
|
||||
drop table delete_3, delete_rollback_delete_3, insert_rollback_3;
|
||||
check table delete_2, delete_rollback_delete_2, insert_rollback_2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_2 check status OK
|
||||
test.delete_rollback_delete_2 check status OK
|
||||
test.insert_rollback_2 check status OK
|
||||
drop table delete_2, delete_rollback_delete_2, insert_rollback_2;
|
||||
check table delete_1, delete_rollback_delete_1, insert_rollback_1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_1 check status OK
|
||||
test.delete_rollback_delete_1 check status OK
|
||||
test.insert_rollback_1 check status OK
|
||||
drop table delete_1, delete_rollback_delete_1, insert_rollback_1;
|
||||
check table delete_0, delete_rollback_delete_0, insert_rollback_0;
|
||||
Table Op Msg_type Msg_text
|
||||
test.delete_0 check status OK
|
||||
test.delete_rollback_delete_0 check status OK
|
||||
test.insert_rollback_0 check status OK
|
||||
drop table delete_0, delete_rollback_delete_0, insert_rollback_0;
|
||||
show variables like 'innodb_%scrub_data%';
|
||||
Variable_name Value
|
||||
innodb_background_scrub_data_check_interval 3600
|
||||
@ -78,4 +158,3 @@ innodb_background_scrub_data_compressed ON
|
||||
innodb_background_scrub_data_interval 604800
|
||||
innodb_background_scrub_data_uncompressed ON
|
||||
innodb_immediate_scrub_data_uncompressed OFF
|
||||
drop table snapshot_status;
|
||||
|
@ -1,71 +0,0 @@
|
||||
# make sure spaces are checked quickly
|
||||
SET GLOBAL innodb_background_scrub_data_check_interval=1;
|
||||
#
|
||||
# Test delete of records
|
||||
#
|
||||
create table t1 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compressed;
|
||||
# Populate table with rows
|
||||
delete from t1;
|
||||
#
|
||||
# Test delete+rollback+delete
|
||||
#
|
||||
create table t2 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compressed;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
delete from t2;
|
||||
rollback;
|
||||
delete from t2;
|
||||
#
|
||||
# Test insert+rollback
|
||||
#
|
||||
create table t3 (
|
||||
a int auto_increment primary key,
|
||||
b varchar(256),
|
||||
c text) engine = innodb row_format=compressed;
|
||||
# Populate table with rows
|
||||
begin;
|
||||
rollback;
|
||||
# start scrubbing threads
|
||||
SET GLOBAL innodb_encryption_threads=5;
|
||||
# Wait max 10 min for scrubbing of this table
|
||||
# Success!
|
||||
# stop scrubbing threads
|
||||
SET GLOBAL innodb_encryption_threads=0;
|
||||
# Now there should be background scrubs
|
||||
# restart mysqld so that all pages are flushed (encryption off)
|
||||
# so that grep will find stuff
|
||||
# read all rows from table
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
select * from t3;
|
||||
# grep -c bicycle t1.ibd
|
||||
0
|
||||
# grep -c bicycle ibdata1
|
||||
0
|
||||
# grep -c repairman t1.ibd
|
||||
0
|
||||
# grep -c repairman ibdata1
|
||||
0
|
||||
# grep -c boondoggle t2.ibd
|
||||
0
|
||||
# grep -c boondoggle ibdata1
|
||||
0
|
||||
# grep -c waste t2.ibd
|
||||
0
|
||||
# grep -c waste ibdata1
|
||||
0
|
||||
# grep -c keso t3.ibd
|
||||
0
|
||||
# grep -c keso ibdata1
|
||||
0
|
||||
# grep -c kent t3.ibd
|
||||
0
|
||||
# grep -c kent ibdata1
|
||||
0
|
||||
drop table t1, t2, t3;
|
@ -15,13 +15,9 @@ if (!$INNOCHECKSUM) {
|
||||
|
||||
--disable_query_log
|
||||
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
||||
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
let MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
# zlib
|
||||
set global innodb_compression_algorithm = 1;
|
||||
|
||||
@ -97,6 +93,4 @@ DROP TABLE t1, t2, t3, t4, t5;
|
||||
# reset system
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
||||
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
||||
--enable_query_log
|
||||
|
@ -29,14 +29,6 @@ call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--disable_query_log
|
||||
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
|
||||
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
|
||||
INSERT INTO t1 VALUES ('foobar');
|
||||
ALTER TABLE t1 ADD COLUMN c2 INT;
|
||||
|
@ -12,11 +12,6 @@
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
|
||||
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
|
||||
|
||||
--disable_query_log
|
||||
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
--enable_query_log
|
||||
|
||||
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
|
||||
--let $MYSQLD_DATADIR = `SELECT @@datadir`
|
||||
--let SEARCH_RANGE = 10000000
|
||||
@ -34,11 +29,7 @@ EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
SHOW WARNINGS;
|
||||
@ -76,11 +67,6 @@ EOF
|
||||
--source include/wait_until_connected_again.inc
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
--error ER_GET_ERRMSG
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
SHOW CREATE TABLE t1;
|
||||
@ -109,12 +95,6 @@ EOF
|
||||
DROP TABLE t1;
|
||||
|
||||
# reset system
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
||||
--enable_query_log
|
||||
--enable_warnings
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/keys1.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/keys2.txt
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user