diff options
author | unknown <guilhem@mysql.com> | 2004-12-09 14:44:10 +0100 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-12-09 14:44:10 +0100 |
commit | 40c2a8870b7dea27917430d995a0acb91465b892 (patch) | |
tree | eaf6f2f2b65c091f3dbda162d6f00154f6680a14 /tests | |
parent | 3a5f7eab1dd3a9e5d8a8f1a7c273e155a6c351f1 (diff) | |
download | mariadb-git-40c2a8870b7dea27917430d995a0acb91465b892.tar.gz |
Changing the default of libmysqlclient : it's now NO reconnection.
All our programs which use mysql_real_connect() and mysql_connect() are updated accordingly, though I have deliberately
made mysqlimport not reconnect anymore (already true for mysqldump >= 4.1.8).
All Connector devs have been warned about the change I'm doing here - which was agreed with Monty,
and fixes BUG#2555.
VC++Files/libmysqltest/mytest.c:
explicit mention of reconnect (no behaviour change)
VC++Files/mysqlmanager/mysqlmanagerview.cpp:
explicit mention of reconnect (no behaviour change)
VC++Files/test1/mysql_thr.c:
explicit mention of reconnect (no behaviour change)
VC++Files/winmysqladmin/main.cpp:
explicit mention of reconnect (no behaviour change)
client/mysql.cc:
explicit mention of reconnect if embedded (no behaviour change)
client/mysqladmin.cc:
explicit mention of reconnect (no behaviour change)
client/mysqlbinlog.cc:
explicit mention of reconnect (no behaviour change)
client/mysqlcheck.c:
explicit mention of reconnect (no behaviour change)
client/mysqlimport.c:
explicit mention of NO reconnect (behaviour change). As most time is passed in LOAD DATA INFILE,
and as it does not make sense to reconnect after a partly failed LOAD... And as mysqlimport sometimes
does LOCK TABLES where we mustn't reconnect...
client/mysqlshow.c:
explicit mention of reconnect (no behaviour change)
client/mysqltest.c:
explicit mention of reconnect (no behaviour change).
Normally we should not reconnect (it's not good to have silent reconnection in the middle of a test),
but 5.0 is too touchy to change it now. I'm marking it TODO.
libmysql/libmysql.c:
explicit mention of reconnect (no behaviour change)
libmysqld/examples/builder-sample/emb_samples.cpp:
explicit mention of reconnect (no behaviour change)
ndb/test/ndbapi/flex_bench_mysql.cpp:
explicit mention of reconnect (no behaviour change)
ndb/tools/restore/consumer_restorem.cpp:
explicit mention of reconnect (no behaviour change)
sql-common/client.c:
Changing the default of libmysqlclient : it's now NO reconnection.
sql/repl_failsafe.cc:
explicit mention of reconnect (no behaviour change)
sql/slave.cc:
explicit mention of reconnect (no behaviour change)
tests/client_test.c:
explicit mention of reconnect (no behaviour change)
tests/connect_test.c:
explicit mention of reconnect (no behaviour change)
tests/deadlock_test.c:
explicit mention of reconnect (no behaviour change)
tests/insert_test.c:
explicit mention of reconnect (no behaviour change)
tests/list_test.c:
explicit mention of reconnect (no behaviour change)
tests/select_test.c:
explicit mention of reconnect (no behaviour change)
tests/showdb_test.c:
explicit mention of reconnect (no behaviour change)
tests/ssl_test.c:
explicit mention of reconnect (no behaviour change)
tests/thread_test.c:
explicit mention of reconnect (no behaviour change)
tools/mysqlmanager.c:
explicit mention of reconnect (no behaviour change)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/client_test.c | 7 | ||||
-rw-r--r-- | tests/connect_test.c | 1 | ||||
-rw-r--r-- | tests/deadlock_test.c | 1 | ||||
-rw-r--r-- | tests/insert_test.c | 1 | ||||
-rw-r--r-- | tests/list_test.c | 1 | ||||
-rw-r--r-- | tests/select_test.c | 1 | ||||
-rw-r--r-- | tests/showdb_test.c | 1 | ||||
-rw-r--r-- | tests/ssl_test.c | 1 | ||||
-rw-r--r-- | tests/thread_test.c | 1 |
9 files changed, 15 insertions, 0 deletions
diff --git a/tests/client_test.c b/tests/client_test.c index aac0a92df65..7392f05d820 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -243,6 +243,7 @@ static void client_connect() fprintf(stdout, "\n Check the connection options using --help or -?\n"); exit(1); } + mysql->reconnect= 1; if (!opt_silent) fprintf(stdout, " OK"); @@ -1050,6 +1051,7 @@ static my_bool thread_query(char *query) error= 1; goto end; } + l_mysql->reconnect= 1; if (mysql_query(l_mysql, (char *)query)) { fprintf(stderr, "Query failed (%s)\n", mysql_error(l_mysql)); @@ -4474,6 +4476,7 @@ static void test_stmt_close() myerror("connection failed"); exit(1); } + lmysql->reconnect= 1; if (!opt_silent) fprintf(stdout, " OK"); @@ -5365,6 +5368,7 @@ DROP TABLE IF EXISTS test_multi_tab"; fprintf(stdout, "\n connection failed(%s)", mysql_error(mysql_local)); exit(1); } + mysql_local->reconnect= 1; rc= mysql_query(mysql_local, query); myquery(rc); @@ -5473,6 +5477,7 @@ static void test_prepare_multi_statements() fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local)); exit(1); } + mysql_local->reconnect= 1; strmov(query, "select 1; select 'another value'"); stmt= mysql_simple_prepare(mysql_local, query); check_stmt_r(stmt); @@ -7004,6 +7009,7 @@ static void test_prepare_grant() mysql_close(lmysql); exit(1); } + lmysql->reconnect= 1; if (!opt_silent) fprintf(stdout, " OK"); @@ -7439,6 +7445,7 @@ static void test_drop_temp() mysql_close(lmysql); exit(1); } + lmysql->reconnect= 1; if (!opt_silent) fprintf(stdout, " OK"); diff --git a/tests/connect_test.c b/tests/connect_test.c index fd81ad635ad..c68ade9f78f 100644 --- a/tests/connect_test.c +++ b/tests/connect_test.c @@ -46,6 +46,7 @@ int main(int argc, char **argv) perror(""); exit(1); } + sock->reconnect= 1; if (mysql_select_db(sock,"test")) { diff --git a/tests/deadlock_test.c b/tests/deadlock_test.c index 65a0df5c215..ab8158e0cd8 100644 --- a/tests/deadlock_test.c +++ b/tests/deadlock_test.c @@ -227,6 +227,7 @@ int main() !mysql_real_connect(&sel, host, user, pass, db, 0,0,0 ) || !mysql_real_connect(&del_ins, host, user, pass, db, 0,0,0 )) die("Error in mysql_real_connect(): %s", mysql_error(&lock)); + lock.reconnect= sel.reconnect= del_ins.reconnect= 1; permute(order, num_queries); printf("count = %d\n", count); diff --git a/tests/insert_test.c b/tests/insert_test.c index 052c12bfdf0..2b659e9eecb 100644 --- a/tests/insert_test.c +++ b/tests/insert_test.c @@ -40,6 +40,7 @@ int main(int argc, char **argv) perror(""); exit(1); } + mysql.reconnect= 1; num = atoi(argv[2]); count = 0; diff --git a/tests/list_test.c b/tests/list_test.c index 06bf16d2751..1d50e703133 100644 --- a/tests/list_test.c +++ b/tests/list_test.c @@ -43,6 +43,7 @@ int main(int argc, char **argv) perror(""); exit(1); } + mysql.reconnect= 1; if (mysql_select_db(sock,argv[1]) < 0) { diff --git a/tests/select_test.c b/tests/select_test.c index ee2a9192865..64c4fec5167 100644 --- a/tests/select_test.c +++ b/tests/select_test.c @@ -44,6 +44,7 @@ int main(int argc, char **argv) perror(""); exit(1); } + mysql.reconnect= 1; count = 0; num = atoi(argv[2]); diff --git a/tests/showdb_test.c b/tests/showdb_test.c index df2b3037c00..08229fc51ee 100644 --- a/tests/showdb_test.c +++ b/tests/showdb_test.c @@ -45,6 +45,7 @@ int main(int argc, char **argv) perror(""); exit(1); } + mysql.reconnect= 1; count = 0; num = atoi(argv[2]); diff --git a/tests/ssl_test.c b/tests/ssl_test.c index b18e493c267..85f490cb02e 100644 --- a/tests/ssl_test.c +++ b/tests/ssl_test.c @@ -51,6 +51,7 @@ int main(int argc, char **argv) perror(""); exit(1); } + mysql.reconnect= 1; count = 0; num = atoi(argv[2]); while (count < num) diff --git a/tests/thread_test.c b/tests/thread_test.c index 06f335fe1a6..f8577857d0a 100644 --- a/tests/thread_test.c +++ b/tests/thread_test.c @@ -55,6 +55,7 @@ unsigned __stdcall test_thread(void *arg __attribute__((unused))) perror(""); goto end; } + mysql.reconnect= 1; if (verbose) { putchar('*'); fflush(stdout); } for (count=0 ; count < number_of_tests ; count++) { |