summaryrefslogtreecommitdiff
path: root/storage/maria/ma_write.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-02-28 13:39:02 +0200
committerMichael Widenius <monty@askmonty.org>2012-02-28 13:39:02 +0200
commitcf06b29f603334b7026bc88ad4bca714668411f8 (patch)
tree68b53a6cabe81a783ed287ef604ce3e28e6708c4 /storage/maria/ma_write.c
parent0919edf32d29b9371288ce1a5f4e03f051bb8093 (diff)
downloadmariadb-git-cf06b29f603334b7026bc88ad4bca714668411f8.tar.gz
Fixed lp:905716 "Assertion `page->size <= share->max_index_block_size'"
The issue was that Aria allowed too long keys to be created (so that the internal buffer was not big enough to hold the whole key). Key lengths is now limited to HA_MAX_KEY_LENGTH (1000), as for MyISAM. Fixed failure in "_ma_apply_redo_index: Assertion `new_page_length == 0", as found by buildbot. mysql-test/suite/maria/r/maria.result: Updated results mysql-test/suite/maria/r/maria3.result: Updated results. Added test for bug fix mysql-test/suite/maria/t/maria3.test: Updated results. Added test for bug fix mysql-test/suite/maria/t/optimize.test: Updated test for new max key length storage/maria/ha_maria.cc: Limit key to HA_MAX_KEY_LENGTH. storage/maria/ma_key_recover.c: Limit used page length to max page size (this is in line with the code that writes the entry to the log). This fixes failure in "_ma_apply_redo_index: Assertion `new_page_length == 0", as found by buildbot. storage/maria/ma_search.c: Extra DBUG storage/maria/ma_write.c: Added test to detect errors earlier.
Diffstat (limited to 'storage/maria/ma_write.c')
-rw-r--r--storage/maria/ma_write.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index 322bc4fcf20..5db2de51625 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -715,6 +715,8 @@ static int w_search(register MARIA_HA *info, uint32 comp_flag, MARIA_KEY *key,
{
error= _ma_insert(info, key, &page, keypos, keybuff,
father_page, father_keypos, insert_last);
+ if (error < 0)
+ goto err;
page_mark_changed(info, &page);
if (_ma_write_keypage(&page, PAGECACHE_LOCK_LEFT_WRITELOCKED,
DFLT_INIT_HITS))