| Bug #35364 | auto_increment_increment increment’s randomly on assigning negative value to it | ||
|---|---|---|---|
| Submitted: | 18 Mar 2008 6:15 | Modified: | 26 Mar 2008 6:55 |
| Reporter: | Salman Rawala | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
| Version: | 5.1.22 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | auto_increment_increment | ||
[18 Mar 2008 8:17]
Salman Rawala
Updated version number
[19 Mar 2008 11:03]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior: always get correct warning SET @@auto_increment_increment = -10; Warnings: Warning 1292 Truncated incorrect auto-increment-increment value: '0' Please provide output from your environment.
[19 Mar 2008 11:06]
Salman Rawala
which version of mysql are you using?
[19 Mar 2008 11:23]
Sveta Smirnova
Current development versions 5.0, 5.1, 6.0 and 5.1.22. To see warnings issue "SHOW WARNINGS" in mysql command line client right after wrong statement.
[26 Mar 2008 6:55]
Salman Rawala
Verified on version 5.1.23 and it is working fine on it.

Description: When we assign negative value to variable, and insert some rows in table, auto_increment_increment increment’s value randomly instead of giving error while setting negative value to it. How to repeat: SET @@auto_increment_increment = -10; INSERT into t1(name) values('Record_17'); INSERT into t1(name) values('Record_18'); SELECT * from t1; +--------+-----------+ | id | name | +--------+-----------+ | 65536 | Record_17 | | 131071 | Record_18 | +--------+-----------+ Suggested fix: Either negative values should not be allowed or there may be some correct behavior while incrementing index value