~tsarev/percona-playback/alpha

« back to all changes in this revision

Viewing changes to test/mysql_client/connect_by_socket_failed.cc

  • Committer: Oleg Tsarev
  • Date: 2011-03-09 01:14:33 UTC
  • Revision ID: oleg.tsarev@percona.com-20110309011433-022d7x7kl0cgdbj6
simplifying tests for mysql_client

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <iostream>
2
 
#include "run.h"
3
 
 
4
 
class MySQLD_Test_Connect_By_Socket_Failed : public MySQLD_Test
5
 
{
6
 
public:
7
 
  virtual MySQL_Options options() const
8
 
  {
9
 
    MySQL_Options result= get_mysql_client_options(0);
10
 
    result.host= Host();
11
 
    result.port= 0;
12
 
    if (!result.socket.is_null())
13
 
    {
14
 
      result.socket.add_last("_");
15
 
    }
16
 
    std::cerr << "socket=" << result.socket << std::endl;
17
 
    return result;
18
 
  }
19
 
  virtual int connection_error(MySQL_Error const &c)
20
 
  {
21
 
    std::cerr << c.what() << std::endl;
22
 
    std::cout << "blablabla" << std::endl;
23
 
    return 0;
24
 
  }
25
 
};
26
 
 
27
 
int main(int argc, char* argv[])
28
 
{
29
 
  MySQLD_Test_Connect_By_Socket_Failed test;
30
 
  return test.run(argc, argv);
31
 
}