summaryrefslogtreecommitdiff
path: root/sql/sql_priv.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-12-02 22:25:16 +0100
committerSergei Golubchik <serg@mariadb.org>2014-12-02 22:25:16 +0100
commit853077ad7e81be1ade20b4beab1b95d5766d87b1 (patch)
tree4c158691947ba7beb4577f26b160f243eabf39ef /sql/sql_priv.h
parentbf3b4a23f75de50e0f1ab4a562e5801dabc7305b (diff)
parent2b5db1d5bcd7b46b654d59a07fc119ef6a6b8651 (diff)
downloadmariadb-git-853077ad7e81be1ade20b4beab1b95d5766d87b1.tar.gz
Merge branch '10.0' into bb-10.1-merge
Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
Diffstat (limited to 'sql/sql_priv.h')
-rw-r--r--sql/sql_priv.h66
1 files changed, 29 insertions, 37 deletions
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 9578c2fe8df..b6fb684d6fc 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, 2013, 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), Sql_condition::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
@@ -155,41 +182,6 @@
#define OPTION_ALLOW_BATCH (1ULL << 36) // THD, intern (slave)
#define OPTION_SKIP_REPLICATION (1ULL << 37) // THD, user
-/*
- Check how many bytes are available on buffer.
-
- @param buf_start Pointer to buffer start.
- @param buf_current Pointer to the current position on buffer.
- @param buf_len Buffer length.
-
- @return Number of bytes available on event buffer.
-*/
-template <class T> T available_buffer(const char* buf_start,
- const char* buf_current,
- T buf_len)
-{
- return buf_len - (buf_current - buf_start);
-}
-
-/*
- Check if jump value is within buffer limits.
-
- @param jump Number of positions we want to advance.
- @param buf_start Pointer to buffer start
- @param buf_current Pointer to the current position on buffer.
- @param buf_len Buffer length.
-
- @return True If jump value is within buffer limits.
- False Otherwise.
-*/
-template <class T> bool valid_buffer_range(T jump,
- const char* buf_start,
- const char* buf_current,
- T buf_len)
-{
- return (jump <= available_buffer(buf_start, buf_current, buf_len));
-}
-
/* The rest of the file is included in the server only */
#ifndef MYSQL_CLIENT