Hi Robert,

Try to make the table without any records and the default AUTO_INCREMENT to 
start with should be 1 (if the parameter AUTO_INCREMENT=1is omitted).
Then make an insert with a pid = 10000000 in the insert statement and check 
the Last insert ID():

CREATE TABLE `care_person` (
`pid` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(60) NOT NULL,
PRIMARY KEY (`pid`)
)  ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `care_person` (`pid`, `name`) VALUES (10000000, 'Robert');

SELECT LAST_INSERT_ID();

Regards,
Ap.Muthu


> ...I tested out with mysql client and standard call, and it worked
> perfectly:
>
> mysql> create database dropme;
> Query OK, 1 row affected (0.02 sec)
> mysql> \u dropme
> Database changed
> mysql> CREATE TABLE `care_person` (   `pid` int(11) unsigned NOT NULL
> AUTO_INCREMENT,   `name` varchar(60) NOT NULL,   PRIMARY KEY (`pid`) )
> ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8;
> Query OK, 0 rows affected (0.06 sec)
> mysql> insert into care_person (name) VALUES ('Donald');
> Query OK, 1 row affected (0.00 sec)
>
> mysql> SELECT LAST_INSERT_ID();
> +------------------+
> | LAST_INSERT_ID() |
> +------------------+
> |         10000001 |
> +------------------+
> 1 row in set (0.00 sec)
>
> That would mean as logic consequence: MySQL does not have that issue on
> my ubuntu here. But the behaviour of adodb method Insert_ID() had
> reproducibly that issue on the same ubuntu. Is there any reason not to
> try with latest adbodb layer if that strange behaviour could be covered
> with it?
>
> Robert



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to