Commit 4465e272 authored by marko's avatar marko

branches/zip: Allow the code to be built with function inlining enabled.

page0page.h: Add #include "page0zip.h"

page_dir_slot_get_rec(): Avoid void* arithmetics.

trx0undo.ic, trx0sys.ic: Remove unnecessary #include "page0zip.h"

page_zip_write_header(): Move prototype from page0types.h to page0zip.h
parent f4f5606f
...@@ -9,6 +9,7 @@ Created 2/2/1994 Heikki Tuuri ...@@ -9,6 +9,7 @@ Created 2/2/1994 Heikki Tuuri
#include "mach0data.h" #include "mach0data.h"
#include "rem0cmp.h" #include "rem0cmp.h"
#include "mtr0log.h" #include "mtr0log.h"
#include "page0zip.h"
#ifdef UNIV_MATERIALIZE #ifdef UNIV_MATERIALIZE
#undef UNIV_INLINE #undef UNIV_INLINE
...@@ -518,7 +519,8 @@ page_dir_slot_get_rec( ...@@ -518,7 +519,8 @@ page_dir_slot_get_rec(
/* out: pointer to record */ /* out: pointer to record */
page_dir_slot_t* slot) /* in: directory slot */ page_dir_slot_t* slot) /* in: directory slot */
{ {
return(ut_align_down(slot, UNIV_PAGE_SIZE) + mach_read_from_2(slot)); return((byte*) ut_align_down(slot, UNIV_PAGE_SIZE)
+ mach_read_from_2(slot));
} }
/******************************************************************* /*******************************************************************
......
...@@ -55,19 +55,6 @@ page_zip_write( ...@@ -55,19 +55,6 @@ page_zip_write(
ulint length) /* in: length of the data */ ulint length) /* in: length of the data */
__attribute__((nonnull)); __attribute__((nonnull));
/**************************************************************************
Write data to the uncompressed header portion of a page. The data must
already have been written to the uncompressed page. */
UNIV_INLINE
void
page_zip_write_header(
/*==================*/
page_zip_des_t* page_zip,/* in/out: compressed page */
const byte* str, /* in: address on the uncompressed page */
ulint length, /* in: length of the data */
mtr_t* mtr) /* in: mini-transaction, or NULL */
__attribute__((nonnull(1,2)));
/************************************************************************** /**************************************************************************
Write the "deleted" flag of a record on a compressed page. The flag must Write the "deleted" flag of a record on a compressed page. The flag must
already have been written on the uncompressed page. */ already have been written on the uncompressed page. */
......
...@@ -115,6 +115,19 @@ page_zip_alloc( ...@@ -115,6 +115,19 @@ page_zip_alloc(
mtr_t* mtr) /* in: mini-transaction, or NULL */ mtr_t* mtr) /* in: mini-transaction, or NULL */
__attribute__((warn_unused_result, nonnull(1,2,3))); __attribute__((warn_unused_result, nonnull(1,2,3)));
/**************************************************************************
Write data to the uncompressed header portion of a page. The data must
already have been written to the uncompressed page. */
UNIV_INLINE
void
page_zip_write_header(
/*==================*/
page_zip_des_t* page_zip,/* in/out: compressed page */
const byte* str, /* in: address on the uncompressed page */
ulint length, /* in: length of the data */
mtr_t* mtr) /* in: mini-transaction, or NULL */
__attribute__((nonnull(1,2)));
/************************************************************************** /**************************************************************************
Write an entire record on the compressed page. The data must already Write an entire record on the compressed page. The data must already
have been written to the uncompressed page. */ have been written to the uncompressed page. */
......
...@@ -9,7 +9,6 @@ Created 3/26/1996 Heikki Tuuri ...@@ -9,7 +9,6 @@ Created 3/26/1996 Heikki Tuuri
#include "srv0srv.h" #include "srv0srv.h"
#include "trx0trx.h" #include "trx0trx.h"
#include "data0type.h" #include "data0type.h"
#include "page0zip.h"
/* The typedef for rseg slot in the file copy */ /* The typedef for rseg slot in the file copy */
typedef byte trx_sysf_rseg_t; typedef byte trx_sysf_rseg_t;
......
...@@ -7,7 +7,6 @@ Created 3/26/1996 Heikki Tuuri ...@@ -7,7 +7,6 @@ Created 3/26/1996 Heikki Tuuri
*******************************************************/ *******************************************************/
#include "data0type.h" #include "data0type.h"
#include "page0zip.h"
/*************************************************************************** /***************************************************************************
Builds a roll pointer dulint. */ Builds a roll pointer dulint. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment