summaryrefslogtreecommitdiff
path: root/sql/sql_priv.h
diff options
context:
space:
mode:
authorArun Kuruvila <arun.kuruvila@oracle.com>2014-07-02 14:52:52 +0530
committerArun Kuruvila <arun.kuruvila@oracle.com>2014-07-02 14:52:52 +0530
commitcf50d1e6d68669b4b449ca04bd166abc9faa1f37 (patch)
treeb886a6cde80fe45355dc82e6a89234a023d40210 /sql/sql_priv.h
parent43268d20e747f4e4194ea26f7fecc434e0ebf550 (diff)
downloadmariadb-git-cf50d1e6d68669b4b449ca04bd166abc9faa1f37.tar.gz
Bug#17873011 NO DEPRECATION WARNING FOR THREAD_CONCURRENCY
Description: THREAD_CONCURRENCY is deprecated and there is no deprecation warning message while setting this variable while starting the server. Analysis: This variable is specific to Solaris 8 and earlier systems and is ignored on all other platforms. But since many customers, who uses other than Solaris, still has this variable in their configuration file, it is important to have a deprecation warning. Fix: THREAD_CONCURRENCY deprecation warning message is added.
Diffstat (limited to 'sql/sql_priv.h')
-rw-r--r--sql/sql_priv.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 970b921d6e6..523220b3c03 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
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
@@ -59,6 +59,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