Bug #16672 Get Error 1446 Definer is not fully qualified when creating View
Submitted: 20 Jan 2006 14:51 Modified: 24 Jan 2006 18:12
Reporter: Eric Fauvel Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.18 OS:Linux (Linux)
Assigned to: MySQL Verification Team CPU Architecture:Any

[20 Jan 2006 14:51] Eric Fauvel
Description:
I get ERROR 1446 (HY000): Definer is not fully qualifed, if I try to make a View when connected with user that has All Privileges from Any Host.
(create view ViewName as select * from TableName;)

If I try to specify the definer using my username I get ERROR 2013 (HY000): Lost connection to MySQL server during query.
(create definer='currentuser'@'%' view ViewName as select * from TableName;)

After the errors I need to disconnect and reconnect before trying anything else because I get ERROR 2006 (HY000): MySQL server has gone away.

Once reconnected I can create the view only if I specify the definer as any user but the current_user.

How to repeat:
Connect with user that has All rights from Any Host and you will be getting this error.
[24 Jan 2006 18:12] MySQL Verification Team
I was unable to repeat this issue with current source server:

miguel@hegel:~/dbs/5.0> bin/mysqladmin -uroot create db1
miguel@hegel:~/dbs/5.0> bin/mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.19-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all on db1.* to 'miguel'@'%' identified by 'testbug';
Query OK, 0 rows affected (0.02 sec)

c:\mysql\bin>mysql -umiguel -ptestbug -h192.168.0.119 db1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.19-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table tb1 (id int);
Query OK, 0 rows affected (0.01 sec)

mysql> create view vtb1 as select * from tb1;
Query OK, 0 rows affected (0.02 sec)

mysql> show create view vtb1\G
*************************** 1. row ***************************
       View: vtb1
Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`miguel`@`%` SQL SECURITY DEFINER VIEW `vtb1` AS select `tb1`.`id` AS `id` from `tb1`
1 row in set (0.00 sec)

mysql>