Loading BitKeeper/etc/logging_ok +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ joerg@mysql.com joreland@mysql.com jorge@linux.jorge.mysql.com jplindst@t41.(none) kaa@polly.local kaj@work.mysql.com kent@mysql.com konstantin@mysql.com Loading configure.in +17 −1 Original line number Diff line number Diff line Loading @@ -749,7 +749,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \ sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \ unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \ sys/ioctl.h malloc.h sys/malloc.h linux/config.h) sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h) #-------------------------------------------------------------------- # Check for system libraries. Adds the library to $LIBS Loading @@ -776,6 +776,22 @@ AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt])) AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init)) MYSQL_CHECK_ZLIB_WITH_COMPRESS # For large pages support if test "$IS_LINUX" = "true" then # For SHM_HUGETLB on Linux AC_CHECK_DECLS(SHM_HUGETLB, AC_DEFINE([HAVE_LARGE_PAGES], [1], [Define if you have large pages support]) AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1], [Define if /proc/meminfo shows the huge page size (Linux only)]) , , [ #include <sys/shm.h> ] ) fi #-------------------------------------------------------------------- # Check for TCP wrapper support #-------------------------------------------------------------------- Loading include/my_sys.h +15 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,16 @@ extern char *my_strdup_with_length(const byte *from, uint length, #define TRASH(A,B) /* nothing */ #endif #ifdef HAVE_LARGE_PAGES extern uint my_get_large_page_size(void); extern gptr my_large_malloc(uint size, myf my_flags); extern void my_large_free(gptr ptr, myf my_flags); #else #define my_get_large_page_size() (0) #define my_large_malloc(A,B) my_malloc_lock((A),(B)) #define my_large_free(A,B) my_free_lock((A),(B)) #endif /* HAVE_LARGE_PAGES */ #ifdef HAVE_ALLOCA #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #pragma alloca Loading Loading @@ -213,6 +223,11 @@ extern int (*fatal_error_handler_hook)(uint my_err, const char *str, myf MyFlags); extern uint my_file_limit; #ifdef HAVE_LARGE_PAGES extern my_bool my_use_large_pages; extern uint my_large_page_size; #endif /* charsets */ extern CHARSET_INFO *default_charset_info; extern CHARSET_INFO *all_charsets[256]; Loading innobase/buf/buf0buf.c +34 −22 Original line number Diff line number Diff line Loading @@ -331,6 +331,13 @@ buf_page_is_corrupted( } } #endif /* If we use checksums validation, make additional check before returning TRUE to ensure that the checksum is not equal to BUF_NO_CHECKSUM_MAGIC which might be stored by InnoDB with checksums disabled. Otherwise, skip checksum calculation and return FALSE */ if (srv_use_checksums) { old_checksum = buf_calc_page_old_checksum(read_buf); old_checksum_field = mach_read_from_4(read_buf + UNIV_PAGE_SIZE Loading @@ -342,7 +349,8 @@ buf_page_is_corrupted( 2. Newer InnoDB versions store the old formula checksum there. */ if (old_checksum_field != mach_read_from_4(read_buf + FIL_PAGE_LSN) && old_checksum_field != old_checksum) { && old_checksum_field != old_checksum && old_checksum_field != BUF_NO_CHECKSUM_MAGIC) { return(TRUE); } Loading @@ -353,9 +361,11 @@ buf_page_is_corrupted( /* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id (always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */ if (checksum_field != 0 && checksum_field != checksum) { if (checksum_field != 0 && checksum_field != checksum && checksum_field != BUF_NO_CHECKSUM_MAGIC) { return(TRUE); } } return(FALSE); Loading @@ -379,8 +389,10 @@ buf_page_print( ut_print_buf(stderr, read_buf, UNIV_PAGE_SIZE); fputs("InnoDB: End of page dump\n", stderr); checksum = buf_calc_page_new_checksum(read_buf); old_checksum = buf_calc_page_old_checksum(read_buf); checksum = srv_use_checksums ? buf_calc_page_new_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC; old_checksum = srv_use_checksums ? buf_calc_page_old_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC; ut_print_timestamp(stderr); fprintf(stderr, Loading Loading @@ -548,7 +560,7 @@ buf_pool_init( } /*----------------------------------------*/ } else { buf_pool->frame_mem = ut_malloc_low( buf_pool->frame_mem = os_mem_alloc_large( UNIV_PAGE_SIZE * (n_frames + 1), TRUE, FALSE); } Loading innobase/buf/buf0flu.c +4 −2 Original line number Diff line number Diff line Loading @@ -448,7 +448,8 @@ buf_flush_init_for_writing( /* Store the new formula checksum */ mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, buf_calc_page_new_checksum(page)); srv_use_checksums ? buf_calc_page_new_checksum(page) : BUF_NO_CHECKSUM_MAGIC); /* We overwrite the first 4 bytes of the end lsn field to store the old formula checksum. Since it depends also on the field Loading @@ -456,7 +457,8 @@ buf_flush_init_for_writing( new formula checksum. */ mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, buf_calc_page_old_checksum(page)); srv_use_checksums ? buf_calc_page_old_checksum(page) : BUF_NO_CHECKSUM_MAGIC); } /************************************************************************ Loading Loading
BitKeeper/etc/logging_ok +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ joerg@mysql.com joreland@mysql.com jorge@linux.jorge.mysql.com jplindst@t41.(none) kaa@polly.local kaj@work.mysql.com kent@mysql.com konstantin@mysql.com Loading
configure.in +17 −1 Original line number Diff line number Diff line Loading @@ -749,7 +749,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \ sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \ unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \ sys/ioctl.h malloc.h sys/malloc.h linux/config.h) sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h) #-------------------------------------------------------------------- # Check for system libraries. Adds the library to $LIBS Loading @@ -776,6 +776,22 @@ AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt])) AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init)) MYSQL_CHECK_ZLIB_WITH_COMPRESS # For large pages support if test "$IS_LINUX" = "true" then # For SHM_HUGETLB on Linux AC_CHECK_DECLS(SHM_HUGETLB, AC_DEFINE([HAVE_LARGE_PAGES], [1], [Define if you have large pages support]) AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1], [Define if /proc/meminfo shows the huge page size (Linux only)]) , , [ #include <sys/shm.h> ] ) fi #-------------------------------------------------------------------- # Check for TCP wrapper support #-------------------------------------------------------------------- Loading
include/my_sys.h +15 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,16 @@ extern char *my_strdup_with_length(const byte *from, uint length, #define TRASH(A,B) /* nothing */ #endif #ifdef HAVE_LARGE_PAGES extern uint my_get_large_page_size(void); extern gptr my_large_malloc(uint size, myf my_flags); extern void my_large_free(gptr ptr, myf my_flags); #else #define my_get_large_page_size() (0) #define my_large_malloc(A,B) my_malloc_lock((A),(B)) #define my_large_free(A,B) my_free_lock((A),(B)) #endif /* HAVE_LARGE_PAGES */ #ifdef HAVE_ALLOCA #if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) #pragma alloca Loading Loading @@ -213,6 +223,11 @@ extern int (*fatal_error_handler_hook)(uint my_err, const char *str, myf MyFlags); extern uint my_file_limit; #ifdef HAVE_LARGE_PAGES extern my_bool my_use_large_pages; extern uint my_large_page_size; #endif /* charsets */ extern CHARSET_INFO *default_charset_info; extern CHARSET_INFO *all_charsets[256]; Loading
innobase/buf/buf0buf.c +34 −22 Original line number Diff line number Diff line Loading @@ -331,6 +331,13 @@ buf_page_is_corrupted( } } #endif /* If we use checksums validation, make additional check before returning TRUE to ensure that the checksum is not equal to BUF_NO_CHECKSUM_MAGIC which might be stored by InnoDB with checksums disabled. Otherwise, skip checksum calculation and return FALSE */ if (srv_use_checksums) { old_checksum = buf_calc_page_old_checksum(read_buf); old_checksum_field = mach_read_from_4(read_buf + UNIV_PAGE_SIZE Loading @@ -342,7 +349,8 @@ buf_page_is_corrupted( 2. Newer InnoDB versions store the old formula checksum there. */ if (old_checksum_field != mach_read_from_4(read_buf + FIL_PAGE_LSN) && old_checksum_field != old_checksum) { && old_checksum_field != old_checksum && old_checksum_field != BUF_NO_CHECKSUM_MAGIC) { return(TRUE); } Loading @@ -353,9 +361,11 @@ buf_page_is_corrupted( /* InnoDB versions < 4.0.14 and < 4.1.1 stored the space id (always equal to 0), to FIL_PAGE_SPACE_SPACE_OR_CHKSUM */ if (checksum_field != 0 && checksum_field != checksum) { if (checksum_field != 0 && checksum_field != checksum && checksum_field != BUF_NO_CHECKSUM_MAGIC) { return(TRUE); } } return(FALSE); Loading @@ -379,8 +389,10 @@ buf_page_print( ut_print_buf(stderr, read_buf, UNIV_PAGE_SIZE); fputs("InnoDB: End of page dump\n", stderr); checksum = buf_calc_page_new_checksum(read_buf); old_checksum = buf_calc_page_old_checksum(read_buf); checksum = srv_use_checksums ? buf_calc_page_new_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC; old_checksum = srv_use_checksums ? buf_calc_page_old_checksum(read_buf) : BUF_NO_CHECKSUM_MAGIC; ut_print_timestamp(stderr); fprintf(stderr, Loading Loading @@ -548,7 +560,7 @@ buf_pool_init( } /*----------------------------------------*/ } else { buf_pool->frame_mem = ut_malloc_low( buf_pool->frame_mem = os_mem_alloc_large( UNIV_PAGE_SIZE * (n_frames + 1), TRUE, FALSE); } Loading
innobase/buf/buf0flu.c +4 −2 Original line number Diff line number Diff line Loading @@ -448,7 +448,8 @@ buf_flush_init_for_writing( /* Store the new formula checksum */ mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, buf_calc_page_new_checksum(page)); srv_use_checksums ? buf_calc_page_new_checksum(page) : BUF_NO_CHECKSUM_MAGIC); /* We overwrite the first 4 bytes of the end lsn field to store the old formula checksum. Since it depends also on the field Loading @@ -456,7 +457,8 @@ buf_flush_init_for_writing( new formula checksum. */ mach_write_to_4(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, buf_calc_page_old_checksum(page)); srv_use_checksums ? buf_calc_page_old_checksum(page) : BUF_NO_CHECKSUM_MAGIC); } /************************************************************************ Loading