~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_send.h

  • Committer: Brian Aker
  • Date: 2009-09-22 07:35:28 UTC
  • mfrom: (971.6.10 eday-dev)
  • Revision ID: brian@gaz-20090922073528-xgm634aomuflqxl3
MergeĀ Eric

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_SELECT_SEND_H
22
22
#define DRIZZLED_SELECT_SEND_H
23
23
 
 
24
#include <drizzled/plugin/client.h>
 
25
 
24
26
class select_send :public select_result {
25
27
  /**
26
28
    True if we have sent result set metadata to the client.
53
55
  bool send_fields(List<Item> &list)
54
56
  {
55
57
    bool res;
56
 
    if (! (res= session->protocol->sendFields(&list)))
 
58
    if (! (res= session->client->sendFields(&list)))
57
59
      is_result_set_started= 1;
58
60
    return res;
59
61
  }
96
98
    char buff[MAX_FIELD_WIDTH];
97
99
    String buffer(buff, sizeof(buff), &my_charset_bin);
98
100
 
99
 
    session->protocol->prepareForResend();
100
101
    Item *item;
101
102
    while ((item=li++))
102
103
    {
103
 
      if (item->send(session->protocol, &buffer))
 
104
      if (item->send(session->client, &buffer))
104
105
      {
105
 
        session->protocol->free();
106
106
        my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
107
107
        break;
108
108
      }
110
110
    session->sent_row_count++;
111
111
    if (session->is_error())
112
112
      return true;
113
 
    if (session->protocol->isConnected())
114
 
      return(session->protocol->write());
115
 
    return false;
 
113
    return session->client->flush();
116
114
  }
117
115
};
118
116