summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-10-19 03:21:31 +0100
committerTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-10-19 03:21:31 +0100
commit8444b6a1149aad457f8d584e0d410c3be9cd4336 (patch)
treedad66f78fd97dc1c6ad37787e2824fbe831506bf /sql/sql_cache.cc
parent5dc553cd28853b6bce70644a52d835b595fde12a (diff)
downloadmariadb-git-8444b6a1149aad457f8d584e0d410c3be9cd4336.tar.gz
Bug12589870 post-merge fixes for Sparc64 and friends
sql/sp_head.cc: alignment-safe copy sql/sql_cache.cc: alignment-safe copy sql/sql_parse.cc: alignment-safe copy
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 4800fdedbe5..8a6d4bf9802 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1471,8 +1471,9 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
sure the new current database has a name with the same length
as the previous one.
*/
- size_t *db_len= (size_t *) (sql + query_length + 1);
- if (thd->db_length != *db_len)
+ size_t db_len;
+ memcpy((char *) &db_len, (sql + query_length + 1), sizeof(size_t));
+ if (thd->db_length != db_len)
{
/*
We should probably reallocate the buffer in this case,