~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/select_send.h

  • Committer: Monty Taylor
  • Date: 2010-07-19 05:06:59 UTC
  • mto: (1662.1.2 rollup)
  • mto: This revision was merged to the branch mainline in revision 1663.
  • Revision ID: mordred@inaugust.com-20100719050659-if3thz0k66m1jkaf
Backed out two bits that snuck in to the merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
#define DRIZZLED_SELECT_SEND_H
23
23
 
24
24
#include <drizzled/plugin/client.h>
25
 
#include <drizzled/plugin/query_cache.h>
26
25
#include <drizzled/plugin/transactional_storage_engine.h>
27
26
 
28
27
namespace drizzled
49
48
    /* Unlock tables before sending packet to gain some speed */
50
49
    if (session->lock)
51
50
    {
52
 
      session->unlockTables(session->lock);
 
51
      mysql_unlock_tables(session, session->lock);
53
52
      session->lock= 0;
54
53
    }
55
54
    session->my_eof();
60
59
  bool send_fields(List<Item> &list)
61
60
  {
62
61
    bool res;
63
 
    if (! (res= session->getClient()->sendFields(&list)))
 
62
    if (! (res= session->client->sendFields(&list)))
64
63
      is_result_set_started= 1;
65
64
    return res;
66
65
  }
106
105
    Item *item;
107
106
    while ((item=li++))
108
107
    {
109
 
      if (item->send(session->getClient(), &buffer))
 
108
      if (item->send(session->client, &buffer))
110
109
      {
111
110
        my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
112
111
        break;
113
112
      }
114
113
    }
115
 
    /* Insert this record to the Resultset into the cache */
116
 
    if (session->query_cache_key != "" && session->getResultsetMessage() != NULL)
117
 
      plugin::QueryCache::insertRecord(session, items);
118
 
 
119
114
    session->sent_row_count++;
120
115
    if (session->is_error())
121
116
      return true;
122
 
    return session->getClient()->flush();
 
117
    return session->client->flush();
123
118
  }
124
119
};
125
120