summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2020-04-26 15:42:57 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2020-05-06 17:19:58 +0530
commit4539d3ea77fc5fde63f515a97bc679afd7b614c7 (patch)
tree4d3381ab3e1330af957b66541adccd388d8d0b73 /sql/sql_class.h
parent8ad3c6154b90314980faf1cdd4c317c9bbf5f84c (diff)
downloadmariadb-git-bb-10.5-mdev7317.tar.gz
MDEV-7317: Make an index ignorable to the optimizerbb-10.5-mdev7317
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 1069b49790a..8d01566d8c3 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -373,6 +373,29 @@ public:
};
+/* An ALTER INDEX operation that changes the ignorability of an index. */
+class Alter_index_ignorability: public Sql_alloc
+{
+public:
+ Alter_index_ignorability(const char *name, bool is_ignored) :
+ m_name(name), m_is_ignored(is_ignored)
+ {
+ assert(name != NULL);
+ }
+
+ const char *name() const { return m_name; }
+
+ /* The ignorability after the operation is performed. */
+ bool is_ignored() const { return m_is_ignored; }
+ Alter_index_ignorability *clone(MEM_ROOT *mem_root) const
+ { return new (mem_root) Alter_index_ignorability(*this); }
+
+private:
+ const char *m_name;
+ bool m_is_ignored;
+};
+
+
class Key :public Sql_alloc, public DDL_options {
public:
enum Keytype { PRIMARY, UNIQUE, MULTIPLE, FULLTEXT, SPATIAL, FOREIGN_KEY};