diff options
author | Monty <monty@mariadb.org> | 2015-06-25 23:34:54 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-06-25 23:34:54 +0300 |
commit | 67c56ab1e4841058c40e6b61e1dcbb6e21d4ce52 (patch) | |
tree | 6c609671c024b7ab29f4d4fbc3e762d85dbc4c32 /sql/sql_test.cc | |
parent | 8c815751c92313dfa45ef0398b609c9988a0a451 (diff) | |
download | mariadb-git-67c56ab1e4841058c40e6b61e1dcbb6e21d4ce52.tar.gz |
Simple cleanups
- Removing use of calls to current_thd
- More DBUG_PRINT
- Code style changes
- Made some local functions static
Ensure that calls to print_keyuse are locked with mutex to get all lines in same debug packet
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index ec426e39ee3..dc6bc8187ff 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -248,7 +248,7 @@ TEST_join(JOIN *join) #define FT_KEYPART (MAX_REF_PARTS+10) -void print_keyuse(KEYUSE *keyuse) +static void print_keyuse(KEYUSE *keyuse) { char buff[256]; char buf2[64]; @@ -266,14 +266,11 @@ void print_keyuse(KEYUSE *keyuse) else fieldname= key_info->key_part[keyuse->keypart].field->field_name; ll2str(keyuse->used_tables, buf2, 16, 0); - DBUG_LOCK_FILE; fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s optimize: %u used_tables: %s " "ref_table_rows: %lu keypart_map: %0lx\n", keyuse->table->alias.c_ptr(), fieldname, str.ptr(), (uint) keyuse->optimize, buf2, (ulong) keyuse->ref_table_rows, (ulong) keyuse->keypart_map); - DBUG_UNLOCK_FILE; - //key_part_map keypart_map; --?? there can be several? } @@ -282,9 +279,9 @@ void print_keyuse_array(DYNAMIC_ARRAY *keyuse_array) { DBUG_LOCK_FILE; fprintf(DBUG_FILE, "KEYUSE array (%d elements)\n", keyuse_array->elements); - DBUG_UNLOCK_FILE; for(uint i=0; i < keyuse_array->elements; i++) print_keyuse((KEYUSE*)dynamic_array_ptr(keyuse_array, i)); + DBUG_UNLOCK_FILE; } |