summaryrefslogtreecommitdiff
path: root/storage/maria/ma_open.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-07-24 01:25:28 -0700
committerMichael Widenius <monty@askmonty.org>2011-07-24 01:25:28 -0700
commit10065404eae16de02aa843a52d1d1f48dd23e9ac (patch)
treef4fb6c0dfe883042482babbcb98df5f0a4d25788 /storage/maria/ma_open.c
parent3c97c9c9cc3dde2249846c35020d2eaf2af1bcd0 (diff)
downloadmariadb-git-10065404eae16de02aa843a52d1d1f48dd23e9ac.tar.gz
Fixes lp:805930 Sysbench breaks on multiple table test with MariaDB 5.2.7 + Aria
The bug happens when one uses MAX_ROWS=# with Aria & row_format=page and one insert more than # rows. mysql-test/mysql-test-run.pl: Ignore table is full error messages mysql-test/suite/maria/r/max_length.result: Test case for 'Table is full' mysql-test/suite/maria/t/max_length.test: Test case for 'Table is full' storage/maria/ma_bitmap.c: Ensure that we don't allocate bits outside of max_data_file_size. Adjust max_data_file_size based on bitmap alignments. Backport fix to adjust wrong first_bitmap_with_space. storage/maria/ma_blockrec.c: Calculate value of max_data_file_length storage/maria/ma_blockrec.h: Updated prototype for _ma_bitmap_init() storage/maria/ma_check.c: Give warnings if file sizes are above max file sizes. Give more warnings in case of errors. Have maria_chk write if table is recreated. storage/maria/ma_create.c: Better calculation of max_data_file_length and thus data pointer length. Fixes some wrong pointer lengths when using MAX_ROWS=# storage/maria/ma_open.c: Removed duplicate assigment. Use block size from file instead of global variable. storage/maria/maria_chk.c: Remove -1 from printed file length storage/maria/maria_def.h: Update struct st_maria_file_bitmap
Diffstat (limited to 'storage/maria/ma_open.c')
-rw-r--r--storage/maria/ma_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index 7821b474988..e1f561b420a 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -502,7 +502,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
(ulonglong) 1 << (share->base.rec_reflength*8))-1);
max_key_file_length=
- _ma_safe_mul(maria_block_size,
+ _ma_safe_mul(share->base.block_size,
((ulonglong) 1 << (share->base.key_reflength*8))-1);
#if SIZEOF_OFF_T == 4
set_if_smaller(max_data_file_length, INT_MAX32);
@@ -815,7 +815,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
share->base.margin_key_file_length=(share->base.max_key_file_length -
(keys ? MARIA_INDEX_BLOCK_MARGIN *
share->block_size * keys : 0));
- share->block_size= share->base.block_size;
+
my_free(disk_cache, MYF(0));
_ma_setup_functions(share);
if ((*share->once_init)(share, info.dfile.file))