Commit 17785f63 authored by unknown's avatar unknown

Post-merge fixes.

Not finished, will not be pushed until additional fixes have been made.


client/mysqlbinlog.cc:
  Post-merge fixes.
mysql-test/r/func_time.result:
  Post-merge fixes.
sql/opt_range.cc:
  Post-merge fixes.
sql/sql_select.cc:
  Post-merge fixes.
parent f8866c16
No related merge requests found
......@@ -779,6 +779,7 @@ could be out of memory");
len - 1, &error,
description_event);
if (!ev)
{
fprintf(stderr, "Could not construct log event object\n");
DBUG_RETURN(1);
}
......@@ -819,6 +820,29 @@ could be out of memory");
}
if (process_event(&rec_count,&last_event_info,ev,old_off))
DBUG_RETURN(1);
}
else
{
Load_log_event *le= (Load_log_event*)ev;
const char *old_fname= le->fname;
uint old_len= le->fname_len;
File file;
if ((file= load_processor.prepare_new_file_for_old_format(le,fname)) < 0)
DBUG_RETURN(1);
if (process_event(&rec_count,&last_event_info,ev,old_off))
{
my_close(file,MYF(MY_WME));
DBUG_RETURN(1);
}
if (load_processor.load_old_format_file(net,old_fname,old_len,file))
{
my_close(file,MYF(MY_WME));
DBUG_RETURN(1);
}
my_close(file,MYF(MY_WME));
}
/*
Let's adjust offset for remote log as for local log to produce
similar text. As we don't print the fake Rotate event, all events are
......
......@@ -656,4 +656,4 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select high_priority timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
Note 1003 select timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
......@@ -662,6 +662,7 @@ QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr,
int QUICK_RANGE_SELECT::init()
{
key_part_info= head->key_info[index].key_part;
return (error= file->index_init(index));
}
......@@ -2154,7 +2155,7 @@ tree_or(PARAM *param,SEL_TREE *tree1,SEL_TREE *tree2)
{
/* one tree is index merge tree and another is range tree */
if (tree1->merges.is_empty())
swap(SEL_TREE*, tree1, tree2);
swap_variables(SEL_TREE*, tree1, tree2);
/* add tree2 to tree1->merges, checking if it collapses to ALWAYS */
if (imerge_list_or_tree(param, &tree1->merges, tree2))
......
......@@ -3374,7 +3374,7 @@ greedy_search(JOIN *join,
pos= join->best_ref[++best_idx];
DBUG_ASSERT((pos != NULL)); // should always find 'best_table'
/* move 'best_table' at the first free position in the array of joins */
swap(JOIN_TAB*, join->best_ref[idx], join->best_ref[best_idx]);
swap_variables(JOIN_TAB*, join->best_ref[idx], join->best_ref[best_idx]);
/* compute the cost of the new plan extended with 'best_table' */
record_count*= join->positions[idx].records_read;
......@@ -3580,7 +3580,7 @@ best_extension_by_limited_search(JOIN *join,
if ( (search_depth > 1) && (remaining_tables & ~real_table_bit) )
{ /* Recursively expand the current partial plan */
swap(JOIN_TAB*, join->best_ref[idx], *pos);
swap_variables(JOIN_TAB*, join->best_ref[idx], *pos);
best_extension_by_limited_search(join,
remaining_tables & ~real_table_bit,
idx + 1,
......@@ -3590,7 +3590,7 @@ best_extension_by_limited_search(JOIN *join,
prune_level);
if (thd->killed)
DBUG_VOID_RETURN;
swap(JOIN_TAB*, join->best_ref[idx], *pos);
swap_variables(JOIN_TAB*, join->best_ref[idx], *pos);
}
else
{ /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment