mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
mariadb-test: wait on disconnect
Remove one of the major sources of race condiitons in mariadb-test. Normally, mariadb_close() sends COM_QUIT to the server and immediately disconnects. In mariadb-test it means the test can switch to another connection and sends queries to the server before the server even started parsing the COM_QUIT packet and these queries can see the connection as fully active, as it didn't reach dispatch_command yet. This is a major source of instability in tests and many - but not all, still less than a half - tests employ workarounds. The correct one is a pair count_sessions.inc/wait_until_count_sessions.inc. Also very popular was wait_until_disconnected.inc, which was completely useless, because it verifies that the connection is closed, and after disconnect it always is, it didn't verify whether the server processed COM_QUIT. Sadly the placebo was as widely used as the real thing. Let's fix this by making mariadb-test `disconnect` command _to wait_ for the server to confirm. This makes almost all workarounds redundant. In some cases count_sessions.inc/wait_until_count_sessions.inc is still needed, though, as only `disconnect` command is changed: * after external tools, like `exec $MYSQL` * after failed `connect` command * replication, after `STOP SLAVE` * Federated/CONNECT/SPIDER/etc after `DROP TABLE` and also in some XA tests, because an XA transaction is dissociated from the THD very late, after the server has closed the client connection. Collateral cleanups: fix comments, remove some redundant statements: * DROP IF EXISTS if nothing is known to exist * DROP table/view before DROP DATABASE * REVOKE privileges before DROP USER etc
This commit is contained in:
committed by
Dmitry Shulga
parent
18985d8471
commit
bead24b7f3
@@ -5829,8 +5829,12 @@ void do_close_connection(struct st_command *command)
|
||||
DBUG_PRINT("info", ("Closing connection %s", con->name));
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (command->type == Q_DIRTY_CLOSE)
|
||||
{
|
||||
mariadb_cancel(con->mysql);
|
||||
else
|
||||
{
|
||||
simple_command(con->mysql,COM_QUIT,0,0,0);
|
||||
if (con->util_mysql)
|
||||
simple_command(con->util_mysql,COM_QUIT,0,0,0);
|
||||
}
|
||||
#endif /*!EMBEDDED_LIBRARY*/
|
||||
if (con->stmt)
|
||||
|
@@ -181,27 +181,13 @@ show status like "Qcache_not_cached";
|
||||
|
||||
# Cleanup
|
||||
|
||||
connection root;
|
||||
disconnect root;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection root2;
|
||||
disconnect root2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user1;
|
||||
disconnect user1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user2;
|
||||
disconnect user2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user3;
|
||||
disconnect user3;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user4;
|
||||
disconnect user4;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection unkuser;
|
||||
disconnect unkuser;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
|
||||
#
|
||||
|
@@ -1,10 +1,5 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t0,t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
@@ -46,5 +41,3 @@ set debug_sync='RESET';
|
||||
|
||||
disconnect con1;
|
||||
drop table t0,t1,t2;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
# $percona_nonflushing_analyze_table - table to test
|
||||
#
|
||||
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--connect con1,localhost,root
|
||||
|
||||
SET DEBUG_SYNC="handler_rnd_next_end SIGNAL idx_scan_in_progress WAIT_FOR finish_scan";
|
||||
@@ -31,5 +29,3 @@ reap;
|
||||
--disconnect con1
|
||||
--connection default
|
||||
SET DEBUG_SYNC='reset';
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -189,7 +189,6 @@ show status like "Qcache_hits";
|
||||
|
||||
# Final cleanup
|
||||
disconnect connection1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
set @@global.query_cache_size = @save_query_cache_size;
|
||||
drop table t2;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/no_valgrind_without_big.inc
|
||||
|
||||
@@ -80,4 +79,3 @@ set debug_sync='RESET';
|
||||
|
||||
|
||||
drop table t2,t3;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -2,15 +2,13 @@
|
||||
# Check that ordinary connect/disconnect does not increase aborted_clients
|
||||
# status variable, but KILL connection does
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/count_sessions.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
FLUSH GLOBAL STATUS;
|
||||
# Connect/Disconnect look that aborted_clients stays 0
|
||||
connect (con1,localhost,root,,);
|
||||
disconnect con1;
|
||||
connection default;
|
||||
-- source include/wait_until_count_sessions.inc
|
||||
# Check that there is 0 aborted clients so far
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
||||
|
||||
@@ -21,7 +19,6 @@ connect(con2,localhost,root,,);
|
||||
KILL CONNECTION_ID();
|
||||
disconnect con2;
|
||||
connection default;
|
||||
-- source include/wait_until_count_sessions.inc
|
||||
|
||||
# aborted clients must be 1 now
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients';
|
||||
|
@@ -1780,7 +1780,6 @@ DROP TABLE t1;
|
||||
# --enable_info allows us to see how many rows were updated
|
||||
# by ALTER TABLE. in-place will show 0 rows, while copy > 0.
|
||||
#
|
||||
DROP TABLE IF EXISTS ti1, ti2, ti3, tm1, tm2, tm3;
|
||||
# Single operation tests
|
||||
CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;
|
||||
CREATE TABLE tm1(a INT NOT NULL, b INT, c INT) engine=MyISAM;
|
||||
|
@@ -1318,8 +1318,6 @@ SELECT LENGTH(my_t3_fld1) FROM t3;
|
||||
|
||||
# Cleanup
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
@@ -1569,8 +1567,6 @@ connection con1;
|
||||
--echo # Reaping: ALTER TABLE t1 DISABLE KEYS
|
||||
--reap
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -1584,10 +1580,6 @@ DROP TABLE t1;
|
||||
--echo # by ALTER TABLE. in-place will show 0 rows, while copy > 0.
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS ti1, ti2, ti3, tm1, tm2, tm3;
|
||||
--enable_warnings
|
||||
|
||||
--echo # Single operation tests
|
||||
|
||||
CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;
|
||||
|
@@ -21,9 +21,6 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/default_optimizer_switch.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
set GLOBAL sql_mode="";
|
||||
set LOCAL sql_mode="";
|
||||
|
||||
@@ -5392,8 +5389,4 @@ connection default;
|
||||
DROP USER 'privtest'@localhost;
|
||||
USE test;
|
||||
DROP DATABASE privtest_db;
|
||||
|
||||
set GLOBAL sql_mode=default;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
set default_storage_engine=aria;
|
||||
drop table if exists t0,t1,t2;
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int primary key);
|
||||
|
@@ -22,7 +22,6 @@ SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Bac
|
||||
change_user user2;
|
||||
SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock';
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
|
||||
--echo # A very low privileged user (-> con4) cannot acquire the backup lock
|
||||
@@ -39,7 +38,6 @@ BACKUP STAGE BLOCK_COMMIT;
|
||||
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
||||
BACKUP STAGE END;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
DROP USER user1@localhost, user2@localhost;
|
||||
|
@@ -8,9 +8,6 @@
|
||||
--source include/have_metadata_lock_info.inc
|
||||
# As non transactional engine we have MyISAM anyway.
|
||||
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
let $old_lock_wait_timeout = `SELECT @@global.lock_wait_timeout`;
|
||||
|
||||
--echo #-----------------------------------------------------------------------
|
||||
@@ -384,4 +381,3 @@ SET GLOBAL lock_wait_timeout = $old_lock_wait_timeout;
|
||||
--disconnect backup
|
||||
|
||||
--connection default
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (c1 TINYBLOB,
|
||||
c2 BLOB,
|
||||
c3 MEDIUMBLOB,
|
||||
|
@@ -8,15 +8,8 @@
|
||||
# CLIENT (CONTRIBUTION)
|
||||
#
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
USE test;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (c1 TINYBLOB,
|
||||
c2 BLOB,
|
||||
c3 MEDIUMBLOB,
|
||||
@@ -91,6 +84,3 @@ remove_file $MYSQLTEST_VARDIR/tmp/mdev-14593.sql;
|
||||
|
||||
#Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -52,11 +52,9 @@ connection thread2;
|
||||
REAP;
|
||||
|
||||
disconnect thread2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection thread1;
|
||||
disconnect thread1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
|
||||
|
@@ -1,8 +1,6 @@
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
connection con1;
|
||||
drop table if exists t1,t2;
|
||||
drop view if exists v1;
|
||||
create table t1(n int not null, key(n), key(n), key(n), key(n));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `n_2`. This is deprecated and will be disallowed in a future release
|
||||
@@ -18,6 +16,7 @@ connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
drop table t1;
|
||||
# End of 4.1 tests
|
||||
Create table t1(f1 int);
|
||||
Create table t2(f1 int);
|
||||
Create view v1 as Select * from t1;
|
||||
|
@@ -1,13 +1,6 @@
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connection con1;
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
drop view if exists v1;
|
||||
--enable_warnings
|
||||
|
||||
# Add a lot of keys to slow down check
|
||||
create table t1(n int not null, key(n), key(n), key(n), key(n));
|
||||
@@ -32,7 +25,7 @@ disconnect con2;
|
||||
drop table t1;
|
||||
|
||||
|
||||
# End of 4.1 tests
|
||||
--echo # End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#9897 Views: 'Check Table' crashes MySQL, with a view and a table
|
||||
@@ -76,10 +69,6 @@ UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
disconnect con1;
|
||||
|
||||
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15338
|
||||
--echo # Assertion `!table || (!table->read_set ||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
set @old_concurrent_insert= @@global.concurrent_insert;
|
||||
set @@global.concurrent_insert= 0;
|
||||
drop table if exists t1;
|
||||
create table t1 (
|
||||
`a&b` int,
|
||||
`a<b` int NOT NULL,
|
||||
|
@@ -1,15 +1,12 @@
|
||||
# Can't run with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/no_view_protocol.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
# Disable concurrent inserts to avoid test failures when reading
|
||||
# data from concurrent connections (insert might return before
|
||||
# the data is actually in the table).
|
||||
set @old_concurrent_insert= @@global.concurrent_insert;
|
||||
set @@global.concurrent_insert= 0;
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
|
||||
# sure that basic encoding issues are handled properly
|
||||
|
@@ -9,10 +9,6 @@
|
||||
# Slow test, don't run during staging part
|
||||
-- source include/not_staging.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
|
||||
connect (comp_con,localhost,root,,,,,COMPRESS);
|
||||
|
||||
# Check compression turned on
|
||||
@@ -27,7 +23,3 @@ SHOW STATUS LIKE 'Compression';
|
||||
|
||||
connection default;
|
||||
disconnect comp_con;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -277,8 +277,6 @@ disconnect tmp_con7;
|
||||
# -- Restoring default connection...
|
||||
connect default,localhost,root,,test;
|
||||
|
||||
# -- Waiting for connections to close...
|
||||
|
||||
DROP USER mysqltest_u1@localhost;
|
||||
|
||||
# -- End of Bug#33507.
|
||||
@@ -477,6 +475,4 @@ Connection_errors_peer_address 0
|
||||
Connection_errors_select 0
|
||||
Connection_errors_tcpwrap 0
|
||||
set global max_connections= @max_con.save;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@@ -9,9 +9,6 @@
|
||||
# of the log tables (which are CSV-based). By connect mysql; show tables;
|
||||
--source include/have_csv.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
SET global secure_auth=0;
|
||||
|
||||
#connect (con1,localhost,root,,"");
|
||||
@@ -250,11 +247,6 @@ let $wait_condition =
|
||||
--echo # -- Restoring default connection...
|
||||
--connect (default,localhost,root,,test)
|
||||
|
||||
--echo
|
||||
--echo # -- Waiting for connections to close...
|
||||
let $count_sessions=1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo
|
||||
DROP USER mysqltest_u1@localhost;
|
||||
|
||||
@@ -425,9 +417,6 @@ source include/switch_to_mysql_global_priv.inc;
|
||||
DROP USER mysqltest_up1@'%';
|
||||
DROP USER mysqltest_up2@'%';
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
|
||||
--echo #
|
||||
@@ -557,6 +546,4 @@ let $status_var_value= 1;
|
||||
show global status like 'Connection_errors%';
|
||||
set global max_connections= @max_con.save;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -1,4 +1,3 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
### Test 1:
|
||||
@@ -42,3 +41,4 @@ connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
DROP TABLE t1;
|
||||
# End of 4.1 tests
|
||||
|
@@ -1,12 +1,5 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
@@ -62,8 +55,4 @@ disconnect con1;
|
||||
disconnect con2;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo # End of 4.1 tests
|
||||
|
@@ -12,8 +12,6 @@
|
||||
# Some of tests below also use binlog to check that statements are
|
||||
# executed and logged in correct order
|
||||
--source include/have_binlog_format_mixed_or_statement.inc
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
# Create auxiliary connections
|
||||
connect (addconroot1, localhost, root,,);
|
||||
@@ -547,6 +545,3 @@ disconnect addconroot3;
|
||||
|
||||
set debug_sync='RESET';
|
||||
source include/show_binlog_events.inc;
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -47,10 +47,6 @@ connection default;
|
||||
SELECT CURRENT_USER;
|
||||
CURRENT_USER
|
||||
root@localhost
|
||||
REVOKE ALL ON db1.* FROM mysqltest_1@localhost;
|
||||
DROP DATABASE IF EXISTS db2;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'db2'; database doesn't exist
|
||||
DROP DATABASE db1;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
set global sql_mode=default;
|
||||
|
@@ -62,10 +62,7 @@ CREATE OR REPLACE ROLE developer;
|
||||
|
||||
connection default;
|
||||
SELECT CURRENT_USER;
|
||||
REVOKE ALL ON db1.* FROM mysqltest_1@localhost;
|
||||
DROP DATABASE IF EXISTS db2;
|
||||
DROP DATABASE db1;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
|
||||
|
||||
set global sql_mode=default;
|
||||
|
@@ -60,7 +60,6 @@ c d
|
||||
1 30
|
||||
1 30
|
||||
connection root;
|
||||
revoke all privileges on mysqltest.v1 from mysqltest_1@localhost;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database mysqltest;
|
||||
#
|
||||
|
@@ -1,16 +1,10 @@
|
||||
# Can't test with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
connect (root,localhost,root,,test);
|
||||
connection root;
|
||||
|
||||
--disable_warnings
|
||||
create database mysqltest;
|
||||
--enable_warnings
|
||||
|
||||
create user mysqltest_1@localhost;
|
||||
connect (user1,localhost,mysqltest_1,,"*NO-ONE*");
|
||||
connection user1;
|
||||
@@ -74,7 +68,6 @@ connection user1;
|
||||
select * from mysqltest.v3;
|
||||
|
||||
connection root;
|
||||
revoke all privileges on mysqltest.v1 from mysqltest_1@localhost;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database mysqltest;
|
||||
|
||||
|
@@ -2844,9 +2844,7 @@ Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`col1` varchar(10) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
connection con3;
|
||||
disconnect con3;
|
||||
connection default;
|
||||
USE test;
|
||||
|
@@ -1110,12 +1110,8 @@ SHOW CREATE TABLE mysqltest2.t2|
|
||||
#
|
||||
delimiter ;|
|
||||
|
||||
--connection con2
|
||||
--disconnect con2
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection con3
|
||||
--disconnect con3
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
@@ -2844,9 +2844,7 @@ Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`col1` varchar(10) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
connection con3;
|
||||
disconnect con3;
|
||||
connection default;
|
||||
USE test;
|
||||
|
@@ -1113,12 +1113,8 @@ SHOW CREATE TABLE mysqltest2.t2|
|
||||
#
|
||||
delimiter ;|
|
||||
|
||||
--connection con2
|
||||
--disconnect con2
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection con3
|
||||
--disconnect con3
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
@@ -3,7 +3,6 @@
|
||||
# Deadlock detector should resolve conflicts between FTWRL and user locks.
|
||||
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
SELECT GET_LOCK("l1", 0);
|
||||
@@ -32,5 +31,3 @@ UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
|
||||
set debug_sync='reset';
|
||||
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -534,12 +534,8 @@ INSERT DELAYED INTO t2 VALUES (8);
|
||||
UNLOCK TABLES;
|
||||
SET AUTOCOMMIT= 1;
|
||||
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
DROP TABLE t1, t2, t3;
|
||||
@@ -585,7 +581,6 @@ connection con1;
|
||||
--reap
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop tables tm, t1, t2;
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t2,t3;
|
||||
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
set @save_derived_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=off,derived_with_keys=off';
|
||||
@@ -398,7 +397,6 @@ ID DATA FID
|
||||
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
|
||||
ID DATA FID
|
||||
drop table t1, t2;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
drop user mysqltest_1;
|
||||
|
@@ -1,11 +1,6 @@
|
||||
# Initialize
|
||||
--source include/default_optimizer_switch.inc
|
||||
--source include/have_sequence.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
--source include/test_db_charset_latin1.inc
|
||||
|
||||
set @save_derived_optimizer_switch=@@optimizer_switch;
|
||||
@@ -290,9 +285,7 @@ select t2.* from ((select * from t1) as A inner join t2 on A.ID = t2.FID);
|
||||
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
|
||||
drop table t1, t2;
|
||||
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop user mysqltest_1;
|
||||
|
||||
|
@@ -3,7 +3,6 @@ connect con2,localhost,root,,;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (n INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
SELECT * FROM t1;
|
||||
|
@@ -1,18 +1,11 @@
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connection con1;
|
||||
dirty_close con1;
|
||||
connection con2;
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (n INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
SELECT * FROM t1;
|
||||
@@ -54,7 +47,3 @@ connection con1;
|
||||
--reap
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -97,7 +97,6 @@ unlock tables;
|
||||
connection addconroot1;
|
||||
connection addconroot2;
|
||||
disconnect addconroot2;
|
||||
connection addconroot1;
|
||||
disconnect addconroot1;
|
||||
connection default;
|
||||
drop table if exists t1,t2;
|
||||
|
@@ -123,10 +123,7 @@ connection addconroot1;
|
||||
connection addconroot2;
|
||||
--reap
|
||||
disconnect addconroot2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection addconroot1;
|
||||
disconnect addconroot1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
--enable_service_connection
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
call mtr.add_suppression("Sort aborted.*");
|
||||
|
||||
@@ -53,7 +52,6 @@ SET DEBUG_SYNC='now SIGNAL filesort_killed';
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t1aa,t2aa;
|
||||
set sql_mode="";
|
||||
DROP DATABASE IF EXISTS testdb;
|
||||
CREATE DATABASE testdb;
|
||||
@@ -19,7 +18,7 @@ Grants for select_only_c1@localhost
|
||||
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
|
||||
GRANT SELECT (`c1`) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
|
||||
|
||||
"after fix privs"
|
||||
# after fix privs
|
||||
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
|
||||
Grants for show_view_tbl@localhost
|
||||
GRANT USAGE ON *.* TO `show_view_tbl`@`localhost`
|
||||
@@ -35,3 +34,4 @@ DROP USER 'select_only_c1'@'localhost';
|
||||
DROP VIEW testdb.v1;
|
||||
DROP TABLE testdb.t1;
|
||||
DROP DATABASE testdb;
|
||||
# End of 4.1 tests
|
||||
|
@@ -19,10 +19,6 @@ if (!$MYSQL_FIX_PRIVILEGE_TABLES)
|
||||
# mysql_fix_system_tables which should be ignored.
|
||||
# Instead, concentrate on the errors in r/system_mysql_db.reject
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t1aa,t2aa;
|
||||
--enable_warnings
|
||||
|
||||
set sql_mode="";
|
||||
|
||||
#
|
||||
@@ -50,22 +46,16 @@ GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
|
||||
SHOW GRANTS FOR 'select_only_c1'@'localhost';
|
||||
echo;
|
||||
|
||||
-- disable_result_log
|
||||
-- disable_query_log
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
|
||||
# Run the mysql_fix_privilege_tables.sql using "mysql --force"
|
||||
# Determine the number of open sessions
|
||||
--source include/count_sessions.inc
|
||||
--exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log 2>&1
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log
|
||||
# Wait till the number of open sessions is <= the number before the run with $MYSQL
|
||||
# = The session caused by mysql has finished its disconnect
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
-- enable_query_log
|
||||
-- enable_result_log
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
echo "after fix privs";
|
||||
echo # after fix privs;
|
||||
|
||||
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
|
||||
echo;
|
||||
@@ -79,4 +69,4 @@ DROP VIEW testdb.v1;
|
||||
DROP TABLE testdb.t1;
|
||||
DROP DATABASE testdb;
|
||||
|
||||
# End of 4.1 tests
|
||||
--echo # End of 4.1 tests
|
||||
|
@@ -18,7 +18,6 @@ GRANT RELOAD, LOCK TABLES ON *.* TO user5@localhost;
|
||||
FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -26,7 +25,6 @@ UNLOCK TABLES;
|
||||
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
||||
FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -34,7 +32,6 @@ FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--error ER_DBACCESS_DENIED_ERROR
|
||||
FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -42,7 +39,6 @@ FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
||||
FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -50,7 +46,6 @@ FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
FLUSH TABLE db1.t1 FOR EXPORT;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
DROP USER user1@localhost, user2@localhost, user3@localhost,
|
||||
|
@@ -157,7 +157,6 @@ CREATE TABLE t1(a INT) engine= MEMORY;
|
||||
FLUSH TABLE t1 FOR EXPORT;
|
||||
ERROR HY000: Storage engine MEMORY of the table `test`.`t1` doesn't have this option
|
||||
DROP TABLE t1;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
# Test 7: Check privileges required.
|
||||
@@ -198,7 +197,6 @@ LOCK TABLE t1 READ;
|
||||
UNLOCK TABLES;
|
||||
connection default;
|
||||
UNLOCK TABLES;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE t1, t2;
|
||||
@@ -294,7 +292,6 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
|
||||
LOCK TABLES test.t1 WRITE;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
# End of 5.6 tests
|
||||
|
@@ -222,8 +222,6 @@ UNLOCK TABLES;
|
||||
--echo # Reaping DROP TABLE t1
|
||||
--reap
|
||||
--disconnect con2
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
DROP TABLE t2;
|
||||
|
||||
@@ -250,10 +248,7 @@ CREATE TABLE t1(a INT) engine= MEMORY;
|
||||
FLUSH TABLE t1 FOR EXPORT;
|
||||
DROP TABLE t1;
|
||||
|
||||
--connection con1
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
|
||||
--echo # Test 7: Check privileges required.
|
||||
@@ -313,10 +308,7 @@ UNLOCK TABLES;
|
||||
--connection default
|
||||
UNLOCK TABLES;
|
||||
|
||||
--connection con1
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--connection default
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
@@ -423,9 +415,7 @@ LOCK TABLES test.t1 WRITE;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
|
||||
--connection con1
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
|
||||
--echo # End of 5.6 tests
|
||||
|
@@ -281,7 +281,6 @@ lock table t1 read, t2 read;
|
||||
unlock tables;
|
||||
connection default;
|
||||
unlock tables;
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
drop table t1, t2, t3;
|
||||
@@ -399,9 +398,7 @@ connection con2;
|
||||
connection default;
|
||||
commit;
|
||||
# Cleanup
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
drop table t1;
|
||||
@@ -480,9 +477,7 @@ connection default;
|
||||
# Reap INSERT.
|
||||
handler t1 close;
|
||||
# Cleanup.
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
drop tables t1, t2;
|
||||
|
@@ -177,7 +177,6 @@ set session low_priority_updates=default;
|
||||
connect (con1,localhost,root,,);
|
||||
send select benchmark(200, (select sin(1))) > 1000;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
@@ -361,9 +360,7 @@ unlock tables;
|
||||
connection default;
|
||||
unlock tables;
|
||||
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
@@ -490,12 +487,8 @@ commit;
|
||||
|
||||
--echo # Cleanup
|
||||
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop table t1;
|
||||
--enable_view_protocol
|
||||
@@ -571,12 +564,8 @@ connection default;
|
||||
handler t1 close;
|
||||
|
||||
--echo # Cleanup.
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection con2;
|
||||
disconnect con2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop tables t1, t2;
|
||||
--enable_view_protocol
|
||||
@@ -629,7 +618,6 @@ connect(con1, localhost, root);
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
UNLOCK TABLES;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
COMMIT;
|
||||
|
@@ -1,9 +1,7 @@
|
||||
# Save the initial number of concurrent sessions
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
connect con3,localhost,root,,;
|
||||
connection con1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a INT) ENGINE=innodb;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
@@ -65,4 +63,3 @@ disconnect con3;
|
||||
# drop the table.
|
||||
DROP TABLE t1;
|
||||
# End of 4.1 tests
|
||||
# Wait till all disconnects are completed
|
||||
|
@@ -6,17 +6,11 @@
|
||||
# And it requires InnoDB
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo # Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connect (con3,localhost,root,,);
|
||||
connection con1;
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a INT) ENGINE=innodb;
|
||||
|
||||
# blocks COMMIT ?
|
||||
@@ -92,7 +86,3 @@ disconnect con3;
|
||||
--echo # drop the table.
|
||||
DROP TABLE t1;
|
||||
--echo # End of 4.1 tests
|
||||
|
||||
--echo # Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
# Save the initial number of concurrent sessions
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
connection con1;
|
||||
@@ -33,4 +32,3 @@ drop table t1;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
# Wait till all disconnects are completed
|
||||
|
@@ -9,9 +9,6 @@
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo # Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_query_log
|
||||
# This may be triggered on a slow system or one that lacks native AIO.
|
||||
call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations");
|
||||
@@ -62,7 +59,3 @@ drop table t1;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
--echo # Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -9,9 +9,7 @@
|
||||
--source include/have_debug_sync.inc
|
||||
# Parts of this test use DDL on events, BINLOG statement and
|
||||
# other statements which are not supported in embedded server.
|
||||
-- source include/not_embedded.inc
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
set global sql_mode="";
|
||||
set local sql_mode="";
|
||||
@@ -2144,10 +2142,6 @@ disconnect con2;
|
||||
disconnect con3;
|
||||
|
||||
set global sql_mode=default;
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Deadlock between FTWRL under open handler and DDL/LOCK TABLES
|
||||
|
@@ -13,9 +13,6 @@
|
||||
# won't block FLUSH TABLES WITH GLOBAL READ LOCK.
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connection con1;
|
||||
@@ -75,7 +72,3 @@ connection default;
|
||||
disconnect con2;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -59,7 +59,6 @@ set @@global.max_allowed_packet=1048576*100;
|
||||
--connect (newconn, localhost, root,,)
|
||||
eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null;
|
||||
disconnect newconn;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
set @@global.max_allowed_packet=@save_max_allowed_packet;
|
||||
|
||||
|
@@ -1294,8 +1294,6 @@ connection bug23556;
|
||||
USE bug23556;
|
||||
TRUNCATE t1;
|
||||
connection default;
|
||||
USE bug23556;
|
||||
DROP TABLE t1;
|
||||
USE test;
|
||||
DROP DATABASE bug23556;
|
||||
DROP USER bug23556@localhost;
|
||||
@@ -1779,12 +1777,6 @@ ERROR 42S01: Table 't4' already exists
|
||||
create table t1 select * from t2;
|
||||
ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table `mysqltest`.`t1`
|
||||
connection default;
|
||||
drop table t1,t2,t4,t5,t6;
|
||||
revoke create on mysqltest.* from mysqltest@localhost;
|
||||
revoke select, insert on mysqltest.t2 from mysqltest@localhost;
|
||||
revoke insert on mysqltest.t4 from mysqltest@localhost;
|
||||
revoke create, insert on mysqltest.t5 from mysqltest@localhost;
|
||||
revoke create, insert on mysqltest.t6 from mysqltest@localhost;
|
||||
drop user mysqltest@localhost;
|
||||
disconnect user1;
|
||||
drop database mysqltest;
|
||||
@@ -2833,13 +2825,8 @@ CREATE USER bug33578113;
|
||||
GRANT DROP ON performance_schema.* TO bug33578113;
|
||||
REVOKE DROP ON performance_schema.* FROM bug33578113;
|
||||
DROP USER bug33578113;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-19948 'show grants' return privileges individually
|
||||
#
|
||||
# switching from mysql.global_priv to mysql.user
|
||||
@@ -2854,10 +2841,8 @@ Grants for ten2@%
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `ten2`@`%`
|
||||
DROP USER ten2;
|
||||
# switching back from mysql.user to mysql.global_priv
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-17932 : Assertion upon double RENAME USER
|
||||
#
|
||||
CREATE USER foo@localhost;
|
||||
@@ -2876,7 +2861,5 @@ GRANT UPDATE ON test.* TO foo;
|
||||
RENAME USER 'name' to 'a';
|
||||
DROP USER foo;
|
||||
DROP USER a;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
|
||||
|
@@ -3,16 +3,11 @@
|
||||
# Grant tests not performed with embedded server
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
set GLOBAL sql_mode="";
|
||||
set LOCAL sql_mode="";
|
||||
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
|
||||
SET GLOBAL log_bin_trust_function_creators = 1;
|
||||
--disable_cursor_protocol
|
||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||
--enable_cursor_protocol
|
||||
|
||||
connect (master,localhost,root,,);
|
||||
connection master;
|
||||
@@ -967,8 +962,6 @@ USE bug23556;
|
||||
TRUNCATE t1;
|
||||
|
||||
connection default;
|
||||
USE bug23556;
|
||||
DROP TABLE t1;
|
||||
USE test;
|
||||
DROP DATABASE bug23556;
|
||||
DROP USER bug23556@localhost;
|
||||
@@ -1570,17 +1563,8 @@ create table t4 select * from t2;
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
create table t1 select * from t2;
|
||||
|
||||
|
||||
connection default;
|
||||
drop table t1,t2,t4,t5,t6;
|
||||
|
||||
revoke create on mysqltest.* from mysqltest@localhost;
|
||||
revoke select, insert on mysqltest.t2 from mysqltest@localhost;
|
||||
revoke insert on mysqltest.t4 from mysqltest@localhost;
|
||||
revoke create, insert on mysqltest.t5 from mysqltest@localhost;
|
||||
revoke create, insert on mysqltest.t6 from mysqltest@localhost;
|
||||
drop user mysqltest@localhost;
|
||||
|
||||
disconnect user1;
|
||||
drop database mysqltest;
|
||||
use test;
|
||||
@@ -2228,8 +2212,6 @@ DROP USER untrusted@localhost;
|
||||
DROP DATABASE secret;
|
||||
|
||||
set GLOBAL sql_mode=default;
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22755 CREATE USER leads to indirect SIGABRT in __stack_chk_fail () from fill_schema_user_privileges + *** stack smashing detected *** (on optimized builds)
|
||||
@@ -2299,15 +2281,8 @@ CREATE USER bug33578113;
|
||||
GRANT DROP ON performance_schema.* TO bug33578113;
|
||||
REVOKE DROP ON performance_schema.* FROM bug33578113;
|
||||
DROP USER bug33578113;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19948 'show grants' return privileges individually
|
||||
@@ -2330,9 +2305,7 @@ SHOW GRANTS FOR ten2;
|
||||
DROP USER ten2;
|
||||
source include/switch_to_mysql_global_priv.inc;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17932 : Assertion upon double RENAME USER
|
||||
@@ -2355,8 +2328,6 @@ RENAME USER 'name' to 'a';
|
||||
DROP USER foo;
|
||||
DROP USER a;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';
|
||||
|
@@ -2,13 +2,6 @@ select priv into @root_priv from mysql.global_priv where user='root' and host='l
|
||||
set GLOBAL sql_mode="";
|
||||
set LOCAL sql_mode="";
|
||||
SET NAMES binary;
|
||||
drop database if exists mysqltest;
|
||||
drop database if exists mysqltest_1;
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
||||
delete from mysql.columns_priv where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
grant all privileges on `my\_1`.* to mysqltest_1@localhost with grant option;
|
||||
grant create user on *.* to mysqltest_1@localhost;
|
||||
create user mysqltest_2@localhost;
|
||||
|
@@ -1,9 +1,6 @@
|
||||
# Grant tests not performed with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
|
||||
|
||||
set GLOBAL sql_mode="";
|
||||
@@ -15,19 +12,6 @@ SET NAMES binary;
|
||||
# (usually it's GRANT, reconnect as another user, try something)
|
||||
#
|
||||
|
||||
|
||||
# prepare playground before tests
|
||||
--disable_warnings
|
||||
drop database if exists mysqltest;
|
||||
drop database if exists mysqltest_1;
|
||||
--enable_warnings
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
||||
delete from mysql.columns_priv where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
|
||||
|
||||
grant all privileges on `my\_1`.* to mysqltest_1@localhost with grant option;
|
||||
grant create user on *.* to mysqltest_1@localhost;
|
||||
create user mysqltest_2@localhost;
|
||||
@@ -1022,7 +1006,4 @@ DROP USER mysqltest_u3@localhost;
|
||||
DROP USER mysqltest_u4@localhost;
|
||||
DROP USER mysqltest_u5@localhost;
|
||||
|
||||
|
||||
set GLOBAL sql_mode=default;
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -3,7 +3,6 @@ set local sql_mode="";
|
||||
SET NAMES binary;
|
||||
connect master,localhost,root,,;
|
||||
connection master;
|
||||
drop table if exists t1;
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
||||
|
@@ -1,8 +1,5 @@
|
||||
# Can't run with embedded server because we use GRANT
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
set global sql_mode="";
|
||||
set local sql_mode="";
|
||||
@@ -13,11 +10,6 @@ SET NAMES binary;
|
||||
connect (master,localhost,root,,);
|
||||
connection master;
|
||||
|
||||
# Cleanup
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
||||
@@ -237,6 +229,3 @@ disconnect foo;
|
||||
connection default;
|
||||
drop user foo@localhost;
|
||||
drop database db1;
|
||||
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -231,7 +231,6 @@ repair table mysqltest_db1.t1;
|
||||
|
||||
--echo # Clean-up.
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop database mysqltest_db1;
|
||||
drop user mysqltest_u1@localhost;
|
||||
|
@@ -226,19 +226,12 @@ Qcache_hits 8
|
||||
show status like "Qcache_not_cached";
|
||||
Variable_name Value
|
||||
Qcache_not_cached 5
|
||||
connection root;
|
||||
disconnect root;
|
||||
connection root2;
|
||||
disconnect root2;
|
||||
connection user1;
|
||||
disconnect user1;
|
||||
connection user2;
|
||||
disconnect user2;
|
||||
connection user3;
|
||||
disconnect user3;
|
||||
connection user4;
|
||||
disconnect user4;
|
||||
connection unkuser;
|
||||
disconnect unkuser;
|
||||
connection default;
|
||||
set names binary;
|
||||
|
@@ -226,19 +226,12 @@ Qcache_hits 8
|
||||
show status like "Qcache_not_cached";
|
||||
Variable_name Value
|
||||
Qcache_not_cached 4
|
||||
connection root;
|
||||
disconnect root;
|
||||
connection root2;
|
||||
disconnect root2;
|
||||
connection user1;
|
||||
disconnect user1;
|
||||
connection user2;
|
||||
disconnect user2;
|
||||
connection user3;
|
||||
disconnect user3;
|
||||
connection user4;
|
||||
disconnect user4;
|
||||
connection unkuser;
|
||||
disconnect unkuser;
|
||||
connection default;
|
||||
set names binary;
|
||||
|
@@ -3,10 +3,7 @@
|
||||
#
|
||||
|
||||
# Grant tests not performed with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/default_optimizer_switch.inc
|
||||
|
||||
set GLOBAL sql_mode="";
|
||||
@@ -261,5 +258,3 @@ DROP DATABASE privtest_db;
|
||||
|
||||
set GLOBAL sql_mode=default;
|
||||
set LOCAL sql_mode=default;
|
||||
# Wait till we reached the initial number of concurrent sessions
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -46,6 +46,4 @@ disconnect foo;
|
||||
disconnect bar;
|
||||
DROP USER foo@localhost;
|
||||
DROP USER bar@localhost;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@@ -9,8 +9,6 @@
|
||||
--echo #
|
||||
--disable_service_connection
|
||||
|
||||
--let $count_sessions=1
|
||||
|
||||
--echo #
|
||||
--echo # Test that KILL is not allowed without CONNECTION ADMIN
|
||||
--echo #
|
||||
@@ -30,7 +28,6 @@ SELECT user FROM information_schema.processlist ORDER BY user;
|
||||
--disconnect foo
|
||||
--disconnect bar
|
||||
--connection default
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER foo@localhost;
|
||||
DROP USER bar@localhost;
|
||||
|
||||
@@ -55,12 +52,9 @@ let $wait_condition=
|
||||
--source include/wait_condition.inc
|
||||
--disconnect foo
|
||||
--disconnect bar
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER foo@localhost;
|
||||
DROP USER bar@localhost;
|
||||
|
||||
--enable_service_connection
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -41,7 +41,6 @@ SHOW SLAVE HOSTS;
|
||||
connection default;
|
||||
DROP USER user1@localhost;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -3,6 +3,5 @@ create user юзер_юзер@localhost;
|
||||
grant select on test.* to юзер_юзер@localhost;
|
||||
user()
|
||||
юзер_юзер@localhost
|
||||
revoke all on test.* from юзер_юзер@localhost;
|
||||
drop user юзер_юзер@localhost;
|
||||
set names default;
|
||||
|
@@ -8,6 +8,5 @@ set names utf8;
|
||||
create user юзер_юзер@localhost;
|
||||
grant select on test.* to юзер_юзер@localhost;
|
||||
--exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()"
|
||||
revoke all on test.* from юзер_юзер@localhost;
|
||||
drop user юзер_юзер@localhost;
|
||||
set names default;
|
||||
|
@@ -122,59 +122,4 @@ SELECT COUNT(@@GLOBAL.Host_Cache_Size);
|
||||
SELECT Host_Cache_Size = @@SESSION.Host_Cache_Size;
|
||||
--echo Expected error 'Unknown column Host_Cache_Size in field list'
|
||||
|
||||
#The below check has been commented out as the IP fetch is different in a P2P connection than BroadBand connection
|
||||
#--echo '#---------------------WL6372_VAR_6_06----------------------#'
|
||||
###############################################################################
|
||||
# Checking the Host cache functionality #
|
||||
###############################################################################
|
||||
|
||||
#SET @@GLOBAL.Host_Cache_Size=2;
|
||||
#--disable_warnings
|
||||
|
||||
#--perl
|
||||
#my $ip=`ifconfig | egrep "inet addr|inet" | sed -e 's/^.*inet addr://' -e 's/^.*inet//'| sed 's/ .*\$//'|egrep -i "broadcast|bcast"|head -1|awk '{print $1}'`;
|
||||
#open (LOGFH, ">" . $ENV{'MYSQL_TMP_DIR'} . "/bind_ip");
|
||||
#print LOGFH "let \$bind_ip = $ip;\n";
|
||||
#close LOGFH;
|
||||
#EOF
|
||||
|
||||
#--source $MYSQL_TMP_DIR/bind_ip
|
||||
#--remove_file $MYSQL_TMP_DIR/bind_ip
|
||||
|
||||
#let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||
#--write_line wait $restart_file
|
||||
#--shutdown_server
|
||||
#--source include/wait_until_disconnected.inc
|
||||
#-- write_line "restart:--bind-address=$bind_ip " $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
#-- enable_reconnect
|
||||
#-- source include/wait_until_connected_again.inc
|
||||
|
||||
#connection default;
|
||||
#--disable_warnings
|
||||
|
||||
#create user binduser;
|
||||
#grant all on *.* to binduser;
|
||||
|
||||
#select count(IP) from performance_schema.host_cache;
|
||||
#--echo 0 Expected
|
||||
|
||||
#connect (con1,$bind_ip,binduser,,);
|
||||
#select count(IP) from performance_schema.host_cache;
|
||||
#--echo 1 Expected
|
||||
|
||||
#disconnect con1;
|
||||
#connection default;
|
||||
|
||||
#--disable_warnings
|
||||
|
||||
# The below check is hashed until the BUG14689561# is fixed
|
||||
#
|
||||
#flush hosts;
|
||||
|
||||
#connect (con2,$bind_ip,binduser,,);
|
||||
#select count(IP) from performance_schema.host_cache;
|
||||
#--echo 1 Expected
|
||||
|
||||
#disconnect con2;
|
||||
|
||||
SET @@GLOBAL.Host_Cache_Size=DEFAULT;
|
||||
|
@@ -1,7 +1,5 @@
|
||||
set global sql_mode="";
|
||||
set local sql_mode="";
|
||||
DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
show variables where variable_name like "skip_show_database";
|
||||
Variable_name Value
|
||||
skip_show_database OFF
|
||||
@@ -2340,13 +2338,8 @@ connection default;
|
||||
disconnect con1;
|
||||
set global sql_mode=default;
|
||||
USE test;
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-13242 Wrong results for queries with row constructors and information_schema
|
||||
#
|
||||
CREATE TABLE tt1(c1 INT);
|
||||
@@ -2378,10 +2371,8 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name='aaaaaaaaa
|
||||
SCHEMA_NAME
|
||||
SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a',193);
|
||||
SCHEMA_NAME
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-14836: Assertion `m_status == DA_ERROR' failed in
|
||||
# Diagnostics_area::sql_errno upon query from I_S with LIMIT ROWS EXAMINED
|
||||
#
|
||||
@@ -2422,10 +2413,8 @@ SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEM
|
||||
TABLE_SCHEMA TABLE_NAME
|
||||
a/~.b t1
|
||||
DROP DATABASE `a/~.b`;
|
||||
#
|
||||
# End of 10.2 Test
|
||||
#
|
||||
#
|
||||
# MDEV-21201:No records produced in information_schema query,
|
||||
# depending on projection
|
||||
#
|
||||
@@ -2563,10 +2552,8 @@ SET SQL_MODE=DEFAULT;
|
||||
select progress from information_schema.processlist limit 1;
|
||||
progress
|
||||
0.000
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-MDEV-31064 Changes of the procedure are not immediatly seen in queries to I_S.parameter from other connections
|
||||
#
|
||||
CREATE PROCEDURE sp1(IN p1 INT, IN p2 INT)
|
||||
@@ -2585,13 +2572,8 @@ COUNT(*)
|
||||
disconnect con2;
|
||||
connection default;
|
||||
DROP PROCEDURE sp1;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
@@ -2606,6 +2588,4 @@ created
|
||||
SET SESSION sql_mode=DEFAULT;
|
||||
DROP VIEW i;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# This test uses grants, which can't get tested for embedded server
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_perfschema.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
# check that CSV engine was compiled in, as the result of the test depends
|
||||
# on the presence of the log tables (which are CSV-based).
|
||||
@@ -8,13 +8,9 @@
|
||||
|
||||
# Without aria_used_for_temp_tables some I_S tables will be MyISAM,
|
||||
# while the test expects them to be Aria
|
||||
-- source include/have_aria_used_for_temp_tables.inc
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_aria_used_for_temp_tables.inc
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/default_optimizer_switch.inc
|
||||
--source include/default_charset.inc
|
||||
|
||||
@@ -26,12 +22,6 @@ set local sql_mode="";
|
||||
# Test for information_schema.schemata &
|
||||
# show databases
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
show variables where variable_name like "skip_show_database";
|
||||
grant select, update, execute on test.* to mysqltest_2@localhost;
|
||||
grant select, update on test.* to mysqltest_1@localhost;
|
||||
@@ -1647,7 +1637,6 @@ connection con1;
|
||||
--echo # Reaping 'flush tables'
|
||||
reap;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
@@ -1886,22 +1875,11 @@ drop database db1;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
set global sql_mode=default;
|
||||
|
||||
USE test;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.0 tests
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.1 tests
|
||||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13242 Wrong results for queries with row constructors and information_schema
|
||||
@@ -1925,9 +1903,7 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name='aaaaaaaaa
|
||||
SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a',193);
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-14836: Assertion `m_status == DA_ERROR' failed in
|
||||
@@ -1976,9 +1952,7 @@ CREATE TABLE `a/~.b`.t1 (a INT);
|
||||
SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='a/~.b';
|
||||
DROP DATABASE `a/~.b`;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 Test
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-21201:No records produced in information_schema query,
|
||||
@@ -2114,9 +2088,7 @@ SET SQL_MODE=DEFAULT;
|
||||
--echo #
|
||||
select progress from information_schema.processlist limit 1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-MDEV-31064 Changes of the procedure are not immediatly seen in queries to I_S.parameter from other connections
|
||||
@@ -2136,13 +2108,7 @@ SELECT COUNT(*) FROM information_schema.parameters WHERE SPECIFIC_NAME = 'sp1';
|
||||
--connection default
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.5 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed
|
||||
@@ -2160,6 +2126,4 @@ SET SESSION sql_mode=DEFAULT;
|
||||
DROP VIEW i;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@@ -213,9 +213,7 @@ connection default;
|
||||
use test;
|
||||
drop view testdb_1.v1, v2, testdb_1.v3, v4;
|
||||
drop database testdb_1;
|
||||
connection testdb_1;
|
||||
disconnect testdb_1;
|
||||
connection testdb_2;
|
||||
disconnect testdb_2;
|
||||
connection default;
|
||||
drop user testdb_1@localhost;
|
||||
@@ -249,9 +247,7 @@ ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `
|
||||
connection default;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database testdb_1;
|
||||
connection user1;
|
||||
disconnect user1;
|
||||
connection default;
|
||||
set global sql_mode=default;
|
||||
#
|
||||
# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
|
||||
|
@@ -206,12 +206,8 @@ connection default;
|
||||
use test;
|
||||
drop view testdb_1.v1, v2, testdb_1.v3, v4;
|
||||
drop database testdb_1;
|
||||
connection testdb_1;
|
||||
disconnect testdb_1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection testdb_2;
|
||||
disconnect testdb_2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop user testdb_1@localhost;
|
||||
drop user testdb_2@localhost;
|
||||
@@ -243,10 +239,7 @@ show create view testdb_1.v1;
|
||||
connection default;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database testdb_1;
|
||||
connection user1;
|
||||
disconnect user1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
|
||||
set global sql_mode=default;
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
--echo # INNODB_TEMP_TABLE_INFO
|
||||
--echo #
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo # -------------------------------
|
||||
@@ -107,9 +105,6 @@ drop table test.t_temp;
|
||||
drop database my_db;
|
||||
drop database some_db;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28332: Alter on temporary table causes ER_TABLE_EXISTS_ERROR note
|
||||
--echo #
|
||||
|
@@ -5,9 +5,6 @@
|
||||
# should work with embedded server after mysqltest is fixed
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--source include/add_anonymous_users.inc
|
||||
|
||||
connect (con0,localhost,root,,);
|
||||
@@ -259,7 +256,3 @@ set global init_connect="set @a='a\\0c'";
|
||||
revoke all privileges, grant option from mysqltest1@localhost;
|
||||
drop user mysqltest1@localhost;
|
||||
drop table t1, t2;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
set default_storage_engine=innodb;
|
||||
drop table if exists t0,t1,t2;
|
||||
create table t0(a int primary key);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1(a int primary key);
|
||||
|
@@ -5,7 +5,6 @@ call mtr.add_suppression("Deadlock found when trying to get lock; try restarting
|
||||
#
|
||||
# Bug #22876 Four-way deadlock
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
connect con3,localhost,root,,;
|
||||
|
@@ -5,9 +5,6 @@
|
||||
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||
--enable_query_log
|
||||
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
set @old_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout;
|
||||
set global innodb_lock_wait_timeout=300;
|
||||
set session innodb_lock_wait_timeout=300;
|
||||
@@ -18,10 +15,6 @@ call mtr.add_suppression("Deadlock found when trying to get lock; try restarting
|
||||
--echo # Bug #22876 Four-way deadlock
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
connect (con3,localhost,root,,);
|
||||
@@ -259,10 +252,4 @@ COMMIT;
|
||||
DROP TABLE t1;
|
||||
disconnect con1;
|
||||
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
set global innodb_lock_wait_timeout=@old_innodb_lock_wait_timeout;
|
||||
|
||||
|
@@ -9,8 +9,6 @@
|
||||
--source include/have_binlog_format_mixed_or_statement.inc
|
||||
# Original test case for bug#51263 needs partitioning.
|
||||
--source include/have_partition.inc
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_query_log
|
||||
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
@@ -863,8 +861,3 @@ connection default;
|
||||
disconnect con1;
|
||||
--echo # Clean-up.
|
||||
drop tables t1, t2;
|
||||
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -5,9 +5,6 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug 42074 concurrent optimize table and
|
||||
@@ -96,7 +93,6 @@ KILL @id;
|
||||
SET DEBUG_SYNC= "now SIGNAL killed";
|
||||
DROP TABLE t1, t2;
|
||||
disconnect con1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
|
||||
|
||||
@@ -698,8 +694,3 @@ SET DEBUG_SYNC= 'now WAIT_FOR rebuild';
|
||||
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -45,7 +45,6 @@ select * from t1;
|
||||
select invisible from t1;
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
--echo
|
||||
--echo #Final Cleanup
|
||||
connection default;
|
||||
|
@@ -41,11 +41,9 @@ select * from t1;
|
||||
select count(row_start) from t1;
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--echo
|
||||
--echo #Cleanup
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop user user_1;
|
||||
drop database d;
|
||||
|
@@ -5,9 +5,6 @@
|
||||
# Can't be tested with embedded server
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
echo =============Test of '127.0.0.1' (IPv4) ===========================;
|
||||
let $IPv6= 127.0.0.1;
|
||||
--source include/ipv6_clients.inc
|
||||
@@ -55,6 +52,3 @@ let $IPv6= ::1;
|
||||
--error 2002,2006
|
||||
connect (con1, $IPv6, root, , test, $MASTER_MYPORT,);
|
||||
--enable_query_log
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -5,9 +5,6 @@
|
||||
# Can't be tested with embedded server
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
echo =============Test of '::1' ========================================;
|
||||
let $IPv6= ::1;
|
||||
--source include/ipv6_clients.inc
|
||||
@@ -27,6 +24,3 @@ echo =============Test of '0:0:0:0:0:0:0:1' ============================;
|
||||
let $IPv6= 0:0:0:0:0:0:0:1;
|
||||
--source include/ipv6_clients.inc
|
||||
--source include/ipv6.inc
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -6,9 +6,7 @@
|
||||
# connection does not read() from a socket, but returns control to the
|
||||
# application. 'mysqltest' does not handle the kill request.
|
||||
#
|
||||
|
||||
-- source include/count_sessions.inc
|
||||
-- source include/not_embedded.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--disable_service_connection
|
||||
|
||||
@@ -221,7 +219,6 @@ drop table t2;
|
||||
--echo #
|
||||
--echo # Test kill USER
|
||||
--echo #
|
||||
--source include/count_sessions.inc
|
||||
grant ALL on test.* to test@localhost;
|
||||
grant ALL on test.* to test2@localhost;
|
||||
connect (con3, localhost, test,,);
|
||||
@@ -246,7 +243,6 @@ connection con4;
|
||||
--error 2013,2006,5014
|
||||
select 1;
|
||||
connection default;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4911 - add KILL query id, and add query id information to
|
||||
|
@@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t2,t3;
|
||||
CREATE TABLE t1 ( `id` int(11) NOT NULL default '0', `id2` int(11) NOT NULL default '0', `id3` int(11) NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY (`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
|
||||
insert into t1 (id,id2) values (1,1),(1,2),(1,3);
|
||||
LOCK TABLE t1 WRITE;
|
||||
@@ -469,9 +468,7 @@ connection default;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2;
|
||||
disconnect con2;
|
||||
#
|
||||
# End of 6.0 tests.
|
||||
#
|
||||
create table t1 (a int) engine=myisam;
|
||||
lock tables t1 write concurrent, t1 as t2 read;
|
||||
connect con1,localhost,root,,;
|
||||
|
@@ -4,12 +4,6 @@
|
||||
|
||||
--source include/have_partition.inc
|
||||
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 ( `id` int(11) NOT NULL default '0', `id2` int(11) NOT NULL default '0', `id3` int(11) NOT NULL default '0', `dummy1` char(30) default NULL, PRIMARY KEY (`id`,`id2`), KEY `index_id3` (`id3`)) ENGINE=MyISAM;
|
||||
insert into t1 (id,id2) values (1,1),(1,2),(1,3);
|
||||
LOCK TABLE t1 WRITE;
|
||||
@@ -566,14 +560,8 @@ UNLOCK TABLES;
|
||||
DROP TABLE t1, t2;
|
||||
disconnect con2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 6.0 tests.
|
||||
--echo #
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
#
|
||||
# Test concurrent lock and read locks
|
||||
# This gave a warning:
|
||||
|
@@ -1,5 +1,3 @@
|
||||
drop table if exists t1,t2;
|
||||
drop DATABASE if exists mysqltest_1;
|
||||
connect locker,localhost,root,,;
|
||||
connect locker2,localhost,root,,;
|
||||
connect reader,localhost,root,,;
|
||||
|
@@ -1,11 +1,3 @@
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
drop DATABASE if exists mysqltest_1;
|
||||
--enable_warnings
|
||||
|
||||
# Test to see if select will get the lock ahead of low priority update
|
||||
|
||||
--disable_ps2_protocol
|
||||
@@ -759,7 +751,6 @@ connect (con2,localhost,root);
|
||||
LOCK TABLES v1 WRITE, t1 READ;
|
||||
FLUSH TABLE t1;
|
||||
disconnect con2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--echo # Connection 1
|
||||
connection default;
|
||||
@@ -781,7 +772,6 @@ connect (con2,localhost,root);
|
||||
LOCK TABLES t1 WRITE, v1 READ;
|
||||
FLUSH TABLE t1;
|
||||
disconnect con2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
LOCK TABLES t1 WRITE;
|
||||
@@ -1079,7 +1069,3 @@ connection default;
|
||||
disconnect con1;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@@ -3,7 +3,6 @@ SET @@global.sync_frm = OFF;
|
||||
connect locker,localhost,root,,;
|
||||
connect writer,localhost,root,,;
|
||||
connection default;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1( a INT, b INT );
|
||||
CREATE TABLE t2( a INT, b INT );
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4);
|
||||
@@ -31,3 +30,4 @@ DROP TABLE t1,t2;
|
||||
disconnect locker;
|
||||
disconnect writer;
|
||||
SET @@global.sync_frm = @odl_sync_frm;
|
||||
# End of 5.0 tests
|
||||
|
@@ -5,9 +5,6 @@
|
||||
# The test can take hours with valgrind
|
||||
--source include/not_valgrind.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
SET @odl_sync_frm = @@global.sync_frm;
|
||||
SET @@global.sync_frm = OFF;
|
||||
|
||||
@@ -15,9 +12,6 @@ connect (locker,localhost,root,,);
|
||||
connect (writer,localhost,root,,);
|
||||
|
||||
--connection default
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1( a INT, b INT );
|
||||
CREATE TABLE t2( a INT, b INT );
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4);
|
||||
@@ -224,8 +218,4 @@ DROP TABLE t1,t2;
|
||||
|
||||
SET @@global.sync_frm = @odl_sync_frm;
|
||||
|
||||
# End of 5.0 tests
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo # End of 5.0 tests
|
||||
|
@@ -7,9 +7,6 @@
|
||||
# The test can take hours with valgrind
|
||||
--source include/not_valgrind.inc
|
||||
|
||||
# Save the initial number of concurrent sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
SET @odl_sync_frm = @@global.sync_frm;
|
||||
SET @@global.sync_frm = OFF;
|
||||
|
||||
@@ -142,7 +139,3 @@ DROP TABLE t1, t2, t3;
|
||||
--disconnect writer
|
||||
|
||||
SET @@global.sync_frm = @odl_sync_frm;
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@@ -734,9 +734,6 @@ SET DEBUG_SYNC="RESET";
|
||||
#
|
||||
# Bug#57130 crash in Item_field::print during SHOW CREATE TABLE or VIEW
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE FUNCTION f1() RETURNS INTEGER RETURN 1;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1() = 1;
|
||||
@@ -851,16 +848,25 @@ CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
connect con1,localhost,root,,test;
|
||||
DROP TRIGGER tr1;
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t2;
|
||||
SELECT f() FROM t2;
|
||||
ERROR 42000: FUNCTION test.f does not exist
|
||||
connect con2,localhost,root,,test;
|
||||
set debug_sync= 'after_open_table_mdl_shared signal s1';
|
||||
ALTER VIEW v1 AS SELECT f() FROM t1;
|
||||
connection con1;
|
||||
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
connection default;
|
||||
set debug_sync= 'now wait_for s1';
|
||||
SELECT * FROM ( SELECT * FROM v1 ) sq;
|
||||
COMMIT;
|
||||
connection con2;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION IF EXISTS f;
|
||||
DROP TABLE t1, t2;
|
||||
|
@@ -12,10 +12,6 @@
|
||||
# is fixed this test can't be run on embedded version of server.
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# Save the initial number of concurrent sessions.
|
||||
--source include/count_sessions.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Test how we handle locking in various cases when
|
||||
--echo # we read data from MyISAM tables.
|
||||
@@ -921,7 +917,6 @@ connection con1;
|
||||
--echo # Reaping: DROP EVENT t1
|
||||
--reap
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
connection default;
|
||||
DROP EVENT e2;
|
||||
@@ -932,12 +927,6 @@ SET DEBUG_SYNC="RESET";
|
||||
--echo # Bug#57130 crash in Item_field::print during SHOW CREATE TABLE or VIEW
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE FUNCTION f1() RETURNS INTEGER RETURN 1;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1() = 1;
|
||||
@@ -1028,7 +1017,6 @@ set debug_sync='RESET';
|
||||
--echo # during metadata lock upgrade which happens when one tries
|
||||
--echo # to use LOCK TABLES ... READ LOCAL for InnoDB tables.
|
||||
|
||||
--enable_connect_log
|
||||
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (j INT) ENGINE=InnoDB;
|
||||
|
||||
@@ -1074,11 +1062,6 @@ SET DEBUG_SYNC="RESET";
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
DROP TABLES t1, t2;
|
||||
--disable_connect_log
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28567 Assertion `0' in open_tables upon function-related operation
|
||||
@@ -1194,7 +1177,6 @@ COMMIT;
|
||||
--disconnect con1
|
||||
--disconnect con2
|
||||
--connection default
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION IF EXISTS f;
|
||||
DROP TABLE t1, t2;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
connect con1,localhost,root,,;
|
||||
connect con2,localhost,root,,;
|
||||
connection con1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(a INT) ENGINE=innodb;
|
||||
LOCK TABLES t1 WRITE;
|
||||
INSERT INTO t1 VALUES(10);
|
||||
@@ -13,3 +12,4 @@ a
|
||||
DROP TABLE t1;
|
||||
connection default;
|
||||
disconnect con2;
|
||||
# End of 4.1 tests
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user