MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
handler-t.h
1
/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15
16
#ifndef HANDLER_T_INCLUDED
17
#define HANDLER_T_INCLUDED
18
19
// First include (the generated) my_config.h, to get correct platform defines.
20
#include "my_config.h"
21
#include <gtest/gtest.h>
22
#include <gmock/gmock.h>
23
24
#include "handler.h"
25
29
class
Mock_HANDLER
:
public
handler
30
{
31
public
:
32
// Declare all the pure-virtuals.
33
// Note: Sun Studio needs a little help in resolving uchar.
34
MOCK_METHOD0(close,
int
());
35
MOCK_METHOD3(create,
int
(
const
char
*
name
,
TABLE
*
form
,
HA_CREATE_INFO
*));
36
MOCK_METHOD1(info,
int
(
unsigned
ha_status_bitmap));
37
MOCK_METHOD3(open,
int
(
const
char
*name,
int
mode
, uint test_if_locked));
38
MOCK_METHOD1(position,
void
(const ::uchar *
record
));
39
MOCK_METHOD1(rnd_init,
int
(
bool
scan));
40
MOCK_METHOD1(
rnd_next
,
int
(::uchar *
buf
));
41
MOCK_METHOD2(
rnd_pos
,
int
(::uchar *buf, ::uchar *pos));
42
MOCK_METHOD3(
store_lock
,
43
THR_LOCK_DATA
**(THD*,
THR_LOCK_DATA
**, thr_lock_type));
44
45
MOCK_CONST_METHOD0(
bas_ext
,
const
char
**());
46
MOCK_CONST_METHOD3(index_flags, ulong(::uint idx, ::uint part,
bool
));
47
MOCK_CONST_METHOD0(table_flags, Table_flags());
48
MOCK_CONST_METHOD0(
table_type
,
const
char
*());
49
50
// Declare the members we actually want to test.
51
MOCK_METHOD2(
print_error
,
void
(
int
error, myf errflag));
52
53
Mock_HANDLER
(
handlerton
*ht_arg,
TABLE_SHARE
*share_arg)
54
:
handler
(ht_arg, share_arg)
55
{}
56
};
57
58
59
#endif // HANDLER_T_INCLUDED
unittest
gunit
handler-t.h
Generated on Sat Nov 9 2013 01:29:00 for MySQL 5.6.14 Source Code Document by
1.8.1.2