Bug #17986 Deleting a non-existing record where one attribute is TEXT gives error
Submitted: 6 Mar 2006 19:57 Modified: 12 Dec 2006 11:52
Reporter: Geert Vanderkelen Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1 OS:
Assigned to: Martin Skold CPU Architecture:Any

[6 Mar 2006 19:57] Geert Vanderkelen
Description:

For an NDB table having a BLOB (TEXT or BLOB), deleting a non-existing record using the primary key gives an error.

mysql> DELETE FROM ndbtext WHERE id = 1;
ERROR 1032 (HY000): Can't find record in 'ndbtext'

It goes not gives no problems when using VARCHAR instead of TEXT, or when deleting using another attribute in the WHERE clause of the DELETE statement.

This should not result in an error, but like in MySQL 5.0 return 0 rows affected.

How to repeat:
DROP TABLE IF EXISTS ndbtext;
CREATE TABLE ndbtext ( id INT, txt TEXT, PRIMARY KEY(id)) ENGINE=NDB;
DELETE FROM ndbtext WHERE txt = 'sakila';
DELETE FROM ndbtext WHERE id = 1; -- statement gives error
DROP TABLE IF EXISTS ndbtext;
CREATE TABLE ndbtext ( id INT, txt VARCHAR(5000), PRIMARY KEY(id)) ENGINE=NDB;
DELETE FROM ndbtext WHERE txt = 'sakila';
DELETE FROM ndbtext WHERE id = 1; -- statement is ok
DROP TABLE IF EXISTS ndbtext;
CREATE TABLE ndbtext ( id INT, txt BLOB, PRIMARY KEY(id)) ENGINE=NDB;
DELETE FROM ndbtext WHERE txt = 'sakila';
DELETE FROM ndbtext WHERE id = 1; -- statement gives error
[6 Mar 2006 19:59] Geert Vanderkelen
Verified using 5.1.7-beta.
Works OK with 5.0.18.
[21 May 2006 17:22] Jonas Oreland
This I thinks needs to be fixed asap
[17 Nov 2006 16:14] Geert Vanderkelen
Repeated in 5.1.14 (from bk) again..
[12 Dec 2006 11:52] Geert Vanderkelen
Not repeatable in 5.1.14-beta release or from current bk sources.