Skip to content

Commit 399179b

Browse files
Christopher Powersdahlerlend
authored andcommitted
WL#6616 PERFORMANCE SCHEMA, INDEXES - ASAN fix, remove debug code
1 parent 05b7cf7 commit 399179b

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

sql/handler.cc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
#include <cmath>
7070
#include <cstring>
7171
#include <string>
72-
#include <sstream>
7372
#include <boost/foreach.hpp>
7473
#include <boost/tokenizer.hpp>
7574
#include <boost/algorithm/string.hpp>
@@ -2700,20 +2699,6 @@ PSI_table_share *handler::ha_table_share_psi(const TABLE_SHARE *share) const
27002699
return share->m_psi;
27012700
}
27022701

2703-
std::string key_to_text(const uchar *key, int key_len)
2704-
{
2705-
const uchar *k= key;
2706-
std::stringstream s1;
2707-
if (key_len <=0) key_len= 50;
2708-
for (auto i= 0; i < key_len; i++, k++)
2709-
{
2710-
if (isprint(*k))
2711-
s1 << *k;
2712-
else
2713-
s1 << std::to_string(*k);
2714-
}
2715-
return s1.str();
2716-
}
27172702

27182703
/*
27192704
Open database handler object.
@@ -2850,11 +2835,7 @@ int handler::ha_index_init(uint idx, bool sorted)
28502835
{
28512836
DBUG_EXECUTE_IF("ha_index_init_fail", return HA_ERR_TABLE_DEF_CHANGED;);
28522837
int result;
2853-
THD *thd= current_thd;
2854-
std::string qstr(thd->query().str, thd->query().length);
28552838
DBUG_ENTER("handler::ha_index_init");
2856-
DBUG_PRINT("", ("(index=%d)", idx));
2857-
DBUG_PRINT("", ("query=%s", qstr.c_str()));
28582839
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
28592840
m_lock_type != F_UNLCK);
28602841
DBUG_ASSERT(inited == NONE);
@@ -2903,11 +2884,7 @@ int handler::ha_rnd_init(bool scan)
29032884
{
29042885
DBUG_EXECUTE_IF("ha_rnd_init_fail", return HA_ERR_TABLE_DEF_CHANGED;);
29052886
int result;
2906-
THD *thd= current_thd;
2907-
std::string qstr(thd->query().str, thd->query().length);
29082887
DBUG_ENTER("handler::ha_rnd_init");
2909-
DBUG_PRINT("", ("(scan=%d)", scan));
2910-
DBUG_PRINT("", ("query=%s", qstr.c_str()));
29112888
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
29122889
m_lock_type != F_UNLCK);
29132890
DBUG_ASSERT(inited == NONE || (inited == RND && scan));
@@ -3037,9 +3014,7 @@ int handler::ha_index_read_map(uchar *buf, const uchar *key,
30373014
enum ha_rkey_function find_flag)
30383015
{
30393016
int result;
3040-
30413017
DBUG_ENTER("handler::ha_index_read_map");
3042-
DBUG_PRINT("", ("(index=%d, find_flag=%d, key=%s)", active_index, find_flag, key_to_text(key, 0).c_str()));
30433018
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
30443019
m_lock_type != F_UNLCK);
30453020
DBUG_ASSERT(inited == INDEX);
@@ -3063,7 +3038,6 @@ int handler::ha_index_read_last_map(uchar *buf, const uchar *key,
30633038
{
30643039
int result;
30653040
DBUG_ENTER("handler::ha_index_read_last_map");
3066-
DBUG_PRINT("", ("(index=%d, key=%s)", active_index, key_to_text(key, 0).c_str()));
30673041
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
30683042
m_lock_type != F_UNLCK);
30693043
DBUG_ASSERT(inited == INDEX);
@@ -3093,11 +3067,7 @@ int handler::ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
30933067
enum ha_rkey_function find_flag)
30943068
{
30953069
int result;
3096-
THD *thd= current_thd;
3097-
std::string qstr(thd->query().str, thd->query().length);
30983070
DBUG_ENTER("handler::ha_index_read_idx_map");
3099-
DBUG_PRINT("", ("(index=%d, key=%s)", active_index, key_to_text(key, 0).c_str()));
3100-
DBUG_PRINT("", ("query=%s", qstr.c_str()));
31013071
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
31023072
m_lock_type != F_UNLCK);
31033073
DBUG_ASSERT(end_range == NULL);
@@ -3270,7 +3240,6 @@ int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
32703240
{
32713241
int result;
32723242
DBUG_ENTER("handler::ha_index_next_same");
3273-
DBUG_PRINT("", ("(index=%d, key_len=%d, key=%s)", active_index, keylen, key_to_text(key, keylen).c_str()));
32743243
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
32753244
m_lock_type != F_UNLCK);
32763245
DBUG_ASSERT(inited == INDEX);

0 commit comments

Comments
 (0)