Re: MySQL ID -- what happens when you run out of range?
| From: | Michael A. Peters | Date: | Tue, 26 Jan 2010 03:00:38 +0000 |
| Subject: | Re: MySQL ID -- what happens when you run out of range? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301445@lists.php.net to get a copy of this message | ||
Shawn McKenzie wrote:
Joseph Thayne wrote:6. An alternate version of Dr. Rodney McKay from an alternate universe appears, and goes by "Rod".That is incorrect. What will happen is as follows: 1. The value will be incremented by 1 causing the value to be greater than the maximum integer allowed. 2. MySQL will see this as a problem and "truncate" it to the closest value. 3. MySQL will then try and insert the new row with the updated id. 4. MySQL will find that the id already exists, and will return a duplicate ID error.5. A tear is rendered in the space time continuum!