2148.7.6
by Brian Aker
Move out subclasses from session. |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
4 |
* Copyright (C) 2011 Brian Aker
|
|
5 |
* Copyright (C) 2008 Sun Microsystems, Inc.
|
|
6 |
*
|
|
7 |
* This program is free software; you can redistribute it and/or modify
|
|
8 |
* it under the terms of the GNU General Public License as published by
|
|
9 |
* the Free Software Foundation; version 2 of the License.
|
|
10 |
*
|
|
11 |
* This program is distributed in the hope that it will be useful,
|
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
* GNU General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License
|
|
17 |
* along with this program; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 |
*/
|
|
20 |
||
2234
by Brian Aker
Mass removal of ifdef/endif in favor of pragma once. |
21 |
#pragma once
|
2148.7.6
by Brian Aker
Move out subclasses from session. |
22 |
|
2187.2.1
by Brian Aker
Additional fixes in headers. |
23 |
#include <drizzled/base.h> |
24 |
#include <drizzled/sql_list.h> |
|
25 |
||
2252.1.12
by Olaf van der Spek
Common fwd |
26 |
namespace drizzled { |
2187.2.1
by Brian Aker
Additional fixes in headers. |
27 |
|
2148.7.6
by Brian Aker
Move out subclasses from session. |
28 |
/**
|
29 |
The COPY_INFO structure is used by INSERT/REPLACE code.
|
|
30 |
The schema of the row counting by the INSERT/INSERT ... ON DUPLICATE KEY
|
|
31 |
UPDATE code:
|
|
32 |
If a row is inserted then the copied variable is incremented.
|
|
33 |
If a row is updated by the INSERT ... ON DUPLICATE KEY UPDATE and the
|
|
34 |
new data differs from the old one then the copied and the updated
|
|
35 |
variables are incremented.
|
|
36 |
The touched variable is incremented if a row was touched by the update part
|
|
37 |
of the INSERT ... ON DUPLICATE KEY UPDATE no matter whether the row
|
|
38 |
was actually changed or not.
|
|
39 |
*/
|
|
40 |
class CopyInfo |
|
41 |
{
|
|
42 |
public: |
|
43 |
ha_rows records; /**< Number of processed records */ |
|
44 |
ha_rows deleted; /**< Number of deleted records */ |
|
45 |
ha_rows updated; /**< Number of updated records */ |
|
46 |
ha_rows copied; /**< Number of copied records */ |
|
47 |
ha_rows error_count; |
|
48 |
ha_rows touched; /* Number of touched records */ |
|
49 |
enum enum_duplicates handle_duplicates; |
|
50 |
int escape_char, last_errno; |
|
51 |
bool ignore; |
|
52 |
/* for INSERT ... UPDATE */
|
|
53 |
List<Item> *update_fields; |
|
54 |
List<Item> *update_values; |
|
55 |
/* for VIEW ... WITH CHECK OPTION */
|
|
56 |
||
57 |
CopyInfo() : |
|
58 |
records(0), |
|
59 |
deleted(0), |
|
60 |
updated(0), |
|
61 |
copied(0), |
|
62 |
error_count(0), |
|
63 |
touched(0), |
|
64 |
escape_char(0), |
|
65 |
last_errno(0), |
|
66 |
ignore(0), |
|
67 |
update_fields(0), |
|
68 |
update_values(0) |
|
69 |
{ } |
|
70 |
};
|
|
71 |
||
72 |
||
73 |
} /* namespace drizzled */ |
|
74 |