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
1.1928 05/06/02 23:25:54 tomas@stripped +5 -0
merge
sql/sql_class.cc
1.199 05/06/02 23:25:47 tomas@stripped +3 -3
merge
sql/log_event.h
1.125 05/06/02 23:25:47 tomas@stripped +2 -2
merge
sql/log_event.cc
1.203 05/06/02 23:25:47 tomas@stripped +7 -6
merge
sql/handler.cc
1.178 05/06/02 23:25:47 tomas@stripped +4 -4
merge
include/my_bitmap.h
1.17 05/06/02 23:25:47 tomas@stripped +4 -4
merge
# 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.1-wl2325
--- 1.177/sql/handler.cc 2005-06-02 20:23:17 +02:00
+++ 1.178/sql/handler.cc 2005-06-02 23:25:47 +02:00
@@ -54,7 +54,7 @@
#include <myisampack.h>
#include <errno.h>
-#define BITMAP_STACKBUF_SIZE 16
+#define BITMAP_STACKBUF_WORD_SIZE 4
/* static functions defined in this file */
@@ -2591,7 +2591,7 @@
{
MY_BITMAP cols;
// Potential buffer for the bitmap
- uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)];
+ uint32 bitbuf[BITMAP_STACKBUF_WORD_SIZE];
uint n_fields= table->s->fields;
my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8;
bitmap_init(&cols,
@@ -2636,7 +2636,7 @@
{
MY_BITMAP cols;
// Potential buffer for the bitmap
- uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)];
+ uint32 bitbuf[BITMAP_STACKBUF_WORD_SIZE];
uint n_fields= table->s->fields;
my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8;
bitmap_init(&cols,
@@ -2682,7 +2682,7 @@
{
MY_BITMAP cols;
// Potential buffer on the stack for the bitmap
- uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)];
+ uint32 bitbuf[BITMAP_STACKBUF_WORD_SIZE];
uint n_fields= table->s->fields;
my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8;
bitmap_init(&cols,
--- 1.202/sql/log_event.cc 2005-06-02 20:23:17 +02:00
+++ 1.203/sql/log_event.cc 2005-06-02 23:25:47 +02:00
@@ -4887,12 +4887,12 @@
m_is_transactional(is_transactional)
{
DBUG_ENTER("Rows_log_event::Rows_log_event(THD*, ...)");
- DBUG_PRINT("enter", ("cols->bitmap_size=%lu", cols->bitmap_size));
+ DBUG_PRINT("enter", ("cols->n_bits=%lu", cols->n_bits));
bitmap_init(&m_cols,
- cols->bitmap_size <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
- cols->bitmap_size,
+ cols->n_bits <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
+ cols->n_bits,
false);
- memcpy(m_cols.bitmap, cols->bitmap, (cols->bitmap_size+7)/8);
+ memcpy(m_cols.bitmap, cols->bitmap, no_bytes_in_map(cols));
DBUG_VOID_RETURN;
}
#endif
@@ -5212,12 +5212,13 @@
byte const sbuf[] = { m_width };
ptrdiff_t const data_size = m_rows_cur - m_rows_buf;
DBUG_PRINT("info", ("writing %d bytes",
- sizeof(sbuf) + (m_cols.bitmap_size+7)/8 + data_size));
+ sizeof(sbuf) + no_bytes_in_map(&m_cols) + data_size));
DBUG_PRINT("info", ("*m_cols.bitmap=0x%x", *m_cols.bitmap & 0xFF));
DBUG_ASSERT(m_width < 128);
DBUG_DUMP("rows_data", m_rows_buf, data_size);
DBUG_RETURN(my_b_safe_write(file, sbuf, sizeof(sbuf)) ||
- my_b_safe_write(file, reinterpret_cast<byte*>(m_cols.bitmap), (m_cols.bitmap_size+7)/8) ||
+ my_b_safe_write(file, reinterpret_cast<byte*>(m_cols.bitmap),
+ no_bytes_in_map(&m_cols)) ||
my_b_safe_write(file, m_rows_buf, data_size));
}
--- 1.124/sql/log_event.h 2005-06-02 20:23:18 +02:00
+++ 1.125/sql/log_event.h 2005-06-02 23:25:47 +02:00
@@ -1809,8 +1809,8 @@
// Member functions to implement superclass interface
virtual int get_data_size() {
return
- ROWS_HEADER_LEN + 1 + m_cols.bitmap_size
- + (m_rows_cur - m_rows_buf);
+ ROWS_HEADER_LEN + 1 + no_bytes_in_map(&m_cols)
+ + (m_rows_cur - m_rows_buf);
}
MY_BITMAP const* get_cols() const {
--- 1.198/sql/sql_class.cc 2005-06-02 19:17:30 +02:00
+++ 1.199/sql/sql_class.cc 2005-06-02 23:25:47 +02:00
@@ -2101,7 +2101,7 @@
DBUG_ENTER("THD::write_row");
DBUG_PRINT("enter", ("cols = { size: %d, data = %p }; "
"table=%p (%s), record=%p",
- cols->bitmap_size, cols->bitmap,
+ cols->n_bits, cols->bitmap,
table, table->s->table_name, record));
if (!opt_binlog_row_level || !mysql_bin_log.is_open())
@@ -2162,7 +2162,7 @@
DBUG_PRINT("enter", ("cols = { size: %d, data = %p }; "
"table=%p (%s); "
"before=%p; after=%p",
- cols->bitmap_size, cols->bitmap,
+ cols->n_bits, cols->bitmap,
table, table->s->table_name,
before_record, after_record));
@@ -2226,7 +2226,7 @@
DBUG_ENTER("THD::delete_row");
DBUG_PRINT("enter", ("cols = { size: %d, data = %p }; "
"table=%p (%s), record=%p",
- cols->bitmap_size, cols->bitmap,
+ cols->n_bits, cols->bitmap,
table, table->s->table_name, record));
if (!opt_binlog_row_level || !mysql_bin_log.is_open())
--- 1.16/include/my_bitmap.h 2005-06-02 22:16:26 +02:00
+++ 1.17/include/my_bitmap.h 2005-06-02 23:25:47 +02:00
@@ -92,25 +92,25 @@
inline my_bool
bitmap_set_bit(MY_BITMAP *map,uint bit)
{
- DBUG_ASSERT(bit < (map)->bitmap_size);
+ DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_set_bit(map,bit);
}
inline my_bool
bitmap_flip_bit(MY_BITMAP *map,uint bit)
{
- DBUG_ASSERT(bit < (map)->bitmap_size);
+ DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_flip_bit(map,bit);
}
inline my_bool
bitmap_clear_bit(MY_BITMAP *map,uint bit)
{
- DBUG_ASSERT(bit < (map)->bitmap_size);
+ DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_clear_bit(map,bit);
}
inline my_bool
bitmap_is_set(const MY_BITMAP *map,uint bit)
{
- DBUG_ASSERT(bit < (map)->bitmap_size);
+ DBUG_ASSERT(bit < (map)->n_bits);
return _bitmap_is_set(map,bit);
}
#else
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.1928) | tomas | 2 Jun |