summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-10-19 20:36:59 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-10-19 20:36:59 -0200
commit1040f98ccffccbed8d1e95fe8252e402b8ee4e3f (patch)
tree5560db90147dedcfccab23a9d59fb20480b93f51 /sql/ha_ndbcluster.cc
parent7406b38efa0a2eec5a245839c5ce13b85d51d125 (diff)
downloadmariadb-git-1040f98ccffccbed8d1e95fe8252e402b8ee4e3f.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings
Tag or remove unused arguments and variables. regex/main.c: Use the real prototype. sql/ha_ndbcluster.cc: Make conditions less ambiguous.
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 9c26105546d..4f99d354754 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -1293,10 +1293,12 @@ int ha_ndbcluster::open_indexes(Ndb *ndb, TABLE *tab, bool ignore_error)
for (i= 0; i < tab->s->keys; i++, key_info++, key_name++)
{
if ((error= add_index_handle(thd, dict, key_info, *key_name, i)))
+ {
if (ignore_error)
m_index[i].index= m_index[i].unique_index= NULL;
else
break;
+ }
m_index[i].null_in_unique_index= FALSE;
if (check_index_fields_not_null(key_info))
m_index[i].null_in_unique_index= TRUE;
@@ -6265,8 +6267,8 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
for (;;)
{
Ndb_tuple_id_range_guard g(m_share);
- if (m_skip_auto_increment &&
- ndb->readAutoIncrementValue(m_table, g.range, auto_value) ||
+ if ((m_skip_auto_increment &&
+ ndb->readAutoIncrementValue(m_table, g.range, auto_value)) ||
ndb->getAutoIncrementValue(m_table, g.range, auto_value, cache_size, increment, offset))
{
if (--retries &&
@@ -9916,8 +9918,8 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *create_info,
{
Field *field= table->field[i];
const NDBCOL *col= tab->getColumn(i);
- if (col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY ||
- col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK)
+ if ((col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY) ||
+ (col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK))
{
DBUG_PRINT("info", ("Column storage media is changed"));
DBUG_RETURN(COMPATIBLE_DATA_NO);