From 28f6e132996b90d1ce6407aee9f82952c35eb18e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Nov 2006 10:39:15 +0400 Subject: embedded-mode tests fixed libmysqld/examples/test-run: mysql_embedded should be run here libmysqld/lib_sql.cc: thd->real_id setup added bootstrap check added mysql-test/t/innodb.test: paths can be different in embedded server - replace_result added sql/item_func.cc: we should compare real_id-s in embedded server --- libmysqld/examples/test-run | 2 +- libmysqld/lib_sql.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'libmysqld') diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run index c7434488259..aea5b13eaba 100755 --- a/libmysqld/examples/test-run +++ b/libmysqld/examples/test-run @@ -10,7 +10,7 @@ top_builddir=../.. mysql_test_dir=$top_builddir/mysql-test examples=$top_builddir/libmysqld/examples -mysqltest=$examples/mysqltest +mysqltest=$examples/mysqltest_embedded datadir=$mysql_test_dir/var/master-data test_data_dir=test gdb=0 diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 64bc37fb40d..b8d890991df 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -517,6 +517,7 @@ void *create_embedded_thd(int client_flag) thd->set_time(); thd->init_for_queries(); thd->client_capabilities= client_flag; + thd->real_id= (pthread_t) thd; thd->db= NULL; thd->db_length= 0; @@ -815,6 +816,9 @@ void Protocol_simple::prepare_for_resend() DBUG_ENTER("send_data"); + if (!thd->mysql) // bootstrap file handling + DBUG_VOID_RETURN; + if (!data) { if (!(data= (MYSQL_DATA*) my_malloc(sizeof(MYSQL_DATA), -- cgit v1.2.1 From ea1f7e4b5697c3275c301011beaa394548f273ae Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Nov 2006 20:06:45 +0400 Subject: several fixes to make tests pass in embedded-server mode libmysqld/lib_sql.cc: check for bootstrap added mysql-test/include/federated.inc: disabled in embedded mysql-test/mysql-test-run.pl: we disable ssh in embedded server mysql-test/r/bdb.result: part moved to bdb_notembedded as it uses binlog mysql-test/r/flush_block_commit.result: part moved to flush_block_commit_notembedded mysql-test/r/insert.result: part moved to insert_notembedded as delayed works differently in embedded server mysql-test/r/insert_select.result: part moved to insert_notembedded as GRANTS usually disabled in embedded server mysql-test/r/join.result: access rights hidden in result mysql-test/t/backup.test: now available in embedded server mysql-test/t/bdb.test: part moved to bdb_notembedded as it uses binlog mysql-test/t/delayed.test: code trimmed mysql-test/t/execution_constants.test: skipped in embedded-server mode mysql-test/t/flush_block_commit.test: moved to flush_block_commit_notembedded mysql-test/t/information_schema_db.test: skipped in embedded-server mysql-test/t/innodb.test: directories replaced to be embedded-server compliant mysql-test/t/insert.test: part moved to insert_notembedded mysql-test/t/insert_select.test: part moved to insert_notembedded mysql-test/t/join.test: access rights hidden mysql-test/t/status.test: skipped in embedded server mysql-test/t/trigger.test: directories replaced to be embedded-server compliant sql/item_strfunc.cc: extra contexts not needed whan access checks disabled sql/share/errmsg.txt: bigger paths reserved to prevent test's fails mysql-test/r/bdb_notembedded.result: ***MISSING WEAVE*** mysql-test/r/flush_block_commit_notembedded.result: added mysql-test/r/insert_notembedded.result: added mysql-test/t/bdb_notembedded.test: ***MISSING WEAVE*** mysql-test/t/flush_block_commit_notembedded.test: added mysql-test/t/insert_notembedded.test: added --- libmysqld/lib_sql.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmysqld') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index cfa90c2abce..0df7014ba16 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -770,6 +770,8 @@ MYSQL_DATA *THD::alloc_new_dataset() static void write_eof_packet(THD *thd) { + if (!thd->mysql) // bootstrap file handling + return; /* The following test should never be true, but it's better to do it because if 'is_fatal_error' is set the server is not going to execute -- cgit v1.2.1