diff options
author | msvensson@neptunus.homeip.net <> | 2005-02-09 15:09:13 +0100 |
---|---|---|
committer | msvensson@neptunus.homeip.net <> | 2005-02-09 15:09:13 +0100 |
commit | e64145818b63cdb294d953ba8f55ba04b4b651d8 (patch) | |
tree | bb8f1b5a802e8019552636b24ec573278d480223 | |
parent | a995633ab70482ea6c822df4a4ab5826925d801d (diff) | |
download | mariadb-git-e64145818b63cdb294d953ba8f55ba04b4b651d8.tar.gz |
Fix core dump in ha_ndbcluster::print_results
-rw-r--r-- | sql/ha_ndbcluster.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index f77136a548e..58f744438fc 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2357,22 +2357,21 @@ void ha_ndbcluster::print_results() if (!_db_on_) DBUG_VOID_RETURN; - + char buf_type[MAX_FIELD_WIDTH], buf_val[MAX_FIELD_WIDTH]; - String type(buf_type, sizeof(buf_type), &my_charset_bin); + String type(buf_type, sizeof(buf_type), &my_charset_bin); String val(buf_val, sizeof(buf_val), &my_charset_bin); 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]; Field *field; void* ptr; - const NDBCOL *col= NULL; NdbValue value; NdbBlob *ndb_blob; buf[0]= 0; - field= table->field[f]; + field= table->field[f]; if (!(value= m_value[f]).ptr) { my_snprintf(buf, sizeof(buf), "not read"); @@ -2380,8 +2379,6 @@ void ha_ndbcluster::print_results() } ptr= field->ptr; - DBUG_DUMP("field->ptr", (char*)ptr, field->pack_length()); - col= tab->getColumn(f); if (! (field->flags & BLOB_FLAG)) { @@ -2407,9 +2404,9 @@ void ha_ndbcluster::print_results() goto 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 DBUG_VOID_RETURN; |