summaryrefslogtreecommitdiff
path: root/sql/sp_pcontext.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-11-09 17:08:13 +0400
committerAlexander Barkov <bar@mariadb.com>2018-11-09 17:08:43 +0400
commitdef2ac209a0c2644ee068abe05bd26a81aeb40c0 (patch)
treea2ab7906ce14740434252cf745d9c10cc760d315 /sql/sp_pcontext.cc
parentaa4772e75b80627a75e01bb8cdb1a55dd3547426 (diff)
downloadmariadb-git-def2ac209a0c2644ee068abe05bd26a81aeb40c0.tar.gz
MDEV-17652 Add sql_mode specific tokens for some keywords
Diffstat (limited to 'sql/sp_pcontext.cc')
-rw-r--r--sql/sp_pcontext.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index 83d674e7500..b0fee18ef05 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -409,6 +409,19 @@ sp_condition_value *sp_pcontext::find_condition(const LEX_CSTRING *name,
NULL;
}
+sp_condition_value *
+sp_pcontext::find_declared_or_predefined_condition(THD *thd,
+ const LEX_CSTRING *name)
+ const
+{
+ sp_condition_value *p= find_condition(name, false);
+ if (p)
+ return p;
+ if (thd->variables.sql_mode & MODE_ORACLE)
+ return find_predefined_condition(name);
+ return NULL;
+}
+
static sp_condition_value
// Warnings