Skip to content

Commit b50fa6d

Browse files
author
Alexander Barkov
committed
Removing the unused "field_type" parameter in
sp_head::fill_field_definition().
1 parent 253be36 commit b50fa6d

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

sql/sp_head.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,6 @@ sp_head::backpatch(sp_label *lab)
23322332
23332333
@param[in] thd Thread handle
23342334
@param[in] lex Yacc parsing context
2335-
@param[in] field_type Field type
23362335
@param[out] field_def An instance of create_field to be filled
23372336
23382337
@retval
@@ -2343,7 +2342,6 @@ sp_head::backpatch(sp_label *lab)
23432342

23442343
bool
23452344
sp_head::fill_field_definition(THD *thd, LEX *lex,
2346-
enum enum_field_types field_type,
23472345
Column_definition *field_def)
23482346
{
23492347
uint unused1= 0;

sql/sp_head.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ class sp_head :private Query_arena
418418
TABLE *table);
419419

420420
bool fill_field_definition(THD *thd, LEX *lex,
421-
enum enum_field_types field_type,
422421
Column_definition *field_def);
423422

424423
void set_info(longlong created, longlong modified,

sql/sql_yacc.yy

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,8 +2943,7 @@ sp_param_name_and_type:
29432943
sp_variable *spvar= $<spvar>2;
29442944

29452945
spvar->type= $3.field_type();
2946-
if (lex->sphead->fill_field_definition(thd, lex, $3.field_type(),
2947-
lex->last_field))
2946+
if (lex->sphead->fill_field_definition(thd, lex, lex->last_field))
29482947
{
29492948
MYSQL_YYABORT;
29502949
}
@@ -3039,7 +3038,6 @@ sp_decl:
30393038
LEX *lex= Lex;
30403039
sp_pcontext *pctx= lex->spcont;
30413040
uint num_vars= pctx->context_var_count();
3042-
enum enum_field_types var_type= $4.field_type();
30433041
Item *dflt_value_item= $5;
30443042

30453043
if (!dflt_value_item)
@@ -3062,11 +3060,11 @@ sp_decl:
30623060
if (!last)
30633061
spvar->field_def= *lex->last_field;
30643062

3065-
spvar->type= var_type;
3063+
spvar->type= $4.field_type();
30663064
spvar->default_value= dflt_value_item;
30673065
spvar->field_def.field_name= spvar->name.str;
30683066

3069-
if (lex->sphead->fill_field_definition(thd, lex, var_type,
3067+
if (lex->sphead->fill_field_definition(thd, lex,
30703068
&spvar->field_def))
30713069
{
30723070
MYSQL_YYABORT;
@@ -3081,7 +3079,7 @@ sp_decl:
30813079
pctx,
30823080
var_idx,
30833081
dflt_value_item,
3084-
var_type,
3082+
$4.field_type(),
30853083
lex,
30863084
last));
30873085
if (is == NULL ||
@@ -16337,8 +16335,7 @@ sf_tail:
1633716335
}
1633816336
type_with_opt_collate /* $11 */
1633916337
{ /* $12 */
16340-
if (Lex->sphead->fill_field_definition(thd, Lex, $11.field_type(),
16341-
Lex->last_field))
16338+
if (Lex->sphead->fill_field_definition(thd, Lex, Lex->last_field))
1634216339
MYSQL_YYABORT;
1634316340
}
1634416341
sp_c_chistics /* $13 */

0 commit comments

Comments
 (0)