Below is the list of changes that have just been committed into a local
5.0 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1962 05/06/17 19:05:59 tomas@stripped +1 -0
optimization: remove unneccessary check for supported ndb type on every set/get
attribute
sql/ha_ndbcluster.cc
1.186 05/06/17 19:05:44 tomas@stripped +9 -24
optimization: remove unneccessary check for supported ndb type on every set/get
attribute
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql-5.0
--- 1.185/sql/ha_ndbcluster.cc 2005-06-10 10:33:41 +02:00
+++ 1.186/sql/ha_ndbcluster.cc 2005-06-17 19:05:44 +02:00
@@ -540,12 +540,10 @@
}
+#ifndef DEBUG_OFF
/*
Check if type is supported by NDB.
- TODO Use this once in open(), not in every operation
-
*/
-
static inline bool ndb_supported_type(enum_field_types type)
{
switch (type) {
@@ -581,7 +579,7 @@
}
return FALSE;
}
-
+#endif
/*
Instruct NDB to set the value of the hidden primary key
@@ -610,15 +608,10 @@
pack_len));
DBUG_DUMP("key", (char*)field_ptr, pack_len);
- if (ndb_supported_type(field->type()))
- {
- if (! (field->flags & BLOB_FLAG))
- // Common implementation for most field types
- DBUG_RETURN(ndb_op->equal(fieldnr, (char*) field_ptr, pack_len) != 0);
- }
- // Unhandled field types
- DBUG_PRINT("error", ("Field type %d not supported", field->type()));
- DBUG_RETURN(2);
+ DBUG_ASSERT(ndb_supported_type(field->type()));
+ DBUG_ASSERT(!(field->flags & BLOB_FLAG));
+ // Common implementation for most field types
+ DBUG_RETURN(ndb_op->equal(fieldnr, (char*) field_ptr, pack_len) != 0);
}
@@ -637,7 +630,7 @@
pack_len, field->is_null()?"Y":"N"));
DBUG_DUMP("value", (char*) field_ptr, pack_len);
- if (ndb_supported_type(field->type()))
+ DBUG_ASSERT(ndb_supported_type(field->type()));
{
// ndb currently does not support size 0
uint32 empty_field;
@@ -715,9 +708,6 @@
}
DBUG_RETURN(1);
}
- // Unhandled field types
- DBUG_PRINT("error", ("Field type %d not supported", field->type()));
- DBUG_RETURN(2);
}
@@ -812,9 +802,8 @@
if (field != NULL)
{
- DBUG_ASSERT(buf);
- if (ndb_supported_type(field->type()))
- {
+ DBUG_ASSERT(buf);
+ DBUG_ASSERT(ndb_supported_type(field->type()))
DBUG_ASSERT(field->ptr != NULL);
if (! (field->flags & BLOB_FLAG))
{
@@ -845,10 +834,6 @@
DBUG_RETURN(ndb_blob->setActiveHook(g_get_ndb_blobs_value, arg) != 0);
}
DBUG_RETURN(1);
- }
- // Unhandled field types
- DBUG_PRINT("error", ("Field type %d not supported", field->type()));
- DBUG_RETURN(2);
}
// Used for hidden key only
| Thread |
|---|
| • bk commit into 5.0 tree (tomas:1.1962) | tomas | 17 Jun |