diff options
author | ingo@mysql.com <> | 2004-03-30 19:22:14 +0200 |
---|---|---|
committer | ingo@mysql.com <> | 2004-03-30 19:22:14 +0200 |
commit | 85ec87a09445906dc1273c614434b1de5d2b5bea (patch) | |
tree | 1aadd9023a8717250c99b8a10791977beac9c8eb /sql/sql_parse.cc | |
parent | 6a636a4d07a90c29ab7b47dca557124df6dee9fd (diff) | |
download | mariadb-git-85ec87a09445906dc1273c614434b1de5d2b5bea.tar.gz |
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.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7e6d0ca2434..9951cf06d91 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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 |