diff options
author | unknown <mskold/marty@mysql.com/linux.site> | 2007-04-24 10:25:15 +0200 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/linux.site> | 2007-04-24 10:25:15 +0200 |
commit | 25b372b3fd7e7800e657b17f5295b332814192ec (patch) | |
tree | df27cbcaad1cb4f8627e5540e7292ee034bd7c0f /sql/ha_ndbcluster_cond.cc | |
parent | 417eba838417a6a5584a34fa84e0f8674a16d439 (diff) | |
download | mariadb-git-25b372b3fd7e7800e657b17f5295b332814192ec.tar.gz |
Back-ported compiler warning fixes from 5.1 to ease merging
Diffstat (limited to 'sql/ha_ndbcluster_cond.cc')
-rw-r--r-- | sql/ha_ndbcluster_cond.cc | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc index 88a14e10ab3..a0eaccb68d8 100644 --- a/sql/ha_ndbcluster_cond.cc +++ b/sql/ha_ndbcluster_cond.cc @@ -270,7 +270,7 @@ void ndb_serialize_cond(const Item *item, void *arg) type == MYSQL_TYPE_DATETIME) ? (context->expecting_field_result(STRING_RESULT) || context->expecting_field_result(INT_RESULT)) - : true)) && + : TRUE)) && // Bit fields no yet supported in scan filter type != MYSQL_TYPE_BIT && // No BLOB support in scan filter @@ -350,7 +350,7 @@ void ndb_serialize_cond(const Item *item, void *arg) } else { - DBUG_PRINT("info", ("Was not expecting field from table %s(%s)", + DBUG_PRINT("info", ("Was not expecting field from table %s (%s)", context->table->s->table_name, field->table->s->table_name)); context->supported= FALSE; @@ -770,7 +770,7 @@ void ndb_serialize_cond(const Item *item, void *arg) DBUG_PRINT("info", ("REAL_ITEM")); if (context->expecting(Item::REAL_ITEM)) { - DBUG_PRINT("info", ("value %f", ((Item_float *) item)->value)); + DBUG_PRINT("info", ("value %f", ((Item_float*) item)->value)); NDB_ITEM_QUALIFICATION q; q.value_type= Item::REAL_ITEM; curr_cond->ndb_item= new Ndb_item(NDB_VALUE, q, item); @@ -990,27 +990,28 @@ ha_ndbcluster_cond::build_scan_filter_predicate(Ndb_cond * &cond, break; Ndb_item *a= cond->next->ndb_item; Ndb_item *b, *field, *value= NULL; - LINT_INIT(field); switch (cond->ndb_item->argument_count()) { case 1: - field= - (a->type == NDB_FIELD)? a : NULL; + field= (a->type == NDB_FIELD)? a : NULL; break; case 2: if (!cond->next->next) + { + field= NULL; break; + } b= cond->next->next->ndb_item; - value= - (a->type == NDB_VALUE)? a - : (b->type == NDB_VALUE)? b - : NULL; - field= - (a->type == NDB_FIELD)? a - : (b->type == NDB_FIELD)? b - : NULL; + value= ((a->type == NDB_VALUE) ? a : + (b->type == NDB_VALUE) ? b : + NULL); + field= ((a->type == NDB_FIELD) ? a : + (b->type == NDB_FIELD) ? b : + NULL); break; default: + field= NULL; //Keep compiler happy + DBUG_ASSERT(0); break; } switch ((negated) ? |