summaryrefslogtreecommitdiff
path: root/storage/oqgraph/ha_oqgraph.h
diff options
context:
space:
mode:
authorAntony T Curtis <antony@xiphis.org>2011-04-12 15:50:32 -0700
committerAntony T Curtis <antony@xiphis.org>2011-04-12 15:50:32 -0700
commit2037f387eea7c23e2633bed572489a7b73f48c4d (patch)
tree8b4309c848bf9c981f554c48aedfe647daa69f22 /storage/oqgraph/ha_oqgraph.h
parent64e43e1cc88c66bd89f95a5307020bcf60ba4b96 (diff)
downloadmariadb-git-2037f387eea7c23e2633bed572489a7b73f48c4d.tar.gz
Commit work for OQGraph v3
Todo: - Add #ifdefs for building in MySQL - Lots more testing
Diffstat (limited to 'storage/oqgraph/ha_oqgraph.h')
-rw-r--r--storage/oqgraph/ha_oqgraph.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h
index dcc14b074da..4c606dcc7e4 100644
--- a/storage/oqgraph/ha_oqgraph.h
+++ b/storage/oqgraph/ha_oqgraph.h
@@ -39,19 +39,21 @@ namespace open_query
{
struct row;
class oqgraph;
+ class oqgraph_share;
}
/* class for the the Open Query Graph handler */
class ha_oqgraph: public handler
{
- OQGRAPH_INFO *share;
+ TABLE_SHARE share[1];
+ TABLE edges[1];
+ Field *origid;
+ Field *destid;
+ Field *weight;
+
+ open_query::oqgraph_share *graph_share;
open_query::oqgraph *graph;
- THR_LOCK_DATA lock;
- /* number of records changed since last statistics update */
- uint records_changed;
- uint key_stat_version;
- bool replace_dups, ignore_dups, insert_dups;
int fill_record(byte*, const open_query::row&);
@@ -63,7 +65,7 @@ public:
ha_oqgraph(TABLE *table);
ulong table_flags() const;
#endif
- ~ha_oqgraph() {}
+ ~ha_oqgraph();
const char *table_type() const
{
return "OQGRAPH";
@@ -109,6 +111,12 @@ public:
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
int cmp_ref(const byte *ref1, const byte *ref2);
+
+ bool get_error_message(int error, String* buf);
+
+ void print_error(const char* fmt, ...);
+
private:
void update_key_stats();
+ String error_message;
};