Commit 24c08f52 authored by Michael Widenius's avatar Michael Widenius

Fixed wrong error message from federatedx (which could lead to assert in DBUG code)

mysql-test/suite/federated/federated_server.result:
  Update to new error message
mysql-test/suite/federated/federated_server.test:
  Update to new error message
storage/federatedx/ha_federatedx.cc:
  Return real error code, not 0, as in some cases before.
parent 9f96097a
......@@ -213,7 +213,7 @@ id name
alter server s1 options (database 'db_bogus');
flush tables;
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';
ERROR 42000: Access denied; you need the SUPER privilege for this operation
create server 's1' foreign data wrapper 'mysql' options
......
......@@ -239,7 +239,7 @@ alter server s1 options (database 'db_bogus');
connection master;
flush tables;
--error ER_QUERY_ON_FOREIGN_DATA_SOURCE
--error ER_DBACCESS_DENIED_ERROR
select * from federated.t1;
connection conn_select;
......
......@@ -2995,7 +2995,6 @@ int ha_federatedx::rnd_pos(uchar *buf, uchar *pos)
int ha_federatedx::info(uint flag)
{
char error_buffer[FEDERATEDX_QUERY_BUFFER_SIZE];
uint error_code;
federatedx_io *tmp_io= 0, **iop= 0;
DBUG_ENTER("ha_federatedx::info");
......@@ -3037,12 +3036,10 @@ int ha_federatedx::info(uint flag)
error:
if (iop && *iop)
{
my_sprintf(error_buffer, (error_buffer, ": %d : %s",
(*iop)->error_code(), (*iop)->error_str()));
my_error(error_code, MYF(0), error_buffer);
my_printf_error((*iop)->error_code(), "Got error: %d : %s", MYF(0),
(*iop)->error_code(), (*iop)->error_str());
}
else
if (remote_error_number != -1 /* error already reported */)
else if (remote_error_number != -1 /* error already reported */)
{
error_code= remote_error_number;
my_error(error_code, MYF(0), ER(error_code));
......
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