Пример #1
0
int main(int argc, char **argv)
{
//  if (argc > 1)
//    get_options(&argc, &argv);

  get_envvars();

  run_tests(my_tests);

  return(exit_status());
}
Пример #2
0
int main(int argc, char **argv)
{
  if (argc > 1)
    get_options(argc, argv);

  get_envvars();

  diag("user: %s", username);

  run_tests(my_tests);

  return(exit_status());
}
Пример #3
0
int main(int argc, char **argv)
{

  mysql_library_init(0,0,NULL);

  if (argc > 1)
    get_options(argc, argv);

  get_envvars();

  run_tests(my_tests);

  mysql_server_end();
  return(exit_status());
}
Пример #4
0
int main(int argc, char *argv[])
{
  	if (argc > 1)
    	get_options(argc, argv);
  	get_envvars();
	unsigned long lasttick;
	
	lasttick = GetTickCount();
  	run_tests(my_tests);
	char cmd[128];
	snprintf(cmd,128,
			"Run for time %dms\n",
			(GetTickCount() - lasttick)
			);
	printf("%s",cmd);	
  	return(exit_status());

	return 0;
}
int main(int argc, char *argv[]) {

	MYSQL *mysql;
	int i;

  if (argc > 1)
    get_options(argc, argv);

  get_envvars();

	for (i = 0; i < MAX_COUNT; ++i) {

		if (mysql_library_init(-1, NULL, NULL) != 0) {
			diag("mysql_library_init failed");
			return 1;
		}

		mysql = mysql_init(NULL);
		if (!mysql) {
			diag("mysql_init failed");
			return 1;
		}

		if (!mysql_real_connect(mysql, hostname, username, password, NULL, port, NULL, 0)) {
			diag("mysql_real_connect failed: %s", mysql_error(mysql));
			return 1;
		}

		if (mysql_query(mysql, "SELECT NULL LIMIT 0") != 0) {
			diag("mysql_query failed: %s", mysql_error(mysql));
			return 1;
		}

		mysql_close(mysql);
		mysql_library_end();

	}

	return 0;

}