summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/t/rpl_rotate_logs.test3
-rw-r--r--sql/item_cmpfunc.cc6
2 files changed, 7 insertions, 2 deletions
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 78213c6a750..7560d56af1c 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -101,7 +101,8 @@ show master logs;
# we just tests if synonyms are accepted
purge binary logs to 'master-bin.000002';
show binary logs;
---sleep 1;
+# sleeping 10 seconds or more would make the slave believe connection is down
+--real_sleep 1;
purge master logs before now();
show binary logs;
insert into t2 values (65);
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 709b20e5a54..64d6b5fa7cf 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1415,9 +1415,12 @@ cmp_item_row::~cmp_item_row()
void cmp_item_row::store_value(Item *item)
{
+ DBUG_ENTER("cmp_item_row::store_value");
THD *thd= current_thd;
n= item->cols();
- if ((comparators= (cmp_item **) thd->calloc(sizeof(cmp_item *)*n)))
+ if (!comparators)
+ comparators= (cmp_item **) thd->calloc(sizeof(cmp_item *)*n);
+ if (comparators)
{
item->bring_value();
item->null_value= 0;
@@ -1429,6 +1432,7 @@ void cmp_item_row::store_value(Item *item)
item->null_value|= item->el(i)->null_value;
}
}
+ DBUG_VOID_RETURN;
}