Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats 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.1824 05/04/26 10:49:11 mats@stripped +2 -0
Merge
sql/sql_class.cc
1.182 05/04/26 10:49:10 mats@stripped +0 -0
SCCS merged
sql/sql_class.h
1.236 05/04/26 10:46:51 mats@stripped +0 -0
Auto merged
# 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: mats
# Host: romeo.kindahl.net
# Root: /home/bk/w2325-mysql-5.1/RESYNC
--- 1.181/sql/sql_class.cc 2005-04-26 09:05:04 +02:00
+++ 1.182/sql/sql_class.cc 2005-04-26 10:49:10 +02:00
@@ -1991,8 +1991,8 @@
}
size_t THD::
-pack_row(TABLE *table, byte *row_data, size_t max_size,
- const byte *record) const
+pack_row(TABLE *table, bitvector const& cols, byte *row_data,
+ size_t max_size, const byte *record) const
{
DBUG_ENTER("THD::pack_row");
DBUG_PRINT("enter", ("row_data = %p, max_size = %lu, record = %p",
@@ -2005,19 +2005,23 @@
memcpy(row_data, record, table->s->null_bytes);
ptr += table->s->null_bytes;
- for ( Field **field = table->field ; *field ; ++field)
+ for (unsigned int i = 0 ; i < table->s->fields ; i++)
{
- ptrdiff_t const offset = (*field)->offset();
- ptr = (*field)->pack(ptr, record + offset);
+ if (cols.get_bit(i) == 0)
+ continue; // Skip this field
+
+ ptrdiff_t const offset = table->field[i]->offset();
+ ptr = table->field[i]->pack(ptr, record + offset);
DBUG_PRINT("info", ("Packing length %d field '%s' from %p to %p + %d",
- (*field)->field_length, (*field)->field_name,
+ table->field[i]->field_length,
+ table->field[i]->field_name,
ptr, record, offset));
}
- // ptrdiff_t is signed, size_t is unsigned. Check that the conversion
+ // ptrdiff_t is signed, size_t is unsigned. Assert that the conversion
// will work correctly.
DBUG_ASSERT(ptr - row_data >= 0);
- size_t const size = (size_t) (ptr - row_data);
+ size_t const size = static_cast<size_t>(ptr - row_data);
DBUG_PRINT("return", ("size = %lu", size));
DBUG_RETURN(size);
}
@@ -2043,7 +2047,7 @@
*/
size_t const max_len = max_row_length(table, record);
byte* const row_data = my_malloc(max_len, MYF(MY_WME));
- size_t const len = pack_row(table, row_data, max_len, record);
+ size_t const len = pack_row(table, cols, row_data, max_len, record);
Rows_log_event* const
ev = thd->prepare_pending<Write_rows_log_event>(table, server_id, cols,
@@ -2087,9 +2091,9 @@
&after_row, after_maxlen,
NULL);
- size_t const before_size = pack_row(table, before_row,
+ size_t const before_size = pack_row(table, cols, before_row,
before_maxlen, before_record);
- size_t const after_size = pack_row(table, after_row,
+ size_t const after_size = pack_row(table, cols, after_row,
after_maxlen, after_record);
Rows_log_event* const
@@ -2130,7 +2134,7 @@
*/
size_t const max_len = max_row_length(table, record);
byte* const row_data = my_malloc(max_len, MYF(MY_WME));
- size_t const len = pack_row(table, row_data, max_len, record);
+ size_t const len = pack_row(table, cols, row_data, max_len, record);
Rows_log_event* const
ev = prepare_pending<Delete_rows_log_event>(table, server_id, cols,
--- 1.235/sql/sql_class.h 2005-04-22 20:56:07 +02:00
+++ 1.236/sql/sql_class.h 2005-04-26 10:46:51 +02:00
@@ -1112,8 +1112,8 @@
bool is_transactional);
size_t max_row_length(TABLE* table, const byte *data) const;
- size_t pack_row(TABLE* table, byte *row_data,
- size_t max_len, const byte *data) const;
+ size_t pack_row(TABLE* table, bitvector const& cols,
+ byte *row_data, size_t max_len, const byte *data) const;
int flush_pending_event(bool transaction_end);
int write_table_map(TABLE*,bool);
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.1824) | Mats Kindahl | 26 Apr |