summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorhf@deer.(none) <>2003-09-12 19:35:34 +0500
committerhf@deer.(none) <>2003-09-12 19:35:34 +0500
commit9f3996cde9ec2368ef89a1dd38c5e7cda7700ac4 (patch)
tree46609c9322de2696057f154dff31ea468a3f6280 /sql/sql_prepare.cc
parentf434b329f58a0ae60b40d0fe41a8cab68162cbaa (diff)
downloadmariadb-git-9f3996cde9ec2368ef89a1dd38c5e7cda7700ac4.tar.gz
SCRUM:
#977 Prepared statements in embedded library
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc13
1 files changed, 10 insertions, 3 deletions
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