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

Fixed many compiler warnings

Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly
This commit is contained in:
monty@mysql.com
2004-04-05 13:56:05 +03:00
parent 99f712a30b
commit 42cf92ce37
36 changed files with 496 additions and 327 deletions

View File

@ -3608,7 +3608,6 @@ static void
make_join_readinfo(JOIN *join, uint options)
{
uint i;
SELECT_LEX *select_lex= &join->thd->lex->select_lex;
bool statistics= test(!(join->select_options & SELECT_DESCRIBE));
DBUG_ENTER("make_join_readinfo");
@ -3878,9 +3877,7 @@ JOIN::join_free(bool full)
else
{
for (tab= join_tab, end= tab+tables; tab != end; tab++)
{
tab->cleanup();
}
table= 0;
}
}
@ -4787,7 +4784,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
else
return new Field_double(item_sum->max_length,maybe_null,
item->name, table, item_sum->decimals);
case Item_sum::VARIANCE_FUNC: /* Place for sum & count */
case Item_sum::VARIANCE_FUNC: /* Place for sum & count */
case Item_sum::STD_FUNC:
if (group)
return new Field_string(sizeof(double)*2+sizeof(longlong),
@ -4815,17 +4812,19 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
default:
// This case should never be choosen
DBUG_ASSERT(0);
thd->fatal_error();
return 0;
}
}
thd->fatal_error();
return 0; // Error
/* We never come here */
}
case Item::FIELD_ITEM:
case Item::DEFAULT_VALUE_ITEM:
return create_tmp_field_from_field(thd, (*from_field=
((Item_field*) item)->field),
{
Item_field *field= (Item_field*) item;
return create_tmp_field_from_field(thd, (*from_field= field->field),
item, table, modify_item);
}
case Item::FUNC_ITEM:
case Item::COND_ITEM:
case Item::FIELD_AVG_ITEM:
@ -8543,6 +8542,23 @@ bool JOIN::alloc_func_list()
}
/*
Initialize 'sum_funcs' array with all Item_sum objects
SYNOPSIS
make_sum_func_list()
field_list All items
send_fields Items in select list
before_group_by Set to 1 if this is called before GROUP BY handling
NOTES
Calls ::setup() for all item_sum objects in field_list
RETURN
0 ok
1 error
*/
bool JOIN::make_sum_func_list(List<Item> &field_list, List<Item> &send_fields,
bool before_group_by)
{
@ -8579,7 +8595,7 @@ bool JOIN::make_sum_func_list(List<Item> &field_list, List<Item> &send_fields,
/*
Change all funcs and sum_funcs to fields in tmp table, and create
Change all funcs and sum_funcs to fields in tmp table, and create
new list of all items.
change_to_use_tmp_fields()
@ -9079,7 +9095,6 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
List<Item> field_list;
List<Item> item_list;
THD *thd=join->thd;
SELECT_LEX *select_lex= &join->thd->lex->select_lex;
select_result *result=join->result;
Item *item_null= new Item_null();
CHARSET_INFO *cs= &my_charset_latin1;