Skip to content

Commit 63d4bac

Browse files
committed
Local merge
2 parents d6a1562 + cbd7cb1 commit 63d4bac

File tree

18 files changed

+100
-37
lines changed

18 files changed

+100
-37
lines changed

client/mysqldump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4841,7 +4841,7 @@ static int do_show_slave_status(MYSQL *mysql_con)
48414841
if (row[1])
48424842
fprintf(md_result_file, "MASTER_HOST='%s', ", row[1]);
48434843
if (row[3])
4844-
fprintf(md_result_file, "MASTER_PORT='%s', ", row[3]);
4844+
fprintf(md_result_file, "MASTER_PORT=%s, ", row[3]);
48454845
}
48464846
fprintf(md_result_file,
48474847
"MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", row[9], row[21]);

mysql-test/r/rpl_mysqldump_slave.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ STOP SLAVE;
1212
CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
1313
START SLAVE;
1414
STOP SLAVE;
15-
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT='MASTER_MYPORT', MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
15+
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
1616
START SLAVE;
1717
include/rpl_end.inc

mysql-test/t/disabled.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ ds_mrr-big @solaris : Bug#14168107 2012-04-03 Hemant disabled new test adde
1818
partition_locking_4 : Bug#13924750 2012-04-04 lost connection.
1919
mysql_embedded_client_test : Bug#13964673 2012-04-16 amitbha since most of the test cases are failing
2020
mysql_client_test_embedded : Bug#16084066 2013-01-08 Disabled since this test is failing
21+
partition_open_files_limit : Bug#16553132 2013-03-26 TEST FAILURE IN MAIN.PARTITION_OPEN_FILES_LIMIT

sql-bench/example.bat

100644100755
File mode changed.

sql-bench/pwd.bat

100644100755
File mode changed.

sql-bench/uname.bat

100644100755
File mode changed.

sql/item_sum.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,11 +3121,12 @@ int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)),
31213121
Item_func_group_concat::
31223122
Item_func_group_concat(Name_resolution_context *context_arg,
31233123
bool distinct_arg, List<Item> *select_list,
3124-
SQL_I_List<ORDER> *order_list, String *separator_arg)
3124+
const SQL_I_List<ORDER> &order_list,
3125+
String *separator_arg)
31253126
:tmp_table_param(0), separator(separator_arg), tree(0),
31263127
unique_filter(NULL), table(0),
31273128
order(0), context(context_arg),
3128-
arg_count_order(order_list ? order_list->elements : 0),
3129+
arg_count_order(order_list.elements),
31293130
arg_count_field(select_list->elements),
31303131
row_count(0),
31313132
distinct(distinct_arg),
@@ -3165,7 +3166,7 @@ Item_func_group_concat(Name_resolution_context *context_arg,
31653166
if (arg_count_order)
31663167
{
31673168
ORDER **order_ptr= order;
3168-
for (ORDER *order_item= order_list->first;
3169+
for (ORDER *order_item= order_list.first;
31693170
order_item != NULL;
31703171
order_item= order_item->next)
31713172
{

sql/item_sum.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#ifndef ITEM_SUM_INCLUDED
22
#define ITEM_SUM_INCLUDED
33

4-
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
4+
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights
5+
reserved.
56
67
This program is free software; you can redistribute it and/or modify
78
it under the terms of the GNU General Public License as published by
@@ -1460,7 +1461,7 @@ class Item_func_group_concat : public Item_sum
14601461
public:
14611462
Item_func_group_concat(Name_resolution_context *context_arg,
14621463
bool is_distinct, List<Item> *is_select,
1463-
SQL_I_List<ORDER> *is_order, String *is_separator);
1464+
const SQL_I_List<ORDER> &is_order, String *is_separator);
14641465

14651466
Item_func_group_concat(THD *thd, Item_func_group_concat *item);
14661467
~Item_func_group_concat();

sql/opt_range.cc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5958,6 +5958,34 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func,
59585958
{
59595959
new_interval->min_value= last_val->max_value;
59605960
new_interval->min_flag= NEAR_MIN;
5961+
5962+
/*
5963+
If the interval is over a partial keypart, the
5964+
interval must be "c_{i-1} <= X < c_i" instead of
5965+
"c_{i-1} < X < c_i". Reason:
5966+
5967+
Consider a table with a column "my_col VARCHAR(3)",
5968+
and an index with definition
5969+
"INDEX my_idx my_col(1)". If the table contains rows
5970+
with my_col values "f" and "foo", the index will not
5971+
distinguish the two rows.
5972+
5973+
Note that tree_or() below will effectively merge
5974+
this range with the range created for c_{i-1} and
5975+
we'll eventually end up with only one range:
5976+
"NULL < X".
5977+
5978+
Partitioning indexes are never partial.
5979+
*/
5980+
if (param->using_real_indexes)
5981+
{
5982+
const KEY key=
5983+
param->table->key_info[param->real_keynr[idx]];
5984+
const KEY_PART_INFO *kpi= key.key_part + new_interval->part;
5985+
5986+
if (kpi->key_part_flag & HA_PART_KEY_SEG)
5987+
new_interval->min_flag= 0;
5988+
}
59615989
}
59625990
}
59635991
/*
@@ -6798,6 +6826,7 @@ get_mm_leaf(RANGE_OPT_PARAM *param, Item *conf_func, Field *field,
67986826

67996827
if (key_part->image_type == Field::itMBR)
68006828
{
6829+
// @todo: use is_spatial_operator() instead?
68016830
switch (type) {
68026831
case Item_func::SP_EQUALS_FUNC:
68036832
case Item_func::SP_DISJOINT_FUNC:

sql/set_var.cc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -751,22 +751,25 @@ void set_var_user::print(THD *thd, String *str)
751751
Functions to handle SET PASSWORD
752752
*****************************************************************************/
753753

754+
/**
755+
Check the validity of the SET PASSWORD request
756+
757+
User name and no host is used for SET PASSWORD =
758+
No user name and no host used for SET PASSWORD for CURRENT_USER() =
759+
760+
@param thd The current thread
761+
@return status code
762+
@retval 0 failure
763+
@retval 1 success
764+
*/
754765
int set_var_password::check(THD *thd)
755766
{
756767
#ifndef NO_EMBEDDED_ACCESS_CHECKS
757768
if (!user->host.str)
758769
{
759770
DBUG_ASSERT(thd->security_ctx->priv_host);
760-
if (*thd->security_ctx->priv_host != 0)
761-
{
762-
user->host.str= (char *) thd->security_ctx->priv_host;
763-
user->host.length= strlen(thd->security_ctx->priv_host);
764-
}
765-
else
766-
{
767-
user->host.str= (char *)"%";
768-
user->host.length= 1;
769-
}
771+
user->host.str= (char *) thd->security_ctx->priv_host;
772+
user->host.length= strlen(thd->security_ctx->priv_host);
770773
}
771774
/*
772775
In case of anonymous user, user->user is set to empty string with length 0.

0 commit comments

Comments
 (0)