Bug #36663 merge requires update/delete permissions for source tables
Submitted: 12 May 2008 8:01 Modified: 12 May 2008 18:07
Reporter: Mikhail Solovyev Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Merge storage engine Severity:S3 (Non-critical)
Version:5.0.51a-3 OS:Linux (Debian Etch)
Assigned to: CPU Architecture:Any

[12 May 2008 8:01] Mikhail Solovyev
Description:
There is a user, which has only select privilege to database 'test', and full privileges to database 'test1'. There are two tables in 'test' database ('t1', 't2'), and he wants to create a table using merge engine in 'test1' database. But it fails with error about missing UPDATE and DELETE permissions for table 't1'.

How to repeat:
#mysql -uroot test
CREATE TABLE t1 (
   a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
   message CHAR(20)) ENGINE=MyISAM;
CREATE TABLE t2 (
   a INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
   message CHAR(20)) ENGINE=MyISAM;
INSERT INTO t1 (message) VALUES ('Testing'),('table'),('t1');
INSERT INTO t2 (message) VALUES ('Testing'),('table'),('t2');
grant  SELECT on test.* to 'merger'@'localhost';
grant  all privileges on test1.* to 'merger'@'localhost';
exit

#mysql -umerger test1
CREATE TABLE total (    a INT NOT NULL AUTO_INCREMENT,    message CHAR(20), INDEX(a))    ENGINE=MERGE UNION=(test.t1,test.t2) INSERT_METHOD=LAST;
ERROR 1142 (42000): UPDATE,DELETE command denied to user 'merger'@'localhost' for table 't1'
[12 May 2008 18:07] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

According to http://dev.mysql.com/doc/refman/5.0/en/merge-storage-engine.html: "You must have SELECT, UPDATE, and DELETE privileges on the MyISAM tables that you map to a MERGE table."

So I close the report as "Not a Bug"