summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-02-27 21:23:12 -0800
committerIgor Babaev <igor@askmonty.org>2012-02-27 21:23:12 -0800
commit9db23c8280462e303c4ad96be0903dbdcfb5f140 (patch)
tree1d6108a8f0626a4fc22634ebfefc06d3bd2c3b37 /storage
parent90c26209ba52cb7df75cf3464a7dde8bf47531b9 (diff)
parent5da8fa1b03885161e8f840a401208b5e0555f532 (diff)
downloadmariadb-git-9db23c8280462e303c4ad96be0903dbdcfb5f140.tar.gz
Merge.
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/btr/btr0sea.c2
-rw-r--r--storage/innodb_plugin/ha/ha0ha.c6
-rw-r--r--storage/innodb_plugin/include/ha0ha.h10
-rw-r--r--storage/innodb_plugin/include/ha0ha.ic4
-rw-r--r--storage/maria/ma_open.c12
5 files changed, 20 insertions, 14 deletions
diff --git a/storage/innodb_plugin/btr/btr0sea.c b/storage/innodb_plugin/btr/btr0sea.c
index 04c273344f3..f10c207b76a 100644
--- a/storage/innodb_plugin/btr/btr0sea.c
+++ b/storage/innodb_plugin/btr/btr0sea.c
@@ -524,7 +524,7 @@ btr_search_update_hash_ref(
{
dict_index_t* index;
ulint fold;
- const rec_t* rec;
+ rec_t* rec;
ut_ad(cursor->flag == BTR_CUR_HASH_FAIL);
#ifdef UNIV_SYNC_DEBUG
diff --git a/storage/innodb_plugin/ha/ha0ha.c b/storage/innodb_plugin/ha/ha0ha.c
index 65046138275..594a10dc431 100644
--- a/storage/innodb_plugin/ha/ha0ha.c
+++ b/storage/innodb_plugin/ha/ha0ha.c
@@ -106,7 +106,7 @@ ha_insert_for_fold_func(
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
buf_block_t* block, /*!< in: buffer block containing the data */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
- const rec_t* data) /*!< in: data, must not be NULL */
+ rec_t* data) /*!< in: data, must not be NULL */
{
hash_cell_t* cell;
ha_node_t* node;
@@ -238,11 +238,11 @@ ha_search_and_update_if_found_func(
/*===============================*/
hash_table_t* table, /*!< in/out: hash table */
ulint fold, /*!< in: folded value of the searched data */
- const rec_t* data, /*!< in: pointer to the data */
+ rec_t* data, /*!< in: pointer to the data */
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
buf_block_t* new_block,/*!< in: block containing new_data */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
- const rec_t* new_data)/*!< in: new pointer to the data */
+ rec_t* new_data)/*!< in: new pointer to the data */
{
ha_node_t* node;
diff --git a/storage/innodb_plugin/include/ha0ha.h b/storage/innodb_plugin/include/ha0ha.h
index 8bba564d153..83a7394123f 100644
--- a/storage/innodb_plugin/include/ha0ha.h
+++ b/storage/innodb_plugin/include/ha0ha.h
@@ -38,7 +38,7 @@ Looks for an element in a hash table.
@return pointer to the data of the first hash table node in chain
having the fold number, NULL if not found */
UNIV_INLINE
-const rec_t*
+rec_t*
ha_search_and_get_data(
/*===================*/
hash_table_t* table, /*!< in: hash table */
@@ -52,11 +52,11 @@ ha_search_and_update_if_found_func(
/*===============================*/
hash_table_t* table, /*!< in/out: hash table */
ulint fold, /*!< in: folded value of the searched data */
- const rec_t* data, /*!< in: pointer to the data */
+ rec_t* data, /*!< in: pointer to the data */
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
buf_block_t* new_block,/*!< in: block containing new_data */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
- const rec_t* new_data);/*!< in: new pointer to the data */
+ rec_t* new_data);/*!< in: new pointer to the data */
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
/** Looks for an element when we know the pointer to the data and
@@ -131,7 +131,7 @@ ha_insert_for_fold_func(
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
buf_block_t* block, /*!< in: buffer block containing the data */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
- const rec_t* data); /*!< in: data, must not be NULL */
+ rec_t* data); /*!< in: data, must not be NULL */
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
/**
@@ -210,7 +210,7 @@ struct ha_node_struct {
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
buf_block_t* block; /*!< buffer block containing the data, or NULL */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
- const rec_t* data; /*!< pointer to the data */
+ rec_t* data; /*!< pointer to the data */
ulint fold; /*!< fold value for the data */
};
diff --git a/storage/innodb_plugin/include/ha0ha.ic b/storage/innodb_plugin/include/ha0ha.ic
index 5656e9b7eba..aec28398b5d 100644
--- a/storage/innodb_plugin/include/ha0ha.ic
+++ b/storage/innodb_plugin/include/ha0ha.ic
@@ -58,7 +58,7 @@ ha_node_set_data_func(
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
buf_block_t* block, /*!< in: buffer block containing the data */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
- const rec_t* data) /*!< in: pointer to the data */
+ rec_t* data) /*!< in: pointer to the data */
{
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
node->block = block;
@@ -111,7 +111,7 @@ Looks for an element in a hash table.
@return pointer to the data of the first hash table node in chain
having the fold number, NULL if not found */
UNIV_INLINE
-const rec_t*
+rec_t*
ha_search_and_get_data(
/*===================*/
hash_table_t* table, /*!< in: hash table */
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index 0b5ee2feb85..678f74bdda2 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -1714,9 +1714,11 @@ my_bool _ma_columndef_write(File file, MARIA_COLUMNDEF *columndef)
{
uchar buff[MARIA_COLUMNDEF_SIZE];
uchar *ptr=buff;
+ uint low_offset= (uint) (columndef->offset & 0xffff);
+ uint high_offset= (uint) (columndef->offset >> 16);
mi_int2store(ptr,(ulong) columndef->column_nr); ptr+= 2;
- mi_int2store(ptr,(ulong) columndef->offset); ptr+= 2;
+ mi_int2store(ptr, low_offset); ptr+= 2;
mi_int2store(ptr,columndef->type); ptr+= 2;
mi_int2store(ptr,columndef->length); ptr+= 2;
mi_int2store(ptr,columndef->fill_length); ptr+= 2;
@@ -1725,12 +1727,14 @@ my_bool _ma_columndef_write(File file, MARIA_COLUMNDEF *columndef)
(*ptr++)= columndef->null_bit;
(*ptr++)= columndef->empty_bit;
- ptr[0]= ptr[1]= ptr[2]= ptr[3]= 0; ptr+= 4; /* For future */
+ mi_int2store(ptr, high_offset); ptr+= 2;
+ ptr[0]= ptr[1]= 0; ptr+= 2; /* For future */
return my_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
}
uchar *_ma_columndef_read(uchar *ptr, MARIA_COLUMNDEF *columndef)
{
+ uint high_offset;
columndef->column_nr= mi_uint2korr(ptr); ptr+= 2;
columndef->offset= mi_uint2korr(ptr); ptr+= 2;
columndef->type= mi_sint2korr(ptr); ptr+= 2;
@@ -1740,7 +1744,9 @@ uchar *_ma_columndef_read(uchar *ptr, MARIA_COLUMNDEF *columndef)
columndef->empty_pos= mi_uint2korr(ptr); ptr+= 2;
columndef->null_bit= (uint8) *ptr++;
columndef->empty_bit= (uint8) *ptr++;
- ptr+= 4;
+ high_offset= mi_uint2korr(ptr); ptr+= 2;
+ columndef->offset|= ((ulong) high_offset << 16);
+ ptr+= 2;
return ptr;
}