From 5d9be4de24ab02436edbe2c75e96704a31c522b2 Mon Sep 17 00:00:00 2001 From: "monty@hundin.mysql.fi" <> Date: Sat, 22 Sep 2001 17:40:59 +0300 Subject: [PATCH] Portability fix --- client/mysqltest.c | 22 +++++++++------------- sql/gen_lex_hash.cc | 5 +++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 1361dc843ed..9a2d3e4c137 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -46,19 +46,15 @@ #define MTEST_VERSION "1.10" #include +#include #include #include #include #include +#include #include -#ifdef OS2 -#include -#else - #include -#endif #include #include -#include #include #include #include @@ -1067,18 +1063,18 @@ int close_connection(struct st_query* q) p++; *p = 0; - for(con = cons; con < next_con; con++) + for (con = cons; con < next_con; con++) { if (!strcmp(con->name, name)) { - if(q->type == Q_DIRTY_CLOSE) + if (q->type == Q_DIRTY_CLOSE) + { + if (con->mysql.net.vio) { - if(con->mysql.net.vio) - { - vio_delete(con->mysql.net.vio); - con->mysql.net.vio = 0; - } + vio_delete(con->mysql.net.vio); + con->mysql.net.vio = 0; } + } mysql_close(&con->mysql); DBUG_RETURN(0); diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index cfd859acf06..6530e5dd4cf 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -26,7 +26,8 @@ #include "mysql_version.h" #include "lex.h" -bool opt_search=0,opt_verbose=0; +bool opt_search=0; +int opt_verbose=0; ulong opt_count=100000; #define max_allowed_array 8000 // Don't generate bigger arrays than this @@ -473,7 +474,7 @@ int main(int argc,char **argv) MY_INIT(argv[0]); - start_value=4198729L; best_t1=6245075L; best_t2=3686256L; best_type=4; /* mode=5839 add=1 type: 0 */ + start_value=1060872L; best_t1=7930739L; best_t2=4311642L; best_type=3; /* mode=5333 add=6 type: 0 */ if (get_options(argc,(char **) argv)) exit(1);