diff options
author | Andrew McDonnell <bugs@andrewmcdonnell.net> | 2013-09-16 22:47:12 +0930 |
---|---|---|
committer | Andrew McDonnell <bugs@andrewmcdonnell.net> | 2013-09-16 22:47:12 +0930 |
commit | a6af7fc047b2a0230958793d800ecb558f4c4ded (patch) | |
tree | 47000e62cdaaabb2448d6339fe30573b44e828b6 /storage/oqgraph | |
parent | df58dd6252d4368c9b4bdaa9c017cae09e61d106 (diff) | |
download | mariadb-git-a6af7fc047b2a0230958793d800ecb558f4c4ded.tar.gz |
Backwards compatibility fixes for 5.5.32
Diffstat (limited to 'storage/oqgraph')
-rw-r--r-- | storage/oqgraph/ha_oqgraph.cc | 18 | ||||
-rw-r--r-- | storage/oqgraph/ha_oqgraph.h | 5 | ||||
-rw-r--r-- | storage/oqgraph/oqgraph_thunk.cc | 6 |
3 files changed, 24 insertions, 5 deletions
diff --git a/storage/oqgraph/ha_oqgraph.cc b/storage/oqgraph/ha_oqgraph.cc index 27b1d2c94c9..850bb12961d 100644 --- a/storage/oqgraph/ha_oqgraph.cc +++ b/storage/oqgraph/ha_oqgraph.cc @@ -43,6 +43,14 @@ #define MYSQL_ERROR Sql_condition #endif +#if MYSQL_VERSION_ID < 100000 +// Allow compatibility with build for 5.5.32 +#define user_defined_key_parts key_parts +#define open_table_error(a,b,c) open_table_error(a,b,c,0) +#define enum_open_frm_error int +#else +#define enum_open_frm_error enum open_frm_error +#endif #include "table.h" #include "field.h" @@ -107,7 +115,7 @@ static uint32 findLongestLatch() { return len; } -static const char *latchToCode(int latch) { +const char *oqlatchToCode(int latch) { for (const oqgraph_latch_op_table* k=latch_ops_table; k && k->key; k++) { if (k->latch == latch) { return k->key; @@ -568,16 +576,16 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked) while (open_table_def(thd, share, open_def_flags)) { #if MYSQL_VERSION_ID < 100002 - if (thd->is_error() && thd->get_stmt_da()->sql_errno() != ER_NO_SUCH_TABLE) + if (thd->is_error() && thd->stmt_da->sql_errno() != ER_NO_SUCH_TABLE) { free_table_share(share); - DBUG_RETURN(thd->get_stmt_da()->sql_errno()); + DBUG_RETURN(thd->stmt_da->sql_errno()); } if (ha_create_table_from_engine(thd, table->s->db.str, options->table_name)) { free_table_share(share); - DBUG_RETURN(thd->get_stmt_da()->sql_errno()); + DBUG_RETURN(thd->stmt_da->sql_errno()); } /*mysql_reset_errors(thd, 1);*/ thd->clear_error(); @@ -606,7 +614,7 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked) DBUG_RETURN(-1); } - if (enum open_frm_error err= open_table_from_share(thd, share, "", + if (enum_open_frm_error err= open_table_from_share(thd, share, "", (uint) (HA_OPEN_KEYFILE | HA_OPEN_RNDFILE | HA_GET_INDEX | HA_TRY_READ_ONLY), READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD, diff --git a/storage/oqgraph/ha_oqgraph.h b/storage/oqgraph/ha_oqgraph.h index c98dd6c3234..2a998425c27 100644 --- a/storage/oqgraph/ha_oqgraph.h +++ b/storage/oqgraph/ha_oqgraph.h @@ -110,6 +110,11 @@ public: void fprint_error(const char* fmt, ...); +#if MYSQL_VERSION_ID < 100000 + // Allow compatibility for build with 5.5.32 + virtual const char *table_type() const { return hton_name(ht)->str; } +#endif + private: int oqgraph_check_table_structure (TABLE *table_arg); diff --git a/storage/oqgraph/oqgraph_thunk.cc b/storage/oqgraph/oqgraph_thunk.cc index 8f347e4fd65..2fe8044aef8 100644 --- a/storage/oqgraph/oqgraph_thunk.cc +++ b/storage/oqgraph/oqgraph_thunk.cc @@ -34,6 +34,12 @@ #include "key.h" #include "unireg.h" +#if MYSQL_VERSION_ID < 100000 +// Allow compatibility with build for 5.5.32 +#define user_defined_key_parts key_parts +#endif + + static int debugid = 0; oqgraph3::vertex_id oqgraph3::edge_info::origid() const |