MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ramil Kalimullin Date:August 15 2008 12:26pm
Subject:bzr commit into mysql-6.0-bugteam branch (ramil:2768) Bug#33702
View as plain text  
#At file:///home/ram/mysql/mysql-6.0-bugteam/

 2768 Ramil Kalimullin	2008-08-15
        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.
modified:
  mysql-test/r/federated.result
  mysql-test/t/federated.test
  storage/federated/ha_federated.cc

per-file messages:
  mysql-test/r/federated.result
        Fix for bug #33702: accessing a federated table with a non existing server 
        returns random error code
          - test result.
  mysql-test/t/federated.test
        Fix for bug #33702: accessing a federated table with a non existing server 
        returns random error code
          - test case.
  storage/federated/ha_federated.cc
        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.
=== modified file 'mysql-test/r/federated.result'
--- a/mysql-test/r/federated.result	2008-08-15 12:18:06 +0000
+++ b/mysql-test/r/federated.result	2008-08-15 12:26:32 +0000
@@ -2141,6 +2141,8 @@ de
 abc
 DROP TABLE federated.t1;
 DROP TABLE federated.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 6.0 tests
 DROP TABLE IF EXISTS federated.t1;
 DROP DATABASE IF EXISTS federated;

=== modified file 'mysql-test/t/federated.test'
--- a/mysql-test/t/federated.test	2008-08-15 12:18:06 +0000
+++ b/mysql-test/t/federated.test	2008-08-15 12:26:32 +0000
@@ -1884,6 +1884,14 @@ DROP TABLE federated.t1;
 connection slave;
 DROP TABLE federated.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 6.0 tests
 
 source include/federated_cleanup.inc;

=== modified file 'storage/federated/ha_federated.cc'
--- a/storage/federated/ha_federated.cc	2008-08-15 12:18:06 +0000
+++ b/storage/federated/ha_federated.cc	2008-08-15 12:26:32 +0000
@@ -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
bzr commit into mysql-6.0-bugteam branch (ramil:2768) Bug#33702Ramil Kalimullin15 Aug