28
28
-----------------------
29
29
* Removed compatibility hacks for 5.5.32 and 10.0.4.
30
30
I expect no issues building oqgraph into Mariadb 5.5.40 but I think the better approach is maintain a separate fork / patches.
31
+ * Added status variable to report if verbose debug is on
31
32
32
33
*/
33
34
62
63
#define DBUG_PRINT (x ... )
63
64
#endif
64
65
65
- using namespace open_query ;
66
-
67
66
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
68
67
/* In normal operation, no new tables using an integer latch can be created,
69
68
* but they can still be used if they already exist, to allow for upgrades.
@@ -74,12 +73,10 @@ using namespace open_query;
74
73
*/
75
74
76
75
static my_bool g_allow_create_integer_latch = FALSE ;
77
-
78
- static MYSQL_SYSVAR_BOOL (allow_create_integer_latch, g_allow_create_integer_latch,
79
- PLUGIN_VAR_RQCMDARG, " Allow creation of integer latches "
80
- " so the upgrade logic can be tested" , NULL , NULL , FALSE );
81
76
#endif
82
77
78
+ using namespace open_query ;
79
+
83
80
// Table of varchar latch operations.
84
81
// In the future this needs to be refactactored to live somewhere else
85
82
struct oqgraph_latch_op_table { const char *key; int latch; };
@@ -127,10 +124,6 @@ static const ha_create_table_option oqgraph_table_option_list[]=
127
124
HA_TOPTION_END
128
125
};
129
126
130
- static const char oqgraph_description[]=
131
- " Open Query Graph Computation Engine "
132
- " (http://openquery.com/graph)" ;
133
-
134
127
static bool oqgraph_init_done= 0 ;
135
128
136
129
static handler* oqgraph_create_handler (handlerton *hton, TABLE_SHARE *table,
@@ -1203,24 +1196,55 @@ void ha_oqgraph::update_create_info(HA_CREATE_INFO *create_info)
1203
1196
table->file ->info (HA_STATUS_AUTO);
1204
1197
}
1205
1198
1199
+ // --------------------
1200
+ // Handler description.
1201
+ // --------------------
1202
+
1203
+
1204
+ static const char oqgraph_description[]=
1205
+ " Open Query Graph Computation Engine "
1206
+ " (http://openquery.com/graph)" ;
1207
+
1206
1208
struct st_mysql_storage_engine oqgraph_storage_engine=
1207
1209
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
1208
1210
1209
1211
extern " C" const char * const oqgraph_boost_version;
1210
1212
1213
+ static const char *oqgraph_status_verbose_debug =
1214
+ #ifdef VERBOSE_DEBUG
1215
+ " Verbose Debug is enabled. Performance may be adversely impacted." ;
1216
+ #else
1217
+ " Verbose Debug is not enabled." ;
1218
+ #endif
1219
+
1220
+ static const char *oqgraph_status_latch_compat_mode =
1221
+ #ifdef RETAIN_INT_LATCH_COMPATIBILITY
1222
+ " Legacy tables with integer latches are supported." ;
1223
+ #else
1224
+ " Legacy tables with integer latches are not supported." ;
1225
+ #endif
1226
+
1211
1227
static struct st_mysql_show_var oqgraph_status[]=
1212
1228
{
1213
1229
{ " OQGraph_Boost_Version" , (char *) &oqgraph_boost_version, SHOW_CHAR_PTR },
1214
1230
/* We thought about reporting the Judy version, but there seems to be no way to get that from code in the first place. */
1231
+ { " OQGraph_Verbose_Debug" , (char *) &oqgraph_status_verbose_debug, SHOW_CHAR_PTR },
1232
+ { " OQGraph_Compat_mode" , (char *) &oqgraph_status_latch_compat_mode, SHOW_CHAR_PTR },
1215
1233
{ 0 , 0 , SHOW_UNDEF }
1216
1234
};
1217
1235
1218
1236
#ifdef RETAIN_INT_LATCH_COMPATIBILITY
1237
+ static MYSQL_SYSVAR_BOOL ( allow_create_integer_latch, g_allow_create_integer_latch, PLUGIN_VAR_RQCMDARG,
1238
+ " Allow creation of integer latches so the upgrade logic can be tested. Not for normal use." ,
1239
+ NULL , NULL , FALSE );
1240
+ #endif
1241
+
1219
1242
static struct st_mysql_sys_var * oqgraph_sysvars[]= {
1243
+ #ifdef RETAIN_INT_LATCH_COMPATIBILITY
1220
1244
MYSQL_SYSVAR (allow_create_integer_latch),
1245
+ #endif
1221
1246
0
1222
1247
};
1223
- #endif
1224
1248
1225
1249
maria_declare_plugin (oqgraph)
1226
1250
{
@@ -1234,11 +1258,7 @@ maria_declare_plugin(oqgraph)
1234
1258
oqgraph_fini, /* Plugin Deinit */
1235
1259
0x0300 , /* Version: 3s.0 */
1236
1260
oqgraph_status, /* status variables */
1237
- #ifdef RETAIN_INT_LATCH_COMPATIBILITY
1238
- oqgraph_sysvars, /* system variables */
1239
- #else
1240
- NULL ,
1241
- #endif
1261
+ oqgraph_sysvars, /* system variables */
1242
1262
" 3.0" ,
1243
1263
MariaDB_PLUGIN_MATURITY_BETA
1244
1264
}
0 commit comments