Bug #40080 REPLACE INTO with some values omitted returns error
Submitted: 16 Oct 2008 15:17 Modified: 16 Oct 2008 17:43
Reporter: johnny slakva Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.23-ndb-6.2.15 OS:Linux
Assigned to: CPU Architecture:Any
Tags: cluster, DEFAULT, ndb, replace into

[16 Oct 2008 15:17] johnny slakva
Description:
when i try to do REPLACE INTO omitting some fields that have default values, cluster instead of using default values for those fields, returns error "#1296 - Got error 839 'Illegal null attribute' from NDBCLUSTER ". 

error is only returned in case if no record with given primary key existed. if there was such record, it is replaced correctly.

How to repeat:
CREATE TABLE tst (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
val INT NOT NULL DEFAULT 5
) ENGINE = ndbcluster;

REPLACE INTO tst (id) VALUES (8)

immediately responds "#1296 - Got error 839 'Illegal null attribute' from NDBCLUSTER"
[16 Oct 2008 17:43] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with version mysql-5.1.28-ndb-6.3.18 and current 6.2 bzr tree, although bug is repeatable with version mysql-cluster-gpl-6.2.15 Please consider to upgrade.
[17 Oct 2008 1:32] Guangbao Ni
I think it is fixed by bug#22045