mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
A patch for Bug#21854: Problems with CREATE TRIGGER without
DEFINER clause in --skip-grant-tables mode. Update error message.
This commit is contained in:
@ -128,7 +128,7 @@ grant show view on v6 to testdb_2@localhost;
|
|||||||
create table t2 (f1 char(4));
|
create table t2 (f1 char(4));
|
||||||
create definer=`no_such_user`@`no_such_host` view v7 as select * from t2;
|
create definer=`no_such_user`@`no_such_host` view v7 as select * from t2;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no_such_user'@'no_such_host' registered
|
Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered
|
||||||
show fields from testdb_1.v6;
|
show fields from testdb_1.v6;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
f1 char(4) YES NULL
|
f1 char(4) YES NULL
|
||||||
@ -144,7 +144,7 @@ show fields from testdb_1.v7;
|
|||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
f1 char(4) YES NULL
|
f1 char(4) YES NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no_such_user'@'no_such_host' registered
|
Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered
|
||||||
create table t3 (f1 char(4), f2 char(4));
|
create table t3 (f1 char(4), f2 char(4));
|
||||||
create view v3 as select f1,f2 from t3;
|
create view v3 as select f1,f2 from t3;
|
||||||
grant insert(f1), insert(f2) on v3 to testdb_2@localhost;
|
grant insert(f1), insert(f2) on v3 to testdb_2@localhost;
|
||||||
@ -164,7 +164,7 @@ show fields from testdb_1.v7;
|
|||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
f1 char(4) YES NULL
|
f1 char(4) YES NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no_such_user'@'no_such_host' registered
|
Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered
|
||||||
show create view testdb_1.v7;
|
show create view testdb_1.v7;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v7 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2` latin1 latin1_swedish_ci
|
v7 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2` latin1 latin1_swedish_ci
|
||||||
|
@ -357,10 +357,10 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
|||||||
use mysqltest;
|
use mysqltest;
|
||||||
CREATE DEFINER='a @ b @ c'@localhost PROCEDURE wl2897_p3() SELECT 3;
|
CREATE DEFINER='a @ b @ c'@localhost PROCEDURE wl2897_p3() SELECT 3;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'a @ b @ c'@'localhost' registered
|
Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') is invalid or not registered
|
||||||
CREATE DEFINER='a @ b @ c'@localhost FUNCTION wl2897_f3() RETURNS INT RETURN 3;
|
CREATE DEFINER='a @ b @ c'@localhost FUNCTION wl2897_f3() RETURNS INT RETURN 3;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'a @ b @ c'@'localhost' registered
|
Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') is invalid or not registered
|
||||||
|
|
||||||
---> connection: con1root
|
---> connection: con1root
|
||||||
use mysqltest;
|
use mysqltest;
|
||||||
@ -420,9 +420,9 @@ DROP USER mysqltest_1@localhost;
|
|||||||
---> connection: mysqltest_2_con
|
---> connection: mysqltest_2_con
|
||||||
use mysqltest;
|
use mysqltest;
|
||||||
CALL bug13198_p1();
|
CALL bug13198_p1();
|
||||||
ERROR HY000: There is no 'mysqltest_1'@'localhost' registered
|
ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') is invalid or not registered
|
||||||
SELECT bug13198_f1();
|
SELECT bug13198_f1();
|
||||||
ERROR HY000: There is no 'mysqltest_1'@'localhost' registered
|
ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') is invalid or not registered
|
||||||
|
|
||||||
---> connection: root
|
---> connection: root
|
||||||
DROP USER mysqltest_2@localhost;
|
DROP USER mysqltest_2@localhost;
|
||||||
|
@ -133,9 +133,9 @@ CREATE DEFINER='mysqltest_nonexs'@'localhost'
|
|||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
SET @new_sum = 0;
|
SET @new_sum = 0;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'mysqltest_nonexs'@'localhost' registered
|
Note 1449 The user specified as a definer ('mysqltest_nonexs'@'localhost') is invalid or not registered
|
||||||
INSERT INTO t1 VALUES(6);
|
INSERT INTO t1 VALUES(6);
|
||||||
ERROR HY000: There is no 'mysqltest_nonexs'@'localhost' registered
|
ERROR HY000: The user specified as a definer ('mysqltest_nonexs'@'localhost') is invalid or not registered
|
||||||
SHOW TRIGGERS;
|
SHOW TRIGGERS;
|
||||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||||
trg1 INSERT t1 SET @new_sum = 0 BEFORE NULL mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
trg1 INSERT t1 SET @new_sum = 0 BEFORE NULL mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
@ -515,10 +515,10 @@ drop user mysqltest_1@localhost;
|
|||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
create definer=some_user@`` sql security invoker view v1 as select 1;
|
create definer=some_user@`` sql security invoker view v1 as select 1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'some_user'@'' registered
|
Note 1449 The user specified as a definer ('some_user'@'') is invalid or not registered
|
||||||
create definer=some_user@localhost sql security invoker view v2 as select 1;
|
create definer=some_user@localhost sql security invoker view v2 as select 1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'some_user'@'localhost' registered
|
Note 1449 The user specified as a definer ('some_user'@'localhost') is invalid or not registered
|
||||||
show create view v1;
|
show create view v1;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci
|
||||||
@ -601,14 +601,14 @@ CREATE TABLE t1 (a INT PRIMARY KEY);
|
|||||||
INSERT INTO t1 VALUES (1), (2), (3);
|
INSERT INTO t1 VALUES (1), (2), (3);
|
||||||
CREATE DEFINER = 'no-such-user'@localhost VIEW v AS SELECT a from t1;
|
CREATE DEFINER = 'no-such-user'@localhost VIEW v AS SELECT a from t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no-such-user'@'localhost' registered
|
Note 1449 The user specified as a definer ('no-such-user'@'localhost') is invalid or not registered
|
||||||
SHOW CREATE VIEW v;
|
SHOW CREATE VIEW v;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `test`.`t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
|
v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `test`.`t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||||
SELECT * FROM v;
|
SELECT * FROM v;
|
||||||
ERROR HY000: There is no 'no-such-user'@'localhost' registered
|
ERROR HY000: The user specified as a definer ('no-such-user'@'localhost') is invalid or not registered
|
||||||
DROP VIEW v;
|
DROP VIEW v;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
USE test;
|
USE test;
|
||||||
@ -722,7 +722,7 @@ SELECT * FROM v1;
|
|||||||
ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1'
|
ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1'
|
||||||
for a superuser
|
for a superuser
|
||||||
SELECT * FROM v1;
|
SELECT * FROM v1;
|
||||||
ERROR HY000: There is no 'def_17254'@'localhost' registered
|
ERROR HY000: The user specified as a definer ('def_17254'@'localhost') is invalid or not registered
|
||||||
DROP USER inv_17254@localhost;
|
DROP USER inv_17254@localhost;
|
||||||
DROP DATABASE db17254;
|
DROP DATABASE db17254;
|
||||||
DROP DATABASE IF EXISTS mysqltest_db1;
|
DROP DATABASE IF EXISTS mysqltest_db1;
|
||||||
@ -932,7 +932,7 @@ View Create View character_set_client collation_connection
|
|||||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
||||||
ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1;
|
ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no_such'@'user_1' registered
|
Note 1449 The user specified as a definer ('no_such'@'user_1') is invalid or not registered
|
||||||
SHOW CREATE VIEW v1;
|
SHOW CREATE VIEW v1;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
||||||
@ -940,7 +940,7 @@ Warnings:
|
|||||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||||
ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
|
ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no_such'@'user_1' registered
|
Note 1449 The user specified as a definer ('no_such'@'user_1') is invalid or not registered
|
||||||
SHOW CREATE VIEW v1;
|
SHOW CREATE VIEW v1;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
||||||
@ -948,7 +948,7 @@ Warnings:
|
|||||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||||
ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1;
|
ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1449 There is no 'no_such'@'user_2' registered
|
Note 1449 The user specified as a definer ('no_such'@'user_2') is invalid or not registered
|
||||||
SHOW CREATE VIEW v1;
|
SHOW CREATE VIEW v1;
|
||||||
View Create View character_set_client collation_connection
|
View Create View character_set_client collation_connection
|
||||||
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci
|
||||||
|
@ -5584,8 +5584,7 @@ ER_VIEW_OTHER_USER
|
|||||||
eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer"
|
eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer"
|
||||||
ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen"
|
ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen"
|
||||||
ER_NO_SUCH_USER
|
ER_NO_SUCH_USER
|
||||||
eng "There is no '%-.64s'@'%-.64s' registered"
|
eng "The user specified as a definer ('%-.64s'@'%-.64s') does not exist"
|
||||||
ger "'%-.64s'@'%-.64s' ist nicht registriert"
|
|
||||||
ER_FORBID_SCHEMA_CHANGE
|
ER_FORBID_SCHEMA_CHANGE
|
||||||
eng "Changing schema from '%-.192s' to '%-.192s' is not allowed."
|
eng "Changing schema from '%-.192s' to '%-.192s' is not allowed."
|
||||||
ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt"
|
ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt"
|
||||||
|
Reference in New Issue
Block a user