1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2002-06-04 00:40:27 +03:00
parent 7cb2e2d1dc
commit a7798dfd0a
15 changed files with 83 additions and 55 deletions

View File

@ -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))