Issue with bigint unsigned auto-increment field

Bug #340316 reported by Nidhi Shrotriya
2
Affects Status Importance Assigned to Milestone
PBXT
Fix Committed
Undecided
Vladimir Kolesnikov

Bug Description

CREATE TABLE t5(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c2 BIGINT SIGNED NULL, c3 BIGINT SIGNED NOT NULL, c4 TINYINT, c5 SMALLINT, c6 MEDIUMINT, c7 INT, c8 INTEGER, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3)) engine=pbxt;

--insert some rows
INSERT INTO t5 VALUES(0,-9223372036854775808,1,2,3,4,5,5),(255,-2147483648,6,7,8,9,10,10),(65535,-8388608,11,12,13,14,15,15),(16777215,-32768,16,17,18,19,20,20),(4294967295,-128,21,22,23,24,25,25),(18446744073709551615,9223372036854775807,26,27,28,29,30,30);

INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;

Other engines (MyISAM, Innodb, Maria):
ERROR HY000: Failed to read auto-increment value from storage engine
while trying to increment value 18446744073709551615.
SELECT * FROM t5;

c1 c2 c3 c4 c5 c6 c7 c8

101 -102 -103 -104 105 106 107 108

102 0 0 37 38 39 40 41

108 -109 -110 111 112 113 114 115

109 -32 -32 33 34 35 36 37

110 0 -104 2 NULL NULL NULL NULL

111 0 -17 18 19 20 21 22

112 -1 -1 8 9 10 11 12

113 -101 -102 104 105 106 107 108

114 -108 -109 111 112 113 114 115

115 -115 -116 118 119 120 121 122

116 -122 -123 125 126 127 128 128

117 -9223372036854775808 1 2 3 4 5 5

16777215 -32768 16 17 18 19 20 20

18446744073709551615 9223372036854775807 26 27 28 29 30 30

255 -2147483648 6 7 8 9 10 10

4294967295 -128 21 22 23 24 25 25

65535 -8388608 11 12 13 14 15 15

PBXT:
---------------
doesn't give
ERROR HY000: Failed to read auto-increment value from storage engine
SELECT * FROM t5;

c1 c2 c3 c4 c5 c6 c7 c8

101 -102 -103 -104 105 106 107 108

102 0 0 37 38 39 40 41

108 -109 -110 111 112 113 114 115

109 -32 -32 33 34 35 36 37

110 0 -104 2 NULL NULL NULL NULL

111 0 -17 18 19 20 21 22

112 -1 -1 8 9 10 11 12

113 -101 -102 104 105 106 107 108

114 -108 -109 111 112 113 114 115

115 -115 -116 118 119 120 121 122

116 -122 -123 125 126 127 128 128

118 -9223372036854775808 1 2 3 4 5 5

16777215 -32768 16 17 18 19 20 20

18446744073709551615 9223372036854775807 26 27 28 29 30 30

255 -2147483648 6 7 8 9 10 10

4294967295 -128 21 22 23 24 25 25

4294967296 33 34 NULL NULL NULL NULL NULL

65535 -8388608 11 12 13 14 15 15

increments 4294967295.

Related branches

Revision history for this message
Nidhi Shrotriya (nidhi-shrotriya) wrote :

I have used 1.0.07RC and mysql-6.0.8-alpha.

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

Hi Nidhi,

I can confirm this behavior as of the latest PBXT version together with MySQL 5.1.30 and 6.0.9.

Thank you for the report.

Changed in pbxt:
assignee: nobody → vkolesnikov
status: New → Confirmed
Changed in pbxt:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.