mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.5 into 10.6
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -287,8 +287,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/*
|
||||
|
@ -246,6 +246,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)
|
||||
@ -259,7 +272,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",
|
||||
@ -8600,6 +8606,14 @@ 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 for queries matching the filter,
|
||||
else reset cursor type
|
||||
*/
|
||||
if (match_re(&cursor_re, query))
|
||||
{
|
||||
/*
|
||||
Use cursor when retrieving result
|
||||
@ -8609,6 +8623,7 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
||||
die("mysql_stmt_attr_set(STMT_ATTR_CURSOR_TYPE) failed': %d %s",
|
||||
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
query_match_ps2_re = match_re(&ps2_re, query);
|
||||
@ -8669,9 +8684,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 &&
|
||||
@ -8818,6 +8835,16 @@ end:
|
||||
|
||||
var_set_errno(mysql_stmt_errno(stmt));
|
||||
|
||||
#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 */
|
||||
@ -9684,10 +9711,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);
|
||||
}
|
||||
|
||||
|
||||
@ -9725,6 +9761,7 @@ void free_re(void)
|
||||
regfree(&ps2_re);
|
||||
regfree(&sp_re);
|
||||
regfree(&view_re);
|
||||
regfree(&cursor_re);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
@ -10518,6 +10555,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 */
|
||||
|
@ -61,6 +61,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
#ifdef _WIN32
|
||||
#include <direct.h> /* rmdir */
|
||||
#endif
|
||||
#include <functional>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <aclapi.h>
|
||||
@ -1796,7 +1797,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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
@ -173,6 +174,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
|
||||
}
|
||||
|
@ -985,6 +985,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;
|
||||
@ -998,6 +999,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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -77,9 +77,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,4 +132,31 @@ 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
|
||||
|
@ -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,4 +144,26 @@ 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
|
||||
|
@ -64,10 +64,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;
|
||||
|
||||
|
@ -8975,5 +8975,11 @@ 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
|
||||
#
|
||||
|
@ -501,6 +501,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 <20><><EFBFBD><EFBFBD>;
|
||||
|
||||
# Enable view protocol after fix MDEV-27944
|
||||
--disable_view_protocol
|
||||
--disable_service_connection
|
||||
SET NAMES koi8r;
|
||||
SELECT hex('<27><><EFBFBD><EFBFBD>');
|
||||
SET character_set_connection=cp1251;
|
||||
SELECT hex('<27><><EFBFBD><EFBFBD>');
|
||||
--enable_view_protocol
|
||||
--enable_service_connection
|
||||
USE test;
|
||||
|
||||
# Bug#4417
|
||||
|
@ -6540,5 +6540,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;
|
||||
|
@ -3024,3 +3024,12 @@ HEX(DATE_FORMAT(TIME'11:22:33',@format))
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32
|
||||
#
|
||||
SELECT CAST(CONVERT('-9223372036854775808' USING utf32) AS SIGNED) AS c1;
|
||||
c1
|
||||
-9223372036854775808
|
||||
#
|
||||
# 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;
|
||||
@ -1156,3 +1162,14 @@ SELECT HEX(DATE_FORMAT(TIME'11:22:33',@format));
|
||||
--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);
|
||||
|
||||
|
@ -861,6 +861,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,
|
||||
@ -868,6 +870,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;
|
||||
explain format=json select * from v1 join v4 on f1=f2;
|
||||
@ -165,6 +173,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
|
||||
@ -175,6 +184,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
|
||||
|
||||
|
@ -966,7 +966,9 @@ DROP USER evtest1@localhost;
|
||||
# scheduler to detect that
|
||||
--echo Sleep 4 seconds
|
||||
sleep 4;
|
||||
--disable_cursor_protocol
|
||||
SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log;
|
||||
--enable_cursor_protocol
|
||||
# Give the event mechanism ~ 4 seconds to do something wrong
|
||||
# (execute the event of the dropped user -> inser rows).
|
||||
--echo Sleep 4 seconds
|
||||
@ -1186,9 +1188,11 @@ drop procedure if exists p;
|
||||
set @old_mode= @@sql_mode;
|
||||
set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
|
||||
create event e1 on schedule every 1 day do select 1;
|
||||
--disable_cursor_protocol
|
||||
select @@sql_mode into @full_mode;
|
||||
set @@sql_mode= @old_mode;
|
||||
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
|
||||
--enable_cursor_protocol
|
||||
select name from mysql.event where name = 'e1' and sql_mode = @full_mode;
|
||||
drop event e1;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -42,10 +42,12 @@ let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_ps2_protocol
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -59,10 +61,12 @@ select id, bigfield from prefixinno where bigfield = repeat('d', 31);
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -76,10 +80,12 @@ select id, bigfield from prefixinno where fake_id = 1031;
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -93,10 +99,12 @@ select id, bigfield from prefixinno where fake_id = 1033;
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -110,10 +118,12 @@ select id, bigfield from prefixinno where bigfield = repeat('x', 32);
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -127,10 +137,12 @@ select id, bigfield from prefixinno where bigfield = repeat('y', 33);
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -144,10 +156,12 @@ select id, bigfield from prefixinno where bigfield = repeat('b', 8);
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -161,10 +175,12 @@ select id, bigfield from prefixinno where bigfield = repeat('c', 24);
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -178,10 +194,12 @@ select id, bigfield from prefixinno where bigfield = repeat('z', 128);
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--disable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
@ -196,10 +214,12 @@ select id, bigfield from prefixinno where fake_id = 1033;
|
||||
let $count = query_get_value($show_count_statement, Value, 1);
|
||||
let $opt = query_get_value($show_opt_statement, Value, 1);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_query_log
|
||||
eval select $count - $base_count into @cluster_lookups;
|
||||
eval select $opt - $base_opt into @cluster_lookups_avoided;
|
||||
--enable_query_log
|
||||
--enable_cursor_protocol
|
||||
|
||||
select @cluster_lookups;
|
||||
select @cluster_lookups_avoided;
|
||||
|
@ -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
|
||||
|
@ -54,7 +54,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 End of 10.5 tests
|
||||
|
@ -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;
|
||||
|
@ -24,7 +24,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);
|
||||
@ -87,12 +90,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;
|
||||
@ -134,11 +143,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");
|
||||
@ -166,21 +178,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);
|
||||
@ -257,8 +278,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 (")
|
||||
@ -453,9 +477,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
|
||||
@ -1032,12 +1059,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;
|
||||
|
||||
|
@ -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:
|
||||
|
@ -253,6 +253,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
|
||||
@ -264,6 +265,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;
|
||||
|
||||
|
@ -5317,5 +5317,18 @@ 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
|
||||
#
|
||||
|
@ -95,9 +95,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');
|
||||
@ -148,7 +151,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
|
||||
@ -747,8 +753,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;
|
||||
@ -899,6 +908,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);
|
||||
@ -906,16 +917,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
|
||||
@ -983,26 +998,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);
|
||||
@ -1011,26 +1026,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);
|
||||
@ -1055,6 +1070,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);
|
||||
@ -1070,6 +1087,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);
|
||||
@ -1401,7 +1419,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;
|
||||
@ -1516,9 +1537,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;
|
||||
@ -1601,11 +1624,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');
|
||||
@ -1617,6 +1646,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;
|
||||
@ -1624,6 +1655,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');
|
||||
@ -2068,7 +2100,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
|
||||
|
||||
@ -2329,6 +2364,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 #
|
||||
|
@ -6425,5 +6425,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;
|
||||
|
@ -282,6 +282,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;
|
||||
|
||||
@ -301,6 +302,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()
|
||||
@ -365,7 +367,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
|
||||
|
||||
|
@ -284,6 +284,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;
|
||||
@ -292,11 +293,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;
|
||||
@ -305,6 +308,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
|
||||
@ -1666,7 +1670,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);
|
||||
@ -1676,6 +1680,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
|
||||
|
||||
|
@ -1727,6 +1727,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)
|
||||
@ -1734,6 +1736,7 @@ select
|
||||
where t1.PARENT_ID = 1
|
||||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
--enable_cursor_protocol
|
||||
|
||||
select
|
||||
1,
|
||||
@ -1765,6 +1768,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)
|
||||
@ -1772,6 +1777,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;
|
||||
|
||||
@ -1898,6 +1904,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)
|
||||
@ -1905,6 +1913,7 @@ select
|
||||
where t1.PARENT_ID = 1
|
||||
and t1.PARENT_ID = t2.PARENT_ID
|
||||
and t2.CHILD_FIELD = "ZZZZ";
|
||||
--enable_cursor_protocol
|
||||
|
||||
select
|
||||
1,
|
||||
@ -1936,6 +1945,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)
|
||||
@ -1943,6 +1954,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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -29,6 +29,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';
|
||||
@ -153,6 +154,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
|
||||
@ -326,7 +328,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;
|
||||
|
||||
#
|
||||
@ -959,11 +961,13 @@ 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
|
||||
FLUSH STATUS;
|
||||
--disable_ps2_protocol
|
||||
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;
|
||||
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;
|
||||
|
||||
|
@ -313,7 +313,9 @@ connection default;
|
||||
set debug_sync='now WAIT_FOR go0';
|
||||
set debug_sync='found_killee SIGNAL go1 WAIT_FOR go2';
|
||||
evalp kill $id;
|
||||
--disable_cursor_protocol
|
||||
select variable_value into @threads_cached from information_schema.global_status where variable_name='threads_cached';
|
||||
--enable_cursor_protocol
|
||||
set debug_sync='now SIGNAL go3';
|
||||
if (`select @@thread_handling != 'pool-of-threads'`) {
|
||||
# cannot check that a thread was added to thread pool on windows, but the test works there w/o the wait
|
||||
|
@ -33,6 +33,8 @@ DROP TABLE t1;
|
||||
SELECT LAST_VALUE(@last_a:=1,@last_b:=1);
|
||||
select @last_b;
|
||||
--enable_ps_protocol
|
||||
#Check after fix MDEV-31540
|
||||
--disable_cursor_protocol
|
||||
SELECT LAST_VALUE(@last_a:=1,@last_b:=1.0);
|
||||
select @last_b;
|
||||
SELECT LAST_VALUE(@last_a:=1,@last_b:="hello");
|
||||
@ -41,6 +43,7 @@ SELECT date(LAST_VALUE(@last_a:=1,@last_b:="2001-02-03"));
|
||||
select @last_b;
|
||||
SELECT LAST_VALUE(@last_a:=1,@last_b:="2001-02-03",NULL);
|
||||
select @last_b;
|
||||
--enable_cursor_protocol
|
||||
--disable_metadata
|
||||
--error ER_PARSE_ERROR
|
||||
SELECT LAST_VALUE();
|
||||
|
@ -23,6 +23,8 @@ insert into t2i values ('bb'), ('cc'), ('dd'), ('ff');
|
||||
--echo Simple joins
|
||||
--echo =========================================================================
|
||||
|
||||
#Check after fix MDEV-31522
|
||||
--disable_cursor_protocol
|
||||
--echo Simple nested loops join without blocking
|
||||
set @@join_cache_level=0;
|
||||
explain
|
||||
@ -457,6 +459,7 @@ SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 14;
|
||||
|
||||
SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 15;
|
||||
SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 16;
|
||||
--enable_cursor_protocol
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
||||
@ -489,6 +492,7 @@ WHERE alias3.c IN ( SELECT 1 UNION SELECT 6 )
|
||||
GROUP BY field1, field2, field3, field4, field5
|
||||
LIMIT ROWS EXAMINED 120;
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
FLUSH STATUS;
|
||||
SELECT a AS field1, alias2.d AS field2, alias2.f AS field3, alias2.e AS field4, b AS field5
|
||||
@ -508,6 +512,7 @@ LIMIT ROWS EXAMINED 124;
|
||||
SHOW STATUS LIKE 'Handler_read%';
|
||||
SHOW STATUS LIKE 'Handler_tmp%';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
|
@ -41,7 +41,9 @@ SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
create table t1(id integer not null auto_increment primary key);
|
||||
insert into t1 values(0);
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' from t1;
|
||||
--enable_cursor_protocol
|
||||
delete from t1;
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1;
|
||||
enable_query_log;
|
||||
@ -49,9 +51,11 @@ select * from t1;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/t1;
|
||||
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1'
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
|
||||
FROM t1;
|
||||
--enable_cursor_protocol
|
||||
delete from t1;
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t1
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
|
||||
@ -94,9 +98,11 @@ INSERT INTO t1 (c1) VALUES
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
cat_file $MYSQLTEST_VARDIR/tmp/t1;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
@ -184,9 +190,11 @@ create table t1(f1 int);
|
||||
insert into t1 values(1),(null);
|
||||
create table t2(f2 int auto_increment primary key);
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2;
|
||||
enable_query_log;
|
||||
@ -203,20 +211,24 @@ create table t1(f1 int, f2 timestamp not null default current_timestamp);
|
||||
create table t2(f1 int);
|
||||
insert into t2 values(1),(2);
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1;
|
||||
enable_query_log;
|
||||
select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/t2;
|
||||
delete from t1;
|
||||
disable_query_log;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2'
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
|
||||
FROM t2;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1
|
||||
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
|
||||
enable_query_log;
|
||||
@ -235,9 +247,11 @@ INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
cat_file $MYSQLTEST_VARDIR/tmp/t1;
|
||||
echo EOF;
|
||||
|
||||
@ -376,8 +390,10 @@ SET sql_mode = '';
|
||||
|
||||
--disable_ps2_protocol
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file'
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM;
|
||||
|
||||
@ -389,17 +405,21 @@ SELECT * FROM t1;
|
||||
|
||||
# show we can write this with OUTFILE, forcing the parameters for now
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--diff_files $file $file2
|
||||
--remove_file $file2
|
||||
|
||||
# now show the OUTFILE defaults are correct with NO_BACKSLASH_ESCAPES
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--diff_files $file $file2
|
||||
--remove_file $file2
|
||||
|
||||
@ -432,9 +452,11 @@ INSERT INTO t1 (id, val1) VALUES (3, '\tx');
|
||||
--echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' '
|
||||
@ -451,9 +473,11 @@ eval SELECT LOAD_FILE("$file") as exp;
|
||||
--echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '\' TERMINATED BY ' '
|
||||
@ -475,9 +499,11 @@ SET sql_mode = '';
|
||||
--echo 2.1 !NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' '
|
||||
@ -500,9 +526,11 @@ SET sql_mode = '';
|
||||
--echo 2.2 !NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '' TERMINATED BY ' '
|
||||
@ -544,9 +572,11 @@ INSERT INTO t1 VALUES (1);
|
||||
SET NAMES latin1;
|
||||
SET character_set_filesystem=filename;
|
||||
select @@character_set_filesystem;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT * INTO OUTFILE 't-1' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
DELETE FROM t1;
|
||||
LOAD DATA INFILE 't-1' INTO TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
@ -568,9 +598,11 @@ select @@character_set_filesystem;
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(col0 LONGBLOB);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT 'test' INTO OUTFILE 't1.txt';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0;
|
||||
SELECT * FROM t1;
|
||||
|
||||
@ -639,9 +671,11 @@ disconnect con1;
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 INT);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--disable_warnings
|
||||
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
|
||||
--enable_warnings
|
||||
@ -658,7 +692,9 @@ remove_file $MYSQLD_DATADIR/test/t1.dat;
|
||||
--disable_ps2_protocol
|
||||
--let $file=$MYSQLTEST_VARDIR/tmp/bug11735141.txt
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--disable_cursor_protocol
|
||||
--eval SELECT '1\n' INTO DUMPFILE '$file'
|
||||
--enable_cursor_protocol
|
||||
--enable_ps2_protocol
|
||||
|
||||
create table t1(a point);
|
||||
@ -745,9 +781,11 @@ CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), UNIQUE(b));
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
CREATE TABLE t2 (c INT);
|
||||
CREATE VIEW v AS SELECT t1.* FROM t1 JOIN t2;
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT a, b INTO OUTFILE '15645.data' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--error ER_WRONG_USAGE
|
||||
LOAD DATA INFILE '15645.data' IGNORE INTO TABLE v (a,b);
|
||||
--error ER_WRONG_USAGE
|
||||
|
@ -152,6 +152,7 @@ DROP USER test2@localhost;
|
||||
--echo # MYSQL 8
|
||||
--echo #
|
||||
|
||||
--disable_cursor_protocol
|
||||
--enable_prepare_warnings
|
||||
SELECT 1 FROM DUAL LIMIT 1 INTO @var FOR UPDATE;
|
||||
SELECT 1 FROM DUAL LIMIT 1 FOR UPDATE INTO @var;
|
||||
@ -163,3 +164,4 @@ SELECT 1 FROM DUAL LIMIT 1 INTO @var FOR UPDATE INTO @var;
|
||||
SELECT 1 UNION SELECT 1 FOR UPDATE INTO @var;
|
||||
SELECT 1 UNION SELECT 1 INTO @var FOR UPDATE;
|
||||
--disable_prepare_warnings
|
||||
--enable_cursor_protocol
|
||||
|
17
mysql-test/main/log_crash.result
Normal file
17
mysql-test/main/log_crash.result
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# MDEV-33373: Unexpected ER_FILE_NOT_FOUND upon reading from logging
|
||||
# table after crash recovery
|
||||
#
|
||||
call mtr.add_suppression("Table 'general_log' is marked as crashed and should be repaired");
|
||||
SET GLOBAL log_output="TABLE";
|
||||
CREATE TABLE t (a INT);
|
||||
# restart
|
||||
DROP TABLE t;
|
||||
SELECT count(*) FROM mysql.general_log;
|
||||
count(*)
|
||||
5
|
||||
Warnings:
|
||||
Error 1194 Table 'general_log' is marked as crashed and should be repaired
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
25
mysql-test/main/log_crash.test
Normal file
25
mysql-test/main/log_crash.test
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_csv.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33373: Unexpected ER_FILE_NOT_FOUND upon reading from logging
|
||||
--echo # table after crash recovery
|
||||
--echo #
|
||||
|
||||
call mtr.add_suppression("Table 'general_log' is marked as crashed and should be repaired");
|
||||
|
||||
--disable_ps_protocol
|
||||
SET GLOBAL log_output="TABLE";
|
||||
CREATE TABLE t (a INT);
|
||||
--disable_ps_protocol
|
||||
--let $shutdown_timeout= 0
|
||||
--source include/restart_mysqld.inc
|
||||
DROP TABLE t;
|
||||
--disable_ps_protocol
|
||||
SELECT count(*) FROM mysql.general_log;
|
||||
--enable_ps_protocol
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
@ -44,6 +44,7 @@ show fields from mysql.slow_log;
|
||||
#
|
||||
# Check flush command
|
||||
#
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
|
||||
flush slow logs;
|
||||
@ -74,10 +75,12 @@ SET long_query_time=0.1;
|
||||
|
||||
--echo # Although this query is disallowed by slow_query_log, it should still increment Slow_queries
|
||||
|
||||
--disable_cursor_protocol
|
||||
SELECT VARIABLE_VALUE INTO @global_slow_queries
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='SLOW_QUERIES';
|
||||
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
||||
--enable_cursor_protocol
|
||||
SELECT
|
||||
CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
|
||||
FROM
|
||||
@ -88,11 +91,13 @@ SELECT
|
||||
--echo # Although this query is disallowed by log_slow_filter, it should still increment Slow_queries
|
||||
|
||||
SET log_slow_filter=filesort;
|
||||
--disable_cursor_protocol
|
||||
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
||||
SELECT VARIABLE_VALUE INTO @global_slow_queries
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME='SLOW_QUERIES';
|
||||
SELECT sleep(0.2) INTO @tmp FROM DUAL;
|
||||
--enable_cursor_protocol
|
||||
SELECT
|
||||
CAST(VARIABLE_VALUE AS UNSIGNED)-@global_slow_queries AS Slow_queries_increment
|
||||
FROM
|
||||
@ -117,6 +122,7 @@ show session status like 'Slow_queries';
|
||||
|
||||
drop table t;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
@ -140,6 +146,7 @@ CREATE TABLE `tab_MDEV_30820` (
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
|
||||
@ -184,7 +191,7 @@ drop function get_zero;
|
||||
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
@ -213,7 +220,7 @@ set log_slow_filter=default;
|
||||
set timestamp=default;
|
||||
|
||||
let SEARCH_FILE=`select @@slow_query_log_file`;
|
||||
let SEARCH_PATTERN=use.*2;
|
||||
let SEARCH_PATTERN= use \`a\n.*2;
|
||||
let SEARCH_OUTPUT=matches;
|
||||
source include/search_pattern_in_file.inc;
|
||||
|
||||
|
@ -30,9 +30,11 @@ SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
--let log_file=$log_slow_prefix-verbosity_1
|
||||
|
||||
--source include/log_slow_start.inc
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT sum(a+b) FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
UPDATE t1 set b=b+1 where a=1 or a=999;
|
||||
--source include/log_slow_stop.inc
|
||||
|
||||
@ -51,9 +53,11 @@ SET SESSION log_slow_verbosity='innodb,query_plan';
|
||||
--let log_file=$log_slow_prefix-verbosity_2
|
||||
|
||||
--source include/log_slow_start.inc
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT 1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--source include/log_slow_stop.inc
|
||||
|
||||
--let log_slow_verbosity_expected_matches= 2
|
||||
|
@ -16,6 +16,7 @@ connect (con2,localhost,root,,);
|
||||
#
|
||||
# Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values
|
||||
#
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
connection con1;
|
||||
set session long_query_time=10;
|
||||
@ -38,5 +39,5 @@ connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--enable_cursor_protocol
|
||||
set @@global.log_output = @log_output.saved;
|
||||
|
@ -836,7 +836,9 @@ SET GLOBAL slow_query_log = @old_slow_query_log;
|
||||
--echo # Bug#21557 entries in the general query log truncated at 1000 characters.
|
||||
--echo #
|
||||
|
||||
--disable_cursor_protocol
|
||||
select CONNECTION_ID() into @thread_id;
|
||||
--enable_cursor_protocol
|
||||
--disable_ps_protocol
|
||||
truncate table mysql.general_log;
|
||||
--enable_ps_protocol
|
||||
@ -1007,9 +1009,12 @@ INSERT INTO t1 VALUES (3,3,3);
|
||||
INSERT INTO t1 VALUES (4,4,4);
|
||||
|
||||
--disable_ps2_protocol
|
||||
#Enable after fix MDEV-31522
|
||||
--disable_cursor_protocol
|
||||
SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f3=4;
|
||||
SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f2=3;
|
||||
SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2;
|
||||
--enable_cursor_protocol
|
||||
|
||||
--replace_column 1 TIMESTAMP
|
||||
SELECT start_time, rows_examined, rows_sent, sql_text FROM mysql.slow_log WHERE sql_text LIKE '%Bug#31700%' ORDER BY start_time;
|
||||
@ -1037,6 +1042,7 @@ unlock tables;
|
||||
--echo #
|
||||
--echo # MDEV-33267 User with minimal permissions can intentionally corrupt mysql.slow_log table
|
||||
--echo #
|
||||
--disable_cursor_protocol
|
||||
truncate mysql.slow_log;
|
||||
set global log_output= 'TABLE';
|
||||
create user u@localhost;
|
||||
@ -1052,6 +1058,7 @@ select 'after evil-doing', sleep(0.2);
|
||||
select distinct sql_text from mysql.slow_log where sql_text like '%evil%';
|
||||
set global log_output=default;
|
||||
drop user u@localhost;
|
||||
--enable_cursor_protocol
|
||||
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.slow_query_log= @old_slow_query_log;
|
||||
|
@ -12,9 +12,11 @@ insert into t1 () values
|
||||
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
|
||||
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
|
||||
(),(),(),();
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select * into outfile 'load.data' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e));
|
||||
load data infile 'load.data' into table tmp;
|
||||
delete from tmp;
|
||||
@ -226,9 +228,11 @@ drop table t1;
|
||||
--echo #
|
||||
CREATE TABLE t1 (data VARCHAR(4), unique(data) using hash) with system versioning;
|
||||
INSERT INTO t1 VALUES ('A');
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT * INTO OUTFILE 'load.data' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
--error ER_DUP_ENTRY
|
||||
LOAD DATA INFILE 'load.data' INTO TABLE t1;
|
||||
select * from t1;
|
||||
@ -242,9 +246,11 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (data VARCHAR(7961)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES ('f'), ('o'), ('o');
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT * INTO OUTFILE 'load.data' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data);
|
||||
SELECT * FROM t1;
|
||||
@ -509,9 +515,11 @@ drop table t2;
|
||||
--echo #
|
||||
create table t1 (pk int primary key, f blob, unique(f)) engine=innodb;
|
||||
insert t1 values (1, null);
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
select * into outfile 't1.data' from t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
load data infile 't1.data' replace into table t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
@ -2,9 +2,6 @@
|
||||
# Test of --lower-case-table-names
|
||||
#
|
||||
|
||||
#remove this include after fix MDEV-27944
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
create table t4 (id int primary key, Word varchar(40) not null);
|
||||
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
|
||||
@ -36,8 +33,10 @@ drop table t1;
|
||||
create database mysqltest;
|
||||
use MYSQLTEST;
|
||||
create table t1 (a int);
|
||||
--disable_service_connection
|
||||
select T1.a from MYSQLTEST.T1;
|
||||
select t1.a from MYSQLTEST.T1;
|
||||
--enable_service_connection
|
||||
select mysqltest.t1.* from MYSQLTEST.t1;
|
||||
select MYSQLTEST.t1.* from MYSQLTEST.t1;
|
||||
select MYSQLTEST.T1.* from MYSQLTEST.T1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user