diff --git a/ndb/include/ndb_constants.h b/ndb/include/ndb_constants.h
index c7c15063cc5ce98eeb7e7fc992575bf6b0a80059..c292880749b12d01ab793c132e05f7efc5abf183 100644
--- a/ndb/include/ndb_constants.h
+++ b/ndb/include/ndb_constants.h
@@ -58,8 +58,8 @@
 #define NDB_TYPE_BLOB                   20
 #define NDB_TYPE_TEXT                   21
 #define NDB_TYPE_BIT                    22
-#define NDB_TYPE_LONG_VARCHAR           23
-#define NDB_TYPE_LONG_VARBINARY         24
+#define NDB_TYPE_LONGVARCHAR            23
+#define NDB_TYPE_LONGVARBINARY          24
 #define NDB_TYPE_TIME                   25
 #define NDB_TYPE_YEAR                   26
 #define NDB_TYPE_TIMESTAMP              27
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp
index 44851b709581256587bc7185d9eb604e191e2b8b..7a945c1c22e4d2736b58c2e09cbef9e1a488af88 100644
--- a/ndb/include/ndbapi/NdbDictionary.hpp
+++ b/ndb/include/ndbapi/NdbDictionary.hpp
@@ -197,8 +197,8 @@ public:
       Blob = NDB_TYPE_BLOB,        ///< Binary large object (see NdbBlob)
       Text = NDB_TYPE_TEXT,         ///< Text blob
       Bit = NDB_TYPE_BIT,          ///< Bit, length specifies no of bits
-      Longvarchar = NDB_TYPE_LONG_VARCHAR,  ///< Length bytes: 2, little-endian
-      Longvarbinary = NDB_TYPE_LONG_VARBINARY, ///< Length bytes: 2, little-endian
+      Longvarchar = NDB_TYPE_LONGVARCHAR,  ///< Length bytes: 2, little-endian
+      Longvarbinary = NDB_TYPE_LONGVARBINARY, ///< Length bytes: 2, little-endian
       Time = NDB_TYPE_TIME,        ///< Time without date
       Year = NDB_TYPE_YEAR,   ///< Year 1901-2155 (1 byte)
       Timestamp = NDB_TYPE_TIMESTAMP  ///< Unix time
diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp
index a59b9da39cd6e7ce5e7644c254fa1252491a052e..3e98dcd1805fd84dba0657a5a549489aa86d2357 100644
--- a/ndb/include/util/NdbSqlUtil.hpp
+++ b/ndb/include/util/NdbSqlUtil.hpp
@@ -88,8 +88,8 @@ public:
       Blob = NDB_TYPE_BLOB,
       Text = NDB_TYPE_TEXT,
       Bit = NDB_TYPE_BIT,
-      Longvarchar = NDB_TYPE_LONG_VARCHAR,
-      Longvarbinary = NDB_TYPE_LONG_VARBINARY,
+      Longvarchar = NDB_TYPE_LONGVARCHAR,
+      Longvarbinary = NDB_TYPE_LONGVARBINARY,
       Time = NDB_TYPE_TIME,
       Year = NDB_TYPE_YEAR,
       Timestamp = NDB_TYPE_TIMESTAMP,
diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp
index 34cfe2a60815b261c4ffa77328c37bfa314c520d..09e150dbacf4298f0efda4b6019d4b9596cd63c4 100644
--- a/ndb/src/common/util/NdbSqlUtil.cpp
+++ b/ndb/src/common/util/NdbSqlUtil.cpp
@@ -878,6 +878,8 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
   const Type& type = getType(typeId);
   switch (type.m_typeId) {
   case Type::Char:
+  case Type::Varchar:
+  case Type::Longvarchar:
     {
       const CHARSET_INFO *cs = (const CHARSET_INFO*)info;
       return
@@ -891,6 +893,7 @@ NdbSqlUtil::usable_in_pk(Uint32 typeId, const void* info)
   case Type::Undefined:
   case Type::Blob:
   case Type::Text:
+  case Type::Bit:
     break;
   default:
     return true;
@@ -912,6 +915,8 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
     return false;
   switch (type.m_typeId) {
   case Type::Char:
+  case Type::Varchar:
+  case Type::Longvarchar:
     {
       const CHARSET_INFO *cs = (const CHARSET_INFO*)info;
       return
@@ -926,6 +931,7 @@ NdbSqlUtil::usable_in_ordered_index(Uint32 typeId, const void* info)
   case Type::Undefined:
   case Type::Blob:
   case Type::Text:
+  case Type::Bit:       // can be fixed
     break;
   default:
     return true;
diff --git a/ndb/src/ndbapi/NdbOperationInt.cpp b/ndb/src/ndbapi/NdbOperationInt.cpp
index acfc80b3b694b633cfd4e9ab3804d10149e12c3e..41e0cb1d14017e073d07095d5e54a4d0560de9d7 100644
--- a/ndb/src/ndbapi/NdbOperationInt.cpp
+++ b/ndb/src/ndbapi/NdbOperationInt.cpp
@@ -1047,6 +1047,12 @@ NdbOperation::branch_col(Uint32 type,
     }
   }
 
+  Uint32 tempData[2000];
+  if (((UintPtr)val & 3) != 0) {
+    memcpy(tempData, val, len);
+    val = tempData;
+  }
+
   if (insertATTRINFO(Interpreter::BranchCol(c, 0, 0, false)) == -1)
     DBUG_RETURN(-1);