1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Worklog#1563 - Support of on-line CREATE/DROP INDEX.

This is to enable table handlers to implement online create/drop index.
It consists of some parts:
- New default handler methods in handler.h
- Split of mysql_alter_table. It decides if only one kind of
  alteration is to be done (e.g. only create indexes or only drop
  indexes etc.) It then calls the specialized new handler method if
  the handler implements it. Otherwise it calls real_alter_table.
- The parser sets flags for each alter operation detected in a
  command. These are used by mysql_alter_table for the decision.
- mysql_prepare_table is pulled out of mysql_create_table. This is
  also used by mysql_create_index to prepare the key structure array
  for the handler. It is also used by mysql_create_index and
  mysql_drop_index to prepare a call to mysql_create_frm.
- mysql_create_frm is pulled out of rea_create_table for use by
  mysql_create_index and mysql_drop_index after the index is
  created/dropped.
Thanks to Antony who supplied most of the changes.
This commit is contained in:
ingo@mysql.com
2004-03-30 19:22:14 +02:00
parent 6a636a4d07
commit 85ec87a094
8 changed files with 538 additions and 125 deletions

View File

@ -2355,6 +2355,7 @@ mysql_execute_command(THD *thd)
lex->key_list, lex->drop_list, lex->alter_list,
select_lex->order_list.elements,
(ORDER *) select_lex->order_list.first,
lex->alter_flags,
lex->duplicates,
lex->alter_keys_onoff,
lex->tablespace_op,
@ -2503,7 +2504,7 @@ mysql_execute_command(THD *thd)
res= mysql_alter_table(thd, NullS, NullS, &create_info,
tables, lex->create_list,
lex->key_list, lex->drop_list, lex->alter_list,
0, (ORDER *) 0,
0, (ORDER *) 0, 0,
DUP_ERROR);
}
else