1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

A cleanup patch for MDEV-12011 sql_mode=ORACLE: cursor%ROWTYPE in variable declarations

Addressing Monty's review suggestions
This commit is contained in:
Alexander Barkov
2017-04-03 14:34:32 +04:00
parent 48a7ea6da3
commit ce4b291b51
4 changed files with 25 additions and 31 deletions

View File

@@ -5303,10 +5303,7 @@ LEX::sp_variable_declarations_rowtype_finalize(THD *thd, int nvars,
if (pcursor)
{
Cursor_rowtype *ref;
if (!(ref= new (thd->mem_root) Cursor_rowtype(coffp)))
return true;
spvar->field_def.set_cursor_rowtype_ref(ref);
spvar->field_def.set_cursor_rowtype_ref(true);
sp_instr_cursor_copy_struct *instr=
new (thd->mem_root) sp_instr_cursor_copy_struct(sphead->instructions(),
spcont, pcursor->lex(),
@@ -5435,10 +5432,7 @@ LEX::sp_add_for_loop_cursor_variable(THD *thd,
sphead->fill_spvar_definition(thd, &spvar->field_def, spvar->name.str);
spvar->default_value= new (thd->mem_root) Item_null(thd);
Cursor_rowtype *ref;
if (!(ref= new (thd->mem_root) Cursor_rowtype(coffset)))
return NULL;
spvar->field_def.set_cursor_rowtype_ref(ref);
spvar->field_def.set_cursor_rowtype_ref(true);
if (sphead->add_for_loop_open_cursor(thd, spcont, spvar, pcursor, coffset,
param_lex, parameters))