MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ndberr.cpp
1 /*
2  Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #include "API.hpp"
19 
20 static void
21 update(const NdbError & _err){
22  NdbError & error = (NdbError &) _err;
23  ndberror_struct ndberror = (ndberror_struct)error;
24  ndberror_update(&ndberror);
25  error = NdbError(ndberror);
26 }
27 
28 const
29 NdbError &
31  theError.code = code;
32  update(theError);
33  return theError;
34 }
35 
36 const
37 NdbError &
39  update(theError);
40  return theError;
41 }
42 
43 const
44 NdbError &
46  update(m_error);
47  return m_error;
48 }
49 
50 const
51 NdbError &
53  update(theError);
54  return theError;
55 }
56 
57 const
58 NdbError &
60  update(theError);
61  return theError;
62 }
63 
64 const
65 NdbError &
67  update(theError);
68  return theError;
69 }
70 
71 const
72 NdbError &
74  update(m_error);
75  return m_error;
76 }
77 
78 const
79 NdbError &
80 NdbDictInterface::getNdbError() const {
81  update(m_error);
82  return m_error;
83 }
84 
85 const
86 NdbError &
87 NdbQueryBuilderImpl::getNdbError() const {
88  update(m_error);
89  return m_error;
90 }
91 
92 const
93 NdbError &
94 NdbQueryImpl::getNdbError() const {
95  update(m_error);
96  return m_error;
97 }
98 
99 const
101 NdbIndexStatImpl::getNdbError() const {
102  update(m_error);
103  return m_error;
104 }