diff options
author | unknown <monty@hundin.mysql.fi> | 2002-06-04 00:40:27 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-06-04 00:40:27 +0300 |
commit | a7798dfd0a6472bf65fffc2ade543605e177ff9c (patch) | |
tree | 675836bfd2d520dcffdb4499ac8cf51045c407f2 /sql/sql_table.cc | |
parent | 7cb2e2d1dce2c7466388f4a6ade0614564be82fc (diff) | |
download | mariadb-git-a7798dfd0a6472bf65fffc2ade543605e177ff9c.tar.gz |
Enable LOAD DATA LOCAL INFILE in mysql_test
Added syntax for column comments (for compability with 4.1)
Fix of ALTER TABLE RENAME
Docs/manual.texi:
Changelog
client/mysqltest.c:
Enable LOAD DATA LOCAL INFILE
mysql-test/r/alter_table.result:
Test of syntax for column comments
mysql-test/r/func_math.result:
Fixed test of new truncate
mysql-test/t/alter_table.test:
Test of syntax for column comments
mysys/my_gethostbyname.c:
Portability fix
sql/hostname.cc:
Fixed pointer bug
sql/item_cmpfunc.cc:
Optimizing LIKE code
sql/item_cmpfunc.h:
Cleanup
sql/mysqld.cc:
Avoid warning of duplicate calls to mysql_thread_init()
sql/sql_analyse.cc:
Removed warning from DBUG
sql/sql_parse.cc:
Avoid warning of duplicate calls to mysql_thread_init()
sql/sql_table.cc:
Fix of ALTER TABLE RENAME
sql/sql_yacc.yy:
Added syntax for field comments
vio/test-sslserver.c:
Cleanup
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 64a55380b69..fe66b14d697 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1235,7 +1235,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, thd->proc_info="init"; table_name=table_list->real_name; db=table_list->db; - if (!new_db) + if (!new_db || !strcmp(new_db,db)) new_db=db; used_fields=create_info->used_fields; @@ -1289,10 +1289,10 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, /* In some simple cases we need not to recreate the table */ thd->proc_info="setup"; - if (simple_alter) + if (simple_alter && !table->tmp_table) { error=0; - if (new_name != table_name) + if (new_name != table_name || new_db != db) { thd->proc_info="rename"; VOID(pthread_mutex_lock(&LOCK_open)); @@ -1315,15 +1315,15 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, } if (!error) { - switch (keys_onoff) - { - case LEAVE_AS_IS: break; - case ENABLE: - error=table->file->activate_all_index(thd); - break; - case DISABLE: - table->file->deactivate_non_unique_index(HA_POS_ERROR); - break; + switch (keys_onoff) { + case LEAVE_AS_IS: + break; + case ENABLE: + error=table->file->activate_all_index(thd); + break; + case DISABLE: + table->file->deactivate_non_unique_index(HA_POS_ERROR); + break; } } if (!error) @@ -1720,7 +1720,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, thd->proc_info="rename result table"; sprintf(old_name,"%s2-%lx-%lx", tmp_file_prefix, current_pid, thd->thread_id); - if (new_name != table_name) + if (new_name != table_name || new_db != db) { if (!access(new_name_buff,F_OK)) { @@ -1738,7 +1738,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, { /* Win32 and InnoDB can't drop a table that is in use, so we must - close all the original table at before doing the rename + close the original table at before doing the rename */ table_name=thd->strdup(table_name); // must be saved if (close_cached_table(thd,table)) |