mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked) This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
This commit is contained in:
@@ -286,17 +286,18 @@ inline static void list_include(CHANGED_TABLE_LIST** prev,
|
||||
}
|
||||
|
||||
/* add table to list of changed in transaction tables */
|
||||
|
||||
void THD::add_changed_table(TABLE *table)
|
||||
{
|
||||
DBUG_ENTER("THD::add_changed_table (table)");
|
||||
DBUG_ENTER("THD::add_changed_table(table)");
|
||||
|
||||
DBUG_ASSERT((options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)) &&
|
||||
table->file->has_transactions());
|
||||
table->file->has_transactions());
|
||||
|
||||
CHANGED_TABLE_LIST** prev = &transaction.changed_tables;
|
||||
CHANGED_TABLE_LIST* curr = transaction.changed_tables;
|
||||
|
||||
for(; curr; prev = &(curr->next), curr = curr->next)
|
||||
for (; curr; prev = &(curr->next), curr = curr->next)
|
||||
{
|
||||
int cmp = (long)curr->key_length - (long)table->key_length;
|
||||
if (cmp < 0)
|
||||
@@ -313,7 +314,8 @@ void THD::add_changed_table(TABLE *table)
|
||||
{
|
||||
list_include(prev, curr, changed_table_dup(table));
|
||||
DBUG_PRINT("info",
|
||||
("key_length %u %u", table->key_length, (*prev)->key_length));
|
||||
("key_length %u %u", table->key_length,
|
||||
(*prev)->key_length));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
else if (cmp == 0)
|
||||
@@ -324,10 +326,12 @@ void THD::add_changed_table(TABLE *table)
|
||||
}
|
||||
}
|
||||
*prev = changed_table_dup(table);
|
||||
DBUG_PRINT("info", ("key_length %u %u", table->key_length, (*prev)->key_length));
|
||||
DBUG_PRINT("info", ("key_length %u %u", table->key_length,
|
||||
(*prev)->key_length));
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
CHANGED_TABLE_LIST* THD::changed_table_dup(TABLE *table)
|
||||
{
|
||||
CHANGED_TABLE_LIST* new_table =
|
||||
@@ -603,7 +607,7 @@ bool select_export::send_data(List<Item> &items)
|
||||
bfill(space,sizeof(space),' ');
|
||||
}
|
||||
uint length=item->max_length-used_length;
|
||||
for ( ; length > sizeof(space) ; length-=sizeof(space))
|
||||
for (; length > sizeof(space) ; length-=sizeof(space))
|
||||
{
|
||||
if (my_b_write(&cache,(byte*) space,sizeof(space)))
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user