File: secure_timestamp_yes.result

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (72 lines) | stat: -rw-r--r-- 2,920 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
include/master-slave.inc
[connection master]
connection slave;
select @@secure_timestamp;
@@secure_timestamp
YES
### ALL PRIVILEGES
set timestamp=1234567890.101112;
ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'ALL PRIVILEGES';
ALL PRIVILEGES
READONLY
set timestamp=default;
### SUPER
create user foo@127.0.0.1;
grant super on *.* TO `foo`@`127.0.0.1`;
connect con2,127.0.0.1,foo,,"*NO-ONE*",$SLAVE_MYPORT;
set timestamp=1234567890.101112;
ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'SUPER';
SUPER
READONLY
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
set timestamp=default;
### BINLOG REPLAY
create user foo@127.0.0.1;
grant binlog replay on *.* TO `foo`@`127.0.0.1`;
connect con2,127.0.0.1,foo,,"*NO-ONE*",$SLAVE_MYPORT;
set timestamp=1234567890.101112;
ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'BINLOG REPLAY';
BINLOG REPLAY
READONLY
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
set timestamp=default;
### non-privileged user
create user foo@127.0.0.1;
connect con2,127.0.0.1,foo,,"*NO-ONE*",$SLAVE_MYPORT;
set timestamp=1234567890.101112;
ERROR HY000: The MariaDB server is running with the --secure-timestamp=YES option so it cannot execute this statement
select if(now(6) > 20100101, 'READONLY', 'EDITABLE') as 'non-privileged';
non-privileged
READONLY
disconnect con2;
connection slave;
drop user foo@127.0.0.1;
set timestamp=default;
connection master;
set time_zone='+00:00';
set timestamp=1234567890.101112;
select @@timestamp, now(6);
@@timestamp	now(6)
1234567890.101112	2009-02-13 23:31:30.101112
create table t1 (b varchar(20), a timestamp(6) default current_timestamp(6)) charset=latin1;
insert t1 (b) values ('replicated');
connection slave;
create trigger t1rbr before insert on t1 for each row set new.a=now(6);
set @@global.slave_run_triggers_for_rbr= yes;
binlog 'LQfqWg8BAAAA/AAAAAABAAABAAQAMTAuMy42LU1hcmlhREItZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAtB+paEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEEwQADQgICAoKCgFlBcaR';
binlog '0gKWSRMBAAAAMQAAAHQDAAAAAB8AAAAAAAEABHRlc3QAAnQxAAIPEQMUAAYBQFUzwA==0gKWSRcBAAAAMAAAAKQDAAAAAB8AAAAAAAEAAv/8BmJpbmxvZ0mWAtIBivg3mwo+';
set @@global.slave_run_triggers_for_rbr= default;
select b, if(a > 20100101, 'READONLY', 'EDITABLE') as 'REPLICATION' from t1;
b	REPLICATION
replicated	READONLY
binlog	READONLY
connection master;
drop table t1;
include/rpl_end.inc