From e5c416e4f19f72cb6c1c5462cf5aa39dba0c35d7 Mon Sep 17 00:00:00 2001
From: unknown <mskold@mysql.com>
Date: Mon, 19 Jul 2004 17:28:07 +0200
Subject: [PATCH] Fix for bug#4595

---
 sql/ha_ndbcluster.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index b57735b9de6..1fea8752c86 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -624,11 +624,12 @@ int ha_ndbcluster::pk_read(const byte *key, uint key_len, byte *buf)
       return res;
   }
   
-  // Read non-key field(s)
+  // Read non-key field(s) unless HA_EXTRA_RETRIEVE_ALL_COLS
   for (i= 0; i < no_fields; i++) 
   {
     Field *field= table->field[i];
-    if (thd->query_id == field->query_id) 
+    if ((thd->query_id == field->query_id) || 
+	retrieve_all_fields)
     {
       if (get_ndb_value(op, i, field->ptr))
         goto err;
-- 
2.30.9