]> git.pld-linux.org Git - packages/mysql.git/blobdiff - control_online_alter_index.patch
master-{user,host,port,password} no longer settable from mysqld.conf
[packages/mysql.git] / control_online_alter_index.patch
index 4ec210914e396ec0288d88251e8b524a185d93aa..29c005167f750be3323594eb9130eb7e7ff673ba 100644 (file)
@@ -5,33 +5,20 @@
 #!!! notice !!!
 # Any small change to this file in the main branch
 # should be done or reviewed by the maintainer!
-diff -ruN a/sql/handler.h b/sql/handler.h
---- a/sql/handler.h    2010-11-03 07:01:14.000000000 +0900
-+++ b/sql/handler.h    2010-12-03 13:51:04.727293058 +0900
-@@ -194,6 +194,19 @@
- #define HA_ONLINE_DROP_UNIQUE_INDEX             (1L << 9) /*drop uniq. online*/
- #define HA_ONLINE_ADD_PK_INDEX                  (1L << 10)/*add prim. online*/
- #define HA_ONLINE_DROP_PK_INDEX                 (1L << 11)/*drop prim. online*/
+--- a/sql/handler.h
++++ b/sql/handler.h
+@@ -206,6 +206,8 @@
+ #define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE      (1L << 9)
+ #define HA_INPLACE_ADD_PK_INDEX_NO_WRITE           (1L << 10)
+ #define HA_INPLACE_DROP_PK_INDEX_NO_WRITE          (1L << 11)
 +
-+#define HA_ONLINE_ALTER_INDEX_MASK    (HA_ONLINE_ADD_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_DROP_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_ADD_PK_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_DROP_PK_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_ADD_INDEX \
-+                                              | HA_ONLINE_DROP_INDEX \
-+                                              | HA_ONLINE_ADD_UNIQUE_INDEX \
-+                                              | HA_ONLINE_DROP_UNIQUE_INDEX \
-+                                              | HA_ONLINE_ADD_PK_INDEX \
-+                                              | HA_ONLINE_DROP_PK_INDEX)
++#define HA_INPLACE_ALTER_INDEX_MASK                ((1L << 12) - 1)
  /*
    HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is
    supported at all.
-diff -ruN a/sql/sql_class.h b/sql/sql_class.h
---- a/sql/sql_class.h  2010-12-02 20:31:56.200956501 +0900
-+++ b/sql/sql_class.h  2010-12-03 13:51:04.744953174 +0900
-@@ -481,6 +481,8 @@
+--- a/sql/sql_class.h
++++ b/sql/sql_class.h
+@@ -479,6 +479,8 @@
    my_bool engine_condition_pushdown;
    my_bool keep_files_on_create;
  
@@ -40,10 +27,9 @@ diff -ruN a/sql/sql_class.h b/sql/sql_class.h
    my_bool old_alter_table;
    my_bool old_passwords;
    my_bool big_tables;
-diff -ruN a/sql/sql_partition.cc b/sql/sql_partition.cc
---- a/sql/sql_partition.cc     2010-11-03 07:01:14.000000000 +0900
-+++ b/sql/sql_partition.cc     2010-12-03 13:59:56.444039002 +0900
-@@ -4636,7 +4636,12 @@
+--- a/sql/sql_partition.cc
++++ b/sql/sql_partition.cc
+@@ -4637,7 +4637,12 @@
          alter_info->num_parts= curr_part_no - new_part_no;
        }
      }
@@ -51,30 +37,28 @@ diff -ruN a/sql/sql_partition.cc b/sql/sql_partition.cc
 +    flags= new_table->file->alter_table_flags(alter_info->flags);
 +    if (!thd->variables.online_alter_index)
 +    {
-+      flags&= ~((uint)HA_ONLINE_ALTER_INDEX_MASK);
++      flags&= ~((uint)HA_INPLACE_ALTER_INDEX_MASK);
 +    }
 +    if (!flags)
      {
        my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0));
        goto err;
-diff -ruN a/sql/sql_table.cc b/sql/sql_table.cc
---- a/sql/sql_table.cc 2010-11-03 07:01:14.000000000 +0900
-+++ b/sql/sql_table.cc 2010-12-03 13:51:04.768955495 +0900
-@@ -6117,6 +6117,10 @@
+--- a/sql/sql_table.cc
++++ b/sql/sql_table.cc
+@@ -6146,6 +6146,10 @@
      uint  *idx_end_p;
  
      alter_flags= table->file->alter_table_flags(alter_info->flags);
 +    if (!thd->variables.online_alter_index)
 +    {
-+      alter_flags&= ~((ulong)HA_ONLINE_ALTER_INDEX_MASK);
++      alter_flags&= ~((ulong)HA_INPLACE_ALTER_INDEX_MASK);
 +    }
      DBUG_PRINT("info", ("alter_flags: %lu", alter_flags));
      /* Check dropped indexes. */
      for (idx_p= index_drop_buffer, idx_end_p= idx_p + index_drop_count;
-diff -ruN a/sql/sys_vars.cc b/sql/sys_vars.cc
---- a/sql/sys_vars.cc  2010-12-02 21:23:05.569356468 +0900
-+++ b/sql/sys_vars.cc  2010-12-03 14:05:28.857356603 +0900
-@@ -2140,6 +2140,13 @@
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -2265,6 +2265,13 @@
         GLOBAL_VAR(opt_optimizer_fix),
         NO_CMD_LINE, DEFAULT(TRUE));
  
This page took 0.031329 seconds and 4 git commands to generate.