Below is the list of changes that have just been committed into a local
5.2 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-27 23:15:29+04:00, sergefp@stripped +11 -0
WL#2475: Manual merge 2, step 3
sql/ha_ndbcluster.cc@stripped, 2007-06-27 23:15:24+04:00, sergefp@stripped +2 -1
WL#2475: Manual merge 2, step 3
sql/handler.cc@stripped, 2007-06-27 23:15:24+04:00, sergefp@stripped +5 -5
WL#2475: Manual merge 2, step 3
sql/handler.h@stripped, 2007-06-27 23:15:24+04:00, sergefp@stripped +7 -7
WL#2475: Manual merge 2, step 3
sql/key.cc@stripped, 2007-06-27 23:15:24+04:00, sergefp@stripped +1 -1
WL#2475: Manual merge 2, step 3
sql/mysql_priv.h@stripped, 2007-06-27 23:15:24+04:00, sergefp@stripped +1 -1
WL#2475: Manual merge 2, step 3
sql/opt_range.cc@stripped, 2007-06-27 23:15:25+04:00, sergefp@stripped +14 -12
WL#2475: Manual merge 2, step 3
sql/opt_range.h@stripped, 2007-06-27 23:15:25+04:00, sergefp@stripped +4 -5
WL#2475: Manual merge 2, step 3
sql/set_var.cc@stripped, 2007-06-27 23:15:25+04:00, sergefp@stripped +1 -1
WL#2475: Manual merge 2, step 3
storage/innobase/handler/ha_innodb.cc@stripped, 2007-06-27 23:15:25+04:00, sergefp@stripped +11 -1
WL#2475: Manual merge 2, step 3
storage/myisam/mi_key.c@stripped, 2007-06-27 23:15:25+04:00, sergefp@stripped +1 -1
WL#2475: Manual merge 2, step 3
storage/myisam/myisamdef.h@stripped, 2007-06-27 23:15:25+04:00, sergefp@stripped +1 -1
WL#2475: Manual merge 2, step 3
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sergefp
# Host: pylon.mylan
# Root: /home/psergey/mysql-5.1-merge-to-r2
--- 1.60/storage/myisam/mi_key.c 2007-06-27 23:15:37 +04:00
+++ 1.61/storage/myisam/mi_key.c 2007-06-27 23:15:37 +04:00
@@ -531,7 +531,7 @@
2 Index condition is not satisfied, end the scan.
*/
-int mi_check_index_cond(register MI_INFO *info, uint keynr, byte *record)
+int mi_check_index_cond(register MI_INFO *info, uint keynr, uchar *record)
{
if (_mi_put_key_in_record(info, keynr, record))
{
--- 1.101/storage/myisam/myisamdef.h 2007-06-27 23:15:37 +04:00
+++ 1.102/storage/myisam/myisamdef.h 2007-06-27 23:15:37 +04:00
@@ -775,7 +775,7 @@
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size);
void mi_remap_file(MI_INFO *info, my_off_t size);
-int mi_check_index_cond(register MI_INFO *info, uint keynr, byte *record);
+int mi_check_index_cond(register MI_INFO *info, uint keynr, uchar *record);
/* Functions needed by mi_check */
volatile int *killed_ptr(MI_CHECK *param);
--- 1.315/sql/handler.cc 2007-06-27 23:15:37 +04:00
+++ 1.316/sql/handler.cc 2007-06-27 23:15:37 +04:00
@@ -3450,12 +3450,12 @@
}
use_default_impl= FALSE;
- rowids_buf= (byte*)buf->buffer;
+ rowids_buf= buf->buffer;
last_idx_tuple= rowids_buf;
rowids_buf += key->key_length + h->ref_length;
is_mrr_assoc= !test(mode & HA_MRR_NO_ASSOCIATION);
- rowids_buf_end= (byte*)buf->buffer_end;
+ rowids_buf_end= buf->buffer_end;
elem_size= h->ref_length + (int)is_mrr_assoc * sizeof(void*);
rowids_buf_last= rowids_buf +
@@ -3499,7 +3499,7 @@
}
-static int rowid_cmp(void *h, byte *a, byte *b)
+static int rowid_cmp(void *h, uchar *a, uchar *b)
{
return ((handler*)h)->cmp_ref(a, b);
}
@@ -3536,7 +3536,7 @@
!(res= h->handler::multi_range_read_next(&range_info)))
{
/* Put rowid, or {rowid, range_id} pair into the buffer */
- h->position((const byte*)(h->table->record[0]));
+ h->position(h->table->record[0]);
memcpy(rowids_buf_cur, h->ref, h->ref_length);
rowids_buf_cur += h->ref_length;
@@ -3649,7 +3649,7 @@
return HA_ERR_END_OF_FILE;
}
- res= h->rnd_pos((byte*)h->table->record[0], rowids_buf_cur);
+ res= h->rnd_pos(h->table->record[0], rowids_buf_cur);
rowids_buf_cur += h->ref_length;
if (is_mrr_assoc)
--- 1.266/sql/handler.h 2007-06-27 23:15:37 +04:00
+++ 1.267/sql/handler.h 2007-06-27 23:15:37 +04:00
@@ -845,8 +845,8 @@
typedef struct st_handler_buffer
{
- const uchar *buffer; /* Buffer one can start using */
- const uchar *buffer_end; /* End of buffer */
+ uchar *buffer; /* Buffer one can start using */
+ uchar *buffer_end; /* End of buffer */
uchar *end_of_used_area; /* End of area that was used by handler */
} HANDLER_BUFFER;
@@ -1912,14 +1912,14 @@
DsMrr_impl(range_check_toggle_func_t func)
: last_idx_tuple(NULL), range_check_toggle_func(func) {};
- byte *rowids_buf; // rows buffer
+ uchar *rowids_buf; // rows buffer
- byte *rowids_buf_cur; // current position in rowids buffer
- byte *rowids_buf_last; // just-after-the-end position in rowids buffer
- byte *rowids_buf_end;
+ uchar *rowids_buf_cur; // current position in rowids buffer
+ uchar *rowids_buf_last; // just-after-the-end position in rowids buffer
+ uchar *rowids_buf_end;
KEY *mrr_key;
- byte *last_idx_tuple;
+ uchar *last_idx_tuple;
uint mrr_keyno;
bool dsmrr_eof;
--- 1.51/sql/key.cc 2007-06-27 23:15:37 +04:00
+++ 1.52/sql/key.cc 2007-06-27 23:15:37 +04:00
@@ -173,7 +173,7 @@
DESCRIPTION
*/
-void key_zero_nulls(byte *tuple, KEY *key_info)
+void key_zero_nulls(uchar *tuple, KEY *key_info)
{
KEY_PART_INFO *key_part= key_info->key_part;
KEY_PART_INFO *key_part_end= key_part + key_info->key_parts;
--- 1.520/sql/mysql_priv.h 2007-06-27 23:15:37 +04:00
+++ 1.521/sql/mysql_priv.h 2007-06-27 23:15:37 +04:00
@@ -1535,8 +1535,8 @@
uint *key_length, uint *keypart);
void key_copy(uchar *to_key, uchar *from_record, KEY *key_info, uint key_length);
void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
-void key_zero_nulls(uchar *tuple, KEY *key_info);
uint key_length);
+void key_zero_nulls(uchar *tuple, KEY *key_info);
bool key_cmp_if_same(TABLE *form,const uchar *key,uint index,uint key_length);
void key_unpack(String *to,TABLE *form,uint index);
bool is_key_used(TABLE *table, uint idx, const MY_BITMAP *fields);
--- 1.275/sql/opt_range.cc 2007-06-27 23:15:37 +04:00
+++ 1.276/sql/opt_range.cc 2007-06-27 23:15:37 +04:00
@@ -7096,7 +7096,7 @@
Pointers in min and max keys. They point to right-after-end of key
images. The 0-th entry has these pointing to key tuple start.
*/
- char *min_key, *max_key;
+ uchar *min_key, *max_key;
/*
Flags, for {keypart0, keypart1, ... this_keypart} subtuple.
@@ -7314,7 +7314,7 @@
range->range_flag= cur->min_key_flag;
/* Here minimum contains also function code bits, and maximum is +inf */
- range->start_key.key= (byte*)seq->param->min_key;
+ range->start_key.key= seq->param->min_key;
range->start_key.length= min_key_length;
range->start_key.flag= (ha_rkey_function) (cur->min_key_flag ^ GEOM_FLAG);
}
@@ -7322,17 +7322,18 @@
{
range->range_flag= cur->min_key_flag | cur->max_key_flag;
- range->start_key.key= (byte*)seq->param->min_key;
+ range->start_key.key= seq->param->min_key;
range->start_key.length= cur->min_key - seq->param->min_key;
range->start_key.keypart_map= make_prev_keypart_map(cur->min_key_parts);
- range->start_key.flag= (cur->min_key_flag & NEAR_MIN ? HA_READ_AFTER_KEY :
- HA_READ_KEY_EXACT);
+ range->start_key.flag= (cur->min_key_flag & NEAR_MIN ? HA_READ_AFTER_KEY :
+ HA_READ_KEY_EXACT);
- range->end_key.key= (byte*)seq->param->max_key;
+ range->end_key.key= seq->param->max_key;
range->end_key.length= cur->max_key - seq->param->max_key;
- range->end_key.flag= (cur->max_key_flag & NEAR_MAX ? HA_READ_BEFORE_KEY :
- HA_READ_AFTER_KEY);
+ range->end_key.flag= (cur->max_key_flag & NEAR_MAX ? HA_READ_BEFORE_KEY :
+ HA_READ_AFTER_KEY);
range->end_key.keypart_map= make_prev_keypart_map(cur->max_key_parts);
+
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)) ==
@@ -7441,6 +7442,7 @@
{
param->table->quick_rows[keynr]=rows;
if (update_tbl_stats)
+ {
param->table->quick_keys.set_bit(keynr);
param->table->quick_key_parts[keynr]=param->max_key_part+1;
param->table->quick_n_ranges[keynr]= param->range_count;
@@ -7834,10 +7836,10 @@
}
static bool
-key_has_nulls(const KEY* key_info, const byte *key, uint key_len)
+key_has_nulls(const KEY* key_info, const uchar *key, uint key_len)
{
KEY_PART_INFO *curr_part, *end_part;
- const byte* end_ptr= key + key_len;
+ const uchar* end_ptr= key + key_len;
curr_part= key_info->key_part;
end_part= curr_part + key_info->key_parts;
@@ -8366,13 +8368,13 @@
key_range *start_key= &range->start_key;
key_range *end_key= &range->end_key;
- start_key->key= (const byte*)cur->min_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= (const byte*)cur->max_key;
+ end_key->key= cur->max_key;
end_key->length= cur->max_length;
end_key->keypart_map= cur->max_keypart_map;
/*
--- 1.80/sql/opt_range.h 2007-06-27 23:15:37 +04:00
+++ 1.81/sql/opt_range.h 2007-06-27 23:15:37 +04:00
@@ -355,11 +355,10 @@
QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
struct st_table_ref *ref,
ha_rows records);
- friend bool get_quick_keys(PARAM *param,
- QUICK_RANGE_SELECT *quick,KEY_PART *key,
- SEL_ARG *key_tree,
- char *min_key, uint min_key_flag,
- char *max_key, uint max_key_flag);
+ friend bool get_quick_keys(PARAM *param, QUICK_RANGE_SELECT *quick,
+ KEY_PART *key, SEL_ARG *key_tree,
+ uchar *min_key, uint min_key_flag,
+ uchar *max_key, uint max_key_flag);
friend QUICK_RANGE_SELECT *get_quick_select(PARAM*,uint idx,
SEL_ARG *key_tree,
uint mrr_flags,
--- 1.460/sql/ha_ndbcluster.cc 2007-06-27 23:15:37 +04:00
+++ 1.461/sql/ha_ndbcluster.cc 2007-06-27 23:15:38 +04:00
@@ -8474,6 +8474,7 @@
void *seq_init_param,
uint n_ranges_arg, uint *bufsz,
uint *flags, COST_VECT *cost)
+{
KEY_MULTI_RANGE range;
range_seq_t seq_it;
ha_rows rows, total_rows= 0;
@@ -8613,7 +8614,7 @@
* This as we don't want mysqld to reuse the buffer when we read
* the remaining ranges
*/
- buffer->end_of_used_area= (byte*)multi_range_buffer->buffer_end;
+ buffer->end_of_used_area= multi_range_buffer->buffer_end;
}
else
{
--- 1.340/storage/innobase/handler/ha_innodb.cc 2007-06-27 23:15:38 +04:00
+++ 1.341/storage/innobase/handler/ha_innodb.cc 2007-06-27 23:15:38 +04:00
@@ -54,6 +54,8 @@
This needs to exist until the query cache callback is removed
or learns to pass hton.
*/
+static handlerton *innodb_hton_ptr;
+
C_MODE_START
static my_bool index_cond_func_innodb(void *arg);
C_MODE_END
@@ -7662,6 +7664,14 @@
uint table_changes)
{
if (table_changes != IS_EQUAL_YES) {
+
+ return COMPATIBLE_DATA_NO;
+ }
+
+ /* Check that auto_increment value was not changed */
+ if ((info->used_fields & HA_CREATE_USED_AUTO) &&
+ info->auto_increment_value != 0) {
+
return COMPATIBLE_DATA_NO;
}
@@ -7959,7 +7969,6 @@
return ds_mrr.dsmrr_info(keyno, n_ranges, keys, bufsz, flags, cost);
}
-#endif
/**
@@ -8027,3 +8036,4 @@
return res;
}
+#endif
--- 1.241/sql/set_var.cc 2007-06-27 23:15:38 +04:00
+++ 1.242/sql/set_var.cc 2007-06-27 23:15:38 +04:00
@@ -353,7 +353,7 @@
optimizer_use_mrr_names, NULL
};
-sys_var_thd_enum sys_optimizer_use_mrr("optimizer_use_mrr",
+static sys_var_thd_enum sys_optimizer_use_mrr(&vars, "optimizer_use_mrr",
&SV::optimizer_use_mrr,
&optimizer_use_mrr_typelib,
NULL);
| Thread |
|---|
| • bk commit into 5.2 tree (sergefp:1.2528) | Sergey Petrunia | 27 Jun |