mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge with 4.1
BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-Makefile.am: Auto merged BitKeeper/deleted/.del-Makefile.am~1: Delete: Docs/Images/Makefile.am client/mysqltest.c: Auto merged include/mysql.h: Auto merged libmysql/libmysql.c: Auto merged myisam/mi_check.c: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/r/ps_1general.result: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged mysql-test/t/ps_1general.test: Auto merged sql/field.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/mysqld.cc: Auto merged sql/share/french/errmsg.txt: Auto merged sql/share/greek/errmsg.txt: Auto merged sql/sql_acl.cc: Auto merged sql/sql_table.cc: Auto merged sql/time.cc: Auto merged sql-common/my_time.c: Auto merged sql/share/portuguese/errmsg.txt: Auto merged sql/share/romanian/errmsg.txt: Auto merged sql/share/serbian/errmsg.txt: Auto merged sql/share/spanish/errmsg.txt: Auto merged sql/share/swedish/errmsg.txt: Auto merged configure.in: Merge with 4.0 mysql-test/r/mix_innodb_myisam_binlog.result: Merge with 4.0 mysys/default.c: Merge with 4.1 (to get new extension handling) sql/log.cc: Merge with 4.0 tests/client_test.c: Merge with 4.1 (to get possibility to run any tests)
This commit is contained in:
@ -134,6 +134,31 @@ ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
|
||||
select 1;
|
||||
1
|
||||
1
|
||||
insert into mysql.user (host, user) values ('localhost', 'test11');
|
||||
insert into mysql.db (host, db, user, select_priv) values
|
||||
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
|
||||
alter table mysql.db order by db asc;
|
||||
flush privileges;
|
||||
show grants for test11@localhost;
|
||||
Grants for test11@localhost
|
||||
GRANT USAGE ON *.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
|
||||
alter table mysql.db order by db desc;
|
||||
flush privileges;
|
||||
show grants for test11@localhost;
|
||||
Grants for test11@localhost
|
||||
GRANT USAGE ON *.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
|
||||
delete from mysql.user where user='test11';
|
||||
delete from mysql.db where user='test11';
|
||||
create database mysqltest1;
|
||||
grant usage on mysqltest1.* to test6123 identified by 'magic123';
|
||||
select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1";
|
||||
host db user select_priv insert_priv
|
||||
delete from mysql.user where user='test6123';
|
||||
drop database mysqltest1;
|
||||
create table t1 (a int);
|
||||
grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
|
||||
show grants for drop_user2@localhost;
|
||||
@ -229,25 +254,6 @@ GRANT SELECT (
|
||||
REVOKE SELECT (<28><><EFBFBD>) ON <20><>.<2E><><EFBFBD> FROM <20><><EFBFBD><EFBFBD>@localhost;
|
||||
DROP DATABASE <20><>;
|
||||
SET NAMES latin1;
|
||||
insert into mysql.user (host, user) values ('localhost', 'test11');
|
||||
insert into mysql.db (host, db, user, select_priv) values
|
||||
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
|
||||
alter table mysql.db order by db asc;
|
||||
flush privileges;
|
||||
show grants for test11@localhost;
|
||||
Grants for test11@localhost
|
||||
GRANT USAGE ON *.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
|
||||
alter table mysql.db order by db desc;
|
||||
flush privileges;
|
||||
show grants for test11@localhost;
|
||||
Grants for test11@localhost
|
||||
GRANT USAGE ON *.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `ab%`.* TO 'test11'@'localhost'
|
||||
GRANT SELECT ON `a%`.* TO 'test11'@'localhost'
|
||||
delete from mysql.user where user='test11';
|
||||
delete from mysql.db where user='test11';
|
||||
USE test;
|
||||
CREATE TABLE t1 (a int );
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
|
Reference in New Issue
Block a user