Bug #17656 Perform Check for User before Creating Views in info_schema.views
Submitted: 22 Feb 2006 23:32 Modified: 3 Jan 2007 9:57
Reporter: Chris Calender Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Views Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any
Triage: D5 (Feature request)

[22 Feb 2006 23:32] Chris Calender
Description:
A customer has requested that we perform a check when loading data, so that a view record cannot be created in the information_schema.views table if it attempts to insert a DEFINER value that does not already exist in the database.

This is related to several bugs (13331 and 16589), which may correct this behaviour, but if not, it may be useful.

How to repeat:
Basically, there is nothing to repeat.  It is just a feature request.
[26 Dec 2006 13:03] Valeriy Kravchuk
Thank you for a reasonable feature request. Now, in 5.0.34-BK, we have the following behaviour:

mysql> create definer='unknown'@'locahost' view vvuu as select 1;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> show warnings\G
*************************** 1. row ***************************
  Level: Note
   Code: 1449
Message: There is no 'unknown'@'locahost' registered
1 row in set (0.01 sec)

mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.0.34-debug |
+--------------+
1 row in set (0.00 sec)

So, maybe we just need new SQL mode that will treat this as error, not simply as warning. Please, check is there is still any need to implement something related to this feature request.