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
21
#ifndef DRIZZLED_MULTI_UPDATE_H
22
#define DRIZZLED_MULTI_UPDATE_H
26
class multi_update :public select_result_interceptor
28
TableList *all_tables; /* query/update command tables */
29
TableList *leaves; /* list of leves of join table tree */
30
std::list<TableList*> update_tables;
31
TableList *table_being_updated;
32
Table **tmp_tables, *main_table, *table_to_update;
33
Tmp_Table_Param *tmp_table_param;
34
ha_rows updated, found;
35
List <Item> *fields, *values;
36
List <Item> **fields_for_table, **values_for_table;
39
List of tables referenced in the CHECK OPTION condition of
40
the updated view excluding the updated table.
42
List <Table> unupdated_check_opt_tables;
43
CopyField *copy_field;
44
enum enum_duplicates handle_duplicates;
45
bool do_update, trans_safe;
46
/* True if the update operation has made a change in a transactional table */
47
bool transactional_tables;
50
error handling (rollback and binlogging) can happen in send_eof()
51
so that afterward send_error() needs to find out that.
56
multi_update(TableList *ut, TableList *leaves_list,
57
List<Item> *fields, List<Item> *values,
58
enum_duplicates handle_duplicates, bool ignore);
60
int prepare(List<Item> &list, Select_Lex_Unit *u);
61
bool send_data(List<Item> &items);
62
bool initialize_tables (JOIN *join);
63
void send_error(uint32_t errcode,const char *err);
69
#endif /* DRIZZLED_MULTI_UPDATE_H */