Commit 4b579171 authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0

into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
parents 9744e7f8 234bb881
This diff is collapsed.
......@@ -2875,3 +2875,19 @@ use mysqldump_dbb;
drop view v1;
drop table t1;
drop database mysqldump_dbb;
use test;
create user mysqltest_1;
create table t1(a int, b varchar(34));
mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need the RELOAD privilege for this operation (1227)
mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need the RELOAD privilege for this operation (1227)
grant RELOAD on *.* to mysqltest_1@localhost;
mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227)
mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227)
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000003', MASTER_LOG_POS=9227;
CREATE TABLE `t1` (
`a` int(11) default NULL,
`b` varchar(34) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
drop table t1;
drop user mysqltest_1;
......@@ -1266,3 +1266,43 @@ use mysqldump_dbb;
drop view v1;
drop table t1;
drop database mysqldump_dbb;
#
# Bug#21215 mysqldump creating incomplete backups without warning
#
use test;
# Create user without sufficient privs to perform the requested operation
create user mysqltest_1;
create table t1(a int, b varchar(34));
# Execute mysqldump, will fail on FLUSH TABLES
--error 2
--exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1
# Execute mysqldump, will fail on FLUSH TABLES
# use --force, should no affect behaviour
--error 2
--exec $MYSQL_DUMP --compact --force --master-data -u mysqltest_1 test 2>&1
# Add RELOAD grants
grant RELOAD on *.* to mysqltest_1@localhost;
# Execute mysqldump, will fail on SHOW MASTER STATUS
--error 2
--exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1
# Execute mysqldump, will fail on SHOW MASTER STATUS.
# use --force, should not alter behaviour
--error 2
--exec $MYSQL_DUMP --compact --force --master-data -u mysqltest_1 test 2>&1
# Add REPLICATION CLIENT grants
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
# Execute mysqldump, should now succeed
--exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1
# Clean up
drop table t1;
drop user mysqltest_1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment