3910 Ole John Aske 2012-05-04
Fixed Valgrind 'ininitialized memory read' errors caused by previous commit (revno: 3909)
Checking for lock_mode inside ::table_flags() may read uninitialized data, and
was not particularly usefull either as part of setting the 'CONST_BLOCK' flag.
So it has been deemed obsolete and removed in this fix.
modified:
sql/ha_ndbcluster.cc
3909 Ole John Aske 2012-05-03
ha_ndbcluster::read_first_row() was once implemented as part of the SPJ project
as we then had plans for pushing queries with 'system' tables as root operation.
(JT_SYSTEM is the only use case for ::read_first_row())
It was later decided that we should not push such queries, but
ha_ndbcluster::read_first_row() has remained in the code since then.
There is a default implementation of this method (handler::read_first_row()) which
is almost identical, except that it does not call ha_rnd_end() / ha_index_end()
before returning. These calls was removed in our ha_ndbcluster::read_first_row()
as pushed joins required the resultset to stay 'open' due to the child operations.
However:
- We do not push queries with 'system' tables so such a change
is not required.
- As part of fixing bug#13901890 'SQL NODE CRASHES DURING INSERT SELECT'
we identified part of the root cause to be an overridden
::index_read_idx_map() which also omitted calling rnd_end()/index_end()
before returning.
This fix removes this obsolete, and potential evil code.
modified:
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.h
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2012-05-03 12:12:39 +0000
+++ b/sql/ha_ndbcluster.cc 2012-05-04 08:17:44 +0000
@@ -12442,16 +12442,11 @@ ulonglong ha_ndbcluster::table_flags(voi
f= (f | HA_BINLOG_STMT_CAPABLE) & ~HA_HAS_OWN_BINLOGGING;
/**
- * To maximize join pushability we want const-table optimization
- * blocked if table is possibly pushable, that is:
- * - Variable 'ndb_join_pushdown= on'
- * - Lock mode is LM_CommittedRead
+ * To maximize join pushability we want const-table
+ * optimization blocked if 'ndb_join_pushdown= on'
*/
- if (THDVAR(thd, join_pushdown) &&
- get_ndb_lock_mode(m_lock.type) == NdbOperation::LM_CommittedRead)
- {
+ if (THDVAR(thd, join_pushdown))
f= f | HA_BLOCK_CONST_TABLE;
- }
return f;
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5-cluster-7.2 branch (ole.john.aske:3909 to 3910) | Ole John Aske | 9 May |