Skip to content

Commit 65ab333

Browse files
committed
Made ClientCapabilities consistent in the way it declares constants
1 parent 0bdedf9 commit 65ab333

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/main/java/com/github/shyiko/mysql/binlog/network/ClientCapabilities.java

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,27 @@
1717

1818
/**
1919
* @author <a href="mailto:[email protected]">Stanley Shyiko</a>
20+
* @see <a href="http://dev.mysql.com/doc/internals/en/capability-flags.html#packet-Protocol::CapabilityFlags">
21+
* Capability Flags</a>
2022
*/
2123
public final class ClientCapabilities {
2224

2325
public static final int LONG_PASSWORD = 1; /* new more secure passwords */
24-
public static final int FOUND_ROWS = 2; /* found instead of affected rows */
25-
public static final int LONG_FLAG = 4; /* get all column flags */
26-
public static final int CONNECT_WITH_DB = 8; /* one can specify db on connect */
27-
public static final int NO_SCHEMA = 16; /* don't allow database.table.column */
28-
public static final int COMPRESS = 32; /* can use compression protocol */
29-
public static final int ODBC = 64; /* odbc client */
30-
public static final int LOCAL_FILES = 128; /* can use LOAD DATA LOCAL */
31-
public static final int IGNORE_SPACE = 256; /* ignore spaces before '' */
32-
public static final int PROTOCOL_41 = 512; /* new 4.1 protocol */
33-
public static final int INTERACTIVE = 1024; /* this is an interactive client */
34-
public static final int SSL = 2048; /* switch to ssl after handshake */
35-
public static final int IGNORE_SIGPIPE = 4096; /* IGNORE sigpipes */
36-
public static final int TRANSACTIONS = 8192; /* client knows about transactions */
37-
public static final int RESERVED = 16384; /* old flag for 4.1 protocol */
38-
public static final int SECURE_CONNECTION = 32768; /* new 4.1 authentication */
26+
public static final int FOUND_ROWS = 1 << 1; /* found instead of affected rows */
27+
public static final int LONG_FLAG = 1 << 2; /* get all column flags */
28+
public static final int CONNECT_WITH_DB = 1 << 3; /* one can specify db on connect */
29+
public static final int NO_SCHEMA = 1 << 4; /* don't allow database.table.column */
30+
public static final int COMPRESS = 1 << 5; /* can use compression protocol */
31+
public static final int ODBC = 1 << 6; /* odbc client */
32+
public static final int LOCAL_FILES = 1 << 7; /* can use LOAD DATA LOCAL */
33+
public static final int IGNORE_SPACE = 1 << 8; /* ignore spaces before '' */
34+
public static final int PROTOCOL_41 = 1 << 9; /* new 4.1 protocol */
35+
public static final int INTERACTIVE = 1 << 10; /* this is an interactive client */
36+
public static final int SSL = 1 << 11; /* switch to ssl after handshake */
37+
public static final int IGNORE_SIGPIPE = 1 << 12; /* IGNORE sigpipes */
38+
public static final int TRANSACTIONS = 1 << 13; /* client knows about transactions */
39+
public static final int RESERVED = 1 << 14; /* old flag for 4.1 protocol */
40+
public static final int SECURE_CONNECTION = 1 << 15; /* new 4.1 authentication */
3941
public static final int MULTI_STATEMENTS = 1 << 16; /* enable/disable multi-stmt support */
4042
public static final int MULTI_RESULTS = 1 << 17; /* enable/disable multi-results */
4143
public static final int PS_MULTI_RESULTS = 1 << 18; /* multi-results in ps-protocol */

0 commit comments

Comments
 (0)