summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2006-09-05 13:44:07 -0400
committerunknown <cmiller@zippy.cornsilk.net>2006-09-05 13:44:07 -0400
commit9b7a511ac14460662760c67dd8060ae53408c6f3 (patch)
tree33c96ae70dce3377eed5d1515430cd6412b6da03 /mysql-test
parentae3757a901ccbf99e1a59379d82f44965f67e998 (diff)
parent8f0b5afa220735d1b4e5e00766f7dbd9bd6e3187 (diff)
downloadmariadb-git-9b7a511ac14460662760c67dd8060ae53408c6f3.tar.gz
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint mysql-test/r/grant.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/view.test: Auto merged sql/sql_acl.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/grant.result3
-rw-r--r--mysql-test/r/view.result22
-rw-r--r--mysql-test/t/view.test83
3 files changed, 56 insertions, 52 deletions
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 1c3f6c8b4ef..ee6a96b64a5 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -945,8 +945,9 @@ DROP TABLE mysqltest3.t_nn;
DROP DATABASE mysqltest3;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
DROP USER 'mysqltest_1'@'localhost';
+use test;
create user mysqltest1_thisisreallytoolong;
-ERROR HY000: Operation CREATE USER failed for 'mysqltest1_thisisreallytoolong'@'%'
+ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16)
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;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index e65be9a9a57..dddfc6be162 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2860,17 +2860,6 @@ SHOW TABLES;
Tables_in_test
t1
DROP TABLE t1;
-DROP TABLE IF EXISTS t1;
-DROP VIEW IF EXISTS v1;
-DROP VIEW IF EXISTS v2;
-CREATE TABLE t1(a INT, b INT);
-CREATE DEFINER=1234567890abcdefGHIKL@localhost
-VIEW v1 AS SELECT a FROM t1;
-ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
-CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
-VIEW v2 AS SELECT b FROM t1;
-ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
-DROP TABLE t1;
DROP VIEW IF EXISTS v1;
CREATE DATABASE bug21261DB;
USE bug21261DB;
@@ -2901,6 +2890,17 @@ View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` where (`t1`.`f1` between now() and (now() + interval 1 minute))
drop view v1;
drop table t1;
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP VIEW IF EXISTS v2;
+CREATE TABLE t1(a INT, b INT);
+CREATE DEFINER=1234567890abcdefGHIKL@localhost
+VIEW v1 AS SELECT a FROM t1;
+ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
+CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY
+VIEW v2 AS SELECT b FROM t1;
+ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
+DROP TABLE t1;
DROP FUNCTION IF EXISTS f1;
DROP FUNCTION IF EXISTS f2;
DROP VIEW IF EXISTS v1, v2;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 92bedd8cb6b..5e419ec003c 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -2747,9 +2747,52 @@ DROP VIEW t1,v1;
SHOW TABLES;
DROP TABLE t1;
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+#
+# Bug #21261: Wrong access rights was required for an insert to a view
+#
+CREATE DATABASE bug21261DB;
+USE bug21261DB;
+CONNECT (root,localhost,root,,bug21261DB);
+CONNECTION root;
+CREATE TABLE t1 (x INT);
+CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT x FROM t1;
+GRANT INSERT, UPDATE ON v1 TO 'user21261'@'localhost';
+GRANT INSERT, UPDATE ON t1 TO 'user21261'@'localhost';
+CREATE TABLE t2 (y INT);
+GRANT SELECT ON t2 TO 'user21261'@'localhost';
+
+CONNECT (user21261, localhost, user21261,, bug21261DB);
+CONNECTION user21261;
+INSERT INTO v1 (x) VALUES (5);
+UPDATE v1 SET x=1;
+CONNECTION root;
+GRANT SELECT ON v1 TO 'user21261'@'localhost';
+GRANT SELECT ON t1 TO 'user21261'@'localhost';
+CONNECTION user21261;
+UPDATE v1,t2 SET x=1 WHERE x=y;
+CONNECTION root;
+SELECT * FROM t1;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user21261'@'localhost';
+DROP USER 'user21261'@'localhost';
+DROP VIEW v1;
+DROP TABLE t1;
+DROP DATABASE bug21261DB;
+USE test;
#
+# Bug #15950: NOW() optimized away in VIEWs
+#
+create table t1 (f1 datetime);
+create view v1 as select * from t1 where f1 between now() and now() + interval 1 minute;
+show create view v1;
+drop view v1;
+drop table t1;
+#
# Test for BUG#16899: Possible buffer overflow in handling of DEFINER-clause.
#
@@ -2822,45 +2865,5 @@ DROP FUNCTION f2;
DROP VIEW v1, v2;
DROP TABLE t1;
-#
-# Bug #21261: Wrong access rights was required for an insert to a view
-#
-CREATE DATABASE bug21261DB;
-USE bug21261DB;
-CONNECT (root,localhost,root,,bug21261DB);
-CONNECTION root;
-CREATE TABLE t1 (x INT);
-CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT x FROM t1;
-GRANT INSERT, UPDATE ON v1 TO 'user21261'@'localhost';
-GRANT INSERT, UPDATE ON t1 TO 'user21261'@'localhost';
-CREATE TABLE t2 (y INT);
-GRANT SELECT ON t2 TO 'user21261'@'localhost';
-
-CONNECT (user21261, localhost, user21261,, bug21261DB);
-CONNECTION user21261;
-INSERT INTO v1 (x) VALUES (5);
-UPDATE v1 SET x=1;
-CONNECTION root;
-GRANT SELECT ON v1 TO 'user21261'@'localhost';
-GRANT SELECT ON t1 TO 'user21261'@'localhost';
-CONNECTION user21261;
-UPDATE v1,t2 SET x=1 WHERE x=y;
-CONNECTION root;
-SELECT * FROM t1;
-REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user21261'@'localhost';
-DROP USER 'user21261'@'localhost';
-DROP VIEW v1;
-DROP TABLE t1;
-DROP DATABASE bug21261DB;
-USE test;
-
-#
-# Bug #15950: NOW() optimized away in VIEWs
-#
-create table t1 (f1 datetime);
-create view v1 as select * from t1 where f1 between now() and now() + interval 1 minute;
-show create view v1;
-drop view v1;
-drop table t1;
--echo End of 5.0 tests.