1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -97,7 +97,7 @@
Note: the following includes binlog and closing 0.
so: innodb+bdb+ndb+binlog+0
*/
#define MAX_HA 5
#define MAX_HA 6
/*
Bits in index_ddl_flags(KEY *wanted_index)
@ -217,11 +217,13 @@ struct xid_t {
bool eq(long g, long b, const char *d)
{ return g == gtrid_length && b == bqual_length && !memcmp(d, data, g+b); }
void set(LEX_STRING *l) { set(l->length, 0, l->str); }
void set(ulonglong l)
void set(ulonglong xid)
{
my_xid tmp;
set(MYSQL_XID_PREFIX_LEN, 0, MYSQL_XID_PREFIX);
*(ulong*)(data+MYSQL_XID_PREFIX_LEN)=server_id;
*(my_xid*)(data+MYSQL_XID_OFFSET)=l;
memcpy(data+MYSQL_XID_PREFIX_LEN, &server_id, sizeof(server_id));
tmp= xid;
memcpy(data+MYSQL_XID_OFFSET, &tmp, sizeof(tmp));
gtrid_length=MYSQL_XID_GTRID_LEN;
}
void set(long g, long b, const char *d)
@ -235,7 +237,9 @@ struct xid_t {
void null() { formatID= -1; }
my_xid quick_get_my_xid()
{
return *(my_xid*)(data+MYSQL_XID_OFFSET);
my_xid tmp;
memcpy(&tmp, data+MYSQL_XID_OFFSET, sizeof(tmp));
return tmp;
}
my_xid get_my_xid()
{