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.
This commit is contained in:
parent
ee45ab0694
commit
9f96097a05
@ -1,5 +1,6 @@
|
||||
/* Copyright (C) 2000-2009 MySQL AB & Monty Program Ab
|
||||
/* Copyright (C) 2000-2009 MySQL AB
|
||||
Copyright 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright 2000-2010 Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -15,7 +16,6 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define COPYRIGHT_NOTICE "\
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL v2 license\n"
|
||||
|
||||
@ -2212,9 +2212,12 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
||||
the line -- which would occur only because of the
|
||||
user sending newline -- which is itself whitespace
|
||||
and should also match.
|
||||
We also ignore lines starting with '--', even if there
|
||||
isn't a whitespace after. (This makes it easier to run
|
||||
mysql-test-run cases through the client)
|
||||
*/
|
||||
(my_isspace(charset_info,pos[2]) ||
|
||||
!pos[2])))))
|
||||
((my_isspace(charset_info,pos[2]) || !pos[2]) ||
|
||||
(buffer.is_empty() && out == line))))))
|
||||
{
|
||||
// Flush previously accepted characters
|
||||
if (out != line)
|
||||
|
8
mysql-test/suite/maria/r/optimize.result
Normal file
8
mysql-test/suite/maria/r/optimize.result
Normal file
@ -0,0 +1,8 @@
|
||||
drop table if exists t1;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
drop table t1;
|
162
mysql-test/suite/maria/t/optimize.test
Normal file
162
mysql-test/suite/maria/t/optimize.test
Normal file
File diff suppressed because one or more lines are too long
@ -920,7 +920,6 @@ my_real_read(NET *net, size_t *complen)
|
||||
(int) net->buff[net->where_b + 3],
|
||||
(uint) (uchar) net->pkt_nr);
|
||||
fflush(stderr);
|
||||
DBUG_ASSERT(0);
|
||||
#endif
|
||||
}
|
||||
len= packet_error;
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user