Bug #22761 mysqldump reports no errors when using --routines without mysql.proc privileges

Submitted: 27 Sep 2006 19:43 Modified: 23 Apr 2007 14:22
Reporter: Mark Leith Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S2 (Serious)
Version:5.0.24 OS:Any (Any)
Assigned to: Assigned Account CPU Architecture:Any
Tags: mysqldump, privileges, routines

[27 Sep 2006 19:43] Mark Leith
Description:
mysqldump returns no errors, and silently ignores CREATE PROCEDURE statements, when running the dump using a user that does not have SELECT privileges for the mysql.proc table.

This is silently allowing inconsistent backups.

How to repeat:
use test;
drop table t1;
create table t1 (i int);
drop procedure p1;
delimiter //
create procedure p1() begin select 1; end//
delimiter ;
grant all on test.* to test@localhost;
exit
mysqldump -u test --routines --databases test > test.sql
grep p1 test.sql

Suggested fix:
Raise an error with mysqldump when privileges are lacking, or drop the requirement for privileges on mysql.proc to be able to use the --routines option.
[23 Apr 2007 14:22] Tatiana Azundris Nuernberg
fixed in patch for Bug#27293
[1 May 2007 20:58] Bugs System
Pushed into 5.1.18-beta
[1 May 2007 20:59] Bugs System
Pushed into 5.0.42

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.060 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.