~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/ha_pbxt.h

Merge Joe, plus I updated the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2005 PrimeBase Technologies GmbH
 
1
/* Copyright (c) 2005 PrimeBase Technologies GmbH
2
2
 *
3
3
 * Derived from ha_example.h
4
4
 * Copyright (C) 2003 MySQL AB
17
17
 *
18
18
 * You should have received a copy of the GNU General Public License
19
19
 * along with this program; if not, write to the Free Software
20
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA    02110-1301      USA
 
20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA     02111-1307      USA
21
21
 *
22
22
 * 2005-11-10   Paul McCullagh
23
23
 *
68
68
                                        HTON_FAST_KEY_READ | 
69
69
                                        HTON_NULL_IN_KEY | 
70
70
                                        HTON_CAN_INDEX_BLOBS |
71
 
                                        HTON_AUTO_PART_KEY |
72
 
                                        HTON_HAS_FOREIGN_KEYS |
73
 
                    HTON_HAS_DOES_TRANSACTIONS) 
 
71
                                        HTON_AUTO_PART_KEY) 
74
72
        {}
75
73
 
76
74
        void operator delete(void *) {}
77
75
        void operator delete[] (void *) {}
78
76
 
79
 
        /* override */ uint32_t index_flags(enum  ha_key_alg) const;
80
77
        /* override */ int close_connection(Session *);
81
78
        /* override */ int commit(Session *, bool);
82
79
        /* override */ int rollback(Session *, bool);
83
 
        /* override */ Cursor *create(Table&);
 
80
        /* override */ Cursor *create(TableShare&, memory::Root *);
84
81
        /* override */ void drop_database(char *);
85
82
        /* override */ bool show_status(Session *, stat_print_fn *, enum ha_stat_type);
86
83
        /* override */ const char **bas_ext() const;
98
95
        /* override */ int doCommit(drizzled::Session*, bool);
99
96
        /* override */ int doRollback(drizzled::Session*, bool);
100
97
 
101
 
        /* override */ uint32_t max_supported_keys(void) const { return UINT32_MAX; }
 
98
        /* override */ uint32_t max_supported_keys(void) const { return -1; }
102
99
        /* override */ uint32_t max_supported_key_part_length(void) const { return MAX_KEY_LENGTH; }
103
100
 
104
 
        /* override */ void doGetTableIdentifiers(drizzled::CachedDirectory&,
105
 
                                                  const drizzled::SchemaIdentifier&,
106
 
                                                  drizzled::TableIdentifier::vector&) {}
 
101
        /* override */ void doGetTableIdentifiers(drizzled::CachedDirectory&,
 
102
                                           const drizzled::SchemaIdentifier&,
 
103
                                           drizzled::TableIdentifiers&) {}
 
104
 
 
105
        /* override */ void doGetTableNames(CachedDirectory&, 
 
106
                                        const SchemaIdentifier&, 
 
107
                                        std::set<std::string>&) {}
107
108
 
108
109
        /* override */ bool doDoesTableExist(Session&, const TableIdentifier &identifier);
109
110
 
110
 
        virtual void shutdownPlugin();
111
 
 
112
 
        ~PBXTStorageEngine();
 
111
        ~PBXTStorageEngine();
113
112
};
114
113
 
115
114
typedef PBXTStorageEngine handlerton;
174
173
        THD                                     *pb_mysql_thd;                  /* A pointer to the MySQL thread. */
175
174
        xtBool                          pb_in_stat;                             /* TRUE of start_stmt() was issued */
176
175
 
177
 
        ha_pbxt(plugin::StorageEngine &engine_arg, Table &table_arg);
 
176
        ha_pbxt(plugin::StorageEngine &engine_arg, TableShare &table_arg);
178
177
        virtual ~ha_pbxt() { }
179
178
 
180
179
        /* The name that will be used for display purposes */
198
197
        MX_TABLE_TYPES_T table_flags() const;
199
198
 
200
199
        /*
 
200
         * part is the key part to check. First key part is 0
 
201
         * If all_parts it's set, MySQL want to know the flags for the combined
 
202
         * index up to and including 'part'.
 
203
         */
 
204
        MX_ULONG_T index_flags(uint inx, uint part, bool all_parts) const;
 
205
 
 
206
        /*
201
207
         * unireg.cc will call the following to make sure that the storage engine can
202
208
         * handle the data it is about to send.
203
209
         * 
276
282
        void    unlock_row();
277
283
        int             delete_all_rows(void);
278
284
        int             repair(THD* thd, HA_CHECK_OPT* check_opt);
 
285
#ifdef DRIZZLED
279
286
        int             analyze(THD* thd);
280
287
        int             optimize(THD* thd);
281
288
        int             check(THD* thd);
 
289
#else
 
290
        int             analyze(THD* thd, HA_CHECK_OPT* check_opt);
 
291
        int             optimize(THD* thd, HA_CHECK_OPT* check_opt);
 
292
        int             check(THD* thd, HA_CHECK_OPT* check_opt);
 
293
#endif
282
294
        ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
 
295
#ifndef DRIZZLED
 
296
        int             delete_system_table(const char *table_path);
 
297
        int             delete_table(const char *from);
 
298
        int             rename_system_table(const char * from, const char * to);
 
299
        int             rename_table(const char * from, const char * to);
 
300
        int             create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);                             //required
 
301
#endif
283
302
 
284
303
        THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type);          //required
285
304