1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Review of new pushed code (XA & other)

Portability fixes and cleanups
Fixed setting of 'res' in mysql_execute_command()


sql/handler.cc:
  delete_table() will not return error for not found files if one handler file was found and deleted
sql/handler.h:
  Incremented MAX_HA so that ndb works again
  Don't convert char pointer to (my_xid*) as we don't know if the address is aligned on 8
sql/log.cc:
  Indentation fixes
  Simplified loop to find next log
  Fixed race condition in reset_logs that caused mix_innodb_myisam_binlog to fail
sql/log_event.cc:
  Don't convert char pointer to (my_xid*) as we don't know if the address is aligned on 8
sql/sql_acl.cc:
  Convert db name directly to avoid extra strmov
sql/sql_base.cc:
  Added comment
  Removed not needed code
sql/sql_db.cc:
  Added comment
  Remove not needed code
sql/sql_parse.cc:
  Always call mysql_rm_db() with lower case db name
  Ensure that 'res' is set correctly in mysql_execute_command()
  (One don't have to set res if one calls my_error() and res should be = 0 for correct commands)
sql/sql_repl.cc:
  Indentation fixes
  use packet->ptr() instead of packet->c_ptr()
sql/sql_table.cc:
  Join similar code when table didn't exist in engine
This commit is contained in:
unknown
2005-02-21 14:47:57 +02:00
parent da4604f9e8
commit d50af8aece
10 changed files with 146 additions and 138 deletions

View File

@ -1494,16 +1494,38 @@ uint handler::get_dup_key(int error)
}
/*
Delete all files with extension from bas_ext()
SYNOPSIS
delete_table()
name Base name of table
NOTES
We assume that the handler may return more extensions than
was actually used for the file.
RETURN
0 If we successfully deleted at least one file from base_ext and
didn't get any other errors than ENOENT
# Error from delete_file()
*/
int handler::delete_table(const char *name)
{
int error=0;
int error= 0;
int enoent_or_zero= ENOENT; // Error if no file was deleted
for (const char **ext=bas_ext(); *ext ; ext++)
{
if (delete_file(name,*ext,2))
{
if ((error=errno) != ENOENT)
if ((error= my_errno) != ENOENT)
break;
}
else
enoent_or_zero= 0;
error= enoent_or_zero;
}
return error;
}