Bug #70039 | Fix for bug #20964 was a breaking change | ||
---|---|---|---|
Submitted: | 14 Aug 2013 21:04 | Modified: | 28 Aug 2013 3:32 |
Reporter: | Jeremiah Gowdy | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
Version: | 5.5.33 | OS: | Any |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
[14 Aug 2013 21:04]
Jeremiah Gowdy
[26 Aug 2013 8:33]
MySQL Verification Team
Hello Jeremiah, Thank you for the report. Verified as described. Thanks, Umesh
[26 Aug 2013 8:35]
MySQL Verification Team
// How to repeat mysql> create table t1(id int(11) not null auto_increment primary key)engine=innodb; Query OK, 0 rows affected (0.02 sec) mysql> insert into t1 value(); Query OK, 1 row affected (0.00 sec) mysql> create temporary table tlid as select id, last_insert_id() as a from t1; Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> desc tlid; +-------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------------------+------+-----+---------+-------+ | id | int(11) | NO | | 0 | | | a | bigint(21) unsigned | NO | | 0 | | +-------+---------------------+------+-----+---------+-------+ 2 rows in set (0.00 sec) Imho - this seems to be intended change and just should be documented to avoid any
[26 Aug 2013 15:40]
Srinivasarao Ravuri
Hello Jeremiah and Umesh, we are working on this issue. Thanks, Srinivasarao.
[28 Aug 2013 3:32]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products. You're right, the documentation did not reflect this change; here's the revised changelog entry (for 5.1.67, 5.5.29, 5.6.9, 5.7.0): LAST_INSERT_ID(expr) did not work for expr values greater than the largest signed BIGINT value. Such arguments now are accepted, with some consequences for compatibility with previous versions: * LAST_INSERT_ID() now returns a BIGINT UNSIGNED value, not a BIGINT (signed) value. * For AUTO_INCREMENT columns, negative values are no longer supported. I'll also revise the description of LAST_INSERT_ID() in the functions chapter correspondingly.
[28 Aug 2013 13:18]
Paul DuBois
Addendum to changelog entry: LAST_INSERT_ID(expr) now returns an unsigned integer value, not a signed integer value.