summaryrefslogtreecommitdiff
path: root/sql/sql_list.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-03-03 07:20:15 +0400
committerAlexander Barkov <bar@mariadb.com>2019-03-03 07:20:15 +0400
commit47b7ca629f5e91465140375e3d40c49954c0566d (patch)
treef25a7271e8ca21946a4a6ce587fd743d43adb8b4 /sql/sql_list.h
parent3b47587f419f70687d840c522f4a80e7762b9183 (diff)
downloadmariadb-git-47b7ca629f5e91465140375e3d40c49954c0566d.tar.gz
MDEV-18796 Synchronize PS grammar between sql_yacc.yy and sql_yacc_ora.yy
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r--sql/sql_list.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h
index 27827b42be5..60ec8ab4177 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -518,6 +518,12 @@ public:
empty();
}
T *elem(uint n) { return (T*) base_list::elem(n); }
+ // Create a new list with one element
+ static List<T> *make(MEM_ROOT *mem_root, T *first)
+ {
+ List<T> *res= new (mem_root) List<T>;
+ return res == NULL || res->push_back(first, mem_root) ? NULL : res;
+ }
};