[Commits] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2885)

Michael Widenius monty at askmonty.org
Fri Jul 16 16:43:47 EEST 2010


#At lp:maria based on revid:monty at askmonty.org-20100716103549-9bfxum4rcr49mcuy

 2885 Michael Widenius	2010-07-16
      Fixed wrong error message from federatedx (which could lead to assert in DBUG code)
      modified:
        mysql-test/suite/federated/federated_server.result
        mysql-test/suite/federated/federated_server.test
        storage/federatedx/ha_federatedx.cc

per-file messages:
  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.
=== modified file 'mysql-test/suite/federated/federated_server.result'
--- a/mysql-test/suite/federated/federated_server.result	2009-11-14 19:33:59 +0000
+++ b/mysql-test/suite/federated/federated_server.result	2010-07-16 13:43:46 +0000
@@ -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

=== modified file 'mysql-test/suite/federated/federated_server.test'
--- a/mysql-test/suite/federated/federated_server.test	2009-11-14 19:33:59 +0000
+++ b/mysql-test/suite/federated/federated_server.test	2010-07-16 13:43:46 +0000
@@ -239,7 +239,7 @@ alter server s1 options (database 'db_bo
 
 connection master;
 flush tables;
---error ER_QUERY_ON_FOREIGN_DATA_SOURCE
+--error ER_DBACCESS_DENIED_ERROR
 select * from federated.t1;
 
 connection conn_select;

=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc	2010-06-09 21:29:18 +0000
+++ b/storage/federatedx/ha_federatedx.cc	2010-07-16 13:43:46 +0000
@@ -2995,7 +2995,6 @@ int ha_federatedx::rnd_pos(uchar *buf, u
 
 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));



More information about the commits mailing list