diff options
author | unknown <monty@mysql.com> | 2005-02-15 17:12:13 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-15 17:12:13 +0200 |
commit | e99987132ad5159bec4f51d235e67201a5ec92e4 (patch) | |
tree | 15b9cad34a1d5d325aaaa43172f7410440a0e70e /libmysqld | |
parent | b0adbd5725d70803a2b26ba2dd0cb2572ee696f9 (diff) | |
parent | 2193dee2e09ff5d22af60449c97f8980b43d6811 (diff) | |
download | mariadb-git-e99987132ad5159bec4f51d235e67201a5ec92e4.tar.gz |
Merge with 4.1
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/triggers/post-commit:
Auto merged
innobase/row/row0mysql.c:
Auto merged
myisam/ft_boolean_search.c:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/union.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_list.h:
Auto merged
sql/examples/ha_archive.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.h:
Auto merged
vio/viosocket.c:
Auto merged
scripts/mysql_create_system_tables.sh:
simple merge
sql/field.cc:
simple merge
sql/item.h:
simple merge
sql/sql_lex.h:
simple merge
sql/sql_yacc.yy:
Merge
(join_table_list was not comptely merged. Need to run test to know how things works...)
sql/table.cc:
Keep code from 5.0, except delted one not needed line
strings/ctype-ucs2.c:
Auto merge
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/emb_qcache.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc index 7d83023abd5..2d3d82b7952 100644 --- a/libmysqld/emb_qcache.cc +++ b/libmysqld/emb_qcache.cc @@ -71,9 +71,11 @@ void Querycache_stream::store_int(uint i) cur_data+= 4; return; } - memcpy(cur_data, &i, rest_len); + char buf[4]; + int4store(buf, i); + memcpy(cur_data, buf, rest_len); use_next_block(); - memcpy(cur_data, ((byte*)&i)+rest_len, 4-rest_len); + memcpy(cur_data, buf+rest_len, 4-rest_len); cur_data+= 4-rest_len; } @@ -186,10 +188,12 @@ uint Querycache_stream::load_int() cur_data+= 4; return result; } - memcpy(&result, cur_data, rest_len); + char buf[4]; + memcpy(buf, cur_data, rest_len); use_next_block(); - memcpy(((byte*)&result)+rest_len, cur_data, 4-rest_len); + memcpy(buf+rest_len, cur_data, 4-rest_len); cur_data+= 4-rest_len; + result= uint4korr(buf); return result; } @@ -270,10 +274,10 @@ int Querycache_stream::load_column(MEM_ROOT *alloc, char** column) return 0; } len--; - if (!(*column= (char *)alloc_root(alloc, len + 4 + 1))) + if (!(*column= (char *)alloc_root(alloc, len + sizeof(uint) + 1))) return 1; - int4store(*column, len); - (*column)+= 4; + *((uint*)*column)= len; + (*column)+= sizeof(uint); load_str_only(*column, len); return 1; } |