Below is the list of changes that have just been committed into a local
5.1 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@stripped, 2007-10-14 16:46:46+02:00, tomas@stripped +1 -0
add assertion for not overrunning allocated buffer
sql/ha_ndbcluster.cc@stripped, 2007-10-14 16:46:42+02:00, tomas@stripped +2 -0
add assertion for not overrunning allocated buffer
diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc 2007-09-27 19:05:47 +02:00
+++ b/sql/ha_ndbcluster.cc 2007-10-14 16:46:42 +02:00
@@ -675,6 +675,7 @@ ha_ndbcluster::set_hidden_key(uchar *row
{
/* The hidden primary key is stored just after the normal row data. */
uint32 offset= offset_hidden_key();
+ DBUG_ASSERT(offset + NDB_HIDDEN_PRIMARY_KEY_LENGTH <= table->s->reclength + m_extra_reclength);
memcpy(&row[offset], &auto_value, NDB_HIDDEN_PRIMARY_KEY_LENGTH);
}
@@ -720,6 +721,7 @@ ha_ndbcluster::set_partition_function_va
/* The partition function value is stored just after the hidden primary
key (if any). */
uint32 offset= offset_user_partition_function();
+ DBUG_ASSERT(offset + 4 <= table->s->reclength + m_extra_reclength);
memcpy(&row[offset], &func_value, 4);
}
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2654) | tomas | 14 Oct |