Commit f58199f6 authored by Michael Widenius's avatar Michael Widenius

Merge with MariaDB 5.1

parents 178f1846 24c08f52
/* 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, 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 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 it under the terms of the GNU General Public License as published by
...@@ -15,7 +16,6 @@ ...@@ -15,7 +16,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define COPYRIGHT_NOTICE "\ #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\ 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" and you are welcome to modify and redistribute it under the GPL v2 license\n"
...@@ -2220,9 +2220,12 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -2220,9 +2220,12 @@ static bool add_line(String &buffer,char *line,char *in_string,
the line -- which would occur only because of the the line -- which would occur only because of the
user sending newline -- which is itself whitespace user sending newline -- which is itself whitespace
and should also match. 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]) || ((my_isspace(charset_info,pos[2]) || !pos[2]) ||
!pos[2]))))) (buffer.is_empty() && out == line))))))
{ {
// Flush previously accepted characters // Flush previously accepted characters
if (out != line) if (out != line)
......
...@@ -213,7 +213,7 @@ id name ...@@ -213,7 +213,7 @@ id name
alter server s1 options (database 'db_bogus'); alter server s1 options (database 'db_bogus');
flush tables; flush tables;
select * from federated.t1; select * from federated.t1;
ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: : 1044 : Access denied for user 'test_fed'@'localhost' to databa ERROR 42000: Got error: 1044 : Access denied for user 'test_fed'@'localhost' to database 'db_bogus'
drop server if exists 's1'; drop server if exists 's1';
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options create server 's1' foreign data wrapper 'mysql' options
......
...@@ -239,7 +239,7 @@ alter server s1 options (database 'db_bogus'); ...@@ -239,7 +239,7 @@ alter server s1 options (database 'db_bogus');
connection master; connection master;
flush tables; flush tables;
--error ER_QUERY_ON_FOREIGN_DATA_SOURCE --error ER_DBACCESS_DENIED_ERROR
select * from federated.t1; select * from federated.t1;
connection conn_select; connection conn_select;
......
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;
This diff is collapsed.
...@@ -920,7 +920,6 @@ my_real_read(NET *net, size_t *complen) ...@@ -920,7 +920,6 @@ my_real_read(NET *net, size_t *complen)
(int) net->buff[net->where_b + 3], (int) net->buff[net->where_b + 3],
(uint) (uchar) net->pkt_nr); (uint) (uchar) net->pkt_nr);
fflush(stderr); fflush(stderr);
DBUG_ASSERT(0);
#endif #endif
} }
len= packet_error; len= packet_error;
......
...@@ -2995,7 +2995,6 @@ int ha_federatedx::rnd_pos(uchar *buf, uchar *pos) ...@@ -2995,7 +2995,6 @@ int ha_federatedx::rnd_pos(uchar *buf, uchar *pos)
int ha_federatedx::info(uint flag) int ha_federatedx::info(uint flag)
{ {
char error_buffer[FEDERATEDX_QUERY_BUFFER_SIZE];
uint error_code; uint error_code;
federatedx_io *tmp_io= 0, **iop= 0; federatedx_io *tmp_io= 0, **iop= 0;
DBUG_ENTER("ha_federatedx::info"); DBUG_ENTER("ha_federatedx::info");
...@@ -3037,12 +3036,10 @@ int ha_federatedx::info(uint flag) ...@@ -3037,12 +3036,10 @@ int ha_federatedx::info(uint flag)
error: error:
if (iop && *iop) if (iop && *iop)
{ {
my_sprintf(error_buffer, (error_buffer, ": %d : %s", my_printf_error((*iop)->error_code(), "Got error: %d : %s", MYF(0),
(*iop)->error_code(), (*iop)->error_str())); (*iop)->error_code(), (*iop)->error_str());
my_error(error_code, MYF(0), error_buffer);
} }
else else if (remote_error_number != -1 /* error already reported */)
if (remote_error_number != -1 /* error already reported */)
{ {
error_code= remote_error_number; error_code= remote_error_number;
my_error(error_code, MYF(0), ER(error_code)); my_error(error_code, MYF(0), ER(error_code));
......
...@@ -3102,13 +3102,15 @@ static int sort_one_index(HA_CHECK *param, MARIA_HA *info, ...@@ -3102,13 +3102,15 @@ static int sort_one_index(HA_CHECK *param, MARIA_HA *info,
new_page_pos=param->new_file_pos; new_page_pos=param->new_file_pos;
param->new_file_pos+=keyinfo->block_length; param->new_file_pos+=keyinfo->block_length;
key.keyinfo= keyinfo; 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"); _ma_check_print_error(param,"Not enough memory for key block");
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
key.data= buff + keyinfo->block_length;
if (_ma_fetch_keypage(&page, info, keyinfo, pagepos, if (_ma_fetch_keypage(&page, info, keyinfo, pagepos,
PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_LOCK_LEFT_UNLOCKED,
DFLT_INIT_HITS, buff, 0)) DFLT_INIT_HITS, buff, 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment