summaryrefslogtreecommitdiff
path: root/sql/sql_digest.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-10-24 20:06:59 +0200
committerSergei Golubchik <serg@mariadb.org>2015-10-24 20:06:59 +0200
commit6a28882b57497b7c167577b2cdc03c7193779b71 (patch)
tree0d81225e40306e838bc1f5695db410ae9c7535c3 /sql/sql_digest.h
parent84da1547e6ccc25daa0e7a9b11ae51c51629a923 (diff)
downloadmariadb-git-6a28882b57497b7c167577b2cdc03c7193779b71.tar.gz
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()
Diffstat (limited to 'sql/sql_digest.h')
-rw-r--r--sql/sql_digest.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_digest.h b/sql/sql_digest.h
index ce159283d4d..eaf74b9542e 100644
--- a/sql/sql_digest.h
+++ b/sql/sql_digest.h
@@ -41,6 +41,9 @@ struct sql_digest_storage
For Example:
SELECT * FROM T1;
&lt;SELECT_TOKEN&gt; &lt;*&gt; &lt;FROM_TOKEN&gt; &lt;ID_TOKEN&gt; &lt;2&gt; &lt;T1&gt;
+
+ @note Only the first @c m_byte_count bytes are initialized,
+ out of @c m_token_array_length.
*/
unsigned char *m_token_array;
/* Length of the token array to be considered for DIGEST_TEXT calculation. */
@@ -63,10 +66,6 @@ struct sql_digest_storage
m_full= false;
m_byte_count= 0;
m_charset_number= 0;
- if (m_token_array_length > 0)
- {
- memset(m_token_array, 0, m_token_array_length);
- }
memset(m_md5, 0, MD5_HASH_SIZE);
}