changing auto increment.

changing auto increment.

am 09.07.2003 12:19:38 von Emma Wansbrough

Hi,
Looking at you documentation I wanted to change the auto increment value
of a table:


mysql> desc inbound_sport_feed_queue;
+-------------------+-------------+------+-----+------------ ---------+----------------+
| Field | Type | Null | Key |
Default | Extra |
+-------------------+-------------+------+-----+------------ ---------+----------------+
| id | int(11) | | PRI
| NULL | auto_increment |
| script | varchar(30) | | |
| |
| content | text | |
| | |
| queued | datetime | | |
0000-00-00 00:00:00 | |
| expires | datetime | | |
0000-00-00 00:00:00 | |
| processingStarted | datetime | | |
0000-00-00 00:00:00 | |
| requesting_host | varchar(20) | |
| | |
| additional | text | YES | |
NULL | |
| retryAfter | datetime | YES | |
NULL | |
| processingThread | int(11) | YES | |
NULL | |
| alarmAfter | datetime | YES | |
NULL | |
| priority | int(11) | YES | |
NULL | |
| retryCount | int(11) | | |
0 | |
+-------------------+-------------+------+-----+------------ ---------+----------------+

I tried to change the off set of auto increment by

ALTER TABLE inbound_sport_feed_queue AUTO_INCREMENT=12;


This has failed to work, yet the documentation states other wise,
I am usingserver version: 4.0.12-max-log

Any ideas?
Emma.


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: changing auto increment.

am 09.07.2003 15:42:51 von Sinisa Milivojevic

Emma Wansbrough writes:
> Hi,
> Looking at you documentation I wanted to change the auto increment value
> of a table:
>
>

[skip]

> I tried to change the off set of auto increment by
>
> ALTER TABLE inbound_sport_feed_queue AUTO_INCREMENT=12;
>
>
> This has failed to work, yet the documentation states other wise,
> I am usingserver version: 4.0.12-max-log
>
> Any ideas?
> Emma.

Hi!

It should fail if current value is higher.

Otherwise, if table is MyISAM it should work.

I just tested it with 4.0.14 and it worked like a charm.

--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org