3372 Luis Soares 2011-05-06 [merge]
BUG#12354268
Manual merge from mysql-5.5 into mysql-trunk.
Conflicts
=========
Text conflict in client/mysqlbinlog.cc
modified:
client/mysqlbinlog.cc
mysql-test/r/mysqlbinlog_base64.result
mysql-test/t/mysqlbinlog_base64.test
3371 Luis Soares 2011-05-06 [merge]
BUG#11762616: BUG#55229: 'POSTION'
Manual merge from mysql-5.5 into mysql-trunk.
Conflicts
=========
Text conflict in sql/handler.h
modified:
client/mysqltest.cc
extra/replace.c
mysql-test/suite/rpl/r/rpl_server_id2.result
mysql-test/suite/rpl/t/rpl_row_until.test
mysql-test/suite/rpl/t/rpl_server_id2.test
sql/handler.h
sql/rpl_slave.cc
storage/archive/ha_archive.cc
storage/ndb/src/kernel/blocks/lgman.cpp
vio/viosocket.c
3370 Luis Soares 2011-05-06 [merge]
BUG#12425925
Automerge (empty): mysql-5.5 --> mysql-trunk.
=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc 2011-03-29 13:56:27 +0000
+++ b/client/mysqlbinlog.cc 2011-05-05 23:59:11 +0000
@@ -935,7 +935,8 @@ Exit_status process_event(PRINT_EVENT_IN
row events.
*/
if (!print_event_info->printed_fd_event && !short_form &&
- ev_type != TABLE_MAP_EVENT && ev_type != ROWS_QUERY_LOG_EVENT)
+ ev_type != TABLE_MAP_EVENT && ev_type != ROWS_QUERY_LOG_EVENT &&
+ opt_base64_output_mode != BASE64_OUTPUT_DECODE_ROWS)
{
const char* type_str= ev->get_type_str();
if (opt_base64_output_mode == BASE64_OUTPUT_NEVER)
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2011-04-11 14:57:47 +0000
+++ b/client/mysqltest.cc 2011-05-05 23:52:44 +0000
@@ -10088,7 +10088,7 @@ int find_set(REP_SETS *sets,REP_SET *fin
return i;
}
}
- return i; /* return new postion */
+ return i; /* return new position */
}
/* find if there is a found_set with same table_offset & found_offset
@@ -10108,7 +10108,7 @@ int find_found(FOUND_SET *found_set,uint
found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset;
found_sets++;
- return -i-2; /* return new postion */
+ return -i-2; /* return new position */
}
/* Return 1 if regexp starts with \b or ends with \b*/
=== modified file 'extra/replace.c'
--- a/extra/replace.c 2010-07-23 20:16:29 +0000
+++ b/extra/replace.c 2011-05-05 23:50:31 +0000
@@ -1,17 +1,19 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA */
/*
Replace strings in textfile
@@ -818,7 +820,7 @@ static short find_set(REP_SETS *sets,REP
return (short) i;
}
}
- return (short) i; /* return new postion */
+ return (short) i; /* return new position */
}
@@ -841,7 +843,7 @@ static short find_found(FOUND_SET *found
found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset;
found_sets++;
- return (short) (-i-2); /* return new postion */
+ return (short) (-i-2); /* return new position */
}
/* Return 1 if regexp starts with \b or ends with \b*/
=== modified file 'mysql-test/r/mysqlbinlog_base64.result'
--- a/mysql-test/r/mysqlbinlog_base64.result 2008-07-28 07:15:20 +0000
+++ b/mysql-test/r/mysqlbinlog_base64.result 2011-05-05 22:48:15 +0000
@@ -109,3 +109,13 @@ count(*)
35840
drop table t1;
drop table t2;
+RESET MASTER;
+USE test;
+SET @old_binlog_format= @@binlog_format;
+SET SESSION binlog_format=ROW;
+CREATE TABLE t1(c1 INT);
+INSERT INTO t1 VALUES (1);
+FLUSH LOGS;
+DROP TABLE t1;
+SET SESSION binlog_format= @old_binlog_format;
+RESET MASTER;
=== modified file 'mysql-test/suite/rpl/r/rpl_server_id2.result'
--- a/mysql-test/suite/rpl/r/rpl_server_id2.result 2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_server_id2.result 2011-05-05 23:50:31 +0000
@@ -22,7 +22,7 @@ change master to master_port=MASTER_PORT
start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS;
include/wait_for_slave_io_to_start.inc
include/wait_for_slave_sql_to_stop.inc
-*** checking until postion execution: must be only t1 in the list ***
+*** checking until position execution: must be only t1 in the list ***
show tables;
Tables_in_test
t1
=== modified file 'mysql-test/suite/rpl/t/rpl_row_until.test'
--- a/mysql-test/suite/rpl/t/rpl_row_until.test 2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_until.test 2011-05-05 23:52:44 +0000
@@ -8,32 +8,32 @@
connection master;
CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1),(2),(3),(4);
-# Save master log postion for query DROP TABLE t1
+# Save master log position for query DROP TABLE t1
let $master_pos_drop_t1= query_get_value(SHOW MASTER STATUS, Position, 1);
DROP TABLE t1;
-# Save master log postion for query DROP TABLE t1
+# Save master log position for query DROP TABLE t1
save_master_pos;
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7);
let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7);
-# Save master log postion for query CREATE TABLE t2
+# Save master log position for query CREATE TABLE t2
let $master_pos_create_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
#show binlog events;
INSERT INTO t2 VALUES (1),(2);
-# Save master log postion for query INSERT INTO t2 VALUES (1),(2);
+# Save master log position for query INSERT INTO t2 VALUES (1),(2);
let $master_pos_insert1_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
#show binlog events;
-# Save relay log postion for query INSERT INTO t2 VALUES (1),(2);
+# Save relay log position for query INSERT INTO t2 VALUES (1),(2);
let $relay_pos_insert1_t2= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1);
connection master;
INSERT INTO t2 VALUES (3),(4);
DROP TABLE t2;
-# Save master log postion for query DROP TABLE t2;
+# Save master log position for query DROP TABLE t2;
let $master_pos_drop_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
#show binlog events;
=== modified file 'mysql-test/suite/rpl/t/rpl_server_id2.test'
--- a/mysql-test/suite/rpl/t/rpl_server_id2.test 2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_server_id2.test 2011-05-05 23:50:31 +0000
@@ -50,7 +50,7 @@ eval start slave until master_log_file='
--source include/wait_for_slave_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.inc
---echo *** checking until postion execution: must be only t1 in the list ***
+--echo *** checking until position execution: must be only t1 in the list ***
show tables;
# cleanup
=== modified file 'mysql-test/t/mysqlbinlog_base64.test'
--- a/mysql-test/t/mysqlbinlog_base64.test 2008-07-28 07:15:20 +0000
+++ b/mysql-test/t/mysqlbinlog_base64.test 2011-05-05 22:48:15 +0000
@@ -71,3 +71,32 @@ select count(*) from t2;
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
drop table t1;
drop table t2;
+
+#
+# BUG#12354268
+#
+# This test verifies that using --start-position with DECODE-ROWS
+# does not make mysqlbinlog to output an error stating that it
+# does not contain any FD event.
+#
+
+RESET MASTER;
+USE test;
+SET @old_binlog_format= @@binlog_format;
+SET SESSION binlog_format=ROW;
+CREATE TABLE t1(c1 INT);
+--let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $MYSQLD_DATADIR= `SELECT @@datadir`
+
+INSERT INTO t1 VALUES (1);
+
+FLUSH LOGS;
+
+--disable_result_log
+--exec $MYSQL_BINLOG --base64-output=DECODE-ROWS --start-position=$master_pos -v $MYSQLD_DATADIR/$master_binlog
+--enable_result_log
+
+DROP TABLE t1;
+SET SESSION binlog_format= @old_binlog_format;
+RESET MASTER;
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2011-04-26 08:49:10 +0000
+++ b/sql/handler.h 2011-05-05 23:52:44 +0000
@@ -3,18 +3,20 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA */
/* Definitions for parameters to do with handler-routines */
@@ -57,7 +59,7 @@
a table with rnd_next()
- We will see all rows (including deleted ones)
- Row positions are 'table->s->db_record_offset' apart
- If this flag is not set, filesort will do a postion() call for each matched
+ If this flag is not set, filesort will do a position() call for each matched
row to be able to find the row later.
*/
#define HA_REC_NOT_IN_SEQ (1 << 3)
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc 2011-04-28 16:50:10 +0000
+++ b/sql/rpl_slave.cc 2011-05-05 23:52:44 +0000
@@ -114,7 +114,7 @@ static const char *reconnect_messages[SL
registration on master",
"Reconnecting after a failed registration on master",
"failed registering on master, reconnecting to try again, \
-log '%s' at postion %s",
+log '%s' at position %s",
"COM_REGISTER_SLAVE",
"Slave I/O thread killed during or after reconnect"
},
@@ -122,7 +122,7 @@ log '%s' at postion %s",
"Waiting to reconnect after a failed binlog dump request",
"Slave I/O thread killed while retrying master dump",
"Reconnecting after a failed binlog dump request",
- "failed dump request, reconnecting to try again, log '%s' at postion %s",
+ "failed dump request, reconnecting to try again, log '%s' at position %s",
"COM_BINLOG_DUMP",
"Slave I/O thread killed during or after reconnect"
},
@@ -131,7 +131,7 @@ log '%s' at postion %s",
"Slave I/O thread killed while waiting to reconnect after a failed read",
"Reconnecting after a failed master event read",
"Slave I/O thread: Failed reading log event, reconnecting to retry, \
-log '%s' at postion %s",
+log '%s' at position %s",
"",
"Slave I/O thread killed during or after a reconnect done to recover from \
failed read"
=== modified file 'storage/archive/ha_archive.cc'
--- a/storage/archive/ha_archive.cc 2011-04-19 03:29:06 +0000
+++ b/storage/archive/ha_archive.cc 2011-05-05 23:52:44 +0000
@@ -1,17 +1,19 @@
-/* Copyright (C) 2003 MySQL AB, 2008-2009 Sun Microsystems, Inc
+/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA */
#include "sql_priv.h"
#include "probes_mysql.h"
@@ -918,7 +920,7 @@ int ha_archive::write_row(uchar *buf)
*/
azflush(&(share->archive_write), Z_SYNC_FLUSH);
/*
- Set the position of the local read thread to the beginning postion.
+ Set the position of the local read thread to the beginning position.
*/
if (read_data_header(&archive))
{
=== modified file 'storage/ndb/src/kernel/blocks/lgman.cpp'
--- a/storage/ndb/src/kernel/blocks/lgman.cpp 2008-02-08 14:17:45 +0000
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp 2011-05-05 23:46:53 +0000
@@ -1,17 +1,19 @@
-/* Copyright (C) 2003 MySQL AB
+/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA */
#include "lgman.hpp"
#include "diskpage.hpp"
@@ -2501,7 +2503,7 @@ Lgman::init_run_undo_log(Signal* signal)
sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
/**
- * Insert in correct postion in list of logfile_group's
+ * Insert in correct position in list of logfile_group's
*/
Ptr<Logfile_group> pos;
for(tmp.first(pos); !pos.isNull(); tmp.next(pos))
=== modified file 'vio/viosocket.c'
--- a/vio/viosocket.c 2011-04-29 21:48:23 +0000
+++ b/vio/viosocket.c 2011-05-05 23:50:31 +0000
@@ -1,17 +1,19 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2 of
+ the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA */
/*
Note that we can't have assertion on file descriptors; The reason for
@@ -865,7 +867,7 @@ size_t vio_read_shared_memory(Vio * vio,
{
size_t length;
size_t remain_local;
- char *current_postion;
+ char *current_position;
HANDLE events[2];
DBUG_ENTER("vio_read_shared_memory");
@@ -873,7 +875,7 @@ size_t vio_read_shared_memory(Vio * vio,
size));
remain_local = size;
- current_postion=buf;
+ current_position=buf;
events[0]= vio->event_server_wrote;
events[1]= vio->event_conn_closed;
@@ -907,11 +909,11 @@ size_t vio_read_shared_memory(Vio * vio,
if (length > remain_local)
length = remain_local;
- memcpy(current_postion,vio->shared_memory_pos,length);
+ memcpy(current_position,vio->shared_memory_pos,length);
vio->shared_memory_remain-=length;
vio->shared_memory_pos+=length;
- current_postion+=length;
+ current_position+=length;
remain_local-=length;
if (!vio->shared_memory_remain)
@@ -931,7 +933,7 @@ size_t vio_write_shared_memory(Vio * vio
{
size_t length, remain, sz;
HANDLE pos;
- const uchar *current_postion;
+ const uchar *current_position;
HANDLE events[2];
DBUG_ENTER("vio_write_shared_memory");
@@ -939,7 +941,7 @@ size_t vio_write_shared_memory(Vio * vio
size));
remain = size;
- current_postion = buf;
+ current_position = buf;
events[0]= vio->event_server_read;
events[1]= vio->event_conn_closed;
@@ -957,9 +959,9 @@ size_t vio_write_shared_memory(Vio * vio
int4store(vio->handle_map,sz);
pos = vio->handle_map + 4;
- memcpy(pos,current_postion,sz);
+ memcpy(pos,current_position,sz);
remain-=sz;
- current_postion+=sz;
+ current_position+=sz;
if (!SetEvent(vio->event_client_wrote))
DBUG_RETURN((size_t) -1);
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (luis.soares:3370 to 3372) Bug#12354268 | Luis Soares | 6 May |