summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-10-21 18:10:58 +0200
committerunknown <serg@serg.mylan>2004-10-21 18:10:58 +0200
commita01f45e59d42d5edb772dd274a6300554f4ef18f (patch)
tree825a6b1fe1730a25be0913e6e04e56ec1af49e99 /sql/unireg.cc
parent00bbd9a252553782627042b1a642233f5effc867 (diff)
downloadmariadb-git-a01f45e59d42d5edb772dd274a6300554f4ef18f.tar.gz
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
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 2a6abdb1cfd..decac2a0549 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -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);