mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
This commit is contained in:
@ -1252,6 +1252,80 @@ CURRENT_USER()
|
||||
root@localhost
|
||||
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
|
||||
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
|
||||
|
||||
# Bug#57952
|
||||
|
||||
DROP DATABASE IF EXISTS mysqltest1;
|
||||
DROP DATABASE IF EXISTS mysqltest2;
|
||||
CREATE DATABASE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
use mysqltest1;
|
||||
CREATE TABLE t1(a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
CREATE TABLE t2(a INT);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
CREATE TABLE mysqltest2.t3(a INT);
|
||||
INSERT INTO mysqltest2.t3 VALUES (4);
|
||||
CREATE USER testuser@localhost;
|
||||
GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
|
||||
GRANT SELECT(b) ON t1 TO testuser@localhost;
|
||||
GRANT SELECT ON t2 TO testuser@localhost;
|
||||
GRANT SELECT ON mysqltest2.* TO testuser@localhost;
|
||||
|
||||
# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
|
||||
PREPARE s1 FROM 'SELECT b FROM t1';
|
||||
PREPARE s2 FROM 'SELECT a FROM t2';
|
||||
PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
|
||||
CREATE PROCEDURE p1() SELECT b FROM t1;
|
||||
CREATE PROCEDURE p2() SELECT a FROM t2;
|
||||
CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
|
||||
CALL p1;
|
||||
b
|
||||
1
|
||||
CALL p2;
|
||||
a
|
||||
2
|
||||
CALL p3;
|
||||
Tables_in_mysqltest2
|
||||
t3
|
||||
|
||||
# Connection: default
|
||||
REVOKE SELECT ON t1 FROM testuser@localhost;
|
||||
GRANT SELECT(a) ON t1 TO testuser@localhost;
|
||||
REVOKE SELECT ON t2 FROM testuser@localhost;
|
||||
REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
|
||||
|
||||
# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
|
||||
# - Check column-level privileges...
|
||||
EXECUTE s1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
|
||||
SELECT b FROM t1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
|
||||
EXECUTE s1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
|
||||
CALL p1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
|
||||
# - Check table-level privileges...
|
||||
SELECT a FROM t2;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
|
||||
EXECUTE s2;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
|
||||
CALL p2;
|
||||
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
|
||||
# - Check database-level privileges...
|
||||
SHOW TABLES FROM mysqltest2;
|
||||
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
|
||||
EXECUTE s3;
|
||||
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
|
||||
CALL p3;
|
||||
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
|
||||
|
||||
# Connection: default
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
DROP USER testuser@localhost;
|
||||
use test;
|
||||
|
||||
End of 5.0 tests
|
||||
set names utf8;
|
||||
grant select on test.* to юзер_юзер@localhost;
|
||||
|
Reference in New Issue
Block a user