Commit bf3b67f3 authored by unknown's avatar unknown

post-merge fixes for dbug


dbug/dbug.c:
  post-merge fixes (-#T in explain was forgotten)
sql/set_var.h:
  post-merge fixes (DBUG_POP() is the correct way to restore default settings now)
parent 832dd46f
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
* DBUG_EXECUTE_IF * DBUG_EXECUTE_IF
* incremental mode (-#+t:-d,info ...) * incremental mode (-#+t:-d,info ...)
* DBUG_SET, _db_explain_ * DBUG_SET, _db_explain_
* thread-local settings
* *
*/ */
...@@ -547,6 +548,7 @@ void _db_set_(CODE_STATE *cs, const char *control) ...@@ -547,6 +548,7 @@ void _db_set_(CODE_STATE *cs, const char *control)
if (!rel) sign=0; if (!rel) sign=0;
c= *control++; c= *control++;
if (*control == ',') control++; if (*control == ',') control++;
/* XXX when adding new cases here, don't forget _db_explain_ ! */
switch (c) { switch (c) {
case 'd': case 'd':
if (sign < 0 && control == end) if (sign < 0 && control == end)
...@@ -857,6 +859,7 @@ int _db_explain_ (CODE_STATE *cs, char *buf, int len) ...@@ -857,6 +859,7 @@ int _db_explain_ (CODE_STATE *cs, char *buf, int len)
op_bool_to_buf('P', cs->stack->flags & PROCESS_ON); op_bool_to_buf('P', cs->stack->flags & PROCESS_ON);
op_bool_to_buf('r', cs->stack->sub_level != 0); op_bool_to_buf('r', cs->stack->sub_level != 0);
op_intf_to_buf('t', cs->stack->maxdepth, MAXDEPTH, TRACING); op_intf_to_buf('t', cs->stack->maxdepth, MAXDEPTH, TRACING);
op_bool_to_buf('T', cs->stack->flags & TIMESTAMP_ON);
op_bool_to_buf('S', cs->stack->flags & SANITY_CHECK_ON); op_bool_to_buf('S', cs->stack->flags & SANITY_CHECK_ON);
*buf= '\0'; *buf= '\0';
......
...@@ -435,12 +435,7 @@ class sys_var_thd_dbug :public sys_var_thd ...@@ -435,12 +435,7 @@ class sys_var_thd_dbug :public sys_var_thd
bool check(THD *thd, set_var *var); bool check(THD *thd, set_var *var);
SHOW_TYPE type() { return SHOW_CHAR; } SHOW_TYPE type() { return SHOW_CHAR; }
bool update(THD *thd, set_var *var); bool update(THD *thd, set_var *var);
void set_default(THD *thd, enum_var_type type) void set_default(THD *thd, enum_var_type type) { DBUG_POP(); }
{
char buf[256];
DBUG_EXPLAIN_INITIAL(buf, sizeof(buf));
DBUG_SET(buf);
}
byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *b); byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *b);
}; };
......
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