Commit graph

486 commits

Author SHA1 Message Date
unknown
267b00d682 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl


mysql-test/r/mysqlbinlog.result:
  Auto merged
mysql-test/r/user_var-binlog.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_stm_charset.result:
  Auto merged
sql/log_event.cc:
  Auto merged
2007-12-19 11:35:26 +01:00
unknown
e64fae8bde Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl


BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17:
  Auto merged
mysql-test/r/mysqlbinlog.result:
  Auto merged
mysql-test/r/user_var-binlog.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_stm_charset.result:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Manual merge, using remove version of test.
mysql-test/suite/rpl/r/rpl_timezone.result:
  Manual merge.
sql/log_event.cc:
  Manual merge
2007-12-19 10:28:31 +01:00
unknown
82e026c146 Merge magare.gmz:/home/kgeorge/mysql/autopush/B19390-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B19390-5.1-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_trigger.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_trigger.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/unireg.cc:
  Auto merged
mysql-test/r/union.result:
  Merged bug 27848 to 5.1-opt
mysql-test/t/union.test:
  Merged bug 27848 to 5.1-opt
sql/sql_yacc.yy:
  Merged bug 27848 to 5.1-opt
2007-12-18 11:07:08 +02:00
unknown
3ab83a2e5e Order results to be deterministic.
Follow SergG's lead with mysqlcheck result.


mysql-test/r/mysqlcheck.result:
  Error changed lately.  This may not be a bug, despite Bug#29458.
  
  See SergG [22 Nov 11:45] comment for Bug#25347.
mysql-test/suite/rpl/r/rpl_invoked_features.result:
  Order so it is deterministic.
mysql-test/suite/rpl/t/rpl_invoked_features.test:
  Order so it is deterministic.
2007-12-17 08:51:29 -05:00
unknown
7477060bb3 Merge hezx.(none):/media/sda3/work/mysql/bkwork/bug#32205/5.1
into  hezx.(none):/media/sda3/work/mysql/bkwork/bug#32205/mysql-5.1-new-rpl


mysql-test/r/mysqlbinlog2.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
  Auto merged
sql/log_event.cc:
  Auto merged
2007-12-17 21:21:23 +08:00
unknown
0968c713aa BUG#32205 Replaying statements from mysqlbinlog fails with a syntax error, replicates
fine

The reason of this bug is that when mysqlbinlog dumps a query, the query is written to
output with a delimeter appended right after it, if the query string ends with a '--'
comment, then the delimeter would be considered as part of the comment, if there are any
statements after this query, then it will cause a syntax error.

Start a newline before appending delimiter after a query string


mysql-test/r/mysqlbinlog.result:
  Update result for BUG#32205
mysql-test/r/mysqlbinlog2.result:
  Update result for BUG#32205
mysql-test/r/user_var-binlog.result:
  Update result for BUG#32205
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  Update result for BUG#32205
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Update result for BUG#32205
mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test:
  fix test for BUG#32205
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
  Update result for BUG#32205
mysql-test/suite/rpl/r/rpl_stm_charset.result:
  Update result for BUG#32205
sql/log_event.cc:
  Start a newline before appending delimiter after a query string
mysql-test/suite/binlog/r/binlog_start_comment.result:
  Add test for BUG#32205
mysql-test/suite/binlog/t/binlog_start_comment.test:
  Add test for BUG#32205
2007-12-17 21:13:25 +08:00
unknown
cb48c979e5 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-15 16:59:43 +03:00
unknown
8d37a30eac BUG#32407: Impossible to do point-in-time recovery from older binlog
Problem: it is unsafe to read base64-printed events without first
reading the Format_description_log_event (FD).  Currently, mysqlbinlog
cannot print the FD.

As a side effect, another bug has also been fixed: When mysqlbinlog
--start-position=X was specified, no ROLLBACK was printed. I changed
this, so that ROLLBACK is always printed.

This patch does several things:

 - Format_description_log_event (FD) now print themselves in base64
   format.

 - mysqlbinlog is now able to print FD events.  It has three modes:
    --base64-output=auto    Print row events in base64 output, and print
                            FD event.  The FD event is printed even if
                            it is outside the range specified with
                            --start-position, because it would not be
                            safe to read row events otherwise. This is
                            the default.

    --base64-output=always  Like --base64-output=auto, but also print
                            base64 output for query events.  This is
                            like the old --base64-output flag, which
                            is also a shorthand for
                            --base64-output=always

    --base64-output=never   Never print base64 output, generate error if
                            row events occur in binlog.  This is
                            useful to suppress the FD event in binlogs
                            known not to contain row events (e.g.,
                            because BINLOG statement is unsafe,
                            requires root privileges, is not SQL, etc)

 - the BINLOG statement now handles FD events correctly, by setting
   the thread's rli's relay log's description_event_for_exec to the
   loaded event.

   In fact, executing a BINLOG statement is almost the same as reading
   an event from a relay log.  Before my patch, the code for this was
   separated (exec_relay_log_event in slave.cc executes events from
   the relay log, mysql_client_binlog_statement in sql_binlog.cc
   executes BINLOG statements).  I needed to augment
   mysql_client_binlog_statement to do parts of what
   exec_relay_log_event does.  Hence, I did a small refactoring and
   moved parts of exec_relay_log_event to a new function, which I
   named apply_event_and_update_pos.  apply_event_and_update_pos is
   called both from exec_relay_log_event and from
   mysql_client_binlog_statement.

 - When a non-FD event is executed in a BINLOG statement, without
   previously executing a FD event in a BINLOG statement, it generates
   an error, because that's unsafe.  I took a new error code for that:
   ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENTS.

   In order to get a decent error message containing the name of the
   event, I added the class method char*
   Log_event::get_type_str(Log_event_type type), which returns a
   string name for the given Log_event_type.  This is just like the
   existing char* Log_event::get_type_str(), except it is a class
   method that takes the log event type as parameter.

   I also added PRE_GA_*_ROWS_LOG_EVENT to Log_event::get_type_str(),
   so that names of old rows event are properly printed.

 - When reading an event, I added a check that the event type is known
   by the current Format_description_log_event. Without this, it may
   crash on bad input (and I was struck by this several times).

 - I patched the following test cases, which all contain BINLOG
   statements for row events which must be preceded by BINLOG
   statements for FD events:
    - rpl_bug31076

While I was here, I fixed some small things in log_event.cc:

 - replaced hard-coded 4 by EVENT_TYPE_OFFSET in 3 places

 - replaced return by DBUG_VOID_RETURN in one place

 - The name of the logfile can be '-' to indicate stdin.  Before my
   patch, the code just checked if the first character is '-'; now it
   does a full strcmp().  Probably, all arguments that begin with a -
   are already handled somewhere else as flags, but I still think it
   is better that the code reflects what it is supposed to do, with as
   little dependencies as possible on other parts of the code.  If we
   one day implement that all command line arguments after -- are
   files (as most unix tools do), then we need this.

I also fixed the following in slave.cc:

 - next_event() was declared twice, and queue_event was not static but
   should be static (not used outside the file).


client/client_priv.h:
  Declared the new option for base64 output.
client/mysqlbinlog.cc:
   - Change from using the two-state command line option
    "default/--base64-output" to the three-state
    "--base64-output=[never|auto|always]"
   - Print the FD event even if it is outside the --start-position range.
   - Stop if a row event is about to be printed without a preceding FD
     event.
   - Minor fixes:
      * changed 4 to EVENT_TYPE_OFFSET in some places
      * Added comments
      * before, "mysqlbinlog -xyz" read from stdin; now it does not
        (only "mysqlbinlog -" reads stdin).
mysql-test/r/mysqlbinlog2.result:
  Updated result file: mysqlbinlog now prints ROLLBACK always.
mysql-test/suite/binlog/t/disabled.def:
  The test must be disabled since it reveals another bug: see BUG#33247.
mysql-test/suite/rpl/r/rpl_bug31076.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
  Updated result file
mysql-test/suite/rpl/t/rpl_bug31076.test:
  Had to add explicit Format_description_log_event before other BINLOG
  statements
mysql-test/t/mysqlbinlog2.test:
  we must suppress base64 output in result file because it contains a
  timestamp
sql/log_event.cc:
   - Made FD events able to print themselves
   - Added check that the current FD event knows about the event type, when
     an event is about to be read. (Hint to reviewers: I had to re-indent
     a big block because of this; use diff -b)
      * To get a decent error message, I also added a class method
        const char* Log_event::get_type_str(Log_event_type)
        which converts number to event type string without having a
        Log_event object.
      * Made Log_event::get_type_str aware of PRE_GA_*_ROWS_LOG_EVENT.
   - Minor fixes:
      * Changed return to DBUG_VOID_RETURN
sql/log_event.h:
   - Declared enum to describe the three base64_output modes
   - Use the enum instead of a flag
   - Declare the new class method get_type_str (see log_event.cc)
sql/share/errmsg.txt:
  Added error msg.
sql/slave.cc:
   - Factored out part of exec_relay_log_event to the new function
     apply_event_and_update_pos, because that code is needed when executing
     BINLOG statements. (this is be functionally equivalent to the
     previous code, except: (1) skipping events is now optional, controlled
     by a parameter to the new function (2) the return value of
     exec_relay_log_event has changed; see next item).
   - Changed returned error value to always be 1. Before, it would return
     the error value from apply_log_event, which was unnecessary. This
     change is safe because the exact return value of exec_relay_log_event
     is never examined; it is only tested to be ==0 or !=0.
   - Added comments describing exec_relay_log_event and
     apply_event_and_update_pos.
   - Minor fixes:
      * Removed duplicate declaration of next_event, made queue_event
        static.
      * Added doxygen code to include this file.
sql/slave.h:
  Declared the new apply_event_and_update_pos
sql/sql_binlog.cc:
   - Made mysql_binlog_statement set the current FD event when the given
     event is an FD event. This entails using the new function
     apply_event_and_update_pos from slave.cc instead of just calling the
     ev->apply method.
   - Made mysql_binlog_statement fail if the first BINLOG statement is not
     an FD event.
mysql-test/suite/binlog/r/binlog_base64_flag.result:
  New test file needs new result file
mysql-test/suite/binlog/t/binlog_base64_flag.test:
  Added test case to verify that:
   - my patch fixes the bug
   - the new --base64-output flag works as expected
   - base64 events not preceded by an FD event give an error
   - an event of a type not known by the current FD event fails cleanly.
mysql-test/suite/binlog/std_data/binlog-bug32407.000001:
  BitKeeper file /home/sven/bk/b32407-5.1-new-rpl-mysqlbinlog_base64/mysql-test/suite/binlog/std_data/binlog-bug32407.000001
2007-12-14 19:02:02 +01:00
unknown
44efa9c18b BUG#26395: if crash during autocommit update to transactional table on master, slave fails
Now, every transaction (including autocommit transactions) starts with
a BEGIN and ends with a COMMIT/ROLLBACK in the binlog.
Added a test case, and updated lots of test case result files.


mysql-test/r/multi_update.result:
  Updated result file
mysql-test/r/sp_trans_log.result:
  Updated result file
mysql-test/suite/binlog/r/binlog_innodb.result:
  Updated result file
mysql-test/suite/binlog/r/binlog_multi_engine.result:
  Updated result file
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
  Updated result file
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Updated result file
mysql-test/suite/ndb/r/ndb_binlog_format.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_row_charset_innodb.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_row_create_table.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Updated result file
mysql-test/suite/rpl/r/rpl_truncate_3innodb.result:
  Updated result file
mysql-test/suite/rpl/t/rpl_row_create_table.test:
  Updated result file
mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
  Updated result file
sql/log.cc:
   - Always write BEGIN and COMMIT around statements, even in autocommit
     mode.
   - Added comments for binlog_commit and binlog_rollback.
sql/log_event.cc:
  Added debug trigger to avoid writing xid events to the binlog.
mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result:
  Results for new test case
mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction-master.opt:
  Options for new test case
mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction-slave.opt:
  Options for new test case
mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test:
  Added new test case.
2007-12-14 14:40:45 +01:00
unknown
541ac20401 Merge station.:/mnt/raid/alik/MySQL/devel/5.1
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt


client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysqld/emb_qcache.cc:
  Auto merged
libmysqld/emb_qcache.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
sql/protocol.cc:
  SCCS merged
2007-12-14 16:30:22 +03:00
unknown
89a89950ae Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b31582-mysql-5.1-rpl


sql/log_event.cc:
  Auto merged
2007-12-14 13:06:32 +01:00
unknown
f989bb4f54 Merge mysql.com:/home/bar/mysql-work/mysql-5.1.b29562
into  mysql.com:/home/bar/mysql-work/mysql-5.1.b29562v2


mysql-test/suite/rpl_ndb/t/disabled.def:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
2007-12-14 13:41:36 +04:00
unknown
271bafb044 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


sql/mysqld.cc:
  Auto merged
2007-12-14 06:55:44 +01:00
unknown
f61f5f72f5 additional after merge fix
mysql-test/r/partition_range.result:
  removed fix for bug#30573
mysql-test/suite/parts/r/rpl_partition.result:
  updated result file
mysql-test/t/partition_range.test:
  removed test case for bug#30573
sql/ha_partition.cc:
  removed fix for bug#30573
2007-12-13 21:34:05 +04:00
unknown
2c20ba5a36 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
2007-12-13 14:26:57 +01:00
unknown
9a10c20ba9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/archive.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysys/queues.c:
  Auto merged
sql/events.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  manual merge
mysql-test/r/myisam.result:
  manual merge
mysql-test/r/partition.result:
  manual merge
mysql-test/r/user_var.result:
  manual merge
mysql-test/t/myisam.test:
  manual merge
mysql-test/t/partition.test:
  manual merge
mysql-test/t/user_var.test:
  manual merge
sql/item.h:
  manual merge
sql/item_func.cc:
  manual merge
storage/myisammrg/ha_myisammrg.cc:
  manual merge
2007-12-13 15:56:04 +04:00
unknown
f2b8de2368 Merge station.:/mnt/raid/alik/MySQL/devel/5.1
into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt


sql/ha_partition.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-12-13 12:06:37 +03:00
unknown
296c2ea8ac Merge zhe@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into  hezx.(none):/media/hda5/work/mysql/bkwork/bug#30998/mysql-5.1-new-rpl
2007-12-13 10:49:41 +08:00
unknown
32c5d070dd bug#31552 manual merge and post-make-test-run changes.
mysql-test/extra/rpl_tests/rpl_row_basic.test:
  changes due to the strict mode gets default. This hunk is being added after merging
  with changes from another bug fixes.
mysql-test/suite/rpl/r/rpl_ignore_table.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
  results changed
mysql-test/suite/rpl/t/rpl_ignore_table.test:
  two queries on mysql db tables are replicated according to binlog_format, ie
  in row-based when that is requested. Due to cancelling the idempotent default
  row based events that previously exectuted successfully now stop the slave sql
  thread.
  We have to explicitly request the idempotent slave execution mode.
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result:
  results changed. They are being committed only now since there was another
  bug which fixes my working clone did not have.
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  results changed
sql/log_event.cc:
  typo in manual merge earlier
2007-12-12 20:12:29 +01:00
unknown
2be5708a21 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-12713-1


mysql-test/r/grant.result:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
2007-12-12 18:36:10 +03:00
unknown
2a0d2fef51 Bug#12713 "Error in a stored function called from a SELECT doesn't
cause ROLLBACK of statement", part 1. Review fixes.

Do not send OK/EOF packets to the client until we reached the end of 
the current statement.
This is a consolidation, to keep the functionality that is shared by all 
SQL statements in one place in the server.
Currently this functionality includes:
- close_thread_tables()
- log_slow_statement().

After this patch and the subsequent patch for Bug#12713, it shall also include:
- ha_autocommit_or_rollback()
- net_end_statement()
- query_cache_end_of_result().

In future it may also include:
- mysql_reset_thd_for_next_command().


include/mysql_com.h:
  Rename now unused members of NET: no_send_ok, no_send_error, report_error.
  These were server-specific variables related to the client/server
  protocol. They have been made obsolete by this patch.
  
  Previously the same members of NET were used to store the error message
  both on the client and on the server. 
  The error message was stored in net.last_error (client: mysql->net.last_error,
  server: thd->net.last_error).
  The error code was stored in net.last_errno (client: mysql->net.last_errno,
  server: thd->net.last_errno).
  The server error code and message are now stored elsewhere 
  (in the Diagnostics_area), thus NET members are no longer used by the
  server.
  Rename last_error to client_last_error, last_errno to client_last_errno
  to avoid potential bugs introduced by merges.
include/mysql_h.ic:
  Update the ABI file to reflect a rename. 
  Renames do not break the binary compatibility.
libmysql/libmysql.c:
  Rename last_error to client_last_error, last_errno to client_last_errno.
  This is necessary to ensure no unnoticed bugs introduced by merged
  changesets.
  
  Remove net.report_error, net.no_send_ok, net.no_send_error.
libmysql/manager.c:
  Rename net.last_errno to net.client_last_errno.
libmysqld/lib_sql.cc:
  Rename net.last_errno to net.client_last_errno.
  
  Update the embedded implementation of the client-server protocol to
  reflect the refactoring of protocol.cc.
libmysqld/libmysqld.c:
  Rename net.last_errno to net.client_last_errno.
mysql-test/r/events.result:
  Update to reflect the change in mysql_rm_db(). Now we drop stored
  routines and events for a given database name only if there
  is a directory for this database name. ha_drop_database() and
  query_cache_invalidate() are called likewise. 
  Previously we would attempt to drop routines/events even if database
  directory was not found (it worked, since routines and events are stored
  in tables). This fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc
  does not exist".
  The change was done because the previous code used to call send_ok()
  twice, which led to an assertion failure when asserts against it were
  added by this patch.
mysql-test/r/grant.result:
  Fix the patch for Bug 16470, now FLUSH PRIVILEGES produces an error 
  if mysql.procs_priv is missing.
  This fixes the assert that send_ok() must not called after send_error()
  (the original patch for Bug 16470 was prone to this).
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
  Produce a more detailed error message.
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
  Produce a more detailed error message.
mysql-test/t/grant.test:
  Update the test, now FLUSH PRIVILEGES returns an error if mysql.procs_priv
  is missing.
server-tools/instance-manager/mysql_connection.cc:
  Rename net.last_errno to net.client_last_errno.
sql/ha_ndbcluster_binlog.cc:
  Add asserts. 
  
  Use getters to access statement status information.
  
  Add a comment why run_query() is broken. Reset the diagnostics area
  in the end of run_query() to fulfill the invariant that the diagnostics_area
  is never assigned twice per statement (see the comment in the code
  when this can happen). We still do not clear thd->is_fatal_error and
  thd->is_slave_error, which may lead to bugs, I consider the whole affair
  as something to be dealt with separately.
sql/ha_partition.cc:
  fatal_error() doesn't set an error by itself. Perhaps we should
  remove this method altogether and instead add a flag to my_error 
  to set thd->is_fatal_error property.
  
  Meanwhile, this change is a part of inspection made to the entire source
  code with the goal to ensure that fatal_error()
  is always accompanied by my_error().
sql/item_func.cc:
  There is no net.last_error anymore. Remove the obsolete assignment.
sql/log_event.cc:
  Use getters to access statement error status information.
sql/log_event_old.cc:
  Use getters to access statement error status information.
sql/mysqld.cc:
  Previously, if a continue handler for an error was found, my_message_sql() 
  would not set an error in THD. Since the current statement
  must be aborted in any case, find_handler() had a hack to assign 
  thd->net.report_error to 1.
  
  Remove this hack. Set an error in my_message_sql() even if the continue
  handler is found. The error will be cleared anyway when the handler
  is executed. This is one action among many in this patch to ensure the 
  invariant that whenever thd->is_error() is TRUE, we have a message in 
  thd->main_da.message().
sql/net_serv.cc:
  Use a full-blown my_error() in net_serv.cc to report an error,
  instead of just setting net->last_errno. This ensures the invariant that
  whenever thd->is_error() returns TRUE, we have a message in 
  thd->main_da.message().
  
  Remove initialization of removed NET members.
sql/opt_range.cc:
  Use my_error() instead of just raising thd->net.report_error. 
  This ensures the invariant that whenever thd->is_error() returns TRUE, 
  there is a message in thd->main_da.message().
sql/opt_sum.cc:
  Move invocation of fatal_error() right next to the place where
  we set the error message. That makes it easier to track that whenever
  fatal_error() is called, there is a message in THD.
sql/protocol.cc:
  Rename send_ok() and send_eof() to net_send_ok() and net_send_eof() 
  respectively. These functions write directly to the network and are not 
  for use anywhere outside the client/server protocol code. 
  
  Remove the code that was responsible for cases when either there is 
  no error code, or no error message, or both.
  Instead the calling code ensures that they are always present. Asserts
  are added to enforce the invariant.
  
  Instead of a direct access to thd->server_status and thd->total_warn_count
  use function parameters, since these from now on don't always come directly
  from THD.
  
  Introduce net_end_statement(), the single-entry-point replacement API for 
  send_ok(), send_eof() and net_send_error().
  
  Implement Protocol::end_partial_result_set to use in select_send::abort()
  when there is a continue handler.
sql/protocol.h:
  Update declarations.
sql/repl_failsafe.cc:
  Use getters to access statement status information in THD.
  Rename net.last_error to net.client_last_error.
sql/rpl_record.cc:
  Set an error message in prepare_record() if there is no default
  value for the field -- later we do print this message to the client.
sql/rpl_rli.cc:
  Use getters to access statement status information in THD.
sql/slave.cc:
  In create_table_from_dump() (a common function that is used in 
  LOAD MASTER TABLE SQL statement and COM_LOAD_MASTER_DATA), instead of hacks
  with no_send_ok, clear the diagnostics area when mysql_rm_table() succeeded.
  
  Update has_temporary_error() to work correctly when no error is set.
  This is the case when Incident_log_event is executed: it always returns
  an error but does not set an error message.
  
  Use getters to access error status information.
sql/sp_head.cc:
  Instead of hacks with no_send_error, work through the diagnostics area 
  interface to suppress sending of OK/ERROR packets to the client.
  
  Move query_cache_end_of_result before log_slow_statement(), similarly
  to how it's done in dispatch_command().
sql/sp_rcontext.cc:
  Remove hacks with assignment of thd->net.report_error, they are not
  necessary any more (see the changes in mysqld.cc).
sql/sql_acl.cc:
  Use getters to access error status information in THD.
sql/sql_base.cc:
  Access thd->main_da.sql_errno() only if there is an error. This fixes
  a bug when auto-discovery, that was effectively disabled under pre-locking.
sql/sql_binlog.cc:
  Remove hacks with no_send_ok/no_send_error, they are not necessary 
  anymore: the caller is responsible for network communication.
sql/sql_cache.cc:
  Disable sending of OK/ERROR/EOF packet in the end of dispatch_command
  if the response has been served from the query cache. This raises the 
  question whether we should store EOF packet in the query cache at all,
  or generate it anew for each statement (we should generate it anew), but
  this is to be addressed separately.
sql/sql_class.cc:
  Implement class Diagnostics_area. Please see comments in sql_class.h
  for details.
  
  Fix a subtle coding mistake in select_send::send_data: when on slave, 
  an error in Item::send() was ignored.
  The problem became visible due to asserts that the diagnostics area is
  never double assigned.
  
  Remove initialization of removed NET members.
  
  In select_send::abort() do not call select_send::send_eof(). This is
  not inheritance-safe. Even if a stored procedure continue handler is
  found, the current statement is aborted, not succeeded.
  Instead introduce a Protocol API to send the required response, 
  Protocol::end_partial_result_set().
  
  This simplifies implementation of select_send::send_eof(). No need
  to add more asserts that there is no error, there is an assert inside
  Diagnostics_area::set_ok_status() already.
  
  Leave no trace of no_send_* in the code.
sql/sql_class.h:
  Declare class Diagnostics_area. 
  
  Remove the hack with no_send_ok from
  Substatement_state.
  
  Provide inline implementations of send_ok/send_eof.
  
  Add commetns.
sql/sql_connect.cc:
  Remove hacks with no_send_error. 
  
  Since now an error in THD is always set if net->error, it's not necessary
  to check both net->error and thd->is_error() in the do_command loop.
  
  Use thd->main_da.message() instead of net->last_errno.
  
  Remove the hack with is_slave_error in sys_init_connect. Since now we do not
  reset the diagnostics area in net_send_error (it's reset at the beginning
  of the next statement), we can access it safely even after 
  execute_init_command.
sql/sql_db.cc:
  Update the code to satisfy the invariant that the diagnostics area is never
  assigned twice.
  Incidentally, this fixes Bug 29958 "Weird message on DROP DATABASE if 
  mysql.proc does not exist".
sql/sql_delete.cc:
  Change multi-delete to abort in abort(), as per select_send protocol.
  Fixes the merge error with the test for Bug 29136
sql/sql_derived.cc:
  Use getters to access error information.
sql/sql_insert.cc:
  Use getters to access error information.
sql-common/client.c:
  Rename last_error to client_last_error, last_errno to client_last_errno.
sql/sql_parse.cc:
  Remove hacks with no_send_error. Deploy net_end_statement().
  
  The story of COM_SHUTDOWN is interesting. Long story short, the server 
  would become on its death's door, and only no_send_ok/no_send_error assigned
  by send_ok()/net_send_error() would hide its babbling from the client.
  
  First of all, COM_QUIT does not require a response. So, the comment saying
  "Let's send a response to possible COM_QUIT" is not only groundless 
  (even mysqladmin shutdown/mysql_shutdown() doesn't send COM_QUIT after 
  COM_SHUTDOWN), it's plainly incorrect.
  
  Secondly, besides this additional 'OK' packet to respond to a hypothetical
  COM_QUIT, there was the following code in dispatch_command():
  
  if (thd->killed)
    thd->send_kill_message();
  if (thd->is_error()
    net_send_error(thd);
  
  This worked out really funny for the thread through which COM_SHUTDOWN
  was delivered: we would get COM_SHUTDOWN, say okay, say okay again, 
  kill everybody, get the kill signal ourselves, and then attempt to say 
  "Server shutdown in progress" to the client that is very likely long gone.
  
  This all became visible when asserts were added that the Diagnostics_area
  is not assigned twice.
  
  Move query_cache_end_of_result() to the end of dispatch_command(), since
  net_send_eof() has been moved there. This is safe, query_cache_end_of_result()
  is a no-op if there is no started query in the cache.
  
  Consistently use select_send interface to call abort() or send_eof()
  depending on the operation result.
  
  Remove thd->fatal_error() from reset_master(), it was a no-op. 
  in hacks with no_send_error woudl save us
  from complete breakage of the client/server protocol.
  
  Consistently use select_send::abort() whenever there is an error, 
  and select_send::send_eof() in case of success.
  The issue became visible due to added asserts.
sql/sql_partition.cc:
  Always set an error in THD whenever there is a call to fatal_error().
sql/sql_prepare.cc:
  Deploy class Diagnostics_area.
  Remove the unnecessary juggling with the protocol in 
  Select_fetch_protocol_binary::send_eof(). EOF packet format is 
  protocol-independent.
sql/sql_select.cc:
  Call fatal_error() directly in opt_sum_query.
  Call my_error() whenever we call thd->fatal_error().
sql/sql_servers.cc:
  Use getters to access error information in THD.
sql/sql_show.cc:
  Use getters to access error information in THD.
  
  Add comments.
  
  Call my_error() whenever we call fatal_error().
sql/sql_table.cc:
  Replace hacks with no_send_ok with the interface of the diagnostics area.
  
  Clear the error if ENOENT error in ha_delete_table().
sql/sql_update.cc:
  Introduce multi_update::abort(), which is the proper way to abort a
  multi-update. This fixes the merge conflict between this patch and
  the patch for Bug 29136.
sql/table.cc:
  Use a getter to access error information in THD.
sql/tztime.cc:
  Use a getter to access error information in THD.
2007-12-12 18:21:01 +03:00
unknown
230f589f51 Merge elkin@aelkin2.mysql.internal:MySQL/TEAM/FIXES/5.1/bug31609-conflict_detection
into  dl145j.mysql.com:/tmp/andrei/bug31552


mysql-test/extra/rpl_tests/rpl_row_basic.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/log_event.cc:
  manual merge
2007-12-12 11:21:54 +01:00
unknown
96a51b7f39 Bug#31552 Replication breaks when deleting rows from out-of-sync table
without PK
Bug#31609 Not all RBR slave errors reported as errors
bug#32468 delete rows event on a table with foreign key constraint fails

The first two bugs comprise idempotency issues.
First, there was no error code reported under conditions of the bug
description although the slave sql thread halted.
Second, executions were different with and without presence of prim key in
the table.
Third, there was no way to instruct the slave whether to ignore an error
and skip to the following event or to halt.
Fourth, there are handler errors which might happen due to idempotent
applying of binlog but those were not listed among the "idempotent" error
list.

All the named issues are addressed.
Wrt to the 3rd, there is the new global system variable, changeble at run
time, which controls the slave sql thread behaviour.
The new variable allows further extensions to mimic the sql_mode
session/global variable.
To address the 4th, the new bug#32468 had to be fixed as it was staying
in the way.


include/my_bitmap.h:
  basic operations with bits of an integer type are added.
mysql-test/extra/rpl_tests/rpl_foreign_key.test:
  regression test for bug#32468
mysql-test/extra/rpl_tests/rpl_row_basic.test:
  changes due to bug#31552/31609 idempotency is not default any longer
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test:
  changes due to bug#31552/31609 idempotency is not default any longer
mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result:
  results changed
mysql-test/suite/rpl/r/rpl_idempotency.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_mystery22.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
  results changed
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
  results changed
mysql-test/suite/rpl/r/rpl_temporary_errors.result:
  results changed
mysql-test/suite/rpl/t/rpl_idempotency.test:
  extenstions to the test providing testing of complements to the
  idempotent error set and checking how slave halts when it faces an error
  from the list when the mode is STRICT.
mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
  changes due to bug#31552/31609 idempotency is not default any longer.
mysql-test/suite/rpl/t/rpl_row_mystery22.test:
  changes due to bug#31552/31609 idempotency is not default any longer
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
  changes due to bug#31552/31609 idempotency is not default any longer
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result:
  results changed
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  results changed
sql/log_event.cc:
  the fix for bug#32468 delete rows event on a table with foreign key constraint fails
  ensures the flags are set at proper time so that their values will be caught
  by innodb.
  reseting the flags is done along the common error and errorless execution
  path.
  The list of idempotent error is extended with foreign keys related items.
  NDB engine write events are designed with the replace sematics in mind.
  Therefore the corrsponding ndb handler's flag are (re)set regardless of
  the slave's execution mode.
  Rows_log_event::write_row() starts using the bool replace argument as its
  caller sets it depending on the event's execution mode.
sql/log_event.h:
  adding a new member to hold the slave's mode during execution of the event.
sql/mysql_priv.h:
  changes to link the command line option with the new global sys var.
sql/mysqld.cc:
  introduction of the new command line option.
  providing its initialization to a default.
  changes to link the command line option with the new global sys var.
sql/rpl_rli.cc:
  rli post-event-execution cleanup restores the default bits.
sql/set_var.cc:
  The new "standard" sys_var_set class' and the new global system var related
  declarations and definitions.
  fix_slave_exec_mode() is used as with the update method of a new class so
  as at time of the command line arguments parsing.
sql/set_var.h:
  new declarations. The class for the new global sys var is based on
  yet another new "standard" one.
sql/share/errmsg.txt:
  slave_exec_mode setting error;
  slave inconsistency error which may be not an error when the intention
  is "idempotent". I.e consisting of row-based events binlog is being
  applied for the 2nd (more) time.
sql/sql_class.h:
  The names for the bits of the new sever slave_exec_mode_options.
mysql-test/suite/rpl/t/rpl_idempotency-master.opt:
  innodb is necessary
mysql-test/suite/rpl/t/rpl_idempotency-slave.opt:
  innodb is necessary, as well as the tests start with non-default
  IDEMPOTENT slave execution mode.
2007-12-12 12:14:59 +02:00
unknown
127ef56129 Merge hezx.(none):/media/hda5/work/mysql/bkroot/mysql-5.1-new-rpl
into  hezx.(none):/media/hda5/work/mysql/bkwork/bug#30998/5.1
2007-12-12 15:02:28 +08:00
unknown
19c7e2c9d5 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/t/disabled.def:
  Auto merged
sql/partition_info.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
mysql-test/r/func_misc.result:
  SCCS merged
mysql-test/t/func_misc.test:
  SCCS merged
2007-12-11 21:37:33 +01:00
unknown
60afc7262e Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/cge-5.1
2007-12-11 21:02:29 +01:00
unknown
87d8e15b2e move randomly failing tests to ndb_team suite
mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test:
  Rename: mysql-test/suite/ndb/t/ndb_dd_backuprestore.test -> mysql-test/suite/ndb_team/t/ndb_dd_backuprestore.test
mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result:
  Rename: mysql-test/suite/ndb/r/ndb_dd_backuprestore.result -> mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result
mysql-test/suite/ndb_team/r/ndb_backup_print.result:
  Rename: mysql-test/suite/ndb/r/ndb_backup_print.result -> mysql-test/suite/ndb_team/r/ndb_backup_print.result
mysql-test/suite/ndb_team/t/ndb_backup_print.test:
  Rename: mysql-test/suite/ndb/t/ndb_backup_print.test -> mysql-test/suite/ndb_team/t/ndb_backup_print.test
2007-12-11 19:57:26 +01:00
unknown
aadf1f1ce3 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  whalegate.ndb.mysql.com:/home/tomas/cge-5.1
2007-12-11 16:08:52 +01:00
unknown
c4a39468ea bug#32759 already fixed
mysql-test/suite/ndb/t/disabled.def:
  bug#32759 already fixed
  - see rev 1.131.1.6 of sql/ha_ndbcluster_binlog.cc
2007-12-11 15:08:00 +01:00
unknown
e63f750439 Enabled test rpl_ndb_ddl 2007-12-11 11:51:14 +01:00
unknown
865243bfca Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  manual merge
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  manual merge
2007-12-10 13:32:19 +01:00
unknown
dad3e3f66d backport test for bug#30674
(bug not present in 5.1)
2007-12-10 13:29:23 +01:00
unknown
304f5580c6 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build


client/mysqldump.c:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-12-10 10:46:00 +01:00
unknown
b74c55e859 Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-10 10:32:21 +01:00
unknown
c853fa4fe2 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


sql/ha_ndbcluster_binlog.cc:
  Auto merged
2007-12-10 10:26:01 +01:00
unknown
419e8cf7b2 bug#21072 Duplicate key error in NDB references wrong key: regenerated result 2007-12-07 12:20:04 +01:00
unknown
154ffb3ff5 bug#21072 Duplicate key error in NDB references wrong key: Post-merge fixes 2007-12-07 11:05:19 +01:00
unknown
6a4d2423ed Fix for
Bug#32856 testsuite parts: partition_basic_myisam fails 
                              in pushbuild
Skip test if symlink support is missing.


mysql-test/suite/parts/t/partition_basic_myisam.test:
  Skip test if running on a server with disabled symlinking.
2007-12-06 18:26:50 +01:00
unknown
d27196b43b WL#4091, part1. replace --sleep by include/wait_condition.inc
mysql-test/suite/rpl/r/rpl_start_stop_slave.result:
  updated result
mysql-test/suite/rpl/t/rpl_critical_errors.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_init_slave.test:
  remove --sleep
mysql-test/suite/rpl/t/rpl_insert.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_loadfile.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_row_sp001.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_row_sp005.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_row_stop_middle.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_row_trig001.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_row_trig003.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_ssl1.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_start_stop_slave.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  replace --sleep
mysql-test/suite/rpl/t/rpl_temporary.test:
  replace --sleep
2007-12-06 18:27:10 +03:00
unknown
4cb7841391 Merge mysql.com:/home/hf/work/32247/my51-32247
into  mysql.com:/home/hf/work/mrg/my51-mrg


mysql-test/r/partition.result:
  merging
mysql-test/t/partition.test:
  merging
sql/ha_partition.cc:
  SCCS merged
2007-12-06 16:43:52 +04:00
unknown
b6c0c1754c Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
ha_partition::update_create_info() just calls update_create_info
of a first partition, so only get the autoincrement maximum
of the first partition, so SHOW CREATE TABLE can show
small AUTO_INCREMENT parameters.
Fixed by implementing ha_partition::update_create_info() in a way
other handlers work.
HA_ARCHIVE:stats.auto_increment handling made consistent with other engines


mysql-test/r/archive.result:
  Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
  
  test result fixed
mysql-test/r/partition.result:
  Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
  
  test result
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
  
  test result fixed
mysql-test/t/partition.test:
  Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
  
  test added as rpl_innodb_bug28430 is INNOBASE specific while
  the bug is not
sql/ha_partition.cc:
  Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
  
  ha_partition::update_create_info() implemented
storage/archive/ha_archive.cc:
  Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
  
  ha_archive.stats.auto_increment now contains next (not last used) value
  of auto_increment to be consistent with other engines
2007-12-06 16:39:42 +04:00
unknown
29fb5d17e0 BUG#31582 (5.1-telco-6.1 -> 5.1.22. Slave crashes when reading UPDATE for VARCHAR):
Just adding testcase. This bug was fixed by patch for BUG#31583.


mysql-test/suite/bugs/t/rpl_bug31583.test:
  Dropping tables to clean up after the test.
mysql-test/suite/bugs/r/rpl_bug31582.result:
  New BitKeeper file ``mysql-test/suite/bugs/r/rpl_bug31582.result''
mysql-test/suite/bugs/t/rpl_bug31582.test:
  New BitKeeper file ``mysql-test/suite/bugs/t/rpl_bug31582.test''
2007-12-05 20:49:50 +01:00
unknown
068b6e4222 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge


client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_ssl.test:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
mysql-test/t/log_state.test:
  Manual merge fix-up
mysql-test/include/mix1.inc:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/r/func_misc.result:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/r/key.result:
  Manual merge
mysql-test/r/log_state.result:
  Manual merge
mysql-test/suite/binlog/t/binlog_killed.test:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
mysql-test/t/key.test:
  Manual merge
sql/item_strfunc.h:
  Manual merge
strings/ctype-simple.c:
  Manual merge
2007-12-05 12:33:36 -07:00
unknown
7a5f3f12bc BUG#31583 (5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event):
In the patch for BUG#21842, the code for handling old rows events were
refactored.  There were a bug in the refactored code (possibly introduced
after the patch for BUG#21842) that caused caused the refactored old events
to read a columns bitmap after image even though there is no such bitmap
for old events. As a result, the reading got out of sync, and started reading
invalid data.

This patch removes all trace of the after image column bitmap from the refactored
old events and removes functions that are no longer needed because they are empty. 


sql/log_event.cc:
  Adding debug printouts and adding old rows events names to output
  so that they are not printed as unknown events.
sql/log_event_old.cc:
  Adding debug printouts to see how the old events are partitioned
  when being decoded.  Removing all traces of the column bitmap for
  the after image in the old events since there is none.
  
  Removing the following functions since they are no longer needed:
  - Update_rows_log_event_old::init()
  - Update_rows_log_event_old::~Update_rows_log_event_old()
  
  Removing unused local variable.
sql/log_event_old.h:
  Removing all traces of the column bitmap for the after image in
  the old events since there is none.
  
  Removing the following functions since they are no longer needed:
  - Update_rows_log_event_old::init()
  - Update_rows_log_event_old::is_valid()
  - Update_rows_log_event_old::~Update_rows_log_event_old()
  
  Removing unused local variable.
mysql-test/suite/bugs/r/rpl_bug31583.result:
  New BitKeeper file ``mysql-test/suite/bugs/r/rpl_bug31583.result''
mysql-test/suite/bugs/t/rpl_bug31583.test:
  New BitKeeper file ``mysql-test/suite/bugs/t/rpl_bug31583.test''
2007-12-05 20:00:14 +01:00
unknown
26946f3176 Bug#30998 Drop View breaks replication if view does not exist
When executing drop view statement on the master, the statement is not written into bin-log if any error occurs, this could cause master slave inconsistence if any view has been dropped. 

If some error occured and no view has been dropped, don't bin-log the statement, if at least one view has been dropped the query is bin-logged possible with an error.


sql/sql_view.cc:
  If at least one view has been dropped the query is bin-logged possible with an error.
mysql-test/suite/rpl/r/rpl_drop_view.result:
  Add test result for bug#30998
mysql-test/suite/rpl/t/rpl_drop_view.test:
  Add test case for bug#30998
2007-12-03 16:54:44 +08:00
unknown
8b76c0001b Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kent/bk/mac-os-x-universal/mysql-5.0-build
2007-11-29 23:42:46 +01:00
unknown
4ebdf739ce after-merge fix:
- result adjusted.
2007-11-29 22:32:34 +04:00
unknown
d68d16bb3d Merge mysql.com:/home/ram/work/b32726/b32726.5.0
into  mysql.com:/home/ram/work/b32726/b32726.5.1


mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
strings/ctype-cp932.c:
  Auto merged
mysql-test/extra/binlog_tests/ctype_cp932.test:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
  Auto merged
2007-11-29 14:35:15 +04:00
unknown
9b6dc66ede Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build


client/mysql.cc:
  Auto merged
configure.in:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2007-11-28 19:49:29 +01:00
unknown
7ed596398b bug#29562 default collation of ucs2_unicode_ci crashes slave
Problem: some pieces of code relied on the default character
set settings, which didn't work in case of default character set
ucs2.
Fix: Specifying character set explicitly, not to depend on
the default settings.


mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result:
  Recording correct test result
mysql-test/suite/rpl_ndb/t/disabled.def:
  Enabling test
sql/ha_ndbcluster_binlog.cc:
  Character set of the NDB helper tables should
  not rely of the default settings, to avoid creating
  tables in different character sets on master and slave.
  Adding explicit character set. UTF8 should be fine.
  
  character_set_client should not rely on the default
  character set settings, which can be ucs2. Helper SQL queries
  sent by NDB are all in pure ASCII. Setting client_character_set
  to latin1.
sql/log_event.cc:
  Adding assert to make sure that binary log does not have 
  queries in character set which parser does not understand
  (e.g. ucs2).
2007-11-28 15:35:25 +04:00
unknown
9e96081ea9 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-new-rpl


mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/mysqlbinlog.result:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
sql/log_event.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/lib/mtr_cases.pl:
  Manual merge, using remote code.
2007-11-28 12:34:25 +01:00
unknown
d2a6621462 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-new-rpl
2007-11-28 12:05:35 +01:00
unknown
c0ecd863b8 Bug#8693 Test 'rpl_log_pos' fails sometimes
Moved disabling to rpl suite.
Bug#32801 wait_timeout.test fails randomly
Disabled test case.


mysql-test/suite/rpl/t/disabled.def:
  Bug#8693 Test 'rpl_log_pos' fails sometimes
  Moved disabling to rpl suite.
2007-11-28 10:00:23 +01:00
unknown
e33db3282b Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
2007-11-28 08:57:31 +01:00
unknown
30aee30b0d Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


include/my_base.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/suite/ndb/t/disabled.def:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
client/mysql.cc:
  Manual merge
mysql-test/suite/rpl/t/disabled.def:
  Manual merge
2007-11-27 19:29:10 +01:00
unknown
54953ec25c Disabling several tests that fail and reported as errors.
mysql-test/suite/ndb/t/disabled.def:
  Disabling failing tests.
mysql-test/suite/rpl/t/disabled.def:
  Disabling failing tests.
mysql-test/suite/rpl/t/rpl_ssl.test:
  Disabling part of test that fails.
2007-11-27 11:02:00 +01:00
unknown
7a1b0b53f7 post merge fix for bug#32496. 2007-11-26 22:50:12 +01:00
unknown
c916a0761b Merge hh-nb.hhunger:/work/merge/mysql-5.0-32496
into  hh-nb.hhunger:/work/merge/mysql-5.1-32496


BitKeeper/etc/ignore:
  auto-union
mysql-test/suite/funcs_1/r/innodb_views.result:
  Auto merged
mysql-test/suite/funcs_1/r/memory_views.result:
  Auto merged
mysql-test/suite/funcs_1/views/views_master.inc:
  Auto merged
mysql-test/suite/funcs_1/r/myisam_views.result:
  used ul
2007-11-26 22:19:39 +01:00
unknown
77f59b989c patch for bug#32496 (2nd) with ansi conformant and Mysql test case.
BitKeeper/etc/ignore:
  Added scripts/make_win_src_distribution_old server-tools/instance-manager/net_serv.cc to the ignore list
2007-11-26 21:28:01 +01:00
unknown
ec3976ed3e Remove disabling of testcases 2007-11-26 20:05:52 +01:00
unknown
23f2d8739b Moved disabling of tests to the respective suites. 2007-11-26 17:31:53 +01:00
unknown
aa2030d647 Disabling testcases that have warnings that PB cannot handle. 2007-11-26 16:20:37 +01:00
unknown
72cafd4787 Disabling failing test that has been reported as bug.
mysql-test/suite/rpl_ndb/t/disabled.def:
  Disabling failing test.
2007-11-26 15:36:23 +01:00
unknown
1121538d75 Bug#32668 - rpl_row_charset_innodb.test fails
The test case fails on "vanilla" and "no_innodb" builds.
These builds do not include InnoDB.
The test case requires InnoDB.

Added requirement for InnoDB into the test case, so that
it does not start on those builds.


mysql-test/suite/rpl/t/rpl_row_charset_innodb.test:
  Bug#32668 - rpl_row_charset_innodb.test fails
  Added requirement for InnoDB.
2007-11-23 18:05:45 +01:00
unknown
042a58e049 Merge magare.gmz:/home/kgeorge/mysql/work/B32400-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32400-5.1-opt


BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
sql/item.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/t/subselect.test:
  merge of bug 32400 to 5.1-opt
2007-11-23 14:41:47 +02:00
unknown
59574a6e60 WL#3949 Test should set binlog format dnamically
- Reorganize collect a little to make it easier to apply optimizations
  and settings to collected test cases.
- Add suite/rpl/combination file
- Rename include/set_binlog_format_x.inc to .sql since thay are run by "mysql"
 


mysql-test/include/set_binlog_format_mixed.sql:
  Rename: mysql-test/include/set_binlog_format_mixed.inc -> mysql-test/include/set_binlog_format_mixed.sql
mysql-test/include/set_binlog_format_row.sql:
  Rename: mysql-test/include/set_binlog_format_row.inc -> mysql-test/include/set_binlog_format_row.sql
mysql-test/include/set_binlog_format_statement.sql:
  Rename: mysql-test/include/set_binlog_format_statement.inc -> mysql-test/include/set_binlog_format_statement.sql
mysql-test/lib/mtr_cases.pl:
  Reorganize code to
   - collect a suite
   - multiply the tests in the suite with any combinations the suite has
   - optimize the suite by skipping test not supported with current settings
  Use My::Config to read combinations file in my.cnf file format, this
  allowas a "short name" to be used for the combination instead of
  the full name wich is set to the extra arguments the combination applies
  Add function 'print_testcase' that can be used to print the testcases
  during different stages of the collect phase
mysql-test/lib/mtr_report.pl:
  Print <testname> '<combination>' if combination is set
mysql-test/mysql-test-run.pl:
  Add comments, fix indentation
  Rename .in to .sql files
  Only set binlog format dynamicall for master, slav is always restarted
mysql-test/lib/My/Config.pm:
  New BitKeeper file ``mysql-test/lib/My/Config.pm''
mysql-test/suite/rpl/combinations:
  New BitKeeper file ``mysql-test/suite/rpl/combinations''
2007-11-23 13:29:31 +01:00
unknown
850fed3e2a Post-merge fixes.
mysql-test/r/innodb.result:
  Result change.
mysql-test/suite/rpl/r/rpl_binlog_grant.result:
  Result change.
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Result change.
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Result change.
mysql-test/suite/rpl/t/disabled.def:
  Enabling some tests.
mysql-test/suite/rpl/t/rpl_binlog_grant.test:
  Adding missing master-slave.inc, causing previous tests to pollute
  the binary log.
mysql-test/suite/rpl_ndb/t/disabled.def:
  Enabling some tests.
2007-11-23 12:51:14 +01:00
unknown
9fcbecab57 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


mysql-test/lib/mtr_report.pl:
  merged
2007-11-21 21:29:16 +01:00
unknown
692f0e4f67 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/suite/ndb/r/ndb_dd_basic.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/innodb.result:
  Manual merge.
2007-11-21 21:15:33 +01:00
unknown
d295bfaa76 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-11-21 21:11:57 +01:00
unknown
712d2c47ee Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


configure.in:
  Auto merged
2007-11-21 20:32:58 +01:00
unknown
705d58f8a6 Merge five.local.lan:/work/merge/mysql-5.0-build-30418
into  five.local.lan:/work/merge/mysql-5.1-build-31610


mysql-test/suite/funcs_1/datadict/datadict_master.inc:
  Auto merged
mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc:
  Auto merged
mysql-test/suite/funcs_1/datadict/datadict_tables.inc:
  Auto merged
mysql-test/suite/funcs_1/r/innodb__datadict.result:
  Auto merged
mysql-test/suite/funcs_1/r/memory__datadict.result:
  Auto merged
mysql-test/suite/funcs_1/r/myisam__datadict.result:
  Auto merged
2007-11-21 15:06:38 +01:00
unknown
b6c381053f This changeset fixes
Bug#31567 "datadict" tests (all engines) fail:
             Reference protocol is non-standard build
   Bug#30418 "datadict" tests (all engines) fail:
             Dependency on the host name for ordering   
Modifications:
   1. The standard builds (build team) do not contain
      the collation 'utf8_general_cs'.
      The common developer builds (compuile-....-max)
      contain this collation.
      Solution fitting to both build variants:
         Exclude the collation 'utf8_general_cs' from
         result sets.
   2. Use mysqltest builtin sorting of result set for
      the statement where the hostname affects the
      row order.


mysql-test/suite/funcs_1/datadict/datadict_master.inc:
  Exclude collation 'utf8_general_cs' from result set.
mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc:
  Use mysqltest builtin sorting of result set.
mysql-test/suite/funcs_1/datadict/datadict_tables.inc:
  Exclude collation 'utf8_general_cs' from result set.
mysql-test/suite/funcs_1/r/innodb__datadict.result:
  Updated  results
mysql-test/suite/funcs_1/r/memory__datadict.result:
  Updated  results
mysql-test/suite/funcs_1/r/myisam__datadict.result:
  Updated  results
2007-11-21 13:50:17 +01:00
unknown
bfb18f9ad5 WL#3949, second part. Added soft switching of the binlog format (w/o restart a server)
mysql-test/lib/mtr_cases.pl:
  updated the code for combination
mysql-test/mysql-test-run.pl:
  added soft switching of binlog format
mysql-test/lib/mtr_misc.pl:
  added new sub mtr_diff_opts
mysql-test/suite/rpl/r/rpl_invoked_features.result:
  updated result
mysql-test/suite/rpl/t/rpl_invoked_features.test:
  updated test
mysql-test/suite/rpl/t/rpl_misc_functions.test:
  updated test
mysql-test/suite/rpl/t/rpl_session_var.test:
  updated test
2007-11-20 19:55:51 +03:00
unknown
0a9e4c79d4 Fixes for the bugs
Bug#31610 Remove outdated and redundant tests:
                 partition_02myisam partition_03ndb
       Bug#32405 testsuite parts: partition_char_myisam wrong content
and cleanup of testsuite
   - remove/correct wrong comments
   - remove workarounds for fixed bugs
   - replace error numbers with error names
   - exclude subtests from execution which fail now because of
     new limitations for partitioning functions
   - remove code for the no more intended dual use
     fast test in regression tests/slow test in testsuite
   - analyze and fix problems with partition_char_innodb
   - fix problems caused by last change of error numbers
   - Introduce error name to error number mapping which makes
     maintenance after next error renumbering easier


BitKeeper/deleted/.del-partition_03ndb.result:
  Rename: mysql-test/suite/ndb/r/partition_03ndb.result -> BitKeeper/deleted/.del-partition_03ndb.result
BitKeeper/deleted/.del-partition_03ndb.test:
  Rename: mysql-test/suite/ndb/t/partition_03ndb.test -> BitKeeper/deleted/.del-partition_03ndb.test
BitKeeper/deleted/.del-partition_1.inc:
  Rename: mysql-test/include/partition_1.inc -> BitKeeper/deleted/.del-partition_1.inc
BitKeeper/deleted/.del-partition_02myisam.result:
  Rename: mysql-test/r/partition_02myisam.result -> BitKeeper/deleted/.del-partition_02myisam.result
BitKeeper/deleted/.del-partition_02myisam.test:
  Rename: mysql-test/t/partition_02myisam.test -> BitKeeper/deleted/.del-partition_02myisam.test
BitKeeper/deleted/.del-partition_char_myisam.result:
  Rename: mysql-test/suite/parts/r/partition_char_myisam.result -> BitKeeper/deleted/.del-partition_char_myisam.result
mysql-test/suite/parts/inc/methods1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition.pre:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_10.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_11.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_12.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_20.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter3.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter4.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_11.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_13.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_alter_41.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_basic.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_binary.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_bit.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_blob.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_char.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_drop.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_read.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_read1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_check_read2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_cleanup.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_directory.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_engine.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_enum.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_layout.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_layout_check1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_layout_check2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_methods1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_methods2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_set.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_syntax.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_syntax_1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_syntax_2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_text.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_trigg1.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_trigg2.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_trigg3.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_value.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_varbinary.inc:
  Fixes + cleanup
mysql-test/suite/parts/inc/partition_varchar.inc:
  Fixes + cleanup
mysql-test/suite/parts/r/partition_alter1_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter1_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_alter2_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter2_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_alter3_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter3_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_alter4_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_alter4_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_basic_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_basic_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_bit_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_char_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_datetime_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_decimal_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_engine_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_engine_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_float_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_float_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_int_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_special_myisam.result:
  Updated result
mysql-test/suite/parts/r/partition_syntax_innodb.result:
  Updated result
mysql-test/suite/parts/r/partition_syntax_myisam.result:
  Updated result
mysql-test/suite/parts/t/disabled.def:
  Fixes + cleanup
mysql-test/suite/parts/t/part_blocked_sql_func_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_blocked_sql_func_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_supported_sql_func_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/part_supported_sql_func_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter1_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter1_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter1_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter2_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter2_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter2_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter3_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter3_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter4_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_alter4_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_basic_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_basic_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_basic_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_bit_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_bit_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_bit_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_char_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_char_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_datetime_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_datetime_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_decimal_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_decimal_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_engine_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_engine_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_engine_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_float_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_float_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_int_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_int_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_int_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_special_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_special_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_syntax_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_syntax_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_syntax_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_value_innodb.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_value_myisam.test:
  Fixes + cleanup
mysql-test/suite/parts/t/partition_value_ndb.test:
  Fixes + cleanup
mysql-test/suite/parts/r/partition_char_myisam.result:
  Updated result
  bk rm + new file is caused by bk complaining about filetype
2007-11-20 16:04:07 +01:00
unknown
e3f98fcfad Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  mysql.com:/home/marty/MySQL/mysql-5.1-new-ndb
2007-11-20 14:37:36 +01:00
unknown
c25d074386 The error number for ER_ILLEGAL_HA_CREATE_OPTION changed from 1477 to 1478,
this must be reflected in the test result files.


mysql-test/suite/funcs_1/r/ndb_cursors.result:
  Error number changed, adapt the test result.
mysql-test/suite/funcs_1/r/ndb_trig_0102.result:
  Error number changed, adapt the test result.
mysql-test/suite/funcs_1/r/ndb_trig_03.result:
  Error number changed, adapt the test result.
mysql-test/suite/funcs_1/r/ndb_trig_0407.result:
  Error number changed, adapt the test result.
mysql-test/suite/funcs_1/r/ndb_trig_08.result:
  Error number changed, adapt the test result.
mysql-test/suite/funcs_1/r/ndb_trig_09.result:
  Error number changed, adapt the test result.
mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result:
  Error number changed, adapt the test result.
2007-11-19 21:24:36 +01:00
unknown
d3947481e3 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-11-19 17:21:35 +01:00
unknown
f437a65fb5 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


BitKeeper/etc/ignore:
  auto-union
client/mysqldump.c:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-11-19 17:12:49 +01:00
unknown
211383388e Bug#32435:
DROP DATABASE statement writes changes to mysql.proc table under RBR

When replicating a DROP DATABASE statement with a database holding
stored procedures, the changes to the mysql.proc table was recorded
in the binary log under row-based replication.

With this patch, the thread uses statement-logging format for the
duration of the DROP DATABASE statement. The logging format is
(already) reset at the end of the statement, so no additional code
for resetting the logging format is necessary.


sql/sql_db.cc:
  Clearing the row-based statement flag for the DROP DATABASE statement
  since it should always be replicated as a statement.
mysql-test/extra/binlog_tests/database.test:
  New BitKeeper file ``mysql-test/extra/binlog_tests/database.test''
mysql-test/suite/binlog/r/binlog_database.result:
  New BitKeeper file ``mysql-test/suite/binlog/r/binlog_database.result''
mysql-test/suite/binlog/t/binlog_database.test:
  New BitKeeper file ``mysql-test/suite/binlog/t/binlog_database.test''
2007-11-16 15:55:22 +01:00
unknown
9e63a99d9b Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


include/mysql_com.h:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-11-16 14:07:59 +01:00
unknown
678dd332cc Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
2007-11-16 11:15:53 +01:00
unknown
33c9d06b5e Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2007-11-16 11:12:13 +01:00
unknown
c8450b278d Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
corrupts a MERGE table
Bug 26867 - LOCK TABLES + REPAIR + merge table result in
            memory/cpu hogging
Bug 26377 - Deadlock with MERGE and FLUSH TABLE
Bug 25038 - Waiting TRUNCATE
Bug 25700 - merge base tables get corrupted by
            optimize/analyze/repair table
Bug 30275 - Merge tables: flush tables or unlock tables
            causes server to crash
Bug 19627 - temporary merge table locking
Bug 27660 - Falcon: merge table possible
Bug 30273 - merge tables: Can't lock file (errno: 155)

The problems were:

Bug 26379 - Combination of FLUSH TABLE and REPAIR TABLE
                corrupts a MERGE table

  1. A thread trying to lock a MERGE table performs busy waiting while
     REPAIR TABLE or a similar table administration task is ongoing on
     one or more of its MyISAM tables.
  
  2. A thread trying to lock a MERGE table performs busy waiting until all
     threads that did REPAIR TABLE or similar table administration tasks
     on one or more of its MyISAM tables in LOCK TABLES segments do UNLOCK
     TABLES. The difference against problem #1 is that the busy waiting
     takes place *after* the administration task. It is terminated by
     UNLOCK TABLES only.
  
  3. Two FLUSH TABLES within a LOCK TABLES segment can invalidate the
     lock. This does *not* require a MERGE table. The first FLUSH TABLES
     can be replaced by any statement that requires other threads to
     reopen the table. In 5.0 and 5.1 a single FLUSH TABLES can provoke
     the problem.

Bug 26867 - LOCK TABLES + REPAIR + merge table result in
            memory/cpu hogging

  Trying DML on a MERGE table, which has a child locked and
  repaired by another thread, made an infinite loop in the server.

Bug 26377 - Deadlock with MERGE and FLUSH TABLE

  Locking a MERGE table and its children in parent-child order
  and flushing the child deadlocked the server.

Bug 25038 - Waiting TRUNCATE

  Truncating a MERGE child, while the MERGE table was in use,
  let the truncate fail instead of waiting for the table to
  become free.

Bug 25700 - merge base tables get corrupted by
            optimize/analyze/repair table

  Repairing a child of an open MERGE table corrupted the child.
  It was necessary to FLUSH the child first.

Bug 30275 - Merge tables: flush tables or unlock tables
            causes server to crash

  Flushing and optimizing locked MERGE children crashed the server.

Bug 19627 - temporary merge table locking

  Use of a temporary MERGE table with non-temporary children
  could corrupt the children.

  Temporary tables are never locked. So we do now prohibit
  non-temporary chidlren of a temporary MERGE table.

Bug 27660 - Falcon: merge table possible

  It was possible to create a MERGE table with non-MyISAM children.

Bug 30273 - merge tables: Can't lock file (errno: 155)

  This was a Windows-only bug. Table administration statements
  sometimes failed with "Can't lock file (errno: 155)".

These bugs are fixed by a new implementation of MERGE table open.

When opening a MERGE table in open_tables() we do now add the
child tables to the list of tables to be opened by open_tables()
(the "query_list"). The children are not opened in the handler at
this stage.

After opening the parent, open_tables() opens each child from the
now extended query_list. When the last child is opened, we remove
the children from the query_list again and attach the children to
the parent. This behaves similar to the old open. However it does
not open the MyISAM tables directly, but grabs them from the already
open children.

When closing a MERGE table in close_thread_table() we detach the
children only. Closing of the children is done implicitly because
they are in thd->open_tables.

For more detail see the comment at the top of ha_myisammrg.cc.

Changed from open_ltable() to open_and_lock_tables() in all places
that can be relevant for MERGE tables. The latter can handle tables
added to the list on the fly. When open_ltable() was used in a loop
over a list of tables, the list must be temporarily terminated
after every table for open_and_lock_tables().
table_list->required_type is set to FRMTYPE_TABLE to avoid open of
special tables. Handling of derived tables is suppressed.
These details are handled by the new function
open_n_lock_single_table(), which has nearly the same signature as
open_ltable() and can replace it in most cases.

In reopen_tables() some of the tables open by a thread can be
closed and reopened. When a MERGE child is affected, the parent
must be closed and reopened too. Closing of the parent is forced
before the first child is closed. Reopen happens in the order of
thd->open_tables. MERGE parents do not attach their children
automatically at open. This is done after all tables are reopened.
So all children are open when attaching them.

Special lock handling like mysql_lock_abort() or mysql_lock_remove()
needs to be suppressed for MERGE children or forwarded to the parent.
This depends on the situation. In loops over all open tables one
suppresses child lock handling. When a single table is touched,
forwarding is done.

Behavioral changes:
===================

This patch changes the behavior of temporary MERGE tables.
Temporary MERGE must have temporary children.
The old behavior was wrong. A temporary table is not locked. Hence
even non-temporary children were not locked. See
Bug 19627 - temporary merge table locking.

You cannot change the union list of a non-temporary MERGE table
when LOCK TABLES is in effect. The following does *not* work:
CREATE TABLE m1 ... ENGINE=MRG_MYISAM ...;
LOCK TABLES t1 WRITE, t2 WRITE, m1 WRITE;
ALTER TABLE m1 ... UNION=(t1,t2) ...;
However, you can do this with a temporary MERGE table.

You cannot create a MERGE table with CREATE ... SELECT, neither
as a temporary MERGE table, nor as a non-temporary MERGE table.
CREATE TABLE m1 ... ENGINE=MRG_MYISAM ... SELECT ...;
Gives error message: table is not BASE TABLE.


include/my_base.h:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added HA_EXTRA_ATTACH_CHILDREN and HA_EXTRA_DETACH_CHILDREN.
include/myisammrg.h:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added element 'children_attached' to MYRG_INFO.
  Added declarations for myrg_parent_open(),
  myrg_attach_children() and myrg_detach_children()
  for the new MERGE table open approach.
mysql-test/extra/binlog_tests/blackhole.test:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Preliminarily added new error message with a comment.
mysql-test/r/create.result:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Fixed test result.
mysql-test/r/delayed.result:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Moved test result from here to merge.result.
mysql-test/r/merge.result:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Fixed/added test result.
mysql-test/r/myisam.result:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Moved test result for bug 8306 from here to merge.result.
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Fixed test result.
mysql-test/t/create.test:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Fixed error number.
mysql-test/t/delayed.test:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Moved test from here to merge.test.
mysql-test/t/merge.test:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Fixed test for new temporary MERGE table behavior.
  Exchanged error numbers by symbolic codes.
  Added tests. Included are tests for bugs
  8306 (moved from myisam.test), 26379, 19627, 25038, 25700, 26377,
  26867, 27660, 30275, and 30273.
  Fixed changes resulting from disabled CREATE...SELECT.
  Integrated tests moved from delayed.test and myisam.test to here.
mysql-test/t/myisam.test:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Moved test for bug 8306 from here to merge.test.
mysys/thr_lock.c:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added code to let the owner of a high priority lock (TL_WRITE_ONLY)
  to bypass its own lock.
sql/ha_ndbcluster_binlog.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added 'thd' argument to init_tmp_table_share().
sql/handler.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added 'thd' argument to init_tmp_table_share().
sql/mysql_priv.h:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Removed declaration of check_merge_table_access(). It is now static
  in sql_parse.cc.
  Added declaration for fix_merge_after_open().
  Renamed open_and_lock_tables() to open_and_lock_tables_derived()
  with additional parameter 'derived'.
  Added inline functions simple_open_n_lock_tables() and
  open_and_lock_tables(), which call open_and_lock_tables_derived()
  and add the argument for 'derived'.
  Added new function open_n_lock_single_table(), which can be used
  as an replacement for open_ltable() in most situations. Internally
  it calls simple_open_n_lock_tables() so hat it is appropriate for
  MERGE tables.
  Added 'thd' argument to init_tmp_table_share().
sql/slave.cc:
  ug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added comment.
sql/sql_base.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  
  Defined new functions add_merge_table_list(),
  attach_merge_children(), detach_merge_children(), and
  fix_merge_after_open() for the new MERGE table open approach.
  
  Added calls of the new functions to
  close_handle_and_leave_table_as_lock(), close_thread_tables(),
  close_thread_table(), unlink_open_table(), reopen_name_locked_table(),
  reopen_table(), drop_locked_tables(), close_temporary_table(),
  and open_tables() respectively.
  
  Prevented special lock handling of merge children (like
  mysql_lock_remove, mysql_lock_merge or mysql_lock_abort)
  at many places. Some of these calls are forwarded to the
  parent table instead.
  
  Added code to set thd->some_tables_deleted for every thread that has
  a table open that we are flushing.
  Added code for MERGE tables to unlink_open_table().
  Added MERGE children to the list of unusable tables in open_table().
  Added MERGE table handling to reopen_table().
  Added lock handling and closing of a parent before the children
  in close_data_files_and_morph_locks().
  Added code for re-attaching children in reopen_tables().
  Added MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN to the locking flags and
  error reporting after mysql_lock_tables() in reopen_tables().
  Added lock handling and closing of a parent before the children
  in close_old_data_files().
  Added lock handling and detaching in drop_locked_tables().
  Added code for removing the children list from the statement list
  to prepare for a repetition in open_tables().
  Added new function open_n_lock_single_table(), which can be used
  as an replacement for open_ltable() in most situations. Internally
  it calls simple_open_n_lock_tables() so hat it is appropriate for
  MERGE tables.
  Disabled use of open_ltable() for MERGE tables.
  Removed function simple_open_n_lock_tables(). It is now inline
  declared in mysql_priv.h.
  Renamed open_and_lock_tables() to open_and_lock_tables_derived()
  with additional parameter 'derived'. open_and_lock_tables() is now
  inline declared in mysql_priv.h.
  Added a check for end-of-list in two loops in lock_tables().
  Added 'thd' argument to init_tmp_table_share().
sql/sql_insert.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Changed from open_ltable() to open_n_lock_single_table() in
  handle_delayed_insert().
  Reestablished LEX settings after lex initialization.
  Added 'thd' argument to init_tmp_table_share().
sql/sql_parse.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Made check_merge_table_access() a static function.
  Disabled use of CREATE...SELECT for MERGE tables.
sql/sql_partition.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Fixed comment typo.
sql/sql_select.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added 'thd' argument to init_tmp_table_share().
sql/sql_table.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Optimized use of mysql_ha_flush() in mysql_rm_table_part2().
  Disabled the use of MERGE tables with prepare_for_restore() and
  prepare_for_repair().
  Changed from open_ltable() to open_n_lock_single_table() in
  mysql_alter_table() and mysql_checksum_table().
  Disabled change of child list under LOCK TABLES.
  Initialized table_list->table in mysql_recreate_table().
sql/sql_trigger.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added code for allowing CREATE TRIGGER under LOCK TABLE, to be able
  to test it with MERGE tables.
sql/table.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added 'thd' argument to init_tmp_table_share().
  Setting table_map_id from query_id in init_tmp_table_share().
  Added member function TABLE::is_children_attached().
sql/table.h:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added access method get_table_def_version() to TABLE_SHARE.
  Added elements for MERGE tables to TABLE and TABLE_LIST.
storage/myisam/ha_myisam.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added an unrelated comment to the function comment of table2myisam().
storage/myisam/ha_myisam.h:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added new member function MI_INFO::file_ptr().
storage/myisammrg/ha_myisammrg.cc:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added callback functions to support parent open and children attach
  of MERGE tables.
  Changed ha_myisammrg::open() to initialize storage engine structures
  and create a list of child tables only. Child tables are not opened.
  Added ha_myisammrg::attach_children(), which does now the main part
  of MERGE open.
  Added ha_myisammrg::detach_children().
  Added calls to ::attach_children() and ::detach_children() to
  ::extra() on HA_EXTRA_ATTACH_CHILDREN and HA_EXTRA_DETACH_CHILDREN
  respectively.
  Added a check for matching TEMPORARY type for children against
  parent.
  Added a check for table def version.
  Added support for thd->open_options to attach_children().
  Changed child path name generation for temporary tables so that
  it does nothing special for temporary tables.
storage/myisammrg/ha_myisammrg.h:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added elements to class ha_myisammrg to support the new
  open approach.
  Changed empty destructor definition to a declaration.
  Implemented in ha_myisammrg.cc.
  Added declaration for methods attach_children() and
  detach_children().
  Added definition for method table_ptr() for use with
  callback functions.
storage/myisammrg/myrg_close.c:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Added a check to avoid closing of MyISAM tables when the
  child tables are not attached.
  Added freeing of rec_per_key_part when the child tables
  are not attached.
storage/myisammrg/myrg_extra.c:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  Some ::extra() functions and ::reset() can be called when
  children are detached.
storage/myisammrg/myrg_open.c:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE
              corrupts a MERGE table
  
  Kept old myrg_open() for MERGE use independent from MySQL.
  Removed an always true condition in myrg_open().
  Set children_attached for independent MERGE use in myrg_open().
  
  Added myrg_parent_open(), myrg_attach_children(), and
  myrg_detach_children() for the new MERGE table open approach.
mysql-test/r/merge-big.result:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
  New test result
mysql-test/t/merge-big.test:
  Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table
  New test case
2007-11-15 20:25:43 +01:00
unknown
6f97fb591b updated result file 2007-11-15 11:58:42 +04:00
unknown
dfbd095246 updated result file 2007-11-14 20:40:07 +04:00
unknown
711cf7503d Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


BitKeeper/etc/ignore:
  auto-union
mysql-test/r/events_bugs.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/select.result:
  manual merge
mysql-test/t/select.test:
  manual merge
2007-11-14 17:30:16 +04:00
unknown
f561308648 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2007-11-14 11:19:34 +01:00
unknown
19ef3ae88d Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-new-rpl


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
  Auto merged
mysql-test/suite/rpl/r/rpl_bug31076.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_bug31076.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event_old.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/partition.test:
  Manual merge.
BitKeeper/deleted/.del-rpl_row_extraColmaster_ndb.result~a2c64bae75b49d2:
  Manual merge.
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Manual merge.
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Manual merge.
mysql-test/suite/rpl/t/disabled.def:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
2007-11-14 11:07:30 +01:00
unknown
296931c1c7 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.1/bug31170-rpl_innodb_bug28430_fails


mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  manual merge
2007-11-12 14:14:15 +02:00
unknown
72bdc00ec9 Merge whalegate.ndb.mysql.com:/home/tomas/cge-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge


mysql-test/suite/ndb/r/ndb_multi.result:
  Auto merged
mysql-test/suite/ndb/t/ndb_multi.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
2007-11-12 10:50:58 +01:00
unknown
d4feaa5a82 Merge five.local.lan:/work/merge/mysql-5.1-build-32153
into  five.local.lan:/work/trees/mysql-5.1-build-src-clean
2007-11-09 22:11:52 +01:00
unknown
facf6305a3 Fix for
Bug#32153 Status output differs - scheduling ?
Modifications:
1. Introduce additional poll routines + adjust queries 
   as fixes for Bug#32153 and another non reported bug
   found during stability testing
2. Replace builtin poll routines by wait_condition.inc.
3. Update the comments


mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Fixes, details are in changeset comment
mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/b_processlist_val_ps.result:
  Updated results
2007-11-09 14:08:12 +01:00
unknown
f89441226b Bug#32217 rpl_ssl fails with different number of records on master and slave
- Add debug queries


mysql-test/suite/rpl/t/rpl_ssl.test:
  Add additional queries to run when we detect that the number of queries between slave and master differs
2007-11-09 11:16:47 +01:00
unknown
e7c56ceb8b BUG#31552 (Replication breaks when deleting rows from out-of-sync table without PK):
Pushing test case for bug only. Bug already fixed as a result of the patch for BUG#19958.


mysql-test/extra/rpl_tests/rpl_row_basic.test:
  Adding test to see that no error is given on slave when deleting
  rows that don't exist on table without primary key.
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result:
  Result change.
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result:
  Result change.
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  Result change.
2007-11-09 11:02:51 +01:00
unknown
1aa12b229e Fixing some tests to make the replication team tree green.
mysql-test/suite/rpl/r/rpl_found_rows.result:
  Result change.
mysql-test/suite/rpl/t/rpl_found_rows.test:
  Adding ORDER BY to avoid order dependencies.
  Setting BINLOG_FORMAT=MIXED; for all master clients: one were missing.
  Dropping procedures that polluted later test results.
2007-11-09 09:13:47 +01:00
unknown
dc34f9285f Bug #31170 rpl_innodb_bug28430 fails: varying timing, ports, and log use
Non-deterministic parameters  of  SHOW SLAVE STATUS are masked out
by means of using the standard include-macro.

The masked-out parameters are not needed by the logics of the original
tests. What is need to demonstre that replication is not stopped remains.



mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  results changed
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  using the standard macro that takes care of masking out env specific values
2007-11-09 10:10:15 +02:00
unknown
4bbdd4a0dd Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b12092-mysql-5.1-rpl
2007-11-08 10:31:51 +01:00
unknown
007b16864f Fixing test case to not print warnings causing a result mismatch for rpl_trigger.
mysql-test/suite/rpl/t/rpl_trigger.test:
  Disabling warnings to prevent different result files for
  MIXED and STATEMENT mode.
2007-11-08 09:25:03 +01:00
unknown
5aafeb3f0a Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b28086-mysql-5.1-rpl
2007-11-07 16:11:59 +01:00