List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 19 2002 1:27am
Subject:Re: auto Incerment
View as plain text  
At 16:25 +1000 9/18/02, vinita vigine Murugiah wrote:
>  HI
>
>I'm having problem with the AUTO_INCREMENT, we are using ver 3.23.33
>
>This is the definition of table software_machineOSs
>+------------+----------+------+--------+---------+----------------+
>| Field          | Type          | Null     | Key     | Default | 
>Extra                  |
>+------------+----------+-------+-------+---------+----------------+
>| softwareID | char(20)    | YES   | MUL    | NULL    |                 
>      |
>| id               | int(2)         |            |             | NULL
>| auto_increment |


I assume that you have a PRIMARY KEY or UNIQUE index on
(softwareID, id) here?

What's the table type?  Not all table types support composite keys
with AUTO_INCREMENT this way.


>| osName     | char(20)    | YES    |             | NULL   
>|                        |
>| osRevision  | char(20)    | YES    |             | NULL   
>|                        |
>+------------+----------+-------+-------+-----------+------------------+
>
>Adding an entry
>mysql> insert into software_machineOSs (softwareID, id, osName, osRevision)
>    -> values ("readline-4.3", NULL, "test", "test3");
>
>Selecting entries
>mysql> select * from software_machineOSs where softwareid="readline-4.3";
>+--------------+----+---------------+------------+
>| softwareID   | id | osName        | osRevision |
>+--------------+----+---------------+------------+
>| readline-4.3 |  1 | Tru64                 | 5.1        |
>| readline-4.3 |  1 | Solaris/Sparc     | 8          |
>| readline-4.3 |  1 | Solaris/x86       | 8          |
>| readline-4.3 |  1 | test                  | test       |
>| readline-4.3 |  1 | test                  | test1      |
>| readline-4.3 |  1 | test                 | test1      |
>| readline-4.3 |  1 | test                  | test3      |
>+--------------+----+---------------+------------+
>7 rows in set (0.00 sec)
>
>
>As you can see the ID did NOT increment, I'm not sure what I'm doing 
>wrong. I tried with out giving any value for ID, 0 value for ID & 
>NULL for ID. Non of them seems working. Is this a bug in the version 
>3.23.33??
>
>Appreciate your fast response & Thank you for your time
>
>warm regards
>Vinita

Thread
auto Incermentvinita vigine Murugiah18 Sep
  • Re: auto Incermentvinita vigine Murugiah18 Sep
  • Re: auto IncermentPaul DuBois19 Sep
  • Re: auto Incermentvinita vigine Murugiah19 Sep
Re: auto Incermentvinita vigine Murugiah19 Sep