[Commits] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2923)

Michael Widenius monty at askmonty.org
Tue Sep 7 13:59:36 EEST 2010


#At lp:maria based on revid:monty at askmonty.org-20100905234851-x44wj7c1wd2t4hd3

 2923 Michael Widenius	2010-09-07
      Fixed compiler failures when compiling non debug build
      modified:
        storage/maria/ha_maria.cc
        storage/maria/ma_delete.c
        storage/maria/ma_key_recover.c
        storage/maria/ma_key_recover.h

per-file messages:
  storage/maria/ha_maria.cc
    Don't use 'trn' variable to avoid warning about not used variable
  storage/maria/ma_delete.c
    Added __attribute__((unused))
  storage/maria/ma_key_recover.c
    Added __attribute__((unused))
    Fixed wrong placement of #endif
  storage/maria/ma_key_recover.h
    Fixed typo
=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc	2010-09-05 23:25:44 +0000
+++ b/storage/maria/ha_maria.cc	2010-09-07 10:59:34 +0000
@@ -2352,9 +2352,9 @@ int ha_maria::reset(void)
 {
   if (file->trn)
   {
-    TRN *trn= file->trn;
     /* Next statement is a new statement. Ensure it's logged */
-    trnman_set_flags(trn, trnman_get_flags(trn) & ~TRN_STATE_INFO_LOGGED);
+    trnman_set_flags(file->trn,
+                     trnman_get_flags(file->trn) & ~TRN_STATE_INFO_LOGGED);
   }
   return maria_reset(file);
 }

=== modified file 'storage/maria/ma_delete.c'
--- a/storage/maria/ma_delete.c	2010-09-05 23:25:44 +0000
+++ b/storage/maria/ma_delete.c	2010-09-07 10:59:34 +0000
@@ -1445,7 +1445,7 @@ static uint remove_key(MARIA_KEYDEF *key
 
 my_bool _ma_log_delete(MARIA_PAGE *ma_page, const uchar *key_pos,
                        uint changed_length, uint move_length,
-                       uint append_length,
+                       uint append_length __attribute__((unused)),
                        enum en_key_debug debug_marker __attribute__((unused)))
 {
   LSN lsn;

=== modified file 'storage/maria/ma_key_recover.c'
--- a/storage/maria/ma_key_recover.c	2010-09-05 23:25:44 +0000
+++ b/storage/maria/ma_key_recover.c	2010-09-07 10:59:34 +0000
@@ -486,8 +486,8 @@ my_bool _ma_log_suffix(MARIA_PAGE *ma_pa
 */
 
 my_bool _ma_log_add(MARIA_PAGE *ma_page,
-                    uint org_page_length, uchar *key_pos,
-                    uint changed_length, int move_length,
+                    uint org_page_length __attribute__ ((unused)),
+                    uchar *key_pos, uint changed_length, int move_length,
                     my_bool handle_overflow __attribute__ ((unused)))
 {
   LSN lsn;
@@ -670,10 +670,11 @@ void _ma_log_key_changes(MARIA_PAGE *ma_
   log_array[1].length= page_length;
   (*changed_length)+=  page_length;
   (*translog_parts)++;
-#endif
-#endif
+#endif /* EXTRA_STORE_FULL_PAGE_IN_KEY_CHANGES */
 }
 
+#endif /* EXTRA_DEBUG_KEY_CHANGES */
+
 /****************************************************************************
   Redo of key pages
 ****************************************************************************/

=== modified file 'storage/maria/ma_key_recover.h'
--- a/storage/maria/ma_key_recover.h	2010-09-05 23:25:44 +0000
+++ b/storage/maria/ma_key_recover.h	2010-09-07 10:59:34 +0000
@@ -82,7 +82,7 @@ void _ma_log_key_changes(MARIA_PAGE *ma_
                          uchar *log_pos, uint *changed_length,
                          uint *translog_parts);
 #else
-void _ma_log_key_changes(A,B,C,D,E)
+#define _ma_log_key_changes(A,B,C,D,E)
 #endif
 
 uint _ma_apply_redo_index_new_page(MARIA_HA *info, LSN lsn,



More information about the commits mailing list