List:Commits« Previous MessageNext Message »
From:jonas oreland Date:November 28 2010 11:48am
Subject:bzr push into mysql-5.1-telco-7.1 branch (jonas:3999 to 4000)
View as plain text  
 4000 jonas oreland	2010-11-28 [merge]
      ndb - merge 70 to 71

    added:
      storage/ndb/src/common/util/Vector.cpp
    modified:
      sql/ha_ndbcluster.cc
      storage/ndb/src/common/util/BaseString.cpp
      storage/ndb/src/common/util/CMakeLists.txt
      storage/ndb/src/common/util/Makefile.am
      storage/ndb/src/common/util/SparseBitmask.cpp
      storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
      storage/ndb/src/mgmclient/CommandInterpreter.cpp
      storage/ndb/src/mgmsrv/testConfig.cpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
      storage/ndb/test/ndbapi/testBasic.cpp
      storage/ndb/test/ndbapi/testBitfield.cpp
 3999 Magnus Blåudd	2010-11-26
      ndb - remove type_ndbapi.cmake from even more files

    modified:
      storage/ndb/clusterj/CMakeLists.txt
      storage/ndb/clusterj/clusterj-api/CMakeLists.txt
      storage/ndb/clusterj/clusterj-core/CMakeLists.txt
      storage/ndb/clusterj/clusterj-jpatest/CMakeLists.txt
      storage/ndb/clusterj/clusterj-openjpa/CMakeLists.txt
      storage/ndb/clusterj/clusterj-test/CMakeLists.txt
      storage/ndb/clusterj/clusterj-tie/CMakeLists.txt
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-11-24 17:45:27 +0000
+++ b/sql/ha_ndbcluster.cc	2010-11-28 11:38:05 +0000
@@ -3103,8 +3103,8 @@ inline int ha_ndbcluster::fetch_next(Ndb
                           (long) m_thd_ndb->m_unsent_bytes));
       if (m_thd_ndb->m_unsent_bytes)
       {
-        if (flush_bulk_insert() != 0)
-          DBUG_RETURN(-1);
+        if ((error = flush_bulk_insert()) != 0)
+          DBUG_RETURN(error);
       }
       contact_ndb= (local_check == 2);
     }
@@ -3309,8 +3309,11 @@ int ha_ndbcluster::ordered_index_scan(co
   if (m_active_cursor && (error= close_scan()))
     DBUG_RETURN(error);
 
-  if (m_active_cursor && (error= close_scan()))
-    DBUG_RETURN(error);
+  if (m_thd_ndb->m_unsent_bytes)
+  {
+    if ((error = flush_bulk_insert()) != 0)
+      DBUG_RETURN(error);
+  }
 
   const NdbOperation::LockMode lm = get_ndb_lock_mode(m_lock.type);
 
@@ -3430,6 +3433,12 @@ int ha_ndbcluster::full_table_scan(const
   DBUG_ENTER("full_table_scan");  
   DBUG_PRINT("enter", ("Starting new scan on %s", m_tabname));
 
+  if (m_thd_ndb->m_unsent_bytes)
+  {
+    if ((error = flush_bulk_insert()) != 0)
+      DBUG_RETURN(error);
+  }
+
   if (m_use_partition_pruning && m_user_defined_partitioning)
   {
     part_spec.start_part= 0;
@@ -11750,6 +11759,12 @@ ha_ndbcluster::read_multi_range_first(KE
   DBUG_ENTER("ha_ndbcluster::read_multi_range_first");
   DBUG_PRINT("info", ("blob fields=%d read_set=0x%x", table_share->blob_fields, table->read_set->bitmap[0]));
 
+  if (m_thd_ndb->m_unsent_bytes)
+  {
+    if ((error = flush_bulk_insert()) != 0)
+      DBUG_RETURN(error);
+  }
+
   /**
    * blobs and unique hash index with NULL can't be batched currently
    */

=== modified file 'storage/ndb/src/common/util/BaseString.cpp'
--- a/storage/ndb/src/common/util/BaseString.cpp	2010-09-21 07:36:08 +0000
+++ b/storage/ndb/src/common/util/BaseString.cpp	2010-11-28 11:34:01 +0000
@@ -646,5 +646,4 @@ TAPTEST(BaseString)
 
 #endif
 
-template class Vector<char *>;
 template class Vector<BaseString>;

=== modified file 'storage/ndb/src/common/util/CMakeLists.txt'
--- a/storage/ndb/src/common/util/CMakeLists.txt	2010-11-11 16:14:33 +0000
+++ b/storage/ndb/src/common/util/CMakeLists.txt	2010-11-28 11:34:01 +0000
@@ -53,6 +53,7 @@ ADD_LIBRARY(ndbgeneral STATIC
             Bitmask.cpp
 	    SparseBitmask.cpp
             require.c
+            Vector.cpp
 )
 TARGET_LINK_LIBRARIES(ndbgeneral ndbtrace ${ZLIB_LIBRARY} mysys)
 

=== modified file 'storage/ndb/src/common/util/Makefile.am'
--- a/storage/ndb/src/common/util/Makefile.am	2010-08-27 15:36:53 +0000
+++ b/storage/ndb/src/common/util/Makefile.am	2010-11-28 11:34:01 +0000
@@ -28,7 +28,7 @@ libgeneral_la_SOURCES = \
             strdup.c \
             ConfigValues.cpp ndb_init.cpp basestring_vsnprintf.c \
             Bitmask.cpp SparseBitmask.cpp parse_mask.hpp \
-	    ndb_rand.c require.c
+	    ndb_rand.c require.c Vector.cpp
 
 INCLUDES_LOC = @ZLIB_INCLUDES@
 

=== modified file 'storage/ndb/src/common/util/SparseBitmask.cpp'
--- a/storage/ndb/src/common/util/SparseBitmask.cpp	2010-11-11 09:46:05 +0000
+++ b/storage/ndb/src/common/util/SparseBitmask.cpp	2010-11-28 11:34:01 +0000
@@ -91,6 +91,3 @@ TAPTEST(SparseBitmask)
 }
 
 #endif
-
-template class Vector<unsigned>;
-

=== added file 'storage/ndb/src/common/util/Vector.cpp'
--- a/storage/ndb/src/common/util/Vector.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/src/common/util/Vector.cpp	2010-11-28 11:34:01 +0000
@@ -0,0 +1,27 @@
+/*
+   Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
+*/
+
+#include "Vector.hpp"
+
+template class Vector<int>;
+template class Vector<Uint8>;
+template class Vector<Uint16>;
+template class Vector<Uint32>;
+template class Vector<Uint64>;
+template class Vector<char*>;
+template class Vector<const char*>;
+template class Vector<Vector<Uint32> >;

=== modified file 'storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp'
--- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2010-05-24 08:04:47 +0000
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2010-11-28 11:34:01 +0000
@@ -1076,4 +1076,3 @@ main(int argc, char** argv)
 template class Vector<Chunk>;
 
 #endif
-template class Vector<Uint32>;

=== modified file 'storage/ndb/src/mgmclient/CommandInterpreter.cpp'
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2010-11-11 09:46:05 +0000
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2010-11-28 11:34:01 +0000
@@ -3181,6 +3181,3 @@ err:
   ndbout << "Invalid arguments: expected <NG>" << endl;
   return -1;
 }
-
-template class Vector<char const*>;
-template class Vector<int>;

=== modified file 'storage/ndb/src/mgmsrv/testConfig.cpp'
--- a/storage/ndb/src/mgmsrv/testConfig.cpp	2010-11-11 09:46:05 +0000
+++ b/storage/ndb/src/mgmsrv/testConfig.cpp	2010-11-28 11:34:01 +0000
@@ -471,6 +471,3 @@ TAPTEST(MgmConfig)
   ndb_end(0);
   return 1; // OK
 }
-
-template class Vector<const char*>;
-

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-11-09 20:40:03 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-11-28 11:34:01 +0000
@@ -8005,13 +8005,6 @@ NdbDictInterface::execCREATE_HASH_MAP_CO
   m_impl->theWaiter.signal(NO_WAIT);
 }
 
-
-
-template class Vector<int>;
-template class Vector<Uint8>;
-template class Vector<Uint16>;
-template class Vector<Uint32>;
-template class Vector<Vector<Uint32> >;
 template class Vector<NdbTableImpl*>;
 template class Vector<NdbColumnImpl*>;
 

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-10-06 12:35:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-11-28 11:34:01 +0000
@@ -3644,6 +3644,5 @@ EventBufData_hash::search(Pos& hpos, Ndb
   DBUG_VOID_RETURN_EVENT;
 }
 
-template class Vector<Uint64>;
 template class Vector<Gci_container_pod>;
 template class Vector<NdbEventBuffer::EventBufData_chunk*>;

=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp	2010-08-31 06:39:44 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp	2010-11-28 11:34:01 +0000
@@ -1491,8 +1491,6 @@ runBug28073(NDBT_Context *ctx, NDBT_Step
   return result;
 }
 
-template class Vector<Uint64>;
-
 int
 runBug20535(NDBT_Context* ctx, NDBT_Step* step)
 {

=== modified file 'storage/ndb/test/ndbapi/testBitfield.cpp'
--- a/storage/ndb/test/ndbapi/testBitfield.cpp	2010-09-03 05:35:51 +0000
+++ b/storage/ndb/test/ndbapi/testBitfield.cpp	2010-11-28 11:34:01 +0000
@@ -665,4 +665,3 @@ testBitmask()
 }
 
 template class Vector<Alloc>;
-template class Vector<Uint32>;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (jonas:3999 to 4000) jonas oreland28 Nov