Locating Duplicate records always results in Error 127

2003-03-17 Thread mySQL list
I am locating 'duplicate entries in a table and updating a status field
accordingly. The idea is to locate rows which have a matching 'Name' field,
and mark them for subsequent processing. However, my update query *ALWAYS*
returns Error 127, even on a newly created table if the matching name field
is 8 characters or more???.

Below is a minimum script which always results in the error Got error 127
from table handler, with only two records in the table. Change the name
fields from  (8 chars) to AAA (7 chars) and no error.

I would appreciate any help in tracking this down, or a suggestion for
another way of detecting duplicate records which doesn't cause the problem.

Ian

# ---
USE test;
#
# Table structure for table 'error127'
#
DROP TABLE IF EXISTS `error127`;
CREATE TABLE `error127` (
  `ItemID` int(11) NOT NULL default '0',
  `Name` varchar(70) NOT NULL default '',
  `Status` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ItemID`),
  KEY `Name` (`Name`)
) TYPE=MyISAM;
#
# Dumping data for table 'error127'
#
INSERT INTO `error127` (`ItemID`, `Name`) VALUES(1, );
INSERT INTO `error127` (`ItemID`, `Name`) VALUES(2, );
#
# Set status
#
UPDATE error127 AS a,error127 AS b SET a.status=2 WHERE a.name = b.name AND
a.itemid != b.itemid;

# ---



MySQL 4.011g, WinXP Prof

--
Ian Wall




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Locating Duplicate records always results in Error 127

2003-03-17 Thread Sergei Golubchik
Hi!

On Mar 17, mySQL list wrote:
 Below is a minimum script which always results in the error Got error 127
 from table handler, with only two records in the table. Change the name
 fields from  (8 chars) to AAA (7 chars) and no error.

I tried it on both 4.0.11 and 4.0.12.
It, indeed, prodeces error 127 on 4.0.11, but works ok on 4.0.12.
Probably, one of the bugfixes fixed this bug as a side effect :)

So - just upgrade.
4.0.12 will be out this week.

Regards,
Sergei

-- 
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php