summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/Makefile.am2
-rw-r--r--libmysqld/emb_qcache.h2
-rw-r--r--libmysqld/embedded_priv.h2
-rwxr-xr-xlibmysqld/examples/test-run2
-rw-r--r--libmysqld/lib_sql.cc11
5 files changed, 15 insertions, 4 deletions
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index acf0d5a5bc8..330e72e5507 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2001-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
diff --git a/libmysqld/emb_qcache.h b/libmysqld/emb_qcache.h
index ca7bbec15cd..5c5209902a1 100644
--- a/libmysqld/emb_qcache.h
+++ b/libmysqld/emb_qcache.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/libmysqld/embedded_priv.h b/libmysqld/embedded_priv.h
index bbcf8886cc1..369b344d4bd 100644
--- a/libmysqld/embedded_priv.h
+++ b/libmysqld/embedded_priv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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 97bcb9d87ca..2eea24e364c 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -198,6 +198,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
stmt->stmt_id= thd->client_stmt_id;
stmt->param_count= thd->client_param_count;
stmt->field_count= 0;
+ mysql->warning_count= thd->total_warn_count;
if (thd->first_data)
{
@@ -306,7 +307,11 @@ int emb_read_binary_rows(MYSQL_STMT *stmt)
{
MYSQL_DATA *data;
if (!(data= emb_read_rows(stmt->mysql, 0, 0)))
+ {
+ set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
+ stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate);
return 1;
+ }
stmt->result= *data;
my_free((char *) data, MYF(0));
set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
@@ -585,6 +590,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;
@@ -770,6 +776,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
@@ -1029,6 +1037,9 @@ void Protocol_simple::prepare_for_resend()
MYSQL_DATA *data= thd->cur_data;
DBUG_ENTER("send_data");
+ if (!thd->mysql) // bootstrap file handling
+ DBUG_VOID_RETURN;
+
data->rows++;
if (!(cur= (MYSQL_ROWS *)alloc_root(alloc, sizeof(MYSQL_ROWS)+(field_count + 1) * sizeof(char *))))
{