1
#############################################################################
2
# Original Author: JBM #
3
# Original Date: Aug/18/2005 #
4
#############################################################################
5
# TEST: To test the USER() and CURRENT_USER() in rbr #
6
#############################################################################
8
# Change Date: 2006-01-16
9
# Change: Added Order by for NDB
13
-- source include/have_binlog_format_row.inc
14
-- source include/master-slave.inc
16
# Begin clean up test section
19
DROP DATABASE IF EXISTS mysqltest1;
20
CREATE DATABASE mysqltest1;
24
CREATE USER tester IDENTIFIED BY 'test';
25
GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test';
26
GRANT ALL ON mysqltest1.* TO ''@'localhost%';
28
connect (m_1,localhost,tester,,mysqltest1);
31
CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a));
32
INSERT INTO mysqltest1.t1 VALUES(1,USER());
33
INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER());
35
create procedure mysqltest1.p1()
37
INSERT INTO mysqltest1.t1 VALUES(3,USER());
38
INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER());
44
SELECT * FROM mysqltest1.t1 ORDER BY a;
45
sync_slave_with_master;
46
SELECT * FROM mysqltest1.t1 ORDER BY a;
52
DROP DATABASE mysqltest1;
53
REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
54
REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
56
DROP USER ''@'localhost%';
58
sync_slave_with_master;
60
# End of 5.0 test case