MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sql_tmp_table.h
Go to the documentation of this file.
1 #ifndef SQL_TMP_TABLE_INCLUDED
2 #define SQL_TMP_TABLE_INCLUDED
3 
4 /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
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 
27 #include "sql_list.h"
28 #include "sql_class.h"
29 #include "my_base.h"
30 #include "field.h"
31 #include "item.h"
32 
33 class SJ_TMP_TABLE;
34 struct TABLE;
35 class THD;
36 class TMP_TABLE_PARAM;
37 typedef struct st_order ORDER;
38 typedef struct st_columndef MI_COLUMNDEF;
39 
40 TABLE *
41 create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
42  ORDER *group, bool distinct, bool save_sum_fields,
43  ulonglong select_options, ha_rows rows_limit,
44  const char *table_alias);
53 TABLE *create_virtual_tmp_table(THD *thd, List<Create_field> &field_list);
54 bool create_myisam_from_heap(THD *thd, TABLE *table,
55  MI_COLUMNDEF *start_recinfo,
56  MI_COLUMNDEF **recinfo,
57  int error, bool ignore_last_dup,
58  bool *is_duplicate);
59 void free_tmp_table(THD *thd, TABLE *entry);
60 TABLE *create_duplicate_weedout_tmp_table(THD *thd,
61  uint uniq_tuple_length_arg,
62  SJ_TMP_TABLE *sjtbl);
63 bool instantiate_tmp_table(TABLE *table, KEY *keyinfo,
64  MI_COLUMNDEF *start_recinfo,
65  MI_COLUMNDEF **recinfo,
66  ulonglong options, my_bool big_tables,
67  Opt_trace_context *trace);
68 Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
69  Item ***copy_func, Field **from_field,
70  Field **default_field,
71  bool group, bool modify_item,
72  bool table_cant_handle_bit_fields,
73  bool make_copy_field);
74 Field* create_tmp_field_from_field(THD *thd, Field* org_field,
75  const char *name, TABLE *table,
76  Item_field *item);
77 
78 
79 #endif /* SQL_TMP_TABLE_INCLUDED */
80