diff options
author | unknown <monty@tramp.mysql.fi> | 2001-10-29 10:49:35 +0200 |
---|---|---|
committer | unknown <monty@tramp.mysql.fi> | 2001-10-29 10:49:35 +0200 |
commit | b3a974963dee53187668e9f467310069b4a67fcc (patch) | |
tree | fc5532fe3c9a3bc29a1e71b5db41e1b702f4980a /sql/sql_table.cc | |
parent | 440de598ee325364b89468c8bd66925956b0e66f (diff) | |
download | mariadb-git-b3a974963dee53187668e9f467310069b4a67fcc.tar.gz |
Fixed error message when opening a not-MyISAM file.
Extended MODIFY and CHANGE in ALTER TABLE to accept the AFTER keyword.
Extended MyISAM to handle records > 16M.
Docs/manual.texi:
Updated state of different modules.
Rewrote description of 'perror' and 'Packet too large'.
myisam/mi_dynrec.c:
Extended MyISAM to handle records > 16M
myisam/mi_open.c:
Fix error message when opening a not-MyISAM file.
myisam/myisamdef.h:
Extended MyISAM to handle records > 16M
mysql-test/r/alter_table.result:
Added test for CHANGE col ... AFTER
mysql-test/t/alter_table.test:
Added test for CHANGE col ... AFTER
sql/sql_table.cc:
Extended MODIFY and CHANGE in ALTER TABLE to accept the AFTER keyword.
sql/sql_yacc.yy:
Extended MODIFY and CHANGE in ALTER TABLE to accept the AFTER keyword.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index d76c6bbd627..2a1be2e525c 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1273,8 +1273,11 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, def->field=field; if (def->sql_type == FIELD_TYPE_TIMESTAMP) use_timestamp=1; - create_list.push_back(def); - def_it.remove(); + if (!def->after) + { + create_list.push_back(def); + def_it.remove(); + } } else { // Use old field value @@ -1305,7 +1308,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, List_iterator<create_field> find_it(create_list); while ((def=def_it++)) // Add new columns { - if (def->change) + if (def->change && ! def->field) { my_error(ER_BAD_FIELD_ERROR,MYF(0),def->change,table_name); DBUG_RETURN(-1); |