Commit graph

45265 commits

Author SHA1 Message Date
unknown
4cb86e6e2e revert back to old show_binlog_events asto many test failures, and create a show_binlog_events2 instead
BitKeeper/etc/ignore:
  Added client/log_event_old.cc client/log_event_old.h client/rpl_record_old.cc client/rpl_record_old.h libmysqld/log_event_old.cc libmysqld/rpl_record.cc libmysqld/rpl_record_old.cc to the ignore list
mysql-test/include/show_binlog_events2.inc:
  New BitKeeper file ``mysql-test/include/show_binlog_events2.inc''
2007-04-18 23:08:56 +02:00
unknown
852bac883f Bug #27076
- test case


sql/ha_ndbcluster_binlog.cc:
  drop table not logged when it should
mysql-test/r/ndb_binlog_log_bin.result:
  New BitKeeper file ``mysql-test/r/ndb_binlog_log_bin.result''
mysql-test/t/ndb_binlog_log_bin.test:
  New BitKeeper file ``mysql-test/t/ndb_binlog_log_bin.test''
2007-04-18 21:39:45 +02:00
unknown
ca56499957 Bug #27076 Cluster does not honor SQL_LOG_BIN flag
- both for data schema operations
- also make sure schema events vet the right server id when injected into the binlog
- use same mechanism to signal server_id in bug#17095, and reserve some "id's" for flagging special conditions on the event, in this case do not log it
- enable printing of server ids in the testcases to show that we cot it right
2007-04-18 16:02:20 +02:00
unknown
b895ed4cdf Bug#17095 circular replication
- make sure any value is set for linked operations as well, e.g. blob tables
2007-04-18 15:58:30 +02:00
unknown
24964ff330 Reverting to use time_t instead of my_time_t since the latter caused
compile warnings on windows machines.
2007-04-17 08:39:38 +02:00
unknown
daf99c7028 Fixing test case and result file for rpl_ndb_circular_simplex.
mysql-test/r/rpl_ndb_circular_simplex.result:
  Result change
mysql-test/t/rpl_ndb_circular_simplex.test:
  Using master port on slave side instead of slave port (which should be
  used on master side).
2007-04-17 08:36:14 +02:00
unknown
7ad588c87f Merge romeo.(none):/home/bkroot/mysql-5.1-rpl
into  romeo.(none):/home/bk/b27779-mysql-5.1-rpl
2007-04-16 15:55:54 +02:00
unknown
9def7f651d Updating tests to eliminate some sporadic non-critical failures.
mysql-test/r/rpl_ndb_circular_simplex.result:
  Result change.
mysql-test/t/rpl_ndb_circular_simplex.test:
  Blanking out field that are not critical for the result.
2007-04-16 15:52:56 +02:00
unknown
a8bcc697ce Fixes to make it compile when using Sun CC and restoring some changes
done in previous patches.

There is an error in the Sun CC compiler that treats parameters that
differ in only qualifier as different, even though this is not
allowed by the standard (ISO/IEC 14882:2003, Section 13.1).


sql/log_event.cc:
  Removing const qualifier since it causes linker error.
sql/log_event.h:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere.  Renaming parameters to functions since they hide
  member variable (which causes warnings on Sun CC).
sql/rpl_record.cc:
  Removing const qualifier since it causes linker error.
sql/rpl_rli.cc:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere. Removing const qualifier since it causes linker error.
sql/rpl_rli.h:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere. Removing const qualifier since it causes linker error.
2007-04-13 19:19:10 +02:00
unknown
461608cc60 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  capulet.net:/home/bk/mysql-5.1-rpl
2007-04-13 18:19:38 +02:00
unknown
61aaf48d19 Yet another time_t fix.
sql/log_event.h:
  Changing time_t to my_time_t.
2007-04-13 15:40:22 +02:00
unknown
1540b7f4ff Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  capulet.net:/home/bk/mysql-5.1-rpl
2007-04-13 15:17:36 +02:00
unknown
3bea362009 Merge romeo.(none):/home/bkroot/mysql-5.1-rpl
into  romeo.(none):/home/bk/b27779-mysql-5.1-rpl
2007-04-13 14:59:49 +02:00
unknown
bb35cd04dd Fixing portability problem by using my_time_t instead of time_t.
sql/slave.cc:
  Using my_time_t instead of time_t.
2007-04-13 14:56:24 +02:00
unknown
0d3f926a1c WL#2735: Refactor replication
Factoring out pack_row() and unpack_row() into new files
rpl_record.{cc,h}.


libmysqld/Makefile.am:
  Adding file rpl_record.cc
sql/CMakeLists.txt:
  Adding file rpl_record.cc
sql/Makefile.am:
  Adding file rpl_record.cc and rpl_record.h
sql/log_event.cc:
  Moving implementation of unpack_row() into "rpl_record.cc".
  Adding inclusion of header file "rpl_record.h".
sql/log_event_old.cc:
  Signature of do_prepare_row() changed.
sql/log_event_old.h:
  Adding copyright.
sql/rpl_record_old.cc:
  Signature of do_prepare_row() changed.
sql/rpl_record_old.h:
  Adding copyright.
  Signature of do_prepare_row() changed.
sql/sql_class.cc:
  Moving implementation THD::pack_row() into "rpl_record.cc" and rewriting
  it to be a global function.
  Adding inclusion of header file "rpl_record.h".
sql/sql_class.h:
  Removing pack_row() as THD member function.
sql/rpl_record.cc:
  New BitKeeper file ``sql/rpl_record.cc''
sql/rpl_record.h:
  New BitKeeper file ``sql/rpl_record.h''
2007-04-13 14:55:28 +02:00
unknown
dc125bb3a0 BUG#17095 (Cluster RBR in circle does not terminate):
Updating result files with wrong server id for BEGIN and COMMIT
events.


mysql-test/r/rpl_ndb_log.result:
  Result mismatch.
2007-04-13 12:03:01 +02:00
unknown
9d38af2c95 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  capulet.net:/home/bk/mysql-5.1-rpl
2007-04-13 11:22:53 +02:00
unknown
5ca905a6b6 Fixing compile problem on some platforms resulting from building a
configuration with HAVE_REPLICATION undefined, which causes the
*_rows_log_event_old classes to only have a default constructor. This
generates an error on some platforms, since the base classes does 
not have a default constructor defined.

Updating signatures of do_prepare_row() for classes above, since
signatures in base classes changed.


sql/log_event_old.h:
  Adding constructor since when HAVE_REPLICATION is not defined, the
  class will not have any constructor, which generates an error on
  some platforms.  Updating signature of do_prepare_row() since
  signature changed in base classes.
2007-04-13 11:19:31 +02:00
unknown
d54c905f44 Fixing portability issues regarding use of time_t.
sql/rpl_rli.cc:
  Changing signature for stmt_done() to use my_time_t instead of time_t.
sql/rpl_rli.h:
  Changing signature for stmt_done() to use my_time_t instead of time_t.
  Changing last_master_timestamp to use my_time_t instead of time_t.
2007-04-13 10:40:22 +02:00
unknown
c301a05e78 Fixing result file
mysql-test/r/rpl_ndb_circular_simplex.result:
  Result change
2007-04-13 10:38:34 +02:00
unknown
bf0658105c Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  romeo.(none):/home/bkroot/mysql-5.1-rpl
2007-04-13 09:12:01 +02:00
unknown
337031f19f Merge romeo.(none):/home/bkroot/mysql-5.1-rpl
into  romeo.(none):/home/bk/b27779-mysql-5.1-rpl


sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
2007-04-13 08:55:03 +02:00
unknown
d8cb1181b5 Merge mysql.com:/home/bar/mysql-5.0.b20095
into  mysql.com:/home/bar/mysql-5.1-new-rpl


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/field_conv.cc:
  Auto merged
2007-04-13 10:08:52 +05:00
unknown
40dc6be623 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.0.b20095
2007-04-13 10:06:50 +05:00
unknown
2a4ab288fd Bug#20095 Changing length of VARCHAR field with UTF8 collation does not truncate values
Problem: single byte do_varstring1() function was called, which didn't
check limit on "number of character", and checked only "number of bytes".
Fix: adding a multi-byte aware function do_varstring1_mb(),
to limit on "number of characters"


mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
sql/field_conv.cc:
  Adding missing function to copy VARCHAR strings
  having one length byte.
2007-04-13 10:05:55 +05:00
unknown
83f394c773 remove warning 2007-04-12 16:33:39 +02:00
unknown
5256b5f303 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-rpl
2007-04-12 16:14:20 +02:00
unknown
f3d010f734 Bug#17095 circular replication for ndb
- test case
- reset server id in injector


client/mysqltest.c:
  save master pos for ndb should look at handled epoch instead of applied
sql/rpl_injector.cc:
  Bug#17095 circular replication for ndb
  - reset server id in injector
mysql-test/r/rpl_ndb_circular.result:
  New BitKeeper file ``mysql-test/r/rpl_ndb_circular.result''
mysql-test/t/rpl_ndb_circular.test:
  New BitKeeper file ``mysql-test/t/rpl_ndb_circular.test''
2007-04-12 16:13:49 +02:00
unknown
5c35b4174e BUG#27779 (Slave cannot read old rows log events):
Taking code from before BUG#22583 and incorporating as events to be able
to read old events. Also incorporating old pack and unpack functions
into patch.


client/Makefile.am:
  Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
client/mysqlbinlog.cc:
  Adding log_event_old.cc.
libmysqld/Makefile.am:
  Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
sql/CMakeLists.txt:
  Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
sql/Makefile.am:
  Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
sql/log_event.cc:
  Adding code to read pre-GA rows events.
sql/log_event.h:
  Refactoring to support inheritance and including "old" events definitions.
sql/log_event_old.cc:
  New BitKeeper file ``sql/log_event_old.cc''
sql/log_event_old.h:
  New BitKeeper file ``sql/log_event_old.h''
sql/rpl_record_old.cc:
  New BitKeeper file ``sql/rpl_record_old.cc''
sql/rpl_record_old.h:
  New BitKeeper file ``sql/rpl_record_old.h''
2007-04-12 15:50:54 +02:00
unknown
89bceacb96 BUG#25688 (RBR: circular replication may cause STMT_END_F flags to
be skipped):

Fixing test since a replace assumed that we were on slave when we were
on master.


mysql-test/r/rpl_ndb_circular_simplex.result:
  Result file change
mysql-test/t/rpl_ndb_circular_simplex.test:
  Incorrectly used MASTER_PORT instead of SLAVE_PORT for test. (This is
  circular replication, you know. The roles of slave and master is kind
  of blurred. Mea culpa.)
2007-04-12 14:14:50 +02:00
unknown
11fa402d7b Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  capulet.net:/home/bk/mysql-5.1-rpl
2007-04-12 13:22:11 +02:00
unknown
6dcd6aae13 Adding build file for Solaris on AMD64
BUILD/compile-solaris-amd64:
  New BitKeeper file ``BUILD/compile-solaris-amd64''
2007-04-12 13:20:38 +02:00
unknown
e36bbbef80 BUG#25688 (RBR: circular replication may cause STMT_END_F flags to be
skipped):

Post-merge changes.


sql/ha_ndbcluster.cc:
  Adding missing include file.
2007-04-12 10:05:55 +02:00
unknown
955cbc3ade Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b25688-mysql-5.1-rpl


sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/rpl_mi.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2007-04-12 09:10:45 +02:00
unknown
8baded90e4 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  romeo.(none):/home/bkroot/mysql-5.1-rpl


sql/mysqld.cc:
  Auto merged
2007-04-12 08:59:43 +02:00
unknown
6ed9fc6b7a BUG#25688 (RBR: circular replication may cause STMT_END_F flags to be
skipped):

By moving statement end actions from Rows_log_event::do_apply_event() to
Rows_log_event::do_update_pos() they will always be executed, even if
Rows_log_event::do_apply_event() is skipped because the event originated
at the same server. This because Rows_log_event::do_update_pos() is always
executed (unless Rows_log_event::do_apply_event() failed with an error,
in which case the slave stops with an error anyway). 

Adding test case.

Fixing logic to detect if inside a group. If a rotate event occured
when an initial prefix of events for a statement, but for which the
table did contain a key, last_event_start_time is set to zero, causing
rotate to end the group but without unlocking any tables. This left a
lock hanging around, which subsequently triggered an assertion when a
second attempt was made to lock the same sequence of tables.

In order to solve the above problem, a new flag was added to the relay
log info structure that is used to indicate that the replication thread
is currently executing a statement. Using this flag, the replication
thread is in a group if it is either in a statement or inside a trans-
action.

The patch also eliminates some gratuitous header file inclusions that
were not needed (and caused compile errors) and replaced them with
forward definitions.


sql/item_func.cc:
  Including definition of MASTER_INFO.
sql/log.cc:
  Including definition of RELAY_LOG_INFO since it is used in the file.
sql/log_event.cc:
  Moving statement end actions from Rows_log_event::do_apply_event() to
  Rows_log_event::do_update_pos().
  Factoring out code to update group positions and event positions into
  relay log info structure.
  ---
  Adding debugging printouts.
  Fixing logic to detect if inside a group.
sql/log_event.h:
  Adding Rows_log_event::do_update_pos().
sql/mysqld.cc:
  Including definition of MASTER_INFO.
sql/repl_failsafe.cc:
  Including definition of MASTER_INFO.
sql/rpl_mi.h:
  Including definition of RELAY_LOG_INFO since it is used in the file.
sql/rpl_rli.cc:
  Adding member function stmt_done() to do after-statement updates of the
  relay log info structure.
sql/rpl_rli.h:
  Adding member function stmt_done() to do after-statement updates of the
  relay log info structure.
sql/set_var.cc:
  Including definition of MASTER_INFO.
sql/slave.cc:
  Adding debuging printouts.
sql/slave.h:
  Removing inclusion definitions of MASTER_INFO and RELAY_LOG_INFO and
  replacing them with forward declarations since the classes are not
  used in the file. The gratuitous inclusion lead to compile errors in
  the two classes above in files that used neither.
sql/sql_binlog.cc:
  Including definition of RELAY_LOG_INFO since it is used in the file.
sql/sql_class.cc:
  Including definition of RELAY_LOG_INFO since it is used in the file.
sql/sql_class.h:
  Removing inclusion definitions of RELAY_LOG_INFO and replacing it
  with forward declaration since the class is not used in the file.
  The gratuitous inclusion lead to compile errors in the class above
  in files didn't use the class.
sql/sql_insert.cc:
  Including definition of MASTER_INFO.
sql/sql_repl.cc:
  Including definition of MASTER_INFO.
mysql-test/r/rpl_ndb_circular_simplex.result:
  New BitKeeper file ``mysql-test/r/rpl_ndb_circular_simplex.result''
mysql-test/t/rpl_ndb_circular_simplex.test:
  New BitKeeper file ``mysql-test/t/rpl_ndb_circular_simplex.test''
2007-04-12 08:58:04 +02:00
unknown
6277365ff2 Merge mysql.com:/home/bar/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.1-new-rpl


sql/mysqld.cc:
  Auto merged
2007-04-12 11:31:59 +05:00
unknown
1992907b45 mysqld.cc:
Removing wrong MYF(0) argument.


sql/mysqld.cc:
  Removing wrong MYF(0) argument.
2007-04-12 11:29:43 +05:00
unknown
796c53ea7a Eliminating warnings that pin-pointed a bug in a printout.
sql/mysqld.cc:
  sql_print_error() does not have a MYF field, so none should be provided.
2007-04-11 15:06:30 +02:00
unknown
60e587bd28 Added comment about changing major version number. 2007-04-11 12:30:30 +02:00
unknown
7c086fc7ca BUG#27583 (slave sql fails to read from iocache when slave got
stopped at pos==4):

Submitting patch on behalf of Andrei, who discovered the problem
and provided the patch.

An update of the group relay log coordinates when rotating forgot to
update the group relay log name and only updated the group relay log
position (and group master log name and position).

This patch adds code to update the group relay log *name* as well as
the position 


sql/log_event.cc:
  Setting group relay log name as well when rotating, not just the group
  relay log position.
2007-04-11 11:10:14 +02:00
unknown
18b29ab4a9 Merge mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge


sql/mysql_priv.h:
  Auto merged
2007-04-10 18:43:43 +02:00
unknown
4a5e9e31f4 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge


mysql-test/r/rpl_ndb_basic.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
2007-04-10 18:26:14 +02:00
unknown
4566c09d54 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge


sql/mysql_priv.h:
  Auto merged
2007-04-10 18:25:27 +02:00
unknown
6d9d64baab Merge mysql.com:/home/bar/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.1-new-rpl


client/mysql.cc:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/mysqld.cc:
  SCCS merged
2007-04-09 18:06:27 +05:00
unknown
2e302abc80 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.0.b22648
2007-04-09 17:59:42 +05:00
unknown
8e2b68c3cd Bug#22648 LC_TIME_NAMES: Setting GLOBAL has no effect
Problem: setting/displaying @@LC_TIME_NAMES didn't distinguish between
GLOBAL and SESSION variable types - always SESSION variable
was set/shonw.
Fix: set either global or session value.
Also, "mysqld --lc-time-names" was added to set "global default" value.


mysql-test/r/variables.result:
  Adding test cases
mysql-test/t/variables.test:
  Adding test cases
sql/mysql_priv.h:
  Declaring variable for global default.
sql/mysqld.cc:
  Adding --lc-time-names
sql/set_var.cc:
  Distinguish between GLOBAL and SESSION variables.
sql/sql_class.cc:
  Don't initialize to en_US, use global_system_variables value instead.
2007-04-09 17:58:56 +05:00
unknown
33ac50f076 bug#27608 XML output is not well-formed
Problem: output was empty if the result is empty.
Fix: print XML header and footer, even if the result
is empty, to produce well-formed XML output.


client/mysql.cc:
  Print header and footer even on empty set, when --xml
mysql-test/r/client_xml.result:
  Adding test case
mysql-test/t/client_xml.test:
  Adding test case
2007-04-09 17:53:10 +05:00
unknown
37feda2596 Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt


mysql-test/t/loaddata.test:
  Auto merged
sql/sql_load.cc:
  Auto merged
mysql-test/r/loaddata.result:
  SCCS merged
2007-04-09 11:46:58 +05:00
unknown
d2667d1a6e Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
2007-04-09 11:45:14 +05:00