3614 Jonas Oreland 2011-10-24
ndb - fix ndb_join_pushdown in ps-protocol mode...add weird work-around
modified:
mysql-test/suite/ndb/r/ndb_join_pushdown.result
mysql-test/suite/ndb/t/ndb_join_pushdown.test
3613 Jonas Oreland 2011-10-24
ndb - remove incorrect DBUG_ASSERT...that can/will happen. Added comment describing scenario
modified:
sql/ha_ndbcluster_binlog.cc
3612 magnus.blaudd@stripped 2011-10-24 [merge]
Merge
modified:
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.h
storage/ndb/CMakeLists.txt
=== modified file 'mysql-test/suite/ndb/r/ndb_join_pushdown.result'
--- a/mysql-test/suite/ndb/r/ndb_join_pushdown.result 2011-10-20 19:52:11 +0000
+++ b/mysql-test/suite/ndb/r/ndb_join_pushdown.result 2011-10-24 08:50:10 +0000
@@ -2096,6 +2096,7 @@ insert into t1 values (1, 2);
insert into t1 values (2, 3);
insert into t1 values (3, 1);
set ndb_join_pushdown=true;
+set autocommit=off;
explain extended
select *
from t1, t1 as t2
@@ -2116,12 +2117,14 @@ a b a b
@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
3
This should yield 3 executes (for now...buh)
+set autocommit=on;
drop table t1;
create table t1 (a int, b int, primary key(a)) engine = ndb;
insert into t1 values (1, 2);
insert into t1 values (2, 3);
insert into t1 values (3, 1);
set ndb_join_pushdown=true;
+set autocommit=off;
explain extended
select *
from t1, t1 as t2
@@ -2142,6 +2145,7 @@ a b a b
@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
1
This should yield 1 execute (but inefficient since it's based on scan)
+set autocommit=on;
explain extended
select *
from t1, t1 as t2
=== modified file 'mysql-test/suite/ndb/t/ndb_join_pushdown.test'
--- a/mysql-test/suite/ndb/t/ndb_join_pushdown.test 2011-10-20 12:52:58 +0000
+++ b/mysql-test/suite/ndb/t/ndb_join_pushdown.test 2011-10-24 08:50:10 +0000
@@ -1070,6 +1070,16 @@ insert into t1 values (3, 1);
set ndb_join_pushdown=true;
+##
+# In ps-protocol, server will adds calls to execute(Commit)
+# (these are optimized away by ndbapi, since there is nothing to commit)
+# and these generates a diff in execute-count
+# To not have to investigate problem futher, I simply set autocommit=off
+# (and back further down where we don't track execute-count any longer)
+# It would probably be good to changes these tests to instead use frazers new
+# ndbapi counters, and instead measure #round-trips
+set autocommit=off;
+
explain extended
select *
from t1, t1 as t2
@@ -1084,6 +1094,8 @@ where t1.a in (1,3,5)
--source suite/ndb/include/ndb_execute_count.inc
--echo This should yield 3 executes (for now...buh)
+set autocommit=on;
+
connection ddl;
drop table t1;
@@ -1098,6 +1110,16 @@ insert into t1 values (3, 1);
set ndb_join_pushdown=true;
+##
+# In ps-protocol, server will adds calls to execute(Commit)
+# (these are optimized away by ndbapi, since there is nothing to commit)
+# and these generates a diff in execute-count
+# To not have to investigate problem futher, I simply set autocommit=off
+# (and back further down where we don't track execute-count any longer)
+# It would probably be good to changes these tests to instead use frazers new
+# ndbapi counters, and instead measure #round-trips
+set autocommit=off;
+
explain extended
select *
from t1, t1 as t2
@@ -1112,6 +1134,7 @@ where t1.a in (1,3,5)
--source suite/ndb/include/ndb_execute_count.inc
--echo This should yield 1 execute (but inefficient since it's based on scan)
+set autocommit=on;
## Adding and 'order by ... desc' trigger the usage
## of QUICK_SELECT_DESC which somehow prepares a
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc 2011-10-24 07:49:34 +0000
+++ b/sql/ha_ndbcluster_binlog.cc 2011-10-24 08:48:41 +0000
@@ -2485,7 +2485,11 @@ ndb_binlog_thread_handle_schema_event(TH
if ((schema->db[0] == 0) && (schema->name[0] == 0))
{
- DBUG_ASSERT(false);
+ /**
+ * This happens if there is a schema event on a table (object)
+ * that this mysqld does not know about.
+ * E.g it had a local table shadowing a ndb table...
+ */
DBUG_RETURN(0);
}
switch (schema_type)
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster branch (jonas.oreland:3612 to 3614) | Jonas Oreland | 24 Oct |