mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
System Versioning pre1.0
Merge branch '10.3' into trunk
This commit is contained in:
commit
497c6add88
433 changed files with 16008 additions and 12469 deletions
.travis.yml
client
extra/mariabackup
include
libmysqld
mysql-test
extra
include
mysql-test-run.plr
compound.resultcreate.resultcte_nonrecursive.resultcte_recursive.resultdefault.resultdelimiter_command_case_sensitivity.resultderived_cond_pushdown.resulterrors.resultexcept.resultfunc_group_innodb.resultfunc_misc.resultgroup_by_null.resulthaving.resultinformation_schema.resultinformation_schema2.resultinformation_schema_db.resultinformation_schema_inno.resultinformation_schema_part.resultinsert_update.resultintersect.resultmysql_upgrade_noengine.resultmysqld--help.resultopt_tvc.resultpartition_exchange.resultps.resultrange.resultrange_mrr_icp.resultselectivity.resultselectivity_innodb.resultshow_explain_ps.resultsp.resultstatus.resultsubselect_exists2in.resultsubselect_sj.resulttable_elim.resulttable_value_constr.resulttrigger.resulttype_bit.resulttype_date.resulttype_time.resultvariables.resultview.resultwin_percentile.result
suite
binlog/r
binlog_encryption
encryption
disabled.def
r
encryption_force.resultfilekeys_encfile.resultfilekeys_encfile_file.resultinnodb-encryption-alter.resultinnodb-spatial-index.result
t
funcs_1
datadict
is_key_column_usage.incis_schemata.incis_triggers.incis_views.incprocesslist_priv.incprocesslist_val.inc
r
is_basics_mixed.resultis_columns_is.resultis_columns_is_embedded.resultis_key_column_usage.resultis_key_column_usage_embedded.resultis_routines_embedded.resultis_schemata.resultis_schemata_embedded.resultis_statistics.resultis_table_constraints.resultis_triggers.resultis_triggers_embedded.resultis_views.resultis_views_embedded.resultprocesslist_priv_no_prot.resultprocesslist_priv_ps.resultprocesslist_val_no_prot.resultprocesslist_val_ps.resultstoredproc.result
t
galera
|
@ -11,7 +11,7 @@ language: cpp
|
|||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode8.3
|
||||
osx_image: xcode9.1
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
|
|
@ -1092,7 +1092,7 @@ inline bool is_delimiter_command(char *name, ulong len)
|
|||
only name(first DELIMITER_NAME_LEN bytes) is checked.
|
||||
*/
|
||||
return (len >= DELIMITER_NAME_LEN &&
|
||||
!my_strnncoll(charset_info, (uchar*) name, DELIMITER_NAME_LEN,
|
||||
!my_strnncoll(&my_charset_latin1, (uchar*) name, DELIMITER_NAME_LEN,
|
||||
(uchar *) DELIMITER_NAME, DELIMITER_NAME_LEN));
|
||||
}
|
||||
|
||||
|
|
|
@ -965,8 +965,9 @@ static int install_used_engines(void)
|
|||
{
|
||||
char buf[512];
|
||||
DYNAMIC_STRING ds_result;
|
||||
const char *query = "SELECT DISTINCT LOWER(engine) FROM information_schema.tables"
|
||||
" WHERE table_comment LIKE 'Unknown storage engine%'";
|
||||
const char *query = "SELECT DISTINCT LOWER(engine) AS c1 FROM information_schema.tables"
|
||||
" WHERE table_comment LIKE 'Unknown storage engine%'"
|
||||
" ORDER BY c1";
|
||||
|
||||
if (opt_systables_only || !from_before_10_1())
|
||||
{
|
||||
|
|
|
@ -46,6 +46,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#include <ut0mem.h>
|
||||
#include <srv0start.h>
|
||||
#include <fil0fil.h>
|
||||
#include <trx0sys.h>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <mysqld.h>
|
||||
|
@ -1680,26 +1681,30 @@ copy_back()
|
|||
ut_crc32_init();
|
||||
|
||||
/* copy undo tablespaces */
|
||||
if (srv_undo_tablespaces > 0) {
|
||||
|
||||
dst_dir = (srv_undo_dir && *srv_undo_dir)
|
||||
? srv_undo_dir : mysql_data_home;
|
||||
|
||||
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
|
||||
dst_dir = (srv_undo_dir && *srv_undo_dir)
|
||||
? srv_undo_dir : mysql_data_home;
|
||||
|
||||
for (ulong i = 1; i <= srv_undo_tablespaces; i++) {
|
||||
char filename[20];
|
||||
sprintf(filename, "undo%03lu", i);
|
||||
if (!(ret = copy_or_move_file(filename, filename,
|
||||
dst_dir, 1))) {
|
||||
goto cleanup;
|
||||
}
|
||||
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
|
||||
|
||||
for (uint i = 1; i <= TRX_SYS_MAX_UNDO_SPACES; i++) {
|
||||
char filename[20];
|
||||
sprintf(filename, "undo%03u", i);
|
||||
if (!file_exists(filename)) {
|
||||
break;
|
||||
}
|
||||
if (!(ret = copy_or_move_file(filename, filename,
|
||||
dst_dir, 1))) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ds_destroy(ds_data);
|
||||
ds_data = NULL;
|
||||
}
|
||||
|
||||
ds_destroy(ds_data);
|
||||
ds_data = NULL;
|
||||
|
||||
/* copy redo logs */
|
||||
|
||||
dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir)
|
||||
? srv_log_group_home_dir : mysql_data_home;
|
||||
|
||||
|
@ -1825,7 +1830,7 @@ copy_back()
|
|||
}
|
||||
}
|
||||
|
||||
/* copy buufer pool dump */
|
||||
/* copy buffer pool dump */
|
||||
|
||||
if (innobase_buffer_pool_filename) {
|
||||
const char *src_name;
|
||||
|
|
|
@ -2836,7 +2836,7 @@ static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback)
|
|||
/* We found a symlink or a file */
|
||||
if (strlen(fileinfo.name) > 4) {
|
||||
bool is_isl= false;
|
||||
if (ends_with(fileinfo.name, ".ibd") || ((is_isl = ends_with(fileinfo.name, ".ibd"))))
|
||||
if (ends_with(fileinfo.name, ".ibd") || ((is_isl = ends_with(fileinfo.name, ".isl"))))
|
||||
(*callback)(dbinfo.name, fileinfo.name, is_isl);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ typedef struct st_mem_root
|
|||
/* if block have less memory it will be put in 'used' list */
|
||||
size_t min_malloc;
|
||||
size_t block_size; /* initial block size */
|
||||
size_t total_alloc;
|
||||
unsigned int block_num; /* allocated blocks counter */
|
||||
/*
|
||||
first free block in queue test counter (if it exceed
|
||||
|
|
|
@ -238,6 +238,7 @@ typedef struct st_mem_root
|
|||
USED_MEM *pre_alloc;
|
||||
size_t min_malloc;
|
||||
size_t block_size;
|
||||
size_t total_alloc;
|
||||
unsigned int block_num;
|
||||
unsigned int first_block_usage;
|
||||
void (*error_handler)(void);
|
||||
|
|
|
@ -1 +1 @@
|
|||
#cmakedefine SOURCE_REVISION "@SOURCE_REVISION@"
|
||||
#define SOURCE_REVISION "@SOURCE_REVISION@"
|
||||
|
|
|
@ -118,6 +118,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
|||
../sql/temporary_tables.cc
|
||||
../sql/session_tracker.cc
|
||||
../sql/proxy_protocol.cc
|
||||
../sql/sql_tvc.cc ../sql/sql_tvc.h
|
||||
../sql/item_vers.cc
|
||||
../sql/vtmd.cc
|
||||
${GEN_SOURCES}
|
||||
|
|
|
@ -18,7 +18,7 @@ call mtr.add_suppression('Attempting backtrace');
|
|||
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||
call mtr.add_suppression('MYSQL_BIN_LOG::open failed to sync the index file');
|
||||
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
||||
call mtr.add_suppression('Could not open .*');
|
||||
call mtr.add_suppression('Could not use .*');
|
||||
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
||||
flush tables;
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ SET GLOBAL debug_dbug=@old_debug;
|
|||
### file or failure to write the rotate event.
|
||||
|
||||
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
|
||||
call mtr.add_suppression("Could not open .*");
|
||||
call mtr.add_suppression("Could not use .*");
|
||||
|
||||
RESET MASTER;
|
||||
SHOW WARNINGS;
|
||||
|
@ -392,7 +392,7 @@ RESET MASTER;
|
|||
|
||||
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
|
||||
call mtr.add_suppression("Error writing file .*");
|
||||
call mtr.add_suppression("Could not open .*");
|
||||
call mtr.add_suppression("Could not use .*");
|
||||
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
|
||||
call mtr.add_suppression("Can't generate a unique log-filename .*");
|
||||
-- echo ###################### TEST #13
|
||||
|
|
|
@ -82,6 +82,8 @@ call mtr.check_testcase();
|
|||
|
||||
let $datadir=`select @@datadir`;
|
||||
list_files $datadir mysql_upgrade_info;
|
||||
list_files $datadir/test #sql*;
|
||||
list_files $datadir/mysql #sql*;
|
||||
|
||||
--enable_query_log
|
||||
|
||||
|
|
|
@ -39,12 +39,14 @@ BEGIN
|
|||
|
||||
-- Dump all databases, there should be none
|
||||
-- except those that was created during bootstrap
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA;
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME;
|
||||
|
||||
-- and the mtr_wsrep_notify schema which is populated by the std_data/wsrep_notify.sh script
|
||||
-- and the suite/galera/t/galera_var_notify_cmd.test
|
||||
-- and the wsrep_schema schema that may be created by Galera
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema');
|
||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
|
||||
WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema')
|
||||
ORDER BY BINARY SCHEMA_NAME;
|
||||
|
||||
-- The test database should not contain any tables
|
||||
SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES
|
||||
|
|
|
@ -1917,10 +1917,10 @@ sub collect_mysqld_features_from_running_server ()
|
|||
#print "Major: $1 Minor: $2 Build: $3\n";
|
||||
$mysql_version_id= $1*10000 + $2*100 + $3;
|
||||
#print "mysql_version_id: $mysql_version_id\n";
|
||||
mtr_report("MySQL Version $1.$2.$3");
|
||||
mtr_report("MariaDB Version $1.$2.$3");
|
||||
$mysql_version_extra= $4;
|
||||
}
|
||||
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
|
||||
mtr_error("Could not find version of MariaDBL") unless $mysql_version_id;
|
||||
}
|
||||
|
||||
sub find_mysqld {
|
||||
|
@ -2210,7 +2210,7 @@ sub environment_setup {
|
|||
$ENV{'UMASK_DIR'}= "0770"; # The octal *string*
|
||||
|
||||
#
|
||||
# MySQL tests can produce output in various character sets
|
||||
# MariaDB tests can produce output in various character sets
|
||||
# (especially, ctype_xxx.test). To avoid confusing Perl
|
||||
# with output which is incompatible with the current locale
|
||||
# settings, we reset the current values of LC_ALL and LC_CTYPE to "C".
|
||||
|
@ -2541,7 +2541,7 @@ sub setup_vardir() {
|
|||
if (check_socket_path_length("$opt_tmpdir/testsocket.sock")){
|
||||
mtr_error("Socket path '$opt_tmpdir' too long, it would be ",
|
||||
"truncated and thus not possible to use for connection to ",
|
||||
"MySQL Server. Set a shorter with --tmpdir=<path> option");
|
||||
"MariaDB Server. Set a shorter with --tmpdir=<path> option");
|
||||
}
|
||||
|
||||
# copy all files from std_data into var/std_data
|
||||
|
@ -4397,12 +4397,12 @@ sub extract_warning_lines ($$) {
|
|||
qr/Slave I\/O: error reconnecting to master '.*' - retry-time: [1-3] retries/,
|
||||
qr/Slave I\/0: Master command COM_BINLOG_DUMP failed/,
|
||||
qr/Error reading packet/,
|
||||
qr/Lost connection to MySQL server at 'reading initial communication packet'/,
|
||||
qr/Lost connection to MariaDB server at 'reading initial communication packet'/,
|
||||
qr/Failed on request_dump/,
|
||||
qr/Slave: Can't drop database.* database doesn't exist/,
|
||||
qr/Slave: Operation DROP USER failed for 'create_rout_db'/,
|
||||
qr|Checking table: '\..mtr.test_suppressions'|,
|
||||
qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in MySQL|,
|
||||
qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in|,
|
||||
qr|Table '\..mtr.test_suppressions' is marked as crashed and should be repaired|,
|
||||
qr|Table 'test_suppressions' is marked as crashed and should be repaired|,
|
||||
qr|Can't open shared library|,
|
||||
|
|
|
@ -112,7 +112,8 @@ select @a|
|
|||
/**/ while (select count(*) from information_schema.tables where table_schema='test')
|
||||
do
|
||||
select concat('drop table ', table_name) into @a
|
||||
from information_schema.tables where table_schema='test' limit 1;
|
||||
from information_schema.tables where table_schema='test'
|
||||
order by table_name limit 1;
|
||||
select @a as 'executing:';
|
||||
prepare dt from @a;
|
||||
execute dt;
|
||||
|
|
|
@ -1173,6 +1173,7 @@ t1 CREATE TABLE `t1` (
|
|||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
@ -1196,6 +1197,7 @@ t1 CREATE TEMPORARY TABLE `t1` (
|
|||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
|
|
@ -1079,3 +1079,71 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
3 DERIVED t2 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
|
||||
NULL UNION RESULT <union1,4> ALL NULL NULL NULL NULL NULL
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-13780: tower of embedding CTEs with multiple usage of them
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (3), (2), (4), (7), (1), (2), (5);
|
||||
with cte_e as
|
||||
(
|
||||
with cte_o as
|
||||
(
|
||||
with cte_i as (select * from t1 where a < 7)
|
||||
select * from cte_i where a > 1
|
||||
)
|
||||
select * from cte_o as cto_o1 where a < 3
|
||||
union
|
||||
select * from cte_o as cto_o2 where a > 4
|
||||
)
|
||||
select * from cte_e as cte_e1 where a > 1
|
||||
union
|
||||
select * from cte_e as cte_e2;
|
||||
a
|
||||
2
|
||||
5
|
||||
explain extended with cte_e as
|
||||
(
|
||||
with cte_o as
|
||||
(
|
||||
with cte_i as (select * from t1 where a < 7)
|
||||
select * from cte_i where a > 1
|
||||
)
|
||||
select * from cte_o as cto_o1 where a < 3
|
||||
union
|
||||
select * from cte_o as cto_o2 where a > 4
|
||||
)
|
||||
select * from cte_e as cte_e1 where a > 1
|
||||
union
|
||||
select * from cte_e as cte_e2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 14 100.00 Using where
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using where
|
||||
5 UNION t1 ALL NULL NULL NULL NULL 7 100.00 Using where
|
||||
NULL UNION RESULT <union2,5> ALL NULL NULL NULL NULL NULL NULL
|
||||
6 UNION <derived9> ALL NULL NULL NULL NULL 14 100.00
|
||||
9 DERIVED t1 ALL NULL NULL NULL NULL 7 100.00 Using where
|
||||
12 UNION t1 ALL NULL NULL NULL NULL 7 100.00 Using where
|
||||
NULL UNION RESULT <union9,12> ALL NULL NULL NULL NULL NULL NULL
|
||||
NULL UNION RESULT <union1,6> ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 with cte_e as (with cte_o as (with cte_i as (/* select#4 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)/* select#3 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union /* select#5 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)/* select#1 */ select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union /* select#6 */ select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2`
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-13753: embedded CTE in a VIEW created in prepared statement
|
||||
#
|
||||
SET @sql_query = "
|
||||
CREATE OR REPLACE VIEW cte_test AS
|
||||
WITH cte1 AS ( SELECT 1 as a from dual )
|
||||
, cte2 AS ( SELECT * FROM cte1 )
|
||||
SELECT * FROM cte2;
|
||||
";
|
||||
PREPARE stmt FROM @sql_query;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
SHOW CREATE VIEW cte_test;
|
||||
View Create View character_set_client collation_connection
|
||||
cte_test CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `cte_test` AS with cte1 as (select 1 AS `a`), cte2 as (select `cte1`.`a` AS `a` from `cte1`)select `cte2`.`a` AS `a` from `cte2` latin1 latin1_swedish_ci
|
||||
SELECT * FROM cte_test;
|
||||
a
|
||||
1
|
||||
DROP VIEW cte_test;
|
||||
|
|
|
@ -2881,3 +2881,48 @@ f
|
|||
2
|
||||
set standard_compliant_cte=default;
|
||||
DROP TABLE t;
|
||||
#
|
||||
# mdev-14184: recursive CTE embedded into CTE with multiple references
|
||||
#
|
||||
WITH
|
||||
cte1 AS (
|
||||
SELECT n FROM (
|
||||
WITH RECURSIVE rec_cte(n) AS (
|
||||
SELECT 1 as n1
|
||||
UNION ALL
|
||||
SELECT n+1 as n2 FROM rec_cte WHERE n < 3
|
||||
) SELECT n FROM rec_cte
|
||||
) AS X
|
||||
),
|
||||
cte2 as (
|
||||
SELECT 2 FROM cte1
|
||||
)
|
||||
SELECT *
|
||||
FROM cte1;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
#
|
||||
# MDEV-14217 [db crash] Recursive CTE when SELECT includes new field
|
||||
#
|
||||
CREATE TEMPORARY TABLE a_tbl (
|
||||
a VARCHAR(33) PRIMARY KEY,
|
||||
b VARCHAR(33)
|
||||
);
|
||||
INSERT INTO a_tbl VALUES ('block0', 'block0'), ('block1', NULL);
|
||||
WITH RECURSIVE Q0 AS (
|
||||
SELECT T0.a, T0.b, 5
|
||||
FROM a_tbl T0
|
||||
WHERE b IS NULL
|
||||
UNION ALL
|
||||
SELECT T1.a, T1.b
|
||||
FROM Q0
|
||||
JOIN a_tbl T1
|
||||
ON T1.a=Q0.a
|
||||
) SELECT distinct(Q0.a), Q0.b
|
||||
FROM Q0;
|
||||
ERROR 21000: The used SELECT statements have a different number of columns
|
||||
DROP TABLE a_tbl;
|
||||
WITH RECURSIVE x AS (SELECT 1,2 UNION ALL SELECT 1 FROM x) SELECT * FROM x;
|
||||
ERROR 21000: The used SELECT statements have a different number of columns
|
||||
|
|
|
@ -232,7 +232,7 @@ CREATE TABLE t1 (a INT DEFAULT 10);
|
|||
INSERT INTO t1 VALUES (11);
|
||||
CREATE VIEW v1 AS SELECT a AS a FROM t1;
|
||||
CREATE VIEW v2 AS SELECT DEFAULT(a) AS a FROM t1;
|
||||
CREATE VIEW v3 AS SELECT VALUES(a) AS a FROM t1;
|
||||
CREATE VIEW v3 AS SELECT VALUE(a) AS a FROM t1;
|
||||
SELECT * FROM v1;
|
||||
a
|
||||
11
|
||||
|
@ -546,8 +546,8 @@ CREATE PROCEDURE p1() CREATE TABLE t1 (a INT DEFAULT par);
|
|||
CALL p1;
|
||||
ERROR 42S22: Unknown column 'par' in 'DEFAULT'
|
||||
DROP PROCEDURE p1;
|
||||
CREATE TABLE t1 (a INT DEFAULT VALUES(a));
|
||||
ERROR HY000: Function or expression 'values()' cannot be used in the DEFAULT clause of `a`
|
||||
CREATE TABLE t1 (a INT DEFAULT VALUE(a));
|
||||
ERROR HY000: Function or expression 'value()' cannot be used in the DEFAULT clause of `a`
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TABLE t2 (a INT DEFAULT NEW.a);
|
||||
ERROR HY000: Function or expression 'NEW.a' cannot be used in the DEFAULT clause of `a`
|
||||
|
|
2
mysql-test/r/delimiter_command_case_sensitivity.result
Normal file
2
mysql-test/r/delimiter_command_case_sensitivity.result
Normal file
|
@ -0,0 +1,2 @@
|
|||
1
|
||||
1
|
|
@ -8783,6 +8783,47 @@ EXPLAIN
|
|||
DROP VIEW v2;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-14237: derived with regexp_substr() in select list
|
||||
#
|
||||
create table t1 (a char(8));
|
||||
insert into t1 values ('b'), ('a'), ('xx');
|
||||
select *
|
||||
from ( select distinct regexp_substr(t1.a,'^[A-Za-z]+') as f from t1) as t
|
||||
where t.f = 'a' or t.f = 'b';
|
||||
f
|
||||
b
|
||||
a
|
||||
explain format=json select *
|
||||
from ( select distinct regexp_substr(t1.a,'^[A-Za-z]+') as f from t1) as t
|
||||
where t.f = 'a' or t.f = 'b';
|
||||
EXPLAIN
|
||||
{
|
||||
"query_block": {
|
||||
"select_id": 1,
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t.f = 'a' or t.f = 'b'",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"temporary_table": {
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-10855: Pushdown into derived with window functions
|
||||
#
|
||||
set @save_optimizer_switch= @@optimizer_switch;
|
||||
|
|
|
@ -150,17 +150,17 @@ ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
|
|||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2(a INT PRIMARY KEY, b INT);
|
||||
SELECT '' AS b FROM t1 GROUP BY VALUES(b);
|
||||
SELECT '' AS b FROM t1 GROUP BY VALUE(b);
|
||||
ERROR 42S22: Unknown column '' in 'VALUES() function'
|
||||
REPLACE t2(b) SELECT '' AS b FROM t1 GROUP BY VALUES(b);
|
||||
REPLACE t2(b) SELECT '' AS b FROM t1 GROUP BY VALUE(b);
|
||||
ERROR 42S22: Unknown column '' in 'VALUES() function'
|
||||
UPDATE t2 SET a=(SELECT '' AS b FROM t1 GROUP BY VALUES(b));
|
||||
UPDATE t2 SET a=(SELECT '' AS b FROM t1 GROUP BY VALUE(b));
|
||||
ERROR 42S22: Unknown column '' in 'VALUES() function'
|
||||
INSERT INTO t2 VALUES (1,0) ON DUPLICATE KEY UPDATE
|
||||
b=(SELECT '' AS b FROM t1 GROUP BY VALUES(b));
|
||||
b=(SELECT '' AS b FROM t1 GROUP BY VALUE(b));
|
||||
ERROR 42S22: Unknown column '' in 'VALUES() function'
|
||||
INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE
|
||||
b=(SELECT VALUES(a)+2 FROM t1);
|
||||
b=(SELECT VALUE(a)+2 FROM t1);
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# MDEV-492: incorrect error check before sending OK in mysql_update
|
||||
|
@ -174,3 +174,11 @@ set max_session_mem_used = 50000;
|
|||
select * from seq_1_to_1000;
|
||||
set max_session_mem_used = 8192;
|
||||
select * from seq_1_to_1000;
|
||||
#
|
||||
# MDEV-14269 errors.test fails with valgrind (Conditional jump or move depends on uninitialised value)
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,null);
|
||||
ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
|
||||
SELECT UPDATEXML(-73 * -2465717823867977728,@@global.long_query_time,null);
|
||||
ERROR 22003: BIGINT value is out of range in '-73 * -2465717823867977728'
|
||||
|
|
|
@ -525,3 +525,13 @@ t3 CREATE TABLE `t3` (
|
|||
`b1` blob DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop tables t1,t2,t3;
|
||||
#
|
||||
# MDEV-13723: Server crashes in ha_heap::find_unique_row or
|
||||
# Assertion `0' failed in st_select_lex_unit::optimize with INTERSECT
|
||||
#
|
||||
CREATE TABLE t (i INT);
|
||||
INSERT INTO t VALUES (1),(2);
|
||||
SELECT * FROM t WHERE i != ANY ( SELECT 3 EXCEPT SELECT 3 );
|
||||
i
|
||||
drop table t;
|
||||
# End of 10.3 tests
|
||||
|
|
|
@ -226,7 +226,7 @@ create table y select 1 b;
|
|||
select 1 from y group by b;
|
||||
1
|
||||
1
|
||||
select 1 from y group by values(b);
|
||||
select 1 from y group by value(b);
|
||||
1
|
||||
1
|
||||
drop table y;
|
||||
|
|
|
@ -286,11 +286,11 @@ NAME_CONST('a', -(1)) OR 1
|
|||
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,10);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
EXPLAIN EXTENDED SELECT VALUES(b) FROM v1;
|
||||
EXPLAIN EXTENDED SELECT VALUE(b) FROM v1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select values(10) AS `VALUES(b)` from dual
|
||||
Note 1003 select value(10) AS `VALUE(b)` from dual
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
End of 5.3 tests
|
||||
|
@ -1458,6 +1458,20 @@ CONCAT(NAME_CONST('name',15),'오')
|
|||
15오
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# MDEV-14116 INET6_NTOA output is set as null to varchar(39) variable
|
||||
#
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE ip_full_addr varchar(39) DEFAULT "";
|
||||
SELECT INET6_NTOA(UNHEX('20000000000000000000000000000000')) into ip_full_addr;
|
||||
SELECT ip_full_addr;
|
||||
END;
|
||||
$$
|
||||
CALL p1();
|
||||
ip_full_addr
|
||||
2000::
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
create table t1 (a int);
|
||||
insert into t1 values (1),(2);
|
||||
select max('foo') from t1 group by values(a), extractvalue('bar','qux') order by "v";
|
||||
select max('foo') from t1 group by value(a), extractvalue('bar','qux') order by "v";
|
||||
max('foo')
|
||||
foo
|
||||
drop table t1;
|
||||
|
|
|
@ -727,3 +727,76 @@ A COUNT(*)
|
|||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
End of 10.1 tests
|
||||
#
|
||||
# MDEV-14093: GROUP BY with HAVING over function + ORDER BY
|
||||
#
|
||||
CREATE TABLE _authors (
|
||||
id MEDIUMINT(8) UNSIGNED AUTO_INCREMENT,
|
||||
name VARCHAR(100),
|
||||
some_field MEDIUMINT(8) UNSIGNED,
|
||||
PRIMARY KEY (id),
|
||||
index(some_field)
|
||||
);
|
||||
CREATE TABLE _books (
|
||||
id MEDIUMINT(8) UNSIGNED AUTO_INCREMENT,
|
||||
title VARCHAR(100),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE TABLE _books2authors (
|
||||
author_id MEDIUMINT(8) DEFAULT 0,
|
||||
book_id MEDIUMINT(8) DEFAULT 0,
|
||||
index(author_id),
|
||||
index(book_id)
|
||||
);
|
||||
INSERT INTO _authors (name, some_field) VALUES
|
||||
('author1', 1),('author2', 2),('author3', 3);
|
||||
INSERT INTO _books (title) VALUES
|
||||
('book1'),('book2'),('book3');
|
||||
INSERT INTO _books2authors (author_id, book_id) VALUES
|
||||
(2,1),(3,2),(3,3);
|
||||
SELECT A.id,
|
||||
GROUP_CONCAT(B.title ORDER BY B.title DESC SEPARATOR ',') AS books,
|
||||
some_field-1 AS having_field
|
||||
FROM _authors A
|
||||
LEFT JOIN _books2authors B2A FORCE INDEX(author_id)
|
||||
ON B2A.author_id = A.id
|
||||
LEFT JOIN
|
||||
_books B ON B.id = B2A.book_id
|
||||
GROUP BY A.id
|
||||
HAVING having_field < 1
|
||||
ORDER BY having_field ASC;
|
||||
id books having_field
|
||||
1 NULL 0
|
||||
DROP TABLE _authors, _books, _books2authors;
|
||||
#
|
||||
# Bug#17055185: WRONG RESULTS WHEN RUNNING A SELECT THAT INCLUDE
|
||||
# A HAVING BASED ON A FUNCTION.
|
||||
#
|
||||
CREATE TABLE series (
|
||||
val INT(10) UNSIGNED NOT NULL
|
||||
);
|
||||
INSERT INTO series VALUES(1);
|
||||
CREATE FUNCTION next_seq_value() RETURNS INT
|
||||
BEGIN
|
||||
DECLARE next_val INT;
|
||||
SELECT val INTO next_val FROM series;
|
||||
UPDATE series SET val=mod(val + 1, 2);
|
||||
RETURN next_val;
|
||||
END;
|
||||
|
|
||||
CREATE TABLE t1 (t INT, u INT, KEY(t));
|
||||
INSERT INTO t1 VALUES(10, 10), (11, 11), (12, 12), (12, 13),(14, 15), (15, 16),
|
||||
(16, 17), (17, 17);
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
SELECT t, next_seq_value() r FROM t1 FORCE INDEX(t)
|
||||
GROUP BY t HAVING r = 1 ORDER BY t1.u;
|
||||
t r
|
||||
10 1
|
||||
12 1
|
||||
15 1
|
||||
17 1
|
||||
DROP TABLE t1;
|
||||
DROP FUNCTION next_seq_value;
|
||||
DROP TABLE series;
|
||||
|
|
|
@ -588,8 +588,8 @@ select s1 from t1 where s1 in (select version from
|
|||
information_schema.tables) union select version from
|
||||
information_schema.tables;
|
||||
s1
|
||||
11
|
||||
10
|
||||
11
|
||||
drop table t1;
|
||||
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
|
||||
Table Create Table
|
||||
|
@ -773,11 +773,18 @@ table_name
|
|||
v2
|
||||
v3
|
||||
select column_name from information_schema.columns
|
||||
where table_schema='test';
|
||||
where table_schema='test' and table_name='t4';
|
||||
column_name
|
||||
f1
|
||||
select column_name from information_schema.columns
|
||||
where table_schema='test' and table_name='v2';
|
||||
column_name
|
||||
Warnings:
|
||||
Warning 1356 View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
select column_name from information_schema.columns
|
||||
where table_schema='test' and table_name='v3';
|
||||
column_name
|
||||
Warnings:
|
||||
Warning 1356 View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
select index_name from information_schema.statistics where table_schema='test';
|
||||
index_name
|
||||
|
@ -842,7 +849,8 @@ drop view a2, a1;
|
|||
drop table t_crashme;
|
||||
select table_schema,table_name, column_name from
|
||||
information_schema.columns
|
||||
where data_type = 'longtext' and table_schema != 'performance_schema';
|
||||
where data_type = 'longtext' and table_schema != 'performance_schema'
|
||||
order by binary table_name, ordinal_position;
|
||||
table_schema table_name column_name
|
||||
information_schema ALL_PLUGINS PLUGIN_DESCRIPTION
|
||||
information_schema COLUMNS COLUMN_DEFAULT
|
||||
|
@ -863,7 +871,8 @@ information_schema TRIGGERS ACTION_CONDITION
|
|||
information_schema TRIGGERS ACTION_STATEMENT
|
||||
information_schema VIEWS VIEW_DEFINITION
|
||||
select table_name, column_name, data_type from information_schema.columns
|
||||
where data_type = 'datetime' and table_name not like 'innodb_%';
|
||||
where data_type = 'datetime' and table_name not like 'innodb_%'
|
||||
order by binary table_name, ordinal_position;
|
||||
table_name column_name data_type
|
||||
EVENTS EXECUTE_AT datetime
|
||||
EVENTS STARTS datetime
|
||||
|
@ -1278,7 +1287,7 @@ sql security definer view v2 as select 1;
|
|||
connect con16681,localhost,mysqltest_1,,test;
|
||||
connection con16681;
|
||||
select * from information_schema.views
|
||||
where table_name='v1' or table_name='v2';
|
||||
where table_name='v1' or table_name='v2' order by table_name;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
|
||||
def test v1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
|
||||
def test v2 select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
|
||||
|
@ -1291,7 +1300,7 @@ set @a:= '.';
|
|||
create table t1(f1 char(5));
|
||||
create table t2(f1 char(5));
|
||||
select concat(@a, table_name), @a, table_name
|
||||
from information_schema.tables where table_schema = 'test';
|
||||
from information_schema.tables where table_schema = 'test' order by table_name;
|
||||
concat(@a, table_name) @a table_name
|
||||
.t1 . t1
|
||||
.t2 . t2
|
||||
|
@ -1378,7 +1387,8 @@ create table t2 (f1 int(11), f2 int(11));
|
|||
select table_name from information_schema.tables
|
||||
where table_schema = 'test' and table_name not in
|
||||
(select table_name from information_schema.columns
|
||||
where table_schema = 'test' and column_name = 'f3');
|
||||
where table_schema = 'test' and column_name = 'f3')
|
||||
order by table_name;
|
||||
table_name
|
||||
t1
|
||||
t2
|
||||
|
@ -1387,7 +1397,7 @@ create table t1(f1 int);
|
|||
create view v1 as select f1+1 as a from t1;
|
||||
create table t2 (f1 int, f2 int);
|
||||
create view v2 as select f1+1 as a, f2 as b from t2;
|
||||
select table_name, is_updatable from information_schema.views;
|
||||
select table_name, is_updatable from information_schema.views order by table_name;
|
||||
table_name is_updatable
|
||||
v1 NO
|
||||
v2 YES
|
||||
|
@ -1846,12 +1856,12 @@ rename table t2 to t3;
|
|||
connection default;
|
||||
# These statements should not be blocked by pending lock requests
|
||||
select table_name, column_name, data_type from information_schema.columns
|
||||
where table_schema = 'test' and table_name in ('t1', 't2');
|
||||
where table_schema = 'test' and table_name in ('t1', 't2') order by table_name, column_name;
|
||||
table_name column_name data_type
|
||||
t1 i int
|
||||
t2 j int
|
||||
select table_name, auto_increment from information_schema.tables
|
||||
where table_schema = 'test' and table_name in ('t1', 't2');
|
||||
where table_schema = 'test' and table_name in ('t1', 't2') order by table_name;
|
||||
table_name auto_increment
|
||||
t1 NULL
|
||||
t2 1
|
||||
|
@ -2000,7 +2010,7 @@ connect con12828477_2, localhost, root,,mysqltest;
|
|||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select table_name, auto_increment from information_schema.tables where table_schema='mysqltest';
|
||||
select table_name, auto_increment from information_schema.tables where table_schema='mysqltest' and table_name='t0' union select table_name, auto_increment from information_schema.tables where table_schema='mysqltest' and table_name<>'t0' order by table_name;
|
||||
connect con12828477_3, localhost, root,,mysqltest;
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
|
|
|
@ -11,7 +11,7 @@ create table t2 (x int);
|
|||
create table t3 (x int);
|
||||
create table t4 AS select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE' ;
|
||||
delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE');
|
||||
select * from t4;
|
||||
select * from t4 order by table_name;
|
||||
table_name
|
||||
t1
|
||||
t2
|
||||
|
|
|
@ -72,14 +72,14 @@ create function f2 () returns int return (select max(i) from t2);
|
|||
create view v2 as select f2();
|
||||
drop table t2;
|
||||
select table_name, table_type, table_comment from information_schema.tables
|
||||
where table_schema='test';
|
||||
where table_schema='test' order by table_name;
|
||||
table_name table_type table_comment
|
||||
t1 BASE TABLE
|
||||
v1 VIEW VIEW
|
||||
v2 VIEW VIEW
|
||||
drop table t1;
|
||||
select table_name, table_type, table_comment from information_schema.tables
|
||||
where table_schema='test';
|
||||
where table_schema='test' order by table_name;
|
||||
table_name table_type table_comment
|
||||
v1 VIEW VIEW
|
||||
v2 VIEW VIEW
|
||||
|
|
|
@ -10,18 +10,18 @@ TABLE_SCHEMA= "test";
|
|||
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
|
||||
def test PRIMARY test t1 PRIMARY KEY
|
||||
def test PRIMARY test t2 PRIMARY KEY
|
||||
def test PRIMARY test t3 PRIMARY KEY
|
||||
def test t2_ibfk_1 test t2 FOREIGN KEY
|
||||
def test t2_ibfk_2 test t2 FOREIGN KEY
|
||||
def test PRIMARY test t3 PRIMARY KEY
|
||||
def test t3_ibfk_1 test t3 FOREIGN KEY
|
||||
select * from information_schema.KEY_COLUMN_USAGE where
|
||||
TABLE_SCHEMA= "test";
|
||||
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
|
||||
def test PRIMARY def test t1 id 1 NULL NULL NULL NULL
|
||||
def test PRIMARY def test t2 id 1 NULL NULL NULL NULL
|
||||
def test PRIMARY def test t3 id 1 NULL NULL NULL NULL
|
||||
def test t2_ibfk_1 def test t2 t1_id 1 1 test t1 id
|
||||
def test t2_ibfk_2 def test t2 t1_id 1 1 test t1 id
|
||||
def test PRIMARY def test t3 id 1 NULL NULL NULL NULL
|
||||
def test t3_ibfk_1 def test t3 id 1 1 test t2 t1_id
|
||||
def test t3_ibfk_1 def test t3 t2_id 2 2 test t2 id
|
||||
drop table t3, t2, t1;
|
||||
|
@ -72,11 +72,12 @@ constraint fk_t1_1 foreign key (idtype) references `t-2` (id)
|
|||
use test;
|
||||
select referenced_table_schema, referenced_table_name
|
||||
from information_schema.key_column_usage
|
||||
where constraint_schema = 'db-1';
|
||||
where constraint_schema = 'db-1'
|
||||
order by referenced_table_schema, referenced_table_name;
|
||||
referenced_table_schema referenced_table_name
|
||||
NULL NULL
|
||||
db-1 t-2
|
||||
NULL NULL
|
||||
db-1 t-2
|
||||
drop database `db-1`;
|
||||
create table t1(id int primary key) engine = Innodb;
|
||||
create table t2(pid int, foreign key (pid) references t1(id)) engine = Innodb;
|
||||
|
|
|
@ -61,7 +61,7 @@ partition x2 values less than (5)
|
|||
( subpartition x21 tablespace t1,
|
||||
subpartition x22 tablespace t2)
|
||||
);
|
||||
select * from information_schema.partitions where table_schema="test";
|
||||
select * from information_schema.partitions where table_schema="test" order by table_name, partition_name;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
|
||||
def test t1 x1 x11 1 1 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default t1
|
||||
def test t1 x1 x12 1 2 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
|
|
|
@ -49,23 +49,23 @@ a b c
|
|||
5 0 30
|
||||
8 9 60
|
||||
INSERT t1 VALUES (2,1,11), (7,4,40) ON DUPLICATE KEY UPDATE c=c+VALUES(a);
|
||||
SELECT *, VALUES(a) FROM t1;
|
||||
a b c VALUES(a)
|
||||
SELECT *, VALUE(a) FROM t1;
|
||||
a b c VALUE(a)
|
||||
1 2 10 NULL
|
||||
3 4 127 NULL
|
||||
5 0 30 NULL
|
||||
8 9 60 NULL
|
||||
2 1 11 NULL
|
||||
explain extended SELECT *, VALUES(a) FROM t1;
|
||||
explain extended SELECT *, VALUE(a) FROM t1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,values(`test`.`t1`.`a`) AS `VALUES(a)` from `test`.`t1`
|
||||
explain extended select * from t1 where values(a);
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,value(`test`.`t1`.`a`) AS `VALUE(a)` from `test`.`t1`
|
||||
explain extended select * from t1 where value(a);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where values(`test`.`t1`.`a`)
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where value(`test`.`t1`.`a`)
|
||||
DROP TABLE t1;
|
||||
create table t1(a int primary key, b int);
|
||||
insert into t1 values(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
|
@ -160,8 +160,8 @@ a b c
|
|||
INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
|
||||
ERROR 23000: Column 'c' in field list is ambiguous
|
||||
INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=t1.c+VALUES(t1.a);
|
||||
SELECT *, VALUES(a) FROM t1;
|
||||
a b c VALUES(a)
|
||||
SELECT *, VALUE(a) FROM t1;
|
||||
a b c VALUE(a)
|
||||
1 2 10 NULL
|
||||
3 4 127 NULL
|
||||
5 0 30 NULL
|
||||
|
|
|
@ -689,3 +689,4 @@ View Create View character_set_client collation_connection
|
|||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union select `__3`.`c` AS `c`,`__3`.`d` AS `d` from ((select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__3` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
|
||||
drop view v1;
|
||||
drop tables t1,t2,t3;
|
||||
# End of 10.3 tests
|
||||
|
|
|
@ -2,7 +2,7 @@ install soname 'ha_blackhole';
|
|||
install soname 'ha_archive';
|
||||
create table t1 (a int) engine=blackhole;
|
||||
create table t2 (a int) engine=archive;
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t1
|
||||
|
@ -12,6 +12,7 @@ row_format Fixed
|
|||
table_rows 0
|
||||
data_length 0
|
||||
table_comment
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t2
|
||||
|
@ -24,7 +25,7 @@ table_comment
|
|||
flush tables;
|
||||
uninstall plugin blackhole;
|
||||
uninstall plugin archive;
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t1
|
||||
|
@ -34,6 +35,11 @@ row_format NULL
|
|||
table_rows NULL
|
||||
data_length NULL
|
||||
table_comment Unknown storage engine 'BLACKHOLE'
|
||||
Warnings:
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'BLACKHOLE'
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t2
|
||||
|
@ -46,9 +52,6 @@ table_comment Unknown storage engine 'ARCHIVE'
|
|||
Warnings:
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'BLACKHOLE'
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'ARCHIVE'
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
|
@ -110,7 +113,7 @@ Error : Unknown storage engine 'ARCHIVE'
|
|||
error : Corrupt
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t1
|
||||
|
@ -120,6 +123,11 @@ row_format NULL
|
|||
table_rows NULL
|
||||
data_length NULL
|
||||
table_comment Unknown storage engine 'BLACKHOLE'
|
||||
Warnings:
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'BLACKHOLE'
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t2
|
||||
|
@ -132,9 +140,6 @@ table_comment Unknown storage engine 'ARCHIVE'
|
|||
Warnings:
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'BLACKHOLE'
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'ARCHIVE'
|
||||
alter table mysql.user drop column default_role, drop column max_statement_time;
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
|
@ -197,7 +202,7 @@ Error : Unknown storage engine 'ARCHIVE'
|
|||
error : Corrupt
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t1
|
||||
|
@ -207,6 +212,11 @@ row_format NULL
|
|||
table_rows NULL
|
||||
data_length NULL
|
||||
table_comment Unknown storage engine 'BLACKHOLE'
|
||||
Warnings:
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'BLACKHOLE'
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t2
|
||||
|
@ -219,9 +229,6 @@ table_comment Unknown storage engine 'ARCHIVE'
|
|||
Warnings:
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'BLACKHOLE'
|
||||
Level Warning
|
||||
Code 1286
|
||||
Message Unknown storage engine 'ARCHIVE'
|
||||
alter table mysql.user drop column default_role, drop column max_statement_time;
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
|
@ -259,8 +266,8 @@ mysql.vtmd_template OK
|
|||
Upgrading from a version before MariaDB-10.1
|
||||
Phase 2/7: Installing used storage engines
|
||||
Checking for tables with unknown storage engine
|
||||
installing plugin for 'blackhole' storage engine
|
||||
installing plugin for 'archive' storage engine
|
||||
installing plugin for 'blackhole' storage engine
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
|
@ -276,7 +283,7 @@ test.t1 OK
|
|||
test.t2 OK
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test';
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t1
|
||||
|
@ -286,6 +293,7 @@ row_format Fixed
|
|||
table_rows 0
|
||||
data_length 0
|
||||
table_comment
|
||||
select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t2
|
||||
|
|
|
@ -334,6 +334,10 @@ The following options may be given as the first argument:
|
|||
Specifies a directory to add to the ignore list when
|
||||
collecting database names from the datadir. Put a blank
|
||||
argument to reset the list accumulated so far.
|
||||
--in-subquery-conversion-threshold[=#]
|
||||
The minimum number of scalar elements in the value list
|
||||
of IN predicate that triggers its conversion to IN
|
||||
subquery
|
||||
--init-connect=name Command(s) that are executed for each new connection
|
||||
(unless the user has SUPER privilege)
|
||||
--init-file=name Read SQL commands from this file at startup
|
||||
|
@ -475,8 +479,9 @@ The following options may be given as the first argument:
|
|||
file.Value can be between 0 and 11. Higher values mean
|
||||
more verbosity
|
||||
--long-query-time=# Log all queries that have taken more than long_query_time
|
||||
seconds to execute to file. The argument will be treated
|
||||
as a decimal value with microsecond precision
|
||||
seconds to execute to the slow query log file. The
|
||||
argument will be treated as a decimal value with
|
||||
microsecond precision
|
||||
--low-priority-updates
|
||||
INSERT/DELETE/UPDATE has lower priority than selects
|
||||
--lower-case-table-names[=#]
|
||||
|
@ -1354,6 +1359,7 @@ idle-transaction-timeout 0
|
|||
idle-write-transaction-timeout 0
|
||||
ignore-builtin-innodb FALSE
|
||||
ignore-db-dirs
|
||||
in-subquery-conversion-threshold 1000
|
||||
init-connect
|
||||
init-file (No default value)
|
||||
init-rpl-role MASTER
|
||||
|
@ -1490,7 +1496,7 @@ performance-schema-max-rwlock-classes 40
|
|||
performance-schema-max-rwlock-instances -1
|
||||
performance-schema-max-socket-classes 10
|
||||
performance-schema-max-socket-instances -1
|
||||
performance-schema-max-stage-classes 150
|
||||
performance-schema-max-stage-classes 160
|
||||
performance-schema-max-statement-classes 191
|
||||
performance-schema-max-table-handles -1
|
||||
performance-schema-max-table-instances -1
|
||||
|
|
616
mysql-test/r/opt_tvc.result
Normal file
616
mysql-test/r/opt_tvc.result
Normal file
|
@ -0,0 +1,616 @@
|
|||
create table t1 (a int, b int);
|
||||
insert into t1
|
||||
values (1,2), (4,6), (9,7),
|
||||
(1,1), (2,5), (7,8);
|
||||
create table t2 (a int, b int, c int);
|
||||
insert into t2
|
||||
values (1,2,3), (5,1,2), (4,3,7),
|
||||
(8,9,0), (10,7,1), (5,5,1);
|
||||
create table t3 (a int, b varchar(16), index idx(a));
|
||||
insert into t3 values
|
||||
(1, "abc"), (3, "egh"), (8, "axxx"), (10, "abc"),
|
||||
(2, "ccw"), (8, "wqqe"), (7, "au"), (9, "waa"),
|
||||
(3, "rass"), (9, "ert"), (9, "lok"), (8, "aww"),
|
||||
(1, "todd"), (3, "rew"), (8, "aww"), (3, "sw"),
|
||||
(11, "llk"), (7, "rbw"), (1, "sm"), (2, "jyp"),
|
||||
(4, "yq"), (5, "pled"), (12, "ligin"), (12, "toww"),
|
||||
(6, "mxm"), (15, "wanone"), (9, "sunqq"), (2, "abe");
|
||||
# optimization is not used
|
||||
select * from t1 where a in (1,2);
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
explain extended select * from t1 where a in (1,2);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` in (1,2)
|
||||
# set minimum number of values in VALUEs list when optimization works to 2
|
||||
set @@in_subquery_conversion_threshold= 2;
|
||||
# single IN-predicate in WHERE-part
|
||||
select * from t1 where a in (1,2);
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
select * from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2)) as tvc_0
|
||||
);
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
explain extended select * from t1 where a in (1,2);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
explain extended select * from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2)) as tvc_0
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
# AND-condition with IN-predicates in WHERE-part
|
||||
select * from t1
|
||||
where a in (1,2) and
|
||||
b in (1,5);
|
||||
a b
|
||||
1 1
|
||||
2 5
|
||||
select * from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2)) as tvc_0
|
||||
)
|
||||
and b in
|
||||
(
|
||||
select *
|
||||
from (values (1),(5)) as tvc_1
|
||||
);
|
||||
a b
|
||||
1 1
|
||||
2 5
|
||||
explain extended select * from t1
|
||||
where a in (1,2) and
|
||||
b in (1,5);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery4> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
4 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 2 100.00
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) semi join ((values (1),(5)) `tvc_1`) where `test`.`t1`.`b` = `tvc_1`.`1`
|
||||
explain extended select * from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2)) as tvc_0
|
||||
)
|
||||
and b in
|
||||
(
|
||||
select *
|
||||
from (values (1),(5)) as tvc_1
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery4> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
4 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 2 100.00
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) semi join ((values (1),(5)) `tvc_1`) where `test`.`t1`.`b` = `tvc_1`.`1`
|
||||
# subquery with IN-predicate
|
||||
select * from t1
|
||||
where a in
|
||||
(
|
||||
select a
|
||||
from t2 where b in (3,4)
|
||||
);
|
||||
a b
|
||||
4 6
|
||||
select * from t1
|
||||
where a in
|
||||
(
|
||||
select a from t2
|
||||
where b in
|
||||
(
|
||||
select *
|
||||
from (values (3),(4)) as tvc_0
|
||||
)
|
||||
);
|
||||
a b
|
||||
4 6
|
||||
explain extended select * from t1
|
||||
where a in
|
||||
(
|
||||
select a
|
||||
from t2 where b in (3,4)
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
2 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (3),(4)) `tvc_0` join `test`.`t2`) where `test`.`t2`.`b` = `tvc_0`.`3`
|
||||
explain extended select * from t1
|
||||
where a in
|
||||
(
|
||||
select a from t2
|
||||
where b in
|
||||
(
|
||||
select *
|
||||
from (values (3),(4)) as tvc_0
|
||||
)
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
2 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (3),(4)) `tvc_0` join `test`.`t2`) where `test`.`t2`.`b` = `tvc_0`.`3`
|
||||
# derived table with IN-predicate
|
||||
select * from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2)
|
||||
) as dr_table;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
select * from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
) as dr_table;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
explain extended select * from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2)
|
||||
) as dr_table;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
explain extended select * from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
) as dr_table;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
# non-recursive CTE with IN-predicate
|
||||
with tvc_0 as
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2)
|
||||
)
|
||||
select * from tvc_0;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
select * from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
) as dr_table;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
explain extended with tvc_0 as
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2)
|
||||
)
|
||||
select * from tvc_0;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 with tvc_0 as (/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` in (1,2))/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
explain extended select * from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
) as dr_table;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
# VIEW with IN-predicate
|
||||
create view v1 as
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2);
|
||||
create view v2 as
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
;
|
||||
select * from v1;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
select * from v2;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
explain extended select * from v1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
explain extended select * from v2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
drop view v1,v2;
|
||||
# subselect defined by derived table with IN-predicate
|
||||
select * from t1
|
||||
where a in
|
||||
(
|
||||
select 1
|
||||
from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2)
|
||||
)
|
||||
as dr_table
|
||||
);
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
select * from t1
|
||||
where a in
|
||||
(
|
||||
select 1
|
||||
from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
)
|
||||
as dr_table
|
||||
);
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
explain extended select * from t1
|
||||
where a in
|
||||
(
|
||||
select 1
|
||||
from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in (1,2)
|
||||
)
|
||||
as dr_table
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
2 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 2 100.00
|
||||
2 MATERIALIZED t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0` join `test`.`t1`) where `test`.`t1`.`a` = 1 and `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
explain extended select * from t1
|
||||
where a in
|
||||
(
|
||||
select 1
|
||||
from
|
||||
(
|
||||
select *
|
||||
from t1
|
||||
where a in
|
||||
(
|
||||
select *
|
||||
from (values (1),(2))
|
||||
as tvc_0
|
||||
)
|
||||
)
|
||||
as dr_table
|
||||
);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
2 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 2 100.00
|
||||
2 MATERIALIZED t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0` join `test`.`t1`) where `test`.`t1`.`a` = 1 and `test`.`t1`.`a` = `tvc_0`.`1`
|
||||
# derived table with IN-predicate and group by
|
||||
select * from
|
||||
(
|
||||
select max(a),b
|
||||
from t1
|
||||
where b in (3,5)
|
||||
group by b
|
||||
) as dr_table;
|
||||
max(a) b
|
||||
2 5
|
||||
select * from
|
||||
(
|
||||
select max(a),b
|
||||
from t1
|
||||
where b in
|
||||
(
|
||||
select *
|
||||
from (values (3),(5))
|
||||
as tvc_0
|
||||
)
|
||||
group by b
|
||||
) as dr_table;
|
||||
max(a) b
|
||||
2 5
|
||||
explain extended select * from
|
||||
(
|
||||
select max(a),b
|
||||
from t1
|
||||
where b in (3,5)
|
||||
group by b
|
||||
) as dr_table;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 100.00
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 6 100.00 Using temporary; Using filesort
|
||||
2 DERIVED <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `dr_table`.`max(a)` AS `max(a)`,`dr_table`.`b` AS `b` from (/* select#2 */ select max(`test`.`t1`.`a`) AS `max(a)`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (3),(5)) `tvc_0`) where 1 group by `test`.`t1`.`b`) `dr_table`
|
||||
explain extended select * from
|
||||
(
|
||||
select max(a),b
|
||||
from t1
|
||||
where b in
|
||||
(
|
||||
select *
|
||||
from (values (3),(5))
|
||||
as tvc_0
|
||||
)
|
||||
group by b
|
||||
) as dr_table;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 100.00
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 6 100.00 Using temporary; Using filesort
|
||||
2 DERIVED <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00
|
||||
3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00
|
||||
4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `dr_table`.`max(a)` AS `max(a)`,`dr_table`.`b` AS `b` from (/* select#2 */ select max(`test`.`t1`.`a`) AS `max(a)`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (3),(5)) `tvc_0`) where 1 group by `test`.`t1`.`b`) `dr_table`
|
||||
# prepare statement
|
||||
prepare stmt from "select * from t1 where a in (1,2)";
|
||||
execute stmt;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
execute stmt;
|
||||
a b
|
||||
1 2
|
||||
1 1
|
||||
2 5
|
||||
deallocate prepare stmt;
|
||||
# use inside out access from tvc rows
|
||||
set @@in_subquery_conversion_threshold= default;
|
||||
select * from t3 where a in (1,4,10);
|
||||
a b
|
||||
1 abc
|
||||
1 todd
|
||||
1 sm
|
||||
4 yq
|
||||
10 abc
|
||||
explain extended select * from t3 where a in (1,4,10);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 range idx idx 5 NULL 5 100.00 Using index condition
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t3` where `test`.`t3`.`a` in (1,4,10)
|
||||
set @@in_subquery_conversion_threshold= 2;
|
||||
select * from t3 where a in (1,4,10);
|
||||
a b
|
||||
1 abc
|
||||
1 todd
|
||||
1 sm
|
||||
4 yq
|
||||
10 abc
|
||||
explain extended select * from t3 where a in (1,4,10);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t3 ref idx idx 5 tvc_0.1 3 100.00
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t3` semi join ((values (1),(4),(10)) `tvc_0`) where `test`.`t3`.`a` = `tvc_0`.`1`
|
||||
# use vectors in IN predeicate
|
||||
set @@in_subquery_conversion_threshold= 4;
|
||||
select * from t1 where (a,b) in ((1,2),(3,4));
|
||||
a b
|
||||
1 2
|
||||
explain extended select * from t1 where (a,b) in ((1,2),(3,4));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1,2),(3,4)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1` and `test`.`t1`.`b` = `tvc_0`.`2`
|
||||
set @@in_subquery_conversion_threshold= 2;
|
||||
# trasformation works for the one IN predicate and doesn't work for the other
|
||||
set @@in_subquery_conversion_threshold= 5;
|
||||
select * from t2
|
||||
where (a,b) in ((1,2),(8,9)) and
|
||||
(a,c) in ((1,3),(8,0),(5,1));
|
||||
a b c
|
||||
1 2 3
|
||||
8 9 0
|
||||
explain extended select * from t2
|
||||
where (a,b) in ((1,2),(8,9)) and
|
||||
(a,c) in ((1,3),(8,0),(5,1));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` semi join ((values (1,3),(8,0),(5,1)) `tvc_0`) where `test`.`t2`.`a` = `tvc_0`.`1` and `test`.`t2`.`c` = `tvc_0`.`3` and (`tvc_0`.`1`,`test`.`t2`.`b`) in (<cache>((1,2)),<cache>((8,9)))
|
||||
set @@in_subquery_conversion_threshold= 2;
|
||||
#
|
||||
# mdev-14281: conversion of NOT IN predicate into subquery predicate
|
||||
#
|
||||
select * from t1
|
||||
where (a,b) not in ((1,2),(8,9), (5,1));
|
||||
a b
|
||||
4 6
|
||||
9 7
|
||||
1 1
|
||||
2 5
|
||||
7 8
|
||||
select * from t1
|
||||
where (a,b) not in (select * from (values (1,2),(8,9), (5,1)) as tvc_0);
|
||||
a b
|
||||
4 6
|
||||
9 7
|
||||
1 1
|
||||
2 5
|
||||
7 8
|
||||
explain extended select * from t1
|
||||
where (a,b) not in ((1,2),(8,9), (5,1));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`))))
|
||||
explain extended select * from t1
|
||||
where (a,b) not in (select * from (values (1,2),(8,9), (5,1)) as tvc_0);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`))))
|
||||
select * from t1
|
||||
where b < 7 and (a,b) not in ((1,2),(8,9), (5,1));
|
||||
a b
|
||||
4 6
|
||||
1 1
|
||||
2 5
|
||||
explain extended select * from t1
|
||||
where b < 7 and (a,b) not in ((1,2),(8,9), (5,1));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` < 7 and !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`))))
|
||||
select * from t2
|
||||
where (a,c) not in ((1,2),(8,9), (5,1));
|
||||
a b c
|
||||
1 2 3
|
||||
5 1 2
|
||||
4 3 7
|
||||
8 9 0
|
||||
10 7 1
|
||||
explain extended select * from t2
|
||||
where (a,c) not in ((1,2),(8,9), (5,1));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00
|
||||
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where !<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`c`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`c`),(`test`.`t2`.`a`,`test`.`t2`.`c`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t2`.`a` in <temporary table> on distinct_key where `test`.`t2`.`a` = `<subquery2>`.`1` and `test`.`t2`.`c` = `<subquery2>`.`2`))))
|
||||
drop table t1, t2, t3;
|
||||
set @@in_subquery_conversion_threshold= default;
|
|
@ -40,7 +40,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -76,7 +77,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -124,7 +126,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -184,7 +187,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -244,7 +248,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -304,7 +309,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -361,7 +367,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
@ -418,7 +425,8 @@ Create Table CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
|
||||
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
|
||||
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2')
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_NAME t1
|
||||
TABLE_TYPE BASE TABLE
|
||||
ENGINE InnoDB
|
||||
|
|
|
@ -4795,7 +4795,7 @@ EXECUTE IMMEDIATE MAX('SELECT 1 AS c');
|
|||
ERROR HY000: Invalid use of group function
|
||||
EXECUTE IMMEDIATE DEFAULT(a);
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
EXECUTE IMMEDIATE VALUES(a);
|
||||
EXECUTE IMMEDIATE VALUE(a);
|
||||
ERROR 42S22: Unknown column 'a' in 'field list'
|
||||
CREATE FUNCTION f1() RETURNS VARCHAR(64) RETURN 't1';
|
||||
EXECUTE IMMEDIATE f1();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
set in_subquery_conversion_threshold=10000;
|
||||
drop table if exists t1, t2, t3, t10, t100;
|
||||
CREATE TABLE t1 (
|
||||
event_date date DEFAULT '0000-00-00' NOT NULL,
|
||||
|
@ -3006,3 +3007,4 @@ drop table t1,t2,t3;
|
|||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
set in_subquery_conversion_threshold=default;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
set @mrr_icp_extra_tmp=@@optimizer_switch;
|
||||
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
|
||||
set in_subquery_conversion_threshold=10000;
|
||||
drop table if exists t1, t2, t3, t10, t100;
|
||||
CREATE TABLE t1 (
|
||||
event_date date DEFAULT '0000-00-00' NOT NULL,
|
||||
|
@ -3018,4 +3019,5 @@ drop table t1,t2,t3;
|
|||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
set in_subquery_conversion_threshold=default;
|
||||
set optimizer_switch=@mrr_icp_extra_tmp;
|
||||
|
|
|
@ -400,7 +400,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 SUBQUERY customer ALL NULL NULL NULL NULL 150 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,<expr_cache><`dbt3_s001`.`customer`.`c_custkey`>(exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal
|
||||
from (
|
||||
select substr(c_phone, 1, 2) as cntrycode, c_acctbal
|
||||
|
@ -441,7 +441,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 SUBQUERY customer ALL NULL NULL NULL NULL 150 91.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,<expr_cache><`dbt3_s001`.`customer`.`c_custkey`>(exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal
|
||||
from (
|
||||
select substr(c_phone, 1, 2) as cntrycode, c_acctbal
|
||||
|
|
|
@ -403,7 +403,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 SUBQUERY customer ALL NULL NULL NULL NULL 150 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,<expr_cache><`dbt3_s001`.`customer`.`c_custkey`>(exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal
|
||||
from (
|
||||
select substr(c_phone, 1, 2) as cntrycode, c_acctbal
|
||||
|
@ -444,7 +444,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 SUBQUERY customer ALL NULL NULL NULL NULL 150 91.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'dbt3_s001.customer.c_custkey' of SELECT #4 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`)) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
Note 1003 /* select#1 */ select substr(`dbt3_s001`.`customer`.`c_phone`,1,2) AS `cntrycode`,count(0) AS `numcust`,sum(`dbt3_s001`.`customer`.`c_acctbal`) AS `totacctbal` from `dbt3_s001`.`customer` where substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25') and `dbt3_s001`.`customer`.`c_acctbal` > (/* select#3 */ select avg(`dbt3_s001`.`customer`.`c_acctbal`) from `dbt3_s001`.`customer` where `dbt3_s001`.`customer`.`c_acctbal` > 0.00 and substr(`dbt3_s001`.`customer`.`c_phone`,1,2) in ('10','20','14','19','11','28','25')) and !<in_optimizer>(1,<expr_cache><`dbt3_s001`.`customer`.`c_custkey`>(exists(/* select#4 */ select 1 from `dbt3_s001`.`orders` where `dbt3_s001`.`orders`.`o_custkey` = `dbt3_s001`.`customer`.`c_custkey`))) group by substr(`dbt3_s001`.`customer`.`c_phone`,1,2) order by substr(`dbt3_s001`.`customer`.`c_phone`,1,2)
|
||||
select cntrycode, count(*) as numcust, sum(c_acctbal) as totacctbal
|
||||
from (
|
||||
select substr(c_phone, 1, 2) as cntrycode, c_acctbal
|
||||
|
|
|
@ -4,7 +4,7 @@ drop table if exists t0, t1;
|
|||
select * from performance_schema.setup_instruments where name like '%show_explain%';
|
||||
NAME ENABLED TIMED
|
||||
wait/synch/cond/sql/show_explain YES YES
|
||||
stage/sql/show explain YES YES
|
||||
stage/sql/Show explain YES YES
|
||||
statement/sql/show_explain YES YES
|
||||
# We've got no instances
|
||||
select * from performance_schema.cond_instances where name like '%show_explain%';
|
||||
|
@ -38,5 +38,5 @@ thread_id in(select thread_id
|
|||
from performance_schema.events_statements_history_long
|
||||
where EVENT_NAME='statement/sql/show_explain');
|
||||
event_name
|
||||
stage/sql/show explain
|
||||
stage/sql/Show explain
|
||||
drop table t0;
|
||||
|
|
|
@ -4440,7 +4440,7 @@ create table t3 (id int not null primary key, county varchar(25))|
|
|||
insert into t3 (id, county) values (1, 'York')|
|
||||
create procedure bug15441(c varchar(25))
|
||||
begin
|
||||
update t3 set id=2, county=values(c);
|
||||
update t3 set id=2, county=value(c);
|
||||
end|
|
||||
call bug15441('county')|
|
||||
ERROR 42S22: Unknown column 'c' in 'field list'
|
||||
|
@ -4451,7 +4451,7 @@ declare c varchar(25) default "hello";
|
|||
insert into t3 (id, county) values (1, county)
|
||||
on duplicate key update county= values(county);
|
||||
select * from t3;
|
||||
update t3 set id=2, county=values(id);
|
||||
update t3 set id=2, county=value(id);
|
||||
select * from t3;
|
||||
end|
|
||||
call bug15441('Yale')|
|
||||
|
@ -4810,8 +4810,8 @@ select routine_name,routine_schema from information_schema.routines where
|
|||
routine_schema like 'bug18344%'|
|
||||
routine_name routine_schema
|
||||
bug18344 bug18344_012345678901
|
||||
bug18344_2 bug18344_012345678901
|
||||
bug18344 bug18344_0123456789012
|
||||
bug18344_2 bug18344_012345678901
|
||||
bug18344_2 bug18344_0123456789012
|
||||
drop database bug18344_012345678901|
|
||||
drop database bug18344_0123456789012|
|
||||
|
|
|
@ -386,6 +386,29 @@ Handler_tmp_write 2
|
|||
Handler_update 0
|
||||
Handler_write 0
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-11153 - Introduce status variables for table cache monitoring and
|
||||
# tuning
|
||||
#
|
||||
SET @old_table_open_cache= @@table_open_cache;
|
||||
SET @@global.table_open_cache=10;
|
||||
FLUSH TABLES;
|
||||
FLUSH STATUS;
|
||||
SHOW STATUS LIKE 'Table_open_cache%';
|
||||
Variable_name Value
|
||||
Table_open_cache_active_instances 1
|
||||
Table_open_cache_hits 0
|
||||
Table_open_cache_misses 0
|
||||
Table_open_cache_overflows 0
|
||||
SHOW STATUS LIKE 'Table_open_cache%';
|
||||
Variable_name Value
|
||||
Table_open_cache_active_instances 1
|
||||
Table_open_cache_hits 30
|
||||
Table_open_cache_misses 15
|
||||
Table_open_cache_overflows 5
|
||||
FLUSH TABLES;
|
||||
FLUSH STATUS;
|
||||
SET @@global.table_open_cache= @old_table_open_cache;
|
||||
connection default;
|
||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||
SET GLOBAL log_output = @old_log_output;
|
||||
|
|
|
@ -934,5 +934,42 @@ f2
|
|||
foo
|
||||
set optimizer_switch= @optimizer_switch_save;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-14164: Unknown column error when adding aggregate to function
|
||||
# in oracle style procedure FOR loop
|
||||
#
|
||||
CREATE TABLE t1(id INT, val INT);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE cur1 CURSOR FOR SELECT * FROM (
|
||||
SELECT DISTINCT id FROM t1) a
|
||||
WHERE NOT EXISTS (SELECT * FROM ( SELECT id FROM t1) b
|
||||
WHERE a.id=b.id);
|
||||
OPEN cur1;
|
||||
CLOSE cur1;
|
||||
OPEN cur1;
|
||||
CLOSE cur1;
|
||||
END;
|
||||
//
|
||||
CALL p1();
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(id INT, val INT);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
SELECT * FROM (SELECT DISTINCT id FROM t1) a
|
||||
WHERE NOT a.id IN (SELECT b.id FROM t1 b);
|
||||
SELECT * FROM (SELECT DISTINCT id FROM t1) a
|
||||
WHERE NOT EXISTS (SELECT * FROM t1 b WHERE a.id=b.id);
|
||||
END;
|
||||
//
|
||||
CALL p1();
|
||||
id
|
||||
id
|
||||
CALL p1();
|
||||
id
|
||||
id
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
# End of 10.0 tests
|
||||
set optimizer_switch=default;
|
||||
|
|
|
@ -2800,8 +2800,8 @@ CREATE TABLE t1 (db VARCHAR(64) DEFAULT NULL);
|
|||
INSERT INTO t1 VALUES ('mysql'),('information_schema');
|
||||
SELECT * FROM t1 WHERE db IN (SELECT `SCHEMA_NAME` FROM information_schema.SCHEMATA);
|
||||
db
|
||||
mysql
|
||||
information_schema
|
||||
mysql
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-5581: Server crashes in in JOIN::prepare on 2nd execution of PS with materialization+semijoin
|
||||
|
|
|
@ -143,7 +143,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.a2.id 2 100.00 Using index
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.a2.id' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t2` `a2` where `f`.`id` = `a2`.`id` and `a2`.`attr2` between 12 and 14 and `a2`.`fromdate` = (/* select#3 */ select max(`test`.`t2`.`fromdate`) from `test`.`t2` where `test`.`t2`.`id` = `a2`.`id`)
|
||||
Note 1003 /* select#1 */ select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t2` `a2` where `f`.`id` = `a2`.`id` and `a2`.`attr2` between 12 and 14 and `a2`.`fromdate` = <expr_cache><`a2`.`id`>((/* select#3 */ select max(`test`.`t2`.`fromdate`) from `test`.`t2` where `test`.`t2`.`id` = `a2`.`id`))
|
||||
This should use one table:
|
||||
explain select id from v2 where id=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -171,7 +171,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ref PRIMARY PRIMARY 4 test.f.id 2 100.00 Using index
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.f.id' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t2` `a2` where `f`.`id` = `a2`.`id` and `a2`.`attr2` between 12 and 14 and `a2`.`fromdate` = (/* select#3 */ select max(`test`.`t2`.`fromdate`) from `test`.`t2` where `test`.`t2`.`id` = `f`.`id`)
|
||||
Note 1003 /* select#1 */ select `f`.`id` AS `id` from `test`.`t0` `f` join `test`.`t2` `a2` where `f`.`id` = `a2`.`id` and `a2`.`attr2` between 12 and 14 and `a2`.`fromdate` = <expr_cache><`f`.`id`>((/* select#3 */ select max(`test`.`t2`.`fromdate`) from `test`.`t2` where `test`.`t2`.`id` = `f`.`id`))
|
||||
drop view v1, v2;
|
||||
drop table t0, t1, t2;
|
||||
create table t1 (a int);
|
||||
|
|
2073
mysql-test/r/table_value_constr.result
Normal file
2073
mysql-test/r/table_value_constr.result
Normal file
File diff suppressed because it is too large
Load diff
|
@ -2125,7 +2125,7 @@ SHOW TRIGGERS IN db1;
|
|||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
trg1 INSERT t2 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERTINTOt1 VALUES (1) BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
INSERT INTO t2 VALUES (1);
|
||||
ERROR 42000: Trigger 'trg1' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VALUES (1)' at line 1'
|
||||
ERROR 42000: Trigger 'trg1' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(1)' at line 1'
|
||||
SELECT * FROM t1;
|
||||
b
|
||||
# Work around Bug#45235
|
||||
|
|
|
@ -806,3 +806,27 @@ SUM(a)
|
|||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8867 Wrong field type or metadata for COALESCE(bit_column, 1)
|
||||
#
|
||||
CREATE TABLE t1 (val bit(1));
|
||||
INSERT INTO t1 VALUES (0);
|
||||
CREATE TABLE t2 AS SELECT COALESCE(val, 1) AS c FROM t1;
|
||||
SELECT * FROM t2;
|
||||
c
|
||||
0
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`c` decimal(1,0) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t2;
|
||||
SELECT COALESCE(val, 1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def COALESCE(val, 1) 246 2 1 Y 32896 0 63
|
||||
COALESCE(val, 1)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -852,6 +852,17 @@ Warning 1292 Incorrect datetime value: '1'
|
|||
Warning 1292 Incorrect datetime value: '1'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison
|
||||
#
|
||||
CREATE TABLE t1 (d DATE);
|
||||
INSERT INTO t1 VALUES ('1985-05-13'),('1989-12-24');
|
||||
SELECT d, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP HAVING CASE d WHEN '2017-05-25' THEN 0 ELSE 1 END;
|
||||
d COUNT(*)
|
||||
1985-05-13 1
|
||||
1989-12-24 1
|
||||
NULL 2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -1245,6 +1245,20 @@ a b c
|
|||
2070 00:00:00 00:00:00
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-10817 CAST(MAX(DATE'2001-01-01') AS TIME) returns a wrong result
|
||||
#
|
||||
SELECT CAST(DATE'2001-01-01' AS TIME);
|
||||
CAST(DATE'2001-01-01' AS TIME)
|
||||
00:00:00
|
||||
SELECT CAST(MAX(DATE'2001-01-01') AS TIME);
|
||||
CAST(MAX(DATE'2001-01-01') AS TIME)
|
||||
00:00:00
|
||||
CREATE FUNCTION f1() RETURNS DATE RETURN DATE'2001-01-01';
|
||||
SELECT CAST(f1() AS TIME);
|
||||
CAST(f1() AS TIME)
|
||||
00:00:00
|
||||
DROP FUNCTION f1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -1624,7 +1624,7 @@ set session collation_database=2048;
|
|||
ERROR HY000: Unknown collation: '2048'
|
||||
set session rand_seed1=DEFAULT;
|
||||
ERROR 42000: Variable 'rand_seed1' doesn't have a default value
|
||||
set autocommit = values(v);
|
||||
set autocommit = value(v);
|
||||
ERROR 42S22: Unknown column 'v' in 'field list'
|
||||
set session sql_mode=ansi_quotes;
|
||||
select * from information_schema.session_variables where variable_name='sql_mode';
|
||||
|
|
|
@ -5637,7 +5637,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,(/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`) AS `c` from `test`.`t1`
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>((/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t1`
|
||||
select * from v1;
|
||||
a c
|
||||
1 2
|
||||
|
@ -5654,7 +5654,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`) AS `c` from `test`.`t2` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`a`
|
||||
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>((/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t2` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`a`
|
||||
select * from t2, v1 where t2.a=v1.a;
|
||||
a b a c
|
||||
1 2 1 2
|
||||
|
@ -5673,7 +5673,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`) AS `c` from `test`.`t1` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t1`.`a`
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>((/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t1` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t1`.`a`
|
||||
select * from t1, v1 where t1.a=v1.a;
|
||||
a b a c
|
||||
1 2 1 2
|
||||
|
@ -5692,7 +5692,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`) AS `c` from `test`.`t1` join `test`.`t1` where `test`.`t1`.`b` = (/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`)
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>((/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t1` join `test`.`t1` where `test`.`t1`.`b` = <expr_cache><`test`.`t1`.`a`>((/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`))
|
||||
select * from t1, v1 where t1.b=v1.c;
|
||||
a b a c
|
||||
1 2 1 2
|
||||
|
@ -5710,7 +5710,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||
3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 6 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,(/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`) AS `c` from `test`.`t2` join `test`.`t1` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`a` = `test`.`t2`.`a`
|
||||
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,<expr_cache><`test`.`t1`.`a`>((/* select#3 */ select max(`test`.`t2`.`b`) from `test`.`t2` where `test`.`t1`.`a` = `test`.`t2`.`a`)) AS `c` from `test`.`t2` join `test`.`t1` join `test`.`t1` where `test`.`t1`.`a` = `test`.`t2`.`a` and `test`.`t1`.`a` = `test`.`t2`.`a`
|
||||
select * from t2, t1, v1 where t1.a=t2.a and t1.a=v1.a;
|
||||
a b a b a c
|
||||
1 2 1 2 1 2
|
||||
|
|
326
mysql-test/r/win_percentile.result
Normal file
326
mysql-test/r/win_percentile.result
Normal file
|
@ -0,0 +1,326 @@
|
|||
CREATE TABLE t1 (name CHAR(10), test double, score DECIMAL(19,4));
|
||||
INSERT INTO t1 VALUES
|
||||
('Chun', 0, 3), ('Chun', 0, 7),
|
||||
('Kaolin', 0.5, 3), ('Kaolin', 0.6, 7),
|
||||
('Kaolin', 0.5, 4),
|
||||
('Tatiana', 0.8, 4), ('Tata', 0.8, 4);
|
||||
#
|
||||
# Test invalid syntax
|
||||
#
|
||||
# Order by clause has more than one element
|
||||
select percentile_disc(0.5) within group(order by score,test) over (partition by name) from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'test) over (partition by name) from t1' at line 1
|
||||
select percentile_cont(0.5) within group(order by score,test) over (partition by name) from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'test) over (partition by name) from t1' at line 1
|
||||
# Order by clause has no element
|
||||
select percentile_disc(0.5) within group() over (partition by name) from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') over (partition by name) from t1' at line 1
|
||||
select percentile_cont(0.5) within group() over (partition by name) from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') over (partition by name) from t1' at line 1
|
||||
# No parameters to the percentile functions
|
||||
select percentile_disc() within group() over (partition by name) from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') within group() over (partition by name) from t1' at line 1
|
||||
select percentile_cont() within group() over (partition by name) from t1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') within group() over (partition by name) from t1' at line 1
|
||||
#
|
||||
# Test simple syntax
|
||||
#
|
||||
select name, percentile_cont(0.5) within group(order by score) over (partition by name) as c from t1;
|
||||
name c
|
||||
Chun 5.0000000000
|
||||
Chun 5.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
select name, percentile_disc(0.5) within group(order by score) over (partition by name) as c from t1;
|
||||
name c
|
||||
Chun 3.0000000000
|
||||
Chun 3.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
# no partition clause
|
||||
select name, percentile_disc(0.5) within group(order by score) over () from t1;
|
||||
name percentile_disc(0.5) within group(order by score) over ()
|
||||
Chun 4.0000000000
|
||||
Chun 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
select name, percentile_cont(0.5) within group(order by score) over () from t1;
|
||||
name percentile_cont(0.5) within group(order by score) over ()
|
||||
Chun 4.0000000000
|
||||
Chun 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
# argument set to null
|
||||
select name, percentile_cont(null) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: percentile_cont function only accepts arguments that can be converted to numerical types
|
||||
select name, percentile_disc(null) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: percentile_disc function only accepts arguments that can be converted to numerical types
|
||||
#subqueries having percentile functions
|
||||
select * from ( select name , percentile_cont(0.5) within group ( order by score) over (partition by name ) from t1 ) as t;
|
||||
name percentile_cont(0.5) within group ( order by score) over (partition by name )
|
||||
Chun 5.0000000000
|
||||
Chun 5.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
select * from ( select name , percentile_disc(0.5) within group ( order by score) over (partition by name ) from t1 ) as t;
|
||||
name percentile_disc(0.5) within group ( order by score) over (partition by name )
|
||||
Chun 3.0000000000
|
||||
Chun 3.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
select name from t1 a where (select percentile_disc(0.5) within group (order by score) over (partition by name) from t1 b limit 1) >= 0.5;
|
||||
name
|
||||
Chun
|
||||
Chun
|
||||
Kaolin
|
||||
Kaolin
|
||||
Kaolin
|
||||
Tatiana
|
||||
Tata
|
||||
#disallowed fields in order by
|
||||
select score, percentile_cont(0.5) within group(order by name) over (partition by score) from t1;
|
||||
ERROR HY000: Numeric datatype is required for percentile_cont function
|
||||
select score, percentile_disc(0.5) within group(order by name) over (partition by score) from t1;
|
||||
ERROR HY000: Numeric datatype is required for percentile_disc function
|
||||
#parameter value should be in the range of [0,1]
|
||||
select percentile_disc(1.5) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: Argument to the percentile_disc function does not belong to the range [0,1]
|
||||
select percentile_cont(1.5) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: Argument to the percentile_cont function does not belong to the range [0,1]
|
||||
#Argument should remain constant for the entire partition
|
||||
select name,percentile_cont(test) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: Argument to the percentile_cont function is not a constant for a partition
|
||||
select name, percentile_disc(test) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: Argument to the percentile_disc function is not a constant for a partition
|
||||
#only numerical types are allowed as argument to percentile functions
|
||||
select name, percentile_cont(name) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: percentile_cont function only accepts arguments that can be converted to numerical types
|
||||
select name, percentile_disc(name) within group(order by score) over (partition by name) from t1;
|
||||
ERROR HY000: percentile_disc function only accepts arguments that can be converted to numerical types
|
||||
#complete query with partition column
|
||||
select name,cume_dist() over (partition by name order by score), percentile_disc(0.5) within group(order by score) over (partition by name) as c from t1;
|
||||
name cume_dist() over (partition by name order by score) c
|
||||
Chun 0.5000000000 3.0000000000
|
||||
Chun 1.0000000000 3.0000000000
|
||||
Kaolin 0.3333333333 4.0000000000
|
||||
Kaolin 1.0000000000 4.0000000000
|
||||
Kaolin 0.6666666667 4.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name, percentile_cont(0.5) within group(order by score) over (partition by name) as c from t1;
|
||||
name c
|
||||
Chun 5.0000000000
|
||||
Chun 5.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Kaolin 4.0000000000
|
||||
Tatiana 4.0000000000
|
||||
Tata 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.1) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 3.0000000000
|
||||
Chun 1.0000000000 3.0000000000
|
||||
Kaolin 0.3333333333 3.0000000000
|
||||
Kaolin 1.0000000000 3.0000000000
|
||||
Kaolin 0.6666666667 3.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.2) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 3.0000000000
|
||||
Chun 1.0000000000 3.0000000000
|
||||
Kaolin 0.3333333333 3.0000000000
|
||||
Kaolin 1.0000000000 3.0000000000
|
||||
Kaolin 0.6666666667 3.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.3) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 3.0000000000
|
||||
Chun 1.0000000000 3.0000000000
|
||||
Kaolin 0.3333333333 3.0000000000
|
||||
Kaolin 1.0000000000 3.0000000000
|
||||
Kaolin 0.6666666667 3.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.4) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 3.0000000000
|
||||
Chun 1.0000000000 3.0000000000
|
||||
Kaolin 0.3333333333 4.0000000000
|
||||
Kaolin 1.0000000000 4.0000000000
|
||||
Kaolin 0.6666666667 4.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.5) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 3.0000000000
|
||||
Chun 1.0000000000 3.0000000000
|
||||
Kaolin 0.3333333333 4.0000000000
|
||||
Kaolin 1.0000000000 4.0000000000
|
||||
Kaolin 0.6666666667 4.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.6) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 7.0000000000
|
||||
Chun 1.0000000000 7.0000000000
|
||||
Kaolin 0.3333333333 4.0000000000
|
||||
Kaolin 1.0000000000 4.0000000000
|
||||
Kaolin 0.6666666667 4.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.7) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 7.0000000000
|
||||
Chun 1.0000000000 7.0000000000
|
||||
Kaolin 0.3333333333 7.0000000000
|
||||
Kaolin 1.0000000000 7.0000000000
|
||||
Kaolin 0.6666666667 7.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.8) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 7.0000000000
|
||||
Chun 1.0000000000 7.0000000000
|
||||
Kaolin 0.3333333333 7.0000000000
|
||||
Kaolin 1.0000000000 7.0000000000
|
||||
Kaolin 0.6666666667 7.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.9) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 7.0000000000
|
||||
Chun 1.0000000000 7.0000000000
|
||||
Kaolin 0.3333333333 7.0000000000
|
||||
Kaolin 1.0000000000 7.0000000000
|
||||
Kaolin 0.6666666667 7.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select name,cume_dist() over (partition by name order by score) as b, percentile_disc(1) within group(order by score) over (partition by name) as c from t1;
|
||||
name b c
|
||||
Chun 0.5000000000 7.0000000000
|
||||
Chun 1.0000000000 7.0000000000
|
||||
Kaolin 0.3333333333 7.0000000000
|
||||
Kaolin 1.0000000000 7.0000000000
|
||||
Kaolin 0.6666666667 7.0000000000
|
||||
Tatiana 1.0000000000 4.0000000000
|
||||
Tata 1.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 3.0000000000
|
||||
5.0000000000 3.0000000000
|
||||
4.0000000000 3.0000000000
|
||||
4.0000000000 3.0000000000
|
||||
4.0000000000 3.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.1) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 3.4000000000
|
||||
5.0000000000 3.4000000000
|
||||
4.0000000000 3.2000000000
|
||||
4.0000000000 3.2000000000
|
||||
4.0000000000 3.2000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.2) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 3.8000000000
|
||||
5.0000000000 3.8000000000
|
||||
4.0000000000 3.4000000000
|
||||
4.0000000000 3.4000000000
|
||||
4.0000000000 3.4000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.3) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 4.2000000000
|
||||
5.0000000000 4.2000000000
|
||||
4.0000000000 3.6000000000
|
||||
4.0000000000 3.6000000000
|
||||
4.0000000000 3.6000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.4) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 4.6000000000
|
||||
5.0000000000 4.6000000000
|
||||
4.0000000000 3.8000000000
|
||||
4.0000000000 3.8000000000
|
||||
4.0000000000 3.8000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.5) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 5.0000000000
|
||||
5.0000000000 5.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.6) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 5.4000000000
|
||||
5.0000000000 5.4000000000
|
||||
4.0000000000 4.6000000000
|
||||
4.0000000000 4.6000000000
|
||||
4.0000000000 4.6000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.7) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 5.8000000000
|
||||
5.0000000000 5.8000000000
|
||||
4.0000000000 5.2000000000
|
||||
4.0000000000 5.2000000000
|
||||
4.0000000000 5.2000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.8) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 6.2000000000
|
||||
5.0000000000 6.2000000000
|
||||
4.0000000000 5.8000000000
|
||||
4.0000000000 5.8000000000
|
||||
4.0000000000 5.8000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(0.9) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 6.6000000000
|
||||
5.0000000000 6.6000000000
|
||||
4.0000000000 6.4000000000
|
||||
4.0000000000 6.4000000000
|
||||
4.0000000000 6.4000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
select median(score) over (partition by name), percentile_cont(1) within group(order by score) over (partition by name) as c from t1;
|
||||
median(score) over (partition by name) c
|
||||
5.0000000000 7.0000000000
|
||||
5.0000000000 7.0000000000
|
||||
4.0000000000 7.0000000000
|
||||
4.0000000000 7.0000000000
|
||||
4.0000000000 7.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
4.0000000000 4.0000000000
|
||||
drop table t1;
|
|
@ -2,7 +2,7 @@ call mtr.add_suppression('Attempting backtrace');
|
|||
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||
call mtr.add_suppression('MYSQL_BIN_LOG::open failed to sync the index file');
|
||||
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
||||
call mtr.add_suppression('Could not open .*');
|
||||
call mtr.add_suppression('Could not use .*');
|
||||
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
||||
flush tables;
|
||||
RESET MASTER;
|
||||
|
|
|
@ -2,7 +2,7 @@ call mtr.add_suppression('Attempting backtrace');
|
|||
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
|
||||
call mtr.add_suppression('MYSQL_BIN_LOG::open failed to sync the index file');
|
||||
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
|
||||
call mtr.add_suppression('Could not open .*');
|
||||
call mtr.add_suppression('Could not use .*');
|
||||
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
|
||||
flush tables;
|
||||
RESET MASTER;
|
||||
|
|
|
@ -173,7 +173,7 @@ SET SQL_LOG_BIN=1;
|
|||
SET GLOBAL debug_dbug=@old_debug;
|
||||
###################### TEST #10
|
||||
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
|
||||
call mtr.add_suppression("Could not open .*");
|
||||
call mtr.add_suppression("Could not use .*");
|
||||
RESET MASTER;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
|
@ -233,7 +233,7 @@ include/rpl_reset.inc
|
|||
connection slave;
|
||||
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
|
||||
call mtr.add_suppression("Error writing file .*");
|
||||
call mtr.add_suppression("Could not open .*");
|
||||
call mtr.add_suppression("Could not use .*");
|
||||
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
|
||||
call mtr.add_suppression("Can't generate a unique log-filename .*");
|
||||
###################### TEST #13
|
||||
|
|
|
@ -12,3 +12,4 @@
|
|||
|
||||
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
||||
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
||||
innodb-redo-badkey : MDEV-13893 / MDEV-12699 Improve crash recovery of corrupted data pages
|
||||
|
|
|
@ -34,11 +34,11 @@ t4 CREATE TABLE `t4` (
|
|||
PARTITION BY HASH (`a`)
|
||||
PARTITIONS 2
|
||||
alter table t1 encrypted=no;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
||||
alter table t2 encrypted=yes;
|
||||
alter table t3 encrypted=default;
|
||||
alter table t4 encrypted=no;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
|
|
@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` (
|
|||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `encryption_key_id`=2
|
||||
alter table t1 encryption_key_id=3;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
|
|
@ -14,7 +14,7 @@ t1 CREATE TABLE `t1` (
|
|||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `encryption_key_id`=2
|
||||
alter table t1 encryption_key_id=3;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
|
|
@ -41,11 +41,10 @@ CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNOD
|
|||
Warnings:
|
||||
Warning 140 InnoDB: Ignored ENCRYPTION_KEY_ID 1 when encryption is disabled
|
||||
ALTER TABLE t1 ENCRYPTION_KEY_ID=99;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||
set innodb_default_encryption_key_id = 1;
|
||||
drop table t1,t2;
|
||||
|
|
|
@ -5,7 +5,7 @@ ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
|||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
|
||||
ALTER TABLE t1 ENCRYPTED=YES;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
|
||||
|
|
|
@ -22,13 +22,11 @@ show create table t2;
|
|||
show create table t3;
|
||||
show create table t4;
|
||||
|
||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
alter table t1 encrypted=no;
|
||||
alter table t2 encrypted=yes;
|
||||
alter table t3 encrypted=default;
|
||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
alter table t4 encrypted=no;
|
||||
|
||||
show create table t1;
|
||||
|
|
|
@ -7,8 +7,7 @@ insert t1 values (12345, repeat('1234567890', 20));
|
|||
|
||||
alter table t1 encryption_key_id=2;
|
||||
show create table t1;
|
||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
alter table t1 encryption_key_id=3;
|
||||
show create table t1;
|
||||
alter table t1 encryption_key_id=33;
|
||||
|
@ -17,4 +16,3 @@ alter table t1 encryption_key_id=4;
|
|||
show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
|
|
@ -27,10 +27,8 @@ DROP TABLE t1;
|
|||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
|
||||
SHOW CREATE TABLE t1;
|
||||
CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=1;
|
||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||
--error 1005
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
ALTER TABLE t1 ENCRYPTION_KEY_ID=99;
|
||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||
SHOW WARNINGS;
|
||||
set innodb_default_encryption_key_id = 1;
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ ENCRYPTED=YES;
|
|||
#
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB;
|
||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
ALTER TABLE t1 ENCRYPTED=YES;
|
||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
|
|
|
@ -75,7 +75,8 @@ eval SHOW COLUMNS FROM information_schema.$is_table;
|
|||
SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
|
||||
table_schema, table_name, column_name
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL;
|
||||
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL
|
||||
ORDER BY BINARY table_schema, BINARY table_name, BINARY column_name, BINARY constraint_name;
|
||||
|
||||
|
||||
--echo ########################################################################################
|
||||
|
|
|
@ -59,7 +59,8 @@ eval SHOW COLUMNS FROM information_schema.$is_table;
|
|||
# Show that CATALOG_NAME and SQL_PATH are always NULL.
|
||||
SELECT catalog_name, schema_name, sql_path
|
||||
FROM information_schema.schemata
|
||||
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL;
|
||||
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
|
||||
ORDER BY schema_name;
|
||||
|
||||
|
||||
--echo ###############################################################################
|
||||
|
|
|
@ -85,7 +85,8 @@ eval SHOW COLUMNS FROM information_schema.$is_table;
|
|||
SELECT * FROM information_schema.triggers
|
||||
WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL
|
||||
OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL
|
||||
OR action_reference_new_table IS NOT NULL;
|
||||
OR action_reference_new_table IS NOT NULL
|
||||
ORDER BY trigger_schema, trigger_name;
|
||||
|
||||
|
||||
--echo ##################################################################################
|
||||
|
|
|
@ -159,12 +159,14 @@ CREATE USER 'testuser1'@'localhost';
|
|||
|
||||
# Check just created VIEW
|
||||
SELECT * FROM information_schema.views
|
||||
WHERE table_name LIKE 't1_%';
|
||||
WHERE table_name LIKE 't1_%'
|
||||
ORDER BY table_schema, table_name;
|
||||
CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table;
|
||||
CREATE ALGORITHM=MERGE VIEW test.t1_view1 AS SELECT f1 FROM test.t1_table;
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW test.t1_view2 AS SELECT f1 FROM test.t1_table;
|
||||
SELECT * FROM information_schema.views
|
||||
WHERE table_name LIKE 't1_%';
|
||||
WHERE table_name LIKE 't1_%'
|
||||
ORDER BY table_schema, table_name;
|
||||
DROP VIEW test.t1_view1;
|
||||
DROP VIEW test.t1_view2;
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1
|
|||
eval SHOW CREATE TABLE $table;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
eval SHOW $table;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
eval SELECT * FROM $table $select_where ORDER BY id;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
eval SELECT $columns FROM $table $select_where ORDER BY id;
|
||||
|
@ -178,7 +178,7 @@ connection con100;
|
|||
eval SHOW CREATE TABLE $table;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
eval SHOW $table;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
eval SELECT * FROM $table $select_where ORDER BY id;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
eval SELECT $columns FROM $table $select_where ORDER BY id;
|
||||
|
@ -204,7 +204,7 @@ connection con100;
|
|||
SHOW GRANTS;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -216,7 +216,7 @@ connect (con101,localhost,ddicttestuser1,ddictpass,information_schema);
|
|||
SHOW GRANTS;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -239,7 +239,7 @@ connect (anonymous1,localhost,"''",,information_schema);
|
|||
SHOW GRANTS;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -261,7 +261,7 @@ connect (con102,localhost,ddicttestuser1,ddictpass,information_schema);
|
|||
SHOW GRANTS;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -287,7 +287,7 @@ if ($fixed_bug_30395)
|
|||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
}
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -308,7 +308,7 @@ connect (con103,localhost,ddicttestuser1,ddictpass,information_schema);
|
|||
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -330,7 +330,7 @@ connect (con104,localhost,ddicttestuser1,ddictpass,information_schema);
|
|||
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -377,7 +377,7 @@ connect (con200,localhost,ddicttestuser2,ddictpass,information_schema);
|
|||
SHOW GRANTS FOR 'ddicttestuser2'@'localhost';
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -398,7 +398,7 @@ connect (con201,localhost,ddicttestuser2,ddictpass,information_schema);
|
|||
SHOW GRANTS;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -421,7 +421,7 @@ SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
|
|||
GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost';
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
@ -445,7 +445,7 @@ connect (con108,localhost,ddicttestuser1,ddictpass,information_schema);
|
|||
SHOW GRANTS FOR 'ddicttestuser1'@'localhost';
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS
|
||||
SHOW processlist;
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 ROWS 15 QUERY_ID 17 TID
|
||||
--replace_column 1 ID 3 HOST_NAME 6 TIME 9 TIME_MS 13 MEMORY 14 MAX_MEMORY 15 ROWS 16 QUERY_ID 18 TID
|
||||
SELECT * FROM information_schema.processlist;
|
||||
--real_sleep 0.3
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ echo
|
|||
# - INFO must contain the corresponding SHOW/SELECT PROCESSLIST
|
||||
#
|
||||
# 1. Just dump what we get
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS>
|
||||
SHOW FULL PROCESSLIST;
|
||||
|
@ -159,7 +159,7 @@ let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
|
|||
WHERE COMMAND = 'Sleep' AND USER = 'test_user';
|
||||
--source include/wait_condition.inc
|
||||
# 1. Just dump what we get
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
|
||||
SHOW FULL PROCESSLIST;
|
||||
|
@ -201,7 +201,7 @@ echo
|
|||
#----------------------------------------------------------------------------
|
||||
;
|
||||
connection con1;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
|
||||
SHOW FULL PROCESSLIST;
|
||||
|
@ -226,7 +226,7 @@ let $wait_condition= SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
|
|||
--source include/wait_condition.inc
|
||||
connection con2;
|
||||
# Just dump what we get
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
|
||||
SHOW FULL PROCESSLIST;
|
||||
|
@ -277,7 +277,7 @@ WHERE ID = @test_user_con2_id AND Command IN('Query','Execute')
|
|||
AND State = 'User sleep' AND INFO IS NOT NULL ;
|
||||
--source include/wait_condition.inc
|
||||
# 1. Just dump what we get
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME>
|
||||
SHOW FULL PROCESSLIST;
|
||||
|
@ -336,7 +336,7 @@ let $wait_condition= SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST
|
|||
#
|
||||
# Expect to see the state 'Waiting for table metadata lock' for the third
|
||||
# connection because the SELECT collides with the WRITE TABLE LOCK.
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 6 <TIME> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
|
@ -383,7 +383,7 @@ echo
|
|||
# SHOW FULL PROCESSLIST Complete statement
|
||||
# SHOW PROCESSLIST statement truncated after 100 char
|
||||
;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <ROWS> 15 <QUERY_ID> 17 <TID>
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE> 9 <TIME_MS> 13 <MEMORY> 14 <MAX_MEMORY> 15 <ROWS> 16 <QUERY_ID> 18 <TID>
|
||||
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
|
||||
--replace_column 1 <ID> 3 <HOST_NAME> 5 <COMMAND> 6 <TIME> 7 <STATE>
|
||||
SHOW FULL PROCESSLIST;
|
||||
|
|
|
@ -341,12 +341,14 @@ CREATE VIEW db_datadict.v2 AS
|
|||
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
|
||||
FROM information_schema.tables WHERE table_schema = 'db_datadict';
|
||||
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
|
||||
FROM db_datadict.v2;
|
||||
FROM db_datadict.v2
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_SCHEMA TABLE_NAME TABLE_TYPE
|
||||
db_datadict t1 BASE TABLE
|
||||
db_datadict v2 VIEW
|
||||
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
|
||||
FROM information_schema.tables WHERE table_schema = 'db_datadict';
|
||||
FROM information_schema.tables WHERE table_schema = 'db_datadict'
|
||||
ORDER BY TABLE_NAME;
|
||||
TABLE_SCHEMA TABLE_NAME TABLE_TYPE
|
||||
db_datadict t1 BASE TABLE
|
||||
db_datadict v2 VIEW
|
||||
|
|
|
@ -256,18 +256,19 @@ def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NU
|
|||
def information_schema PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL
|
||||
def information_schema PROCESSLIST COMMAND 5 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL
|
||||
def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
|
||||
def information_schema PROCESSLIST EXAMINED_ROWS 14 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
|
||||
def information_schema PROCESSLIST EXAMINED_ROWS 15 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
|
||||
def information_schema PROCESSLIST HOST 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
|
||||
def information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
|
||||
def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL
|
||||
def information_schema PROCESSLIST INFO_BINARY 16 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select NEVER NULL
|
||||
def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select NEVER NULL
|
||||
def information_schema PROCESSLIST MAX_MEMORY_USED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL
|
||||
def information_schema PROCESSLIST MAX_STAGE 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
|
||||
def information_schema PROCESSLIST MEMORY_USED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL
|
||||
def information_schema PROCESSLIST PROGRESS 12 0.000 NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select NEVER NULL
|
||||
def information_schema PROCESSLIST QUERY_ID 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
|
||||
def information_schema PROCESSLIST QUERY_ID 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
|
||||
def information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
|
||||
def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL
|
||||
def information_schema PROCESSLIST TID 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
|
||||
def information_schema PROCESSLIST TID 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL
|
||||
def information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL
|
||||
def information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select NEVER NULL
|
||||
def information_schema PROCESSLIST USER 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL
|
||||
|
@ -797,6 +798,7 @@ NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
|
|||
NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
|
||||
NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
|
||||
NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
|
||||
NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
|
||||
NULL information_schema PROCESSLIST EXAMINED_ROWS int NULL NULL NULL NULL int(7)
|
||||
NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(4)
|
||||
1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob
|
||||
|
|
|
@ -256,18 +256,19 @@ def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NU
|
|||
def information_schema PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL
|
||||
def information_schema PROCESSLIST COMMAND 5 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL
|
||||
def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
|
||||
def information_schema PROCESSLIST EXAMINED_ROWS 14 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
|
||||
def information_schema PROCESSLIST EXAMINED_ROWS 15 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
|
||||
def information_schema PROCESSLIST HOST 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
|
||||
def information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
|
||||
def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL
|
||||
def information_schema PROCESSLIST INFO_BINARY 16 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
|
||||
def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL
|
||||
def information_schema PROCESSLIST MAX_MEMORY_USED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL
|
||||
def information_schema PROCESSLIST MAX_STAGE 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
|
||||
def information_schema PROCESSLIST MEMORY_USED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL
|
||||
def information_schema PROCESSLIST PROGRESS 12 0.000 NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) NEVER NULL
|
||||
def information_schema PROCESSLIST QUERY_ID 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
|
||||
def information_schema PROCESSLIST QUERY_ID 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
|
||||
def information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
|
||||
def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL
|
||||
def information_schema PROCESSLIST TID 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
|
||||
def information_schema PROCESSLIST TID 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL
|
||||
def information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL
|
||||
def information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) NEVER NULL
|
||||
def information_schema PROCESSLIST USER 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL
|
||||
|
@ -797,6 +798,7 @@ NULL information_schema PROCESSLIST STAGE tinyint NULL NULL NULL NULL tinyint(2)
|
|||
NULL information_schema PROCESSLIST MAX_STAGE tinyint NULL NULL NULL NULL tinyint(2)
|
||||
NULL information_schema PROCESSLIST PROGRESS decimal NULL NULL NULL NULL decimal(7,3)
|
||||
NULL information_schema PROCESSLIST MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
|
||||
NULL information_schema PROCESSLIST MAX_MEMORY_USED bigint NULL NULL NULL NULL bigint(7)
|
||||
NULL information_schema PROCESSLIST EXAMINED_ROWS int NULL NULL NULL NULL int(7)
|
||||
NULL information_schema PROCESSLIST QUERY_ID bigint NULL NULL NULL NULL bigint(4)
|
||||
1.0000 information_schema PROCESSLIST INFO_BINARY blob 65535 65535 NULL NULL blob
|
||||
|
|
|
@ -73,18 +73,19 @@ REFERENCED_COLUMN_NAME varchar(64) YES NULL
|
|||
SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
|
||||
table_schema, table_name, column_name
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL;
|
||||
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL
|
||||
ORDER BY BINARY table_schema, BINARY table_name, BINARY column_name, BINARY constraint_name;
|
||||
constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name
|
||||
def mysql PRIMARY def mysql column_stats column_name
|
||||
def mysql PRIMARY def mysql column_stats db_name
|
||||
def mysql PRIMARY def mysql column_stats table_name
|
||||
def mysql PRIMARY def mysql column_stats column_name
|
||||
def mysql PRIMARY def mysql columns_priv Host
|
||||
def mysql PRIMARY def mysql columns_priv Db
|
||||
def mysql PRIMARY def mysql columns_priv User
|
||||
def mysql PRIMARY def mysql columns_priv Table_name
|
||||
def mysql PRIMARY def mysql columns_priv Column_name
|
||||
def mysql PRIMARY def mysql db Host
|
||||
def mysql PRIMARY def mysql columns_priv Db
|
||||
def mysql PRIMARY def mysql columns_priv Host
|
||||
def mysql PRIMARY def mysql columns_priv Table_name
|
||||
def mysql PRIMARY def mysql columns_priv User
|
||||
def mysql PRIMARY def mysql db Db
|
||||
def mysql PRIMARY def mysql db Host
|
||||
def mysql PRIMARY def mysql db User
|
||||
def mysql PRIMARY def mysql event db
|
||||
def mysql PRIMARY def mysql event name
|
||||
|
@ -99,41 +100,41 @@ def mysql PRIMARY def mysql help_relation help_keyword_id
|
|||
def mysql PRIMARY def mysql help_relation help_topic_id
|
||||
def mysql PRIMARY def mysql help_topic help_topic_id
|
||||
def mysql name def mysql help_topic name
|
||||
def mysql PRIMARY def mysql host Host
|
||||
def mysql PRIMARY def mysql host Db
|
||||
def mysql PRIMARY def mysql host Host
|
||||
def mysql PRIMARY def mysql index_stats db_name
|
||||
def mysql PRIMARY def mysql index_stats table_name
|
||||
def mysql PRIMARY def mysql index_stats index_name
|
||||
def mysql PRIMARY def mysql index_stats prefix_arity
|
||||
def mysql PRIMARY def mysql index_stats table_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats database_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats table_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats index_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats stat_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats table_name
|
||||
def mysql PRIMARY def mysql innodb_table_stats database_name
|
||||
def mysql PRIMARY def mysql innodb_table_stats table_name
|
||||
def mysql PRIMARY def mysql plugin name
|
||||
def mysql PRIMARY def mysql proc db
|
||||
def mysql PRIMARY def mysql proc name
|
||||
def mysql PRIMARY def mysql proc type
|
||||
def mysql PRIMARY def mysql procs_priv Host
|
||||
def mysql PRIMARY def mysql procs_priv Db
|
||||
def mysql PRIMARY def mysql procs_priv User
|
||||
def mysql PRIMARY def mysql procs_priv Host
|
||||
def mysql PRIMARY def mysql procs_priv Routine_name
|
||||
def mysql PRIMARY def mysql procs_priv Routine_type
|
||||
def mysql PRIMARY def mysql procs_priv User
|
||||
def mysql PRIMARY def mysql proxies_priv Host
|
||||
def mysql PRIMARY def mysql proxies_priv User
|
||||
def mysql PRIMARY def mysql proxies_priv Proxied_host
|
||||
def mysql PRIMARY def mysql proxies_priv Proxied_user
|
||||
def mysql PRIMARY def mysql proxies_priv User
|
||||
def mysql Host def mysql roles_mapping Host
|
||||
def mysql Host def mysql roles_mapping User
|
||||
def mysql Host def mysql roles_mapping Role
|
||||
def mysql Host def mysql roles_mapping User
|
||||
def mysql PRIMARY def mysql servers Server_name
|
||||
def mysql PRIMARY def mysql table_stats db_name
|
||||
def mysql PRIMARY def mysql table_stats table_name
|
||||
def mysql PRIMARY def mysql tables_priv Host
|
||||
def mysql PRIMARY def mysql tables_priv Db
|
||||
def mysql PRIMARY def mysql tables_priv User
|
||||
def mysql PRIMARY def mysql tables_priv Host
|
||||
def mysql PRIMARY def mysql tables_priv Table_name
|
||||
def mysql PRIMARY def mysql tables_priv User
|
||||
def mysql PRIMARY def mysql time_zone Time_zone_id
|
||||
def mysql PRIMARY def mysql time_zone_leap_second Transition_time
|
||||
def mysql PRIMARY def mysql time_zone_name Name
|
||||
|
|
|
@ -73,18 +73,19 @@ REFERENCED_COLUMN_NAME varchar(64) YES NULL
|
|||
SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog,
|
||||
table_schema, table_name, column_name
|
||||
FROM information_schema.key_column_usage
|
||||
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL;
|
||||
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL
|
||||
ORDER BY BINARY table_schema, BINARY table_name, BINARY column_name, BINARY constraint_name;
|
||||
constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name
|
||||
def mysql PRIMARY def mysql column_stats column_name
|
||||
def mysql PRIMARY def mysql column_stats db_name
|
||||
def mysql PRIMARY def mysql column_stats table_name
|
||||
def mysql PRIMARY def mysql column_stats column_name
|
||||
def mysql PRIMARY def mysql columns_priv Host
|
||||
def mysql PRIMARY def mysql columns_priv Db
|
||||
def mysql PRIMARY def mysql columns_priv User
|
||||
def mysql PRIMARY def mysql columns_priv Table_name
|
||||
def mysql PRIMARY def mysql columns_priv Column_name
|
||||
def mysql PRIMARY def mysql db Host
|
||||
def mysql PRIMARY def mysql columns_priv Db
|
||||
def mysql PRIMARY def mysql columns_priv Host
|
||||
def mysql PRIMARY def mysql columns_priv Table_name
|
||||
def mysql PRIMARY def mysql columns_priv User
|
||||
def mysql PRIMARY def mysql db Db
|
||||
def mysql PRIMARY def mysql db Host
|
||||
def mysql PRIMARY def mysql db User
|
||||
def mysql PRIMARY def mysql event db
|
||||
def mysql PRIMARY def mysql event name
|
||||
|
@ -99,41 +100,41 @@ def mysql PRIMARY def mysql help_relation help_keyword_id
|
|||
def mysql PRIMARY def mysql help_relation help_topic_id
|
||||
def mysql PRIMARY def mysql help_topic help_topic_id
|
||||
def mysql name def mysql help_topic name
|
||||
def mysql PRIMARY def mysql host Host
|
||||
def mysql PRIMARY def mysql host Db
|
||||
def mysql PRIMARY def mysql host Host
|
||||
def mysql PRIMARY def mysql index_stats db_name
|
||||
def mysql PRIMARY def mysql index_stats table_name
|
||||
def mysql PRIMARY def mysql index_stats index_name
|
||||
def mysql PRIMARY def mysql index_stats prefix_arity
|
||||
def mysql PRIMARY def mysql index_stats table_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats database_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats table_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats index_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats stat_name
|
||||
def mysql PRIMARY def mysql innodb_index_stats table_name
|
||||
def mysql PRIMARY def mysql innodb_table_stats database_name
|
||||
def mysql PRIMARY def mysql innodb_table_stats table_name
|
||||
def mysql PRIMARY def mysql plugin name
|
||||
def mysql PRIMARY def mysql proc db
|
||||
def mysql PRIMARY def mysql proc name
|
||||
def mysql PRIMARY def mysql proc type
|
||||
def mysql PRIMARY def mysql procs_priv Host
|
||||
def mysql PRIMARY def mysql procs_priv Db
|
||||
def mysql PRIMARY def mysql procs_priv User
|
||||
def mysql PRIMARY def mysql procs_priv Host
|
||||
def mysql PRIMARY def mysql procs_priv Routine_name
|
||||
def mysql PRIMARY def mysql procs_priv Routine_type
|
||||
def mysql PRIMARY def mysql procs_priv User
|
||||
def mysql PRIMARY def mysql proxies_priv Host
|
||||
def mysql PRIMARY def mysql proxies_priv User
|
||||
def mysql PRIMARY def mysql proxies_priv Proxied_host
|
||||
def mysql PRIMARY def mysql proxies_priv Proxied_user
|
||||
def mysql PRIMARY def mysql proxies_priv User
|
||||
def mysql Host def mysql roles_mapping Host
|
||||
def mysql Host def mysql roles_mapping User
|
||||
def mysql Host def mysql roles_mapping Role
|
||||
def mysql Host def mysql roles_mapping User
|
||||
def mysql PRIMARY def mysql servers Server_name
|
||||
def mysql PRIMARY def mysql table_stats db_name
|
||||
def mysql PRIMARY def mysql table_stats table_name
|
||||
def mysql PRIMARY def mysql tables_priv Host
|
||||
def mysql PRIMARY def mysql tables_priv Db
|
||||
def mysql PRIMARY def mysql tables_priv User
|
||||
def mysql PRIMARY def mysql tables_priv Host
|
||||
def mysql PRIMARY def mysql tables_priv Table_name
|
||||
def mysql PRIMARY def mysql tables_priv User
|
||||
def mysql PRIMARY def mysql time_zone Time_zone_id
|
||||
def mysql PRIMARY def mysql time_zone_leap_second Transition_time
|
||||
def mysql PRIMARY def mysql time_zone_name Name
|
||||
|
|
|
@ -197,7 +197,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
|
|||
SELECT * FROM db_datadict_2.res_6_408002_2;
|
||||
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema'); SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
connect testuser2, localhost, testuser2, , db_datadict;
|
||||
SELECT * FROM information_schema.routines;
|
||||
|
@ -209,7 +209,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
|
|||
SELECT * FROM db_datadict_2.res_6_408002_2;
|
||||
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema'); SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
connect testuser3, localhost, testuser3, , test;
|
||||
SELECT * FROM information_schema.routines;
|
||||
|
@ -221,7 +221,7 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL
|
|||
SELECT * FROM db_datadict_2.res_6_408002_2;
|
||||
END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema'); SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
|
|
|
@ -51,7 +51,8 @@ DEFAULT_COLLATION_NAME varchar(32) NO
|
|||
SQL_PATH varchar(512) YES NULL
|
||||
SELECT catalog_name, schema_name, sql_path
|
||||
FROM information_schema.schemata
|
||||
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL;
|
||||
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
|
||||
ORDER BY schema_name;
|
||||
catalog_name schema_name sql_path
|
||||
def information_schema NULL
|
||||
def mtr NULL
|
||||
|
|
|
@ -51,7 +51,8 @@ DEFAULT_COLLATION_NAME varchar(32) NO
|
|||
SQL_PATH varchar(512) YES NULL
|
||||
SELECT catalog_name, schema_name, sql_path
|
||||
FROM information_schema.schemata
|
||||
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL;
|
||||
WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL
|
||||
ORDER BY schema_name;
|
||||
catalog_name schema_name sql_path
|
||||
def information_schema NULL
|
||||
def mtr NULL
|
||||
|
|
|
@ -83,16 +83,17 @@ INDEX_TYPE varchar(16) NO
|
|||
COMMENT varchar(16) YES NULL
|
||||
INDEX_COMMENT varchar(1024) NO
|
||||
SELECT table_catalog, table_schema, table_name, index_schema, index_name
|
||||
FROM information_schema.statistics WHERE table_catalog IS NOT NULL;
|
||||
FROM information_schema.statistics WHERE table_catalog IS NOT NULL
|
||||
ORDER BY table_schema, table_name, index_schema, index_name;
|
||||
table_catalog table_schema table_name index_schema index_name
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql column_stats mysql PRIMARY
|
||||
def mysql column_stats mysql PRIMARY
|
||||
def mysql column_stats mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql columns_priv mysql PRIMARY
|
||||
def mysql db mysql PRIMARY
|
||||
def mysql db mysql PRIMARY
|
||||
def mysql db mysql PRIMARY
|
||||
|
@ -102,14 +103,14 @@ def mysql event mysql PRIMARY
|
|||
def mysql func mysql PRIMARY
|
||||
def mysql gtid_slave_pos mysql PRIMARY
|
||||
def mysql gtid_slave_pos mysql PRIMARY
|
||||
def mysql help_category mysql PRIMARY
|
||||
def mysql help_category mysql name
|
||||
def mysql help_keyword mysql PRIMARY
|
||||
def mysql help_category mysql PRIMARY
|
||||
def mysql help_keyword mysql name
|
||||
def mysql help_keyword mysql PRIMARY
|
||||
def mysql help_relation mysql PRIMARY
|
||||
def mysql help_relation mysql PRIMARY
|
||||
def mysql help_topic mysql PRIMARY
|
||||
def mysql help_topic mysql name
|
||||
def mysql help_topic mysql PRIMARY
|
||||
def mysql host mysql PRIMARY
|
||||
def mysql host mysql PRIMARY
|
||||
def mysql index_stats mysql PRIMARY
|
||||
|
@ -120,28 +121,28 @@ def mysql plugin mysql PRIMARY
|
|||
def mysql proc mysql PRIMARY
|
||||
def mysql proc mysql PRIMARY
|
||||
def mysql proc mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql Grantor
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql procs_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql Grantor
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql proxies_priv mysql PRIMARY
|
||||
def mysql roles_mapping mysql Host
|
||||
def mysql roles_mapping mysql Host
|
||||
def mysql roles_mapping mysql Host
|
||||
def mysql servers mysql PRIMARY
|
||||
def mysql table_stats mysql PRIMARY
|
||||
def mysql table_stats mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql Grantor
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql tables_priv mysql PRIMARY
|
||||
def mysql table_stats mysql PRIMARY
|
||||
def mysql table_stats mysql PRIMARY
|
||||
def mysql time_zone mysql PRIMARY
|
||||
def mysql time_zone_leap_second mysql PRIMARY
|
||||
def mysql time_zone_name mysql PRIMARY
|
||||
|
|
|
@ -55,21 +55,22 @@ CONSTRAINT_TYPE varchar(64) NO
|
|||
SELECT constraint_catalog, constraint_schema, constraint_name,
|
||||
table_schema, table_name
|
||||
FROM information_schema.table_constraints
|
||||
WHERE constraint_catalog IS NOT NULL;
|
||||
WHERE constraint_catalog IS NOT NULL
|
||||
ORDER BY constraint_schema, table_name, constraint_name;
|
||||
constraint_catalog constraint_schema constraint_name table_schema table_name
|
||||
def mysql PRIMARY mysql column_stats
|
||||
def mysql PRIMARY mysql columns_priv
|
||||
def mysql PRIMARY mysql column_stats
|
||||
def mysql PRIMARY mysql db
|
||||
def mysql PRIMARY mysql event
|
||||
def mysql PRIMARY mysql func
|
||||
def mysql PRIMARY mysql gtid_slave_pos
|
||||
def mysql PRIMARY mysql help_category
|
||||
def mysql name mysql help_category
|
||||
def mysql PRIMARY mysql help_keyword
|
||||
def mysql PRIMARY mysql help_category
|
||||
def mysql name mysql help_keyword
|
||||
def mysql PRIMARY mysql help_keyword
|
||||
def mysql PRIMARY mysql help_relation
|
||||
def mysql PRIMARY mysql help_topic
|
||||
def mysql name mysql help_topic
|
||||
def mysql PRIMARY mysql help_topic
|
||||
def mysql PRIMARY mysql host
|
||||
def mysql PRIMARY mysql index_stats
|
||||
def mysql PRIMARY mysql innodb_index_stats
|
||||
|
@ -80,8 +81,8 @@ def mysql PRIMARY mysql procs_priv
|
|||
def mysql PRIMARY mysql proxies_priv
|
||||
def mysql Host mysql roles_mapping
|
||||
def mysql PRIMARY mysql servers
|
||||
def mysql PRIMARY mysql table_stats
|
||||
def mysql PRIMARY mysql tables_priv
|
||||
def mysql PRIMARY mysql table_stats
|
||||
def mysql PRIMARY mysql time_zone
|
||||
def mysql PRIMARY mysql time_zone_leap_second
|
||||
def mysql PRIMARY mysql time_zone_name
|
||||
|
|
|
@ -104,7 +104,8 @@ DATABASE_COLLATION varchar(32) NO
|
|||
SELECT * FROM information_schema.triggers
|
||||
WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL
|
||||
OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL
|
||||
OR action_reference_new_table IS NOT NULL;
|
||||
OR action_reference_new_table IS NOT NULL
|
||||
ORDER BY trigger_schema, trigger_name;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
def mtr gs_insert INSERT def mtr global_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
def mtr ts_insert INSERT def mtr test_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
|
|
|
@ -104,7 +104,8 @@ DATABASE_COLLATION varchar(32) NO
|
|||
SELECT * FROM information_schema.triggers
|
||||
WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL
|
||||
OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL
|
||||
OR action_reference_new_table IS NOT NULL;
|
||||
OR action_reference_new_table IS NOT NULL
|
||||
ORDER BY trigger_schema, trigger_name;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
def mtr gs_insert INSERT def mtr global_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
def mtr ts_insert INSERT def mtr test_suppressions 1 NULL BEGIN DECLARE dummy INT; SELECT "" REGEXP NEW.pattern INTO dummy; END ROW BEFORE NULL NULL OLD NEW # root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
|
|
|
@ -128,13 +128,15 @@ ENGINE = <engine_type>;
|
|||
DROP USER 'testuser1'@'localhost';
|
||||
CREATE USER 'testuser1'@'localhost';
|
||||
SELECT * FROM information_schema.views
|
||||
WHERE table_name LIKE 't1_%';
|
||||
WHERE table_name LIKE 't1_%'
|
||||
ORDER BY table_schema, table_name;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
|
||||
CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table;
|
||||
CREATE ALGORITHM=MERGE VIEW test.t1_view1 AS SELECT f1 FROM test.t1_table;
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW test.t1_view2 AS SELECT f1 FROM test.t1_table;
|
||||
SELECT * FROM information_schema.views
|
||||
WHERE table_name LIKE 't1_%';
|
||||
WHERE table_name LIKE 't1_%'
|
||||
ORDER BY table_schema, table_name;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
|
||||
def test t1_view select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
|
||||
def test t1_view1 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci MERGE
|
||||
|
|
|
@ -131,13 +131,15 @@ ENGINE = <engine_type>;
|
|||
DROP USER 'testuser1'@'localhost';
|
||||
CREATE USER 'testuser1'@'localhost';
|
||||
SELECT * FROM information_schema.views
|
||||
WHERE table_name LIKE 't1_%';
|
||||
WHERE table_name LIKE 't1_%'
|
||||
ORDER BY table_schema, table_name;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
|
||||
CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table;
|
||||
CREATE ALGORITHM=MERGE VIEW test.t1_view1 AS SELECT f1 FROM test.t1_table;
|
||||
CREATE ALGORITHM=TEMPTABLE VIEW test.t1_view2 AS SELECT f1 FROM test.t1_table;
|
||||
SELECT * FROM information_schema.views
|
||||
WHERE table_name LIKE 't1_%';
|
||||
WHERE table_name LIKE 't1_%'
|
||||
ORDER BY table_schema, table_name;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM
|
||||
def test t1_view select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED
|
||||
def test t1_view1 select `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci MERGE
|
||||
|
|
|
@ -37,6 +37,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
@ -44,12 +45,12 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
) DEFAULT CHARSET=utf8
|
||||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID root HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID root HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
SELECT * FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID root HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID root HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
|
||||
ID root HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
|
||||
|
@ -116,6 +117,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
@ -123,10 +125,10 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
) DEFAULT CHARSET=utf8
|
||||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
|
||||
|
@ -188,10 +190,10 @@ Grants for ddicttestuser1@localhost
|
|||
GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
|
||||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
####################################################################################
|
||||
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
|
||||
SHOW/SELECT shows all processes/threads.
|
||||
|
@ -204,12 +206,12 @@ SHOW processlist;
|
|||
Id User Host db Command Time State Info Progress
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
5 Grant PROCESS privilege to anonymous user.
|
||||
connection default (user=root)
|
||||
|
@ -231,13 +233,13 @@ Id User Host db Command Time State Info Progress
|
|||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
6 Revoke PROCESS privilege from ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -257,12 +259,12 @@ SHOW processlist;
|
|||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
7 Revoke PROCESS privilege from anonymous user
|
||||
connection default (user=root)
|
||||
|
@ -279,9 +281,9 @@ SHOW GRANTS FOR ''@'localhost';
|
|||
Grants for @localhost
|
||||
GRANT USAGE ON *.* TO ''@'localhost'
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -301,13 +303,13 @@ Id User Host db Command Time State Info Progress
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
9 Revoke SUPER privilege from user ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -329,14 +331,14 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
10 Grant SUPER privilege with grant option to user ddicttestuser1.
|
||||
connection default (user=root)
|
||||
|
@ -388,20 +390,20 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
|
||||
connection ddicttestuser1;
|
||||
|
@ -419,11 +421,11 @@ GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA
|
|||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -450,17 +452,17 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
12 Revoke the SELECT privilege from user ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -488,18 +490,18 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
|
||||
connection default (user=root)
|
||||
|
|
|
@ -37,6 +37,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
@ -44,12 +45,12 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
) DEFAULT CHARSET=utf8
|
||||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID root HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID root HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
SELECT * FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
|
||||
ID root HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
|
||||
|
@ -116,6 +117,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
@ -123,10 +125,10 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
|
|||
) DEFAULT CHARSET=utf8
|
||||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID
|
||||
SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID, INFO_BINARY FROM processlist ORDER BY id
|
||||
|
@ -188,10 +190,10 @@ Grants for ddicttestuser1@localhost
|
|||
GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1'
|
||||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
####################################################################################
|
||||
4.2 New connection con101 (ddicttestuser1 with PROCESS privilege)
|
||||
SHOW/SELECT shows all processes/threads.
|
||||
|
@ -204,12 +206,12 @@ SHOW processlist;
|
|||
Id User Host db Command Time State Info Progress
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
5 Grant PROCESS privilege to anonymous user.
|
||||
connection default (user=root)
|
||||
|
@ -231,13 +233,13 @@ Id User Host db Command Time State Info Progress
|
|||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
6 Revoke PROCESS privilege from ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -257,12 +259,12 @@ SHOW processlist;
|
|||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
7 Revoke PROCESS privilege from anonymous user
|
||||
connection default (user=root)
|
||||
|
@ -279,9 +281,9 @@ SHOW GRANTS FOR ''@'localhost';
|
|||
Grants for @localhost
|
||||
GRANT USAGE ON *.* TO ''@'localhost'
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -301,13 +303,13 @@ Id User Host db Command Time State Info Progress
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
9 Revoke SUPER privilege from user ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -329,14 +331,14 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
10 Grant SUPER privilege with grant option to user ddicttestuser1.
|
||||
connection default (user=root)
|
||||
|
@ -388,20 +390,20 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
11 User ddicttestuser1 revokes PROCESS privilege from user ddicttestuser2
|
||||
connection ddicttestuser1;
|
||||
|
@ -419,11 +421,11 @@ GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA
|
|||
SHOW processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -450,17 +452,17 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
12 Revoke the SELECT privilege from user ddicttestuser1
|
||||
connection default (user=root)
|
||||
|
@ -488,18 +490,18 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
|||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME init SHOW processlist TIME_MS
|
||||
ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS
|
||||
SELECT * FROM information_schema.processlist;
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY ROWS QUERY_ID NULL TID
|
||||
ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID NULL TID
|
||||
####################################################################################
|
||||
12.2 Revoke only the SELECT privilege on the information_schema from ddicttestuser1.
|
||||
connection default (user=root)
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2775,7 +2775,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
|||
SELECT * from t1 where f2=f1' at line 1
|
||||
CREATE PROCEDURE values()
|
||||
SELECT * from t1 where f2=f1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'values()
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '()
|
||||
SELECT * from t1 where f2=f1' at line 1
|
||||
CREATE PROCEDURE varbinary()
|
||||
SELECT * from t1 where f2=f1;
|
||||
|
@ -5596,7 +5596,7 @@ CREATE PROCEDURE sp1()
|
|||
values:BEGIN
|
||||
SELECT @x;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'values:BEGIN
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':BEGIN
|
||||
SELECT @x;
|
||||
END' at line 2
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
|
@ -9150,7 +9150,7 @@ CREATE PROCEDURE sp1()
|
|||
BEGIN
|
||||
declare values char;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'values char;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'char;
|
||||
END' at line 3
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
Warnings:
|
||||
|
@ -11494,8 +11494,9 @@ BEGIN
|
|||
declare values condition for sqlstate '02000';
|
||||
declare exit handler for values set @var2 = 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'values condition for sqlstate '02000';
|
||||
declare exit handler for values set @var2' at line 3
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'condition for sqlstate '02000';
|
||||
declare exit handler for values set @var2 = 1;
|
||||
E' at line 3
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
Warnings:
|
||||
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
|
||||
|
@ -13607,7 +13608,7 @@ CREATE PROCEDURE sp1( )
|
|||
BEGIN
|
||||
declare values handler for sqlstate '02000' set @var2 = 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'values handler for sqlstate '02000' set @var2 = 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'handler for sqlstate '02000' set @var2 = 1;
|
||||
END' at line 3
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
Warnings:
|
||||
|
|
|
@ -286,9 +286,11 @@ CREATE VIEW db_datadict.v2 AS
|
|||
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
|
||||
FROM information_schema.tables WHERE table_schema = 'db_datadict';
|
||||
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
|
||||
FROM db_datadict.v2;
|
||||
FROM db_datadict.v2
|
||||
ORDER BY TABLE_NAME;
|
||||
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
|
||||
FROM information_schema.tables WHERE table_schema = 'db_datadict';
|
||||
FROM information_schema.tables WHERE table_schema = 'db_datadict'
|
||||
ORDER BY TABLE_NAME;
|
||||
GRANT SELECT ON db_datadict.v2 to testuser2@localhost;
|
||||
#
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
|
|
|
@ -78,7 +78,8 @@ eval SHOW COLUMNS FROM information_schema.$is_table;
|
|||
|
||||
# Show that TABLE_CATALOG is always NULL.
|
||||
SELECT table_catalog, table_schema, table_name, index_schema, index_name
|
||||
FROM information_schema.statistics WHERE table_catalog IS NOT NULL;
|
||||
FROM information_schema.statistics WHERE table_catalog IS NOT NULL
|
||||
ORDER BY table_schema, table_name, index_schema, index_name;
|
||||
|
||||
|
||||
--echo ####################################################################################
|
||||
|
|
|
@ -68,8 +68,8 @@ eval SHOW COLUMNS FROM information_schema.$is_table;
|
|||
SELECT constraint_catalog, constraint_schema, constraint_name,
|
||||
table_schema, table_name
|
||||
FROM information_schema.table_constraints
|
||||
WHERE constraint_catalog IS NOT NULL;
|
||||
|
||||
WHERE constraint_catalog IS NOT NULL
|
||||
ORDER BY constraint_schema, table_name, constraint_name;
|
||||
|
||||
--echo #########################################################################################
|
||||
--echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information
|
||||
|
|
|
@ -56,3 +56,7 @@ MW-284 : MDEV-13549 Galera test failures 10.1
|
|||
galera_as_slave : MDEV-13549 Galera test failures 10.1
|
||||
galera_var_innodb_disallow_writes : MDEV-10949
|
||||
galera_kill_applier : race condition at the start of the test
|
||||
GAL-480 : "Lost connection to MySQL"
|
||||
MW-328A : "Found wrong usage of mutex"
|
||||
MW-328B : "Found wrong usage of mutex"
|
||||
MW-328C : "Found wrong usage of mutex"
|
||||
|
|
|
@ -36,7 +36,7 @@ INSERT INTO t1 VALUES (5);
|
|||
--let $galera_server_number = 1
|
||||
--source include/galera_connect.inc
|
||||
--connection node_1a
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'query end' AND INFO = 'INSERT INTO t1 VALUES (5)';
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Commit' AND INFO = 'INSERT INTO t1 VALUES (5)';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_2
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue