1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
namespace MySQLReplication\Definitions; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* @see https://dev.mysql.com/doc/internals/en/event-classes-and-types.html |
8
|
|
|
*/ |
9
|
|
|
class ConstEventType |
10
|
|
|
{ |
11
|
|
|
public const UNKNOWN_EVENT = 0; |
12
|
|
|
public const START_EVENT_V3 = 1; |
13
|
|
|
public const QUERY_EVENT = 2; |
14
|
|
|
public const STOP_EVENT = 3; |
15
|
|
|
public const ROTATE_EVENT = 4; |
16
|
|
|
public const INTVAR_EVENT = 5; |
17
|
|
|
public const LOAD_EVENT = 6; |
18
|
|
|
public const SLAVE_EVENT = 7; |
19
|
|
|
public const CREATE_FILE_EVENT = 8; |
20
|
|
|
public const APPEND_BLOCK_EVENT = 9; |
21
|
|
|
public const EXEC_LOAD_EVENT = 10; |
22
|
|
|
public const DELETE_FILE_EVENT = 11; |
23
|
|
|
public const NEW_LOAD_EVENT = 12; |
24
|
|
|
public const RAND_EVENT = 13; |
25
|
|
|
public const USER_VAR_EVENT = 14; |
26
|
|
|
public const FORMAT_DESCRIPTION_EVENT = 15; |
27
|
|
|
|
28
|
|
|
//Transaction ID for 2PC, written whenever a COMMIT is expected. |
29
|
|
|
public const XID_EVENT = 16; |
30
|
|
|
public const BEGIN_LOAD_QUERY_EVENT = 17; |
31
|
|
|
public const EXECUTE_LOAD_QUERY_EVENT = 18; |
32
|
|
|
|
33
|
|
|
public const GTID_LOG_EVENT = 33; |
34
|
|
|
public const ANONYMOUS_GTID_LOG_EVENT = 34; |
35
|
|
|
public const PREVIOUS_GTIDS_LOG_EVENT = 35; |
36
|
|
|
|
37
|
|
|
public const INCIDENT_EVENT = 26; |
38
|
|
|
public const HEARTBEAT_LOG_EVENT = 27; |
39
|
|
|
public const IGNORABLE_LOG_EVENT = 28; |
40
|
|
|
public const ROWS_QUERY_LOG_EVENT = 29; |
41
|
|
|
|
42
|
|
|
// Row-Based Binary Logging |
43
|
|
|
// TABLE_MAP_EVENT,WRITE_ROWS_EVENT |
44
|
|
|
// UPDATE_ROWS_EVENT,DELETE_ROWS_EVENT |
45
|
|
|
public const TABLE_MAP_EVENT = 19; |
46
|
|
|
|
47
|
|
|
// MySQL 5.1.5 to 5.1.17, |
48
|
|
|
public const PRE_GA_WRITE_ROWS_EVENT = 20; |
49
|
|
|
public const PRE_GA_UPDATE_ROWS_EVENT = 21; |
50
|
|
|
public const PRE_GA_DELETE_ROWS_EVENT = 22; |
51
|
|
|
|
52
|
|
|
// MySQL 5.1.15 to 5.6.x |
53
|
|
|
public const WRITE_ROWS_EVENT_V1 = 23; |
54
|
|
|
public const UPDATE_ROWS_EVENT_V1 = 24; |
55
|
|
|
public const DELETE_ROWS_EVENT_V1 = 25; |
56
|
|
|
|
57
|
|
|
// MySQL 5.6.x |
58
|
|
|
public const WRITE_ROWS_EVENT_V2 = 30; |
59
|
|
|
public const UPDATE_ROWS_EVENT_V2 = 31; |
60
|
|
|
public const DELETE_ROWS_EVENT_V2 = 32; |
61
|
|
|
|
62
|
|
|
// mariadb |
63
|
|
|
// https://github.com/MariaDB/server/blob/10.4/sql/log_event.h |
64
|
|
|
public const MARIA_BINLOG_CHECKPOINT_EVENT = 161; |
65
|
|
|
public const MARIA_GTID_EVENT = 162; |
66
|
|
|
public const MARIA_GTID_LIST_EVENT = 163; |
67
|
|
|
public const MARIA_START_ENCRYPTION_EVENT = 164; |
68
|
|
|
public const MARIA_QUERY_COMPRESSED_EVENT = 165; |
69
|
|
|
public const MARIA_WRITE_ROWS_COMPRESSED_EVENT_V1 = 166; |
70
|
|
|
public const MARIA_UPDATE_ROWS_COMPRESSED_EVENT_V1 = 167; |
71
|
|
|
public const MARIA_DELETE_ROWS_COMPRESSED_EVENT_V1 = 168; |
72
|
|
|
public const MARIA_WRITE_ROWS_COMPRESSED_EVENT = 169; |
73
|
|
|
public const MARIA_UPDATE_ROWS_COMPRESSED_EVENT = 170; |
74
|
|
|
public const MARIA_DELETE_ROWS_COMPRESSED_EVENT = 171; |
75
|
|
|
} |