1 | /* Copyright (C) 2010 Monty Program Ab |
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 Street, Fifth Floor, Boston, MA 02111-1301 USA */ |
15 | |
16 | /* |
17 | Functions to handle tables with no row data (only index) |
18 | This is useful when you just want to do key reads or want to use |
19 | the index to check against duplicates. |
20 | */ |
21 | |
22 | #include "maria_def.h" |
23 | |
24 | my_bool _ma_write_no_record(MARIA_HA *info __attribute__((unused)), |
25 | const uchar *record __attribute__((unused))) |
26 | { |
27 | return 0; |
28 | } |
29 | |
30 | my_bool _ma_update_no_record(MARIA_HA *info __attribute__((unused)), |
31 | MARIA_RECORD_POS pos __attribute__((unused)), |
32 | const uchar *oldrec __attribute__((unused)), |
33 | const uchar *record __attribute__((unused))) |
34 | { |
35 | return (my_bool)HA_ERR_WRONG_COMMAND; |
36 | } |
37 | |
38 | |
39 | my_bool _ma_delete_no_record(MARIA_HA *info __attribute__((unused)), |
40 | const uchar *record __attribute__((unused))) |
41 | { |
42 | return (my_bool)HA_ERR_WRONG_COMMAND; |
43 | } |
44 | |
45 | |
46 | int _ma_read_no_record(MARIA_HA *info __attribute__((unused)), |
47 | uchar *record __attribute__((unused)), |
48 | MARIA_RECORD_POS pos __attribute__((unused))) |
49 | { |
50 | return HA_ERR_WRONG_COMMAND; |
51 | } |
52 | |
53 | |
54 | int _ma_read_rnd_no_record(MARIA_HA *info __attribute__((unused)), |
55 | uchar *buf __attribute__((unused)), |
56 | MARIA_RECORD_POS filepos __attribute__((unused)), |
57 | my_bool skip_deleted_blocks __attribute__((unused))) |
58 | { |
59 | return HA_ERR_WRONG_COMMAND; |
60 | } |
61 | |
62 | my_off_t _ma_no_keypos_to_recpos(MARIA_SHARE *share __attribute__ ((unused)), |
63 | my_off_t pos __attribute__ ((unused))) |
64 | { |
65 | return 0; |
66 | } |
67 | |