Bug #41020 INSERT of a certain INT does not work
Submitted: 25 Nov 2008 15:39 Modified: 25 Nov 2008 17:00
Reporter: Ko Kabboord Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:5.0.51a OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: insert, INT

[25 Nov 2008 15:39] Ko Kabboord
Description:
compiling??? dont know

My program runs the query (via own PHP script as well as via PhpMyAdmin)

UPDATE `speler` SET `s_lidnr` = '22025111' WHERE `speler`.`s_id` =3 LIMIT 1 ; (the same with the INSERT query)

what actually happened:

In s_lidnr it INSERTS NOT '22025111' BUT the s_lidnr content from the record before.

If I INSERT f.e. '12025111' it is OK !!!

MySQL Server versie: 5.0.51a on W XP
as well as on
MySQL client version: 4.1.12  on LINUX

How to repeat:
CREATE TABLE `speler` (
  `s_id` mediumint(8) unsigned NOT NULL auto_increment,
  `s_vnaam` varchar(30) collate latin1_general_ci NOT NULL default '',
  `s_vvsel` varchar(10) collate latin1_general_ci NOT NULL default '',
  `s_anaam` varchar(30) collate latin1_general_ci NOT NULL default '',
  `s_gebdatum` date NOT NULL default '0000-00-00',
  `s_lidnr` mediumint(8) unsigned NOT NULL default '0',
  `s_telnr` varchar(20) collate latin1_general_ci NOT NULL default '',
  `s_06nr` varchar(20) collate latin1_general_ci NOT NULL default '',
  PRIMARY KEY  (`s_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=4 ;

INSERT INTO `speler` VALUES (1, 'Robbert', 'van', 'Megen', '0000-00-00', 13180533, '', '');
INSERT INTO `speler` VALUES (2, 'Jeroen', '', 'Albregtse', '0000-00-00', 16777215, '', '');
INSERT INTO `speler` VALUES (3, 'Monique', '', 'Verhoef', '0000-00-00', 16777215, '', '');

and then update record 3 with the query above...
[25 Nov 2008 16:50] Giuseppe Maxia
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/refman/5.1/en/numeric-types.html

The maximum value for a MEDIUMINT is 16,777,215.
That's why 22,025,111 is not an acceptable value and 12,025,111 is.
[25 Nov 2008 17:00] Ko Kabboord
Yes, Sorry