Skip to content

Instantly share code, notes, and snippets.

@bohutang
Created May 28, 2020 14:25
Show Gist options
  • Select an option

  • Save bohutang/267379680469d3a896a9681f6cf36e0d to your computer and use it in GitHub Desktop.

Select an option

Save bohutang/267379680469d3a896a9681f6cf36e0d to your computer and use it in GitHub Desktop.
mysql-ck-replication-fuzz.sql
-- copy from https://github.com/Altinity/clickhouse-mysql-data-reader/blob/master/docs/manual.md#mysql-data-types
RESET MASTER;
DROP DATABASE IF EXISTS dbtest;
CREATE DATABASE dbtest;
USE dbtest;
CREATE TABLE datatypes(
bit_1 BIT(1),
bit_2 BIT(64),
tinyint_1 TINYINT COMMENT '-128 to 127',
u_tinyint_1 TINYINT UNSIGNED COMMENT '0 to 255',
bool_1 BOOL,
bool_2 BOOLEAN,
smallint_1 SMALLINT COMMENT '-32768 to 32767',
u_smallint_1 SMALLINT UNSIGNED COMMENT '0 to 65535',
mediumint_1 MEDIUMINT COMMENT '-8388608 to 8388607',
u_mediumint_1 MEDIUMINT UNSIGNED COMMENT '0 to 16777215',
int_1 INT COMMENT '-2147483648 to 2147483647',
u_int_1 INT UNSIGNED COMMENT '0 to 4294967295',
integer_1 INTEGER COMMENT '-2147483648 to 2147483647',
u_integer_1 INTEGER UNSIGNED COMMENT '0 to 4294967295',
bigint_1 BIGINT COMMENT '-9223372036854775808 to 9223372036854775807',
u_bigint_1 BIGINT UNSIGNED COMMENT '0 to 18446744073709551615',
serial_1 SERIAL COMMENT 'i.e. BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. 0 to 18446744073709551615',
decimal_1 DECIMAL(3,2) COMMENT 'exact fixed-point number',
dec_1 DEC(3,2) COMMENT 'alias for DECIMAL',
fixed_1 FIXED(3,2) COMMENT 'alias for DECIMAL',
numeric_1 NUMERIC(3,2) COMMENT 'alias for DECIMAL',
float_1 FLOAT COMMENT '-3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38',
u_float_1 FLOAT UNSIGNED COMMENT ' 0, and 1.175494351E-38 to 3.402823466E+38',
double_1 DOUBLE COMMENT '-1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
u_double_1 DOUBLE UNSIGNED COMMENT ' 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
real_1 REAL COMMENT 'alias for DOUBLE i.e. -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
u_real_1 REAL UNSIGNED COMMENT 'alias for UNSIGNED DOUBLE i.e. 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
date_1 DATE COMMENT '1000-01-01 to 9999-12-31',
datetime_1 DATETIME COMMENT '1000-01-01 00:00:00 to 9999-12-31 23:59:59',
timestamp_1 TIMESTAMP COMMENT '1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC',
time_1 TIME COMMENT '-838:59:59 to 838:59:59',
year_1 YEAR COMMENT '1901 to 2155, and 0000',
char_0 CHAR(0),
char_1 CHAR(1),
char_2 CHAR(255),
varchar_0 VARCHAR(0),
varchar_1 VARCHAR(1),
binary_0 BINARY(0) COMMENT 'similar to CHAR',
binary_1 BINARY(1) COMMENT 'similar to CHAR',
binary_2 BINARY(255) COMMENT 'similar to CHAR',
varbinary_0 VARBINARY(0) COMMENT 'similar to VARCHAR',
varbinary_1 VARBINARY(1) COMMENT 'similar to VARCHAR',
tinyblob_1 TINYBLOB COMMENT 'maximum length of 255 (2^8 ? 1) bytes',
tinytext_1 TINYTEXT COMMENT 'maximum length of 255 (2^8 ? 1) characters',
blob_1 BLOB COMMENT 'maximum length of 65,535 (2^16 ? 1) bytes',
text_1 TEXT COMMENT 'maximum length of 65,535 (2^16 ? 1) characters',
mediumblob_1 MEDIUMBLOB COMMENT 'maximum length of 16,777,215 (2^24 ? 1) bytes',
mediumtext_1 MEDIUMTEXT COMMENT 'maximum length of 16,777,215 (2^24 ? 1) characters',
longblob_1 LONGBLOB COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) bytes',
longtext_1 LONGTEXT COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) characters'
)
;
CREATE TABLE enum_datatypes(
enum_1 ENUM('a', 'b', 'c', 'd', 'e', 'f') COMMENT 'can have a maximum of 65,535 distinct elements'
)
;
CREATE TABLE set_datatypes(
set_1 SET('a', 'b', 'c', 'd', 'e', 'f') COMMENT ' can have a maximum of 64 distinct members'
)
;
CREATE TABLE json_datatypes(
json_1 JSON
)
;
CREATE TABLE long_varchar_datatypes(
varchar_2 VARCHAR(21844)
) charset = utf8
;
CREATE TABLE long_varbinary_datatypes(
varbinary_2 VARBINARY(65532) COMMENT 'similar to VARCHAR'
)
;
set time_zone='+00:00';
-- MIN values
INSERT INTO datatypes SET
bit_1 = 0b0, -- BIT(1),
bit_2 = 0b0, -- BIT(64),
tinyint_1 = -128, -- TINYINT COMMENT '-128 to 127',
u_tinyint_1 = 0, -- TINYINT UNSIGNED COMMENT '0 to 255',
bool_1 = FALSE, -- BOOL,
bool_2 = FALSE, -- BOOLEAN,
smallint_1 = -32768, -- SMALLINT COMMENT '-32768 to 32767',
u_smallint_1 = 0, -- SMALLINT UNSIGNED COMMENT '0 to 65535',
mediumint_1 = -8388608, -- MEDIUMINT COMMENT '-8388608 to 8388607',
u_mediumint_1 = 0, -- MEDIUMINT UNSIGNED COMMENT '0 to 16777215',
int_1 = -2147483648, -- INT COMMENT '-2147483648 to 2147483647',
u_int_1 = 0, -- INT UNSIGNED COMMENT '0 to 4294967295',
integer_1 = -2147483648, -- INTEGER COMMENT '-2147483648 to 2147483647',
u_integer_1 = 0, -- INTEGER UNSIGNED COMMENT '0 to 4294967295',
bigint_1 = -9223372036854775808, -- BIGINT COMMENT '-9223372036854775808 to 9223372036854775807',
u_bigint_1 = 0, -- BIGINT UNSIGNED COMMENT '0 to 18446744073709551615',
serial_1 = 0, -- SERIAL COMMENT 'i.e. BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. 0 to 18446744073709551615',
decimal_1 = -9.99, -- DECIMAL(3,2) COMMENT 'exact fixed-point number',
dec_1 = -9.99, -- DEC(3,2) COMMENT 'alias for DECIMAL',
fixed_1 = -9.99, -- FIXED(3,2) COMMENT 'alias for DECIMAL',
numeric_1 = -9.99, -- NUMERIC(3,2) COMMENT 'alias for DECIMAL',
float_1 = -3.402823466E+38, -- FLOAT COMMENT '-3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38',
u_float_1 = 0, -- FLOAT UNSIGNED COMMENT ' 0, and 1.175494351E-38 to 3.402823466E+38',
double_1 = -1.7976931348623157E+308, -- DOUBLE COMMENT '-1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
u_double_1 = 0, -- DOUBLE UNSIGNED COMMENT ' 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
real_1 = -1.7976931348623157E+308, -- REAL COMMENT 'alias for DOUBLE i.e. -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
u_real_1 = 0, -- REAL UNSIGNED COMMENT 'alias for UNSIGNED DOUBLE i.e. 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
date_1 = '1970-01-01', -- DATE COMMENT '1000-01-01 to 9999-12-31',
datetime_1 = '1970-01-01 00:00:00', -- DATETIME COMMENT '1000-01-01 00:00:00 to 9999-12-31 23:59:59',
timestamp_1 = '1970-01-01 00:00:01', -- TIMESTAMP COMMENT '1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC',
time_1 = '-838:59:59', -- TIME COMMENT '-838:59:59 to 838:59:59',
year_1 = 1901, -- YEAR COMMENT '1901 to 2155, and 0000',
char_0 = '', -- CHAR(0),
char_1 = '', -- CHAR(1),
char_2 = '', -- CHAR(255),
varchar_0 = '', -- VARCHAR(0),
varchar_1 = '', -- VARCHAR(1),
binary_0 = '', -- BINARY(0) COMMENT 'similar to CHAR',
binary_1 = '', -- BINARY(1) COMMENT 'similar to CHAR',
binary_2 = '', -- BINARY(255) COMMENT 'similar to CHAR',
varbinary_0 = '', -- VARBINARY(0) COMMENT 'similar to VARCHAR',
varbinary_1 = '', -- VARBINARY(1) COMMENT 'similar to VARCHAR',
tinyblob_1 = '', -- TINYBLOB COMMENT 'maximum length of 255 (2^8 ? 1) bytes',
tinytext_1 = '', -- TINYTEXT COMMENT 'maximum length of 255 (2^8 ? 1) characters',
blob_1 = '', -- BLOB COMMENT 'maximum length of 65,535 (2^16 ? 1) bytes',
text_1 = '', -- TEXT COMMENT 'maximum length of 65,535 (2^16 ? 1) characters',
mediumblob_1 = '', -- MEDIUMBLOB COMMENT 'maximum length of 16,777,215 (2^24 ? 1) bytes',
mediumtext_1 = '', -- MEDIUMTEXT COMMENT 'maximum length of 16,777,215 (2^24 ? 1) characters',
longblob_1 = '', -- LONGBLOB COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) bytes',
longtext_1 = '' -- LONGTEXT COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) characters'
;
INSERT INTO enum_datatypes SET
enum_1 = NULL -- ENUM('a', 'b', 'c', 'd', 'e', 'f') COMMENT 'can have a maximum of 65,535 distinct elements'
;
INSERT INTO set_datatypes SET
set_1 = '' -- SET('a', 'b', 'c', 'd', 'e', 'f') COMMENT 'can have a maximum of 64 distinct members'
;
INSERT INTO json_datatypes SET
json_1 = '{}' -- JSON
;
INSERT INTO long_varchar_datatypes SET
varchar_2 = ""
;
INSERT INTO long_varbinary_datatypes SET
varbinary_2 = ""
;
-- MAX values
INSERT INTO datatypes SET
bit_1 = 0b1, -- BIT(1),
bit_2 = 0b1111111111111111111111111111111111111111111111111111111111111111, -- BIT(64),
tinyint_1 = 127, -- TINYINT COMMENT '-128 to 127',
u_tinyint_1 = 255, -- TINYINT UNSIGNED COMMENT '0 to 255',
bool_1 = TRUE, -- BOOL,
bool_2 = TRUE, -- BOOLEAN,
smallint_1 = 32767, -- SMALLINT COMMENT '-32768 to 32767',
u_smallint_1 = 65535, -- SMALLINT UNSIGNED COMMENT '0 to 65535',
mediumint_1 = 8388607, -- MEDIUMINT COMMENT '-8388608 to 8388607',
u_mediumint_1 = 16777215, -- MEDIUMINT UNSIGNED COMMENT '0 to 16777215',
int_1 = 2147483647, -- INT COMMENT '-2147483648 to 2147483647',
u_int_1 = 4294967295, -- INT UNSIGNED COMMENT '0 to 4294967295',
integer_1 = 2147483647, -- INTEGER COMMENT '-2147483648 to 2147483647',
u_integer_1 = 4294967295, -- INTEGER UNSIGNED COMMENT '0 to 4294967295',
bigint_1 = 9223372036854775807, -- BIGINT COMMENT '-9223372036854775808 to 9223372036854775807',
u_bigint_1 = 18446744073709551615, -- BIGINT UNSIGNED COMMENT '0 to 18446744073709551615',
serial_1 = 18446744073709551615, -- SERIAL COMMENT 'i.e. BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. 0 to 18446744073709551615',
decimal_1 = 9.99, -- DECIMAL(3,2) COMMENT 'exact fixed-point number',
dec_1 = 9.99, -- DEC(3,2) COMMENT 'alias for DECIMAL',
fixed_1 = 9.99, -- FIXED(3,2) COMMENT 'alias for DECIMAL',
numeric_1 = 9.99, -- NUMERIC(3,2) COMMENT 'alias for DECIMAL',
float_1 = 3.402823466E+38, -- FLOAT COMMENT '-3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38',
u_float_1 = 3.402823466E+38, -- FLOAT UNSIGNED COMMENT ' 0, and 1.175494351E-38 to 3.402823466E+38',
double_1 = 1.7976931348623157E+308, -- DOUBLE COMMENT '-1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
u_double_1 = 1.7976931348623157E+308, -- DOUBLE UNSIGNED COMMENT ' 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
real_1 = 1.7976931348623157E+308, -- REAL COMMENT 'alias for DOUBLE i.e. -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
u_real_1 = 1.7976931348623157E+308, -- REAL UNSIGNED COMMENT 'alias for UNSIGNED DOUBLE i.e. 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
date_1 = '2149-06-01', -- DATE COMMENT '1000-01-01 to 9999-12-31',
datetime_1 = '2106-02-01 23:59:59', -- DATETIME COMMENT '1000-01-01 00:00:00 to 9999-12-31 23:59:59',
timestamp_1 = '2038-01-19 03:14:07', -- TIMESTAMP COMMENT '1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC',
time_1 = '838:59:59', -- TIME COMMENT '-838:59:59 to 838:59:59',
year_1 = 2155, -- YEAR COMMENT '1901 to 2155, and 0000',
char_0 = '', -- CHAR(0),
char_1 = 'a', -- CHAR(1),
char_2 = 'abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcde', -- CHAR(255),
varchar_0 = '', -- VARCHAR(0),
varchar_1 = 'a', -- VARCHAR(1),
binary_0 = '', -- BINARY(0) COMMENT 'similar to CHAR',
binary_1 = 'a', -- BINARY(1) COMMENT 'similar to CHAR',
binary_2 = 'abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcde', -- BINARY(255) COMMENT 'similar to CHAR',
varbinary_0 = '', -- VARBINARY(0) COMMENT 'similar to VARCHAR',
varbinary_1 = 'a', -- VARBINARY(1) COMMENT 'similar to VARCHAR',
tinyblob_1 = 'a', -- TINYBLOB COMMENT 'maximum length of 255 (2^8 ? 1) bytes',
tinytext_1 = 'a', -- TINYTEXT COMMENT 'maximum length of 255 (2^8 ? 1) characters',
blob_1 = 'a', -- BLOB COMMENT 'maximum length of 65,535 (2^16 ? 1) bytes',
text_1 = 'a', -- TEXT COMMENT 'maximum length of 65,535 (2^16 ? 1) characters',
mediumblob_1 = 'a', -- MEDIUMBLOB COMMENT 'maximum length of 16,777,215 (2^24 ? 1) bytes',
mediumtext_1 = 'a', -- MEDIUMTEXT COMMENT 'maximum length of 16,777,215 (2^24 ? 1) characters',
longblob_1 = 'a', -- LONGBLOB COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) bytes',
longtext_1 = 'a' -- LONGTEXT COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) characters'
;
INSERT INTO enum_datatypes SET
enum_1 = 'a' -- ENUM('a', 'b', 'c', 'd', 'e', 'f') COMMENT 'can have a maximum of 65,535 distinct elements'
;
INSERT INTO set_datatypes SET
set_1 = 'a,b,c' -- SET('a', 'b', 'c', 'd', 'e', 'f') COMMENT 'can have a maximum of 64 distinct members',
;
INSERT INTO json_datatypes SET
json_1 = '{"a":1, "b":2, "c":3}' -- JSON
;
INSERT INTO long_varchar_datatypes SET
varchar_2 = "abc"
;
INSERT INTO long_varbinary_datatypes SET
varbinary_2 = "abc"
;
@bohutang
Copy link
Copy Markdown
Author

./src/Core/tests/mysql_protocol --host=172.17.0.2 --user=root --password=123 --db=dbtest
Master Host: 172.17.0.2, Port: 3306, User: root, Password: 123, Replicate DB: dbtest, GTID:

=== QueryEvent ===
Timestamp: 1590675367
Event Type: 2
Server ID: 1
Event Size: 120
Log Pos: 353
Flags: 8
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 47
Schema: dbtest
Query: drop database if exists dbtest

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 353
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1

=== QueryEvent ===
Timestamp: 1590675367
Event Type: 2
Server ID: 1
Event Size: 114
Log Pos: 544
Flags: 8
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 49
Schema: dbtest
Query: create database dbtest

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 544
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-2

=== QueryEvent ===
Timestamp: 1590675367
Event Type: 2
Server ID: 1
Event Size: 3618
Log Pos: 4241
Flags: 0
Thread ID: 3548
Execution Time: 1
Schema Len: 6
Error Code: 0
Status Len: 51
Schema: dbtest
Query: CREATE TABLE datatypes(

    bit_1 BIT(1),
    bit_2 BIT(64),

    tinyint_1   TINYINT          COMMENT '-128 to 127',
    u_tinyint_1 TINYINT UNSIGNED COMMENT '0 to 255',

    bool_1 BOOL,
    bool_2 BOOLEAN,

    smallint_1   SMALLINT           COMMENT '-32768 to 32767',
    u_smallint_1 SMALLINT UNSIGNED  COMMENT '0 to 65535',

    mediumint_1   MEDIUMINT          COMMENT '-8388608 to 8388607',
    u_mediumint_1 MEDIUMINT UNSIGNED COMMENT '0 to 16777215',

    int_1   INT          COMMENT '-2147483648 to 2147483647',
    u_int_1 INT UNSIGNED COMMENT '0 to 4294967295',

    integer_1   INTEGER          COMMENT '-2147483648 to 2147483647',
    u_integer_1 INTEGER UNSIGNED COMMENT '0 to 4294967295',

    bigint_1   BIGINT          COMMENT '-9223372036854775808 to 9223372036854775807',
    u_bigint_1 BIGINT UNSIGNED COMMENT '0 to 18446744073709551615',

    serial_1 SERIAL COMMENT 'i.e. BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. 0 to 18446744073709551615',

    decimal_1 DECIMAL(3,2) COMMENT 'exact fixed-point number',
    dec_1     DEC(3,2)     COMMENT 'alias for DECIMAL',
    fixed_1   FIXED(3,2)   COMMENT 'alias for DECIMAL',
    numeric_1 NUMERIC(3,2) COMMENT 'alias for DECIMAL',

    float_1   FLOAT          COMMENT '-3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38',
    u_float_1 FLOAT UNSIGNED COMMENT '                                      0, and 1.175494351E-38 to 3.402823466E+38',

    double_1   DOUBLE          COMMENT '-1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
    u_double_1 DOUBLE UNSIGNED COMMENT '                                                      0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',

    real_1   REAL          COMMENT 'alias for          DOUBLE i.e. -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',
    u_real_1 REAL UNSIGNED COMMENT 'alias for UNSIGNED DOUBLE i.e.                                                       0, and 2.2250738585072014E-308 to 1.7976931348623157E+308',

    date_1      DATE      COMMENT '1000-01-01 to 9999-12-31',
    datetime_1  DATETIME  COMMENT '1000-01-01 00:00:00 to 9999-12-31 23:59:59',
    timestamp_1 TIMESTAMP COMMENT '1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC',
    time_1      TIME      COMMENT '-838:59:59 to 838:59:59',
    year_1      YEAR      COMMENT '1901 to 2155, and 0000',

    char_0 CHAR(0),
    char_1 CHAR(1),
    char_2 CHAR(255),

    varchar_0 VARCHAR(0),
    varchar_1 VARCHAR(1),

    binary_0 BINARY(0)   COMMENT 'similar to CHAR',
    binary_1 BINARY(1)   COMMENT 'similar to CHAR',
    binary_2 BINARY(255) COMMENT 'similar to CHAR',

    varbinary_0 VARBINARY(0) COMMENT 'similar to VARCHAR',
    varbinary_1 VARBINARY(1) COMMENT 'similar to VARCHAR',

    tinyblob_1 TINYBLOB COMMENT 'maximum length of 255 (2^8 ? 1) bytes',
    tinytext_1 TINYTEXT COMMENT 'maximum length of 255 (2^8 ? 1) characters',

    blob_1 BLOB COMMENT 'maximum length of 65,535 (2^16 ? 1) bytes',
    text_1 TEXT COMMENT 'maximum length of 65,535 (2^16 ? 1) characters',

    mediumblob_1 MEDIUMBLOB COMMENT 'maximum length of 16,777,215 (2^24 ? 1) bytes',
    mediumtext_1 MEDIUMTEXT COMMENT 'maximum length of 16,777,215 (2^24 ? 1) characters',

    longblob_1 LONGBLOB COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) bytes',
    longtext_1 LONGTEXT COMMENT 'maximum length of 4,294,967,295 or 4GB (2^32 ? 1) characters'
)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 4241
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-3

=== QueryEvent ===
Timestamp: 1590675368
Event Type: 2
Server ID: 1
Event Size: 225
Log Pos: 4545
Flags: 0
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 49
Schema: dbtest
Query: CREATE TABLE enum_datatypes(
    enum_1 ENUM('a', 'b', 'c', 'd', 'e', 'f') COMMENT 'can have a maximum of 65,535 distinct elements'
)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 4545
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-4

=== QueryEvent ===
Timestamp: 1590675368
Event Type: 2
Server ID: 1
Event Size: 218
Log Pos: 4842
Flags: 0
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 49
Schema: dbtest
Query: CREATE TABLE set_datatypes(
    set_1 SET('a', 'b', 'c', 'd', 'e', 'f') COMMENT ' can have a maximum of 64 distinct members'
)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 4842
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-5

=== QueryEvent ===
Timestamp: 1590675368
Event Type: 2
Server ID: 1
Event Size: 138
Log Pos: 5057
Flags: 0
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 49
Schema: dbtest
Query: CREATE TABLE json_datatypes(
    json_1 JSON
)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 5057
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-6

=== QueryEvent ===
Timestamp: 1590675368
Event Type: 2
Server ID: 1
Event Size: 174
Log Pos: 5310
Flags: 0
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 49
Schema: dbtest
Query: CREATE TABLE long_varchar_datatypes(
    varchar_2 VARCHAR(21844)
) charset = utf8

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 5310
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-7

=== QueryEvent ===
Timestamp: 1590675368
Event Type: 2
Server ID: 1
Event Size: 194
Log Pos: 5583
Flags: 0
Thread ID: 3548
Execution Time: 0
Schema Len: 6
Error Code: 0
Status Len: 49
Schema: dbtest
Query: CREATE TABLE long_varbinary_datatypes(
    varbinary_2 VARBINARY(65532) COMMENT 'similar to VARCHAR'
)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 5583
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-8

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 206
Log Pos: 6155
Flags: 0
Schema: dbtest
Table: datatypes
Row[0]: (0, 0, 128, 0, 0, 0, 32768, 0, 8388608, 0, 2147483648, 0, 2147483648, 0, 9223372036854775808, 0, 1, '-246.156', '-246.156', '-246.156', '-246.156', 2.1178512674e-314, 0., -1.7976931348623157e308, 0., -1.7976931348623157e308, 0., '1970-01-01', 4294938496, 1, '838:59:5', '1901', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 5949
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-9

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 36
Log Pos: 6439
Flags: 0
Schema: dbtest
Table: enum_datatypes
Row[0]: (NULL)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 6403
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-10

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 37
Log Pos: 6723
Flags: 0
Schema: dbtest
Table: set_datatypes
Row[0]: (0)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 6686
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-11

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 45
Log Pos: 7015
Flags: 0
Schema: dbtest
Table: json_datatypes
Row[0]: ('\0\0\0�\0')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 6970
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-12

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 38
Log Pos: 7312
Flags: 0
Schema: dbtest
Table: long_varchar_datatypes
Row[0]: ('')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 7274
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-13

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 38
Log Pos: 7611
Flags: 0
Schema: dbtest
Table: long_varbinary_datatypes
Row[0]: ('')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 7573
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-14

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 728
Log Pos: 8736
Flags: 0
Schema: dbtest
Table: datatypes
Row[0]: (1, 18446744073709551615, 127, 255, 1, 1, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615, 18446744073709551615, '9.99', '9.99', '9.99', '9.99', 1.056853372e-314, 1.056853372e-314, 1.7976931348623157e308, 1.7976931348623157e308, 1.7976931348623157e308, 1.7976931348623157e308, '2149-06-01', 4294483199, 2147483647, '838:59:5', '2155', '', 'a', 'abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcde', '', 'a', '', 'a', 'abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcde', '', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 8008
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-15

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 37
Log Pos: 9021
Flags: 0
Schema: dbtest
Table: enum_datatypes
Row[0]: (1)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 8984
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-16

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 37
Log Pos: 9305
Flags: 0
Schema: dbtest
Table: set_datatypes
Row[0]: (7)

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 9268
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-17

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 69
Log Pos: 9621
Flags: 0
Schema: dbtest
Table: json_datatypes
Row[0]: ('\0�\0�\0�\0�\0�\0�\0�\0�\0�\0�\0�\0abc')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 9552
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-18

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 41
Log Pos: 9921
Flags: 0
Schema: dbtest
Table: long_varchar_datatypes
Row[0]: ('abc')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 9880
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-19

=== WriteRowsEventV2 ===
Timestamp: 1590675368
Event Type: 30
Server ID: 1
Event Size: 41
Log Pos: 10223
Flags: 0
Schema: dbtest
Table: long_varbinary_datatypes
Row[0]: ('abc')

=== Binlog Position ===
Binlog: mysql-bin-1.000001
Position: 10182
GTIDSets: 48cc6e02-9ffe-11ea-8712-0242ac110002:1-20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment