smarter ALTER TABLE - don't copy the table if only comment or default values are changed

sql/handler.cc:
  do not delete the table in the "unkonwn" handler (makes no sense anyway)
sql/handler.h:
  more HA_CREATE_USED flags
sql/sql_lex.h:
  more ALTER_ flags, no alter_info->is_simple anymore
sql/sql_parse.cc:
  no alter_info->is_simple anymore
sql/sql_table.cc:
  do not rename the table in the "unkonwn" handler (makes no sense anyway)
  smarter ALTER TABLE - don't copy the table if only comment or default values are changed
sql/sql_yacc.yy:
  specify what ALTER is todo with flags, not alter_info->is_simple
sql/unireg.cc:
  create frm only (but not in the handler) if requested
This commit is contained in:
unknown 2004-10-21 18:10:58 +02:00
commit a01f45e59d
7 changed files with 151 additions and 114 deletions

View file

@ -199,7 +199,7 @@ err3:
keys number of keys to create
key_info Keys to create
db_file Handler to use. May be zero, in which case we use
create_info->db_type
create_info->db_type
RETURN
0 ok
1 error
@ -213,11 +213,11 @@ int rea_create_table(THD *thd, my_string file_name,
DBUG_ENTER("rea_create_table");
if (mysql_create_frm(thd, file_name, create_info,
create_fields, keys, key_info, NULL))
create_fields, keys, key_info, NULL))
DBUG_RETURN(1);
if (ha_create_table(file_name,create_info,0))
if (!create_info->frm_only && ha_create_table(file_name,create_info,0))
{
my_delete(file_name,MYF(0));
my_delete(file_name,MYF(0));
DBUG_RETURN(1);
}
DBUG_RETURN(0);