Commit 517b1f4f authored by Sergei Golubchik's avatar Sergei Golubchik

cleanups:

* comments from WL#5602 in sql_acl.cc
* rename global memroots in sql_acl.cc
* remove the second empty lex string constant
parent 93b15559
This diff is collapsed.
...@@ -73,8 +73,6 @@ ...@@ -73,8 +73,6 @@
char internal_table_name[2]= "*"; char internal_table_name[2]= "*";
char empty_c_string[1]= {0}; /* used for not defined db */ char empty_c_string[1]= {0}; /* used for not defined db */
LEX_STRING EMPTY_STR= { (char *) "", 0 };
const char * const THD::DEFAULT_WHERE= "field list"; const char * const THD::DEFAULT_WHERE= "field list";
/**************************************************************************** /****************************************************************************
......
...@@ -276,7 +276,7 @@ void case_stmt_action_case(LEX *lex) ...@@ -276,7 +276,7 @@ void case_stmt_action_case(LEX *lex)
(Instruction 12 in the example) (Instruction 12 in the example)
*/ */
lex->spcont->push_label(current_thd, EMPTY_STR, lex->sphead->instructions()); lex->spcont->push_label(current_thd, empty_lex_str, lex->sphead->instructions());
} }
/** /**
...@@ -345,7 +345,7 @@ int case_stmt_action_when(LEX *lex, Item *when, bool simple) ...@@ -345,7 +345,7 @@ int case_stmt_action_when(LEX *lex, Item *when, bool simple)
*/ */
return !test(i) || return !test(i) ||
sp->push_backpatch(i, ctx->push_label(current_thd, EMPTY_STR, 0)) || sp->push_backpatch(i, ctx->push_label(current_thd, empty_lex_str, 0)) ||
sp->add_cont_backpatch(i) || sp->add_cont_backpatch(i) ||
sp->add_instr(i); sp->add_instr(i);
} }
...@@ -3074,7 +3074,7 @@ sp_decl: ...@@ -3074,7 +3074,7 @@ sp_decl:
sp->push_backpatch(i, ctx->last_label())) sp->push_backpatch(i, ctx->last_label()))
MYSQL_YYABORT; MYSQL_YYABORT;
if (sp->push_backpatch(i, ctx->push_label(thd, EMPTY_STR, 0))) if (sp->push_backpatch(i, ctx->push_label(thd, empty_lex_str, 0)))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
sp_hcond_list sp_proc_stmt sp_hcond_list sp_proc_stmt
...@@ -3719,8 +3719,7 @@ sp_proc_stmt_unlabeled: ...@@ -3719,8 +3719,7 @@ sp_proc_stmt_unlabeled:
{ /* Unlabeled controls get a secret label. */ { /* Unlabeled controls get a secret label. */
LEX *lex= Lex; LEX *lex= Lex;
lex->spcont->push_label(thd, lex->spcont->push_label(thd, empty_lex_str,
EMPTY_STR,
lex->sphead->instructions()); lex->sphead->instructions());
} }
sp_unlabeled_control sp_unlabeled_control
...@@ -3949,7 +3948,7 @@ sp_if: ...@@ -3949,7 +3948,7 @@ sp_if:
sp_instr_jump_if_not *i = new sp_instr_jump_if_not(ip, ctx, sp_instr_jump_if_not *i = new sp_instr_jump_if_not(ip, ctx,
$2, lex); $2, lex);
if (i == NULL || if (i == NULL ||
sp->push_backpatch(i, ctx->push_label(thd, EMPTY_STR, 0)) || sp->push_backpatch(i, ctx->push_label(thd, empty_lex_str, 0)) ||
sp->add_cont_backpatch(i) || sp->add_cont_backpatch(i) ||
sp->add_instr(i)) sp->add_instr(i))
MYSQL_YYABORT; MYSQL_YYABORT;
...@@ -3966,7 +3965,7 @@ sp_if: ...@@ -3966,7 +3965,7 @@ sp_if:
sp->add_instr(i)) sp->add_instr(i))
MYSQL_YYABORT; MYSQL_YYABORT;
sp->backpatch(ctx->pop_label()); sp->backpatch(ctx->pop_label());
sp->push_backpatch(i, ctx->push_label(thd, EMPTY_STR, 0)); sp->push_backpatch(i, ctx->push_label(thd, empty_lex_str, 0));
} }
sp_elseifs sp_elseifs
{ {
...@@ -4179,7 +4178,7 @@ sp_unlabeled_block: ...@@ -4179,7 +4178,7 @@ sp_unlabeled_block:
{ /* Unlabeled blocks get a secret label. */ { /* Unlabeled blocks get a secret label. */
LEX *lex= Lex; LEX *lex= Lex;
uint ip= lex->sphead->instructions(); uint ip= lex->sphead->instructions();
sp_label *lab= lex->spcont->push_label(thd, EMPTY_STR, ip); sp_label *lab= lex->spcont->push_label(thd, empty_lex_str, ip);
lab->type= sp_label::BEGIN; lab->type= sp_label::BEGIN;
} }
sp_block_content sp_block_content
......
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