diff options
author | Michael Widenius <monty@askmonty.org> | 2010-07-16 13:35:49 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-07-16 13:35:49 +0300 |
commit | 9f96097a05f6fb4abd25d09c85e92cdb94b486c9 (patch) | |
tree | f3c57c5fd6cc4a9f9b08bf54958d924533e09f99 /storage/maria/ma_check.c | |
parent | ee45ab069478f532488befac0464c780c2f46f45 (diff) | |
download | mariadb-git-9f96097a05f6fb4abd25d09c85e92cdb94b486c9.tar.gz |
mysql client: Ignore --comments at start of command line. This allows one to more easily run mysqltest tests trough the command line.
Fixed bug: LP#603026 RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table
client/mysql.cc:
Removed Oracle copyright from stdout, as Oracle doesn't have copyright to all code in this file.
Ignore --comments at start of command line. This allows one to more easily run mysqltest tests trough the command line.
mysql-test/suite/maria/r/optimize.result:
Added test for LP#603026
mysql-test/suite/maria/t/optimize.test:
Added test for LP#603026
sql/net_serv.cc:
Removed DBUG_ASSERT(), as this code can happen during testing.
storage/maria/ma_check.c:
Fixed bug: LP#603026 RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table
The problem was duplicated memory usage with long packed keys.
Diffstat (limited to 'storage/maria/ma_check.c')
-rw-r--r-- | storage/maria/ma_check.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c index 4f93bf812a3..69b1566a2bb 100644 --- a/storage/maria/ma_check.c +++ b/storage/maria/ma_check.c @@ -3102,13 +3102,15 @@ static int sort_one_index(HA_CHECK *param, MARIA_HA *info, new_page_pos=param->new_file_pos; param->new_file_pos+=keyinfo->block_length; key.keyinfo= keyinfo; - key.data= info->lastkey_buff; - if (!(buff= (uchar*) my_alloca((uint) keyinfo->block_length))) + if (!(buff= (uchar*) my_alloca((uint) keyinfo->block_length + + keyinfo->maxlength))) { _ma_check_print_error(param,"Not enough memory for key block"); DBUG_RETURN(-1); } + key.data= buff + keyinfo->block_length; + if (_ma_fetch_keypage(&page, info, keyinfo, pagepos, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, buff, 0)) |