diff options
author | hf@deer.(none) <> | 2003-10-04 19:28:50 +0500 |
---|---|---|
committer | hf@deer.(none) <> | 2003-10-04 19:28:50 +0500 |
commit | 4ef1e3635d0f59cb16edc114c3cd30f33674ccb2 (patch) | |
tree | 1d881072366aa95cf771fd1ab6051e999cf66ae0 /libmysqld | |
parent | e2ad218dd1b3a9bd5aaa571e532a4c9a89468aac (diff) | |
parent | 8bc13b187450abb838cdc74217da7b7f73f1aa98 (diff) | |
download | mariadb-git-4ef1e3635d0f59cb16edc114c3cd30f33674ccb2.tar.gz |
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.stmt
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index ddfd05d64b6..e70f34397d6 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -217,9 +217,16 @@ static void STDCALL emb_free_embedded_thd(MYSQL *mysql) THD *thd= (THD*)mysql->thd; if (thd->data) free_rows(thd->data); + thread_count--; delete thd; } +static const char * STDCALL emb_read_statistic(MYSQL *mysql) +{ + THD *thd= (THD*)mysql->thd; + return thd->net.last_error; +} + MYSQL_METHODS embedded_methods= { emb_mysql_read_query_result, @@ -232,7 +239,8 @@ MYSQL_METHODS embedded_methods= emb_stmt_execute, emb_read_binary_rows, emb_unbuffered_fetch, - emb_free_embedded_thd + emb_free_embedded_thd, + emb_read_statistic }; C_MODE_END @@ -431,6 +439,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag, char *db) { THD *thd = (THD *)mysql->thd; thd->mysql= mysql; + mysql->server_version= server_version; } void *create_embedded_thd(int client_flag, char *db) @@ -465,6 +474,7 @@ void *create_embedded_thd(int client_flag, char *db) thd->data= 0; + thread_count++; return thd; } |