List:Commits« Previous MessageNext Message »
From:holyfoot Date:May 11 2007 7:18pm
Subject:bk commit into 5.1 tree (holyfoot:1.2523)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-05-12 00:18:36+05:00, holyfoot@stripped +1 -0
  merging fix

  mysql-test/r/grant.result@stripped, 2007-05-12 00:18:34+05:00, holyfoot@stripped +88 -2
    merging fix

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	holyfoot
# Host:	hfmain.(none)
# Root:	/home/hf/work/27957/my51-27957

--- 1.75/mysql-test/r/grant.result	2007-05-12 00:18:40 +05:00
+++ 1.76/mysql-test/r/grant.result	2007-05-12 00:18:40 +05:00
@@ -923,7 +923,7 @@ ERROR 42000: SELECT command denied to us
 SHOW CREATE TABLE mysqltest2.t_nn;
 Table	Create Table
 t_nn	CREATE TABLE `t_nn` (
-  `c1` int(11) default NULL
+  `c1` int(11) DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 SHOW CREATE VIEW  mysqltest2.t_nn;
 ERROR HY000: 'mysqltest2.t_nn' is not VIEW
@@ -942,7 +942,7 @@ v_nn	CREATE ALGORITHM=UNDEFINED DEFINER=
 SHOW CREATE TABLE mysqltest2.t_nn;
 Table	Create Table
 t_nn	CREATE TABLE `t_nn` (
-  `c1` int(11) default NULL
+  `c1` int(11) DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 SHOW CREATE VIEW mysqltest2.t_nn;
 ERROR HY000: 'mysqltest2.t_nn' is not VIEW
@@ -960,6 +960,72 @@ DROP USER 'mysqltest_1'@'localhost';
 use test;
 create user mysqltest1_thisisreallytoolong;
 ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16)
+CREATE DATABASE mysqltest1;
+CREATE TABLE mysqltest1.t1 (
+int_field INTEGER UNSIGNED NOT NULL,
+char_field CHAR(10),
+INDEX(`int_field`)
+);
+CREATE TABLE mysqltest1.t2 (int_field INT);
+"Now check that we require equivalent grants for "
+"RENAME TABLE and ALTER TABLE"
+CREATE USER mysqltest_1@localhost;
+GRANT SELECT ON mysqltest1.t1 TO mysqltest_1@localhost;
+SELECT USER();
+USER()
+mysqltest_1@localhost
+SHOW GRANTS;
+Grants for mysqltest_1@localhost
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
+GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
+RENAME TABLE t1 TO t2;
+ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ALTER TABLE t1 RENAME TO t2;
+ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost;
+RENAME TABLE t1 TO t2;
+ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ALTER TABLE t1 RENAME TO t2;
+ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1'
+GRANT ALTER ON mysqltest1.t1 TO mysqltest_1@localhost;
+SHOW GRANTS;
+Grants for mysqltest_1@localhost
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
+GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
+RENAME TABLE t1 TO t2;
+ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
+ALTER TABLE t1 RENAME TO t2;
+ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
+GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost;
+SHOW GRANTS;
+Grants for mysqltest_1@localhost
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
+GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
+GRANT INSERT, SELECT, CREATE, ALTER, DROP ON mysqltest1.t2 TO mysqltest_1@localhost;
+DROP TABLE mysqltest1.t2;
+SHOW GRANTS;
+Grants for mysqltest_1@localhost
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
+GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost'
+GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
+RENAME TABLE t1 TO t2;
+RENAME TABLE t2 TO t1;
+ALTER TABLE t1 RENAME TO t2;
+ALTER TABLE t2 RENAME TO t1;
+REVOKE DROP, INSERT ON mysqltest1.t1 FROM mysqltest_1@localhost;
+REVOKE DROP, INSERT ON mysqltest1.t2 FROM mysqltest_1@localhost;
+SHOW GRANTS;
+Grants for mysqltest_1@localhost
+GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
+GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost'
+GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost'
+RENAME TABLE t1 TO t2;
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+ALTER TABLE t1 RENAME TO t2;
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
+DROP USER mysqltest_1@localhost;
+DROP DATABASE mysqltest1;
+USE test;
 GRANT CREATE ON mysqltest.* TO 1234567890abcdefGHIKL@localhost;
 ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
 GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
@@ -984,6 +1050,26 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234
 ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
 REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
 ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
+CREATE USER bug23556@localhost;
+CREATE DATABASE bug23556;
+GRANT SELECT ON bug23556.* TO bug23556@localhost;
+USE bug23556;
+CREATE TABLE t1 (a INT PRIMARY KEY);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+GRANT DELETE ON t1 TO bug23556@localhost;
+USE bug23556;
+TRUNCATE t1;
+ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table 't1'
+USE bug23556;
+REVOKE DELETE ON t1 FROM bug23556@localhost;
+GRANT DROP ON t1 TO bug23556@localhost;
+USE bug23556;
+TRUNCATE t1;
+USE bug23556;
+DROP TABLE t1;
+USE test;
+DROP DATABASE bug23556;
+DROP USER bug23556@localhost;
 GRANT PROCESS ON * TO user@localhost;
 ERROR 3D000: No database selected
 DROP DATABASE IF EXISTS mysqltest1;
Thread
bk commit into 5.1 tree (holyfoot:1.2523)holyfoot11 May