diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-03-01 13:21:48 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-03-01 13:21:48 +0300 |
commit | cb147b39654d3afea938253ed1457c088a5e87c9 (patch) | |
tree | 854ca74d9bf60c0a120feacde8e3b6951f46bf61 /sql/sql_test.cc | |
parent | b8f00542e2ed66803d747cc5151279b9edf1392a (diff) | |
parent | c6ba9598026b06f5d64e7508abb652ac22d50e48 (diff) | |
download | mariadb-git-cb147b39654d3afea938253ed1457c088a5e87c9.tar.gz |
Merge 5.3 -> 5.3-subqueries-mwl90
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 29147e7bf2a..e704c4ca175 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -239,14 +239,18 @@ void print_keyuse(KEYUSE *keyuse) char buff[256]; char buf2[64]; const char *fieldname; + JOIN_TAB *join_tab= keyuse->table->reginfo.join_tab; + KEY *key_info= join_tab->get_keyinfo_by_key_no(keyuse->key); String str(buff,(uint32) sizeof(buff), system_charset_info); str.length(0); keyuse->val->print(&str, QT_ORDINARY); str.append('\0'); - if (keyuse->keypart == FT_KEYPART) + if (keyuse->is_for_hash_join()) + fieldname= keyuse->table->field[keyuse->keypart]->field_name; + else if (keyuse->keypart == FT_KEYPART) fieldname= "FT_KEYPART"; else - fieldname= keyuse->table->key_info[keyuse->key].key_part[keyuse->keypart].field->field_name; + fieldname= key_info->key_part[keyuse->keypart].field->field_name; longlong2str(keyuse->used_tables, buf2, 16, 0); DBUG_LOCK_FILE; fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s optimize: %u used_tables: %s " |