summaryrefslogtreecommitdiff
path: root/sql/sql_priv.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-10-06 19:53:55 +0200
committerSergei Golubchik <sergii@pisem.net>2014-10-06 19:53:55 +0200
commit1ddfce4840994b6b79a3f426fcedf8f0469334ac (patch)
tree4a5700c90dacb63f00a8d130e94ba0398b2ee371 /sql/sql_priv.h
parentc0977073e18d070810c20026defc63794154e288 (diff)
parent3139aa87b4f215418740939cc8d156150c355823 (diff)
downloadmariadb-git-1ddfce4840994b6b79a3f426fcedf8f0469334ac.tar.gz
mysql-5.5.40
Diffstat (limited to 'sql/sql_priv.h')
-rw-r--r--sql/sql_priv.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 6e778c09bd8..749ee245aa7 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
- Copyright (c) 2010-2011 Monty Program Ab
+/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2014, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -60,6 +60,33 @@
(Old), (New)); \
} while(0)
+
+/*
+ Generates a warning that a feature is deprecated and there is no replacement.
+
+ Using it as
+
+ WARN_DEPRECATED_NO_REPLACEMENT(thd, "BAD");
+
+ Will result in a warning
+
+ "'BAD' is deprecated and will be removed in a future release."
+
+ Note that in macro arguments BAD is not quoted.
+*/
+
+#define WARN_DEPRECATED_NO_REPLACEMENT(Thd,Old) \
+ do { \
+ if (((THD *) Thd) != NULL) \
+ push_warning_printf(((THD *) Thd), MYSQL_ERROR::WARN_LEVEL_WARN, \
+ ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \
+ ER(ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \
+ (Old)); \
+ else \
+ sql_print_warning("'%s' is deprecated and will be removed " \
+ "in a future release.", (Old)); \
+ } while(0)
+
/*************************************************************************/
#endif