summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-05-21 12:30:21 +0400
committerAlexander Barkov <bar@mariadb.com>2019-05-21 12:30:21 +0400
commited39181a27ed95e1de63661bdeb6cfc21c3c6c03 (patch)
tree669f83585b6b8ef3133ba4c27b17a692c890e57a /sql/sp_rcontext.cc
parentfae1319450eea47e9bb6d33cf5134671931b5fdc (diff)
downloadmariadb-git-ed39181a27ed95e1de63661bdeb6cfc21c3c6c03.tar.gz
MDEV-19533 Add methods make() and append_uniq() to Row_definition_list
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r--sql/sp_rcontext.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index 961862d2b18..17b4c83b7bc 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -119,6 +119,19 @@ sp_rcontext *sp_rcontext::create(THD *thd,
}
+bool Row_definition_list::append_uniq(MEM_ROOT *mem_root, Spvar_definition *var)
+{
+ DBUG_ASSERT(elements);
+ uint unused;
+ if (unlikely(find_row_field_by_name(&var->field_name, &unused)))
+ {
+ my_error(ER_DUP_FIELDNAME, MYF(0), var->field_name.str);
+ return true;
+ }
+ return push_back(var, mem_root);
+}
+
+
bool Row_definition_list::
adjust_formal_params_to_actual_params(THD *thd, List<Item> *args)
{