Commit graph

113 commits

Author SHA1 Message Date
serg@serg.mylan
fd828e5b4d manually merged 2005-02-14 21:50:09 +01:00
mats@mysql.com
6611d3d2f8 Merge mysql.com:/home/bkroot/mysql-5.0
into mysql.com:/home/bk/b7853-mysql-5.0
2005-02-10 19:15:53 +01:00
serg@serg.mylan
db13afd89d auto-ROLLBACK if binlog was not closed properly
auto-commit on Xid_log_event
2005-02-09 20:04:28 +01:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
mats@mysql.com
f6caefef2d Bug#7853 (mysqlbinlog does not accept input from stdin)
The utility 'mysqlbinlog' now accepts input from stdin. It can 
  now be used to read the output from, e.g., 'zcat' or other utility.
2005-02-04 14:29:54 +01:00
guilhem@mysql.com
ed1696f6b9 WL#1062 "log charset info into all Query_log_event":
we store 7 bytes (1 + 2*3) in every Query_log_event.
In the future if users want binlog optimized for small size and less safe,
we could add --binlog-no-charset (and binlog-no-sql-mode etc): charset info
is something by design optional (even if for now we don't offer possibility to disable it):
it's not a binlog format change.
We try to reduce the number of get_charset() calls in the slave SQL thread to a minimum
by caching the charset read from the previous event (which will often be equal to the one of the current event).
We don't use SET ONE_SHOT for charset-aware repl (we still do for timezones, will be fixed later).
No more errors if one changes the global value of charset vars on master or slave
(as we log charset info in all Query_log_event).
Not fixing Load_log_event as it will be rewritten soon by Dmitri.
Testing how mysqlbinlog behaves in rpl_charset.test.
mysqlbinlog needs to know where charset file is (to be able to convert a charset number found
in binlog (e.g. in User_var_log_event) to a charset name); mysql-test-run needs to pass
the correct value for this option to mysqlbinlog.
Many result udpates (adding charset info into every event shifts log_pos in SHOW BINLOG EVENTS).
Roughly the same job is to be done for timezones :)
2005-02-03 16:22:16 +01:00
serg@serg.mylan
76f3d6f002 merged 2005-01-25 21:11:04 +01:00
monty@mysql.com
37168015cd Cleanups during review 2005-01-25 21:27:51 +02:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
guilhem@mysql.com
1cbc904c59 Changing the default of libmysqlclient : it's now NO reconnection.
All our programs which use mysql_real_connect() and mysql_connect() are updated accordingly, though I have deliberately
made mysqlimport not reconnect anymore (already true for mysqldump >= 4.1.8).
All Connector devs have been warned about the change I'm doing here - which was agreed with Monty,
and fixes BUG#2555.
2004-12-09 14:44:10 +01:00
serg@serg.mylan
2d3dd65cc1 merged 2004-11-20 18:36:41 +01:00
petr@mysql.com
edc868e397 Added --disable-log-bin option to the mysqlbinlog (WL1787) 2004-11-19 18:35:36 +03:00
brian@avenger.(none)
3e4ca194f8 Mainly resolving Guilhem's 4.1 patch to 5.0 2004-11-11 19:01:46 -08:00
lars@mysql.com
0d5290fc5c BUG#6239 V2: Since uint can be shorter than ulong on 64 bit platforms,
the comparision of "packet_len" (uint) and "len" (uint) with 
"packet_error"  (ulong) was always false.
2004-11-04 15:59:19 +01:00
monty@mysql.com
054cea4ca8 Merge with 4.0 2004-09-01 04:12:09 +03:00
ram@gw.mysql.r18.ru
b93a973b12 Added global my_getopt_error_reporter function pointer which is
used in the handle_options() function (instead of using additional 
handle_option() parameter). The default value of the 
my_getopt_error_reporter is default_reporter(). One can set it to
other functions if case of need.
2004-08-31 21:27:58 +05:00
serg@serg.mylan
b4bb38e896 merged 2004-08-26 15:19:46 +02:00
vva@eagle.mysql.r18.ru
ffacc77f22 more accurate processing of find_type result
(Bug #4998 --protocol doesn't reject bad values)
2004-08-24 20:13:31 +05:00
vva@eagle.mysql.r18.ru
237615bc53 fixed a Bug #4998 "--protocol doesn't reject bad values" 2004-08-23 20:55:09 +05:00
rburnett@build.mysql.com
67003d1c98 mysql_priv.h:
Added declarations for print_msg_to_log and vprint_msg_to_log.  sql_print_error are simple functions that wrap calls to print_msg_to_log.  Define the different error types with MY_ERROR_TYPE, MY_WARNING_TYPE, and MY_INFORMATION_TYPE
gen_lex_hash.cc:
  Added NULL error reporting parameter to handle_options
log.cc:
  Add print_msg_to_log, print_buffer_to_log, and vprint_msg_to_log.  Print_msg_to_log will write the message to the windows event log if on NT.  We now have error, warning, and information versions of sql_print_xxxx.  T his is a variation of a similar changeset WAX did.
mysqld.cc:
  Added option_error_reporter callback function and pass that into handle_options
mysql.cc:
  Added NULL as error reporter arg to the end of handle_options
Many files:
  Added NULL error reporter parameter as the last paramter to handle_options
my_getopt.c:
  Added second function pointer to server as an error reporting callback.  Added local function report_option_error that will either write the error to stderr or to the error reporting callback.  changed all calls in handle_options from fprintf(stderr, ... ) to report_option_error
my_getopt.h:
  Changed declaration of handle_options to use typedefs for the two function pointers.  added second function pointer to server as an error reporting callback
mysqld.dsp:
  Added custom build step for compiling message file and added message resource file (output of mc)
2004-08-14 03:38:37 +02:00
guilhem@mysql.com
0f3e279a05 WL#1580: --start-datetime, --stop-datetime, --start-position (alias for --position) and --stop-position
options for mysqlbinlog, with a test file.
This enables user to say "recover my database to how it was this morning at 10:30"
(mysqlbinlog "--stop-datetime=2003-07-29 10:30:00").
Using time functions into client/ made me move them out of sql/ into sql-common/.
+ (small) fix for BUG#4507 "mysqlbinlog --read-from-remote-server sometimes
cannot accept 2 binlogs" (that is, on command line).
2004-07-29 23:25:58 +02:00
guilhem@mysql.com
88e00cd919 Fixes for
BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines",
BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" with a test file.
It was not possible to add a test for BUG#4506 as in the test suite we must use --short-form
which does not display the "# at" lines.
2004-07-17 16:58:16 +02:00
konstantin@mysql.com
f08bbd1f12 assert.h needed for my_dbug.h now is included in my_dbug.h, where it for
some reason wasn't included before.
A lot of files cleaned up from #include <assert.h>
2004-06-10 23:58:39 +04:00
monty@mysql.com
390d9898f9 merge with 4.0 to get Netware patches and fixes for libmysqld.dll 2004-05-25 22:54:00 +03:00
monty@mysql.com
f2e1e3ce4c Added patches from Novell 2004-05-25 22:00:14 +03:00
dlenev@brandersnatch.localdomain
b5b4c88455 Fix of small syntax error - added missing backslash that prevented building of mysqlbinlog. 2004-05-24 14:38:55 +04:00
guilhem@mysql.com
ce1e1f4cb6 mysqlbinlog: new option --to-last-log. This option has effect only if --read-from-remote-server.
It causes mysqlbinlog to not stop after the end of the requested binlog, and instead read
until the end of the last binlog of mysqld (beware of endless loops if you pipe this
into the same mysqld).
I.e. it enables back (at customer's request) what we considered (and I still do)
as BUG#3204, but now with an option instead of being the default behaviour.
The default behaviour is still to stop after the end of the requested binlog,
whether --read-from-remote-server or not.
2004-05-23 17:42:12 +02:00
guilhem@mysql.com
34aefdf31e Fix for BUG#3214 "mysqlbinlog --read-from-remote-server --position prints wrong positions"
I am fixing it here in 4.1, not in 4.0, as it goes with another change
which I did in 4.1 (fix for BUG#3204
""mysqlbinlog --read-from-remote-server this_binlog.001" prints all binlogs").
2004-03-18 20:53:33 +02:00
guilhem@mysql.com
32feac3093 Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
2004-03-18 19:31:06 +02:00
guilhem@mysql.com
244304fdbb Fix for BUG#3204 ""mysqlbinlog --read-from-remote-server this_binlog.001" prints all binlogs":
we now detect that the server is sending us a log which we did not request
by testing the info in the fake Rotate event.
I also changed code to not print the fake Rotate which describes the
log we asked for (it's always the first received event but old masters
may not send it).
2004-03-18 19:29:07 +02:00
monty@mysql.com
350b433569 merge with 4.0 2004-03-16 22:41:30 +02:00
guilhem@mysql.com
cf94cd506f Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-03-12 22:03:27 +01:00
guilhem@mysql.com
c421527dee Force mysqlbinlog to require an argument if --local-load is used
(--local-load alone means "I want files to be prepared for LOAD 
DATA INFILE, in the default temp directory", and mysqlbinlog already
does this without --local-load).
2004-03-12 22:01:29 +01:00
jani@ua72d24.elisa.omakaista.fi
2bf78563f7 Fixed error in version. 2004-03-11 20:12:16 +02:00
jani@ua72d24.elisa.omakaista.fi
3b5a46939f Small fixes. 2004-03-11 15:41:07 +02:00
jani@ua72d24.elisa.omakaista.fi
58a978b900 Fixed Bug#2491, INSERT DELAYED causes binary log unusable by mysqlbinlog (replication is ok)
Setting insert delayed threads = 0 at mysql_init_command.
2004-03-04 17:58:36 +00:00
Sinisa@sinisa.nasamreza.org
74dc9f16bb A fix for double free of memory in mysqlbinlog. 2004-02-23 14:02:32 +02:00
monty@mashka.mysql.fi
e347f63192 Max open files handling moved to my_set_max_open_files()
This ensures that my_file_info takes this the max number of files into account and one can now use --open-files-limit on windows to increase number of used files up to 2048
2004-02-19 19:33:09 +02:00
monty@mysql.com
d1d48a9dd5 Merge with 4.0 to get fix for mysqlbinlog 2004-02-16 10:15:52 +02:00
monty@mysql.com
f43093ec0e After merge fixes
Added more DBUG statements
Ensure that we are comparing end space with BINARY strings
Use 'any_db' instead of '' to mean any database. (For HANDLER command)
Only strip ' ' when comparing CHAR, not other space-like characters (like \t)
2004-02-16 10:03:25 +02:00
monty@mysql.com
fb8f27f017 Always use libtool with "--preserve-dup-deps"
Always use all LOAD DATA options in replication.
Fixed problem in mysqlbinlog where LOAD DATA options could be overwritten.
2004-02-13 16:05:09 +02:00
monty@mysql.com
ce14578909 Merge with 4.0.18 2004-02-11 00:06:46 +01:00
monty@mysql.com
079edf3313 Code cleanups 2004-02-10 12:03:08 +01:00
vva@eagle.mysql.r18.ru
0333f7b10f fixed bug #1378 "mysqlbinlog for remote host is broken" 2004-02-06 20:57:11 +04:00
monty@mysql.com
f266cdabab Portability fixes (for binary build)
Added --protocol to mysqlbinlog
2003-12-01 13:13:16 +02:00
monty@narttu.mysql.fi
4e4725377d Merge with 4.0 2003-11-04 09:40:36 +02:00
guilhem@mysql.com
c93f69e9dd Fix for Bug #1595 "mysqlbinlog can't read a password from the console".
** I already fixed it in 3.23; I fix it in 4.0 separately because the
code is a bit different (so the changeset 1.1422 of 3.23 should not be
merged here) **
Make mysqlbinlog prompt for the password if
mysqlbinlog -p
instead of printing the usage().
This makes mysqlbinlog behave like other clients.
This new code was almost copied from mysqldump.
Note that before, one could use
  mysqlbinlog -p pass
and now one must use
  mysqlbinlog -ppass
(putting a space will ask for the password).
2003-10-21 12:22:24 +02:00
monty@narttu.mysql.fi
246febee42 merge with 4.0 to get fix for mysqlbinlog 2003-10-08 12:05:27 +03:00
monty@narttu.mysql.fi
d00d9110ba Fixed test case that my last patch to mysqlbinlog broke.
Changed --remote to --read-from-remote-server (mysqlbinlog)
2003-10-08 10:23:54 +03:00