[tarantool-patches] [PATCH 4/7] Move struct on_access_denied_ctx into error.h

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Apr 26 02:29:04 MSK 2018


The issue #3290 was not only about upper/lower Lua functions, but
about unicode comparison functions too. Actually, the issue
requests upper/lower exactly to do string comparison, that can be
done more quick with no garbage strings creation. For this
Tarantool collations can be used.

To be able to expose collations into Lua, the coll.h/.c,
coll_def.h/.c and coll_cache.h/.c must be moved from 'box' static
library into 'core' static library so that they will be built
together with string utils. But they require 'stat' and
'box_error' libraries. The patch prepares the files going to be
moved, so in the next patch they are just moved, with no changes.
It saves commit history.
---
 src/box/error.cc |  1 -
 src/box/error.h  | 12 ++++++++++++
 src/box/schema.h | 12 ------------
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/src/box/error.cc b/src/box/error.cc
index 99f519537..4bab5d720 100644
--- a/src/box/error.cc
+++ b/src/box/error.cc
@@ -174,7 +174,6 @@ BuildXlogError(const char *file, unsigned line, const char *format, ...)
 	}
 }
 
-#include "schema.h"
 #include "trigger.h"
 
 struct rlist on_access_denied = RLIST_HEAD_INITIALIZER(on_access_denied);
diff --git a/src/box/error.h b/src/box/error.h
index c791e6c6a..69a1022ad 100644
--- a/src/box/error.h
+++ b/src/box/error.h
@@ -133,6 +133,18 @@ extern const struct type_info type_ClientError;
 extern const struct type_info type_XlogError;
 extern const struct type_info type_AccessDeniedError;
 
+/**
+ * Context passed to on_access_denied trigger.
+ */
+struct on_access_denied_ctx {
+	/** Type of declined access */
+	const char *access_type;
+	/** Type of object the required access was denied to */
+	const char *object_type;
+	/** Name of object the required access was denied to */
+	const char *object_name;
+};
+
 #if defined(__cplusplus)
 } /* extern "C" */
 #include "exception.h"
diff --git a/src/box/schema.h b/src/box/schema.h
index 56f39b3fe..4b2a3da4e 100644
--- a/src/box/schema.h
+++ b/src/box/schema.h
@@ -224,16 +224,4 @@ extern struct rlist on_alter_sequence;
  */
 extern struct rlist on_access_denied;
 
-/**
- * Context passed to on_access_denied trigger.
- */
-struct on_access_denied_ctx {
-	/** Type of declined access */
-	const char *access_type;
-	/** Type of object the required access was denied to */
-	const char *object_type;
-	/** Name of object the required access was denied to */
-	const char *object_name;
-};
-
 #endif /* INCLUDES_TARANTOOL_BOX_SCHEMA_H */
-- 
2.15.1 (Apple Git-101)





More information about the Tarantool-patches mailing list