Debian Codegraph @

mysql-test/suite/rpl/r/rpl_user_lock.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 #
7 # Coverage for the user-level lock related functions
8 # GET_LOCK, RELEASE_LOCK, RELEASE_ALL_LOCKS, IS_USED_LOCK and IS_FREE_LOCK
9 # when replication with different binlog_formats is used.
10 # All these function are unsafe in statement based replication.
11 #
12 #
13 DROP TRIGGER IF EXISTS trig_t1_ins;
14 DROP TABLE IF EXISTS t1;
15 CREATE TABLE t1 (col1 INT, col2 INT);
16 # FT_RPL-1: Use all user-level lock related functions.
17 # FT_RPL-1.1: binlog_format = 'statement'
18 # Reveal that all these statements get a warning about being
19 # in that mode.
20 # FT_RPL-1.2: binlog_format = 'mixed'
21 # Reveal that all these statements pass without warning.
22 # FT_RPL-1.3: binlog_format = 'row'
23 # Reveal that all these statements pass without warning.
24 # The printing of warnings is temporary disabled. But there is some
25 # routine which checks the warnings and aborts in case of failure.
26 INSERT INTO t1 SELECT GET_LOCK('a',0), 1;
27 INSERT INTO t1 SELECT IS_USED_LOCK('a'), 2;
28 INSERT INTO t1 SELECT IS_FREE_LOCK('a'), 3;
29 INSERT INTO t1 SELECT RELEASE_LOCK('a'), 4;
30 INSERT INTO t1 SELECT RELEASE_ALL_LOCKS(), 5;
31 # FT_RPL-2: Check GET_LOCK within some INSERT TRIGGER
32 # Reveal that statements harvest a warning or not according the
33 # the binlog_format used.
34 CREATE TRIGGER trig_t1_ins BEFORE INSERT ON t1 FOR EACH ROW
35 BEGIN
36 SET @aux = GET_LOCK(2,0);
37 IF @aux <> 1 THEN
38 SIGNAL SQLSTATE '45000'
39 SET MESSAGE_TEXT = 'LOCK 2 not got. Abort.', MYSQL_ERRNO = 9999;
40 END IF;
41 END;|
42 INSERT INTO t1 VALUES (6,6), (7,7), (8,8);
43 include/sync_slave_sql_with_master.inc
44 # FT_RPL-3: Check that there is no diff in table content between master
45 # and slave in case binlog_format != 'statement'.
46 DROP TRIGGER trig_t1_ins;
47 DROP TABLE t1;
48 #
49 # End of tests
50 #
51 include/rpl_end.inc