summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authoringo@mysql.com <>2004-04-07 14:56:24 +0200
committeringo@mysql.com <>2004-04-07 14:56:24 +0200
commit4de7e18b81144967af0575668062bee9a8617646 (patch)
treed67591428ccd76b55914906b3a2c65c7a878c8b9 /sql/handler.h
parent61fd95d168b51092b7ce3ff56b2c8c8ed1a49c0f (diff)
parent376f252659658e023002a3d6e371bc30d5e2df5d (diff)
downloadmariadb-git-4de7e18b81144967af0575668062bee9a8617646.tar.gz
Hand-resolved auto merge
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 26fb762a9b5..d494aa3e89c 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -90,6 +90,20 @@
#define HA_NOT_READ_PREFIX_LAST 32 /* No support for index_read_last() */
#define HA_KEY_READ_ONLY 64 /* Support HA_EXTRA_KEYREAD */
+
+/*
+ Bits in index_ddl_flags(KEY *wanted_index)
+ for what ddl you can do with index
+ If none is set, the wanted type of index is not supported
+ by the handler at all. See WorkLog 1563.
+*/
+#define HA_DDL_SUPPORT 1 /* Supported by handler */
+#define HA_DDL_WITH_LOCK 2 /* Can create/drop with locked table */
+#define HA_DDL_ONLINE 4 /* Can create/drop without lock */
+
+/* Return value for ddl methods */
+#define HA_DDL_NOT_IMPLEMENTED -1
+
/*
Parameters for open() (in register form->filestat)
HA_GET_INFO does an implicit HA_ABORT_IF_LOCKED
@@ -355,6 +369,20 @@ public:
{
return (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_KEY_READ_ONLY);
}
+ virtual ulong index_ddl_flags(KEY *wanted_index) const
+ {
+ return (HA_DDL_SUPPORT);
+ }
+ virtual int add_index(TABLE *table, KEY *key_info, uint num_of_keys)
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "online add index");
+ return (HA_DDL_NOT_IMPLEMENTED);
+ }
+ virtual int drop_index(TABLE *table, uint *key_num, uint num_of_keys)
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "online drop index");
+ return (HA_DDL_NOT_IMPLEMENTED);
+ }
virtual uint max_record_length() const =0;
virtual uint max_keys() const =0;
virtual uint max_key_parts() const =0;