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