Commit 9ea64d69 authored by Sergey Petrunya's avatar Sergey Petrunya

Post-merge fixes part 1

parent 8d73ec2d
......@@ -219,7 +219,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error);
#endif
#else
#ifdef HAVE_LONG_LONG
extern char *longlong2str(longlong val,char *dst,int radix, int upcase);
extern char *longlong2str(longlong val,char *dst,int radix, int upcase);
extern char *longlong10_to_str(longlong val,char *dst,int radix);
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
extern longlong strtoll(const char *str, char **ptr, int base);
......
......@@ -28,7 +28,7 @@
const String my_null_string("NULL", 4, default_charset_info);
static int save_field_in_field(Field *from, my_bool *null_value,
static int save_field_in_field(Field *from, bool *null_value,
Field *to, bool no_conversions);
/****************************************************************************/
......@@ -5192,7 +5192,7 @@ void Item_field::make_field(Send_field *tmp_field)
*/
static int save_field_in_field(Field *from, my_bool *null_value,
static int save_field_in_field(Field *from, bool *null_value,
Field *to, bool no_conversions)
{
int res;
......
......@@ -245,8 +245,7 @@ uint sel_arg_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
if (!(cur->min_key_flag & ~NULL_RANGE) && !cur->max_key_flag &&
(uint)key_tree->part+1 == seq->param->table->key_info[seq->real_keyno].key_parts &&
(seq->param->table->key_info[seq->real_keyno].flags & (HA_NOSAME | HA_END_SPACE_KEY)) ==
HA_NOSAME &&
(seq->param->table->key_info[seq->real_keyno].flags & HA_NOSAME) &&
range->start_key.length == range->end_key.length &&
!memcmp(seq->param->min_key,seq->param->max_key,range->start_key.length))
range->range_flag= UNIQUE_RANGE | (cur->min_key_flag & NULL_RANGE);
......@@ -323,24 +322,8 @@ uint quick_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
return 1; /* no more ranges */
QUICK_RANGE *cur= *(ctx->cur);
key_range *start_key= &range->start_key;
key_range *end_key= &range->end_key;
start_key->key= cur->min_key;
start_key->length= cur->min_length;
start_key->keypart_map= cur->min_keypart_map;
start_key->flag= ((cur->flag & NEAR_MIN) ? HA_READ_AFTER_KEY :
(cur->flag & EQ_RANGE) ?
HA_READ_KEY_EXACT : HA_READ_KEY_OR_NEXT);
end_key->key= cur->max_key;
end_key->length= cur->max_length;
end_key->keypart_map= cur->max_keypart_map;
/*
We use HA_READ_AFTER_KEY here because if we are reading on a key
prefix. We want to find all keys with this prefix.
*/
end_key->flag= (cur->flag & NEAR_MAX ? HA_READ_BEFORE_KEY :
HA_READ_AFTER_KEY);
cur->make_min_endpoint(&range->start_key);
cur->make_max_endpoint(&range->end_key);
range->range_flag= cur->flag;
ctx->cur++;
return 0;
......
......@@ -1335,7 +1335,7 @@ bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables)
key= keyuse->key;
KEY *keyinfo= table->key_info + key;
key_part_map bound_parts= 0;
if ((keyinfo->flags & (HA_NOSAME | HA_END_SPACE_KEY)) == HA_NOSAME)
if (keyinfo->flags & HA_NOSAME)
{
do /* For all equalities on all key parts */
{
......
......@@ -1800,7 +1800,7 @@ enum_nested_loop_state JOIN_CACHE_BNL::join_matching_records(bool skip_last)
int err= 0;
if (rc == NESTED_LOOP_OK)
update_virtual_fields(join_tab->table);
update_virtual_fields(join->thd, join_tab->table);
/*
Do not look for matches if the last read record of the joined table
......@@ -2321,7 +2321,7 @@ enum_nested_loop_state JOIN_CACHE_BKA::join_matching_records(bool skip_last)
(!check_only_first_match || !get_match_flag_by_pos(rec_ptr)))
{
get_record_by_pos(rec_ptr);
update_virtual_fields(join_tab->table);
update_virtual_fields(join->thd, join_tab->table);
rc= generate_full_extensions(rec_ptr);
if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS)
goto finish;
......@@ -3209,7 +3209,7 @@ JOIN_CACHE_BKA_UNIQUE::join_matching_records(bool skip_last)
(!check_only_first_match || !get_match_flag_by_pos(rec_ptr)))
{
get_record_by_pos(rec_ptr);
update_virtual_fields(join_tab->table);
update_virtual_fields(join->thd, join_tab->table);
rc= generate_full_extensions(rec_ptr);
if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS)
goto finish;
......
......@@ -30,7 +30,7 @@
#include "procedure.h"
#include <myisam.h>
#if defined(WITH_MARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)
#if defined(WITH_ARIA_STORAGE_ENGINE) && defined(USE_MARIA_FOR_TMP_TABLES)
#include "../storage/maria/ha_maria.h"
#define TMP_ENGINE_HTON maria_hton
#else
......
......@@ -238,7 +238,7 @@ void print_keyuse(KEYUSE *keyuse)
fieldname= "FT_KEYPART";
else
fieldname= keyuse->table->key_info[keyuse->key].key_part[keyuse->keypart].field->field_name;
longlong2str(keyuse->used_tables, buf2, 16);
longlong2str(keyuse->used_tables, buf2, 16, 0);
DBUG_LOCK_FILE;
fprintf(DBUG_FILE, "KEYUSE: %s.%s=%s optimize= %d used_tables=%s "
"ref_table_rows= %lu keypart_map= %0lx\n",
......
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