~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_send.h

Merged Eric from lp:~eday/drizzle/eday-merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    return false;
51
51
  }
52
52
 
53
 
  bool send_fields(List<Item> &list, uint32_t flags)
 
53
  bool send_fields(List<Item> &list)
54
54
  {
55
55
    bool res;
56
 
    if (!(res= session->protocol->sendFields(&list, flags)))
 
56
    if (!(res= session->protocol->sendFields(&list)))
57
57
      is_result_set_started= 1;
58
58
    return res;
59
59
  }
93
93
    ha_release_temporary_latches(session);
94
94
 
95
95
    List_iterator_fast<Item> li(items);
96
 
    Protocol *protocol= session->protocol;
97
96
    char buff[MAX_FIELD_WIDTH];
98
97
    String buffer(buff, sizeof(buff), &my_charset_bin);
99
98
 
100
 
    protocol->prepareForResend();
 
99
    session->protocol->prepareForResend();
101
100
    Item *item;
102
101
    while ((item=li++))
103
102
    {
104
 
      if (item->send(protocol, &buffer))
 
103
      if (item->send(session->protocol, &buffer))
105
104
      {
106
 
        protocol->free();                               // Free used buffer
 
105
        session->protocol->free();
107
106
        my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
108
107
        break;
109
108
      }
111
110
    session->sent_row_count++;
112
111
    if (session->is_error())
113
112
      return true;
114
 
    if (protocol->isConnected())
115
 
      return(protocol->write());
 
113
    if (session->protocol->isConnected())
 
114
      return(session->protocol->write());
116
115
    return false;
117
116
  }
118
117
};