diff options
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r-- | libmysqld/lib_sql.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index e36e878d4b1..81235ce0c22 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -245,6 +245,18 @@ static MYSQL_RES * emb_mysql_store_result(MYSQL *mysql) return mysql_store_result(mysql); } +int emb_next_result(MYSQL *mysql) +{ + THD *thd= (THD*)mysql->thd; + DBUG_ENTER("emb_next_result"); + + if (emb_advanced_command(mysql, COM_QUERY,0,0, + thd->query_rest,thd->query_rest_length,1) + || emb_mysql_read_query_result(mysql)) + DBUG_RETURN(1); + + DBUG_RETURN(0); /* No more results */ +} MYSQL_METHODS embedded_methods= { @@ -259,7 +271,8 @@ MYSQL_METHODS embedded_methods= emb_read_binary_rows, emb_unbuffered_fetch, emb_free_embedded_thd, - emb_read_statistic + emb_read_statistic, + emb_next_result }; C_MODE_END @@ -749,6 +762,11 @@ bool Protocol::net_store_data(const char *from, uint length) return false; } +char *memdup_mysql(struct st_mysql *mysql, const char*data, int length) +{ + return memdup_root(&mysql->field_alloc, data, length); +} + #if 0 /* The same as Protocol::net_store_data but does the converstion */ |