You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fixed test build
This commit is contained in:
@@ -122,9 +122,6 @@ static char *password = 0;
|
|||||||
static unsigned int port = 0;
|
static unsigned int port = 0;
|
||||||
static char *socketname = 0;
|
static char *socketname = 0;
|
||||||
static char *username = 0;
|
static char *username = 0;
|
||||||
#ifdef _WIN32
|
|
||||||
static int protocol= 0;
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
static struct my_option test_options[] =
|
static struct my_option test_options[] =
|
||||||
{
|
{
|
||||||
@@ -315,8 +312,8 @@ static void usage()
|
|||||||
printf("-d database\n");
|
printf("-d database\n");
|
||||||
printf("-S socketname\n");
|
printf("-S socketname\n");
|
||||||
printf("-P port number\n");
|
printf("-P port number\n");
|
||||||
printf("-w protocol mode (windows only: 1= named pipe, 2= shared memory)");
|
|
||||||
printf("? displays this help and exits\n");
|
printf("? displays this help and exits\n");
|
||||||
|
}
|
||||||
|
|
||||||
void get_options(int argc, char **argv)
|
void get_options(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -328,11 +325,6 @@ void get_options(int argc, char **argv)
|
|||||||
case 'h':
|
case 'h':
|
||||||
hostname= optarg;
|
hostname= optarg;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
|
||||||
#ifdef _WIN32
|
|
||||||
protocol= atoi(optarg);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case 'u':
|
case 'u':
|
||||||
username= optarg;
|
username= optarg;
|
||||||
break;
|
break;
|
||||||
@@ -387,7 +379,8 @@ int check_variable(MYSQL *mysql, char *variable, char *value)
|
|||||||
* returns a new connection. This function will be called, if the test doesn't
|
* returns a new connection. This function will be called, if the test doesn't
|
||||||
* use default_connection.
|
* use default_connection.
|
||||||
*/
|
*/
|
||||||
MYSQL *test_connect(struct my_tests_st *test) {
|
MYSQL *test_connect(struct my_tests_st *test)
|
||||||
|
{
|
||||||
MYSQL *mysql;
|
MYSQL *mysql;
|
||||||
int i= 0;
|
int i= 0;
|
||||||
int timeout= 10;
|
int timeout= 10;
|
||||||
@@ -396,12 +389,6 @@ MYSQL *test_connect(struct my_tests_st *test) {
|
|||||||
diag("%s", "mysql_init failed - exiting");
|
diag("%s", "mysql_init failed - exiting");
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
|
||||||
switch (protocol) {
|
|
||||||
case 1: /* named pipe */
|
|
||||||
case 2: /* shared memory */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &truncation_report);
|
mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &truncation_report);
|
||||||
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, &timeout);
|
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, &timeout);
|
||||||
|
|
||||||
@@ -427,7 +414,6 @@ MYSQL *test_connect(struct my_tests_st *test) {
|
|||||||
mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
printf("Connection: %s\n", mysql->host_info);
|
|
||||||
return(mysql);
|
return(mysql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user