mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime
This commit is contained in:
@ -8003,9 +8003,14 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
|
||||
*/
|
||||
expr= simplify_joins(join, &nested_join->join_list,
|
||||
expr, FALSE);
|
||||
table->on_expr= expr;
|
||||
if (!table->prep_on_expr)
|
||||
|
||||
if (!table->prep_on_expr || expr != table->on_expr)
|
||||
{
|
||||
DBUG_ASSERT(expr);
|
||||
|
||||
table->on_expr= expr;
|
||||
table->prep_on_expr= expr->copy_andor_structure(join->thd);
|
||||
}
|
||||
}
|
||||
nested_join->used_tables= (table_map) 0;
|
||||
nested_join->not_null_tables=(table_map) 0;
|
||||
@ -8015,7 +8020,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(table->prep_on_expr))
|
||||
if (!table->prep_on_expr)
|
||||
table->prep_on_expr= table->on_expr;
|
||||
used_tables= table->table->map;
|
||||
if (conds)
|
||||
@ -8506,7 +8511,7 @@ remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
|
||||
if ((new_cond= new Item_func_eq(args[0],
|
||||
new Item_int("last_insert_id()",
|
||||
thd->current_insert_id,
|
||||
21))))
|
||||
MY_INT64_NUM_DECIMAL_DIGITS))))
|
||||
{
|
||||
/*
|
||||
Set THD::last_insert_id_used_bin_log manually, as this
|
||||
@ -8772,7 +8777,7 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
|
||||
break;
|
||||
case INT_RESULT:
|
||||
/* Select an integer type with the minimal fit precision */
|
||||
if (item->max_length > 11)
|
||||
if (item->max_length > MY_INT32_NUM_DECIMAL_DIGITS)
|
||||
new_field=new Field_longlong(item->max_length, maybe_null,
|
||||
item->name, table, item->unsigned_flag);
|
||||
else
|
||||
@ -14974,7 +14979,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
||||
/* Add "rows" field to item_list. */
|
||||
item_list.push_back(new Item_int((longlong) (ulonglong)
|
||||
join->best_positions[i]. records_read,
|
||||
21));
|
||||
MY_INT64_NUM_DECIMAL_DIGITS));
|
||||
/* Build "Extra" field and add it to item_list. */
|
||||
my_bool key_read=table->key_read;
|
||||
if ((tab->type == JT_NEXT || tab->type == JT_CONST) &&
|
||||
|
Reference in New Issue
Block a user