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@stripped, 2007-03-07 12:22:10+01:00, mats@romeo.(none) +8 -0
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b22583-mysql-5.1-new-rpl
MERGE: 1.2390.23.6
mysql-test/extra/binlog_tests/binlog.test@stripped, 2007-03-07 12:15:30+01:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.15.1.1
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test@stripped, 2007-03-07 12:15:30+01:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.6.1.1
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-03-07 12:15:30+01:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.32.1.1
mysql-test/r/binlog_row_binlog.result@stripped, 2007-03-07 12:22:06+01:00, mats@romeo.(none) +0 -0
Manual merge
MERGE: 1.10.1.1
mysql-test/t/rpl_row_create_table.test@stripped, 2007-03-07 12:15:30+01:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.8.1.2
sql/log_event.cc@stripped, 2007-03-07 12:22:06+01:00, mats@romeo.(none) +0 -2
Manual merge
MERGE: 1.262.2.3
sql/log_event.h@stripped, 2007-03-07 12:15:33+01:00, mats@romeo.(none) +0 -0
Auto merged
MERGE: 1.145.2.2
sql/sql_class.cc@stripped, 2007-03-07 12:22:06+01:00, mats@romeo.(none) +0 -1
Manual merge
MERGE: 1.306.1.1
# 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.(none)
# Root: /home/bk/b22583-mysql-5.1-new-rpl/RESYNC
--- 1.273/sql/log_event.cc 2007-03-07 12:22:20 +01:00
+++ 1.274/sql/log_event.cc 2007-03-07 12:22:20 +01:00
@@ -1000,7 +1000,8 @@
ev = new Execute_load_query_log_event(buf, event_len, description_event);
break;
default:
- DBUG_PRINT("error",("Unknown evernt code: %d",(int) buf[EVENT_TYPE_OFFSET]));
+ DBUG_PRINT("error",("Unknown event code: %d",
+ (int) buf[EVENT_TYPE_OFFSET]));
ev= NULL;
break;
}
@@ -5595,10 +5596,10 @@
row_end Pointer to variable that will hold the value of the
one-after-end position for the row
master_reclength
- Pointer to variable that will be set to the length of the
- record on the master side
- rw_set Pointer to bitmap that holds either the read_set or the
- write_set of the table
+ Pointer to variable that will be set to the length of the
+ record on the master side
+ rw_set Pointer to bitmap that holds either the read_set or the
+ write_set of the table
DESCRIPTION
@@ -5626,68 +5627,74 @@
static int
unpack_row(RELAY_LOG_INFO *rli,
TABLE *table, uint const colcnt,
- char const *row, MY_BITMAP const *cols,
- char const **row_end, ulong *master_reclength,
+ char const *const row_data, MY_BITMAP const *cols,
+ char const **const row_end, ulong *const master_reclength,
MY_BITMAP* const rw_set, Log_event_type const event_type)
{
- byte *const record= table->record[0];
DBUG_ENTER("unpack_row");
- DBUG_ASSERT(record && row);
- DBUG_PRINT("enter", ("row: 0x%lx table->record[0]: 0x%lx", (long) row, (long) record));
- my_size_t master_null_bytes= table->s->null_bytes;
-
- if (colcnt != table->s->fields)
- {
- Field **fptr= &table->field[colcnt-1];
- do
- master_null_bytes= (*fptr)->last_null_byte();
- while (master_null_bytes == Field::LAST_NULL_BYTE_UNDEF &&
- fptr-- > table->field);
-
- /*
- If master_null_bytes is LAST_NULL_BYTE_UNDEF (0) at this time,
- there were no nullable fields nor BIT fields at all in the
- columns that are common to the master and the slave. In that
- case, there is only one null byte holding the X bit.
+ DBUG_ASSERT(row_data);
+ my_size_t const master_null_byte_count= (bitmap_bits_set(cols) + 7) / 8;
+ int error= 0;
- OBSERVE! There might still be nullable columns following the
- common columns, so table->s->null_bytes might be greater than 1.
- */
- if (master_null_bytes == Field::LAST_NULL_BYTE_UNDEF)
- master_null_bytes= 1;
- }
+ char const *null_ptr= row_data;
+ char const *pack_ptr= row_data + master_null_byte_count;
- DBUG_ASSERT(master_null_bytes <= table->s->null_bytes);
- memcpy(record, row, master_null_bytes); // [1]
- int error= 0;
+ bitmap_clear_all(rw_set);
- bitmap_set_all(rw_set);
+ memcpy(table->record[0], table->s->default_values, table->s->null_bytes);
Field **const begin_ptr = table->field;
Field **field_ptr;
- char const *ptr= row + master_null_bytes;
Field **const end_ptr= begin_ptr + colcnt;
+
+ DBUG_ASSERT(null_ptr < row_data + master_null_byte_count);
+
+ // Mask to mask out the correct bit among the null bits
+ unsigned int null_mask= 1U;
+ // The "current" null bits
+ unsigned int null_bits= *null_ptr++;
for (field_ptr= begin_ptr ; field_ptr < end_ptr ; ++field_ptr)
{
Field *const f= *field_ptr;
if (bitmap_is_set(cols, field_ptr - begin_ptr))
{
- DBUG_ASSERT((const char *)table->record[0] <= f->ptr);
- DBUG_ASSERT(f->ptr < (char*)(table->record[0] + table->s->reclength +
- (f->pack_length_in_rec() == 0)));
-
- DBUG_PRINT("info", ("unpacking column '%s' to 0x%lx", f->field_name,
- (long) f->ptr));
- ptr= f->unpack(f->ptr, ptr);
+ if ((null_mask & 0xFF) == 0)
+ {
+ DBUG_ASSERT(null_ptr < row_data + master_null_byte_count);
+ null_mask= 1U;
+ null_bits= *null_ptr++;
+ }
+
+ DBUG_ASSERT(null_mask & 0xFF); // One of the 8 LSB should be set
+
/* Field...::unpack() cannot return 0 */
- DBUG_ASSERT(ptr != NULL);
+ DBUG_ASSERT(pack_ptr != NULL);
+
+ if ((null_bits & null_mask) && f->maybe_null())
+ f->set_null();
+ else
+ {
+ f->set_notnull();
+
+ /*
+ We only unpack the field if it was non-null
+ */
+ pack_ptr= f->unpack(f->ptr, pack_ptr);
+ }
+
+ bitmap_set_bit(rw_set, field_ptr - begin_ptr);
+ null_mask <<= 1;
}
- else
- bitmap_clear_bit(rw_set, field_ptr - begin_ptr);
}
- *row_end = ptr;
+ /*
+ We should now have read all the null bytes, otherwise something is
+ really wrong.
+ */
+ DBUG_ASSERT(null_ptr == row_data + master_null_byte_count);
+
+ *row_end = pack_ptr;
if (master_reclength)
{
if (*field_ptr)
@@ -5712,9 +5719,8 @@
uint32 const mask= NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG;
Field *const f= *field_ptr;
- DBUG_PRINT("info", ("processing column '%s' @ 0x%lx", f->field_name,
- (long) f->ptr));
- if (event_type == WRITE_ROWS_EVENT && (f->flags & mask) == mask)
+ if (event_type == WRITE_ROWS_EVENT &&
+ ((*field_ptr)->flags & mask) == mask)
{
slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD,
"Field `%s` of table `%s`.`%s` "
@@ -6980,6 +6986,8 @@
DBUG_ASSERT(table->in_use != NULL);
+ DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
+
if ((table->file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION) &&
table->s->primary_key < MAX_KEY)
{
@@ -7080,15 +7088,19 @@
while (record_compare(table))
{
int error;
+
/*
We need to set the null bytes to ensure that the filler bit
are all set when returning. There are storage engines that
just set the necessary bits on the bytes and don't set the
filler bits correctly.
*/
- my_ptrdiff_t const pos=
- table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
- table->record[1][pos]= 0xFF;
+ if (table->s->null_bytes > 0)
+ {
+ table->record[1][table->s->null_bytes - 1]|=
+ 256U - (1U << table->s->last_null_bit_pos);
+ }
+
if ((error= table->file->index_next(table->record[1])))
{
table->file->print_error(error, MYF(0));
@@ -7115,15 +7127,19 @@
do
{
/*
- We need to set the null bytes to ensure that the filler bit
- are all set when returning. There are storage engines that
- just set the necessary bits on the bytes and don't set the
- filler bits correctly.
+ Patching the record before calling rnd_next() since some
+ storage engines do not set the filler bits correctly.
*/
- my_ptrdiff_t const pos=
- table->s->null_bytes > 0 ? table->s->null_bytes - 1 : 0;
- table->record[1][pos]= 0xFF;
+ if (table->s->null_bytes > 0)
+ {
+ table->record[1][table->s->null_bytes - 1]|=
+ 256U - (1U << table->s->last_null_bit_pos);
+ }
+
error= table->file->rnd_next(table->record[1]);
+
+ DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
+ DBUG_DUMP("record[1]", table->record[1], table->s->reclength);
switch (error)
{
--- 1.149/sql/log_event.h 2007-03-07 12:22:20 +01:00
+++ 1.150/sql/log_event.h 2007-03-07 12:22:20 +01:00
@@ -468,10 +468,23 @@
XID_EVENT= 16,
BEGIN_LOAD_QUERY_EVENT= 17,
EXECUTE_LOAD_QUERY_EVENT= 18,
+
TABLE_MAP_EVENT = 19,
- WRITE_ROWS_EVENT = 20,
- UPDATE_ROWS_EVENT = 21,
- DELETE_ROWS_EVENT = 22,
+
+ /*
+ These event numbers were used for 5.1.0 to 5.1.15 and are
+ therefore obsolete.
+ */
+ PRE_GA_WRITE_ROWS_EVENT = 20,
+ PRE_GA_UPDATE_ROWS_EVENT = 21,
+ PRE_GA_DELETE_ROWS_EVENT = 22,
+
+ /*
+ These event numbers are used from 5.1.16 and forward
+ */
+ WRITE_ROWS_EVENT = 23,
+ UPDATE_ROWS_EVENT = 24,
+ DELETE_ROWS_EVENT = 25,
/*
Add new events here - right above this comment!
--- 1.318/sql/sql_class.cc 2007-03-07 12:22:20 +01:00
+++ 1.319/sql/sql_class.cc 2007-03-07 12:22:20 +01:00
@@ -2505,30 +2505,113 @@
}
-my_size_t THD::pack_row(TABLE *table, MY_BITMAP const* cols, byte *row_data,
- const byte *record) const
+/*
+ Pack a record of data for a table into a format suitable for
+ transfer via the binary log.
+
+ SYNOPSIS
+ THD::pack_row()
+ table Table describing the format of the record
+ cols Bitmap with a set bit for each column that should be
+ stored in the row
+ row_data Pointer to memory where row will be written
+ record Pointer to record that should be packed. It is assumed
+ that the pointer refers to either record[0] or
+ record[1], but no such check is made since the code does
+ not rely on that.
+
+ DESCRIPTION
+
+ The format for a row in transfer with N fields is the following:
+
+ ceil(N/8) null bytes:
+ One null bit for every column *regardless of whether it can be
+ null or not*. This simplifies the decoding. Observe that the
+ number of null bits is equal to the number of set bits in the
+ 'cols' bitmap. The number of null bytes is the smallest number
+ of bytes necessary to store the null bits.
+
+ Padding bits are 1.
+
+ N packets:
+ Each field is stored in packed format.
+
+
+ RETURN VALUE
+
+ The number of bytes written at 'row_data'.
+ */
+my_size_t
+THD::pack_row(TABLE *table, MY_BITMAP const* cols,
+ byte *const row_data, const byte *record) const
{
Field **p_field= table->field, *field;
- int n_null_bytes= table->s->null_bytes;
- byte *ptr;
- uint i;
+ int const null_byte_count= (bitmap_bits_set(cols) + 7) / 8;
+ byte *pack_ptr = row_data + null_byte_count;
+ byte *null_ptr = row_data;
my_ptrdiff_t const rec_offset= record - table->record[0];
my_ptrdiff_t const def_offset= table->s->default_values - table->record[0];
- memcpy(row_data, record, n_null_bytes);
- ptr= row_data+n_null_bytes;
- for (i= 0 ; (field= *p_field) ; i++, p_field++)
+ /*
+ We write the null bits and the packed records using one pass
+ through all the fields. The null bytes are written little-endian,
+ i.e., the first fields are in the first byte.
+ */
+ unsigned int null_bits= (1U << 8) - 1;
+ // Mask to mask out the correct but among the null bits
+ unsigned int null_mask= 1U;
+ for ( ; (field= *p_field) ; p_field++)
{
- if (bitmap_is_set(cols,i))
+ DBUG_PRINT("debug", ("null_mask=%d; null_ptr=%p; row_data=%p; null_byte_count=%d",
+ null_mask, null_ptr, row_data, null_byte_count));
+ if (bitmap_is_set(cols, p_field - table->field))
{
- my_ptrdiff_t const offset=
- field->is_null((uint) rec_offset) ? def_offset : rec_offset;
- field->move_field_offset(offset);
- ptr= (byte*)field->pack((char *) ptr, field->ptr);
- field->move_field_offset(-offset);
+ my_ptrdiff_t offset;
+ if (field->is_null(rec_offset))
+ {
+ offset= def_offset;
+ null_bits |= null_mask;
+ }
+ else
+ {
+ offset= rec_offset;
+ null_bits &= ~null_mask;
+
+ /*
+ We only store the data of the field if it is non-null
+ */
+ field->move_field_offset(offset);
+ pack_ptr= (byte*)field->pack((char *) pack_ptr, field->ptr);
+ field->move_field_offset(-offset);
+ }
+
+ null_mask <<= 1;
+ if ((null_mask & 0xFF) == 0)
+ {
+ DBUG_ASSERT(null_ptr < row_data + null_byte_count);
+ null_mask = 1U;
+ *null_ptr++ = null_bits;
+ null_bits= (1U << 8) - 1;
+ }
}
}
- return (static_cast<my_size_t>(ptr - row_data));
+
+ /*
+ Write the last (partial) byte, if there is one
+ */
+ if ((null_mask & 0xFF) > 1)
+ {
+ DBUG_ASSERT(null_ptr < row_data + null_byte_count);
+ *null_ptr++ = null_bits;
+ }
+
+ /*
+ The null pointer should now point to the first byte of the
+ packed data. If it doesn't, something is very wrong.
+ */
+ DBUG_ASSERT(null_ptr == row_data + null_byte_count);
+
+ return static_cast<my_size_t>(pack_ptr - row_data);
}
--- 1.36/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-03-07 12:22:20 +01:00
+++ 1.37/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-03-07 12:22:20 +01:00
@@ -31,7 +31,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
delete from t1;
delete from t2;
@@ -45,7 +45,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
delete from t1;
delete from t2;
@@ -61,7 +61,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
delete from t1;
delete from t2;
@@ -79,7 +79,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
# and when ROLLBACK is not explicit?
delete from t1;
@@ -101,7 +101,7 @@
select get_lock("a",10);
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
# and when not in a transact1on?
delete from t1;
@@ -113,7 +113,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
# Check that when the query updat1ng the MyISAM table is the first in the
# transaction, we log it immediately.
@@ -126,13 +126,13 @@
insert into t2 select * from t1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
insert into t1 values(11);
commit;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
# Check that things work like before this BEGIN/ROLLBACK code was added,
@@ -151,7 +151,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
delete from t1;
delete from t2;
@@ -164,7 +164,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
delete from t1;
delete from t2;
@@ -180,7 +180,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
delete from t1;
delete from t2;
@@ -198,7 +198,7 @@
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
# Test for BUG#5714, where a MyISAM update in the transaction used to
# release row-level locks in InnoDB
@@ -259,7 +259,7 @@
select get_lock("lock1",60);
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
do release_lock("lock1");
drop table t0,t2;
@@ -326,7 +326,7 @@
DROP TABLE t1,t2;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
# binlog). Has to be here and not earlier, as the SELECTs influence
--- 1.7/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test 2007-03-07 12:22:20 +01:00
+++ 1.8/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test 2007-03-07 12:22:20 +01:00
@@ -28,7 +28,7 @@
EXECUTE stmt1 USING @var1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 102;
+SHOW BINLOG EVENTS FROM 105;
SELECT HEX(f1) FROM t1;
DROP table t1;
# end test for bug#11338
--- 1.11/mysql-test/r/binlog_row_binlog.result 2007-03-07 12:22:20 +01:00
+++ 1.12/mysql-test/r/binlog_row_binlog.result 2007-03-07 12:22:20 +01:00
@@ -8,7 +8,7 @@
begin;
insert t2 values (5);
commit;
-show binlog events from 102;
+show binlog events from 105;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
@@ -26,7 +26,7 @@
begin;
commit;
drop table t1;
-show binlog events in 'master-bin.000001' from 102;
+show binlog events in 'master-bin.000001' from 105;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
master-bin.000001 # Query 1 # use `test`; BEGIN
@@ -232,7 +232,7 @@
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Xid 1 # COMMIT /* xid= */
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002' from 102;
+show binlog events in 'master-bin.000002' from 105;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
reset master;
@@ -254,7 +254,7 @@
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
-show binlog events from 102;
+show binlog events from 105;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
@@ -279,7 +279,7 @@
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
-show binlog events from 102;
+show binlog events from 105;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
--- 1.9/mysql-test/t/rpl_row_create_table.test 2007-03-07 12:22:20 +01:00
+++ 1.10/mysql-test/t/rpl_row_create_table.test 2007-03-07 12:22:20 +01:00
@@ -34,9 +34,9 @@
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
---replace_column 1 # 4 # 5 #
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---query_vertical SHOW BINLOG EVENTS FROM 212
+--query_vertical SHOW BINLOG EVENTS FROM 215
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t1
--query_vertical SHOW CREATE TABLE t2
@@ -70,8 +70,9 @@
--error ER_DUP_ENTRY_WITH_KEY_NAME
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
# Shouldn't be written to the binary log
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1118;
+SHOW BINLOG EVENTS FROM 1097;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
@@ -79,8 +80,9 @@
INSERT INTO t7 SELECT a,b FROM tt3;
SELECT * FROM t7 ORDER BY a,b;
# Should be written to the binary log
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1118;
+SHOW BINLOG EVENTS FROM 1097;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -90,8 +92,9 @@
BEGIN;
INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1314;
+SHOW BINLOG EVENTS FROM 1293;
SELECT * FROM t7 ORDER BY a,b;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -105,8 +108,9 @@
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t8
--query_vertical SHOW CREATE TABLE t9
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1410;
+SHOW BINLOG EVENTS FROM 1389;
sync_slave_with_master;
--echo **** On Slave ****
--query_vertical SHOW CREATE TABLE t8
@@ -156,6 +160,7 @@
SELECT * FROM t2 ORDER BY a;
SELECT * FROM t3 ORDER BY a;
SELECT * FROM t4 ORDER BY a;
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS;
sync_slave_with_master;
@@ -201,6 +206,7 @@
COMMIT;
SELECT * FROM t2 ORDER BY a;
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS;
sync_slave_with_master;
@@ -219,8 +225,9 @@
ROLLBACK;
SELECT * FROM t2 ORDER BY a;
+--replace_column 1 # 4 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 627;
+SHOW BINLOG EVENTS FROM 630;
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
--- 1.16/mysql-test/extra/binlog_tests/binlog.test 2007-03-07 12:22:20 +01:00
+++ 1.17/mysql-test/extra/binlog_tests/binlog.test 2007-03-07 12:22:20 +01:00
@@ -22,7 +22,7 @@
# first COMMIT must be Query_log_event, second - Xid_log_event
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
drop table t1,t2;
#
@@ -44,10 +44,10 @@
drop table t1;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events in 'master-bin.000001' from 102;
+show binlog events in 'master-bin.000001' from 105;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events in 'master-bin.000002' from 102;
+show binlog events in 'master-bin.000002' from 105;
# Test of a too big SET INSERT_ID: see if the truncated value goes
# into binlog (right), or the too big value (wrong); we look at the
@@ -82,7 +82,7 @@
use test;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events from 102;
+show binlog events from 105;
drop table t1,t2,t3,tt1;
-- source extra/binlog_tests/binlog_insert_delayed.test
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.2472) | Mats Kindahl | 7 Mar |