4058 Jonas Oreland 2011-01-17 [merge]
ndb - merge 70 to 71
4057 Jonas Oreland 2011-01-17
ndb - bump version to 7.0.11
modified:
configure.in
storage/ndb/ndb_configure.m4
4056 Jonas Oreland 2011-01-17 {clone-mysql-5.1.51-ndb-7.1.10-src-build} [merge]
ndb - merge 70 to 71
modified:
storage/ndb/tools/restore/consumer_restore.cpp
4055 Jonas Oreland 2011-01-17 [merge]
ndb - merge 70 to 71
modified:
mysql-test/suite/ndb/include/run_ndbapitest.inc
mysql-test/suite/ndb/r/ndb_index_unique.result
mysql-test/suite/ndb/t/ndb_index_unique.test
sql/ha_ndbcluster.cc
4054 Magnus Blåudd 2011-01-17 [merge]
Merge 7.0 -> 7.1
modified:
include/my_sys.h
mysys/my_lockmem.c
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.h
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_cond.cc
sql/ha_ndbcluster_cond.h
sql/ha_ndbcluster_glue.h
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp
=== modified file 'configure.in'
--- a/configure.in 2010-11-09 16:20:08 +0000
+++ b/configure.in 2011-01-17 13:22:53 +0000
@@ -12,7 +12,7 @@ dnl
dnl When changing the major version number please also check the switch
dnl statement in mysqlbinlog::check_master_version(). You may also need
dnl to update version.c in ndb.
-AC_INIT([MySQL Server], [5.1.51-ndb-7.1.10], [], [mysql])
+AC_INIT([MySQL Server], [5.1.51-ndb-7.1.11], [], [mysql])
AC_CONFIG_SRCDIR([sql/mysqld.cc])
AC_CANONICAL_SYSTEM
# USTAR format gives us the possibility to store longer path names in
=== modified file 'mysql-test/suite/ndb/include/run_ndbapitest.inc'
--- a/mysql-test/suite/ndb/include/run_ndbapitest.inc 2010-02-03 10:11:55 +0000
+++ b/mysql-test/suite/ndb/include/run_ndbapitest.inc 2011-01-17 12:46:43 +0000
@@ -23,6 +23,11 @@ unless($test_bin)
exit(0);
}
+if ($ENV{'MYSQL_TMP_DIR'})
+{
+ $ENV{'NDBT_TMP_DIR'} = $ENV{'MYSQL_TMP_DIR'};
+}
+
my $cmd = $test_bin;
$cmd .= " $args" if $args;
my $res = exec_print_on_error($cmd, $max_lines);
=== modified file 'mysql-test/suite/ndb/r/ndb_index_unique.result'
--- a/mysql-test/suite/ndb/r/ndb_index_unique.result 2010-11-14 14:16:10 +0000
+++ b/mysql-test/suite/ndb/r/ndb_index_unique.result 2011-01-17 12:31:29 +0000
@@ -889,3 +889,27 @@ a
4
set engine_condition_pushdown = @old_ecpd;
drop table t1;
+create table t1 (pk int primary key, a int) engine=ndb;
+create table t2 (pk int primary key, uq int, a int,
+unique key ix(uq,a) USING HASH) engine=ndb;
+Warnings:
+Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan
+insert into t2 values
+(0,0,0), (1,1,0), (2,2,0), (3,3,0), (4,4,0),
+(5,5,1), (6,6,1), (7,7,1), (8,8,1), (9,9,1);
+insert into t1
+select
+t1.pk + t2.pk*10 + t3.pk*100 + t4.pk*1000, t1.a
+from
+t2 as t1, t2 as t2, t2 as t3, t2 as t4;
+explain
+SELECT STRAIGHT_JOIN count(*) FROM
+t1 JOIN t2 ON t2.a=t1.a where t2.uq IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 10000
+1 SIMPLE t2 ref ix ix 10 const,test.t1.a 1 Using where with pushed condition
+SELECT STRAIGHT_JOIN count(*) FROM
+t1 JOIN t2 ON t2.a=t1.a where t2.uq IS NULL;
+count(*)
+0
+drop table t1,t2;
=== modified file 'mysql-test/suite/ndb/t/ndb_index_unique.test'
--- a/mysql-test/suite/ndb/t/ndb_index_unique.test 2010-11-14 14:16:10 +0000
+++ b/mysql-test/suite/ndb/t/ndb_index_unique.test 2011-01-17 12:31:29 +0000
@@ -514,4 +514,42 @@ set engine_condition_pushdown = @old_ecp
drop table t1;
+#
+# Bug#58750: 'out of connection objects' due to missing close()
+# of prev. full_table_scan()
+#
+create table t1 (pk int primary key, a int) engine=ndb;
+create table t2 (pk int primary key, uq int, a int,
+ unique key ix(uq,a) USING HASH) engine=ndb;
+
+insert into t2 values
+ (0,0,0), (1,1,0), (2,2,0), (3,3,0), (4,4,0),
+ (5,5,1), (6,6,1), (7,7,1), (8,8,1), (9,9,1);
+
+##
+# 10^4 cross product on t2 creates 10.000 rows:
+##
+insert into t1
+ select
+ t1.pk + t2.pk*10 + t3.pk*100 + t4.pk*1000, t1.a
+from
+ t2 as t1, t2 as t2, t2 as t3, t2 as t4;
+
+# Execute a 'scan(t1) join REF(t2) using ix'
+# - Where condition 't2.uq IS NULL' in combination with
+# join cond. 't2.a=t1.a' will create the REF keys (NULL,t1.a).
+# This will initiate a ::full_table_scan() which fails to
+# close any open table scans.
+# - Table scan(t1) will 'drive' the case above and eventually
+# cause all ScanOperations / hupp'ed transactions to have been
+# consumed
+
+explain
+SELECT STRAIGHT_JOIN count(*) FROM
+ t1 JOIN t2 ON t2.a=t1.a where t2.uq IS NULL;
+SELECT STRAIGHT_JOIN count(*) FROM
+ t1 JOIN t2 ON t2.a=t1.a where t2.uq IS NULL;
+
+drop table t1,t2;
+
# end of tests
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2011-01-17 07:58:06 +0000
+++ b/sql/ha_ndbcluster.cc 2011-01-17 12:46:43 +0000
@@ -3598,6 +3598,7 @@ int ha_ndbcluster::full_table_scan(const
m_thd_ndb->m_pruned_scan_count += (op->getPruned()? 1 : 0);
}
+ DBUG_ASSERT(m_active_cursor==NULL);
m_active_cursor= op;
if (uses_blob_value(table->read_set) &&
@@ -5448,6 +5449,9 @@ int ha_ndbcluster::read_range_first_to_b
DBUG_ENTER("ha_ndbcluster::read_range_first_to_buf");
DBUG_PRINT("info", ("desc: %d, sorted: %d", desc, sorted));
+ if (m_active_cursor && (error= close_scan()))
+ DBUG_RETURN(error);
+
if (m_use_partition_pruning)
{
get_partition_set(table, buf, active_index, start_key, &part_spec);
@@ -5486,8 +5490,6 @@ int ha_ndbcluster::read_range_first_to_b
start_key->length == key_info->key_length &&
start_key->flag == HA_READ_KEY_EXACT)
{
- if (m_active_cursor && (error= close_scan()))
- DBUG_RETURN(error);
if (!m_thd_ndb->trans)
if (unlikely(!start_transaction_key(active_index,
start_key->key, error)))
@@ -5503,9 +5505,6 @@ int ha_ndbcluster::read_range_first_to_b
start_key->flag == HA_READ_KEY_EXACT &&
!check_null_in_key(key_info, start_key->key, start_key->length))
{
- if (m_active_cursor && (error= close_scan()))
- DBUG_RETURN(error);
-
if (!m_thd_ndb->trans)
if (unlikely(!start_transaction_key(active_index,
start_key->key, error)))
=== modified file 'storage/ndb/ndb_configure.m4'
--- a/storage/ndb/ndb_configure.m4 2011-01-10 05:49:08 +0000
+++ b/storage/ndb/ndb_configure.m4 2011-01-17 13:21:01 +0000
@@ -2,7 +2,7 @@
# Should be updated when creating a new NDB version
NDB_VERSION_MAJOR=7
NDB_VERSION_MINOR=1
-NDB_VERSION_BUILD=10
+NDB_VERSION_BUILD=11
NDB_VERSION_STATUS=""
dnl ---------------------------------------------------------------------------
=== modified file 'storage/ndb/tools/restore/consumer_restore.cpp'
--- a/storage/ndb/tools/restore/consumer_restore.cpp 2010-12-03 09:36:45 +0000
+++ b/storage/ndb/tools/restore/consumer_restore.cpp 2011-01-17 13:17:32 +0000
@@ -21,6 +21,7 @@
#include <kernel/ndb_limits.h>
#include <my_sys.h>
#include <NdbSleep.h>
+#include <NdbTick.h>
#include <ndb_internal.hpp>
#include <ndb_logevent.h>
@@ -362,6 +363,7 @@ BackupRestore::rebuild_indexes(const Tab
for(size_t i = 0; i<indexes.size(); i++)
{
NdbDictionary::Index * idx = indexes[i];
+ Uint64 start = NdbTick_CurrentMillisecond();
info << "Rebuilding index " << idx->getName() << " on table "
<< tab->getName() << " ..." << flush;
if (dict->createIndex(* idx, 1) != 0)
@@ -373,7 +375,8 @@ BackupRestore::rebuild_indexes(const Tab
return false;
}
- info << "OK" << endl;
+ Uint64 stop = NdbTick_CurrentMillisecond();
+ info << "OK (" << ((stop - start)/1000) << "s)" <<endl;
}
return true;
No bundle (reason: useless for push emails).| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.1 branch (jonas:4054 to 4058) | Jonas Oreland | 17 Jan |