From a1d55ea0529e02cccc53e54c780853721a657e85 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Wed, 15 Jun 2005 22:49:52 +0200 Subject: [PATCH] cleanup for bug#11167. portability alignment issues. --- sql/sql_select.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2cb650cda2a..41b56ae888c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -8112,9 +8112,9 @@ store_record_in_cache(JOIN_CACHE *cache) end > str && end[-1] == ' ' ; end--) ; length=(uint) (end-str); - memcpy(pos+sizeof(uint), str, length); - *((uint *) pos)= length; - pos+= length+sizeof(uint); + memcpy(pos+2, str, length); + int2store(pos, length); + pos+= length+2; } else { @@ -8177,9 +8177,9 @@ read_cached_record(JOIN_TAB *tab) { if (copy->strip) { - memcpy(copy->str, pos+sizeof(uint), length= *((uint *) pos)); + memcpy(copy->str, pos+2, length= uint2korr(pos)); memset(copy->str+length, ' ', copy->length-length); - pos+= sizeof(uint)+length; + pos+= 2+length; } else {