Drizzled Public API Documentation

filesort_info.h
1 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3  *
4  * Copyright (C) 2008 Sun Microsystems, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #include <drizzled/sql_sort.h>
21 #pragma once
22 
23 
24 namespace drizzled
25 {
26 
27 /* Information on state of filesort */
29 {
30 public:
31  internal::io_cache_st *io_cache; /* If sorted through filesort */
32  unsigned char **sort_keys; /* Buffer for sorting keys */
33  unsigned char *buffpek; /* Buffer for buffpek structures */
34  uint32_t buffpek_len; /* Max number of buffpeks in the buffer */
35  unsigned char *addon_buf; /* Pointer to a buffer if sorted with fields */
36  size_t addon_length; /* Length of the buffer */
37  sort_addon_field *addon_field; /* Pointer to the fields info */
38  void (*unpack)(sort_addon_field *, unsigned char *); /* To unpack back */
39  unsigned char *record_pointers; /* If sorted in memory */
40  ha_rows found_records; /* How many records in sort */
41 
42  filesort_info() :
43  io_cache(0),
44  sort_keys(0),
45  buffpek(0),
46  buffpek_len(0),
47  addon_buf(0),
48  addon_length(0),
49  addon_field(0),
50  unpack(0),
51  record_pointers(0),
52  found_records()
53  { }
54 
55  filesort_info(const filesort_info& arg) :
56  io_cache(arg.io_cache),
57  sort_keys(arg.sort_keys),
58  buffpek(arg.buffpek),
59  buffpek_len(arg.buffpek_len),
60  addon_buf(arg.addon_buf),
61  addon_length(arg.addon_length),
62  addon_field(arg.addon_field),
63  unpack(arg.unpack),
64  record_pointers(arg.record_pointers),
65  found_records(arg.found_records)
66  {
67  }
68 
69  ~filesort_info()
70  {
71  }
72 
73 };
74 
75 } /* namespace drizzled */
76 
TODO: Rename this file - func.h is stupid.