Bug#16795 ndb_cache_multi2

- Change && to ||
 - Check for return value != 0 in "ndb->init()"


mysql-test/r/ndb_cache_multi2.result:
  Update test result
mysql-test/t/ndb_cache_multi2.test:
  Update test case
  - add printouts for what server the queries are from
  - Run the query from "while" once on server1 to cache it
sql/ha_ndbcluster.cc:
  && => ||, to call both the function "thd->store_global()" and "ndb->init()" 
  ndb_init returns 0 on sucess. Fail if not zero.
This commit is contained in:
unknown 2006-02-27 10:29:55 +01:00
commit 701bd9ed85
3 changed files with 19 additions and 21 deletions

View file

@ -6014,7 +6014,7 @@ pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused)))
ndb_util_thread= pthread_self();
thd->thread_stack= (char*)&thd; /* remember where our stack is */
if (thd->store_globals() && (ndb->init() != -1))
if (thd->store_globals() || (ndb->init() != 0))
{
thd->cleanup();
delete thd;