1RESET MASTER;
2SET @positive= 18446744073709551615;
3SET @negative= -9223372036854775808;
4CREATE TABLE t1 (`tinyint` TINYINT,
5`smallint` SMALLINT,
6`mediumint` MEDIUMINT,
7`integer` INTEGER,
8`bigint` BIGINT,
9`utinyint` TINYINT UNSIGNED,
10`usmallint` SMALLINT UNSIGNED,
11`umediumint` MEDIUMINT UNSIGNED,
12`uinteger` INTEGER UNSIGNED,
13`ubigint` BIGINT UNSIGNED,
14`double` DOUBLE,
15`float` FLOAT,
16`real` REAL(30,2),
17`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
18### insert max unsigned
19### a) declarative
20INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
21TRUNCATE t1;
22### b) user var
23INSERT IGNORE INTO t1 VALUES (@positive,
24@positive,
25@positive,
26@positive,
27@positive,
28@positive,
29@positive,
30@positive,
31@positive,
32@positive,
33@positive,
34@positive,
35@positive,
36@positive);
37## assertion: checks that User_var_log_event::pack_info
38## correctly displays the binlog content by taking into
39## account the unsigned_flag
40include/show_binlog_events.inc
41Log_name	Pos	Event_type	Server_id	End_log_pos	Info
42master-bin.000001	#	Gtid	#	#	GTID #-#-#
43master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
44`smallint` SMALLINT,
45`mediumint` MEDIUMINT,
46`integer` INTEGER,
47`bigint` BIGINT,
48`utinyint` TINYINT UNSIGNED,
49`usmallint` SMALLINT UNSIGNED,
50`umediumint` MEDIUMINT UNSIGNED,
51`uinteger` INTEGER UNSIGNED,
52`ubigint` BIGINT UNSIGNED,
53`double` DOUBLE,
54`float` FLOAT,
55`real` REAL(30,2),
56`decimal` DECIMAL(30,2)) ENGINE = MyISAM
57master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
58master-bin.000001	#	Query	#	#	use `test`; INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
59master-bin.000001	#	Query	#	#	COMMIT
60master-bin.000001	#	Gtid	#	#	GTID #-#-#
61master-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1
62master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
63master-bin.000001	#	User var	#	#	@`positive`=18446744073709551615
64master-bin.000001	#	Query	#	#	use `test`; INSERT IGNORE INTO t1 VALUES (@positive,
65@positive,
66@positive,
67@positive,
68@positive,
69@positive,
70@positive,
71@positive,
72@positive,
73@positive,
74@positive,
75@positive,
76@positive,
77@positive)
78master-bin.000001	#	Query	#	#	COMMIT
79### insert min signed
80### a) declarative
81INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
82TRUNCATE t1;
83### b) user var
84INSERT IGNORE INTO t1 VALUES (@negative,
85@negative,
86@negative,
87@negative,
88@negative,
89@negative,
90@negative,
91@negative,
92@negative,
93@negative,
94@negative,
95@negative,
96@negative,
97@negative);
98## assertion: checks that User_var_log_event::pack_info
99## correctly displays the binlog content by taking into
100## account the unsigned_flag
101include/show_binlog_events.inc
102Log_name	Pos	Event_type	Server_id	End_log_pos	Info
103master-bin.000001	#	Gtid	#	#	GTID #-#-#
104master-bin.000001	#	Query	#	#	use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
105`smallint` SMALLINT,
106`mediumint` MEDIUMINT,
107`integer` INTEGER,
108`bigint` BIGINT,
109`utinyint` TINYINT UNSIGNED,
110`usmallint` SMALLINT UNSIGNED,
111`umediumint` MEDIUMINT UNSIGNED,
112`uinteger` INTEGER UNSIGNED,
113`ubigint` BIGINT UNSIGNED,
114`double` DOUBLE,
115`float` FLOAT,
116`real` REAL(30,2),
117`decimal` DECIMAL(30,2)) ENGINE = MyISAM
118master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
119master-bin.000001	#	Query	#	#	use `test`; INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
120master-bin.000001	#	Query	#	#	COMMIT
121master-bin.000001	#	Gtid	#	#	GTID #-#-#
122master-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1
123master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
124master-bin.000001	#	User var	#	#	@`positive`=18446744073709551615
125master-bin.000001	#	Query	#	#	use `test`; INSERT IGNORE INTO t1 VALUES (@positive,
126@positive,
127@positive,
128@positive,
129@positive,
130@positive,
131@positive,
132@positive,
133@positive,
134@positive,
135@positive,
136@positive,
137@positive,
138@positive)
139master-bin.000001	#	Query	#	#	COMMIT
140master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
141master-bin.000001	#	Query	#	#	use `test`; INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808)
142master-bin.000001	#	Query	#	#	COMMIT
143master-bin.000001	#	Gtid	#	#	GTID #-#-#
144master-bin.000001	#	Query	#	#	use `test`; TRUNCATE t1
145master-bin.000001	#	Gtid	#	#	BEGIN GTID #-#-#
146master-bin.000001	#	User var	#	#	@`negative`=-9223372036854775808
147master-bin.000001	#	Query	#	#	use `test`; INSERT IGNORE INTO t1 VALUES (@negative,
148@negative,
149@negative,
150@negative,
151@negative,
152@negative,
153@negative,
154@negative,
155@negative,
156@negative,
157@negative,
158@negative,
159@negative,
160@negative)
161master-bin.000001	#	Query	#	#	COMMIT
162DROP TABLE t1;
163