Commit graph

43 commits

Author SHA1 Message Date
Davi Arnaut
0eb26fdfa8 Bug#53445: Build with -Wall and fix warnings that it generates
Apart strict-aliasing warnings, fix the remaining warnings
generated by GCC 4.4.4 -Wall and -Wextra flags.

One major source of warnings was the in-house function my_bcmp
which (unconventionally) took pointers to unsigned characters
as the byte sequences to be compared. Since my_bcmp and bcmp
are deprecated functions whose only difference with memcmp is
the return value, every use of the function is replaced with
memcmp as the special return value wasn't actually being used
by any caller.

There were also various other warnings, mostly due to type
mismatches, missing return values, missing prototypes, dead
code (unreachable) and ignored return values.

BUILD/SETUP.sh:
  Remove flags that are implied by -Wall and -Wextra.
  Do not warn about unused parameters in C++.
BUILD/check-cpu:
  Print only the compiler version instead of verbose banner.
  Although the option is gcc specific, the check was only
  being used for GCC specific checks anyway.
client/mysql.cc:
  bcmp is no longer defined.
client/mysqltest.cc:
  Pass a string to function expecting a format string.
  Replace use of bcmp with memcmp.
cmd-line-utils/readline/Makefile.am:
  Always define _GNU_SOURCE when compiling GNU readline.
  Required to make certain prototypes visible.
cmd-line-utils/readline/input.c:
  Condition for the code to be meaningful.
configure.in:
  Remove check for bcmp.
extra/comp_err.c:
  Use appropriate type.
extra/replace.c:
  Replace use of bcmp with memcmp.
extra/yassl/src/crypto_wrapper.cpp:
  Do not ignore the return value of fgets. Retrieve the file
  position if fgets succeed -- if it fails, the function will
  bail out and return a error.
extra/yassl/taocrypt/include/blowfish.hpp:
  Use a single array instead of accessing positions of the sbox_
  through a subscript to pbox_.
extra/yassl/taocrypt/include/runtime.hpp:
  One definition of such functions is enough.
extra/yassl/taocrypt/src/aes.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/algebra.cpp:
  Rename arguments to avoid shadowing related warnings.
extra/yassl/taocrypt/src/blowfish.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/integer.cpp:
  Do not define type within a anonymous union.
  Use a variable to return a value instead of
  leaving the result in a register -- compiler
  does not know the logic inside the asm.
extra/yassl/taocrypt/src/misc.cpp:
  Define handler for pure virtual functions.
  Remove unused code.
extra/yassl/taocrypt/src/twofish.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/testsuite/test.hpp:
  Function must have C language linkage.
include/m_string.h:
  Remove check which relied on bcmp being defined -- they weren't
  being used as bcmp is only visible when _BSD_SOURCE is defined.
include/my_bitmap.h:
  Remove bogus helpers which were used only in a few files and
  were causing warnings about dead code.
include/my_global.h:
  Due to G++ bug, always silence false-positive uninitialized
  variables warnings when compiling C++ code with G++.
  Remove bogus helper.
libmysql/Makefile.shared:
  Remove built-in implementation of bcmp.
mysql-test/lib/My/SafeProcess/safe_process.cc:
  Cast pid to largest possible type for a process identifier.
mysys/mf_loadpath.c:
  Leave space of the ending nul.
mysys/mf_pack.c:
  Replace bcmp with memcmp.
mysys/my_bitmap.c:
  Dead code removal.
mysys/my_gethwaddr.c:
  Remove unused variable.
mysys/my_getopt.c:
  Silence bogus uninitialized variable warning.
  Do not cast away the constant qualifier.
mysys/safemalloc.c:
  Cast to expected type.
mysys/thr_lock.c:
  Silence bogus uninitialized variable warning.
sql/field.cc:
  Replace bogus helper with a more appropriate logic which is
  used throughout the code.
sql/item.cc:
  Remove bogus logical condition which always evaluates to TRUE.
sql/item_create.cc:
  Simplify code to avoid signedness related warnings.
sql/log_event.cc:
  Replace use of bcmp with memcmp.
  No need to use helpers for simple bit operations.
sql/log_event_old.cc:
  Replace bmove_align with memcpy.
sql/mysqld.cc:
  Move use declaration of variable to the ifdef block where it
  is used. Remove now-unnecessary casts and arguments.
sql/set_var.cc:
  Replace bogus helpers with simple and classic bit operations.
sql/slave.cc:
  Cast to expected type and silence bogus warning.
sql/sql_class.h:
  Don't use enum values as bit flags, the supposed type safety is
  bogus as the combined bit flags are not a value in the enumeration.
sql/udf_example.c:
  Only declare variable when necessary.
sql/unireg.h:
  Replace use of bmove_align with memcpy.
storage/innobase/os/os0file.c:
  Silence bogus warning.
storage/myisam/mi_open.c:
  Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
  char.
storage/myisam/mi_page.c:
  Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
  char.
strings/bcmp.c:
  Remove built-in bcmp.
strings/ctype-ucs2.c:
  Silence bogus warning.
tests/mysql_client_test.c:
  Use a appropriate type as expected by simple_command().
2010-07-02 15:30:47 -03:00
Luis Soares
fc11d74d13 BUG#53657: Slave crashed with error 22 when trying to lock mutex
at mf_iocache.c, line 1722

The slave crashed while two threads: IO thread and user thread
raced for the same mutex (the append_buffer_lock protecting the
relay log's IO_CACHE). The IO thread was trying to flush the
cache, and for that was grabbing the append_buffer_lock. 

However, the other thread was closing and reopening the relay log
when the IO thread tried to lock. Closing and reopening the log
includes destroying and reinitialising the IO_CACHE
mutex. Therefore, the IO thread tried to lock a destroyed mutex.

We fix this by backporting patch for BUG#50364 which fixed this
bug in mysql server 5.5+. The patch deploys missing
synchronization when flush_master_info is called and the relay
log is flushed by the IO thread. In detail the patch backports
revision (from mysql-trunk):
- luis.soares@sun.com-20100203165617-b1yydr0ee24ycpjm

This patch already includes the post-push fix also in BUG#50364:
- luis.soares@sun.com-20100222002629-0cijwqk6baxhj7gr
2010-05-24 17:43:27 +01:00
Andrei Elkin
8948664470 correction to the earlier merging: s/return/DBUG_RETURN/ 2009-12-14 18:50:22 +02:00
Andrei Elkin
c00bfe59b3 merging 5.0-bt -> 5.1-bt to local branch with bug@47210 2009-12-14 18:32:22 +02:00
Alfranio Correia
a4c50983f4 BUG#45292 orphan binary log created when starting server twice
This patch fixes three bugs as follows. First, aborting the server while purging
binary logs might generate orphan files due to how the purge operation was
implemented:

          (purge routine - sql/log.cc - MYSQL_BIN_LOG::purge_logs)

      1 - register the files to be removed in a temporary buffer.
      2 - update the log-bin.index.
      3 - flush the log-bin.index.
      4 - erase the files whose names where register in the temporary buffer
      in step 1.

Thus a failure while  executing step 4 would generate an orphan file. Second,
a similar issue might happen while creating a new binary as follows:

          (create routine - sql/log.cc - MYSQL_BIN_LOG::open)

      1 - open the new log-bin.
      2 - update the log-bin.index.

Thus a failure while executing step 1 would generate an orphan file.

To fix these issues, we record the files to be purged or created before really
removing or adding them. So if a failure happens such records can be used to
automatically remove dangling files. The new steps might be outlined as follows:

          (purge routine - sql/log.cc - MYSQL_BIN_LOG::purge_logs)

      1 - register the files to be removed in the log-bin.~rec~ placed in
      the data directory.
      2 - update the log-bin.index.
      3 - flush the log-bin.index.
      4 - delete the log-bin.~rec~.

          (create routine - sql/log.cc - MYSQL_BIN_LOG::open)

      1 - register the file to be created in the log-bin.~rec~
      placed in the data directory.
      2 - open the new log-bin.
      3 - update the log-bin.index.
      4 - delete the log-bin.~rec~.

          (recovery routine - sql/log.cc - MYSQL_BIN_LOG::open_index_file)

      1 - open the log-bin.index.
      2 - open the log-bin.~rec~.
      3 - for each file in log-bin.~rec~.
        3.1 Check if the file is in the log-bin.index and if so ignore it.
        3.2 Otherwise, delete it.

The third issue can be described as follows. The purge operation was allowing
to remove a file in use thus leading to the loss of data and possible
inconsistencies between the master and slave. Roughly, the routine was only
taking into account the dump threads and so if a slave was not connect the
file might be delete even though it was in use.
2009-12-04 14:40:42 +00:00
unknown
b9f9fe2e1a Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
The 'slave_patternload_file' is assigned to the real path of the load data file 
when initializing the object of Relay_log_info. But the path of the load data
file is not formatted to real path when executing event from relay log. So the 
error will be encountered if the path of the load data file is a symbolic link.

Actually the global 'opt_secure_file_priv' is not formatted to real path when 
loading data from file. So the same thing will happen too.

      
To fix these errors, the path of the load data file should be formatted to 
real path when executing event from relay log. And the 'opt_secure_file_priv' 
should be formatted to real path when loading data infile.


mysql-test/suite/rpl/r/rpl_loaddata_symlink.result:
  Test result for bug#43913.
mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh:
  Added the test file to create a link from $MYSQLTEST_VARDIR/std_data 
  to $MYSQLTEST_VARDIR/std_data_master_link
mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh:
  Added the test file to create a link from $MYSQLTEST_VARDIR/std_data 
  to $MYSQLTEST_VARDIR/std_data_slave_link
mysql-test/suite/rpl/t/rpl_loaddata_symlink.test:
  Added the test file to verify if loading data infile will work fine 
  if the path of the load data file is a symbolic link.
sql/rpl_rli.cc:
  Added call 'my_realpath' function for avoiding sometimes the 'fn_format' 
  function can't format real path rightly.
2009-11-28 12:43:16 +08:00
unknown
b958fc655f Bug #34739 unexpected binlog file name when --log-bin is set to a directory name
If --log-bin is set to a directory name with the trailing 'FN_LIBCHAR', 
which will be '/' on Unix like systems, and '\\' on Windows like systems. 
the basename of the binlog is empty so that the created files named 
'.000001' and '.index'. It is not expected. 
The same thing happened to --log-bin-index, --relay-log and 
--relay-log-index options.

To resolve the problem, in these cases the program should report an error 
and abort.


sql/mysqld.cc:
  Added a check for the value of the --log-bin and --log-bin-index arguments, 
  if it's a directory, reports an error and aborts.
sql/rpl_rli.cc:
  Added a check for the value of the --relay-log and --relay-log-index arguments, 
  if it's a directory, reports an error and aborts.
2009-11-05 14:07:31 +08:00
Staale Smedseng
6a89842e36 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Cleaning up warnings not present in 5.0.
2009-09-23 15:21:29 +02:00
Andrei Elkin
22717a0459 Bug #44115 purge_relay_logs doesn't return an error when count_relay_log_space fails
purge_relay_logs() did not propagate an error happend in count_relay_log_space().

Fixed with the suggestesd setting the error= true.
Note, propagation generally out of purge_relay_logs() was fixed for Bug #44179,
and the issue does not exist in 6.0 thanks to a patch for WL#2775.



sql/rpl_rli.cc:
  the error is set on if count_relay_log_space(rli) fails.
2009-07-09 10:28:38 +03:00
Alfranio Correia
f6eb9426ce BUG#43949 Initialization of slave produces a warning message in Valgrind
In order to define the --slave-load-tmpdir, the init_relay_log_file()
was calling fn_format(MY_PACK_FILENAME) which internally was indirectly
calling strmov_overlapp() (through pack_dirname) and the following
warning message was being printed out while running in Valgrind:
"source and destination overlap in strcpy".

We fixed the issue by removing the flag MY_PACK_FILENAME as it was not
necessary. In a nutshell, with this flag the function fn_format() tried
to replace a directory by either "~", "." or "..". However, we wanted
exactly to remove such strings.

In this patch, we also refactored the functions init_relay_log_file()
and check_temp_dir(). The former was refactored to call the fn_format()
with the flag MY_SAFE_PATH along with the MY_RETURN_REAL_PATH,  in order
to avoid issues with long directories and return an absolute path,
respectively. The flag MY_SAFE_UNPACK_FILENAME was removed too as it was
responsible for removing "~", "." or ".." only from the file parameter
and we wanted to remove such strings from the directory parameter in
the fn_format(). This result is stored in an rli variable, which is then
processed by the other function in order to verify if the directory exists
and if we are able to create files in it.


mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test:
  Changed the output to make it consistent among different runs.
mysys/mf_format.c:
  Replaced a return for DBUG_RETURN.
2009-04-19 02:21:33 +01:00
Alfranio Correia
2d3ac117a4 Post-fix for BUG#38174. 2009-02-22 13:40:52 +00:00
Alfranio Correia
d822ab8957 BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode
If secure-file-priv was set on slave, it became unable to execute
LOAD DATA INFILE statements sent from master using mixed or
statement-based replication.
                  
This patch fixes the issue by ignoring this security restriction
and checking if the files are created and read by the slave in the
--slave-load-tmpdir while executing the SQL Thread.
2009-02-21 09:36:07 +00:00
He Zhenxing
bd35cfe22e BUG#38734 rpl_server_id2 sync_with_master failed
Rotate event is automatically generated and written when rotating binary
log or relay log. Rotate events for relay logs are usually ignored by slave
SQL thread becuase they have the same server id as that of the slave.
However, if --replicate-same-server-id is enabled, rotate event
for relay log would be treated as if it's a rotate event from master, and
would be executed by slave to update the rli->group_master_log_name and
rli->group_master_log_pos to a wrong value and cause the MASTER_POS_WAIT
function to fail and return NULL.

This patch fixed this problem by setting a flag bit (LOG_EVENT_RELAY_LOG_F)
in the event to tell the SQL thread to ignore these Rotate events generated
for relay logs.

This patch also added another binlog event flag bit (LOG_EVENT_ARTIFICIAL_F)
to distinquish faked events, the method used before this was by checking if
log_pos was zero.


sql/log.h:
  Add a member to MYSQL_BIN_LOG to distinguish binary log from relay log.
sql/log_event.cc:
  Change artificial_event member to LOG_EVENT_ARTIFICIAL_F flag
  
  If LOG_EVENT_RELAY_LOG_F is set in the event flags for a rotate event, ignore it when updating position
  
  Refactored the code in Rotate_log_event::do_update_pos
sql/log_event.h:
  Add LOG_EVENT_RELAY_LOG_F flag to Log_event flags
  Add RELAY_LOG flag to Rotate_log_event flags
sql/sql_repl.cc:
  Set LOG_EVENT_ARTIFICIAL_F for fake rotate events
2008-09-28 15:34:25 +08:00
unknown
03c110ea21 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/lib/mtr_report.pl:
  SCCS merged
2008-03-26 10:27:00 +01:00
unknown
774d21cf3b Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl


mysql-test/include/commit.inc:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/commit_1innodb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2008-03-14 18:32:01 +01:00
unknown
4597814717 Post-merge fixes.
mysql-test/extra/rpl_tests/rpl_loaddata.test:
  Removing SHOW MASTER STATUS that does not seem to make sense.
mysql-test/extra/rpl_tests/rpl_log.test:
  Correcting test case to sync slave with master.
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Result change.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Removing unsafe variable from list of safe variables.
mysql-test/suite/rpl/r/rpl_loaddata.result:
  Result change.
mysql-test/suite/rpl/r/rpl_skip_error.result:
  Result change.
mysql-test/suite/rpl/t/rpl_skip_error.test:
  Correcting bad manual+automatic merge. Test is now only relevant for statement-
  based replication.
sql/rpl_rli.cc:
  Correcting automerge undoing previous change of return value.
  Relay_log_info::wait_for_pos() should return -2 when not initialized to work
  correctly.
2008-03-14 17:52:57 +01:00
unknown
e79249f81b Manual merge
configure.in:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/partition_symlink.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/partition_info.cc:
  Auto merged
sql/partition_info.h:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_parse.cc:
  Manual merge. Needs later fix. New code in create table was not
  accepted. Needs to be added to mysql_create_table_no_lock().
2008-03-14 12:02:11 +01:00
unknown
83bcd5dfab BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
log-slave-updates and circul repl

After merge fixes.


mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt:
  Rename: mysql-test/t/rpl_dual_pos_advance-slave.opt -> mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt
mysql-test/include/wait_for_slave_sql_to_stop.inc:
  Do not change connection if it was requested by caller (needed for
  circular replication tests).
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
  Let include/wait_for_slave_sql_to_stop.inc know that we do not want to
  change connection to slave.
sql/rpl_rli.cc:
  After merge fix.
sql/rpl_rli.h:
  After merge fix.
sql/slave.cc:
  After merge fix.
2008-02-27 21:46:06 +04:00
unknown
9191052de5 Initialization order cleanups to get rid of warnings from the
-Wreorder option added by the patch for bug#31326.
2008-02-18 14:35:44 +03:00
unknown
6f6fabb7f9 Patch to eliminate some valgrind warnings in debug printout code.
(originally from Mats)


sql/rpl_rli.cc:
  Adding variable to mark an instance of Relay_log_info as fake.
sql/rpl_rli.h:
  Adding variable to mark an instance of Relay_log_info as fake.
sql/slave.cc:
  Not printing debug information if we are working with a fake
  instance of Relay_log_info. This because the result of calling
  update is nonsense, and trying to print it generates valgrind
  warnings.
sql/sql_binlog.cc:
  Marking newly created instance of Relay_log_info as a fake instance.
2008-02-11 14:04:30 +03:00
unknown
be5a46a69b Patch to eliminate some valgrind warnings in debug printout code.
sql/rpl_rli.cc:
  Adding variable to mark an instance of Relay_log_info as fake.
sql/rpl_rli.h:
  Adding variable to mark an instance of Relay_log_info as fake.
sql/slave.cc:
  Not printing debug information if we are working with a fake
  instance of Relay_log_info. This because the result of calling
  update is nonsense, and trying to print it generates valgrind
  warnings.
sql/sql_binlog.cc:
  Marking newly created instance of Relay_log_info as a fake instance.
2008-02-06 14:44:47 +01:00
unknown
57c599b3d4 Disabling test case binlog_old_version for embedded server.
mysql-test/lib/mtr_report.pl:
  Ignoring benign error message (killing query causes unpredictable
  error messages).
mysql-test/suite/binlog/t/binlog_old_versions.test:
  Disabling test case for embedded server.
sql/rpl_rli.cc:
  Inititializing uninitialized variable causing valgrind warning.
2008-02-05 08:22:27 +01:00
unknown
047ec78f2c Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge


mysql-test/include/have_multi_ndb.inc:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result:
  Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event_old.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_binlog.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_string.cc:
  Auto merged
mysql-test/Makefile.am:
  SCCS merged
mysql-test/mysql-test-run.pl:
  Manual merge.
mysql-test/suite/binlog/t/disabled.def:
  Manual merge.
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
  Manual merge.
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
  Manual merge.
sql/log_event.cc:
  Manual merge.
  ,
2007-12-19 18:51:46 +01: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
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
bf9eb0f0d7 manual merge for bug_29136, bug#29309.
mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test:
  manual merge from 5.0
mysql-test/r/innodb.result:
  results changed
mysql-test/r/multi_update.result:
  results changed
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  manual merge: results re-recorded
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  results changed
mysql-test/suite/manual/r/rpl_replication_delay.result:
  results recorded for 5.1
mysql-test/t/innodb.test:
  removing bug27716 regression test as one exists in binlog suite already.
mysql-test/t/multi_update.test:
  manual merge plus refining for execution in both binlog_format.
sql/log_event.cc:
  bloody manual merge;
  the fact that an event is artificial is encode with setting timestamp argument to zero.
  rli's last_master_timestamp won't be updated in stmt_done in such case.
sql/rpl_rli.cc:
  simulation and the real fixing code.
  Don't update last_master_timestamp with zero.
sql/sql_delete.cc:
  manual merge
2007-10-13 23:12:50 +03:00
unknown
044a4a3e06 Renaming RELAY_LOG_INFO and st_relay_log_info to follow coding standards
(and be more friendly to Doxygen by removing unnecessary typedefs).


sql/log.cc:
  Renaming struct st_relay_log_info to class Relay_log_info.
sql/log.h:
  Renaming struct st_relay_log_info to class Relay_log_info.
sql/log_event.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/log_event.h:
  Renaming struct st_relay_log_info to class Relay_log_info.
  Renaming RELAY_LOG_INFO to Relay_log_info.
  Removing typedef RELAY_LOG_INFO.
sql/log_event_old.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/log_event_old.h:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_mi.h:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_record.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_record.h:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_record_old.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_record_old.h:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_rli.cc:
  Renaming struct st_relay_log_info to class Relay_log_info.
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_rli.h:
  Renaming struct st_relay_log_info to class Relay_log_info.
  Renaming RELAY_LOG_INFO to Relay_log_info.
  Removing typedef RELAY_LOG_INFO.
sql/rpl_utility.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/rpl_utility.h:
  Renaming struct st_relay_log_info to class Relay_log_info.
  Renaming RELAY_LOG_INFO to Relay_log_info.
  Removing typedef RELAY_LOG_INFO.
sql/slave.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/slave.h:
  Renaming struct st_relay_log_info to class Relay_log_info.
  Renaming RELAY_LOG_INFO to Relay_log_info.
  Removing typedef RELAY_LOG_INFO.
sql/sql_binlog.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
sql/sql_class.h:
  Renaming struct st_relay_log_info to class Relay_log_info.
  Renaming RELAY_LOG_INFO to Relay_log_info.
  Removing typedef RELAY_LOG_INFO.
sql/sql_repl.cc:
  Renaming RELAY_LOG_INFO to Relay_log_info.
2007-08-16 07:37:50 +02:00
unknown
9fea6f4775 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b24954-mysql-5.1-new-rpl


mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
  Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/t/binlog_row_mix_innodb_myisam.test:
  Auto merged
mysql-test/t/rpl_000015.test:
  Auto merged
mysql-test/t/rpl_flushlog_loop.test:
  Auto merged
mysql-test/t/rpl_ndb_bank.test:
  Auto merged
mysql-test/t/rpl_rbr_to_sbr.test:
  Auto merged
mysql-test/t/rpl_replicate_do.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/rpl_row_until.test:
  Auto merged
mysql-test/t/rpl_slave_status.test:
  Auto merged
mysql-test/t/rpl_ssl1.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/rpl_mi.cc:
  Auto merged
sql/rpl_utility.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
mysql-test/r/rpl_change_master.result:
  Manual merge
mysql-test/r/rpl_000015.result:
  Manual merge
mysql-test/r/rpl_deadlock_innodb.result:
  Manual merge
mysql-test/r/rpl_empty_master_crash.result:
  Manual merge
mysql-test/r/rpl_extraCol_innodb.result:
  Manual merge
mysql-test/r/rpl_extraCol_myisam.result:
  Manual merge
mysql-test/r/rpl_flushlog_loop.result:
  Manual merge
mysql-test/r/rpl_loaddata.result:
  Manual merge
mysql-test/r/rpl_log_pos.result:
  Manual merge
mysql-test/r/rpl_ndb_basic.result:
  Manual merge
mysql-test/r/rpl_ndb_extraCol.result:
  Manual merge
mysql-test/r/rpl_ndb_idempotent.result:
  Manual merge
mysql-test/r/rpl_ndb_log.result:
  Manual merge
mysql-test/r/rpl_rbr_to_sbr.result:
  Manual merge
mysql-test/r/rpl_redirect.result:
  Manual merge
mysql-test/r/rpl_replicate_do.result:
  Manual merge
mysql-test/r/rpl_rotate_logs.result:
  Manual merge
mysql-test/r/rpl_row_inexist_tbl.result:
  Manual merge
mysql-test/r/rpl_row_log.result:
  Manual merge
mysql-test/r/rpl_row_log_innodb.result:
  Manual merge
mysql-test/r/rpl_row_max_relay_size.result:
  Manual merge
mysql-test/r/rpl_row_reset_slave.result:
  Manual merge
mysql-test/r/rpl_row_tabledefs_2myisam.result:
  Manual merge
mysql-test/r/rpl_row_tabledefs_3innodb.result:
  Manual merge
mysql-test/r/rpl_row_until.result:
  Manual merge
mysql-test/r/rpl_server_id1.result:
  Manual merge
mysql-test/r/rpl_server_id2.result:
  Manual merge
mysql-test/r/rpl_slave_status.result:
  Manual merge
mysql-test/r/rpl_ssl1.result:
  Manual merge
mysql-test/r/rpl_stm_log.result:
  Manual merge
mysql-test/r/rpl_stm_max_relay_size.result:
  Manual merge
mysql-test/r/rpl_stm_reset_slave.result:
  Manual merge
mysql-test/r/rpl_stm_until.result:
  Manual merge
mysql-test/t/rpl_log_pos.test:
  Manual merge
mysql-test/t/rpl_ndb_basic.test:
  Manual merge
sql/log_event.cc:
  Manual merge
sql/rpl_mi.h:
  Manual merge
sql/rpl_rli.cc:
  Manual merge
sql/rpl_rli.h:
  Manual merge
sql/slave.cc:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
sql/slave.h:
  Manual merge
2007-06-09 08:29:51 +02:00
unknown
79a609aa73 BUG#24954 (Last_errno and Last_error not set after master_retry_count was reached):
Adding new fields Last_{IO,SQL}_Errno and Last_{IO,SQL}_Error to output
of SHOW SLAVE STATUS to hold errors from I/O and SQL thread respectively.
Old fields Last_Error and Last_Errno are aliases for Last_SQL_Error and
Last_SQL_Errno respectively.

Fields are added last to output of SHOW SLAVE STATUS to allow old applications
to use the same positional arguments into the row, while allowing new
application to benefit from the added information.

In addition, some new error codes are added (especially for the I/O
thread) to be able to provide sensible error message.


mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change
mysql-test/r/rpl_000015.result:
  Result change
mysql-test/r/rpl_change_master.result:
  Result change
mysql-test/r/rpl_deadlock_innodb.result:
  Result change
mysql-test/r/rpl_empty_master_crash.result:
  Result change
mysql-test/r/rpl_extraCol_innodb.result:
  Result change
  ---
  Result change.
mysql-test/r/rpl_extraCol_myisam.result:
  Result change
  ---
  Result change.
mysql-test/r/rpl_flushlog_loop.result:
  Result change
mysql-test/r/rpl_loaddata.result:
  Result change
mysql-test/r/rpl_log_pos.result:
  Result change
mysql-test/r/rpl_ndb_basic.result:
  Result change
mysql-test/r/rpl_ndb_extraCol.result:
  Result change
  ---
  Result change.
mysql-test/r/rpl_ndb_idempotent.result:
  Result change
mysql-test/r/rpl_ndb_log.result:
  Result change
mysql-test/r/rpl_openssl.result:
  Result change
mysql-test/r/rpl_rbr_to_sbr.result:
  Result change
mysql-test/r/rpl_redirect.result:
  Result change
mysql-test/r/rpl_replicate_do.result:
  Result change
mysql-test/r/rpl_rotate_logs.result:
  Result change
mysql-test/r/rpl_row_inexist_tbl.result:
  Result change
mysql-test/r/rpl_row_log.result:
  Result change
mysql-test/r/rpl_row_log_innodb.result:
  Result change
mysql-test/r/rpl_row_max_relay_size.result:
  Result change
mysql-test/r/rpl_row_reset_slave.result:
  Result change
mysql-test/r/rpl_row_tabledefs_2myisam.result:
  Result change
  ---
  Result change.
mysql-test/r/rpl_row_tabledefs_3innodb.result:
  Result change
  ---
  Result change.
mysql-test/r/rpl_row_until.result:
  Result change
mysql-test/r/rpl_server_id1.result:
  Result change
mysql-test/r/rpl_server_id2.result:
  Result change
mysql-test/r/rpl_slave_status.result:
  Result change
mysql-test/r/rpl_stm_log.result:
  Result change
mysql-test/r/rpl_stm_max_relay_size.result:
  Result change
  ---
  Result change.
mysql-test/r/rpl_stm_reset_slave.result:
  Result change
mysql-test/r/rpl_stm_until.result:
  Result change
mysql-test/t/binlog_row_mix_innodb_myisam.test:
  Test fixed.
mysql-test/t/rpl_000015.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_change_master.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_empty_master_crash.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_flushlog_loop.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_log_pos.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_bank.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_basic.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_idempotent.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_sync.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_openssl.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_rbr_to_sbr.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_redirect.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_replicate_do.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_rotate_logs.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_row_inexist_tbl.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_row_until.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_server_id1.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_server_id2.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_slave_status.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_stm_until.test:
  Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
sql/Makefile.am:
  Adding new files
sql/log_event.cc:
  Changes to use Slave_reporting_capability for reporting errors.
  
  Adding debug variable to stop slave with an out-of-memory error or with
  a fatal error. The checks are put both in the new Execute_load_query_
  log_event and in the old Load_log_event which is used for Execute_load_
  log_event.
  
  Adding code to generate fatal error message.
  
  Eliminating redundant arguments when printing ER_NO_DEFAULT_FOR_FIELD
  message.
sql/rpl_mi.cc:
  Using Slave_reporting_capability for error reporting.
sql/rpl_mi.h:
  Using Slave_reporting_capability to handle I/O thread errors and other messages.
sql/rpl_rli.cc:
  Using Slave_reporting_capability to handle SQL thread errors and other messages.
sql/rpl_rli.h:
  Changes to use Slave_reporting_capability for reporting SQL thread error and other messages.
sql/rpl_utility.cc:
  Changes to use Slave_reporting_capability for reporting errors.
sql/slave.cc:
  Changes to use Slave_reporting_capability for reporting errors.
sql/slave.h:
  Removing slave_print_msg()
sql/share/errmsg.txt:
  New error messages.
  
  Making message for ER_NO_DEFAULT_FOR_FIELD consistent over languages
  (actually restoring old message).
  
  Adding argument to ER_SLAVE_FATAL_ERROR message.
sql/sql_repl.cc:
  Using new names for thread masks.
mysql-test/t/rpl_loaddata_fatal-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal-slave.opt''
sql/rpl_reporting.cc:
  New BitKeeper file ``sql/rpl_reporting.cc''
sql/rpl_reporting.h:
  New BitKeeper file ``sql/rpl_reporting.h''
mysql-test/include/show_slave_status.inc:
  New BitKeeper file ``mysql-test/include/show_slave_status.inc''
mysql-test/r/rpl_loaddata_fatal.result:
  New BitKeeper file ``mysql-test/r/rpl_loaddata_fatal.result''
mysql-test/t/rpl_loaddata_fatal.test:
  New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal.test''
2007-06-09 07:19:37 +02:00
unknown
f252f9248a WL#3817: Simplify string / memory area types and make things more consistent (first part)
The following type conversions was done:

- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t

Removed declaration of byte, gptr, my_string, my_size_t and size_s. 

Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
  instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
  as this requires fewer casts in the code and is more in line with how the
  standard functions work.
- Added extra length argument to dirname_part() to return the length of the
  created string.
- Changed (at least) following functions to take uchar* as argument:
  - db_dump()
  - my_net_write()
  - net_write_command()
  - net_store_data()
  - DBUG_DUMP()
  - decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
  argument to my_uncompress() from a pointer to a value as we only return
  one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
  the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
  casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.

Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
  needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
  explicitely as this conflict was often hided by casting the function to
  hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
  get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
  size_t. This was needed to properly detect errors (which are
  returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
  (portability fix)
- Removed windows specific code to restore cursor position as this
  causes slowdown on windows and we should not mix read() and pread()
  calls anyway as this is not thread safe. Updated function comment to
  reflect this. Changed function that depended on original behavior of
  my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
  m_size is the number of elements in the array, not a string/memory
  length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
  Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
  - Replaced some calls to alloc_root + memcpy to use
    strmake_root()/strdup_root().
  - Changed some calls from memdup() to strmake() (Safety fix)
  - Simpler loops in client-simple.c


BitKeeper/etc/ignore:
  added libmysqld/ha_ndbcluster_cond.cc
  ---
  added debian/defs.mk debian/control
client/completion_hash.cc:
  Remove not needed casts
client/my_readline.h:
  Remove some old types
client/mysql.cc:
  Simplify types
client/mysql_upgrade.c:
  Remove some old types
  Update call to dirname_part
client/mysqladmin.cc:
  Remove some old types
client/mysqlbinlog.cc:
  Remove some old types
  Change some buffers to be uchar to avoid casts
client/mysqlcheck.c:
  Remove some old types
client/mysqldump.c:
  Remove some old types
  Remove some not needed casts
  Change some string lengths to size_t
client/mysqlimport.c:
  Remove some old types
client/mysqlshow.c:
  Remove some old types
client/mysqlslap.c:
  Remove some old types
  Remove some not needed casts
client/mysqltest.c:
  Removed some old types
  Removed some not needed casts
  Updated hash-get-key function arguments
  Updated parameters to dirname_part()
client/readline.cc:
  Removed some old types
  Removed some not needed casts
  Changed some string lengths to use size_t
client/sql_string.cc:
  Removed some old types
dbug/dbug.c:
  Removed some old types
  Changed some string lengths to use size_t
  Changed some prototypes to avoid casts
extra/comp_err.c:
  Removed some old types
extra/innochecksum.c:
  Removed some old types
extra/my_print_defaults.c:
  Removed some old types
extra/mysql_waitpid.c:
  Removed some old types
extra/perror.c:
  Removed some old types
extra/replace.c:
  Removed some old types
  Updated parameters to dirname_part()
extra/resolve_stack_dump.c:
  Removed some old types
extra/resolveip.c:
  Removed some old types
include/config-win.h:
  Removed some old types
include/decimal.h:
  Changed binary strings to be uchar* instead of char*
include/ft_global.h:
  Removed some old types
include/hash.h:
  Removed some old types
include/heap.h:
  Removed some old types
  Changed records_under_level to be 'ulong' instead of 'uint' to clarify usage of variable
include/keycache.h:
  Removed some old types
include/m_ctype.h:
  Removed some old types
  Changed some string lengths to use size_t
  Changed character length functions to return uint
  unsigned char -> uchar
include/m_string.h:
  Removed some old types
  Changed some string lengths to use size_t
include/my_alloc.h:
  Changed some string lengths to use size_t
include/my_base.h:
  Removed some old types
include/my_dbug.h:
  Removed some old types
  Changed some string lengths to use size_t
  Changed db_dump() to take uchar * as argument for memory to reduce number of casts in usage
include/my_getopt.h:
  Removed some old types
include/my_global.h:
  Removed old types:
  my_size_t -> size_t
  byte -> uchar
  gptr -> uchar *
include/my_list.h:
  Removed some old types
include/my_nosys.h:
  Removed some old types
include/my_pthread.h:
  Removed some old types
include/my_sys.h:
  Removed some old types
  Changed MY_FILE_ERROR to be in line with new definitions of my_write()/my_read()
  Changed some string lengths to use size_t
  my_malloc() / my_free() now uses void *
  Updated parameters to dirname_part() & my_uncompress()
include/my_tree.h:
  Removed some old types
include/my_trie.h:
  Removed some old types
include/my_user.h:
  Changed some string lengths to use size_t
include/my_vle.h:
  Removed some old types
include/my_xml.h:
  Removed some old types
  Changed some string lengths to use size_t
include/myisam.h:
  Removed some old types
include/myisammrg.h:
  Removed some old types
include/mysql.h:
  Removed some old types
  Changed byte streams to use uchar* instead of char*
include/mysql_com.h:
  Removed some old types
  Changed some string lengths to use size_t
  Changed some buffers to be uchar* to avoid casts
include/queues.h:
  Removed some old types
include/sql_common.h:
  Removed some old types
include/sslopt-longopts.h:
  Removed some old types
include/violite.h:
  Removed some old types
  Changed some string lengths to use size_t
libmysql/client_settings.h:
  Removed some old types
libmysql/libmysql.c:
  Removed some old types
libmysql/manager.c:
  Removed some old types
libmysqld/emb_qcache.cc:
  Removed some old types
libmysqld/emb_qcache.h:
  Removed some old types
libmysqld/lib_sql.cc:
  Removed some old types
  Removed some not needed casts
  Changed some buffers to be uchar* to avoid casts
  true -> TRUE, false -> FALSE
mysys/array.c:
  Removed some old types
mysys/charset.c:
  Changed some string lengths to use size_t
mysys/checksum.c:
  Include zlib to get definition for crc32
  Removed some old types
mysys/default.c:
  Removed some old types
  Changed some string lengths to use size_t
mysys/default_modify.c:
  Changed some string lengths to use size_t
  Removed some not needed casts
mysys/hash.c:
  Removed some old types
  Changed some string lengths to use size_t
  Note: Prototype of hash_key() has changed which may cause problems if client uses hash_init() with a cast for the hash-get-key function.
  hash_element now takes 'ulong' as the index type (cleanup)
mysys/list.c:
  Removed some old types
mysys/mf_cache.c:
  Changed some string lengths to use size_t
mysys/mf_dirname.c:
  Removed some old types
  Changed some string lengths to use size_t
  Added argument to dirname_part() to avoid calculation of length for 'to'
mysys/mf_fn_ext.c:
  Removed some old types
  Updated parameters to dirname_part()
mysys/mf_format.c:
  Removed some old types
  Changed some string lengths to use size_t
mysys/mf_getdate.c:
  Removed some old types
mysys/mf_iocache.c:
  Removed some old types
  Changed some string lengths to use size_t
  Changed calculation of 'max_length' to be done the same way in all functions
mysys/mf_iocache2.c:
  Removed some old types
  Changed some string lengths to use size_t
  Clean up comments
  Removed not needed indentation
mysys/mf_keycache.c:
  Removed some old types
mysys/mf_keycaches.c:
  Removed some old types
mysys/mf_loadpath.c:
  Removed some old types
mysys/mf_pack.c:
  Removed some old types
  Changed some string lengths to use size_t
  Removed some not needed casts
  Removed very old VMS code
  Updated parameters to dirname_part()
  Use result of dirnam_part() to remove call to strcat()
mysys/mf_path.c:
  Removed some old types
mysys/mf_radix.c:
  Removed some old types
mysys/mf_same.c:
  Removed some old types
mysys/mf_sort.c:
  Removed some old types
mysys/mf_soundex.c:
  Removed some old types
mysys/mf_strip.c:
  Removed some old types
mysys/mf_tempdir.c:
  Removed some old types
mysys/mf_unixpath.c:
  Removed some old types
mysys/mf_wfile.c:
  Removed some old types
mysys/mulalloc.c:
  Removed some old types
mysys/my_alloc.c:
  Removed some old types
  Changed some string lengths to use size_t
  Use void* as type for allocated memory area
  Removed some not needed casts
  Changed argument 'Size' to 'length' according coding guidelines
mysys/my_chsize.c:
  Changed some buffers to be uchar* to avoid casts
mysys/my_compress.c:
  More comments
  Removed some old types
  Changed string lengths to use size_t
  Changed arguments to my_uncompress() to make them easier to understand
  Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix)
  Changed type of 'pack_data' argument to packfrm() to avoid casts.
mysys/my_conio.c:
  Changed some string lengths to use size_t
mysys/my_create.c:
  Removed some old types
mysys/my_div.c:
  Removed some old types
mysys/my_error.c:
  Removed some old types
mysys/my_fopen.c:
  Removed some old types
mysys/my_fstream.c:
  Removed some old types
  Changed some string lengths to use size_t
  writen -> written
mysys/my_getopt.c:
  Removed some old types
mysys/my_getwd.c:
  Removed some old types
  More comments
mysys/my_init.c:
  Removed some old types
mysys/my_largepage.c:
  Removed some old types
  Changed some string lengths to use size_t
mysys/my_lib.c:
  Removed some old types
mysys/my_lockmem.c:
  Removed some old types
mysys/my_malloc.c:
  Removed some old types
  Changed malloc(), free() and related functions to use void *
  Changed all functions to use size_t
mysys/my_memmem.c:
  Indentation cleanup
mysys/my_once.c:
  Removed some old types
  Changed malloc(), free() and related functions to use void *
mysys/my_open.c:
  Removed some old types
mysys/my_pread.c:
  Removed some old types
  Changed all functions to use size_t
  Added comment for how my_pread() / my_pwrite() are supposed to work.
  Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe.
  (If we ever would really need this, it should be enabled only with a flag argument)
mysys/my_quick.c:
  Removed some old types
  Changed all functions to use size_t
mysys/my_read.c:
  Removed some old types
  Changed all functions to use size_t
mysys/my_realloc.c:
  Removed some old types
  Use void* as type for allocated memory area
  Changed all functions to use size_t
mysys/my_static.c:
  Removed some old types
mysys/my_static.h:
  Removed some old types
mysys/my_vle.c:
  Removed some old types
mysys/my_wincond.c:
  Removed some old types
mysys/my_windac.c:
  Removed some old types
mysys/my_write.c:
  Removed some old types
  Changed all functions to use size_t
mysys/ptr_cmp.c:
  Removed some old types
  Changed all functions to use size_t
mysys/queues.c:
  Removed some old types
mysys/safemalloc.c:
  Removed some old types
  Changed malloc(), free() and related functions to use void *
  Changed all functions to use size_t
mysys/string.c:
  Removed some old types
  Changed all functions to use size_t
mysys/testhash.c:
  Removed some old types
mysys/thr_alarm.c:
  Removed some old types
mysys/thr_lock.c:
  Removed some old types
mysys/tree.c:
  Removed some old types
mysys/trie.c:
  Removed some old types
mysys/typelib.c:
  Removed some old types
plugin/daemon_example/daemon_example.cc:
  Removed some old types
regex/reginit.c:
  Removed some old types
server-tools/instance-manager/buffer.cc:
  Changed some string lengths to use size_t
  Changed buffer to be of type uchar*
server-tools/instance-manager/buffer.h:
  Changed some string lengths to use size_t
  Changed buffer to be of type uchar*
server-tools/instance-manager/commands.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Changed buffer to be of type uchar*
server-tools/instance-manager/instance_map.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Changed buffer to be of type uchar*
server-tools/instance-manager/instance_options.cc:
  Changed buffer to be of type uchar*
  Replaced alloc_root + strcpy() with strdup_root()
server-tools/instance-manager/mysql_connection.cc:
  Changed buffer to be of type uchar*
server-tools/instance-manager/options.cc:
  Removed some old types
server-tools/instance-manager/parse.cc:
  Changed some string lengths to use size_t
server-tools/instance-manager/parse.h:
  Removed some old types
  Changed some string lengths to use size_t
server-tools/instance-manager/protocol.cc:
  Changed some buffers to be uchar* to avoid casts
  Changed some string lengths to use size_t
server-tools/instance-manager/protocol.h:
  Changed some string lengths to use size_t
server-tools/instance-manager/user_map.cc:
  Removed some old types
  Changed some string lengths to use size_t
sql/derror.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Changed some string lengths to use size_t
sql/discover.cc:
  Changed in readfrm() and writefrom() the type for argument 'frmdata' to uchar** to avoid casts
  Changed some string lengths to use size_t
  Changed some buffers to be uchar* to avoid casts
sql/event_data_objects.cc:
  Removed some old types
  Added missing casts for alloc() and sprintf()
sql/event_db_repository.cc:
  Changed some buffers to be uchar* to avoid casts
  Added missing casts for sprintf()
sql/event_queue.cc:
  Removed some old types
sql/field.cc:
  Removed some old types
  Changed memory buffers to be uchar*
  Changed some string lengths to use size_t
  Removed a lot of casts
  Safety fix in Field_blob::val_decimal() to not access zero pointer
sql/field.h:
  Removed some old types
  Changed memory buffers to be uchar* (except of store() as this would have caused too many other changes). 
  Changed some string lengths to use size_t
  Removed some not needed casts
  Changed val_xxx(xxx, new_ptr) to take const pointers
sql/field_conv.cc:
  Removed some old types
  Added casts required because memory area pointers are now uchar*
sql/filesort.cc:
  Initalize variable that was used unitialized in error conditions
sql/gen_lex_hash.cc:
  Removed some old types
  Changed memory buffers to be uchar*
  Changed some string lengths to use size_t
  Removed a lot of casts
  Safety fix in Field_blob::val_decimal() to not access zero pointer
sql/gstream.h:
  Added required cast
sql/ha_ndbcluster.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Changed some buffers to be uchar* to avoid casts
  Added required casts
  Removed some not needed casts
sql/ha_ndbcluster.h:
  Removed some old types
sql/ha_ndbcluster_binlog.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Replaced sql_alloc() + memcpy() + set end 0 with sql_strmake()
  Changed some string lengths to use size_t
  Added missing casts for alloc() and sprintf()
sql/ha_ndbcluster_binlog.h:
  Removed some old types
sql/ha_ndbcluster_cond.cc:
  Removed some old types
  Removed some not needed casts
sql/ha_ndbcluster_cond.h:
  Removed some old types
sql/ha_partition.cc:
  Removed some old types
  Changed prototype for change_partition() to avoid casts
sql/ha_partition.h:
  Removed some old types
sql/handler.cc:
  Removed some old types
  Changed some string lengths to use size_t
sql/handler.h:
  Removed some old types
  Changed some string lengths to use size_t
  Changed type for 'frmblob' parameter for discover() and ha_discover() to get fewer casts
sql/hash_filo.h:
  Removed some old types
  Changed all functions to use size_t
sql/hostname.cc:
  Removed some old types
sql/item.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Use strmake() instead of memdup() to create a null terminated string.
  Updated calls to new Field()
sql/item.h:
  Removed some old types
  Changed malloc(), free() and related functions to use void *
  Changed some buffers to be uchar* to avoid casts
sql/item_cmpfunc.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
sql/item_cmpfunc.h:
  Removed some old types
sql/item_create.cc:
  Removed some old types
sql/item_func.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
  Added test for failing alloc() in init_result_field()
  Remove old confusing comment
  Fixed compiler warning
sql/item_func.h:
  Removed some old types
sql/item_row.cc:
  Removed some old types
sql/item_row.h:
  Removed some old types
sql/item_strfunc.cc:
  Include zlib (needed becasue we call crc32)
  Removed some old types
sql/item_strfunc.h:
  Removed some old types
  Changed some types to match new function prototypes
sql/item_subselect.cc:
  Removed some old types
sql/item_subselect.h:
  Removed some old types
sql/item_sum.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/item_sum.h:
  Removed some old types
sql/item_timefunc.cc:
  Removed some old types
  Changed some string lengths to use size_t
sql/item_timefunc.h:
  Removed some old types
sql/item_xmlfunc.cc:
  Changed some string lengths to use size_t
sql/item_xmlfunc.h:
  Removed some old types
sql/key.cc:
  Removed some old types
  Removed some not needed casts
sql/lock.cc:
  Removed some old types
  Added some cast to my_multi_malloc() arguments for safety
sql/log.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Changed some buffers to be uchar* to avoid casts
  Changed usage of pwrite() to not assume it holds the cursor position for the file
  Made usage of my_read() safer
sql/log_event.cc:
  Removed some old types
  Added checking of return value of malloc() in pack_info()
  Changed some buffers to be uchar* to avoid casts
  Removed some 'const' to avoid casts
  Added missing casts for alloc() and sprintf()
  Added required casts
  Removed some not needed casts
  Added some cast to my_multi_malloc() arguments for safety
sql/log_event.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
sql/log_event_old.cc:
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/log_event_old.h:
  Changed some buffers to be uchar* to avoid casts
sql/mf_iocache.cc:
  Removed some old types
sql/my_decimal.cc:
  Changed memory area to use uchar*
sql/my_decimal.h:
  Changed memory area to use uchar*
sql/mysql_priv.h:
  Removed some old types
  Changed malloc(), free() and related functions to use void *
  Changed some string lengths to use size_t
  Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid long overflow
  Changed some buffers to be uchar* to avoid casts
sql/mysqld.cc:
  Removed some old types
sql/net_serv.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Changed some buffers to be uchar* to avoid casts
  Ensure that vio_read()/vio_write() return values are stored in a size_t variable
  Removed some not needed casts
sql/opt_range.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/opt_range.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
sql/opt_sum.cc:
  Removed some old types
  Removed some not needed casts
sql/parse_file.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Changed alloc_root + memcpy + set end 0 -> strmake_root()
sql/parse_file.h:
  Removed some old types
sql/partition_info.cc:
  Removed some old types
  Added missing casts for alloc()
  Changed some buffers to be uchar* to avoid casts
sql/partition_info.h:
  Changed some buffers to be uchar* to avoid casts
sql/protocol.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/protocol.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Changed some string lengths to use size_t
sql/records.cc:
  Removed some old types
sql/repl_failsafe.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Added required casts
sql/rpl_filter.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Changed some string lengths to use size_t
sql/rpl_filter.h:
  Changed some string lengths to use size_t
sql/rpl_injector.h:
  Removed some old types
sql/rpl_record.cc:
  Removed some old types
  Removed some not needed casts
  Changed some buffers to be uchar* to avoid casts
sql/rpl_record.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
sql/rpl_record_old.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/rpl_record_old.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid cast
sql/rpl_rli.cc:
  Removed some old types
sql/rpl_tblmap.cc:
  Removed some old types
sql/rpl_tblmap.h:
  Removed some old types
sql/rpl_utility.cc:
  Removed some old types
sql/rpl_utility.h:
  Removed some old types
  Changed type of m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length
sql/set_var.cc:
  Removed some old types
  Updated parameters to dirname_part()
sql/set_var.h:
  Removed some old types
sql/slave.cc:
  Removed some old types
  Changed some string lengths to use size_t
sql/slave.h:
  Removed some old types
sql/sp.cc:
  Removed some old types
  Added missing casts for printf()
sql/sp.h:
  Removed some old types
  Updated hash-get-key function arguments
sql/sp_cache.cc:
  Removed some old types
  Added missing casts for printf()
  Updated hash-get-key function arguments
sql/sp_head.cc:
  Removed some old types
  Added missing casts for alloc() and printf()
  Added required casts
  Updated hash-get-key function arguments
sql/sp_head.h:
  Removed some old types
sql/sp_pcontext.cc:
  Removed some old types
sql/sp_pcontext.h:
  Removed some old types
sql/sql_acl.cc:
  Removed some old types
  Changed some string lengths to use size_t
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
  Added required casts
sql/sql_analyse.cc:
  Changed some buffers to be uchar* to avoid casts
sql/sql_analyse.h:
  Changed some buffers to be uchar* to avoid casts
sql/sql_array.h:
  Removed some old types
sql/sql_base.cc:
  Removed some old types
  Updated hash-get-key function arguments
sql/sql_binlog.cc:
  Removed some old types
  Added missing casts for printf()
sql/sql_cache.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Removed some not needed casts
  Changed some string lengths to use size_t
sql/sql_cache.h:
  Removed some old types
  Removed reference to not existing function cache_key()
  Updated hash-get-key function arguments
sql/sql_class.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Added missing casts for alloc()
  Updated hash-get-key function arguments
  Moved THD::max_row_length() to table.cc (as it's not depending on THD)
  Removed some not needed casts
sql/sql_class.h:
  Removed some old types
  Changed malloc(), free() and related functions to use void *
  Removed some not needed casts
  Changed some string lengths to use size_t
  Moved max_row_length and max_row_length_blob() to table.cc, as they are not depending on THD
sql/sql_connect.cc:
  Removed some old types
  Added required casts
sql/sql_db.cc:
  Removed some old types
  Removed some not needed casts
  Added some cast to my_multi_malloc() arguments for safety
  Added missing casts for alloc()
sql/sql_delete.cc:
  Removed some old types
sql/sql_handler.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Added some cast to my_multi_malloc() arguments for safety
sql/sql_help.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/sql_insert.cc:
  Removed some old types
  Added missing casts for alloc() and printf()
sql/sql_lex.cc:
  Removed some old types
sql/sql_lex.h:
  Removed some old types
  Removed some not needed casts
sql/sql_list.h:
  Removed some old types
  Removed some not needed casts
sql/sql_load.cc:
  Removed some old types
  Removed compiler warning
sql/sql_manager.cc:
  Removed some old types
sql/sql_map.cc:
  Removed some old types
sql/sql_map.h:
  Removed some old types
sql/sql_olap.cc:
  Removed some old types
sql/sql_parse.cc:
  Removed some old types
  Trivial move of code lines to make things more readable
  Changed some string lengths to use size_t
  Added missing casts for alloc()
sql/sql_partition.cc:
  Removed some old types
  Removed compiler warnings about not used functions
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/sql_partition.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
sql/sql_plugin.cc:
  Removed some old types
  Added missing casts for alloc()
  Updated hash-get-key function arguments
sql/sql_prepare.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Added missing casts for alloc() and printf()
sql-common/client.c:
  Removed some old types
  Changed some memory areas to use uchar*
sql-common/my_user.c:
  Changed some string lengths to use size_t
sql-common/pack.c:
  Changed some buffers to be uchar* to avoid casts
sql/sql_repl.cc:
  Added required casts
  Changed some buffers to be uchar* to avoid casts
  Changed some string lengths to use size_t
sql/sql_select.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some old types
sql/sql_select.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
sql/sql_servers.cc:
  Removed some old types
  Updated hash-get-key function arguments
sql/sql_show.cc:
  Removed some old types
  Added missing casts for alloc()
  Removed some not needed casts
sql/sql_string.cc:
  Removed some old types
  Added required casts
sql/sql_table.cc:
  Removed some old types
  Removed compiler warning about not used variable
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
sql/sql_test.cc:
  Removed some old types
sql/sql_trigger.cc:
  Removed some old types
  Added missing casts for alloc()
sql/sql_udf.cc:
  Removed some old types
  Updated hash-get-key function arguments
sql/sql_union.cc:
  Removed some old types
sql/sql_update.cc:
  Removed some old types
  Removed some not needed casts
sql/sql_view.cc:
  Removed some old types
sql/sql_yacc.yy:
  Removed some old types
  Changed some string lengths to use size_t
  Added missing casts for alloc()
sql/stacktrace.c:
  Removed some old types
sql/stacktrace.h:
  Removed some old types
sql/structs.h:
  Removed some old types
sql/table.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Changed some buffers to be uchar* to avoid casts
  Removed setting of LEX_STRING() arguments in declaration
  Added required casts
  More function comments
  Moved max_row_length() here from sql_class.cc/sql_class.h
sql/table.h:
  Removed some old types
  Changed some string lengths to use size_t
sql/thr_malloc.cc:
  Use void* as type for allocated memory area
  Changed all functions to use size_t
sql/tzfile.h:
  Changed some buffers to be uchar* to avoid casts
sql/tztime.cc:
  Changed some buffers to be uchar* to avoid casts
  Updated hash-get-key function arguments
  Added missing casts for alloc()
  Removed some not needed casts
sql/uniques.cc:
  Removed some old types
  Removed some not needed casts
sql/unireg.cc:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
  Removed some not needed casts
  Added missing casts for alloc()
storage/archive/archive_reader.c:
  Removed some old types
storage/archive/azio.c:
  Removed some old types
  Removed some not needed casts
storage/archive/ha_archive.cc:
  Removed some old types
  Changed type for 'frmblob' in archive_discover() to match handler
  Updated hash-get-key function arguments
  Removed some not needed casts
storage/archive/ha_archive.h:
  Removed some old types
storage/blackhole/ha_blackhole.cc:
  Removed some old types
storage/blackhole/ha_blackhole.h:
  Removed some old types
storage/csv/ha_tina.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Changed some buffers to be uchar* to avoid casts
storage/csv/ha_tina.h:
  Removed some old types
  Removed some not needed casts
storage/csv/transparent_file.cc:
  Removed some old types
  Changed type of 'bytes_read' to be able to detect read errors
  Fixed indentation
storage/csv/transparent_file.h:
  Removed some old types
storage/example/ha_example.cc:
  Removed some old types
  Updated hash-get-key function arguments
storage/example/ha_example.h:
  Removed some old types
storage/federated/ha_federated.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Removed some not needed casts
storage/federated/ha_federated.h:
  Removed some old types
storage/heap/_check.c:
  Changed some buffers to be uchar* to avoid casts
storage/heap/_rectest.c:
  Removed some old types
storage/heap/ha_heap.cc:
  Removed some old types
storage/heap/ha_heap.h:
  Removed some old types
storage/heap/heapdef.h:
  Removed some old types
storage/heap/hp_block.c:
  Removed some old types
  Changed some string lengths to use size_t
storage/heap/hp_clear.c:
  Removed some old types
storage/heap/hp_close.c:
  Removed some old types
storage/heap/hp_create.c:
  Removed some old types
storage/heap/hp_delete.c:
  Removed some old types
storage/heap/hp_hash.c:
  Removed some old types
storage/heap/hp_info.c:
  Removed some old types
storage/heap/hp_open.c:
  Removed some old types
storage/heap/hp_rfirst.c:
  Removed some old types
storage/heap/hp_rkey.c:
  Removed some old types
storage/heap/hp_rlast.c:
  Removed some old types
storage/heap/hp_rnext.c:
  Removed some old types
storage/heap/hp_rprev.c:
  Removed some old types
storage/heap/hp_rrnd.c:
  Removed some old types
storage/heap/hp_rsame.c:
  Removed some old types
storage/heap/hp_scan.c:
  Removed some old types
storage/heap/hp_test1.c:
  Removed some old types
storage/heap/hp_test2.c:
  Removed some old types
storage/heap/hp_update.c:
  Removed some old types
storage/heap/hp_write.c:
  Removed some old types
  Changed some string lengths to use size_t
storage/innobase/handler/ha_innodb.cc:
  Removed some old types
  Updated hash-get-key function arguments
  Added missing casts for alloc() and printf()
  Removed some not needed casts
storage/innobase/handler/ha_innodb.h:
  Removed some old types
storage/myisam/ft_boolean_search.c:
  Removed some old types
storage/myisam/ft_nlq_search.c:
  Removed some old types
storage/myisam/ft_parser.c:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
storage/myisam/ft_static.c:
  Removed some old types
storage/myisam/ft_stopwords.c:
  Removed some old types
storage/myisam/ft_update.c:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
storage/myisam/ftdefs.h:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
storage/myisam/fulltext.h:
  Removed some old types
storage/myisam/ha_myisam.cc:
  Removed some old types
storage/myisam/ha_myisam.h:
  Removed some old types
storage/myisam/mi_cache.c:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
storage/myisam/mi_check.c:
  Removed some old types
storage/myisam/mi_checksum.c:
  Removed some old types
storage/myisam/mi_close.c:
  Removed some old types
storage/myisam/mi_create.c:
  Removed some old types
storage/myisam/mi_delete.c:
  Removed some old types
storage/myisam/mi_delete_all.c:
  Removed some old types
storage/myisam/mi_dynrec.c:
  Removed some old types
storage/myisam/mi_extra.c:
  Removed some old types
storage/myisam/mi_key.c:
  Removed some old types
storage/myisam/mi_locking.c:
  Removed some old types
storage/myisam/mi_log.c:
  Removed some old types
storage/myisam/mi_open.c:
  Removed some old types
  Removed some not needed casts
  Check argument of my_write()/my_pwrite() in functions returning int
  Added casting of string lengths to size_t
storage/myisam/mi_packrec.c:
  Removed some old types
  Changed some buffers to be uchar* to avoid casts
storage/myisam/mi_page.c:
  Removed some old types
storage/myisam/mi_preload.c:
  Removed some old types
storage/myisam/mi_range.c:
  Removed some old types
storage/myisam/mi_rfirst.c:
  Removed some old types
storage/myisam/mi_rkey.c:
  Removed some old types
storage/myisam/mi_rlast.c:
  Removed some old types
storage/myisam/mi_rnext.c:
  Removed some old types
storage/myisam/mi_rnext_same.c:
  Removed some old types
storage/myisam/mi_rprev.c:
  Removed some old types
storage/myisam/mi_rrnd.c:
  Removed some old types
storage/myisam/mi_rsame.c:
  Removed some old types
storage/myisam/mi_rsamepos.c:
  Removed some old types
storage/myisam/mi_scan.c:
  Removed some old types
storage/myisam/mi_search.c:
  Removed some old types
storage/myisam/mi_static.c:
  Removed some old types
storage/myisam/mi_statrec.c:
  Removed some old types
storage/myisam/mi_test1.c:
  Removed some old types
storage/myisam/mi_test2.c:
  Removed some old types
storage/myisam/mi_test3.c:
  Removed some old types
storage/myisam/mi_unique.c:
  Removed some old types
storage/myisam/mi_update.c:
  Removed some old types
storage/myisam/mi_write.c:
  Removed some old types
storage/myisam/myisam_ftdump.c:
  Removed some old types
storage/myisam/myisamchk.c:
  Removed some old types
storage/myisam/myisamdef.h:
  Removed some old types
storage/myisam/myisamlog.c:
  Removed some old types
  Indentation fix
storage/myisam/myisampack.c:
  Removed some old types
storage/myisam/rt_index.c:
  Removed some old types
storage/myisam/rt_split.c:
  Removed some old types
storage/myisam/sort.c:
  Removed some old types
storage/myisam/sp_defs.h:
  Removed some old types
storage/myisam/sp_key.c:
  Removed some old types
storage/myisammrg/ha_myisammrg.cc:
  Removed some old types
storage/myisammrg/ha_myisammrg.h:
  Removed some old types
storage/myisammrg/myrg_close.c:
  Removed some old types
storage/myisammrg/myrg_def.h:
  Removed some old types
storage/myisammrg/myrg_delete.c:
  Removed some old types
storage/myisammrg/myrg_open.c:
  Removed some old types
  Updated parameters to dirname_part()
storage/myisammrg/myrg_queue.c:
  Removed some old types
storage/myisammrg/myrg_rfirst.c:
  Removed some old types
storage/myisammrg/myrg_rkey.c:
  Removed some old types
storage/myisammrg/myrg_rlast.c:
  Removed some old types
storage/myisammrg/myrg_rnext.c:
  Removed some old types
storage/myisammrg/myrg_rnext_same.c:
  Removed some old types
storage/myisammrg/myrg_rprev.c:
  Removed some old types
storage/myisammrg/myrg_rrnd.c:
  Removed some old types
storage/myisammrg/myrg_rsame.c:
  Removed some old types
storage/myisammrg/myrg_update.c:
  Removed some old types
storage/myisammrg/myrg_write.c:
  Removed some old types
storage/ndb/include/util/ndb_opts.h:
  Removed some old types
storage/ndb/src/cw/cpcd/main.cpp:
  Removed some old types
storage/ndb/src/kernel/vm/Configuration.cpp:
  Removed some old types
storage/ndb/src/mgmclient/main.cpp:
  Removed some old types
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Removed some old types
  Removed old disabled code
storage/ndb/src/mgmsrv/main.cpp:
  Removed some old types
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Removed some old types
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
  Removed not used variable
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
  Added required casts
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Added required casts
storage/ndb/tools/delete_all.cpp:
  Removed some old types
storage/ndb/tools/desc.cpp:
  Removed some old types
storage/ndb/tools/drop_index.cpp:
  Removed some old types
storage/ndb/tools/drop_tab.cpp:
  Removed some old types
storage/ndb/tools/listTables.cpp:
  Removed some old types
storage/ndb/tools/ndb_config.cpp:
  Removed some old types
storage/ndb/tools/restore/consumer_restore.cpp:
  Changed some buffers to be uchar* to avoid casts with new defintion of packfrm()
storage/ndb/tools/restore/restore_main.cpp:
  Removed some old types
storage/ndb/tools/select_all.cpp:
  Removed some old types
storage/ndb/tools/select_count.cpp:
  Removed some old types
storage/ndb/tools/waiter.cpp:
  Removed some old types
strings/bchange.c:
  Changed function to use uchar * and size_t
strings/bcmp.c:
  Changed function to use uchar * and size_t
strings/bmove512.c:
  Changed function to use uchar * and size_t
strings/bmove_upp.c:
  Changed function to use uchar * and size_t
strings/ctype-big5.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-bin.c:
  Changed functions to use size_t
strings/ctype-cp932.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-czech.c:
  Fixed indentation
  Changed functions to use size_t
strings/ctype-euc_kr.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-eucjpms.c:
  Changed functions to use size_t
  Changed character length functions to return uint
  unsigned char -> uchar
strings/ctype-gb2312.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-gbk.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-latin1.c:
  Changed functions to use size_t
  Changed character length functions to return uint
  unsigned char -> uchar
strings/ctype-mb.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-simple.c:
  Changed functions to use size_t
  Simpler loops for caseup/casedown
  unsigned int -> uint
  unsigned char -> uchar
strings/ctype-sjis.c:
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-tis620.c:
  Changed functions to use size_t
  Changed character length functions to return uint
  unsigned char -> uchar
strings/ctype-uca.c:
  Changed functions to use size_t
  unsigned char -> uchar
strings/ctype-ucs2.c:
  Moved inclusion of stdarg.h to other includes
  usigned char -> uchar
  Changed functions to use size_t
  Changed character length functions to return uint
strings/ctype-ujis.c:
  Changed functions to use size_t
  Changed character length functions to return uint
  unsigned char -> uchar
strings/ctype-utf8.c:
  Changed functions to use size_t
  unsigned char -> uchar
  Indentation fixes
strings/ctype-win1250ch.c:
  Indentation fixes
  Changed functions to use size_t
strings/ctype.c:
  Changed functions to use size_t
strings/decimal.c:
  Changed type for memory argument to uchar *
strings/do_ctype.c:
  Indentation fixes
strings/my_strtoll10.c:
  unsigned char -> uchar
strings/my_vsnprintf.c:
  Changed functions to use size_t
strings/r_strinstr.c:
  Removed some old types
  Changed functions to use size_t
strings/str_test.c:
  Removed some old types
strings/strappend.c:
  Changed functions to use size_t
strings/strcont.c:
  Removed some old types
strings/strfill.c:
  Removed some old types
strings/strinstr.c:
  Changed functions to use size_t
strings/strlen.c:
  Changed functions to use size_t
strings/strmake.c:
  Changed functions to use size_t
strings/strnlen.c:
  Changed functions to use size_t
strings/strnmov.c:
  Changed functions to use size_t
strings/strto.c:
  unsigned char -> uchar
strings/strtod.c:
  Changed functions to use size_t
strings/strxnmov.c:
  Changed functions to use size_t
strings/xml.c:
  Changed functions to use size_t
  Indentation fixes
tests/mysql_client_test.c:
  Removed some old types
tests/thread_test.c:
  Removed some old types
vio/test-ssl.c:
  Removed some old types
vio/test-sslclient.c:
  Removed some old types
vio/test-sslserver.c:
  Removed some old types
vio/vio.c:
  Removed some old types
vio/vio_priv.h:
  Removed some old types
  Changed vio_read()/vio_write() to work with size_t
vio/viosocket.c:
  Changed vio_read()/vio_write() to work with size_t
  Indentation fixes
vio/viossl.c:
  Changed vio_read()/vio_write() to work with size_t
  Indentation fixes
vio/viosslfactories.c:
  Removed some old types
vio/viotest-ssl.c:
  Removed some old types
win/README:
  More explanations
2007-05-10 12:59:39 +03:00
unknown
a8bcc697ce Fixes to make it compile when using Sun CC and restoring some changes
done in previous patches.

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


sql/log_event.cc:
  Removing const qualifier since it causes linker error.
sql/log_event.h:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere.  Renaming parameters to functions since they hide
  member variable (which causes warnings on Sun CC).
sql/rpl_record.cc:
  Removing const qualifier since it causes linker error.
sql/rpl_rli.cc:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere. Removing const qualifier since it causes linker error.
sql/rpl_rli.h:
  Restoring time_t instead of my_time_t since it causes warnings
  elsewhere. Removing const qualifier since it causes linker error.
2007-04-13 19:19:10 +02:00
unknown
d54c905f44 Fixing portability issues regarding use of time_t.
sql/rpl_rli.cc:
  Changing signature for stmt_done() to use my_time_t instead of time_t.
sql/rpl_rli.h:
  Changing signature for stmt_done() to use my_time_t instead of time_t.
  Changing last_master_timestamp to use my_time_t instead of time_t.
2007-04-13 10:40:22 +02:00
unknown
6ed9fc6b7a BUG#25688 (RBR: circular replication may cause STMT_END_F flags to be
skipped):

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

Adding test case.

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

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

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


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


mysql-test/r/rpl_incident.result:
  Result change
sql/log_event.cc:
  Renaming exec_event() to do_apply_event().
sql/log_event.h:
  Renaming exec_event() to do_apply_event().
sql/rpl_rli.cc:
  Fixing comments referring to exec_event(), which does not exist any more.
sql/sql_class.h:
  Fixing comments referring to exec_event(), which does not exist any more.
2007-03-30 15:29:30 +02:00
unknown
833ea3fd68 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b23171-mysql-5.1-new-rpl


mysql-test/r/rpl_row_tabledefs_2myisam.result:
  Auto merged
mysql-test/r/rpl_row_tabledefs_3innodb.result:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/rpl_rli.h:
  Auto merged
sql/rpl_utility.cc:
  Auto merged
sql/rpl_utility.h:
  Auto merged
sql/slave.h:
  Auto merged
sql/log.cc:
  Manual merge
sql/log_event.cc:
  Manual merge
sql/log_event.h:
  Manual merge
sql/slave.cc:
  Manual merge
sql/sql_binlog.cc:
  Manual merge
2007-03-22 09:05:11 +01:00
unknown
8666675fa9 BUG#23171: Illegal group log position
Tail fixes after re-applying patches to older version of clone.


sql/log_event.cc:
  Name change of shall_skip() -> do_shall_skip()
  Introducing public shall_skip().
  Name change of skip reason enumeration constants.
  Removing extreneous argument to slave_print_msg() causing compiler warning.
sql/log_event.h:
  Adding enumeration for skip reason.
  Factoring out exec_event() into exec_relay_log_event().
  Making public interface to event execution primitives.
  Adding documentation.
  Making some (internal) functions const-correct.
sql/rpl_rli.cc:
  replicate_same_server_id is now a member variable of RLI.
sql/rpl_rli.h:
  replicate_same_server_id is now a member variable of RLI.
sql/slave.cc:
  Using RLI-specific member variable replicate_same_server_id instead of
  global instance.
  Moving comments about skipping logic to exec_relay_log_event().
  Moving event execution logic to exec_relay_log_event().
sql/sql_binlog.cc:
  Using apply_event() directly and adding comment with explenation.
2007-03-22 08:32:41 +01:00
unknown
236bb80733 BUG#26634 (Valgrind failure in tree: memory loss for memory allocated in rpl_utility.h):
Adding code to release allocated memory when tables_to_lock list is
cleared.


sql/log_event.cc:
  Using RPL_TABLE_LIST instead of TABLE_LIST for tables_to_lock.
sql/rpl_rli.cc:
  Moving st_relay_log_info::clear_tables_to_lock() into rpl_rli.cc.
  Adding code to release memory allocated for saved table definition.
sql/rpl_rli.h:
  Moving st_relay_log_info::clear_tables_to_lock() into rpl_rli.cc.
  Using RPL_TABLE_LIST instead of TABLE_LIST for tables_to_lock.
sql/rpl_utility.h:
  Adding forward declarations.
  Adding boolean to tell if tabledef is valid.
2007-02-26 17:44:55 +01:00
unknown
4b00b3f0ce BUG#23171 (Illegal slave restart position):
Third patch of the bug fix where the code for skipping events and for
executing events is factored out into three functions:
- shall_skip() to decide if the event shall be skipped and the
  reason for it;
- do_apply_event(), where the event is applied to the database; and
- do_update_pos(), which updates the actual relay log position and
  group positions.


mysql-test/r/rpl_row_tabledefs_2myisam.result:
  Result change.
mysql-test/r/rpl_row_tabledefs_3innodb.result:
  Result change.
sql/log_event.cc:
  Creating shall_skip(), do_update_pos(), and do_apply_event()
  functions for each event by factoring out the previous code.
  Adding debug code and fixing some error codes that were not correct.
sql/rpl_rli.cc:
  Renaming unsafe_to_stop_at into last_event_start_time.
  Adding debug code.
sql/rpl_rli.h:
  Renaming unsafe_to_stop_at into last_event_start_time.
sql/slave.cc:
  Renaming unsafe_to_stop_at into last_event_start_time.
2007-01-17 15:06:37 +01:00
unknown
92e68d49d7 Many files:
Changed header to GPL version 2 only


client/mysqlslap.c:
  Changed header to GPL version 2 only
include/atomic/nolock.h:
  Changed header to GPL version 2 only
include/atomic/rwlock.h:
  Changed header to GPL version 2 only
include/atomic/x86-gcc.h:
  Changed header to GPL version 2 only
include/atomic/x86-msvc.h:
  Changed header to GPL version 2 only
include/my_atomic.h:
  Changed header to GPL version 2 only
include/my_trie.h:
  Changed header to GPL version 2 only
include/my_vle.h:
  Changed header to GPL version 2 only
include/mysql/plugin.h:
  Changed header to GPL version 2 only
mysys/my_atomic.c:
  Changed header to GPL version 2 only
mysys/my_getncpus.c:
  Changed header to GPL version 2 only
mysys/my_memmem.c:
  Changed header to GPL version 2 only
mysys/my_vle.c:
  Changed header to GPL version 2 only
mysys/trie.c:
  Changed header to GPL version 2 only
plugin/Makefile.am:
  Changed header to GPL version 2 only
server-tools/instance-manager/IMService.h:
  Changed header to GPL version 2 only
server-tools/instance-manager/WindowsService.h:
  Changed header to GPL version 2 only
server-tools/instance-manager/exit_codes.h:
  Changed header to GPL version 2 only
server-tools/instance-manager/user_management_commands.h:
  Changed header to GPL version 2 only
sql/authors.h:
  Changed header to GPL version 2 only
sql/contributors.h:
  Changed header to GPL version 2 only
sql/event_data_objects.cc:
  Changed header to GPL version 2 only
sql/event_data_objects.h:
  Changed header to GPL version 2 only
sql/event_db_repository.cc:
  Changed header to GPL version 2 only
sql/event_db_repository.h:
  Changed header to GPL version 2 only
sql/event_queue.cc:
  Changed header to GPL version 2 only
sql/event_queue.h:
  Changed header to GPL version 2 only
sql/event_scheduler.cc:
  Changed header to GPL version 2 only
sql/event_scheduler.h:
  Changed header to GPL version 2 only
sql/events.cc:
  Changed header to GPL version 2 only
sql/events.h:
  Changed header to GPL version 2 only
sql/ha_ndbcluster_binlog.cc:
  Changed header to GPL version 2 only
sql/ha_ndbcluster_binlog.h:
  Changed header to GPL version 2 only
sql/ha_ndbcluster_tables.h:
  Changed header to GPL version 2 only
sql/ha_partition.cc:
  Changed header to GPL version 2 only
sql/ha_partition.h:
  Changed header to GPL version 2 only
sql/item_xmlfunc.cc:
  Changed header to GPL version 2 only
sql/item_xmlfunc.h:
  Changed header to GPL version 2 only
sql/log.h:
  Changed header to GPL version 2 only
sql/partition_element.h:
  Changed header to GPL version 2 only
sql/partition_info.cc:
  Changed header to GPL version 2 only
sql/partition_info.h:
  Changed header to GPL version 2 only
sql/rpl_filter.cc:
  Changed header to GPL version 2 only
sql/rpl_filter.h:
  Changed header to GPL version 2 only
sql/rpl_injector.cc:
  Changed header to GPL version 2 only
sql/rpl_injector.h:
  Changed header to GPL version 2 only
sql/rpl_mi.cc:
  Changed header to GPL version 2 only
sql/rpl_mi.h:
  Changed header to GPL version 2 only
sql/rpl_rli.cc:
  Changed header to GPL version 2 only
sql/rpl_rli.h:
  Changed header to GPL version 2 only
sql/rpl_tblmap.cc:
  Changed header to GPL version 2 only
sql/rpl_tblmap.h:
  Changed header to GPL version 2 only
sql/rpl_utility.cc:
  Changed header to GPL version 2 only
sql/rpl_utility.h:
  Changed header to GPL version 2 only
sql/sql_binlog.cc:
  Changed header to GPL version 2 only
sql/sql_partition.cc:
  Changed header to GPL version 2 only
sql/sql_partition.h:
  Changed header to GPL version 2 only
sql/sql_plugin.cc:
  Changed header to GPL version 2 only
sql/sql_plugin.h:
  Changed header to GPL version 2 only
sql/sql_servers.cc:
  Changed header to GPL version 2 only
sql/sql_servers.h:
  Changed header to GPL version 2 only
sql/sql_tablespace.cc:
  Changed header to GPL version 2 only
sql/sql_yacc.yy.bak:
  Changed header to GPL version 2 only
storage/Makefile.am:
  Changed header to GPL version 2 only
storage/archive/Makefile.am:
  Changed header to GPL version 2 only
storage/blackhole/Makefile.am:
  Changed header to GPL version 2 only
storage/csv/Makefile.am:
  Changed header to GPL version 2 only
storage/example/Makefile.am:
  Changed header to GPL version 2 only
storage/federated/Makefile.am:
  Changed header to GPL version 2 only
storage/innobase/handler/Makefile.am:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/AllocNodeId.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/CreateObj.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DictObjOp.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DihFragCount.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DropFilegroup.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DropObj.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/Extent.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/RestoreImpl.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/RouteOrd.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/ndbapi/NdbIndexStat.hpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/mgmapi_logevent/mgmapi_logevent.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent_dual.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_simple_dual/ndbapi_simple_dual.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_simple_index/ndbapi_simple_index.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/diskpage.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/lgman.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/lgman.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/pgman.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/pgman.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/print_file.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/record_types.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/restore.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/restore.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/tsman.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/tsman.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DLCFifoList.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DLCHashTable.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DynArr256.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DynArr256.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/KeyTable2Ref.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/LinearPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/NdbdSuperPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/Pool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/Pool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/RWPool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/RWPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/Rope.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/SLFifoList.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/WOPool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/WOPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/bench_pool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/mgmsrv/ParamInfo.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
  Changed header to GPL version 2 only
storage/ndb/test/ndbapi/testIndexStat.cpp:
  Changed header to GPL version 2 only
storage/ndb/test/tools/listen.cpp:
  Changed header to GPL version 2 only
storage/ndb/tools/restore/ndb_nodegroup_map.h:
  Changed header to GPL version 2 only
strings/my_strchr.c:
  Changed header to GPL version 2 only
unittest/mysys/base64-t.c:
  Changed header to GPL version 2 only
unittest/mysys/bitmap-t.c:
  Changed header to GPL version 2 only
unittest/mysys/my_atomic-t.c:
  Changed header to GPL version 2 only
unittest/mytap/tap.c:
  Changed header to GPL version 2 only
unittest/mytap/tap.h:
  Changed header to GPL version 2 only
win/Makefile.am:
  Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
unknown
788ad30f08 Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.


client/mysqldump.c:
  Fixed some compiler warnings
  Added some missing DBUG_RETURN
  Remove copying of 'cluster' database
client/mysqlslap.c:
  Fixed compiler warnings
client/mysqltest.c:
  After merge fix
extra/yassl/taocrypt/include/algebra.hpp:
  Removed compiler warning
mysql-test/include/im_check_env.inc:
  Fixed race condition (mysqld1 could report 'starting' or 'online'
mysql-test/mysql-test-run.pl:
  After merge fixes
  Added missing directory to LD_LIBRARY_PATH
mysql-test/r/ctype_cp1250_ch.result:
  After merge fix
mysql-test/r/im_cmd_line.result:
  Fixed race condition
mysql-test/r/im_daemon_life_cycle.result:
  Fixed race condition
mysql-test/r/im_instance_conf.result:
  Fixed race condition
mysql-test/r/im_life_cycle.result:
  Fixed race condition
mysql-test/r/im_utils.result:
  Fixed race condition
mysql-test/r/log_tables.result:
  Fixed wrong result
mysql-test/t/disabled.def:
  Disabled ndb_restore_partion, as ndb_restore_compate caused it to fail, becasue of table 'cluster/def/schema' which is stored in ndb_backup50
mysys/my_compress.c:
  Removed compiler warnings
mysys/my_getopt.c:
  Ensure we always have at least one space between option name and value
plugin/fulltext/plugin_example.c:
  Removed compiler warnings
server-tools/instance-manager/mysql_connection.cc:
  After merge fix
sql/event_data_objects.cc:
  Fixed compiler warnings
  Fixed platform compatibility issues (%lld is not portable)
sql/event_data_objects.h:
  Fixed compiler warnings
sql/event_db_repository.cc:
  Fixed compiler warnings
sql/event_queue.cc:
  Fixed compiler warnings
sql/event_scheduler.cc:
  Fixed compiler warnings
sql/events.cc:
  Fixed compiler warnings
sql/field.cc:
  Fixed compiler warnings
sql/ha_ndbcluster.cc:
  Fixed compiler warnings
sql/ha_ndbcluster_binlog.cc:
  Fixed compiler warnings
sql/ha_partition.cc:
  Fixed compiler warnings
sql/handler.cc:
  Fixed compiler warnings
sql/item_cmpfunc.cc:
  Fixed DBUG_PRINT style
sql/item_func.cc:
  Fixed compiler warnings
sql/log.cc:
  Fixed compiler warnings
sql/log_event.cc:
  Fixed compiler warnings
sql/mysqld.cc:
  Fixed compiler warnings
sql/opt_range.cc:
  Fixed compiler warnings
sql/repl_failsafe.cc:
  Indentation fixes
sql/rpl_rli.cc:
  Fixed compiler warnings
sql/rpl_tblmap.cc:
  Fixed compiler warnings
sql/set_var.cc:
  Fixed compiler warnings
sql/slave.cc:
  Fixed compiler warnings
sql/sp_head.cc:
  Fixed compiler warnings
sql/sql_base.cc:
  Fixed compiler warnings
  Fixed indentation
sql/sql_binlog.cc:
  Fixed compiler warnings
sql/sql_cache.cc:
  Fixed compiler warnings
sql/sql_class.cc:
  Fixed compiler warnings
sql/sql_handler.cc:
  Fixed compiler warnings
sql/sql_lex.cc:
  Fixed compiler warnings
sql/sql_parse.cc:
  Fixed compiler warnings
sql/sql_partition.cc:
  Fixed compiler warnings
sql/sql_prepare.cc:
  Fixed compiler warnings
sql/sql_table.cc:
  Fixed compiler warnings
sql/sql_test.cc:
  Fixed DBUG_PRINT style
sql/sql_trigger.cc:
  Fixed DBUG_PRINT style
sql/table.cc:
  Fixed compiler warnings
storage/federated/ha_federated.cc:
  Fixed compiler warnings
storage/myisam/mi_rsamepos.c:
  Fixed compiler warnings
storage/ndb/include/ndb_global.h.in:
  After merge fix
storage/ndb/include/util/NdbOut.hpp:
  Inform gcc that ndbout_c takes a printf() string as argument
storage/ndb/include/util/SimpleProperties.hpp:
  After merge fixes
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Fixed compiler warnings
  Fixed usage of uninitialized value (Got help from Jonas with patch)
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/lgman.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/pgman.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/restore.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
  Fixed compiler warnings
  Added missing enum's to switch
storage/ndb/src/kernel/vm/Configuration.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/DLHashTable.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/RWPool.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/WOPool.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
  Initialize possible uninitialized variable
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  Added missing enum's (To avoid compiler warnings)
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/ObjectMap.hpp:
  Fixed compiler warnings
storage/ndb/tools/desc.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/Restore.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/consumer_restore.cpp:
  Fixed compiler warnings
unittest/mytap/t/basic-t.c:
  Fixed compiler warnings
unittest/mytap/tap.c:
  Fixed compiler warnings
2006-11-27 01:47:38 +02:00
unknown
baaa102de5 BUG#23171 (Illegal slave restart group position):
Second patch to fix skipping code. Moving relay and binary log 
position changing code from do_apply_event [old exec_event()] into
do_update_pos() and doing other changes necessary to support that.

Fixing a bug that can cause deadlock if rotating binary log when committing
a changes to a transactional table that is not inside a transaction and
cause a rotate log.


sql/log.cc:
  Changing condition in binlog_commit() to skip calling
  binlog_end_trans() twice to match condition in binlog_end_trans().
sql/log_event.cc:
  Name change: apply_event_impl() -> do_apply_event()
  Name change: advance_coord_impl() -> do_update_pos()
  
  do_apply_event() now uses pointer to constant RELAY_LOG_INFO to prevent
  inadvertandly changing the position in the code. Doing this would make
  the skipping code loose track of where it is. All position changing code
  shall now be in do_update_pos().
  
  Factoring out relay and binary log position updating code from
  do_apply_event() [previously exec_event()] into do_update_pos().
  Using a safe approach to make it work: will refine the refactoring
  when the skipping code is implemented.
  
  Adding const casts where needed.
  
  Changing signature to use pointers to constant objects where needed.
sql/rpl_rli.cc:
  Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
  
  Debriding code.
sql/rpl_rli.h:
  Making cached_charset_compare() const to work with constant instances of RELAY_LOG_INFO.
  
  Debriding code.
sql/rpl_utility.cc:
  Using pointer to const RELAY_LOG_INFO to make it work with other code.
sql/rpl_utility.h:
  Using pointer to const RELAY_LOG_INFO to make it work with other code.
sql/slave.cc:
  Using pointer to const RELAY_LOG_INFO to make it work with other code.
  
  Adding const cast where necessary.
sql/slave.h:
  Using pointer to const RELAY_LOG_INFO to make it work with other code.
2006-11-10 15:10:41 +01:00
unknown
4c3283b3b3 Post-merge fixes.
sql/log_event.cc:
  Fixing comment
sql/rpl_rli.cc:
  Removing code that was moved to other file.
2006-11-03 21:55:51 +01:00
unknown
69d92fb189 Refactoring: Moved rli code to new file rpl_rli.cc. The idea being that rli
should be a separate module (i.e. a class) to make it easier to maintain the 
code, e.g. by having checks within the rli checking sanity of data and making 
member variables private.  This will also ease implementation of multi-source 
and, at least in my fantasies :), make it possible in some future to have 
separate replication servers.


sql/Makefile.am:
  Added file rpl_rli.cc
sql/repl_failsafe.cc:
  Move function
sql/rpl_rli.h:
  moved functions
sql/slave.cc:
  Moved rli code into rpl_rli.cc
sql/sql_repl.cc:
  Changed function to be member function
sql/rpl_rli.cc:
  Code for rli
2006-10-31 12:23:14 +01:00