From 9f3996cde9ec2368ef89a1dd38c5e7cda7700ac4 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Fri, 12 Sep 2003 19:35:34 +0500 Subject: SCRUM: #977 Prepared statements in embedded library --- sql/sql_prepare.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sql/sql_prepare.cc') diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 4abbbcaff1f..088036e4c7e 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -142,6 +142,7 @@ void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used) Send prepared stmt info to client after prepare */ +#ifndef EMBEDDED_LIBRARY static bool send_prep_stmt(PREP_STMT *stmt, uint columns) { NET *net=&stmt->thd->net; @@ -150,14 +151,20 @@ static bool send_prep_stmt(PREP_STMT *stmt, uint columns) int4store(buff+1, stmt->stmt_id); int2store(buff+5, columns); int2store(buff+7, stmt->param_count); -#ifndef EMBEDDED_LIBRARY /* This should be fixed to work with prepared statements */ return (my_net_write(net, buff, sizeof(buff)) || net_flush(net)); +} #else - return true; -#endif +static bool send_prep_stmt(PREP_STMT *stmt, uint columns) +{ + MYSQL_STMT *client_stmt= stmt->thd->client_stmt; + + client_stmt->stmt_id= stmt->stmt_id; + client_stmt->field_count= columns; + client_stmt->param_count= stmt->param_count; } +#endif /*!EMBEDDED_LIBRAYR*/ /* Send information about all item parameters -- cgit v1.2.1