diff options
author | unknown <hf@deer.(none)> | 2003-09-18 12:25:00 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2003-09-18 12:25:00 +0500 |
commit | 4535f6897f5ee132d086e0bd98bbc3a1fdaea54a (patch) | |
tree | faa8a819d28509f6d514615b085cffbca009dd3d /sql | |
parent | d1e3e9f38f8555aa89422781506f4d99796bd738 (diff) | |
download | mariadb-git-4535f6897f5ee132d086e0bd98bbc3a1fdaea54a.tar.gz |
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
Diffstat (limited to 'sql')
-rw-r--r-- | sql/protocol.cc | 4 | ||||
-rw-r--r-- | sql/protocol.h | 1 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 2 |
3 files changed, 4 insertions, 3 deletions
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); |