1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
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.
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.
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
20
#ifndef DRIZZLED_JOIN_CACHE_H
21
#define DRIZZLED_JOIN_CACHE_H
23
#include "drizzled/server_includes.h"
26
typedef struct st_join_table JOIN_TAB;
29
CACHE_FIELD and JOIN_CACHE is used on full join to cache records in outer
32
typedef struct st_cache_field {
34
Where source data is located (i.e. this points to somewhere in
38
uint32_t length; /* Length of data at *str, in bytes */
39
uint32_t blob_length; /* Valid IFF blob_field != 0 */
40
Field_blob *blob_field;
41
bool strip; /* true <=> Strip endspaces ?? */
43
Table *get_rowid; /* _ != NULL <=> */
46
typedef struct st_join_cache
49
unsigned char *pos; /* Start of free space in the buffer */
51
uint32_t records; /* # of row cominations currently stored in the cache */
55
Number of fields (i.e. cache_field objects). Those correspond to table
56
columns, and there are also special fields for
57
- table's column null bits
58
- table's null-complementation byte
59
- [new] table's rowid.
65
CACHE_FIELD **blob_ptr;
69
int join_init_cache(Session *session, JOIN_TAB *tables, uint32_t table_count);
70
void reset_cache_read(JOIN_CACHE *cache);
71
void reset_cache_write(JOIN_CACHE *cache);
72
bool store_record_in_cache(JOIN_CACHE *cache);
74
#endif /* DRIZZLED_JOIN_CACHE_H */