summaryrefslogtreecommitdiff
path: root/client/mysqltest.c
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-07-17 16:52:45 +0200
committerunknown <andrey@lmy004.>2006-07-17 16:52:45 +0200
commite69e640f2eedfe1247f2a5f536d8dc1cf8a48300 (patch)
tree94cf5b188a961ae9067df17d09d62247d263ea81 /client/mysqltest.c
parentd65ab09c4dad097f0c8c5b9bf3856b6fdaf290fa (diff)
downloadmariadb-git-e69e640f2eedfe1247f2a5f536d8dc1cf8a48300.tar.gz
WL#3337 (Events new architecture)
Small updates before patch submit. client/mysqltest.c: allow --valgrind option to mysqltest so one can be able to detect whether the test is running under valgrind by having $VALGRIND_TEST, similar to BIG_TEST, in the test file. mysql-test/mysql-test-run.pl: If the test suite is running under valgrind start mysqltest with --valgrind to inform that we run valgrind. mysqltest will provide $VALGRIND_TEST for the test cases. mysql-test/r/events_bugs.result: update result mysql-test/r/events_scheduling.result: update result mysql-test/t/events.test: Increase times or the test will fail under valgrind mysql-test/t/events_bugs.test: Increase times or the test will fail under valgrind mysql-test/t/events_scheduling.test: Remove faulty test Disable the test case for valgrind sql/event_data_objects.cc: count the number of executions sql/event_data_objects.h: flags is not used at all add execution_count to count the number of executions sql/event_db_repository.cc: Initialize wherever needed. Add a comment regarding valgrind warning. sql/event_queue.cc: more debug info in the trace log sql/event_scheduler.cc: Use macro COND_STATE_WAIT() in all cases we need waiting on condition. Hence, we can trace locking, attemption to lock and more with SHOW SCHEDULER STATUS sql/event_scheduler.h: Change the declaration of cond_wait to accept THD sql/events.cc: fix memory leak. Destroy event_queue mysql-test/include/not_valgrind.inc: New BitKeeper file ``mysql-test/include/not_valgrind.inc'' mysql-test/r/not_valgrind.require: New BitKeeper file ``mysql-test/r/not_valgrind.require''
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r--client/mysqltest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index b21e3883631..ca14be2e135 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -157,6 +157,7 @@ static my_bool ps_protocol= 0, ps_protocol_enabled= 0;
static my_bool sp_protocol= 0, sp_protocol_enabled= 0;
static my_bool view_protocol= 0, view_protocol_enabled= 0;
static my_bool cursor_protocol= 0, cursor_protocol_enabled= 0;
+static my_bool opt_valgrind_test= 0;
static int parsing_disabled= 0;
const char *manager_user="root",*manager_host=0;
char *manager_pass=0;
@@ -3343,6 +3344,8 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"user", 'u', "User for login.", (gptr*) &user, (gptr*) &user, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"valgrind", 'N', "Define VALGRIND_TEST to 1.", (gptr*) &opt_valgrind_test,
+ (gptr*) &opt_valgrind_test, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"verbose", 'v', "Write more.", (gptr*) &verbose, (gptr*) &verbose, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.",
@@ -5108,6 +5111,9 @@ static void init_var_hash(MYSQL *mysql)
die("Variable hash initialization failed");
my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0,
(opt_big_test) ? "1" : "0", 0));
+ my_hash_insert(&var_hash, (byte*) var_init(0,"VALGRIND_TEST", 0,
+ (opt_valgrind_test) ? "1" : "0",
+ 0));
v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0);
my_hash_insert(&var_hash, (byte*) v);
v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);