MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:ramil Date:February 29 2008 11:48am
Subject:bk commit into 5.1 tree (ramil:1.2530) BUG#33702
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ramil.  When ramil does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-02-29 15:48:48+04:00, ramil@stripped +3 -0
  Fix for bug #33702: accessing a federated table with a non existing server 
  returns random error code
  
  Problem: accessing a federated table through a non existing server leads to
  wrong error number returned.
  
  Fix: return a proper error.

  mysql-test/r/federated.result@stripped, 2008-02-29 15:48:46+04:00, ramil@stripped +2 -0
    Fix for bug #33702: accessing a federated table with a non existing server 
    returns random error code
      - test result.

  mysql-test/t/federated.test@stripped, 2008-02-29 15:48:46+04:00, ramil@stripped +7 -0
    Fix for bug #33702: accessing a federated table with a non existing server 
    returns random error code
      - test case.

  storage/federated/ha_federated.cc@stripped, 2008-02-29 15:48:46+04:00, ramil@stripped +0 -2
    Fix for bug #33702: accessing a federated table with a non existing server 
    returns random error code
      - return a proper error number if accessing a federated table through a 
        non existing server.

diff -Nrup a/mysql-test/r/federated.result b/mysql-test/r/federated.result
--- a/mysql-test/r/federated.result	2008-02-14 16:47:43 +04:00
+++ b/mysql-test/r/federated.result	2008-02-29 15:48:46 +04:00
@@ -2090,6 +2090,8 @@ a	b
 1	1
 DROP TABLE t1;
 DROP TABLE t1;
+CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='foo';
+ERROR HY000: The foreign server name you are trying to reference does not exist. Data source error:  server name: 'foo' doesn't exist!
 End of 5.1 tests
 DROP TABLE IF EXISTS federated.t1;
 DROP DATABASE IF EXISTS federated;
diff -Nrup a/mysql-test/t/federated.test b/mysql-test/t/federated.test
--- a/mysql-test/t/federated.test	2008-02-14 16:47:43 +04:00
+++ b/mysql-test/t/federated.test	2008-02-29 15:48:46 +04:00
@@ -1816,5 +1816,12 @@ DROP TABLE t1;
 connection slave;
 DROP TABLE t1;
 
+#
+# Bug #33702: accessing a federated table with a non existing server returns 
+# random error code
+#
+--error 1477
+CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='foo';
+
 --echo End of 5.1 tests
 source include/federated_cleanup.inc;
diff -Nrup a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
--- a/storage/federated/ha_federated.cc	2008-02-14 18:23:55 +04:00
+++ b/storage/federated/ha_federated.cc	2008-02-29 15:48:46 +04:00
@@ -573,8 +573,6 @@ int get_connection(MEM_ROOT *mem_root, F
        get_server_by_name(mem_root, share->connection_string, &server_buffer)))
   {
     DBUG_PRINT("info", ("get_server_by_name returned > 0 error condition!"));
-    /* need to come up with error handling */
-    error_num=1;
     goto error;
   }
   DBUG_PRINT("info", ("get_server_by_name returned server at %lx",
Thread
bk commit into 5.1 tree (ramil:1.2530) BUG#33702ramil29 Feb