Fix core dump in ha_ndbcluster::print_results

parent a995633a
...@@ -2363,11 +2363,10 @@ void ha_ndbcluster::print_results() ...@@ -2363,11 +2363,10 @@ void ha_ndbcluster::print_results()
String val(buf_val, sizeof(buf_val), &my_charset_bin); String val(buf_val, sizeof(buf_val), &my_charset_bin);
for (uint f=0; f<table->s->fields;f++) for (uint f=0; f<table->s->fields;f++)
{ {
// Use DBUG_PRINT since DBUG_FILE cannot be filtered out /* Use DBUG_PRINT since DBUG_FILE cannot be filtered out */
char buf[2000]; char buf[2000];
Field *field; Field *field;
void* ptr; void* ptr;
const NDBCOL *col= NULL;
NdbValue value; NdbValue value;
NdbBlob *ndb_blob; NdbBlob *ndb_blob;
...@@ -2380,8 +2379,6 @@ void ha_ndbcluster::print_results() ...@@ -2380,8 +2379,6 @@ void ha_ndbcluster::print_results()
} }
ptr= field->ptr; ptr= field->ptr;
DBUG_DUMP("field->ptr", (char*)ptr, field->pack_length());
col= tab->getColumn(f);
if (! (field->flags & BLOB_FLAG)) if (! (field->flags & BLOB_FLAG))
{ {
...@@ -2409,7 +2406,7 @@ void ha_ndbcluster::print_results() ...@@ -2409,7 +2406,7 @@ void ha_ndbcluster::print_results()
} }
print_value: print_value:
DBUG_PRINT("value", ("%u,%s: %s", f, col->getName(), buf)); DBUG_PRINT("value", ("%u,%s: %s", f, field->field_name, buf));
} }
#endif #endif
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment