diff options
author | unknown <monty@narttu.mysql.fi> | 2003-08-20 16:25:44 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2003-08-20 16:25:44 +0300 |
commit | de5d47c35d426a84cb0fd453dfdc17012dc8ba55 (patch) | |
tree | 4d61f552796b268be72317d81fd6051dd59c7966 /myisam/mi_search.c | |
parent | 9c5c6dafa16fe5c6e77b72a0dafa310417600901 (diff) | |
download | mariadb-git-de5d47c35d426a84cb0fd453dfdc17012dc8ba55.tar.gz |
Fixed some varnings from valgrind
Set min value of max_allowed_packet to 1024
Fixed problem with UNION's without braces and SQL_CALC_FOUND_ROWS, LIMIT #,#
and ORDER BY...LIMIT
include/m_string.h:
Added memcpy_overlap() to avoid warnings when using valgrind on memcpy(A,A,...)
myisam/mi_create.c:
Fixed comment
myisam/mi_search.c:
Fix warning from valgrind
myisam/mi_write.c:
Indentation fix
mysql-test/mysql-test-run.sh:
Add options handled by general skip- option
mysql-test/r/packet.result:
Update results after change to mysqld (min max_allowed_packet length is now 1024)
mysql-test/r/union.result:
Added testing of UNION with SQL_CALC_FOUND_ROWS
mysql-test/t/packet.test:
Update results after change to mysqld (min max_allowed_packet length is now 1024)
mysql-test/t/union.test:
Added testing of UNION with SQL_CALC_FOUND_ROWS
sql/field.cc:
Fix to remove waarning from valgrind
sql/ha_innodb.cc:
Remove wrong include file
sql/item_cmpfunc.cc:
Safety fix to handle EOM conditions in IN
sql/item_sum.cc:
Fixed prototype for update_field() (argument was alwys 0)
sql/item_sum.h:
Fixed prototype for update_field() (argument was alwys 0)
sql/item_uniq.h:
Fixed prototype for update_field() (argument was alwys 0)
sql/log.cc:
Indentation fix
sql/mysqld.cc:
Set min value of max_allowed_packet to 1024 (to avoid it getting set to 0)
sql/net_serv.cc:
Indentation changes + trivial optimization
sql/sql_select.cc:
Fixed prototype for update_field() (argument was alwys 0)
sql/sql_union.cc:
Fixed problem with UNION's without braces and
- SQL_CALC_FOUND_ROWS
- LIMIT #,#
- ORDER BY ... LIMIT
Diffstat (limited to 'myisam/mi_search.c')
-rw-r--r-- | myisam/mi_search.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/myisam/mi_search.c b/myisam/mi_search.c index 32db69144d8..423b15ff8f7 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -1218,9 +1218,10 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, register uchar **page_pos, register uchar *key) { reg1 MI_KEYSEG *keyseg; - uchar *start_key,*page=*page_pos,*page_end,*from,*from_end; + uchar *start_key,*page,*page_end,*from,*from_end; uint length,tmp; + page= *page_pos; page_end=page+MI_MAX_KEY_BUFF+1; start_key=key; @@ -1276,7 +1277,9 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, length-=tmp; from=page; from_end=page_end; } - memcpy((byte*) key,(byte*) from,(size_t) length); + DBUG_PRINT("info",("key: %lx from: %lx length: %u", + key, from, length)); + memcpy_overlap((byte*) key, (byte*) from, (size_t) length); key+=length; from+=length; } @@ -1998,6 +2001,9 @@ _mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key, uint length,key_length,ref_length; s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag; +#ifdef HAVE_purify + s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */ +#endif s_temp->key=key; s_temp->prev_key=org_key; if (prev_key) /* If not first key in block */ |