summaryrefslogtreecommitdiff
path: root/sql/unireg.h
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-02-10 11:08:39 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2010-02-10 11:08:39 +0100
commit6cd0eebed89fe128680c24394dbe8614085f82c7 (patch)
treebbbeb7bb042199e0c4f3297cbd80ad641f3b67f6 /sql/unireg.h
parentb0e2a9b2d59fed798c77e752048c1b52c1c7d2ad (diff)
parentdca6700620d5f4b325c3aadbbf5ab30c5b888a8c (diff)
downloadmariadb-git-6cd0eebed89fe128680c24394dbe8614085f82c7.tar.gz
merge
Diffstat (limited to 'sql/unireg.h')
-rw-r--r--sql/unireg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/unireg.h b/sql/unireg.h
index def4fb12b39..9932be7ae74 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -46,6 +46,9 @@
#define ER(X) CURRENT_THD_ERRMSGS[(X) - ER_ERROR_FIRST]
#define ER_DEFAULT(X) DEFAULT_ERRMSGS[(X) - ER_ERROR_FIRST]
#define ER_SAFE(X) (((X) >= ER_ERROR_FIRST && (X) <= ER_ERROR_LAST) ? ER(X) : "Invalid error code")
+#define ER_THD(thd,X) ((thd)->variables.lc_messages->errmsgs->errmsgs[(X) - \
+ ER_ERROR_FIRST])
+#define ER_THD_OR_DEFAULT(thd,X) ((thd) ? ER_THD(thd, X) : ER_DEFAULT(X))
#define ERRMAPP 1 /* Errormap f|r my_error */