~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_do_grant.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
-- connection master
217
217
 
218
218
# user was already dropped in the slave before
219
 
# so no need to wait for the slave to replicate
220
 
# this statement (if it did and we later synced
221
 
# the slave it would end up in an error anyway)
 
219
# so we should not replicate this statement.
 
220
SET SQL_LOG_BIN= 0;
222
221
DROP USER 'create_rout_db'@'localhost';
 
222
SET SQL_LOG_BIN= 1;
223
223
 
224
224
# finish entire clean up (remove binlogs)
225
225
# so that we leave a pristine environment for the
226
226
# following tests
 
227
--let $rpl_only_running_threads= 1
 
228
-- source include/rpl_reset.inc
 
229
USE test;
227
230
 
228
231
# BUG#49119: Master crashes when executing 'REVOKE ... ON
229
232
# {PROCEDURE|FUNCTION} FROM ...'
249
251
 
250
252
-- echo ######## BUG#49119 #######
251
253
-- echo ### i) test case from the 'how to repeat section'
 
254
 
252
255
-- connection master
253
256
 
254
257
CREATE TABLE t1(c1 INT);
270
272
-- echo ### ii) Test case in which REVOKE partially succeeds
271
273
 
272
274
-- connection master
 
275
-- source include/rpl_reset.inc
273
276
-- connection master
274
277
 
275
278
CREATE TABLE t1(c1 INT);
330
332
# Bug #51987    revoke privileges logs wrong error code
331
333
#
332
334
 
 
335
-- source include/rpl_reset.inc
333
336
-- connection master
334
337
 
335
338
grant all on *.* to foo@"1.2.3.4";
345
346
 
346
347
## assertion: slave replicates revoke and does not fail because master
347
348
##            logged revoke with correct expected error code
348
 
  if ($err)
349
 
{
350
 
    -- die UNEXPECTED ERROR AT SLAVE: $err
351
 
}
 
349
--source include/check_slave_no_error.inc
352
350
 
353
351
-- connection master
354
352
DROP USER foo@"1.2.3.4";
355
353
-- sync_slave_with_master
356
354
 
 
355
--echo 
 
356
--echo # Bug#27606 GRANT statement should be replicated with DEFINER information
 
357
--source include/rpl_reset.inc
 
358
--connection master
 
359
GRANT SELECT, INSERT ON mysql.user TO user_bug27606@localhost;
 
360
 
 
361
SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
 
362
sync_slave_with_master;
 
363
SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
 
364
 
 
365
--connection master
 
366
REVOKE SELECT ON mysql.user FROM user_bug27606@localhost;
 
367
SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
 
368
sync_slave_with_master;
 
369
SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606';
 
370
 
 
371
--connection master
 
372
DROP USER user_bug27606@localhost;
 
373
 
357
374
--echo "End of test"
 
375
--source include/rpl_end.inc