~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_class.cc

  • Committer: Brian Aker
  • Date: 2008-08-18 22:20:43 UTC
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818222043-et6zf93ogrgx1cz9
Refactoring table.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
1043
1043
 
1044
1044
/* routings to adding tables to list of changed in transaction tables */
1045
1045
 
1046
 
inline static void list_include(CHANGED_TABLE_LIST** prev,
1047
 
                                CHANGED_TABLE_LIST* curr,
1048
 
                                CHANGED_TABLE_LIST* new_table)
 
1046
inline static void list_include(CHANGED_TableList** prev,
 
1047
                                CHANGED_TableList* curr,
 
1048
                                CHANGED_TableList* new_table)
1049
1049
{
1050
1050
  if (new_table)
1051
1051
  {
1068
1068
 
1069
1069
void THD::add_changed_table(const char *key, long key_length)
1070
1070
{
1071
 
  CHANGED_TABLE_LIST **prev_changed = &transaction.changed_tables;
1072
 
  CHANGED_TABLE_LIST *curr = transaction.changed_tables;
 
1071
  CHANGED_TableList **prev_changed = &transaction.changed_tables;
 
1072
  CHANGED_TableList *curr = transaction.changed_tables;
1073
1073
 
1074
1074
  for (; curr; prev_changed = &(curr->next), curr = curr->next)
1075
1075
  {
1098
1098
}
1099
1099
 
1100
1100
 
1101
 
CHANGED_TABLE_LIST* THD::changed_table_dup(const char *key, long key_length)
 
1101
CHANGED_TableList* THD::changed_table_dup(const char *key, long key_length)
1102
1102
{
1103
 
  CHANGED_TABLE_LIST* new_table = 
1104
 
    (CHANGED_TABLE_LIST*) trans_alloc(ALIGN_SIZE(sizeof(CHANGED_TABLE_LIST))+
 
1103
  CHANGED_TableList* new_table = 
 
1104
    (CHANGED_TableList*) trans_alloc(ALIGN_SIZE(sizeof(CHANGED_TableList))+
1105
1105
                                      key_length + 1);
1106
1106
  if (!new_table)
1107
1107
  {
1108
1108
    my_error(EE_OUTOFMEMORY, MYF(ME_BELL),
1109
 
             ALIGN_SIZE(sizeof(TABLE_LIST)) + key_length + 1);
 
1109
             ALIGN_SIZE(sizeof(TableList)) + key_length + 1);
1110
1110
    killed= KILL_CONNECTION;
1111
1111
    return 0;
1112
1112
  }
1113
1113
 
1114
 
  new_table->key= ((char*)new_table)+ ALIGN_SIZE(sizeof(CHANGED_TABLE_LIST));
 
1114
  new_table->key= ((char*)new_table)+ ALIGN_SIZE(sizeof(CHANGED_TableList));
1115
1115
  new_table->next = 0;
1116
1116
  new_table->key_length = key_length;
1117
1117
  ::memcpy(new_table->key, key, key_length);