Commit 69231460 authored by unknown's avatar unknown
Browse files

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
parents 5d5931ba facce925
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -764,7 +764,7 @@ Ndb::getAutoIncrementValue(const char* aTableName, Uint32 cacheSize)
    DBUG_RETURN(~(Uint64)0);
  const NdbTableImpl *table= info->m_table_impl;
  Uint64 tupleId = getTupleIdFromNdb(table->m_tableId, cacheSize);
  DBUG_PRINT("info", ("value %u", tupleId));
  DBUG_PRINT("info", ("value %ul", (ulong) tupleId));
  DBUG_RETURN(tupleId);
}

@@ -776,7 +776,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable, Uint32 cacheSize
    DBUG_RETURN(~(Uint64)0);
  const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable);
  Uint64 tupleId = getTupleIdFromNdb(table->m_tableId, cacheSize);
  DBUG_PRINT("info", ("value %u", tupleId));
  DBUG_PRINT("info", ("value %ul", (ulong) tupleId));
  DBUG_RETURN(tupleId);
}

@@ -796,7 +796,8 @@ Ndb::getTupleIdFromNdb(Uint32 aTableId, Uint32 cacheSize)
  if ( theFirstTupleId[aTableId] != theLastTupleId[aTableId] )
  {
    theFirstTupleId[aTableId]++;
    DBUG_PRINT("info", ("next cached value %u", theFirstTupleId[aTableId]));
    DBUG_PRINT("info", ("next cached value %ul", 
                        (ulong) theFirstTupleId[aTableId]));
    DBUG_RETURN(theFirstTupleId[aTableId]);
  }
  else // theFirstTupleId == theLastTupleId
@@ -817,7 +818,7 @@ Ndb::readAutoIncrementValue(const char* aTableName)
    DBUG_RETURN(~(Uint64)0);
  }
  Uint64 tupleId = readTupleIdFromNdb(table->m_tableId);
  DBUG_PRINT("info", ("value %u", tupleId));
  DBUG_PRINT("info", ("value %ul", (ulong) tupleId));
  DBUG_RETURN(tupleId);
}

@@ -829,7 +830,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable)
    DBUG_RETURN(~(Uint64)0);
  const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable);
  Uint64 tupleId = readTupleIdFromNdb(table->m_tableId);
  DBUG_PRINT("info", ("value %u", tupleId));
  DBUG_PRINT("info", ("value %ul", (ulong) tupleId));
  DBUG_RETURN(tupleId);
}

+5 −2
Original line number Diff line number Diff line
@@ -3050,8 +3050,10 @@ void ha_ndbcluster::start_bulk_insert(ha_rows rows)
  
  m_rows_inserted= (ha_rows) 0;
  if (rows == (ha_rows) 0)
  {
    /* We don't know how many will be inserted, guess */
    m_rows_to_insert= m_autoincrement_prefetch;
  }
  else
    m_rows_to_insert= rows; 

@@ -4174,8 +4176,10 @@ ulonglong ha_ndbcluster::get_auto_increment()
  Ndb *ndb= get_ndb();
   
  if (m_rows_inserted > m_rows_to_insert)
  {
    /* We guessed too low */
    m_rows_to_insert+= m_autoincrement_prefetch;
  }
  cache_size= 
    (int)
    (m_rows_to_insert - m_rows_inserted < m_autoincrement_prefetch) ?
@@ -6101,8 +6105,8 @@ const
COND* 
ha_ndbcluster::cond_push(const COND *cond) 
{ 
  Ndb_cond_stack *ndb_cond = new Ndb_cond_stack();
  DBUG_ENTER("cond_push");
  Ndb_cond_stack *ndb_cond = new Ndb_cond_stack();
  DBUG_EXECUTE("where",print_where((COND *)cond, m_tabname););
  if (m_cond_stack)
    ndb_cond->next= m_cond_stack;
@@ -6118,7 +6122,6 @@ ha_ndbcluster::cond_push(const COND *cond)
  {
    cond_pop();
  }

  DBUG_RETURN(cond); 
}

+8 −10
Original line number Diff line number Diff line
@@ -5403,10 +5403,15 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
          tab->select_cond=sel->cond=tmp;
	  if (thd->variables.engine_condition_pushdown)
          {
            COND *push_cond= 
              make_cond_for_table(cond,current_map,current_map);
            tab->table->file->pushed_cond= NULL;
            if (push_cond)
            {
              /* Push condition to handler */
            if (!tab->table->file->cond_push(tmp))
              tab->table->file->pushed_cond= tmp;
              if (!tab->table->file->cond_push(push_cond))
                tab->table->file->pushed_cond= push_cond;
            }
          }
        }
        else
@@ -5530,13 +5535,6 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
		thd->memdup((gptr) sel, sizeof(SQL_SELECT));
	      tab->cache.select->cond=tmp;
	      tab->cache.select->read_tables=join->const_table_map;
	      if (thd->variables.engine_condition_pushdown &&
		  (!tab->table->file->pushed_cond))
              {
		/* Push condition to handler */
		if (!tab->table->file->cond_push(tmp))
                  tab->table->file->pushed_cond= tmp;
              }
	    }
	  }
	}