Hello,
One of my clients has just mailed me about a bug which has occurred in an application I wrote some time ago.
After some tracking I finally got to the table:
> CREATE TABLE `devel_travel_miasta` (
> `id_town` int(10) unsigned NOT NULL auto_increment,
> `name` varchar(64) collate utf8_polish_ci NOT NULL,
> `confirmed` tinyint(1) unsigned NOT NULL default '0',
> PRIMARY KEY (`id_town`),
> UNIQUE KEY `unique` (`name`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci AUTO_INCREMENT=1065;
and the query
> INSERT INTO '.TAB_TRAVEL_MIASTA.' (name) VALUES ("'.$name.'") ON DUPLICATE KEY UPDATE name = "'.$name.'";
which on the 5.0.45-log server after invoking mysql_insert_id(); returns "next autoindex" value instead of the ID value of the updated row.
The code used to work fine till today on the remote (probably just upgraded) server, and works fine on my local 5.0.27-community-nt server.
Any clue what's going on?
Regards,
Jakub Wiśniewski
Custom Internet Solutions
http://jrobin.net/en