add tests
This commit is contained in:

committed by
Markus Mäkelä

parent
dbfd631fed
commit
8c6ca38a8a
47
maxscale-system-test/mxs813_long_hostname.cpp
Normal file
47
maxscale-system-test/mxs813_long_hostname.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @file mxs813_long_hostname - regression case for crash if long host name is used for binlog router
|
||||
* - configure binlog router setup
|
||||
* - stop slave
|
||||
* - change master to master_host=<very_long_hostname>
|
||||
* - start slave
|
||||
* - show slave status
|
||||
* - show slave status;
|
||||
* - show slave status\G
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include "testconnections.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
|
||||
Test->start_binlog();
|
||||
|
||||
MYSQL * binlog = open_conn_no_db(Test->binlog_port, Test->maxscale_IP, Test->repl->user_name,
|
||||
Test->repl->password, Test->ssl);
|
||||
|
||||
Test->tprintf("stop slave\n");
|
||||
Test->try_query(binlog, "stop slave");
|
||||
Test->tprintf("change master to..\n");
|
||||
Test->try_query(binlog,
|
||||
"change master to master_host='12345678901234567890123456789012345678901234567890123456789012345678900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.com';");
|
||||
Test->tprintf("start slave\n");
|
||||
Test->try_query(binlog, "start slave");
|
||||
Test->tprintf("show slave status\n");
|
||||
Test->try_query(binlog, "show slave status");
|
||||
Test->tprintf("show slave status error: %s\n", mysql_error(binlog));
|
||||
execute_query(binlog, "show slave status;");
|
||||
execute_query(binlog, "show slave status\\G");
|
||||
|
||||
mysql_close(binlog);
|
||||
|
||||
Test->check_maxscale_processes(1);
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
return rval;
|
||||
}
|
Reference in New Issue
Block a user