mirror of
https://github.com/MariaDB/server.git
synced 2025-04-20 14:15:30 +02:00
Merge 10.11 into 11.2
This commit is contained in:
commit
12a91b57e2
548 changed files with 5714 additions and 1374 deletions
.gitignoreCMakeLists.txt
client
cmake
config.h.cmakeconfigure.cmakeextra/mariabackup
include
mysql-test
include
commit.incctype_like_range_f1f2.incctype_numconv.incdiff_tables.incexplain_utils.incfunction_defaults.incgrant_cache.inchave_tlsv13.incps_conv.incquery_cache.incquery_cache_partitions.inctest_outfile.inctype_temporal_zero_default.incwrite_var_to_file.inc
main
alter_table.testalter_table_online_debug.testalter_user.testanalyze_stmt_slow_query_log.testauto_increment_ranges_innodb.testbootstrap.testbug12427262.testconnect.resultconnect.testcount_distinct2.testcreate_user.resultcreate_user.testcte_nonrecursive.testctype_big5.testctype_binary.testctype_filename.resultctype_filename.testctype_gbk.testctype_latin1.resultctype_latin1.testctype_recoding.testctype_ucs.resultctype_ucs.testctype_utf16.testctype_utf16le.testctype_utf32.resultctype_utf32.testctype_utf8.testctype_utf8mb4.testdelete.resultdelete.testderived.testderived_view.testdistinct.testempty_table.testexplain.testfeatures.testflush_ssl.testfunc_analyse.testfunc_des_encrypt.testfunc_digest.testfunc_extract.resultfunc_extract.testfunc_gconcat.testfunc_group.testfunc_group_innodb.testfunc_json.resultfunc_json.testfunc_math.testfunc_misc.testfunc_str.resultfunc_str.testfunc_time.resultfunc_time.testfunc_time_round.testget_diagnostics.testgis.testgrant.testgrant2.testgrant_4332.testgreedy_optimizer.testgroup_by.testgroup_min_max.testhandler_read_last.testinformation_schema.testinformation_schema_parameters.testinformation_schema_routines.testinit_file.testinnodb_ext_key.testinsert.testinvisible_field.testjoin.testjoin_outer.testkey_cache.test
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -291,8 +291,6 @@ storage/mroonga/vendor/groonga/src/grnslap
|
|||
storage/mroonga/vendor/groonga/src/groonga
|
||||
storage/mroonga/vendor/groonga/src/groonga-benchmark
|
||||
storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset
|
||||
storage/mroonga/mysql-test/mroonga/storage/r/information_schema_plugins.result
|
||||
storage/mroonga/mysql-test/mroonga/storage/r/variable_version.result
|
||||
zlib/zconf.h
|
||||
xxx/*
|
||||
yyy/*
|
||||
|
|
|
@ -248,6 +248,19 @@ ENDIF()
|
|||
OPTION(WITH_MSAN "Enable memory sanitizer" OFF)
|
||||
IF (WITH_MSAN)
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
|
||||
IF(NOT (have_C__fsanitize_memory__fsanitize_memory_track_origins__U_FORTIFY_SOURCE
|
||||
AND have_CXX__fsanitize_memory__fsanitize_memory_track_origins__U_FORTIFY_SOURCE))
|
||||
MESSAGE(FATAL_ERROR "Compiler doesn't support -fsanitize=memory flags")
|
||||
ENDIF()
|
||||
MY_CHECK_CXX_COMPILER_FLAG("-stdlib=libc++")
|
||||
IF(NOT have_CXX__stdlib_libc__)
|
||||
MESSAGE(FATAL_ERROR "C++ Compiler requires support for -stdlib=libc++")
|
||||
ENDIF()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
MY_CHECK_AND_SET_LINKER_FLAG("-fsanitize=memory" DEBUG RELWITHDEBINFO)
|
||||
IF(NOT HAVE_LINK_FLAG__fsanitize_memory)
|
||||
MESSAGE(FATAL_ERROR "Linker doesn't support -fsanitize=memory flags")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
OPTION(WITH_GPROF "Enable profiling with gprof" OFF)
|
||||
|
@ -261,7 +274,7 @@ MY_CHECK_AND_SET_COMPILER_FLAG("-fno-omit-frame-pointer" RELWITHDEBINFO)
|
|||
# enable security hardening features, like most distributions do
|
||||
# in our benchmarks that costs about ~1% of performance, depending on the load
|
||||
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ON)
|
||||
IF(SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN AND NOT WITH_GPROF)
|
||||
IF(SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN AND NOT WITH_GPROF AND NOT WITH_MSAN)
|
||||
# security-enhancing flags
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
|
||||
MY_CHECK_AND_SET_LINKER_FLAG("-Wl,-z,relro,-z,now")
|
||||
|
|
|
@ -164,6 +164,7 @@ static struct property prop_list[] = {
|
|||
{ &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
|
||||
{ &ps2_protocol_enabled, 0, 0, 0, "$ENABLED_PS2_PROTOCOL" },
|
||||
{ &view_protocol_enabled, 0, 0, 0, "$ENABLED_VIEW_PROTOCOL"},
|
||||
{ &cursor_protocol_enabled, 0, 0, 0, "$ENABLED_CURSOR_PROTOCOL"},
|
||||
{ &service_connection_enabled, 0, 1, 0, "$ENABLED_SERVICE_CONNECTION"},
|
||||
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
|
||||
{ &disable_result_log, 0, 0, 1, "$ENABLED_RESULT_LOG" },
|
||||
|
@ -181,6 +182,7 @@ enum enum_prop {
|
|||
P_PS,
|
||||
P_PS2,
|
||||
P_VIEW,
|
||||
P_CURSOR,
|
||||
P_CONN,
|
||||
P_QUERY,
|
||||
P_RESULT,
|
||||
|
@ -273,6 +275,7 @@ static regex_t ps_re; /* the query can be run using PS protocol */
|
|||
static regex_t ps2_re; /* the query can be run using PS protocol with second execution*/
|
||||
static regex_t sp_re; /* the query can be run as a SP */
|
||||
static regex_t view_re; /* the query can be run as a view*/
|
||||
static regex_t cursor_re; /* the query can be run with cursor protocol*/
|
||||
|
||||
static void init_re(void);
|
||||
static int match_re(regex_t *, char *);
|
||||
|
@ -391,6 +394,7 @@ enum enum_commands {
|
|||
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
|
||||
Q_DISABLE_PS2_PROTOCOL, Q_ENABLE_PS2_PROTOCOL,
|
||||
Q_DISABLE_VIEW_PROTOCOL, Q_ENABLE_VIEW_PROTOCOL,
|
||||
Q_DISABLE_CURSOR_PROTOCOL, Q_ENABLE_CURSOR_PROTOCOL,
|
||||
Q_DISABLE_SERVICE_CONNECTION, Q_ENABLE_SERVICE_CONNECTION,
|
||||
Q_ENABLE_NON_BLOCKING_API, Q_DISABLE_NON_BLOCKING_API,
|
||||
Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT,
|
||||
|
@ -487,6 +491,8 @@ const char *command_names[]=
|
|||
"enable_ps2_protocol",
|
||||
"disable_view_protocol",
|
||||
"enable_view_protocol",
|
||||
"disable_cursor_protocol",
|
||||
"enable_cursor_protocol",
|
||||
"disable_service_connection",
|
||||
"enable_service_connection",
|
||||
"enable_non_blocking_api",
|
||||
|
@ -8658,13 +8664,22 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
#if MYSQL_VERSION_ID >= 50000
|
||||
if (cursor_protocol_enabled)
|
||||
{
|
||||
ps2_protocol_enabled = 0;
|
||||
|
||||
/*
|
||||
Use cursor when retrieving result
|
||||
Use cursor for queries matching the filter,
|
||||
else reset cursor type
|
||||
*/
|
||||
ulong type= CURSOR_TYPE_READ_ONLY;
|
||||
if (mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type))
|
||||
die("mysql_stmt_attr_set(STMT_ATTR_CURSOR_TYPE) failed': %d %s",
|
||||
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
|
||||
if (match_re(&cursor_re, query))
|
||||
{
|
||||
/*
|
||||
Use cursor when retrieving result
|
||||
*/
|
||||
ulong type= CURSOR_TYPE_READ_ONLY;
|
||||
if (mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type))
|
||||
die("mysql_stmt_attr_set(STMT_ATTR_CURSOR_TYPE) failed': %d %s",
|
||||
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -8726,9 +8741,11 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||
{
|
||||
/*
|
||||
When running in cursor_protocol get the warnings from execute here
|
||||
and keep them in a separate string for later.
|
||||
and keep them in a separate string for later. Cursor_protocol is used
|
||||
only for queries matching the filter "cursor_re".
|
||||
*/
|
||||
if (cursor_protocol_enabled && !disable_warnings)
|
||||
if (cursor_protocol_enabled && match_re(&cursor_re, query) &&
|
||||
!disable_warnings)
|
||||
append_warnings(&ds_execute_warnings, mysql);
|
||||
|
||||
if (!disable_result_log &&
|
||||
|
@ -8876,6 +8893,16 @@ end:
|
|||
var_set_errno(mysql_stmt_errno(stmt));
|
||||
|
||||
display_optimizer_trace(cn, ds);
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
if (cursor_protocol_enabled)
|
||||
{
|
||||
ulong type= CURSOR_TYPE_NO_CURSOR;
|
||||
if (mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*) &type))
|
||||
die("mysql_stmt_attr_set(STMT_ATTR_CURSOR_TYPE) failed': %d %s",
|
||||
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
|
||||
}
|
||||
#endif
|
||||
|
||||
revert_properties();
|
||||
|
||||
/* Close the statement if reconnect, need new prepare */
|
||||
|
@ -9742,10 +9769,19 @@ void init_re(void)
|
|||
"^("
|
||||
"[[:space:]]*SELECT[[:space:]])";
|
||||
|
||||
/*
|
||||
Filter for queries that can be run with
|
||||
cursor protocol
|
||||
*/
|
||||
const char *cursor_re_str =
|
||||
"^("
|
||||
"[[:space:]]*SELECT[[:space:]])";
|
||||
|
||||
init_re_comp(&ps_re, ps_re_str);
|
||||
init_re_comp(&ps2_re, ps2_re_str);
|
||||
init_re_comp(&sp_re, sp_re_str);
|
||||
init_re_comp(&view_re, view_re_str);
|
||||
init_re_comp(&cursor_re, cursor_re_str);
|
||||
}
|
||||
|
||||
|
||||
|
@ -9783,6 +9819,7 @@ void free_re(void)
|
|||
regfree(&ps2_re);
|
||||
regfree(&sp_re);
|
||||
regfree(&view_re);
|
||||
regfree(&cursor_re);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
@ -10572,6 +10609,17 @@ int main(int argc, char **argv)
|
|||
case Q_ENABLE_VIEW_PROTOCOL:
|
||||
set_property(command, P_VIEW, view_protocol);
|
||||
break;
|
||||
case Q_DISABLE_CURSOR_PROTOCOL:
|
||||
set_property(command, P_CURSOR, 0);
|
||||
if (cursor_protocol)
|
||||
set_property(command, P_PS, 0);
|
||||
/* Close any open statements */
|
||||
close_statements();
|
||||
break;
|
||||
case Q_ENABLE_CURSOR_PROTOCOL:
|
||||
set_property(command, P_CURSOR, cursor_protocol);
|
||||
set_property(command, P_PS, ps_protocol);
|
||||
break;
|
||||
case Q_DISABLE_SERVICE_CONNECTION:
|
||||
set_property(command, P_CONN, 0);
|
||||
/* Close only util connections */
|
||||
|
|
|
@ -30,12 +30,13 @@ MACRO (CHECK_LIBFMT)
|
|||
CHECK_CXX_SOURCE_RUNS(
|
||||
"#define FMT_STATIC_THOUSANDS_SEPARATOR ','
|
||||
#define FMT_HEADER_ONLY 1
|
||||
#include <fmt/format-inl.h>
|
||||
#include <fmt/args.h>
|
||||
int main() {
|
||||
using ArgStore= fmt::dynamic_format_arg_store<fmt::format_context>;
|
||||
ArgStore arg_store;
|
||||
int answer= 4321;
|
||||
fmt::format_args::format_arg arg=
|
||||
fmt::detail::make_arg<fmt::format_context>(answer);
|
||||
return fmt::vformat(\"{:L}\", fmt::format_args(&arg, 1)).compare(\"4,321\");
|
||||
arg_store.push_back(answer);
|
||||
return fmt::vformat(\"{:L}\", arg_store).compare(\"4,321\");
|
||||
}" HAVE_SYSTEM_LIBFMT)
|
||||
SET(CMAKE_REQUIRED_INCLUDES)
|
||||
ENDIF()
|
||||
|
|
|
@ -61,7 +61,6 @@ SET(HAVE_GETIFADDRS CACHE INTERNAL "")
|
|||
SET(HAVE_GETCWD 1 CACHE INTERNAL "")
|
||||
SET(HAVE_GETHOSTBYADDR_R CACHE INTERNAL "")
|
||||
SET(HAVE_GETHRTIME CACHE INTERNAL "")
|
||||
SET(HAVE_GETPAGESIZE CACHE INTERNAL "")
|
||||
SET(HAVE_GETPASS CACHE INTERNAL "")
|
||||
SET(HAVE_GETMNTENT CACHE INTERNAL "")
|
||||
SET(HAVE_GETMNTENT_IN_SYS_MNTAB CACHE INTERNAL "")
|
||||
|
|
|
@ -151,7 +151,6 @@
|
|||
#cmakedefine HAVE_GETCWD 1
|
||||
#cmakedefine HAVE_GETHOSTBYADDR_R 1
|
||||
#cmakedefine HAVE_GETHRTIME 1
|
||||
#cmakedefine HAVE_GETPAGESIZE 1
|
||||
#cmakedefine HAVE_GETPAGESIZES 1
|
||||
#cmakedefine HAVE_GETPASS 1
|
||||
#cmakedefine HAVE_GETPASSPHRASE 1
|
||||
|
|
|
@ -463,7 +463,6 @@ CHECK_SYMBOL_EXISTS(madvise "sys/mman.h" HAVE_DECL_MADVISE)
|
|||
CHECK_SYMBOL_EXISTS(getpagesizes "sys/mman.h" HAVE_GETPAGESIZES)
|
||||
CHECK_SYMBOL_EXISTS(tzname "time.h" HAVE_TZNAME)
|
||||
CHECK_SYMBOL_EXISTS(lrand48 "stdlib.h" HAVE_LRAND48)
|
||||
CHECK_SYMBOL_EXISTS(getpagesize "unistd.h" HAVE_GETPAGESIZE)
|
||||
CHECK_SYMBOL_EXISTS(TIOCGWINSZ "sys/ioctl.h" GWINSZ_IN_SYS_IOCTL)
|
||||
CHECK_SYMBOL_EXISTS(FIONREAD "sys/ioctl.h" FIONREAD_IN_SYS_IOCTL)
|
||||
CHECK_SYMBOL_EXISTS(TIOCSTAT "sys/ioctl.h" TIOCSTAT_IN_SYS_IOCTL)
|
||||
|
|
|
@ -64,6 +64,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
|
|||
#ifdef _WIN32
|
||||
#include <direct.h> /* rmdir */
|
||||
#endif
|
||||
#include <functional>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <aclapi.h>
|
||||
|
@ -1638,7 +1639,7 @@ is_aria_log_dir_file(const datadir_node_t &node)
|
|||
bool
|
||||
copy_back_aria_logs(const char *dstdir)
|
||||
{
|
||||
std::unique_ptr<ds_ctxt_t, void (&)(ds_ctxt_t*)>
|
||||
std::unique_ptr<ds_ctxt_t, std::function<void(ds_ctxt_t*)>>
|
||||
ds_ctxt_aria_log_dir_path(ds_create(dstdir, DS_TYPE_LOCAL), ds_destroy);
|
||||
|
||||
datadir_node_t node;
|
||||
|
|
|
@ -205,6 +205,8 @@ lsn_t checkpoint_lsn_start;
|
|||
lsn_t checkpoint_no_start;
|
||||
/** whether log_copying_thread() is active; protected by recv_sys.mutex */
|
||||
static bool log_copying_running;
|
||||
/** for --backup, target LSN to copy the log to; protected by recv_sys.mutex */
|
||||
lsn_t metadata_to_lsn;
|
||||
|
||||
uint xtrabackup_parallel;
|
||||
|
||||
|
@ -235,7 +237,6 @@ my_bool opt_encrypted_backup;
|
|||
/* === metadata of backup === */
|
||||
char metadata_type[30] = ""; /*[full-backuped|log-applied|incremental]*/
|
||||
static lsn_t metadata_from_lsn;
|
||||
lsn_t metadata_to_lsn;
|
||||
static lsn_t metadata_last_lsn;
|
||||
|
||||
static ds_file_t* dst_log_file;
|
||||
|
@ -281,9 +282,6 @@ my_bool xtrabackup_incremental_force_scan = FALSE;
|
|||
*/
|
||||
ulong xtrabackup_innodb_force_recovery = 0;
|
||||
|
||||
/* The flushed lsn which is read from data files */
|
||||
lsn_t flushed_lsn= 0;
|
||||
|
||||
ulong xb_open_files_limit= 0;
|
||||
char *xb_plugin_dir;
|
||||
char *xb_plugin_load;
|
||||
|
@ -1330,6 +1328,9 @@ enum options_xtrabackup
|
|||
OPT_INNODB_BUFFER_POOL_FILENAME,
|
||||
OPT_INNODB_LOCK_WAIT_TIMEOUT,
|
||||
OPT_INNODB_LOG_BUFFER_SIZE,
|
||||
#ifdef HAVE_INNODB_MMAP
|
||||
OPT_INNODB_LOG_FILE_MMAP,
|
||||
#endif
|
||||
#if defined __linux__ || defined _WIN32
|
||||
OPT_INNODB_LOG_FILE_BUFFERING,
|
||||
#endif
|
||||
|
@ -1893,6 +1894,13 @@ struct my_option xb_server_options[] =
|
|||
(G_PTR*) &log_sys.buf_size, (G_PTR*) &log_sys.buf_size, 0,
|
||||
GET_UINT, REQUIRED_ARG, 2U << 20,
|
||||
2U << 20, log_sys.buf_size_max, 0, 4096, 0},
|
||||
#ifdef HAVE_INNODB_MMAP
|
||||
{"innodb_log_file_mmap", OPT_INNODB_LOG_FILE_SIZE,
|
||||
"Whether ib_logfile0 should be memory-mapped",
|
||||
(G_PTR*) &log_sys.log_mmap,
|
||||
(G_PTR*) &log_sys.log_mmap, 0, GET_BOOL, NO_ARG,
|
||||
log_sys.log_mmap_default, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
#if defined __linux__ || defined _WIN32
|
||||
{"innodb_log_file_buffering", OPT_INNODB_LOG_FILE_BUFFERING,
|
||||
"Whether the file system cache for ib_logfile0 is enabled during --backup",
|
||||
|
@ -3389,8 +3397,108 @@ skip:
|
|||
return(FALSE);
|
||||
}
|
||||
|
||||
#ifdef HAVE_INNODB_MMAP
|
||||
static int
|
||||
xtrabackup_copy_mmap_snippet(ds_file_t *ds, const byte *start, const byte *end)
|
||||
{
|
||||
if (UNIV_UNLIKELY(start > end))
|
||||
{
|
||||
if (int r= ds_write(ds, start, log_sys.buf + log_sys.file_size - start))
|
||||
return r;
|
||||
start= log_sys.buf + log_sys.START_OFFSET;
|
||||
}
|
||||
return ds_write(ds, start, end - start);
|
||||
}
|
||||
|
||||
/** Copy memory-mapped log until the end of the log is reached
|
||||
or the log_copying_stop signal is received
|
||||
@return whether the operation failed */
|
||||
static bool xtrabackup_copy_mmap_logfile()
|
||||
{
|
||||
mysql_mutex_assert_owner(&recv_sys.mutex);
|
||||
recv_sys.offset= size_t(log_sys.calc_lsn_offset(recv_sys.lsn));
|
||||
recv_sys.len= size_t(log_sys.file_size);
|
||||
const size_t seq_offset{log_sys.is_encrypted() ? 8U + 5U : 5U};
|
||||
const char one{'\1'};
|
||||
|
||||
for (unsigned retry_count{0};;)
|
||||
{
|
||||
recv_sys_t::parse_mtr_result r;
|
||||
const byte *start= &log_sys.buf[recv_sys.offset];
|
||||
|
||||
if (recv_sys.parse_mmap<false>(false) == recv_sys_t::OK)
|
||||
{
|
||||
const byte *end;
|
||||
|
||||
do
|
||||
{
|
||||
/* Set the sequence bit (the backed-up log will not wrap around) */
|
||||
size_t seqo= recv_sys.offset - seq_offset;
|
||||
if (seqo < log_sys.START_OFFSET)
|
||||
seqo+= log_sys.file_size - log_sys.START_OFFSET;
|
||||
const byte *seq= &log_sys.buf[seqo];
|
||||
ut_ad(*seq == log_sys.get_sequence_bit(recv_sys.lsn - seq_offset));
|
||||
if (!*seq)
|
||||
{
|
||||
if (xtrabackup_copy_mmap_snippet(dst_log_file, start, seq) ||
|
||||
ds_write(dst_log_file, &one, 1))
|
||||
goto write_error;
|
||||
start = seq + 1;
|
||||
}
|
||||
}
|
||||
while ((r= recv_sys.parse_mmap<false>(false)) == recv_sys_t::OK);
|
||||
|
||||
end= &log_sys.buf[recv_sys.offset];
|
||||
|
||||
if (xtrabackup_copy_mmap_snippet(dst_log_file, start, end))
|
||||
{
|
||||
write_error:
|
||||
msg("Error: write to ib_logfile0 failed");
|
||||
return true;
|
||||
}
|
||||
|
||||
start= end;
|
||||
|
||||
pthread_cond_broadcast(&scanned_lsn_cond);
|
||||
|
||||
if (r == recv_sys_t::GOT_EOF)
|
||||
break;
|
||||
|
||||
retry_count= 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (metadata_to_lsn)
|
||||
{
|
||||
if (metadata_to_lsn <= recv_sys.lsn)
|
||||
return false;
|
||||
}
|
||||
else if (xtrabackup_throttle && io_ticket-- < 0)
|
||||
mysql_cond_wait(&wait_throttle, &recv_sys.mutex);
|
||||
|
||||
if (!retry_count++)
|
||||
msg("Retrying read of log at LSN=" LSN_PF, recv_sys.lsn);
|
||||
else if (retry_count == 100)
|
||||
break;
|
||||
else
|
||||
{
|
||||
timespec abstime;
|
||||
set_timespec_nsec(abstime, 1000000ULL /* 1 ms */);
|
||||
if (!mysql_cond_timedwait(&log_copying_stop, &recv_sys.mutex,
|
||||
&abstime))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
msg(">> log scanned up to (" LSN_PF ")", recv_sys.lsn);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Copy redo log until the current end of the log is reached
|
||||
@return whether the operation failed */
|
||||
@return whether the operation failed */
|
||||
static bool xtrabackup_copy_logfile()
|
||||
{
|
||||
mysql_mutex_assert_owner(&recv_sys.mutex);
|
||||
|
@ -3398,16 +3506,17 @@ static bool xtrabackup_copy_logfile()
|
|||
|
||||
ut_a(dst_log_file);
|
||||
ut_ad(recv_sys.is_initialised());
|
||||
|
||||
#ifdef HAVE_INNODB_MMAP
|
||||
if (log_sys.is_mmap())
|
||||
return xtrabackup_copy_mmap_logfile();
|
||||
#endif
|
||||
const size_t sequence_offset{log_sys.is_encrypted() ? 8U + 5U : 5U};
|
||||
const size_t block_size_1{log_sys.write_size - 1};
|
||||
|
||||
ut_ad(!log_sys.is_pmem());
|
||||
|
||||
{
|
||||
recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) &
|
||||
block_size_1;
|
||||
recv_sys.len= 0;
|
||||
}
|
||||
recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) &
|
||||
block_size_1;
|
||||
recv_sys.len= 0;
|
||||
|
||||
for (unsigned retry_count{0};;)
|
||||
{
|
||||
|
@ -5397,9 +5506,8 @@ fail:
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (!log_sys.create()) {
|
||||
goto fail;
|
||||
}
|
||||
log_sys.create();
|
||||
|
||||
/* get current checkpoint_lsn */
|
||||
{
|
||||
log_sys.latch.wr_lock(SRW_LOCK_CALL);
|
||||
|
@ -6745,9 +6853,7 @@ error:
|
|||
}
|
||||
|
||||
recv_sys.create();
|
||||
if (!log_sys.create()) {
|
||||
goto error;
|
||||
}
|
||||
log_sys.create();
|
||||
recv_sys.recovery_on = true;
|
||||
|
||||
xb_fil_io_init();
|
||||
|
|
|
@ -175,6 +175,11 @@ static inline uchar last_byte_mask(uint bits)
|
|||
return (uchar) ((2U << used) - 1);
|
||||
}
|
||||
|
||||
static inline uint my_bits_in_bytes(uint n)
|
||||
{
|
||||
return ((n + 7) / 8);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
|
|
@ -1029,11 +1029,7 @@ extern int my_win_pclose(FILE*);
|
|||
#endif
|
||||
|
||||
/* my_getpagesize */
|
||||
#ifdef HAVE_GETPAGESIZE
|
||||
#define my_getpagesize() getpagesize()
|
||||
#else
|
||||
int my_getpagesize(void);
|
||||
#endif
|
||||
|
||||
int my_msync(int, void *, size_t, int);
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ extern "C" my_bool wsrep_thd_is_local_toi(const MYSQL_THD thd);
|
|||
extern "C" my_bool wsrep_thd_is_in_rsu(const MYSQL_THD thd);
|
||||
/* Return true if thd is in BF mode, either high_priority or TOI */
|
||||
extern "C" my_bool wsrep_thd_is_BF(const MYSQL_THD thd, my_bool sync);
|
||||
/* Return true if thd is streaming */
|
||||
/* Return true if thd is streaming in progress */
|
||||
extern "C" my_bool wsrep_thd_is_SR(const MYSQL_THD thd);
|
||||
extern "C" void wsrep_handle_SR_rollback(MYSQL_THD BF_thd, MYSQL_THD victim_thd);
|
||||
/* Return thd retry counter */
|
||||
|
|
|
@ -258,8 +258,10 @@ select * from t2;
|
|||
insert into t2 (a) values (1025);
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR ..
|
||||
--disable_cursor_protocol
|
||||
--error ER_DUP_ENTRY
|
||||
eval select f2(25) into outfile "$MYSQLTEST_VARDIR/tmp/dml.out" from t1;
|
||||
--enable_cursor_protocol
|
||||
select * from t2;
|
||||
rollback;
|
||||
select * from t2;
|
||||
|
@ -279,8 +281,10 @@ select * from t2;
|
|||
--echo =======================================================================
|
||||
|
||||
insert into t2 (a) values (1027);
|
||||
--disable_cursor_protocol
|
||||
--error ER_DUP_ENTRY
|
||||
select f2(27) into @foo;
|
||||
--enable_cursor_protocol
|
||||
select * from t2;
|
||||
rollback;
|
||||
select * from t2;
|
||||
|
|
|
@ -17,6 +17,8 @@ INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
|
|||
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
|
||||
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
|
||||
|
||||
#enable after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
#check after fix MDEV-29290
|
||||
--disable_view_protocol
|
||||
# Check pattern (important for ucs2, utf16, utf32)
|
||||
|
@ -24,5 +26,6 @@ SELECT hex(concat(repeat(0xF1F2, 10), '%'));
|
|||
|
||||
--echo 3 rows expected
|
||||
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
|
||||
DROP TABLE t1;
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -1646,7 +1646,10 @@ SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
|
|||
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
#Check after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
|
||||
--enable_cursor_protocol
|
||||
--disable_metadata
|
||||
--enable_view_protocol
|
||||
--echo # All columns must be VARCHAR(9) with the same length:
|
||||
|
|
|
@ -168,7 +168,9 @@ while ($_dt_tables)
|
|||
--disable_ps2_protocol
|
||||
--let $_dt_outfile= `SELECT @@datadir`
|
||||
--let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table
|
||||
--disable_cursor_protocol
|
||||
eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`;
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
# Compare files.
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
--echo #
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
--disable_cursor_protocol
|
||||
if ($select) {
|
||||
--enable_prepare_warnings
|
||||
--disable_query_log
|
||||
|
@ -164,5 +165,6 @@ SHOW STATUS WHERE (Variable_name LIKE 'Sort%' OR
|
|||
--enable_query_log
|
||||
|
||||
--echo
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
|
|
|
@ -824,6 +824,7 @@ eval CREATE TABLE t2 (
|
|||
i $datetime DEFAULT $current_timestamp ON UPDATE $current_timestamp NOT NULL
|
||||
);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT 1 INTO OUTFILE 't3.dat' FROM dual;
|
||||
|
||||
|
@ -833,6 +834,7 @@ FROM dual;
|
|||
|
||||
SELECT 1, 2 INTO OUTFILE 't5.dat' FROM dual;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # Mon Aug 1 15:11:19 2011 UTC
|
||||
SET TIMESTAMP = 1312211479.918273;
|
||||
|
@ -931,11 +933,13 @@ remove_file $MYSQLD_DATADIR/test/t5.dat;
|
|||
--echo # Mon Aug 1 15:11:19 2011 UTC
|
||||
SET TIMESTAMP = 1312211479.089786;
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT 1 INTO OUTFILE "file1.dat" FROM dual;
|
||||
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
|
||||
INTO OUTFILE "file2.dat" FROM dual;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # Too short row
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ set LOCAL query_cache_type=ON;
|
|||
set GLOBAL query_cache_size=1355776;
|
||||
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
|
||||
reset query cache;
|
||||
flush status;
|
||||
|
@ -175,6 +176,7 @@ show status like "Qcache_queries_in_cache";
|
|||
show status like "Qcache_hits";
|
||||
show status like "Qcache_not_cached";
|
||||
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
# Cleanup
|
||||
|
|
10
mysql-test/include/have_tlsv13.inc
Normal file
10
mysql-test/include/have_tlsv13.inc
Normal file
|
@ -0,0 +1,10 @@
|
|||
--disable_query_log
|
||||
connect (ssl_connection,localhost,root,,,,,SSL);
|
||||
|
||||
if (`SELECT VARIABLE_VALUE NOT LIKE 'TLSv1.3' FROM information_schema.SESSION_STATUS WHERE VARIABLE_NAME = 'ssl_version'`) {
|
||||
skip Needs TLSv1.3;
|
||||
}
|
||||
|
||||
disconnect ssl_connection;
|
||||
connection default;
|
||||
--enable_query_log
|
|
@ -206,6 +206,7 @@ execute full_info ;
|
|||
--error 1064
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
select '------ select column, .. into @parm,.. ------' as test_sequence ;
|
||||
--enable_query_log
|
||||
|
@ -243,6 +244,7 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08,
|
|||
@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24,
|
||||
@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32
|
||||
from t9 where c1= ?" ;
|
||||
--enable_cursor_protocol
|
||||
set @my_key= 1 ;
|
||||
execute stmt1 using @my_key ;
|
||||
# get as much information about the parameters as possible
|
||||
|
|
|
@ -28,6 +28,7 @@ drop table if exists t1,t2,t3;
|
|||
set @save_query_cache_size = @@global.query_cache_size;
|
||||
set GLOBAL query_cache_size = 1355776;
|
||||
|
||||
--disable_cursor_protocol
|
||||
#
|
||||
# Without auto_commit.
|
||||
#
|
||||
|
@ -86,6 +87,7 @@ show status like "Qcache_hits";
|
|||
commit;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
drop table t3,t2,t1;
|
||||
--enable_cursor_protocol
|
||||
|
||||
eval CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id))$partitions_id;
|
||||
select count(*) from t1;
|
||||
|
@ -128,6 +130,7 @@ connection default;
|
|||
# This should be 'YES'.
|
||||
SHOW VARIABLES LIKE 'have_query_cache';
|
||||
|
||||
--disable_cursor_protocol
|
||||
SET GLOBAL query_cache_size = 204800;
|
||||
flush status;
|
||||
SET @@autocommit=1;
|
||||
|
@ -190,6 +193,7 @@ disconnect connection1;
|
|||
connection default;
|
||||
set @@global.query_cache_size = @save_query_cache_size;
|
||||
drop table t2;
|
||||
--enable_cursor_protocol
|
||||
|
||||
SET global query_cache_type=default;
|
||||
--enable_view_protocol
|
||||
|
|
|
@ -45,9 +45,11 @@ show status like "Qcache_queries_in_cache";
|
|||
show status like "Qcache_hits";
|
||||
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
--enable_cursor_protocol
|
||||
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
|
@ -81,9 +83,11 @@ show status like "Qcache_queries_in_cache";
|
|||
show status like "Qcache_hits";
|
||||
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
--enable_cursor_protocol
|
||||
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
|
@ -118,6 +122,7 @@ show status like "Qcache_queries_in_cache";
|
|||
show status like "Qcache_hits";
|
||||
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
BEGIN;
|
||||
UPDATE `t1` SET `cool` = 1 WHERE `id` = 1;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
|
@ -127,6 +132,7 @@ BEGIN;
|
|||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
ROLLBACK;
|
||||
SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1;
|
||||
--enable_cursor_protocol
|
||||
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select "Outfile OK" into outfile "$MYSQLTEST_VARDIR/tmp/outfile.test";
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
|
|
@ -35,7 +35,9 @@ SET sql_mode=DEFAULT;
|
|||
--eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
--eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1
|
||||
--enable_cursor_protocol
|
||||
DELETE FROM t1;
|
||||
--enable_ps2_protocol
|
||||
SET sql_mode=TRADITIONAL;
|
||||
|
|
|
@ -46,9 +46,11 @@ if (`SELECT LENGTH(@@secure_file_priv) > 0`)
|
|||
--let $_wvtf_suffix= `SELECT UUID()`
|
||||
--let $_wvtf_tmp_file= $MYSQLTEST_VARDIR/_wvtf_$_wvtf_suffix
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT '$write_var' INTO DUMPFILE '$_wvtf_tmp_file'
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--copy_file $_wvtf_tmp_file $write_to_file
|
||||
--remove_file $_wvtf_tmp_file
|
||||
}
|
||||
|
|
|
@ -971,6 +971,7 @@ while ($count)
|
|||
commit;
|
||||
--enable_query_log
|
||||
|
||||
--disable_cursor_protocol
|
||||
select index_length into @unpaked_keys_size from
|
||||
information_schema.tables where table_name='t1';
|
||||
alter table t1 pack_keys=1;
|
||||
|
@ -984,6 +985,7 @@ alter table t1 max_rows=100;
|
|||
select max_data_length into @changed_max_data_length from
|
||||
information_schema.tables where table_name='t1';
|
||||
select (@orig_max_data_length > @changed_max_data_length);
|
||||
--enable_cursor_protocol
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
|
|
@ -66,11 +66,13 @@ set debug_sync= 'now SIGNAL end';
|
|||
--connection con2
|
||||
commit;
|
||||
--connection default
|
||||
--disable_cursor_protocol
|
||||
--disable_view_protocol
|
||||
select variable_value into @otd from information_schema.session_status where variable_name='Opened_table_definitions';
|
||||
select * from t1;
|
||||
select variable_value-@otd from information_schema.session_status where variable_name='Opened_table_definitions';
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # long transaction and add column
|
||||
create or replace table t1 (a int);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
--source include/not_embedded.inc
|
||||
|
||||
--disable_cursor_protocol
|
||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||
--enable_cursor_protocol
|
||||
|
||||
select * from mysql.user where user = 'root' and host = 'localhost';
|
||||
--echo # Test syntax
|
||||
|
|
|
@ -19,9 +19,11 @@ SET @@global.slow_query_log = ON;
|
|||
|
||||
create table t1 (a int);
|
||||
INSERT INTO t1 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select * from t1 where a<3;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
drop table t1;
|
||||
let SLOW_LOG_FILE= `select @@slow_query_log_file`;
|
||||
|
||||
|
|
|
@ -11,9 +11,11 @@ set default_storage_engine=innodb;
|
|||
#
|
||||
create table t1 (pk int auto_increment primary key, f varchar(20));
|
||||
insert t1 (f) values ('a'), ('b'), ('c'), ('d');
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select null, f into outfile 'load.data' from t1 limit 1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
load data infile 'load.data' into table t1;
|
||||
insert t1 (f) values ('<===');
|
||||
select * from t1;
|
||||
|
|
|
@ -45,9 +45,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql;
|
|||
--echo #
|
||||
--disable_query_log
|
||||
create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--enable_query_log
|
||||
--source include/kill_mysqld.inc
|
||||
--error 1
|
||||
|
|
|
@ -20,6 +20,7 @@ create table t9 (c1 int);
|
|||
create table t10 (c1 int);
|
||||
--enable_warnings
|
||||
|
||||
--disable_cursor_protocol
|
||||
# Query PS to know initial read count for frm file.
|
||||
--enable_prepare_warnings
|
||||
select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME
|
||||
|
@ -33,16 +34,19 @@ show tables;
|
|||
select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME
|
||||
like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
|
||||
into @count_read_after;
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @count_read_after-@count_read_before;
|
||||
|
||||
show full tables;
|
||||
|
||||
--disable_cursor_protocol
|
||||
# Query PS to know read count for frm file after above query. COUNT_READ
|
||||
# will be incremented by 1 as FRM file will be opened for above query.
|
||||
select Sum(ALL(COUNT_READ)) from performance_schema.file_summary_by_instance where FILE_NAME
|
||||
like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/file/sql/FRM'
|
||||
into @count_read_after;
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @count_read_after-@count_read_before;
|
||||
|
||||
|
|
|
@ -448,3 +448,33 @@ FOUND 2 /This connection closed normally without authentication/ in mysqld.1.err
|
|||
SET GLOBAL log_warnings=default;
|
||||
SET GLOBAL connect_timeout= @save_connect_timeout;
|
||||
# End of 10.4 tests
|
||||
#
|
||||
# MDEV-33990: SHOW STATUS counts ER_CON_COUNT_ERROR as
|
||||
# Connection_errors_internal
|
||||
#
|
||||
flush status;
|
||||
show global status like 'Connection_errors%';
|
||||
Variable_name Value
|
||||
Connection_errors_accept 0
|
||||
Connection_errors_internal 0
|
||||
Connection_errors_max_connections 0
|
||||
Connection_errors_peer_address 0
|
||||
Connection_errors_select 0
|
||||
Connection_errors_tcpwrap 0
|
||||
set @max_con.save= @@max_connections;
|
||||
set global max_connections= 10;
|
||||
# ERROR 1040
|
||||
# ERROR 1040
|
||||
connection default;
|
||||
show global status like 'Connection_errors%';
|
||||
Variable_name Value
|
||||
Connection_errors_accept 0
|
||||
Connection_errors_internal 0
|
||||
Connection_errors_max_connections 2
|
||||
Connection_errors_peer_address 0
|
||||
Connection_errors_select 0
|
||||
Connection_errors_tcpwrap 0
|
||||
set global max_connections= @max_con.save;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -508,3 +508,38 @@ SET GLOBAL log_warnings=default;
|
|||
SET GLOBAL connect_timeout= @save_connect_timeout;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33990: SHOW STATUS counts ER_CON_COUNT_ERROR as
|
||||
--echo # Connection_errors_internal
|
||||
--echo #
|
||||
|
||||
flush status;
|
||||
|
||||
show global status like 'Connection_errors%';
|
||||
|
||||
set @max_con.save= @@max_connections;
|
||||
set global max_connections= 10;
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
--let $n= 12
|
||||
while ($n)
|
||||
{
|
||||
--error 0,ER_CON_COUNT_ERROR
|
||||
--connect (con$n,localhost,root)
|
||||
if ($mysql_errno) {
|
||||
--echo # ERROR $mysql_errno
|
||||
}
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
--connection default
|
||||
show global status like 'Connection_errors%';
|
||||
set global max_connections= @max_con.save;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -62,6 +62,7 @@ while ($1)
|
|||
commit;
|
||||
--enable_query_log
|
||||
|
||||
--disable_cursor_protocol
|
||||
flush status;
|
||||
select count(distinct n) from t1;
|
||||
show status like 'Created_tmp_disk_tables';
|
||||
|
@ -83,6 +84,7 @@ flush status;
|
|||
select count(distinct s) from t1;
|
||||
show status like 'Created_tmp_disk_tables';
|
||||
drop table t1;
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -70,3 +70,12 @@ select * from mysql.user where user like 'foo';
|
|||
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time
|
||||
% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 mysql_native_password N N 0.000000
|
||||
drop user foo;
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# MDEV-24193 UBSAN: sql/sql_acl.cc:9985:29: runtime error: member access within null pointer of type 'struct TABLE' , ASAN: use-after-poison in handle_grant_table
|
||||
#
|
||||
RENAME TABLE mysql.procs_priv TO mysql.temp;
|
||||
CREATE USER a IDENTIFIED WITH 'a';
|
||||
ERROR HY000: Plugin 'a' is not loaded
|
||||
RENAME TABLE mysql.temp TO mysql.procs_priv;
|
||||
# End of 10.5 tests
|
||||
|
|
|
@ -56,3 +56,15 @@ create user foo with MAX_QUERIES_PER_HOUR 10
|
|||
MAX_USER_CONNECTIONS 40;
|
||||
select * from mysql.user where user like 'foo';
|
||||
drop user foo;
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24193 UBSAN: sql/sql_acl.cc:9985:29: runtime error: member access within null pointer of type 'struct TABLE' , ASAN: use-after-poison in handle_grant_table
|
||||
--echo #
|
||||
RENAME TABLE mysql.procs_priv TO mysql.temp;
|
||||
--error ER_PLUGIN_IS_NOT_LOADED
|
||||
CREATE USER a IDENTIFIED WITH 'a';
|
||||
RENAME TABLE mysql.temp TO mysql.procs_priv;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
|
|
@ -1048,14 +1048,14 @@ drop table t1;
|
|||
--echo # MDEV-16473: query with CTE when no database is set
|
||||
--echo #
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
create database db_mdev_16473;
|
||||
use db_mdev_16473;
|
||||
drop database db_mdev_16473;
|
||||
|
||||
--disable_service_connection
|
||||
--echo # Now no default database is set
|
||||
select database();
|
||||
--enable_service_connection
|
||||
|
||||
with cte as (select 1 as a) select * from cte;
|
||||
|
||||
|
@ -1073,7 +1073,6 @@ select * from cte, db_mdev_16473.t1 as t where cte.a=t.a;
|
|||
drop database db_mdev_16473;
|
||||
|
||||
use test;
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17154: using parameter markers for PS within CTEs more than once
|
||||
|
@ -1220,8 +1219,6 @@ DROP TABLE test.t;
|
|||
--echo # MDEV-22781: create view with CTE without default database
|
||||
--echo #
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
create database db;
|
||||
use db;
|
||||
drop database db;
|
||||
|
@ -1231,7 +1228,9 @@ insert into db1.t1 values (3),(7),(1);
|
|||
|
||||
create view db1.v1 as with t as (select * from db1.t1) select * from t;
|
||||
show create view db1.v1;
|
||||
--disable_service_connection
|
||||
select * from db1.v1;
|
||||
--enable_service_connection
|
||||
drop view db1.v1;
|
||||
|
||||
prepare stmt from "
|
||||
|
@ -1240,14 +1239,15 @@ create view db1.v1 as with t as (select * from db1.t1) select * from t;
|
|||
execute stmt;
|
||||
deallocate prepare stmt;
|
||||
show create view db1.v1;
|
||||
--disable_service_connection
|
||||
select * from db1.v1;
|
||||
--enable_service_connection
|
||||
drop view db1.v1;
|
||||
|
||||
drop table db1.t1;
|
||||
drop database db1;
|
||||
|
||||
use test;
|
||||
--enable_view_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24597: CTE with union used multiple times in query
|
||||
|
|
|
@ -78,9 +78,11 @@ select hex(convert(_big5 0xC84041 using ucs2));
|
|||
set names big5;
|
||||
create table t1 (a blob);
|
||||
insert into t1 values (0xEE00);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select * into outfile 'test/t1.txt' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
delete from t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
set names binary;
|
||||
|
||||
--source include/ctype_numconv.inc
|
||||
|
@ -232,8 +233,11 @@ SELECT DATE_FORMAT('2004-02-02','%W');
|
|||
SELECT HEX(DATE_FORMAT('2004-02-02','%W'));
|
||||
#Enable after fix MDEV-33936
|
||||
--disable_view_protocol
|
||||
#enable after fix MDEV-34215
|
||||
--disable_cursor_protocol
|
||||
SELECT DATE_FORMAT(TIME'-01:01:01','%h');
|
||||
SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h'));
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo # latin1 format, binary result
|
||||
|
@ -241,8 +245,11 @@ SELECT DATE_FORMAT('2004-02-02',_latin1'%W');
|
|||
SELECT HEX(DATE_FORMAT('2004-02-02',_latin1'%W'));
|
||||
#Enable after fix MDEV-33936
|
||||
--disable_view_protocol
|
||||
#enable after fix MDEV-34215
|
||||
--disable_cursor_protocol
|
||||
SELECT DATE_FORMAT(TIME'-01:01:01',_latin1'%h');
|
||||
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_latin1'%h'));
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo # Binary format, latin1 result
|
||||
|
@ -251,8 +258,11 @@ SELECT DATE_FORMAT('2004-02-02',_binary'%W');
|
|||
SELECT HEX(DATE_FORMAT('2004-02-02',_binary'%W'));
|
||||
#Enable after fix MDEV-33936
|
||||
--disable_view_protocol
|
||||
#enable after fix MDEV-34215
|
||||
--disable_cursor_protocol
|
||||
SELECT DATE_FORMAT(TIME'-01:01:01',_binary'%h');
|
||||
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_binary'%h'));
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
|
|
|
@ -132,6 +132,33 @@ a c
|
|||
@002d1 @002d1
|
||||
DROP TABLE t1;
|
||||
SET NAMES utf8;
|
||||
#
|
||||
# MDEV-25900 Assertion `octets < 1024' failed in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string OR Assertion `field_length < 1024' failed in Field_string::save_field_metadata
|
||||
#
|
||||
CREATE TABLE t1 (a CHAR(204)) CHARACTER SET filename;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` char(204) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=filename COLLATE=filename
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a CHAR(205)) CHARACTER SET filename;
|
||||
ERROR 42000: Column length too big for column 'a' (max = 204); use BLOB or TEXT instead
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1 (a CHAR(205)) CHARACTER SET filename;
|
||||
Warnings:
|
||||
Note 1246 Converting column 'a' from CHAR to VARCHAR
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(205) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=filename COLLATE=filename
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
CREATE TABLE t1 (a CHAR(205) CHARACTER SET latin1);
|
||||
ALTER TABLE t1 CONVERT TO CHARACTER SET filename;
|
||||
ERROR 42000: Column length too big for column 'a' (max = 204); use BLOB or TEXT instead
|
||||
DROP TABLE t1;
|
||||
# End of 10.5 tests
|
||||
#
|
||||
# Start of 10.9 tests
|
||||
|
|
|
@ -20,10 +20,13 @@ drop table com1;
|
|||
create table `clock$` (a int);
|
||||
drop table `clock$`;
|
||||
|
||||
# Enable after fix MDEV-31553
|
||||
--disable_cursor_protocol
|
||||
# Enable after fix MDEV-29295
|
||||
--disable_view_protocol
|
||||
select convert(convert(',' using filename) using binary);
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
|
||||
|
@ -141,6 +144,28 @@ SET NAMES utf8;
|
|||
|
||||
--enable_ps_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25900 Assertion `octets < 1024' failed in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string OR Assertion `field_length < 1024' failed in Field_string::save_field_metadata
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a CHAR(204)) CHARACTER SET filename;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--error ER_TOO_BIG_FIELDLENGTH
|
||||
CREATE TABLE t1 (a CHAR(205)) CHARACTER SET filename;
|
||||
|
||||
SET sql_mode='';
|
||||
CREATE TABLE t1 (a CHAR(205)) CHARACTER SET filename;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=DEFAULT;
|
||||
|
||||
CREATE TABLE t1 (a CHAR(205) CHARACTER SET latin1);
|
||||
--error ER_TOO_BIG_FIELDLENGTH
|
||||
ALTER TABLE t1 CONVERT TO CHARACTER SET filename;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -65,10 +65,12 @@ CREATE TABLE t1(a MEDIUMTEXT CHARACTER SET gbk,
|
|||
INSERT INTO t1 VALUES
|
||||
(REPEAT(0x1125,200000), REPEAT(0x1125,200000)), ('', ''), ('', '');
|
||||
|
||||
--disable_cursor_protocol
|
||||
--enable_prepare_warnings
|
||||
SELECT a FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
|
||||
SELECT b FROM t1 GROUP BY 1 LIMIT 1 INTO @nullll;
|
||||
--disable_prepare_warnings
|
||||
--enable_cursor_protocol
|
||||
|
||||
DROP TABLES t1;
|
||||
|
||||
|
|
|
@ -9008,6 +9008,12 @@ CAST(_latin1 0x61FF62 AS INT)
|
|||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'aÿb'
|
||||
#
|
||||
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
#
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING latin1) AS SIGNED) AS c1;
|
||||
c1
|
||||
-9223372036854775808
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -523,6 +523,13 @@ SELECT CAST(_latin1 0x617E62 AS INT);
|
|||
SELECT CAST(_latin1 0x61FF62 AS INT);
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
--echo #
|
||||
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING latin1) AS SIGNED) AS c1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -74,13 +74,12 @@ SHOW TABLES IN
|
|||
SET CHARACTER SET koi8r;
|
||||
DROP DATABASE ÔÅÓÔ;
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
--disable_service_connection
|
||||
SET NAMES koi8r;
|
||||
SELECT hex('ÔÅÓÔ');
|
||||
SET character_set_connection=cp1251;
|
||||
SELECT hex('ÔÅÓÔ');
|
||||
--enable_view_protocol
|
||||
--enable_service_connection
|
||||
USE test;
|
||||
|
||||
# Bug#4417
|
||||
|
|
|
@ -6537,5 +6537,20 @@ DROP VIEW v1;
|
|||
DROP TABLE t1;
|
||||
SET NAMES utf8mb3;
|
||||
#
|
||||
# MDEV-28386 UBSAN: runtime error: negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoull_8bit on SELECT ... OCT
|
||||
#
|
||||
CREATE TABLE t1 (c TEXT CHARACTER SET ucs2);
|
||||
INSERT INTO t1 VALUES ('-9223372036854775808.5');
|
||||
SELECT OCT(c) FROM t1;
|
||||
OCT(c)
|
||||
1000000000000000000000
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
#
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING ucs2) AS SIGNED) AS c1;
|
||||
c1
|
||||
-9223372036854775808
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -75,11 +75,13 @@ DROP TABLE t1;
|
|||
|
||||
--echo # Problem # 1 (original report): wrong parsing of ucs2 data
|
||||
SET character_set_connection=ucs2;
|
||||
--disable_cursor_protocol
|
||||
--enable_prepare_warnings
|
||||
--disable_ps2_protocol
|
||||
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp.txt';
|
||||
--disable_prepare_warnings
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
CREATE TABLE t1(a INT);
|
||||
LOAD DATA INFILE 'tmpp.txt' INTO TABLE t1 CHARACTER SET ucs2
|
||||
(@b) SET a=REVERSE(@b);
|
||||
|
@ -92,9 +94,11 @@ remove_file $MYSQLD_DATADIR/test/tmpp.txt;
|
|||
|
||||
--disable_ps2_protocol
|
||||
--echo # Problem # 2 : if you write and read ucs2 data to a file they're lost
|
||||
--disable_cursor_protocol
|
||||
--enable_prepare_warnings
|
||||
SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmpp2.txt' CHARACTER SET ucs2;
|
||||
--disable_prepare_warnings
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
CREATE TABLE t1(a INT);
|
||||
LOAD DATA INFILE 'tmpp2.txt' INTO TABLE t1 CHARACTER SET ucs2
|
||||
|
@ -1217,6 +1221,20 @@ DROP VIEW v1;
|
|||
DROP TABLE t1;
|
||||
SET NAMES utf8mb3;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28386 UBSAN: runtime error: negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoull_8bit on SELECT ... OCT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (c TEXT CHARACTER SET ucs2);
|
||||
INSERT INTO t1 VALUES ('-9223372036854775808.5');
|
||||
SELECT OCT(c) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
--echo #
|
||||
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING ucs2) AS SIGNED) AS c1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
|
|
|
@ -741,6 +741,8 @@ CREATE TABLE t1 (
|
|||
s3 MEDIUMTEXT CHARACTER SET utf16,
|
||||
s4 LONGTEXT CHARACTER SET utf16
|
||||
);
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
SET NAMES utf8, @@character_set_results=NULL;
|
||||
|
@ -751,6 +753,7 @@ SET NAMES utf8;
|
|||
SELECT *, HEX(s1) FROM t1;
|
||||
--disable_metadata
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
|
|
@ -703,6 +703,8 @@ CREATE TABLE t1 (
|
|||
s3 MEDIUMTEXT CHARACTER SET utf16le,
|
||||
s4 LONGTEXT CHARACTER SET utf16le
|
||||
);
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
SET NAMES utf8, @@character_set_results=NULL;
|
||||
|
@ -713,6 +715,7 @@ SET NAMES utf8;
|
|||
SELECT *, HEX(s1) FROM t1;
|
||||
--disable_metadata
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
|
|
@ -3109,3 +3109,12 @@ SET NAMES utf8mb4;
|
|||
#
|
||||
# End of 10.11 tests
|
||||
#
|
||||
#
|
||||
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
#
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
|
||||
c1
|
||||
-9223372036854775808
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -795,6 +795,8 @@ CREATE TABLE t1 (
|
|||
s3 MEDIUMTEXT CHARACTER SET utf32,
|
||||
s4 LONGTEXT CHARACTER SET utf32
|
||||
);
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
SET NAMES utf8mb4, @@character_set_results=NULL;
|
||||
|
@ -805,6 +807,7 @@ SET NAMES utf8mb4;
|
|||
SELECT *, HEX(s1) FROM t1;
|
||||
--disable_metadata
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -1131,8 +1134,11 @@ SELECT HEX(DATE_FORMAT(TIME'-01:01:01','%h'));
|
|||
--echo # utf8 format, utf32 result
|
||||
SELECT DATE_FORMAT('2004-02-02',_utf8'%W');
|
||||
SELECT HEX(DATE_FORMAT('2004-02-02',_utf8'%W'));
|
||||
#enable after fix MDEV-34215
|
||||
--disable_cursor_protocol
|
||||
SELECT DATE_FORMAT(TIME'-01:01:01',_utf8'%h');
|
||||
SELECT HEX(DATE_FORMAT(TIME'-01:01:01',_utf8'%h'));
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # utf32 format, utf8 result
|
||||
SET NAMES utf8;
|
||||
|
@ -1232,3 +1238,14 @@ SET NAMES utf8mb4;
|
|||
--echo #
|
||||
|
||||
--enable_service_connection
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
--echo #
|
||||
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -1501,8 +1501,11 @@ SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
|
|||
SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
|
||||
#Enable view-protocol after fix MDEV-33942
|
||||
--disable_view_protocol
|
||||
#Enable after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
|
||||
|
@ -1581,12 +1584,15 @@ CREATE TABLE t1 (
|
|||
);
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
#Check after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SET NAMES utf8, @@character_set_results=NULL;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
SET NAMES latin1;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
SET NAMES utf8;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
--enable_cursor_protocol
|
||||
--disable_metadata
|
||||
--enable_view_protocol
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
|
|
|
@ -1798,12 +1798,15 @@ CREATE TABLE t1 (
|
|||
s4 LONGTEXT CHARACTER SET utf8mb4
|
||||
);
|
||||
--enable_metadata
|
||||
#Check after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SET NAMES utf8mb4, @@character_set_results=NULL;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
SET NAMES latin1;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
SET NAMES utf8mb4;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
--enable_cursor_protocol
|
||||
--disable_metadata
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
|
@ -1953,7 +1956,9 @@ DROP TABLE t1;
|
|||
|
||||
SET NAMES utf8mb4;
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
|
||||
--disable_cursor_protocol
|
||||
SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
|
||||
--enable_cursor_protocol
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E
|
||||
as int);
|
||||
|
||||
|
|
|
@ -565,6 +565,17 @@ where t2.b*10 < sum(t3.b)));
|
|||
drop table t1,t2,t3;
|
||||
End of 10.4 tests
|
||||
#
|
||||
# MDEV-26459: Assertion `block_size <= 0xFFFFFFFFL' failed
|
||||
# in calculate_block_sizes for 10.7 only
|
||||
#
|
||||
SET @sort_buffer_size_save= @@sort_buffer_size;
|
||||
SET sort_buffer_size=1125899906842624;
|
||||
CREATE TABLE t1 (a INT,b CHAR,KEY(a,b));
|
||||
DELETE a1 FROM t1 AS a1,t1 AS a2 WHERE a1.a=a2.a;
|
||||
DROP TABLE t1;
|
||||
SET sort_buffer_size= @sort_buffer_size_save;
|
||||
# End of 10.11 tests
|
||||
#
|
||||
# MDEV-29428: DELETE with ORDER BY without LIMIT clause
|
||||
#
|
||||
create table t1 (c1 integer, c2 integer, c3 integer);
|
||||
|
|
|
@ -627,6 +627,20 @@ drop table t1,t2,t3;
|
|||
|
||||
--echo End of 10.4 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26459: Assertion `block_size <= 0xFFFFFFFFL' failed
|
||||
--echo # in calculate_block_sizes for 10.7 only
|
||||
--echo #
|
||||
|
||||
SET @sort_buffer_size_save= @@sort_buffer_size;
|
||||
SET sort_buffer_size=1125899906842624;
|
||||
CREATE TABLE t1 (a INT,b CHAR,KEY(a,b));
|
||||
DELETE a1 FROM t1 AS a1,t1 AS a2 WHERE a1.a=a2.a;
|
||||
DROP TABLE t1;
|
||||
SET sort_buffer_size= @sort_buffer_size_save;
|
||||
|
||||
--echo # End of 10.11 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29428: DELETE with ORDER BY without LIMIT clause
|
||||
--echo #
|
||||
|
|
|
@ -866,6 +866,8 @@ INSERT INTO example1463 VALUES ('David', 'Unknown', 100);
|
|||
INSERT INTO example1463 VALUES ('Edward', 'Success', 150);
|
||||
INSERT INTO example1463 VALUES ('Edward', 'Pending', 150);
|
||||
|
||||
#Enable after fix MDEV-31720
|
||||
--disable_cursor_protocol
|
||||
SELECT Customer, Success, SUM(OrderSize)
|
||||
FROM (SELECT Customer,
|
||||
CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
|
||||
|
@ -873,6 +875,7 @@ SELECT Customer, Success, SUM(OrderSize)
|
|||
FROM example1463) as subQ
|
||||
GROUP BY Success, Customer
|
||||
WITH ROLLUP;
|
||||
--enable_cursor_protocol
|
||||
SELECT Customer, Success, SUM(OrderSize)
|
||||
FROM (SELECT Customer,
|
||||
CASE WHEN DeliveryStatus='Success' THEN 'Yes' ELSE 'No' END AS Success,
|
||||
|
|
|
@ -42,6 +42,7 @@ explain extended
|
|||
select * from (select * from t1 where f1 in (2,3)) tt join
|
||||
(select * from t1 where f1 in (1,2)) aa on tt.f1=aa.f1;
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
explain extended
|
||||
|
@ -51,6 +52,7 @@ flush status;
|
|||
select * from (select * from t1 where f1 in (2,3)) tt where f11=2;
|
||||
show status like 'Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo for merged views
|
||||
create view v1 as select * from t1;
|
||||
|
@ -72,12 +74,14 @@ explain extended
|
|||
select * from v3 join v4 on f1=f2;
|
||||
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
flush status;
|
||||
explain extended select * from v4 where f2 in (1,3);
|
||||
show status like 'Handler_read%';
|
||||
flush status;
|
||||
select * from v4 where f2 in (1,3);
|
||||
show status like 'Handler_read%';
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo for materialized derived tables
|
||||
--echo explain for simple derived
|
||||
|
@ -92,8 +96,10 @@ flush status;
|
|||
explain select * from t1 join (select * from t2 group by f2) tt on f1=f2;
|
||||
show status like 'Handler_read%';
|
||||
flush status;
|
||||
--disable_cursor_protocol
|
||||
select * from t1 join (select * from t2 group by f2) tt on f1=f2;
|
||||
show status like 'Handler_read%';
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo for materialized views
|
||||
|
@ -110,6 +116,7 @@ explain extended select * from t1 join v2 on f1=f2;
|
|||
select * from t1 join v2 on f1=f2;
|
||||
explain extended
|
||||
select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
select * from t1,v3 as v31,v3 where t1.f1=v31.f1 and t1.f1=v3.f1;
|
||||
|
@ -122,6 +129,7 @@ flush status;
|
|||
select * from t1 join v2 on f1=f2;
|
||||
show status like 'Handler_read%';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
explain extended select * from v1 join v4 on f1=f2;
|
||||
--source include/explain-no-costs.inc
|
||||
|
@ -168,6 +176,7 @@ join
|
|||
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z
|
||||
on x.f1 = z.f1;
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
flush status;
|
||||
select * from
|
||||
|
@ -178,6 +187,7 @@ join
|
|||
show status like 'Handler_read%';
|
||||
flush status;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo merged in merged derived join merged in merged derived
|
||||
explain extended select * from
|
||||
|
|
|
@ -460,6 +460,7 @@ INSERT INTO t1 VALUES (2,2,'APPLE');
|
|||
INSERT INTO t1 VALUES (3,2,'APPLE');
|
||||
INSERT INTO t1 VALUES (4,3,'PEAR');
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name =
|
||||
'APPLE';
|
||||
SELECT @v1, @v2;
|
||||
|
@ -508,6 +509,7 @@ SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
|
|||
--enable_ps2_protocol
|
||||
LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp
|
||||
--enable_cursor_protocol
|
||||
|
||||
SELECT @v19, @v20;
|
||||
SELECT * FROM t2;
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
# Enable after fix MDEV-31721
|
||||
--disable_cursor_protocol
|
||||
create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr));
|
||||
--disable_ps2_protocol
|
||||
select count(*) from t1;
|
||||
|
@ -24,6 +26,7 @@ drop table t1;
|
|||
select * from t2;
|
||||
--enable_ps2_protocol
|
||||
show status like "Empty_queries";
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # End of 4.1 tests
|
||||
|
||||
|
|
|
@ -48,7 +48,9 @@ set names latin1;
|
|||
#
|
||||
# Bug#15463: EXPLAIN SELECT..INTO hangs the client (QB, command line)
|
||||
#
|
||||
--disable_cursor_protocol
|
||||
select 3 into @v1;
|
||||
--enable_cursor_protocol
|
||||
explain select 3 into @v1;
|
||||
|
||||
#
|
||||
|
@ -154,7 +156,9 @@ DROP TABLE t1;
|
|||
|
||||
CREATE TABLE t1 (f1 INT not null);
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT @@session.sql_mode INTO @old_sql_mode;
|
||||
--enable_cursor_protocol
|
||||
SET SESSION sql_mode='ONLY_FULL_GROUP_BY';
|
||||
|
||||
# EXPLAIN EXTENDED (with subselect). used to crash. should give NOTICE.
|
||||
|
|
|
@ -156,12 +156,14 @@ show status like "feature_insert_returning";
|
|||
--echo #
|
||||
create table t1(id1 int);
|
||||
insert into t1 values (1),(2);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select * into outfile '../../tmp/features_outfile.1' from t1;
|
||||
select * from t1 into outfile '../../tmp/features_outfile.2';
|
||||
--enable_ps2_protocol
|
||||
select id1 INTO @x from t1 where id1=1;
|
||||
select * from t1 where id1=1 into @y;
|
||||
--enable_cursor_protocol
|
||||
select * from t1 where id1=@x;
|
||||
select @x=@y;
|
||||
drop table t1;
|
||||
|
|
|
@ -23,7 +23,9 @@ let $restart_parameters=--ssl-key=$ssl_key --ssl-cert=$ssl_cert;
|
|||
--source include/start_mysqld.inc
|
||||
|
||||
connect ssl_con,localhost,root,,,,,SSL;
|
||||
--disable_cursor_protocol
|
||||
SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
|
||||
--enable_cursor_protocol
|
||||
let $ssl_not_after=`SELECT @ssl_not_after`;
|
||||
|
||||
remove_file $ssl_cert;
|
||||
|
|
|
@ -24,7 +24,10 @@ EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
|
|||
|
||||
create table t1 (v varchar(128));
|
||||
insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),('a\0'),('b\''),('c\"'),('d\\'),('\'b'),('\"c'),('\\d'),('a\0\0\0b'),('a\'\'\'\'b'),('a\"\"\"\"b'),('a\\\\\\\\b'),('\'\0\\\"'),('\'\''),('\"\"'),('\\\\'),('The\ZEnd');
|
||||
#Enable after fix MDEV-31538
|
||||
--disable_cursor_protocol
|
||||
select * from t1 procedure analyse();
|
||||
--enable_cursor_protocol
|
||||
drop table t1;
|
||||
|
||||
#decimal-related test
|
||||
|
|
|
@ -56,7 +56,13 @@ DROP TABLE t1;
|
|||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT t1 VALUES (1),(2);
|
||||
# There is a problem with cursor-protocol and DES_DECRYPT(),
|
||||
# but DES_DECRYPT has been deprecated from MariaDB 10.10.0,
|
||||
# and will be removed in a future release. That's why this
|
||||
# case is excluded without bug
|
||||
--disable_cursor_protocol
|
||||
SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -489,6 +489,8 @@ SELECT LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512;
|
|||
--echo # Bug#54661 sha2() returns BINARY result
|
||||
--echo #
|
||||
|
||||
#Check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
SET NAMES binary;
|
||||
|
@ -499,6 +501,7 @@ SET NAMES latin1;
|
|||
SELECT sha2('1',224);
|
||||
--disable_metadata
|
||||
--disable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.1 tests
|
||||
|
|
|
@ -1470,5 +1470,13 @@ DROP FUNCTION params;
|
|||
DROP FUNCTION select01;
|
||||
DROP FUNCTION select02;
|
||||
#
|
||||
# MDEV-32891 Assertion `value <= ((ulonglong) 0xFFFFFFFFL) * 10000ULL' failed in str_to_DDhhmmssff_internal
|
||||
#
|
||||
SELECT EXTRACT(HOUR_MICROSECOND FROM '42949672955000x1');
|
||||
EXTRACT(HOUR_MICROSECOND FROM '42949672955000x1')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Incorrect interval value: '42949672955000x1'
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -511,6 +511,13 @@ DROP FUNCTION params;
|
|||
DROP FUNCTION select01;
|
||||
DROP FUNCTION select02;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32891 Assertion `value <= ((ulonglong) 0xFFFFFFFFL) * 10000ULL' failed in str_to_DDhhmmssff_internal
|
||||
--echo #
|
||||
|
||||
SELECT EXTRACT(HOUR_MICROSECOND FROM '42949672955000x1');
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -409,11 +409,14 @@ drop table t1;
|
|||
#
|
||||
create table t1 (f1 int unsigned, f2 varchar(255));
|
||||
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
|
||||
#Enable after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
select f2,group_concat(f1) from t1 group by f2;
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
--enable_cursor_protocol
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -499,11 +502,14 @@ set names latin1;
|
|||
#
|
||||
create table t1 (f1 int unsigned, f2 varchar(255));
|
||||
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
|
||||
#Enable after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
select f2,group_concat(f1) from t1 group by f2;
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
--enable_cursor_protocol
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#
|
||||
# simple test of all group functions
|
||||
#
|
||||
if (`SELECT $PS_PROTOCOL != 0`)
|
||||
if (`SELECT $PS_PROTOCOL + $CURSOR_PROTOCOL > 0`)
|
||||
{
|
||||
--skip Test temporarily disabled for ps-protocol
|
||||
--skip Test temporarily disabled for ps-protocol and cursor-protocol
|
||||
}
|
||||
|
||||
set @sav_dpi= @@div_precision_increment;
|
||||
|
|
|
@ -170,8 +170,10 @@ DROP TABLE t1;
|
|||
--echo # MDEV-4269: crash when grouping by values()
|
||||
--echo #
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT @@default_storage_engine INTO @old_engine;
|
||||
set default_storage_engine=innodb;
|
||||
--enable_cursor_protocol
|
||||
|
||||
create table y select 1 b;
|
||||
select 1 from y group by b;
|
||||
|
|
|
@ -1757,6 +1757,15 @@ JSON_INSERT(JSON_OBJECT(l1, l2, l3, l4), '$.k3', 'v3') JSON_SET(JSON_OBJECT(l1,
|
|||
{"k1": "v1", "k2": "v2", "k3": "v3"} {"k1": "v1", "k2": "new v2"} {"k1": "v1", "k2": "new v2"}
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-27412: JSON_TABLE doesn't properly unquote strings
|
||||
#
|
||||
SET @data = '[{"Data": "<root language=\\"de\\"></root>"}]';
|
||||
SELECT
|
||||
data
|
||||
FROM JSON_TABLE (@data, '$[*]' COLUMNS (data text PATH '$.Data')) AS t;
|
||||
data
|
||||
<root language="de"></root>
|
||||
#
|
||||
# End of 10.6 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -26,7 +26,10 @@ select json_array(1);
|
|||
--disable_view_protocol
|
||||
select json_array(1, "text", false, null);
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_array_append('["a", "b"]', '$', FALSE);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
select json_array_append('{"k1":1, "k2":["a", "b"]}', '$.k2', 2);
|
||||
select json_array_append('["a", ["b", "c"], "d"]', '$[0]', 2);
|
||||
|
@ -89,12 +92,18 @@ select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]') as exp;
|
|||
select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]') as exp;
|
||||
select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a') as exp;
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word') as exp;
|
||||
--enable_cursor_protocol
|
||||
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3) as exp;
|
||||
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.a[2]', 2) as exp;
|
||||
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.c', 'word') as exp;
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_set('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') as exp;
|
||||
--enable_cursor_protocol
|
||||
|
||||
select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') as exp;
|
||||
select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.b', '[true, false]') as exp;
|
||||
|
@ -136,11 +145,14 @@ select json_merge('a','b');
|
|||
select json_merge('{"a":"b"}','{"c":"d"}');
|
||||
SELECT JSON_MERGE('[1, 2]', '{"id": 47}');
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_type('{"k1":123, "k2":345}');
|
||||
select json_type('[123, "k2", 345]');
|
||||
select json_type("true");
|
||||
select json_type('123');
|
||||
select json_type('123.12');
|
||||
--enable_cursor_protocol
|
||||
|
||||
select json_keys('{"a":{"c":1, "d":2}, "b":2}');
|
||||
select json_keys('{"a":{"c":1, "d":2}, "b":2}', "$.a");
|
||||
|
@ -168,21 +180,30 @@ insert into t1 values
|
|||
select json_search( json_col, 'all', 'foot' ) as ex from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_unquote('"abc"');
|
||||
select json_unquote('abc');
|
||||
--enable_cursor_protocol
|
||||
|
||||
#
|
||||
# MDEV-13703 Illegal mix of collations for operation 'json_object' on using JSON_UNQUOTE as an argument.
|
||||
#
|
||||
create table t1 (c VARCHAR(8)) DEFAULT CHARSET=latin1;
|
||||
insert into t1 values ('abc'),('def');
|
||||
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_object('foo', json_unquote(json_object('bar', c)),'qux', c) as fld from t1;
|
||||
--enable_cursor_protocol
|
||||
drop table t1;
|
||||
|
||||
|
||||
select json_object("a", json_object("b", "abcd"));
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_object("a", '{"b": "abcd"}');
|
||||
--enable_cursor_protocol
|
||||
select json_object("a", json_compact('{"b": "abcd"}'));
|
||||
|
||||
select json_compact(NULL);
|
||||
|
@ -259,8 +280,11 @@ select json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') as ex ;
|
|||
select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') as ex ;
|
||||
|
||||
select json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex;
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
select json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex;
|
||||
select json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex;
|
||||
--enable_cursor_protocol
|
||||
|
||||
#
|
||||
# MDEV-11856 json_search doesn't search for values with double quotes character (")
|
||||
|
@ -455,9 +479,12 @@ drop table t1;
|
|||
--echo # MDEV-16750 JSON_SET mishandles unicode every second pair of arguments.
|
||||
--echo #
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6) as exp;
|
||||
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6) as exp;
|
||||
SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6') as exp;
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17121 JSON_ARRAY_APPEND
|
||||
|
@ -1034,12 +1061,15 @@ create table t1 (a varchar(254));
|
|||
insert into t1 values (concat('x64-', repeat('a', 60)));
|
||||
insert into t1 values (concat('x64-', repeat('b', 60)));
|
||||
insert into t1 values (concat('x64-', repeat('c', 60)));
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
#enable after MDEV-32454 fix
|
||||
--disable_view_protocol
|
||||
--disable_ps2_protocol
|
||||
select json_arrayagg(a) from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
drop table t1;
|
||||
SET group_concat_max_len= default;
|
||||
|
||||
|
@ -1191,6 +1221,18 @@ SELECT JSON_ARRAY_APPEND(JSON_ARRAY(l1, l2, l3, l4), '$[0]', 'k3'), JSON_ARRAY_I
|
|||
SELECT JSON_INSERT(JSON_OBJECT(l1, l2, l3, l4), '$.k3', 'v3'),JSON_SET(JSON_OBJECT(l1, l2, l3, l4), '$.k2', 'new v2'),JSON_REPLACE(JSON_OBJECT(l1, l2, l3, l4), '$.k2', 'new v2') from t;
|
||||
DROP TABLE t;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27412: JSON_TABLE doesn't properly unquote strings
|
||||
--echo #
|
||||
|
||||
|
||||
SET @data = '[{"Data": "<root language=\\"de\\"></root>"}]';
|
||||
|
||||
SELECT
|
||||
data
|
||||
FROM JSON_TABLE (@data, '$[*]' COLUMNS (data text PATH '$.Data')) AS t;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.6 tests
|
||||
--echo #
|
||||
|
@ -3878,10 +3920,13 @@ FROM JSON_TABLE(
|
|||
|
||||
SELECT JSON_KEY_VALUE('{}', '$.key1');
|
||||
|
||||
#enable after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
#enable after MDEV-32454 fix
|
||||
--disable_view_protocol
|
||||
SELECT JSON_KEY_VALUE('{"key1":"val1", "key2":"val2"}', '$') as exp;
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
SELECT jt.*
|
||||
FROM JSON_TABLE(
|
||||
JSON_KEY_VALUE('{"key1":"val1", "key2":"val2"}', '$'), '$[*]'
|
||||
|
@ -4081,7 +4126,10 @@ CREATE TABLE t1 (
|
|||
|
||||
INSERT INTO t1 VALUES('[1,2,3]', '[2, 3, 4]'), ('[2 ,3, 4]', '[4, 5, 6]');
|
||||
|
||||
#check after fix MDEV-31554
|
||||
--disable_cursor_protocol
|
||||
SELECT JSON_ARRAY_INTERSECT(c1, c2) FROM t1;
|
||||
--enable_cursor_protocol
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
|
|
@ -567,11 +567,14 @@ select (1.175494351E-37 div 1.7976931348623157E+308);
|
|||
|
||||
select round(999999999, -9);
|
||||
select round(999999999.0, -9);
|
||||
#enable after fix MDEV-31555
|
||||
--disable_cursor_protocol
|
||||
#enable after fix MDEV-29526
|
||||
--disable_view_protocol
|
||||
select round(999999999999999999, -18);
|
||||
select round(999999999999999999.0, -18);
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12537160 ASSERTION FAILED:
|
||||
|
|
|
@ -254,6 +254,7 @@ SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs;
|
|||
#
|
||||
# Bug #35848: UUID() returns UUIDs with the wrong time
|
||||
#
|
||||
--disable_cursor_protocol
|
||||
select @@session.time_zone into @save_tz;
|
||||
|
||||
# make sure all times are UTC so the DayNr won't differ
|
||||
|
@ -265,6 +266,7 @@ select 24 * 60 * 60 * 1000 * 1000 * 10 into @my_uuid_one_day;
|
|||
select concat('0',mid(@my_uuid,16,3),mid(@my_uuid,10,4),left(@my_uuid,8)) into @my_uuidate;
|
||||
select floor(conv(@my_uuidate,16,10)/@my_uuid_one_day) into @my_uuid_date;
|
||||
select 141427 + datediff(curdate(),'1970-01-01') into @my_uuid_synthetic;
|
||||
--enable_cursor_protocol
|
||||
# these should be identical; date part of UUID should be current date
|
||||
select @my_uuid_date - @my_uuid_synthetic;
|
||||
|
||||
|
|
|
@ -5316,6 +5316,19 @@ SELECT SUBSTR(0,@a) FROM t;
|
|||
SUBSTR(0,@a)
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-28386 UBSAN: runtime error: negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoull_8bit on SELECT ... OCT
|
||||
#
|
||||
CREATE TABLE t1 (c BLOB);
|
||||
INSERT INTO t1 VALUES ('-9223372036854775808.5');
|
||||
SELECT OCT(c) FROM t1;
|
||||
OCT(c)
|
||||
1000000000000000000000
|
||||
SELECT BIN(c) FROM t1;
|
||||
BIN(c)
|
||||
1000000000000000000000000000000000000000000000000000000000000000
|
||||
DROP TABLE t1;
|
||||
DO OCT(-9223372036854775808);
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -92,9 +92,12 @@ SELECT CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),r
|
|||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
|
||||
--disable_view_protocol
|
||||
#chaeck after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--enable_metadata
|
||||
select replace('aaaa','a','bbbb');
|
||||
--disable_metadata
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') as exp;
|
||||
select soundex(''),soundex('he'),soundex('hello all folks'),soundex('#3556 in bugdb');
|
||||
|
@ -145,7 +148,10 @@ select length(unhex(md5("abrakadabra")));
|
|||
#
|
||||
# Bug #6564: QUOTE(NULL
|
||||
#
|
||||
#enable after fix MDEV-31587
|
||||
--disable_cursor_protocol
|
||||
select concat('a', quote(NULL));
|
||||
--enable_cursor_protocol
|
||||
|
||||
#
|
||||
# Wrong usage of functions
|
||||
|
@ -744,8 +750,11 @@ create table t1 (i int);
|
|||
insert into t1 values (1000000000),(1);
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
select lpad(i, 7, ' ') as t from t1;
|
||||
select rpad(i, 7, ' ') as t from t1;
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
drop table t1;
|
||||
|
@ -896,6 +905,8 @@ select format(NULL, NULL);
|
|||
select format(pi(), NULL);
|
||||
select format(NULL, 2);
|
||||
|
||||
#check after fix MDEV-31587
|
||||
--disable_cursor_protocol
|
||||
#enable after fix MDEV-28585
|
||||
--disable_view_protocol
|
||||
select benchmark(NULL, NULL);
|
||||
|
@ -903,16 +914,20 @@ select benchmark(0, NULL);
|
|||
select benchmark(100, NULL);
|
||||
select benchmark(NULL, 1+1);
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
#
|
||||
# Bug #20752: BENCHMARK with many iterations returns too quickly
|
||||
#
|
||||
|
||||
# not a string, but belongs with the above Bug#22684
|
||||
#check after fix MDEV-31587
|
||||
--disable_cursor_protocol
|
||||
#enable after fix MDEV-28585
|
||||
--disable_view_protocol
|
||||
select benchmark(-1, 1);
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
#
|
||||
# Please note:
|
||||
# 1) The collation of the password is irrelevant, the encryption uses
|
||||
|
@ -980,26 +995,26 @@ select left('hello', -1);
|
|||
select left('hello', -4294967295);
|
||||
#enable after fix MDEV-29552
|
||||
--disable_view_protocol
|
||||
#enable after fix MDEV-34213
|
||||
--disable_cursor_protocol
|
||||
select left('hello', 4294967295);
|
||||
--enable_view_protocol
|
||||
select left('hello', -4294967296);
|
||||
#enable after fix MDEV-29552
|
||||
--disable_view_protocol
|
||||
select left('hello', 4294967296);
|
||||
--enable_view_protocol
|
||||
select left('hello', -4294967297);
|
||||
#enable after fix MDEV-29552
|
||||
--disable_view_protocol
|
||||
select left('hello', 4294967297);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
#view protocol generates additional warning
|
||||
--disable_view_protocol
|
||||
select left('hello', -18446744073709551615);
|
||||
select left('hello', 18446744073709551615);
|
||||
select left('hello', -18446744073709551616);
|
||||
#enable after fix MDEV-34213
|
||||
--disable_cursor_protocol
|
||||
select left('hello', 18446744073709551616);
|
||||
select left('hello', -18446744073709551617);
|
||||
select left('hello', 18446744073709551617);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
select right('hello', 10);
|
||||
|
@ -1008,26 +1023,26 @@ select right('hello', -1);
|
|||
select right('hello', -4294967295);
|
||||
#enable after fix MDEV-29552
|
||||
--disable_view_protocol
|
||||
#enable after fix MDEV-34213
|
||||
--disable_cursor_protocol
|
||||
select right('hello', 4294967295);
|
||||
--enable_view_protocol
|
||||
select right('hello', -4294967296);
|
||||
#enable after fix MDEV-29552
|
||||
--disable_view_protocol
|
||||
select right('hello', 4294967296);
|
||||
--enable_view_protocol
|
||||
select right('hello', -4294967297);
|
||||
#enable after fix MDEV-29552
|
||||
--disable_view_protocol
|
||||
select right('hello', 4294967297);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
#view protocol generates additional warning
|
||||
--disable_view_protocol
|
||||
select right('hello', -18446744073709551615);
|
||||
select right('hello', 18446744073709551615);
|
||||
select right('hello', -18446744073709551616);
|
||||
#enable after fix MDEV-34213
|
||||
--disable_cursor_protocol
|
||||
select right('hello', 18446744073709551616);
|
||||
select right('hello', -18446744073709551617);
|
||||
select right('hello', 18446744073709551617);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
select substring('hello', 2, -1);
|
||||
|
@ -1052,6 +1067,8 @@ select substring('hello', 18446744073709551617, 1);
|
|||
#enable after fix MDEV-28652
|
||||
--disable_view_protocol
|
||||
select substring('hello', 1, -1);
|
||||
#check after fix MDEV-31587
|
||||
--disable_cursor_protocol
|
||||
select substring('hello', 1, -4294967295);
|
||||
select substring('hello', 1, 4294967295);
|
||||
select substring('hello', 1, -4294967296);
|
||||
|
@ -1067,6 +1084,7 @@ select substring('hello', 1, -18446744073709551616);
|
|||
select substring('hello', 1, 18446744073709551616);
|
||||
select substring('hello', 1, -18446744073709551617);
|
||||
select substring('hello', 1, 18446744073709551617);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
select substring('hello', -1, -1);
|
||||
select substring('hello', -4294967295, -4294967295);
|
||||
|
@ -1398,7 +1416,10 @@ create table t1(a float);
|
|||
insert into t1 values (1.33);
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
select format(a, 2) from t1;
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
drop table t1;
|
||||
|
@ -1513,9 +1534,11 @@ SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
|
|||
--echo #
|
||||
CREATE TABLE t1 ( a TEXT );
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug58165.txt' INTO TABLE t1;
|
||||
|
@ -1598,11 +1621,17 @@ SELECT format(12345678901234567890.123, 3, 'ar_AE');
|
|||
SELECT format(12345678901234567890.123, 3, 'ar_SA');
|
||||
SELECT format(12345678901234567890.123, 3, 'be_BY');
|
||||
SELECT format(12345678901234567890.123, 3, 'de_DE');
|
||||
#check after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SELECT format(12345678901234567890.123, 3, 'en_IN');
|
||||
SELECT format(12345678901234567890.123, 3, 'en_US');
|
||||
--enable_cursor_protocol
|
||||
SELECT format(12345678901234567890.123, 3, 'it_CH');
|
||||
SELECT format(12345678901234567890.123, 3, 'ru_RU');
|
||||
#checkafter fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SELECT format(12345678901234567890.123, 3, 'ta_IN');
|
||||
--enable_cursor_protocol
|
||||
|
||||
CREATE TABLE t1 (fmt CHAR(5) NOT NULL);
|
||||
INSERT INTO t1 VALUES ('ar_AE');
|
||||
|
@ -1614,6 +1643,8 @@ INSERT INTO t1 VALUES ('en_US');
|
|||
INSERT INTO t1 VALUES ('it_CH');
|
||||
INSERT INTO t1 VALUES ('ru_RU');
|
||||
INSERT INTO t1 VALUES ('ta_IN');
|
||||
#check after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SELECT fmt, format(12345678901234567890.123, 3, fmt) FROM t1 ORDER BY fmt;
|
||||
SELECT fmt, format(12345678901234567890.123, 0, fmt) FROM t1 ORDER BY fmt;
|
||||
SELECT fmt, format(12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
|
||||
|
@ -1621,6 +1652,7 @@ SELECT fmt, format(-12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
|
|||
SELECT fmt, format(-02345678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
|
||||
SELECT fmt, format(-00345678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
|
||||
SELECT fmt, format(-00045678901234567890, 3, fmt) FROM t1 ORDER BY fmt;
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1;
|
||||
|
||||
SELECT format(123, 1, 'Non-existent-locale');
|
||||
|
@ -2065,7 +2097,10 @@ DROP TABLE t1;
|
|||
--disable_view_protocol
|
||||
CREATE TABLE t1 (a INT, b TIME, c TIME);
|
||||
INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
|
||||
#check after fix MDEV-31512
|
||||
--disable_cursor_protocol
|
||||
SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1;
|
||||
--enable_view_protocol
|
||||
|
||||
|
@ -2326,6 +2361,19 @@ CREATE TABLE t (c1 INT,c2 CHAR);
|
|||
SELECT SUBSTR(0,@a) FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28386 UBSAN: runtime error: negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoull_8bit on SELECT ... OCT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (c BLOB);
|
||||
INSERT INTO t1 VALUES ('-9223372036854775808.5');
|
||||
SELECT OCT(c) FROM t1;
|
||||
SELECT BIN(c) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
DO OCT(-9223372036854775808);
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -6417,5 +6417,16 @@ Warning 1292 Truncated incorrect time value: '8390000'
|
|||
Warning 1292 Truncated incorrect time value: '8390000'
|
||||
SET @@timestamp= DEFAULT;
|
||||
#
|
||||
# MDEV-31302 Assertion `mon > 0 && mon < 13' failed in my_time_t sec_since_epoch(int, int, int, int, int, int)
|
||||
#
|
||||
CREATE TABLE t1 (a DATE);
|
||||
SET @@time_zone='+1:00';
|
||||
INSERT INTO t1 VALUES ('2024-00-01');
|
||||
SELECT UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
|
||||
a
|
||||
NULL
|
||||
SET @@time_zone=DEFAULT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -1296,7 +1296,10 @@ SET TIME_ZONE='+02:00';
|
|||
--echo #
|
||||
CREATE TABLE t1 (a DATE);
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
#check after fix MDEV-31495
|
||||
--disable_cursor_protocol
|
||||
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
|
||||
--enable_cursor_protocol
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -1610,7 +1613,10 @@ SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DAT
|
|||
--echo #
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE);
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
|
||||
|
@ -2243,12 +2249,14 @@ SET @sav_slow_query_log= @@session.slow_query_log;
|
|||
--disable_ps2_protocol
|
||||
# @@slow_query_log ON check
|
||||
SET @@session.slow_query_log= ON;
|
||||
--disable_cursor_protocol
|
||||
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @ts_func;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--enable_prepare_warnings
|
||||
SELECT a FROM t_ts LIMIT 1 into @ts_func;
|
||||
SELECT a FROM t_trig LIMIT 1 into @ts_trig;
|
||||
--enable_cursor_protocol
|
||||
if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
|
||||
{
|
||||
SELECT @ts_cur, @ts_func, @ts_trig;
|
||||
|
@ -2260,12 +2268,13 @@ DELETE FROM t_trig;
|
|||
--disable_ps2_protocol
|
||||
# @@slow_query_log OFF check
|
||||
SET @@session.slow_query_log= OFF;
|
||||
--disable_cursor_protocol
|
||||
SELECT current_timestamp(6),fn_sleep_before_now() INTO @ts_cur, @func_ts;
|
||||
--enable_ps2_protocol
|
||||
SELECT a FROM t_ts LIMIT 1 into @ts_func;
|
||||
SELECT a FROM t_trig LIMIT 1 into @ts_trig;
|
||||
--disable_prepare_warnings
|
||||
|
||||
--enable_cursor_protocol
|
||||
if (!`SELECT @ts_cur = @ts_func and @ts_func = @ts_trig`)
|
||||
{
|
||||
SELECT @ts_cur, @ts_func, @ts_trig;
|
||||
|
@ -3201,7 +3210,10 @@ SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00');
|
|||
#enable after fix MDEV-29534
|
||||
--disable_view_protocol
|
||||
SET time_zone='+00:00';
|
||||
#check after fix MDEV-31495
|
||||
--disable_cursor_protocol
|
||||
SELECT NULLIF(FROM_UNIXTIME('foo'), '2012-12-12 21:10:14');
|
||||
--enable_cursor_protocol
|
||||
SET time_zone=DEFAULT;
|
||||
--enable_view_protocol
|
||||
|
||||
|
@ -3254,6 +3266,17 @@ SELECT
|
|||
|
||||
SET @@timestamp= DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31302 Assertion `mon > 0 && mon < 13' failed in my_time_t sec_since_epoch(int, int, int, int, int, int)
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a DATE);
|
||||
SET @@time_zone='+1:00';
|
||||
INSERT INTO t1 VALUES ('2024-00-01');
|
||||
SELECT UNIX_TIMESTAMP(MAX(a)) AS a FROM t1;
|
||||
SET @@time_zone=DEFAULT;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -181,7 +181,10 @@ SELECT YEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
|
|||
SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
|
||||
SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
|
||||
|
||||
#check after fix MDEV-31555
|
||||
--disable_cursor_protocol
|
||||
SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
|
||||
--enable_cursor_protocol
|
||||
SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
|
||||
SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_varchar ORDER BY id;
|
||||
|
||||
|
@ -219,7 +222,10 @@ SELECT DAYNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
|||
SELECT MONTHNAME(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
||||
SELECT YEARWEEK(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
||||
|
||||
#check after fix MDEV-31555
|
||||
--disable_cursor_protocol
|
||||
SELECT LAST_DAY(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
||||
--enable_cursor_protocol
|
||||
SELECT TO_DAYS(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
||||
SELECT DAYOFYEAR(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
||||
SELECT DAYOFMONTH(a), CAST(a AS DATE), a FROM t1_datetime_in_decimal ORDER BY id;
|
||||
|
|
|
@ -284,6 +284,7 @@ GET DIAGNOSTICS CONDITION ABS(2) @var = CLASS_ORIGIN;
|
|||
GET DIAGNOSTICS CONDITION 1.1 @var = CLASS_ORIGIN;
|
||||
GET DIAGNOSTICS CONDITION "1" @var = CLASS_ORIGIN;
|
||||
|
||||
--disable_cursor_protocol
|
||||
# Reset warnings
|
||||
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
|
||||
|
||||
|
@ -303,6 +304,7 @@ GET DIAGNOSTICS CONDITION @cond @var1 = CLASS_ORIGIN;
|
|||
|
||||
# Reset warnings
|
||||
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
|
||||
--enable_cursor_protocol
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p1()
|
||||
|
@ -367,7 +369,9 @@ GET DIAGNOSTICS @var = NUMBER;
|
|||
SELECT @var;
|
||||
--enable_view_protocol
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT COUNT(max_questions) INTO @var FROM mysql.user;
|
||||
--enable_cursor_protocol
|
||||
GET DIAGNOSTICS @var = NUMBER;
|
||||
SELECT @var;
|
||||
|
||||
|
|
|
@ -403,9 +403,12 @@ select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440)))) as e
|
|||
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
create table t1 (g GEOMETRY);
|
||||
select * from t1;
|
||||
select asbinary(g) from t1;
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
drop table t1;
|
||||
|
@ -3245,6 +3248,8 @@ CREATE TABLE t1 (
|
|||
g GEOMETRY
|
||||
) CHARACTER SET utf8;
|
||||
|
||||
#check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
--disable_view_protocol
|
||||
--enable_metadata
|
||||
SELECT * FROM t1;
|
||||
|
@ -3350,6 +3355,7 @@ FROM t1;
|
|||
|
||||
--disable_metadata
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -10,7 +10,9 @@ set GLOBAL sql_mode="";
|
|||
set LOCAL sql_mode="";
|
||||
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
|
||||
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||
--disable_cursor_protocol
|
||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||
--enable_cursor_protocol
|
||||
|
||||
connect (master,localhost,root,,);
|
||||
connection master;
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_cursor_protocol
|
||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||
--enable_cursor_protocol
|
||||
|
||||
set GLOBAL sql_mode="";
|
||||
set LOCAL sql_mode="";
|
||||
SET NAMES binary;
|
||||
|
@ -657,8 +660,10 @@ DROP DATABASE db1;
|
|||
|
||||
# work out who we are.
|
||||
USE mysql;
|
||||
--disable_cursor_protocol
|
||||
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
|
||||
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
|
||||
--enable_cursor_protocol
|
||||
|
||||
# show current privs.
|
||||
SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h;
|
||||
|
@ -840,9 +845,11 @@ SHOW CREATE TABLE t1;
|
|||
--echo #
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' FROM t1
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/bug27480.txt' INTO TABLE t1
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug27480.txt
|
||||
|
|
|
@ -21,7 +21,10 @@ flush privileges;
|
|||
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
# Check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
select user();
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
|
||||
|
@ -43,7 +46,10 @@ flush privileges;
|
|||
|
||||
--enable_metadata
|
||||
--disable_view_protocol
|
||||
# Check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
select user();
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--disable_metadata
|
||||
|
||||
|
|
|
@ -424,6 +424,7 @@ EXPLAIN SELECT * FROM t100,t10000,t10;
|
|||
EXPLAIN SELECT * FROM t10000,t10,t100;
|
||||
EXPLAIN SELECT * FROM t10000,t100,t10;
|
||||
|
||||
--disable_cursor_protocol
|
||||
######
|
||||
## Ordering between T100,T10000 EQ-joined T10 will
|
||||
## normally be with smallest EQ-table joined first
|
||||
|
@ -715,6 +716,7 @@ SELECT COUNT(*) FROM t10,t10000 y,t10000 x
|
|||
WHERE x.k=t10.i
|
||||
AND y.i=x.k;
|
||||
--source include/check_qep.inc
|
||||
--enable_cursor_protocol
|
||||
|
||||
########
|
||||
|
||||
|
|
|
@ -286,6 +286,7 @@ drop table t1;
|
|||
CREATE TABLE t1 (a char(1));
|
||||
INSERT INTO t1 VALUES ('A'),('B'),('A'),('B'),('A'),('B'),(NULL),('a'),('b'),(NULL),('A'),('B'),(NULL);
|
||||
flush status;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT a FROM t1 GROUP BY a;
|
||||
SELECT a,count(*) FROM t1 GROUP BY a;
|
||||
|
@ -294,11 +295,13 @@ SELECT a,count(*) FROM t1 GROUP BY binary a;
|
|||
SELECT binary a FROM t1 GROUP BY 1;
|
||||
SELECT binary a,count(*) FROM t1 GROUP BY 1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--disable_ps_protocol
|
||||
show status like 'Created%tables';
|
||||
--enable_ps_protocol
|
||||
# Do the same tests with on-disk temporary tables
|
||||
set tmp_memory_table_size=0;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT a FROM t1 GROUP BY a;
|
||||
SELECT a,count(*) FROM t1 GROUP BY a;
|
||||
|
@ -307,6 +310,7 @@ SELECT a,count(*) FROM t1 GROUP BY binary a;
|
|||
SELECT binary a FROM t1 GROUP BY 1;
|
||||
SELECT binary a,count(*) FROM t1 GROUP BY 1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--disable_ps_protocol
|
||||
show status like 'Created%tables';
|
||||
--enable_ps_protocol
|
||||
|
@ -1676,7 +1680,7 @@ DROP TABLE t1, t2;
|
|||
# an additional util connection and other statistics data
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
|
||||
--disable_cursor_protocol
|
||||
FLUSH STATUS; # this test case *must* use Aria temp tables
|
||||
|
||||
CREATE TABLE t1 (f1 INT, f2 decimal(20,1), f3 blob);
|
||||
|
@ -1686,6 +1690,7 @@ DROP TABLE t1;
|
|||
|
||||
--echo the value below *must* be 1
|
||||
show status like 'Created_tmp_disk_tables';
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
|
|
|
@ -1734,6 +1734,8 @@ explain select
|
|||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
|
||||
#Enable after fix MDEV-31552
|
||||
--disable_cursor_protocol
|
||||
select
|
||||
t1.PARENT_ID,
|
||||
min(CHILD_FIELD)
|
||||
|
@ -1741,6 +1743,7 @@ select
|
|||
where t1.PARENT_ID = 1
|
||||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
--enable_cursor_protocol
|
||||
|
||||
select
|
||||
1,
|
||||
|
@ -1772,6 +1775,8 @@ explain select
|
|||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
|
||||
#Enable after fix MDEV-31552
|
||||
--disable_cursor_protocol
|
||||
select
|
||||
t1.PARENT_ID,
|
||||
min(CHILD_FIELD)
|
||||
|
@ -1779,6 +1784,7 @@ select
|
|||
where t1.PARENT_ID = 1
|
||||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
--enable_cursor_protocol
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
|
@ -1905,6 +1911,8 @@ explain select
|
|||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
|
||||
#Enable after fix MDEV-31552
|
||||
--disable_cursor_protocol
|
||||
select
|
||||
t1.PARENT_ID,
|
||||
min(CHILD_FIELD)
|
||||
|
@ -1912,6 +1920,7 @@ select
|
|||
where t1.PARENT_ID = 1
|
||||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
--enable_cursor_protocol
|
||||
|
||||
select
|
||||
1,
|
||||
|
@ -1943,6 +1952,8 @@ explain select
|
|||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
|
||||
#Enable after fix MDEV-31552
|
||||
--disable_cursor_protocol
|
||||
select
|
||||
t1.PARENT_ID,
|
||||
min(CHILD_FIELD)
|
||||
|
@ -1950,6 +1961,7 @@ select
|
|||
where t1.PARENT_ID = 1
|
||||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
--enable_cursor_protocol
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ DROP TABLE IF EXISTS t1;
|
|||
CREATE TABLE t1 (a INT, INDEX (a));
|
||||
INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
FLUSH STATUS;
|
||||
SELECT a FROM t1 ORDER BY a LIMIT 1;
|
||||
|
@ -26,6 +27,7 @@ FLUSH STATUS;
|
|||
SELECT a FROM t1 ORDER BY a DESC LIMIT 3;
|
||||
SHOW STATUS LIKE 'HANDLER_READ%';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
|
|
@ -1812,14 +1812,18 @@ drop database mysqltest;
|
|||
--disable_result_log
|
||||
SELECT * FROM INFORMATION_SCHEMA.TABLES;
|
||||
--enable_result_log
|
||||
--disable_cursor_protocol
|
||||
SELECT VARIABLE_VALUE INTO @val1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
|
||||
VARIABLE_NAME LIKE 'Opened_tables';
|
||||
--enable_cursor_protocol
|
||||
--disable_result_log
|
||||
SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES;
|
||||
--enable_result_log
|
||||
--echo # The below SELECT query should give same output as above SELECT query.
|
||||
--disable_cursor_protocol
|
||||
SELECT VARIABLE_VALUE INTO @val2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE
|
||||
VARIABLE_NAME LIKE 'Opened_tables';
|
||||
--enable_cursor_protocol
|
||||
--echo # The below select should return '1'
|
||||
SELECT @val1 = @val2;
|
||||
|
||||
|
|
|
@ -297,10 +297,12 @@ CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
|
|||
--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
|
||||
--echo # but we will use SPECIFIC_NAME for filtering records from mysql.proc
|
||||
FLUSH STATUS;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
||||
WHERE SPECIFIC_NAME = 'test_func5';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--replace_result $count_routines count_routines
|
||||
SHOW STATUS LIKE 'handler_read%next';
|
||||
|
||||
|
@ -308,6 +310,7 @@ SHOW STATUS LIKE 'handler_read%next';
|
|||
--echo # We cannot use the index due to CONCAT(), and filtering by SPECIFIC_NAME
|
||||
--echo # does not work either since SPECIFIC_NAME = 'not_existing_proc'. See
|
||||
--echo # the difference in counters in comparison to the previous test
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
FLUSH STATUS;
|
||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
||||
|
@ -342,6 +345,7 @@ query_vertical SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
|
|||
AND SPECIFIC_NAME = 'процедурка';
|
||||
SHOW STATUS LIKE 'handler_read%next';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_column 1 #
|
||||
SELECT COUNT(*) FROM information_schema.PARAMETERS
|
||||
|
|
|
@ -270,11 +270,13 @@ CREATE FUNCTION test_func5 (s CHAR(20)) RETURNS VARCHAR(30)
|
|||
--echo # We cannot use the index due to missing condition on SPECIFIC_SCHEMA,
|
||||
--echo # but we will use ROUTINE_NAME for filtering records from mysql.proc
|
||||
FLUSH STATUS;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--replace_column 24 <created> 25 <modified>
|
||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
||||
WHERE ROUTINE_NAME = 'test_func5';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--replace_result $count_routines count_routines
|
||||
SHOW STATUS LIKE 'handler_read%next';
|
||||
|
||||
|
@ -282,6 +284,7 @@ SHOW STATUS LIKE 'handler_read%next';
|
|||
--echo # We cannot use the index due to CONCAT(), and filtering by ROUTINE_NAME
|
||||
--echo # does not work either since ROUTINE_NAME = 'not_existing_proc'. See
|
||||
--echo # the difference in counters in comparison to the previous test
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
FLUSH STATUS;
|
||||
query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
||||
|
@ -320,6 +323,7 @@ query_vertical SELECT * FROM INFORMATION_SCHEMA.ROUTINES
|
|||
AND ROUTINE_NAME = 'процедурка';
|
||||
SHOW STATUS LIKE 'handler_read%next';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Test SHOW PROCEDURE STATUS. It's impossible to use the index here
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
# Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time
|
||||
#
|
||||
INSERT INTO init_file.startup VALUES ( NOW() );
|
||||
--disable_cursor_protocol
|
||||
SELECT * INTO @X FROM init_file.startup limit 0,1;
|
||||
SELECT * INTO @Y FROM init_file.startup limit 1,1;
|
||||
--enable_cursor_protocol
|
||||
SELECT YEAR(@X)-YEAR(@Y);
|
||||
|
||||
--echo ok
|
||||
|
|
|
@ -30,6 +30,7 @@ ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES();
|
|||
--enable_result_log
|
||||
--enable_query_log
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
explain
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
|
@ -154,6 +155,7 @@ select o_orderkey, p_partkey
|
|||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
show /*d*/ status like 'handler_read%';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # Bug mdev-3851: ref access used instead of expected eq_ref access
|
||||
|
@ -328,7 +330,9 @@ from t1 A, t1 B;
|
|||
explain
|
||||
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
|
||||
flush status;
|
||||
--disable_cursor_protocol
|
||||
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
|
||||
--enable_cursor_protocol
|
||||
show /*e*/ status like 'handler_read%';
|
||||
--enable_ps2_protocol
|
||||
|
||||
|
|
|
@ -596,9 +596,11 @@ CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = cast('' as
|
|||
REPLACE INTO v1 SET f2 = 1;
|
||||
SELECT * from t1;
|
||||
drop view v1;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT 0,0 INTO OUTFILE 't1.txt';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
|
||||
--error ER_TRUNCATED_WRONG_VALUE
|
||||
LOAD DATA INFILE 't1.txt' INTO TABLE v1;
|
||||
|
|
|
@ -251,10 +251,12 @@ DROP TABLE t1;
|
|||
create or replace table t1 (a int, b int invisible);
|
||||
insert into t1 values (1),(2);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--enable_prepare_warnings
|
||||
--disable_ps2_protocol
|
||||
select * from t1 into outfile 'f';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
load data infile 'f' into table t1;
|
||||
select a,b from t1;
|
||||
load data infile 'f' into table t1 (a,@v) SET b=@v;
|
||||
|
@ -264,9 +266,11 @@ select a,b from t1;
|
|||
truncate table t1;
|
||||
|
||||
insert into t1(a,b) values (1,1),(2,2);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select a,b from t1 into outfile 'a';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
load data infile 'a' into table t1(a,b);
|
||||
select a,b from t1;
|
||||
load data infile 'a' into table t1 (a,@v) SET b=@v;
|
||||
|
|
|
@ -658,6 +658,7 @@ insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
|||
create table t3 (a int not null, primary key(a));
|
||||
insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
--disable_cursor_protocol
|
||||
flush status;
|
||||
--disable_ps2_protocol
|
||||
select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b;
|
||||
|
@ -665,6 +666,7 @@ select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b;
|
|||
explain select * from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b;
|
||||
--echo We expect rnd_next=5, and read_key must be 0 because of short-cutting:
|
||||
show status like 'Handler_read%';
|
||||
--enable_cursor_protocol
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
|
@ -960,6 +962,7 @@ INSERT INTO t1 VALUES (3,'b'),(4,NULL),(5,'c'),(6,'cc'),(7,'d'),
|
|||
(8,'dd'),(9,'e'),(10,'ee');
|
||||
INSERT INTO t2 VALUES (2,NULL);
|
||||
ANALYZE TABLE t1,t2;
|
||||
--disable_cursor_protocol
|
||||
# This will ensure that status tables are read now and not part of the later
|
||||
# Handler_read% counts
|
||||
explain SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1;
|
||||
|
@ -968,6 +971,7 @@ FLUSH STATUS;
|
|||
SELECT * FROM t1 JOIN t2 ON t1.v = t2.v WHERE t2.v IS NULL ORDER BY 1;
|
||||
--enable_ps2_protocol
|
||||
SHOW STATUS LIKE 'Handler_read_%';
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -885,9 +885,11 @@ INSERT INTO t2 VALUES
|
|||
EXPLAIN
|
||||
SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
|
||||
|
||||
--disable_cursor_protocol
|
||||
flush status;
|
||||
SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
|
||||
show status like 'Handler_read%';
|
||||
--enable_cursor_protocol
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
--enable_ps2_protocol
|
||||
|
@ -1371,7 +1373,6 @@ drop table t1,t2,t3,t4;
|
|||
--echo # table is used in the on condition of an outer join
|
||||
--echo #
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
create table t1 (a int);
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
insert into t1 select * from t1;
|
||||
|
@ -1403,16 +1404,18 @@ insert into t3 values (11, 100), (33, 301), (44, 402), (11, 102), (11, 101);
|
|||
insert into t3 values (22, 100), (53, 301), (64, 402), (22, 102), (22, 101);
|
||||
|
||||
analyze table t1,t2,t3;
|
||||
|
||||
--disable_view_protocol
|
||||
--disable_cursor_protocol
|
||||
flush status;
|
||||
select sum(t3.b) from t1 left join t3 on t3.a=t1.a and t1.a is not null;
|
||||
show status like "handler_read%";
|
||||
flush status;
|
||||
select sum(t3.b) from t2 left join t3 on t3.a=t2.a and t2.a <> 10;
|
||||
show status like "handler_read%";
|
||||
--enable_cursor_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
drop table t1,t2,t3;
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
|
|
|
@ -303,7 +303,9 @@ update t1 set p=3 where p=1;
|
|||
set statement optimizer_scan_setup_cost=0 for update t2 set i=2 where i=1;
|
||||
|
||||
select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
|
||||
--disable_cursor_protocol
|
||||
select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
|
||||
--enable_cursor_protocol
|
||||
--replace_column 7 #
|
||||
select * from information_schema.key_caches where segment_number is null;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue