diff options
author | hf@deer.mysql.r18.ru <> | 2003-04-23 19:37:33 +0500 |
---|---|---|
committer | hf@deer.mysql.r18.ru <> | 2003-04-23 19:37:33 +0500 |
commit | ca0271471507cfa940337a7db63f415e504de768 (patch) | |
tree | ca16079f1d4f7eae6f2205e124d0c90afbec8409 /sql/protocol.h | |
parent | a3d08eaaf97c013569516294ae97b8118b3db0b0 (diff) | |
download | mariadb-git-ca0271471507cfa940337a7db63f415e504de768.tar.gz |
SCRUM
Protocol_cursor class and sql-common/ directory
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, |