diff options
author | unknown <hf@deer.mysql.r18.ru> | 2003-04-23 19:37:33 +0500 |
---|---|---|
committer | unknown <hf@deer.mysql.r18.ru> | 2003-04-23 19:37:33 +0500 |
commit | f0909cd71a7a1d0904845af4e5e06d213f911de1 (patch) | |
tree | ca16079f1d4f7eae6f2205e124d0c90afbec8409 /sql/protocol.h | |
parent | 7c87a3f140ac801c0922b3a24e59381f627f105a (diff) | |
download | mariadb-git-f0909cd71a7a1d0904845af4e5e06d213f911de1.tar.gz |
SCRUM
Protocol_cursor class and sql-common/ directory
Makefile.am:
pack.c added to linked sources
include/mysql.h:
net_field_length_ll declaration added
include/mysql_com.h:
net_field_length declaration added
libmysql/Makefile.am:
sql-common files symlinked
libmysql/Makefile.shared:
pack.lo target added
libmysql/libmysql.c:
net_field_length removed from here
sql/Makefile.am:
pack.c added to the sources
sql/mini_client.cc:
mc_net_field_length functions replaced with net_field_length
sql/protocol.h:
Protocol_cursor class added
Diffstat (limited to 'sql/protocol.h')
-rw-r--r-- | sql/protocol.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sql/protocol.h b/sql/protocol.h index 89b838ff6e4..dd644afd335 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -22,9 +22,9 @@ class i_string; class THD; -#ifdef EMBEDDED_LIBRARY typedef struct st_mysql_field MYSQL_FIELD; -#endif +typedef struct st_mysql_rows MYSQL_ROWS; + class Protocol { protected: @@ -135,6 +135,28 @@ public: virtual bool store(Field *field); }; +class Protocol_cursor :public Protocol_simple +{ +public: + MEM_ROOT *alloc; + MYSQL_FIELD *fields; + MYSQL_ROWS *data; + MYSQL_ROWS **prev_record; + ulong row_count; + + Protocol_cursor() {} + Protocol_cursor(THD *thd, MEM_ROOT *ini_alloc) :Protocol_simple(thd), alloc(ini_alloc) {} + bool prepare_for_send(List<Item> *item_list) + { + fields= NULL; + data= NULL; + prev_record= &data; + return Protocol_simple::prepare_for_send(item_list); + } + bool send_fields(List<Item> *list, uint flag); + bool write(); +}; + void send_warning(THD *thd, uint sql_errno, const char *err=0); void net_printf(THD *thd,uint sql_errno, ...); void send_ok(THD *thd, ha_rows affected_rows=0L, ulonglong id=0L, |