mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge with mysql-5.1.63
This commit is contained in:
@ -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
|
||||
@ -6566,20 +6566,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user