summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
Commit message (Collapse)AuthorAgeFilesLines
* BUG#12354268: MYSQLBINLOG --BASE64-OUTPUT=DECODE-ROWS DOES NOTLuis Soares2011-05-051-1/+2
| | | | | | | | | | | | | | WORK WITH --START-POSITION If setting --start-position to start after the FD event, mysqlbinlog will output an error stating that it has not found an FD event. However, its not that mysqlbinlog does not find it but rather that it does not processes it in the regular way (i.e., it does not print it). Given that one is using --base64-output=DECODE-ROWS then not printing it is actually fine. To fix this, we make mysqlbinlog not to complain when it has not printed the FD event, is outputing in base64, but is decoding the rows.
* BUG#11766427, BUG#59539: Filter by server id in mysqlbinlog failsSven Sandberg2011-03-251-3/+11
| | | | | | | | | | | Problem: mysqlbinlog --server-id may filter out Format_description_log_events. If mysqlbinlog does not process the Format_description_log_event, then mysqlbinlog cannot read the rest of the binary log correctly. This can have the effect that mysqlbinlog crashes, generates an error, or generates output that causes mysqld to crash, generate an error, or corrupt data. Fix: Never filter out Format_description_log_events. Also, never filter out Rotate_log_events.
* Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-091-1/+1
| | | | | | | | Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
* Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-101-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced.
* Bug #50407 mysqlbinlog --database=X produces bad output for SAVEPOINTs2010-03-281-3/+1
| | | | | | | | | | | | | | | | | When mysqlbinlog was given the --database=X flag, it always printed 'ROLLBACK TO', but the corresponding 'SAVEPOINT' statement was not printed. The replicated filter(replicated-do/ignore-db) and binlog filter (binlog-do/ignore-db) has the same problem. They are solved in this patch together. After this patch, We always check whether the query is 'SAVEPOINT' statement or not. Because this is a literal check, 'SAVEPOINT' and 'ROLLBACK TO' statements are also binlogged in uppercase with no any comments. The binlog before this patch can be handled correctly except one case that any comments are in front of the keywords. for example: /* bla bla */ SAVEPOINT a; /* bla bla */ ROLLBACK TO a;
* BUG#48993: valgrind errors in mysqlbinlogLuis Soares2010-02-171-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found three issues during the analysis: 1. Memory leak caused by temp_buf not being freed; 2. Memory leak caused when handling argv; 3. Conditional jump that depended on unitialized values. Issue #1 -------- DESCRIPTION: when mysqlbinlog is reading from a remote location the event temp_buf references the incoming stream (in NET object), which is not freed by mysqlbinlog explicitly. On the other hand, when it is reading local binary log, it points to a temporary buffer that needs to be explicitly freed. For both cases, the temp_buf was not freed by mysqlbinlog, instead was set to 0. This clearly disregards the free required in the second case, thence creating a memory leak. FIX: we make temp_buf to be conditionally freed depending on the value of remote_opt. Found out that similar fix is already in most recent codebases. Issue #2 -------- DESCRIPTION: load_defaults is called by parse_args, and it reads default options from configuration files and put them BEFORE the arguments that are already in argc and argv. This is done resorting to MEM_ROOT. However, parse_args calls handle_options immediately after which changes argv. Later when freeing the defaults, pointers to MEM_ROOT won't match, causing the memory not to be freed: void free_defaults(char **argv) { MEM_ROOT ptr memcpy_fixed((char*) &ptr,(char *) argv - sizeof(ptr), sizeof(ptr)); free_root(&ptr,MYF(0)); } FIX: we remove load_defaults from parse_args and call it before. Then we save argv with defaults in defaults_argv BEFORE calling parse_args (which inside can then call handle_options at will). Actually, found out that this is in fact kind of a backport for BUG#38468 into 5.1, so I merged in the test case as well and added error check for load_defaults call. Fix based on: revid:zhenxing.he@sun.com-20091002081840-uv26f0flw4uvo33y Issue #3 -------- DESCRIPTION: the structure st_print_event_info constructor would not initialize the sql_mode member, although it did for sql_mode_inited (set to false). This would later raise the warning in valgrind when printing the sql_mode in the event header, as this print out is protected by a check against sql_mode_inited and sql_mode variables. Given that sql_mode was not initialized valgrind would output the warning. FIX: we add initialization of sql_mode to the st_print_event_info constructor.
* Recommit of Bug#49447.Staale Smedseng2010-02-041-9/+9
|
* WL#5154 Remove deprecated 4.1 featuresMagne Mahre2010-01-211-2/+6
| | | | | | | | | | | Several items said to be deprecated in the 4.1 manual have never been removed. This worklog adds deprecation warnings when these items are used, and warns the user that the items will be removed in MySQL 5.6. A couple of previously deprecation decision have been reversed (see single file comments)
* mergeVladislav Vaintroub2009-11-031-7/+7
|\
| * Bug #34777 mysqlbinlog: --help output for --base64-output is hard to ↵2009-10-281-5/+7
| | | | | | | | | | understand Append the description of the 'decode-rows' value for --base64-output argument.
| * Bug #34777 mysqlbinlog: --help output for --base64-output is hard to ↵2009-10-201-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | understand There are some problems about help text: - It is stated that "auto" is the default twice. It need be stated only once. - It is stated that --base64-output is short for --base64-output=always. But that sounds like the default is "always", not "auto". Make the help text clear as following: Determine when the output statements should be base64-encoded BINLOG statements: 'never' disables it and works only for binlogs without row-based events; 'auto' prints base64 only when necessary (i.e., for row-based events and format description events); 'always' prints base64 whenever possible. 'always' is for debugging only and should not be used in a production system. If this argument is not given, the default is 'auto'; if it is given with no argument, 'always' is used.
* | Bug #47423 mtr connects to wrong databaseVladislav Vaintroub2009-11-031-0/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | The reason for the bug is that mysqtest as well as other client tools running in test suite (mysqlbinlog, mysqldump) will first try to connect whatever database has created shared memory with default base name "MySQL" and use this. (Same effect could be seen on Unix if mtr would not care to calculate "port" and "socket" parameter). The fix ensures that all client tools and running in mtr use unique per-database shared memory base parameters, so there is no possibility to clash with already installed one. We use socket name for shared memory base (it's known to be unique). This shared-memory-base is written to the MTR config file to the [client] and [mysqld] sections. Fix made also made sure all client tools understand and correctly handle --shared-memory-base. Prior to this patch it was not the case for mysqltest, mysqlbinlog and mysql_client_test. All new connections done from mtr scripts via connect() will by default set shared-memory-base. And finally, there is a possibility to force shared memory or pipe connection and overwrite shared memory/pipe base name from within mtr scripts via optional PIPE or SHM modifier. This functionality was manually backported from 6.0 (original patch http://lists.mysql.com/commits/74749)
* Bug #46998 mysqlbinlog can't output BEGIN even if the database is included ↵2009-09-301-1/+4
|\ | | | | | | | | | | | | | | | | | | | | in a transaction The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the database is not selected by --database option of mysqlbinlog command. This can result in problem if there are some statements in the transaction are not filtered out. To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' in regardless of the database filtering rules.
| * Bug #46998 mysqlbinlog can't output BEGIN even if the database is included ↵2009-09-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | in a transaction The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the database is not selected by --database option of mysqlbinlog command. This can result in problem if there are some statements in the transaction are not filtered out. To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' in regardless of the database filtering rules.
* | Merge bug fixesJim Winstead2009-07-131-3/+4
|\ \
| * | Add usage for --base64-output=DECODE-ROWS and note that UNSPEC isJim Winstead2009-05-151-0/+3
| | | | | | | | | | | | intentionally unmentioned (it is just a placeholder). (Bug #41403)
| * | Remove out-of-date and unnecessary comment in source code about what versionsJim Winstead2009-05-151-3/+1
| | | | | | | | | | | | are supported. (Bug #42021)
* | | merge: 5.1-bt bug branch --> 5.1-bt latestLuis Soares2009-06-301-1/+55
|\ \ \
| * | | BUG#42941: --database paramater to mysqlbinlog fails with RBRLuis Soares2009-06-071-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqlbinlog --database parameter was being ignored when processing row events. As such no event filtering would take place. This patch addresses this by deploying a call to shall_skip_database when table_map_events are handled (as these contain also the name of the database). All other rows events referencing the table id for the filtered map event, will also be skipped.
* | | | Merge from 5.0Staale Smedseng2009-06-291-2/+2
|\ \ \ \ | | |_|/ | |/| |
| * | | Merge from 5.0-btStaale Smedseng2009-06-291-2/+2
| | | |
* | | | Merge in approved bug-fixesJim Winstead2009-05-121-0/+2
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/|
| * | Various command-line utilities, including mysqlbinlog and mysqldump, don'tJim Winstead2009-05-071-0/+2
| | | | | | | | | | | | handle the --skip-password option correctly. (Bug #28479)
* | | Manual merge.Alexey Kopytov2009-05-081-2/+1
|\ \ \ | |/ / |/| / | |/
| * Bug #41943: mysqlbinlog.exe crashes if --hexdump option is used Alexey Kopytov2009-05-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --hexdump option crashed mysqlbinlog when used together with the --read-from-remote-server option due to use of uninitialized memory. Since Log_event::print_header() relies on temp_buf to be initialized when the --hexdump option is present, dump_remote_log_entries() was fixed to setup temp_buf to point to the start of a binlog event as done in dump_local_log_entries(). The root cause of this bug is identical to the one for bug #17654. The latter was fixed in 5.1 and up, so this patch is backport of the patches for bug #17654 to 5.0. Only 5.0 needs a changelog entry.
* | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-131-9/+9
|\ \ | |/ | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-101-8/+8
| | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
* | Additional fix for bug#31455 (rpl decoder)Alexander Barkov2008-08-211-1/+2
| | | | | | | | | | | | | | | | | | - Implementing --base64-format=decode-rows, to display SQL-alike decoded row events without their BINLOG statements. - Adding --base64-format=decode-rows into tests when calling mysqlbinlog to avoid non-deterministic results - Removing resetting of last_table_id in "RESET MASTER", which appeared to be dangerous.
* | Bug#31455 mysqlbinlog don't print user readable info about RBR events Alexander Barkov2008-08-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementing -v command line parameter to mysqlbinlog to decode and print row events. mysql-test/include/mysqlbinlog_row_engine.inc mysql-test/r/mysqlbinlog_row.result mysql-test/r/mysqlbinlog_row_big.result mysql-test/r/mysqlbinlog_row_innodb.result mysql-test/r/mysqlbinlog_row_myisam.result mysql-test/r/mysqlbinlog_row_trans.result mysql-test/t/mysqlbinlog_row.test mysql-test/t/mysqlbinlog_row_big.test mysql-test/t/mysqlbinlog_row_innodb.test mysql-test/t/mysqlbinlog_row_myisam.test mysql-test/t/mysqlbinlog_row_trans.test Adding tests client/Makefile.am Adding new files to symlink client/mysqlbinlog.cc Adding -v option sql/log_event.cc Impelentations of the new methods sql/log_event.h Declaration of the new methods and member sql/mysql_priv.h Adding new function prototype sql/rpl_tblmap.cc Adding pre-processor conditions sql/rpl_tblmap.h Adding pre-processor conditions sql/rpl_utility.h Adding pre-processor conditions sql/sql_base.cc Adding reset_table_id_sequence() function. sql/sql_repl.cc Resetting table_id on "RESET MASTER" .bzrignore Ignoring new symlinked files
* | Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my50-bug26294cmiller@zippy.cornsilk.net2008-04-031-1/+1
|\ \ | |/ | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my51-bug26294
| * Bug#26294: library name conflict between MySQL 4.x, 5.0 and Qt 3.3cmiller@zippy.cornsilk.net2008-04-031-1/+1
| | | | | | | | | | | | | | | | When linking with some external programs, "multiple definition of `init_time'" Rename init_time() to my_init_time() to avoid collision with other libraries (particularly libmng).
* | BUG#33247: mysqlbinlog does not clean up after itself on abnormal terminationsven@riska.(none)2008-02-081-394/+646
| | | | | | | | | | | | | | Problem: mysqlbinlog does not free memory if an error happens. Fix: binlog-processing functions do not call exit() anymore. Instead, they print an error and return an error code. Error codes are propagated all the way back to main, and all allocated memory is freed on the way.
* | Merge riska.(none):/home/sven/bk/b34355-backslash_in_path_name_under_win/5.0-rplsven@riska.(none)2008-02-061-7/+31
|\ \ | |/ | | | | into riska.(none):/home/sven/bk/b34355-backslash_in_path_name_under_win/5.1-new-rpl
| * Replace windows path separator backslash by unix path separator forwardsven@riska.(none)2008-02-061-7/+31
| | | | | | | | slash in filenames also for Create_file_log_event.
* | Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-mergemkindahl@dl145h.mysql.com2008-02-011-0/+7
|\ \ | |/ | | | | into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
| * BUG#32205 : Replaying statements from mysqlbinlog fails with a syntax error, ↵cbell/Chuck@mysql_cab_desk.2008-02-011-0/+7
| | | | | | | | | | | | | | | | replicates fine This patch adds code to convert the path for LOAD DATA INFILE events to a Unix path which is needed for running mysql client on Windows.
* | Post-merge changes.mkindahl@dl145h.mysql.com2008-01-301-2/+2
| |
* | BUG#32407: Impossible to do point-in-time recovery from older binlogsven@riska.(none)2007-12-141-22/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: it is unsafe to read base64-printed events without first reading the Format_description_log_event (FD). Currently, mysqlbinlog cannot print the FD. As a side effect, another bug has also been fixed: When mysqlbinlog --start-position=X was specified, no ROLLBACK was printed. I changed this, so that ROLLBACK is always printed. This patch does several things: - Format_description_log_event (FD) now print themselves in base64 format. - mysqlbinlog is now able to print FD events. It has three modes: --base64-output=auto Print row events in base64 output, and print FD event. The FD event is printed even if it is outside the range specified with --start-position, because it would not be safe to read row events otherwise. This is the default. --base64-output=always Like --base64-output=auto, but also print base64 output for query events. This is like the old --base64-output flag, which is also a shorthand for --base64-output=always --base64-output=never Never print base64 output, generate error if row events occur in binlog. This is useful to suppress the FD event in binlogs known not to contain row events (e.g., because BINLOG statement is unsafe, requires root privileges, is not SQL, etc) - the BINLOG statement now handles FD events correctly, by setting the thread's rli's relay log's description_event_for_exec to the loaded event. In fact, executing a BINLOG statement is almost the same as reading an event from a relay log. Before my patch, the code for this was separated (exec_relay_log_event in slave.cc executes events from the relay log, mysql_client_binlog_statement in sql_binlog.cc executes BINLOG statements). I needed to augment mysql_client_binlog_statement to do parts of what exec_relay_log_event does. Hence, I did a small refactoring and moved parts of exec_relay_log_event to a new function, which I named apply_event_and_update_pos. apply_event_and_update_pos is called both from exec_relay_log_event and from mysql_client_binlog_statement. - When a non-FD event is executed in a BINLOG statement, without previously executing a FD event in a BINLOG statement, it generates an error, because that's unsafe. I took a new error code for that: ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENTS. In order to get a decent error message containing the name of the event, I added the class method char* Log_event::get_type_str(Log_event_type type), which returns a string name for the given Log_event_type. This is just like the existing char* Log_event::get_type_str(), except it is a class method that takes the log event type as parameter. I also added PRE_GA_*_ROWS_LOG_EVENT to Log_event::get_type_str(), so that names of old rows event are properly printed. - When reading an event, I added a check that the event type is known by the current Format_description_log_event. Without this, it may crash on bad input (and I was struck by this several times). - I patched the following test cases, which all contain BINLOG statements for row events which must be preceded by BINLOG statements for FD events: - rpl_bug31076 While I was here, I fixed some small things in log_event.cc: - replaced hard-coded 4 by EVENT_TYPE_OFFSET in 3 places - replaced return by DBUG_VOID_RETURN in one place - The name of the logfile can be '-' to indicate stdin. Before my patch, the code just checked if the first character is '-'; now it does a full strcmp(). Probably, all arguments that begin with a - are already handled somewhere else as flags, but I still think it is better that the code reflects what it is supposed to do, with as little dependencies as possible on other parts of the code. If we one day implement that all command line arguments after -- are files (as most unix tools do), then we need this. I also fixed the following in slave.cc: - next_event() was declared twice, and queue_event was not static but should be static (not used outside the file).
* | Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-mainttnurnberg@sin.intern.azundris.com2007-09-151-3/+8
|\ \ | | | | | | | | | into mysql.com:/home/tnurnberg/15327/51-15327
| * | Bug #15327: configure: --with-tcp-port option being partially ignoredtnurnberg@mysql.com/sin.intern.azundris.com2007-09-151-1/+0
| | | | | | | | | | | | after merge fix :-/
| * | Merge mysql.com:/home/tnurnberg/15327/50-15327tnurnberg@sin.intern.azundris.com2007-09-151-2/+8
| |\ \ | | |/ | | | | | | into mysql.com:/home/tnurnberg/15327/51-15327
| | * Bug #15327: configure: --with-tcp-port option being partially ignoredtnurnberg@mysql.com/sin.intern.azundris.com2007-09-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make sure that if builder configured with a non-standard (!= 3306) default TCP port that value actually gets used throughout. if they didn't configure a value, assume "use a sensible default", which will be read from /etc/services or, failing that, from the factory default. That makes the order of preference - command-line option - my.cnf, where applicable - $MYSQL_TCP_PORT environment variable - /etc/services (unless configured --with-tcp-port) - default port (--with-tcp-port=... or factory default)
* | | Fixed problem that Start_log_event_v3::created was not set properlymonty@mysql.com/narttu.mysql.fi2007-08-141-2/+2
| | | | | | | | | | | | (This is becasue 'when' is not anymore set in constructor)
* | | Merge bk-internal:/home/bk/mysql-5.1-marveldf@pippilotta.erinye.com2007-08-031-8/+39
|\ \ \ | | | | | | | | | | | | into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-marvel-engines
| * | | Simplify logging code a bit (to make code smaller and faster)monty@mysql.com/nosik.monty.fi2007-08-031-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved duplicated code to inline function store_timestamp() Save thd->time_zone_used when logging to table as CSV internally cases it to be changed Added MYSQL_LOCK_IGNORE_FLUSH to log tables to avoid deadlock in case of flush tables. Mark log tables with TIMESTAMP_NO_AUTO_SET to avoid automatic timestamping Set TABLE->no_replicate on open
| * | | Fixes Bug#30127: --debug-info no longer prints memory usage in mysqlmonty@mysql.com/nosik.monty.fi2007-08-011-7/+16
| |/ / | | | | | | | | | | | | | | | | | | Fixed compiler warnings, errors and link errors Fixed new bug on Solaris with gethrtime() Added --debug-check option to all mysql clients to print errors and memory leaks Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
* | | Makefile.am:kent@mysql.com/kent-amd64.(none)2007-08-021-8/+0
|/ / | | | | | | | | | | | | | | | | Add CMakeLists.txt to source distribution CMakeLists.txt: Added missing '${MYSQLD_EXE_SUFFIX}' to "mysqld" targets new in 5.1 Manual merge from 5.0 (bug#30118) CMakeLists.txt, mysqlbinlog.cc, lib_sql.cc: No need to test on USING_CMAKE, it is the only Windows build
* | Merge bk-internal.mysql.com:/home/bk/mysql-5.1kostja@bodhi.(none)2007-06-011-43/+43
|\ \ | | | | | | | | | into bodhi.(none):/opt/local/work/mysql-5.1-runtime
| * | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-101-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* | | bug#17654 --read-from-remote-server causes coreaelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi2007-05-301-0/+1
| | | | | | | | | | | | fixing FD event issue that showed up on pb.