From bfb441a5bfe17222e09c05e94c24a11da57e53e7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Sep 2003 12:25:00 +0500 Subject: SCRUM prepared statements in embedded library include/mysql_com.h: to make net_flush() working in expressions libmysqld/lib_sql.cc: some bugs fixed libmysqld/libmysqld.c: we already have the define in client_settings.h sql/protocol.cc: net_store_data should work that way in Protocol_prep (embedded server) sql/protocol.h: definition for net_store_data sql/sql_prepare.cc: now it works in embedded library --- sql/protocol.cc | 4 +++- sql/protocol.h | 1 + sql/sql_prepare.cc | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sql') diff --git a/sql/protocol.cc b/sql/protocol.cc index edf74aee05e..79420fb71d5 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -28,6 +28,9 @@ #ifndef EMBEDDED_LIBRARY bool Protocol::net_store_data(const char *from, uint length) +#else +bool Protocol_prep::net_store_data(const char *from, uint length) +#endif { ulong packet_length=packet->length(); /* @@ -43,7 +46,6 @@ bool Protocol::net_store_data(const char *from, uint length) packet->length((uint) (to+length-packet->ptr())); return 0; } -#endif /* Send a error string to client */ diff --git a/sql/protocol.h b/sql/protocol.h index 8986757922e..94fd303e259 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -127,6 +127,7 @@ public: virtual void prepare_for_resend(); #ifdef EMBEDDED_LIBRARY virtual bool write(); + bool net_store_data(const char *from, uint length); #endif virtual bool store_null(); virtual bool store_tiny(longlong from); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index d16b499815e..4b8001c11c4 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -666,13 +666,11 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, wild_num, conds, og_num, order, group, having, proc, select_lex, unit, 0)) DBUG_RETURN(1); -#ifndef EMBEDDED_LIBRARY if (send_prep_stmt(stmt, fields.elements) || thd->protocol_simple.send_fields(&fields, 0) || net_flush(&thd->net) || send_item_params(stmt)) DBUG_RETURN(1); -#endif join->cleanup(); } DBUG_RETURN(0); -- cgit v1.2.1