diff options
| author | Michael Widenius <monty@mysql.com> | 2008-06-02 10:27:41 +0300 |
|---|---|---|
| committer | Michael Widenius <monty@mysql.com> | 2008-06-02 10:27:41 +0300 |
| commit | 9977cae802936fa7203653e5dd965fb056a28c35 (patch) | |
| tree | dbe6462b12081cc1173229c9dd66957d7a70c31b | |
| parent | 0816d9a70e8e93139ec41e45967e7e44acce74b9 (diff) | |
| download | mariadb-git-9977cae802936fa7203653e5dd965fb056a28c35.tar.gz | |
Fixed build errors/warnings caused by my last push
mysql-test/valgrind.supp:
Added suppression for not relevant warning for memory leak in dlclose
storage/maria/ma_blockrec.c:
Fixed build error on Windows
storage/maria/ma_delete_all.c:
Fixed call to wrong function
storage/maria/ma_state.c:
Added purcov suppression block
Removed temporary debug printing
| -rw-r--r-- | mysql-test/valgrind.supp | 9 | ||||
| -rw-r--r-- | storage/maria/ma_blockrec.c | 7 | ||||
| -rw-r--r-- | storage/maria/ma_delete_all.c | 2 | ||||
| -rw-r--r-- | storage/maria/ma_state.c | 6 |
4 files changed, 17 insertions, 7 deletions
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index e89d670efcb..e3ef8907d9b 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -379,6 +379,15 @@ } { + dlclose memory loss from plugin + Memcheck:Leak + fun:calloc + fun:_dlerror_run + fun:dlclose + fun:plugin_dl_del +} + +{ dlopen / ptread_cancel_init memory loss on Suse Linux 10.3 64 bit Memcheck:Leak fun:*alloc diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c index d8248f5570b..eaa37b8d016 100644 --- a/storage/maria/ma_blockrec.c +++ b/storage/maria/ma_blockrec.c @@ -1437,9 +1437,10 @@ void _ma_compact_block_page(uchar *buff, uint block_size, uint rownr, Move the current row down to it's right place and extend it with 0. */ - DBUG_ASSERT(page_pos != start_of_found_block); uint row_diff= min_row_length - row_length; uint length= (next_free_pos - start_of_found_block); + + DBUG_ASSERT(page_pos != start_of_found_block); bmove(buff + page_pos, buff + start_of_found_block, length); bzero(buff+ page_pos + length, row_diff); page_pos+= min_row_length; @@ -6673,7 +6674,7 @@ my_bool _ma_apply_undo_row_delete(MARIA_HA *info, LSN undo_lsn, header+= 2 + row.field_lengths_length; } if (share->base.blobs) - row.blob_length= ma_get_length((uchar**) &header); + row.blob_length= ma_get_length(&header); /* We need to build up a record (without blobs) in rec_buff */ if (!(record= my_malloc(share->base.reclength, MYF(MY_WME)))) @@ -6888,7 +6889,7 @@ my_bool _ma_apply_undo_row_update(MARIA_HA *info, LSN undo_lsn, Set header to point to old field values, generated by fill_update_undo_parts() */ - field_length_header= ma_get_length((uchar**) &header); + field_length_header= ma_get_length(&header); field_length_data= (uchar*) header; header+= field_length_header; field_length_data_end= header; diff --git a/storage/maria/ma_delete_all.c b/storage/maria/ma_delete_all.c index 6f0b30ea979..c2857af7f62 100644 --- a/storage/maria/ma_delete_all.c +++ b/storage/maria/ma_delete_all.c @@ -91,7 +91,7 @@ int maria_delete_all_rows(MARIA_HA *info) #ifdef HAVE_MMAP if (share->file_map) - _mi_unmap_file(info); + _ma_unmap_file(info); #endif if (_ma_flush_table_files(info, MARIA_FLUSH_DATA|MARIA_FLUSH_INDEX, diff --git a/storage/maria/ma_state.c b/storage/maria/ma_state.c index 6adaf6818cc..4dae0c3cc03 100644 --- a/storage/maria/ma_state.c +++ b/storage/maria/ma_state.c @@ -88,10 +88,8 @@ my_bool _ma_setup_live_state(MARIA_HA *info) It's enough to compare trids here (instead of calling tranman_can_read_from) as history->trid is a commit_trid */ - DBUG_PRINT("QQ", ("trn->trid: 0x%lu", (long) trn->trid)); while (trn->trid < history->trid) history= history->next; - DBUG_PRINT("QQ", ("his->trid: 0x%lu", (long) history->trid)); pthread_mutex_unlock(&share->intern_lock); /* The current item can't be deleted as it's the first one visible for us */ tables->state_start= tables->state_current= history->state; @@ -349,10 +347,12 @@ my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit, { if (!(history= my_malloc(sizeof(*history), MYF(MY_WME)))) { + /* purecov: begin inspected */ + error= 1; pthread_mutex_unlock(&share->intern_lock); my_free(tables, MYF(0)); - error= 1; continue; + /* purecov: end */ } history->state= share->state_history->state; history->next= share->state_history; |
