mariadb/mysql-test/main/gis_notembedded.test
Dmitry Shulga eeb00ceffd MDEV-35617: DROP USER should leave no active session for that user
Follow-up patch with adjustments of test files and updates of result
files for tests.

Some of tests were rewritten slighlty. Everywhere where common
pattern used:
-----
  CREATE USER userA;
  --connect con1 ... userA ...
   <sql statements...>
  --disconnect con1
  DROP USER userA;
-----
the DROP USER statement has been eclosed into the directive
--disable_warnings
--enable_warnings

This change is caused by the race conddition between --disconnect
and DROP USER since a number of currently running sessions
established on behalf the user being dropped is counted by
holding the rw_lock THD_list_iterator::lock that is not acquired on
execution the DROP USER statement but the lock is taken as the last
step on handling disconnection (when the client is already sending
the next statement). Therefore, for the cases where the command
 --disconnect precedes the DROP USER statement
we hide the possible warnings about presence of active sessions
for the user being deleted to make tests deterministic.
2025-06-09 18:24:28 +07:00

26 lines
773 B
Text

source include/not_embedded.inc;
#
# MDEV-60 Support for Spatial Reference systems for the GIS data.
#
show create procedure mysql.AddGeometryColumn;
show create procedure mysql.DropGeometryColumn;
create table t1 (a int, b int);
call mysql.AddGeometryColumn('', 'test', 't1', 'c', 10);
show create table t1;
call mysql.DropGeometryColumn('', 'test', 't1', 'c');
show create table t1;
call mysql.DropGeometryColumn('', 'test', 't1', 'b');
show create table t1;
drop table t1;
create user foo@localhost;
grant execute on mysql.* to foo@localhost;
connect (foo, localhost, foo);
--error ER_TABLEACCESS_DENIED_ERROR
call mysql.AddGeometryColumn('', 'mysql', 'proc', 'c', 10);
disconnect foo;
connection default;
--disable_warnings
drop user foo@localhost;
--enable_warnings