// Copyright (c) 2000-2001 David Muse // See the file COPYING for more information #include "../../config.h" #include #include #include #include #include MYSQL mysql; MYSQL_RES *mysqlresult; MYSQL_ROW mysqlrow; int main(int argc, char **argv) { if (argc<10) { printf("usage: mysqltest host port socket db user password query iterations queriesperiteration\n"); exit(0); } char *host=argv[1]; int port=atoi(argv[2]); char *socket=(argv[3][0])?argv[3]:NULL; char *db=argv[4]; char *user=argv[5]; char *password=argv[6]; char *query=argv[7]; int iterations=atoi(argv[8]); int queriesperiteration=atoi(argv[9]); // init the timer time_t starttime=time(NULL); clock(); for (int count=0; count=32200 mysql_init(&mysql); // log in mysql_real_connect(&mysql,host,user,password,db,port,socket,0); #else mysql_real_connect(&mysql,host,user,password,port,socket,0); #endif #else mysql_connect(&mysql,host,user,password); #endif #ifdef HAVE_MYSQL_SELECT_DB mysql_select_db(&mysql,db); #endif for (int qcount=0; qcount