Commit 0532a847 authored by Andrew McDonnell's avatar Andrew McDonnell

Fixes for compilation when DEBUG_VERBOSE and RETAIN_INT_LATCH_COMPATIBILITY not defined

parent 8c39cbd9
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
#include "my_dbug.h" #include "my_dbug.h"
// Uncomment this for extra debug, but expect a performance hit in large queries // Uncomment this for extra debug, but expect a performance hit in large queries
#define VERBOSE_DEBUG // #define VERBOSE_DEBUG
#ifdef VERBOSE_DEBUG #ifdef VERBOSE_DEBUG
#else #else
#undef DBUG_PRINT #undef DBUG_PRINT
#define DBUG_PRINT(x) #define DBUG_PRINT(x ...)
#endif #endif
#define OQGRAPH_STATS_UPDATE_THRESHOLD 10 #define OQGRAPH_STATS_UPDATE_THRESHOLD 10
...@@ -169,7 +169,6 @@ statistic_increment(table->in_use->status_var.X, &LOCK_status) ...@@ -169,7 +169,6 @@ statistic_increment(table->in_use->status_var.X, &LOCK_status)
static bool oqgraph_init_done= 0; static bool oqgraph_init_done= 0;
static handler* oqgraph_create_handler(handlerton *hton, TABLE_SHARE *table, static handler* oqgraph_create_handler(handlerton *hton, TABLE_SHARE *table,
MEM_ROOT *mem_root) MEM_ROOT *mem_root)
{ {
...@@ -245,9 +244,8 @@ static int error_code(int res) ...@@ -245,9 +244,8 @@ static int error_code(int res)
* ================================= * =================================
* *
The latch may be a varchar of any length, however if it is too short, The latch may be a varchar of any length, however if it is too short to
then some of the OQGRAPH graph operations will not be able to be executed. hold the longest latch value, table creation is aborted.
A size of 32 seems reasonable at this point in time.
CREATE TABLE foo ( CREATE TABLE foo (
latch VARCHAR(32) NULL, latch VARCHAR(32) NULL,
...@@ -1198,10 +1196,13 @@ static struct st_mysql_show_var oqgraph_status[]= ...@@ -1198,10 +1196,13 @@ static struct st_mysql_show_var oqgraph_status[]=
{ 0, 0, SHOW_UNDEF } { 0, 0, SHOW_UNDEF }
}; };
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
static struct st_mysql_sys_var* oqgraph_sysvars[]= { static struct st_mysql_sys_var* oqgraph_sysvars[]= {
MYSQL_SYSVAR(allow_create_integer_latch), MYSQL_SYSVAR(allow_create_integer_latch),
0 0
}; };
#endif
maria_declare_plugin(oqgraph) maria_declare_plugin(oqgraph)
{ {
MYSQL_STORAGE_ENGINE_PLUGIN, MYSQL_STORAGE_ENGINE_PLUGIN,
...@@ -1214,7 +1215,11 @@ maria_declare_plugin(oqgraph) ...@@ -1214,7 +1215,11 @@ maria_declare_plugin(oqgraph)
oqgraph_fini, /* Plugin Deinit */ oqgraph_fini, /* Plugin Deinit */
0x0300, /* Version: 3s.0 */ 0x0300, /* Version: 3s.0 */
oqgraph_status, /* status variables */ oqgraph_status, /* status variables */
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
oqgraph_sysvars, /* system variables */ oqgraph_sysvars, /* system variables */
#else
NULL,
#endif
"3.0", "3.0",
MariaDB_PLUGIN_MATURITY_BETA MariaDB_PLUGIN_MATURITY_BETA
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment