69
69
#include < cmath>
70
70
#include < cstring>
71
71
#include < string>
72
- #include < sstream>
73
72
#include < boost/foreach.hpp>
74
73
#include < boost/tokenizer.hpp>
75
74
#include < boost/algorithm/string.hpp>
@@ -2700,20 +2699,6 @@ PSI_table_share *handler::ha_table_share_psi(const TABLE_SHARE *share) const
2700
2699
return share->m_psi ;
2701
2700
}
2702
2701
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
- }
2717
2702
2718
2703
/*
2719
2704
Open database handler object.
@@ -2850,11 +2835,7 @@ int handler::ha_index_init(uint idx, bool sorted)
2850
2835
{
2851
2836
DBUG_EXECUTE_IF (" ha_index_init_fail" , return HA_ERR_TABLE_DEF_CHANGED;);
2852
2837
int result;
2853
- THD *thd= current_thd;
2854
- std::string qstr (thd->query ().str , thd->query ().length );
2855
2838
DBUG_ENTER (" handler::ha_index_init" );
2856
- DBUG_PRINT (" " , (" (index=%d)" , idx));
2857
- DBUG_PRINT (" " , (" query=%s" , qstr.c_str ()));
2858
2839
DBUG_ASSERT (table_share->tmp_table != NO_TMP_TABLE ||
2859
2840
m_lock_type != F_UNLCK);
2860
2841
DBUG_ASSERT (inited == NONE);
@@ -2903,11 +2884,7 @@ int handler::ha_rnd_init(bool scan)
2903
2884
{
2904
2885
DBUG_EXECUTE_IF (" ha_rnd_init_fail" , return HA_ERR_TABLE_DEF_CHANGED;);
2905
2886
int result;
2906
- THD *thd= current_thd;
2907
- std::string qstr (thd->query ().str , thd->query ().length );
2908
2887
DBUG_ENTER (" handler::ha_rnd_init" );
2909
- DBUG_PRINT (" " , (" (scan=%d)" , scan));
2910
- DBUG_PRINT (" " , (" query=%s" , qstr.c_str ()));
2911
2888
DBUG_ASSERT (table_share->tmp_table != NO_TMP_TABLE ||
2912
2889
m_lock_type != F_UNLCK);
2913
2890
DBUG_ASSERT (inited == NONE || (inited == RND && scan));
@@ -3037,9 +3014,7 @@ int handler::ha_index_read_map(uchar *buf, const uchar *key,
3037
3014
enum ha_rkey_function find_flag)
3038
3015
{
3039
3016
int result;
3040
-
3041
3017
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 ()));
3043
3018
DBUG_ASSERT (table_share->tmp_table != NO_TMP_TABLE ||
3044
3019
m_lock_type != F_UNLCK);
3045
3020
DBUG_ASSERT (inited == INDEX);
@@ -3063,7 +3038,6 @@ int handler::ha_index_read_last_map(uchar *buf, const uchar *key,
3063
3038
{
3064
3039
int result;
3065
3040
DBUG_ENTER (" handler::ha_index_read_last_map" );
3066
- DBUG_PRINT (" " , (" (index=%d, key=%s)" , active_index, key_to_text (key, 0 ).c_str ()));
3067
3041
DBUG_ASSERT (table_share->tmp_table != NO_TMP_TABLE ||
3068
3042
m_lock_type != F_UNLCK);
3069
3043
DBUG_ASSERT (inited == INDEX);
@@ -3093,11 +3067,7 @@ int handler::ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
3093
3067
enum ha_rkey_function find_flag)
3094
3068
{
3095
3069
int result;
3096
- THD *thd= current_thd;
3097
- std::string qstr (thd->query ().str , thd->query ().length );
3098
3070
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 ()));
3101
3071
DBUG_ASSERT (table_share->tmp_table != NO_TMP_TABLE ||
3102
3072
m_lock_type != F_UNLCK);
3103
3073
DBUG_ASSERT (end_range == NULL );
@@ -3270,7 +3240,6 @@ int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
3270
3240
{
3271
3241
int result;
3272
3242
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 ()));
3274
3243
DBUG_ASSERT (table_share->tmp_table != NO_TMP_TABLE ||
3275
3244
m_lock_type != F_UNLCK);
3276
3245
DBUG_ASSERT (inited == INDEX);
0 commit comments