diff options
author | Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com> | 2011-10-19 03:21:31 +0100 |
---|---|---|
committer | Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com> | 2011-10-19 03:21:31 +0100 |
commit | 7d882c19ecad83af921dd7bd9d77f088da594ac0 (patch) | |
tree | dad66f78fd97dc1c6ad37787e2824fbe831506bf /sql/sql_parse.cc | |
parent | cf66b6511f8b9293152e60dcefaa0e67a34c242f (diff) | |
download | mariadb-git-7d882c19ecad83af921dd7bd9d77f088da594ac0.tar.gz |
Bug12589870 post-merge fixes for Sparc64 and friends
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a88cc2fa8e5..989c3e0f42f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -492,6 +492,8 @@ static void handle_bootstrap_impl(THD *thd) query= (char *) thd->memdup_w_gap(buff, length + 1, thd->db_length + 1 + QUERY_CACHE_FLAGS_SIZE); + size_t db_len= 0; + memcpy(query + length + 1, (char *) &db_len, sizeof(size_t)); thd->set_query(query, length); DBUG_PRINT("query",("%-.4096s", thd->query())); #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) @@ -1933,8 +1935,8 @@ bool alloc_query(THD *thd, const char *packet, uint packet_length) also store this length, in case current database is changed during execution. We might need to reallocate the 'query' buffer */ - size_t *len = (size_t *) (query + packet_length + 1); - *len= thd->db_length; + char *len_pos = (query + packet_length + 1); + memcpy(len_pos, (char *) &thd->db_length, sizeof(size_t)); thd->set_query(query, packet_length); |