diff options
author | unknown <pem@mysql.comhem.se> | 2004-06-03 19:36:36 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-06-03 19:36:36 +0200 |
commit | 17785f6344a91fc30f6f12cfe411f1250908a4b6 (patch) | |
tree | bcc235cfd06ccfe62148d746e53019bd12352ddb | |
parent | f8866c162b57fa102298dbfc9e49d4f72f16c1d7 (diff) | |
download | mariadb-git-17785f6344a91fc30f6f12cfe411f1250908a4b6.tar.gz |
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.
-rw-r--r-- | client/mysqlbinlog.cc | 24 | ||||
-rw-r--r-- | mysql-test/r/func_time.result | 2 | ||||
-rw-r--r-- | sql/opt_range.cc | 3 | ||||
-rw-r--r-- | sql/sql_select.cc | 6 |
4 files changed, 30 insertions, 5 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 41d1ac883f0..1d042f1a9a1 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -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 diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index e73f300bb50..c0c2a29772b 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -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` diff --git a/sql/opt_range.cc b/sql/opt_range.cc index b29fc30b9c5..0ce6901897a 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -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)) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index dd5bbc01d44..3b027788ce8 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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 { /* |