mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Merge neptunus.(none):/home/msvensson/mysql/bug15775_part2/my41-bug15775_part2
into neptunus.(none):/home/msvensson/mysql/bug15775_part2/my50-bug15775_part2 mysql-test/r/grant2.result: Merge test results mysql-test/t/grant2.test: Merge tests sql/sql_acl.cc: Removing the 4.1 version patch
This commit is contained in:
commit
50545a1825
2 changed files with 45 additions and 0 deletions
|
@ -107,6 +107,18 @@ delete from mysql.columns_priv where user like 'mysqltest\_%';
|
|||
flush privileges;
|
||||
drop database mysqltest;
|
||||
use test;
|
||||
insert into mysql.user (user, host) values
|
||||
('mysqltest_1', 'host1'),
|
||||
('mysqltest_2', 'host2'),
|
||||
('mysqltest_3', 'host3'),
|
||||
('mysqltest_4', 'host4'),
|
||||
('mysqltest_5', 'host5'),
|
||||
('mysqltest_6', 'host6'),
|
||||
('mysqltest_7', 'host7');
|
||||
flush privileges;
|
||||
drop user mysqltest_3@host3;
|
||||
drop user mysqltest_1@host1, mysqltest_2@host2, mysqltest_4@host4,
|
||||
mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7;
|
||||
set sql_mode='maxdb';
|
||||
drop table if exists t1, t2;
|
||||
create table t1(c1 int);
|
||||
|
|
|
@ -155,6 +155,39 @@ flush privileges;
|
|||
drop database mysqltest;
|
||||
use test;
|
||||
|
||||
|
||||
#
|
||||
# Bug #15775: "drop user" command does not refresh acl_check_hosts
|
||||
#
|
||||
|
||||
# Create some test users
|
||||
insert into mysql.user (user, host) values
|
||||
('mysqltest_1', 'host1'),
|
||||
('mysqltest_2', 'host2'),
|
||||
('mysqltest_3', 'host3'),
|
||||
('mysqltest_4', 'host4'),
|
||||
('mysqltest_5', 'host5'),
|
||||
('mysqltest_6', 'host6'),
|
||||
('mysqltest_7', 'host7');
|
||||
flush privileges;
|
||||
|
||||
# Drop one user
|
||||
drop user mysqltest_3@host3;
|
||||
|
||||
# This connect failed before fix since the acl_check_hosts list was corrupted by the "drop user"
|
||||
connect (con8,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
disconnect con8;
|
||||
connection default;
|
||||
|
||||
# Clean up - Drop all of the remaining users at once
|
||||
drop user mysqltest_1@host1, mysqltest_2@host2, mysqltest_4@host4,
|
||||
mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7;
|
||||
|
||||
# Check that it's still possible to connect
|
||||
connect (con9,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
disconnect con9;
|
||||
connection default;
|
||||
|
||||
#
|
||||
# Create and drop user
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue