summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-05-20 14:57:29 +0200
committerSergei Golubchik <sergii@pisem.net>2012-05-20 14:57:29 +0200
commit7f6f53a8df10c76f93848c8d06bc5af71051c525 (patch)
tree9a539823cdf05f53574fdf91941b3a242025acba /sql/ha_partition.cc
parent0e7e724d6b36b2f5b8a0604171adb750d7c82c9c (diff)
parent280fcf08085e43b5359ec79c0e34166e51b3ebd8 (diff)
downloadmariadb-git-7f6f53a8df10c76f93848c8d06bc5af71051c525.tar.gz
5.2 merge
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 5363d65407b..e146680e160 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2005, 2011, Oracle and/or its affiliates.
+ Copyright (c) 2005, 2012, Oracle and/or its affiliates.
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
@@ -6541,20 +6541,20 @@ int ha_partition::add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys)
return ret;
err:
if (file > m_file)
- {
- uint *key_numbers= (uint*) ha_thd()->alloc(sizeof(uint) * num_of_keys);
- KEY *old_key_info= table_arg->key_info;
- uint i;
- /* Use the newly added key_info as table->key_info to remove them. */
- for (i= 0; i < num_of_keys; i++)
- key_numbers[i]= i;
- table_arg->key_info= key_info;
- while (--file >= m_file)
- {
- (void) (*file)->prepare_drop_index(table_arg, key_numbers, num_of_keys);
- (void) (*file)->final_drop_index(table_arg);
- }
- table_arg->key_info= old_key_info;
+ {
+ uint *key_numbers= (uint*) ha_thd()->alloc(sizeof(uint) * num_of_keys);
+ KEY *old_key_info= table_arg->key_info;
+ uint i;
+ /* Use the newly added key_info as table->key_info to remove them. */
+ for (i= 0; i < num_of_keys; i++)
+ key_numbers[i]= i;
+ table_arg->key_info= key_info;
+ while (--file >= m_file)
+ {
+ (void) (*file)->prepare_drop_index(table_arg, key_numbers, num_of_keys);
+ (void) (*file)->final_drop_index(table_arg);
+ }
+ table_arg->key_info= old_key_info;
}
return ret;
}