Skip to content

Commit 6a28882

Browse files
committed
merge commit 02b00b154
Author: Marc Alff <marc.alff@oracle.com> Date: Thu Jul 30 11:17:50 2015 +0200 Bug#21528683 SLOWDOWN CAUSED BY MEMSET IN SQL_DIGEST_STORAGE.RESET()
1 parent 84da154 commit 6a28882

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sql/sql_digest.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ struct sql_digest_storage
4141
For Example:
4242
SELECT * FROM T1;
4343
&lt;SELECT_TOKEN&gt; &lt;*&gt; &lt;FROM_TOKEN&gt; &lt;ID_TOKEN&gt; &lt;2&gt; &lt;T1&gt;
44+
45+
@note Only the first @c m_byte_count bytes are initialized,
46+
out of @c m_token_array_length.
4447
*/
4548
unsigned char *m_token_array;
4649
/* Length of the token array to be considered for DIGEST_TEXT calculation. */
@@ -63,10 +66,6 @@ struct sql_digest_storage
6366
m_full= false;
6467
m_byte_count= 0;
6568
m_charset_number= 0;
66-
if (m_token_array_length > 0)
67-
{
68-
memset(m_token_array, 0, m_token_array_length);
69-
}
7069
memset(m_md5, 0, MD5_HASH_SIZE);
7170
}
7271

0 commit comments

Comments
 (0)