| List: | Commits | « Previous MessageNext Message » | |
| From: | stewart | Date: | July 16 2007 5:35am |
| Subject: | [NDB patch 3/5] BUG#28804 fix ha_ndbcluster::unique_index_read to properly return error | ||
| View as plain text | |||
On error during unique index read, set table->status appropriately.
This ensures the user gets the correct error from NDB.
The okay error is still, of course, STATUS_NOT_FOUND
TAKE2:
- use HA_ERR_KEY_NOT_FOUND instead of magic 120
===== sql/ha_ndbcluster.cc 1.313 vs edited =====
Index: ndb-work/sql/ha_ndbcluster.cc
===================================================================
--- ndb-work.orig/sql/ha_ndbcluster.cc 2007-07-02 16:01:29.970054148 +1000
+++ ndb-work/sql/ha_ndbcluster.cc 2007-07-02 16:06:54.052522555 +1000
@@ -1758,9 +1758,15 @@ int ha_ndbcluster::unique_index_read(con
if (execute_no_commit_ie(this,trans,false) != 0)
{
- table->status= STATUS_NOT_FOUND;
- DBUG_RETURN(ndb_err(trans));
+ int err= ndb_err(trans);
+ if(err==HA_ERR_KEY_NOT_FOUND)
+ table->status= STATUS_NOT_FOUND;
+ else
+ table->status= STATUS_GARBAGE;
+
+ DBUG_RETURN(err);
}
+
// The value have now been fetched from NDB
unpack_record(buf);
table->status= 0;
--
Stewart Smith
| Thread | ||
|---|---|---|
| • [NDB patch 0/5] Bug28804 Unknown error returned on a query using joins | stewart | 16 Jul |
| • [NDB patch 3/5] BUG#28804 fix ha_ndbcluster::unique_index_read to properly return error | stewart | 16 Jul |
| • [NDB patch 4/5] BUG#28804 release index operation for unique index lookup (without matching tuple) on completion of operation, not txn | stewart | 16 Jul |
| • [NDB patch 5/5] BUG#28804 Dbtc::releaseAbortResources() send returnsignal when exists. | stewart | 16 Jul |
| • Re: [NDB patch 5/5] BUG#28804 Dbtc::releaseAbortResources() sendreturnsignal when exists. | Jonas Oreland | 16 Jul |
| • [NDB patch 1/5] Test for Bug#28804 | stewart | 16 Jul |
| • Re: [NDB patch 1/5] Test for Bug#28804 | Jonas Oreland | 16 Jul |
| • [NDB patch 2/5] BUG#28804 improve NDBAPI behaviour in execute on timeout waiting for txn respones. | stewart | 16 Jul |
| • Re: [NDB patch 0/5] Bug28804 Unknown error returned on a queryusing joins | Stewart Smith | 16 Jul |
| • Re: [NDB patch 0/5] Bug28804 Unknown error returned on a query usingjoins | Jonas Oreland | 16 Jul |
