Commit graph

174 commits

Author SHA1 Message Date
lars@mysql.com
d81d57d408 mysqlbinlog --hexdump augments each log entry with byte information 2005-09-29 10:42:23 +02:00
lars@mysql.com
ed7eac5973 Added clarification comment regarding added ROLLBACK to mysqlbinlog output 2005-09-21 14:27:41 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
7b7188cea6 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
2005-08-26 15:56:52 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
e767eb330e Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
2005-08-25 12:08:26 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
fe977b0cd0 Several fixes for Netware. 2005-08-24 22:03:34 +03:00
monty@mishka.local
7f845036c0 After merge fixes
Review of new pushed code
2005-07-31 22:56:24 +03:00
serg@serg.mylan
9c332d8d2a yassl changeset 2:
remove FIX_GCC_LINKING_PROBLEM and -DDEFINE_CXA_PURE_VIRTUAL
  replace echo in configure.in with AC_MSG_WARN/AC_MSG_ERROR
  don't set -DUSE_MYSYS_NEW for gcc 2.95
  set $USE_MYSYS_NEW even if CXX is g++
  yassl bugfixes
  instantiate all yassl templates explicitly
2005-04-30 19:48:45 +02:00
gbichot@production.mysql.com
c766efdc5d Last part of WL#1062: better replication of timezones: no more use
of SET ONE_SHOT; storing tz info directly in event (if this info is needed),
it's now allowed to have different global tz on master and slave.
2005-03-22 00:26:12 +01:00
dlenev@brandersnatch.localdomain
f169114042 WL#874 "Extended LOAD DATA".
Now one can use user variables as target for data loaded from file
(besides table's columns). Also LOAD DATA got new SET-clause in which
one can specify values for table columns as expressions.

For example the following is possible:
LOAD DATA INFILE 'words.dat' INTO TABLE t1 (a, @b) SET c = @b + 1;

This patch also implements new way of replicating LOAD DATA.
Now we do it similarly to other queries.
We store LOAD DATA query in new Execute_load_query event
(which is last in the sequence of events representing LOAD DATA).
When we are executing this event we simply rewrite part of query which
holds name of file (we use name of temporary file) and then execute it
as usual query. In the beggining of this sequence we use Begin_load_query
event which is almost identical to Append_file event
2005-03-16 04:32:47 +03:00
guilhem@mysql.com
69fb5af28a mysqlbinlog: safety measures (safe setting for completion_type,
auto-end-rollback in case crashed binlog) which cannot hurt.
2005-02-23 19:18:14 +01:00
serg@serg.mylan
2b41b8fa01 post-review fixes. Now ROLLBACK is done in Format_description_log_event 2005-02-17 13:52:16 +01:00
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
monty@narttu.mysql.fi
a278a77475 Fix for option 'R' (connect to remote server) in mysqlbinlog 2003-10-08 01:30:10 +03:00
monty@narttu.mysql.fi
1f8e38d03a Merge with 4.0 to get fix for mysqlbinlog 2003-10-07 21:41:06 +03:00
monty@narttu.mysql.fi
b82b76f480 Simple cleanups 2003-10-07 15:44:31 +03:00
monty@narttu.mysql.fi
6056cfadfc Merge with 4.0.16 2003-10-07 15:42:26 +03:00
monty@narttu.mysql.fi
89f30200bc Removed random chars after filename for LOAD DATA INFILE (in mysqlbinlog)
Add quoting for use `database` for mysqlbinlog
Removed test ins0000001
Add support for --replace for exec in mysqltest
Don't refer to install dir in mysqlbinlog.result
2003-09-29 12:31:35 +03:00
monty@narttu.mysql.fi
45a41e85e3 Code cleanup of new patches 2003-09-23 17:06:44 +03:00
dlenev@mysql.com
c4384241ec Bugfix for bug #1340, style fix before push 2003-09-19 20:34:58 +04:00
dlenev@mysql.com
3c55dbe3db Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg-1340
2003-09-19 20:34:57 +04:00
vva@eagle.mysql.r18.ru
d623fc83b1 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_1073/mysql-4.0
2003-09-19 12:34:56 -04:00
dlenev@mysql.com
69aed374a5 Fix for bug #1340 (More careful checks if we met proper Create_file_log_event before Append or Exec event we are processing now) 2003-09-19 16:43:56 +04:00
guilhem@mysql.com
d1cd9bd498 Fix for BUG#1258 (Trying to use the mysqlbinlog with -h and -u option gives segmentation
fault). Fix is just initializing "host" (and "user") with 0, not a string.
2003-09-12 15:48:48 +02:00
vva@eagle.mysql.r18.ru
0f1cf03905 fixed bug #1073
(Replication LOAD DATA INFILE mysqlbinlog doesn't cleanup tmp files)
2003-09-01 11:15:53 -04:00
monty@narttu.mysql.fi
77a70a0a24 merge with 4.0.15 2003-08-29 13:44:35 +03:00
guilhem@mysql.com
1a5c8be408 Fix for BUG#1096 which is:
"mysqlbinlog does not comment the original LOAD DATA INFILE if it has a "use xx""
2003-08-19 15:46:47 +02:00
guilhem@mysql.com
fefa92f3a7 Fixes for BUG#1091,1092,1093. Synopsis of these bugs:
mysqlbinlog segfaults if --position is just before Exec_load event
mysqlbinlog prints uncommented warnings if --database and compiled with debug
mysqlbinlog --database does not filter LOAD DATA INFILE
2003-08-19 15:12:44 +02:00
monty@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03:00
vva@eagle.mysql.r18.ru
c96c87d51d fixed bug #670 2003-07-04 16:06:17 -04:00
vva@eagle.mysql.r18.ru
da9d454cc3 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_672/mysql-4.0
2003-07-02 17:37:23 -04:00
vva@eagle.mysql.r18.ru
55e046a807 fixed bug #672 2003-07-02 16:56:27 -04:00
vva@eagle.mysql.r18.ru
c34eec515e made error output more detailed 2003-07-01 14:00:57 -04:00
vva@eagle.mysql.r18.ru
a86d23b93a Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0
into eagle.mysql.r18.ru:/home/vva/work/BUG_671/mysql-4.0
2003-07-01 13:21:35 -04:00
vva@eagle.mysql.r18.ru
20081b6293 removed --table option (fixed Bug #671) 2003-07-01 13:17:03 -04:00
guilhem@mysql.com
e8a8b8c346 fix for BUG#691 (4.0 mysqlbinlog couldn't read 3.23 binlog).
Safe parenthesis.
2003-06-20 15:48:52 +02:00
serg@serg.mylan
9f67e10d0d consistency fix - all help texts for command-line options should end with a dot. 2003-06-13 10:59:02 +02:00
monty@mashka.mysql.fi
cb7061ebe4 merge 2003-05-22 02:57:27 +03:00
vva@eagle.mysql.r18.ru
ec247fd6af changed processing of LOAD DATA in mysqlbinlog 2003-05-20 17:03:18 -04:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
gluh@gluh.mysql.r18.ru
e6fe7d1bed Task 761:'mysqlbinlog should not die when reading
unknown event'
2003-04-23 18:00:07 +05:00
monty@narttu.mysql.fi
a434bca704 Merge with 4.0 2003-03-16 19:17:54 +02:00
monty@mashka.mysql.fi
d56e2acf50 Merge to get fix for LOCK TABLES + DROP TABLE in another thread 2003-03-07 01:20:56 +02:00
Sinisa@sinisa.nasamreza.org
9034ed296b A better, but larger fix for server_id bug .. 2003-03-05 15:34:58 +02:00
bar@bar.mysql.r18.ru
37fdb93d7c Gluh asked me to do it 2003-01-31 11:41:39 +04:00
monty@mashka.mysql.fi
25c393a12e Portability fixes (for windows)
Some changes to the prepared statement protocol to make it easier to use and faster.
2003-01-21 21:07:59 +02:00
vva@eagle.mysql.r18.ru
4b5a313c1a new option --local-load in mysqlbinlog 2003-01-17 21:52:56 +04:00
monty@mashka.mysql.fi
7a70332836 Portability fix when using -DBIG_TABLES 2002-11-14 12:21:36 +02:00
monty@hundin.mysql.fi
aa4e165808 Portability fix extern "C" static -> extern "C" 2002-11-07 12:49:02 +02:00
monty@butch.
a2bdf9265f Portability fixes for Fortre C++ 5.0 (on Sun) in 32 and 64 bit modes. 2002-11-07 03:54:00 +02:00
lenz@mysql.com
019b5ab7b4 - backported gcc 3.0 linking fix from 4.0
- some cosmetical fixups (typos, comments)
2002-09-24 22:24:30 +02:00
monty@mashka.mysql.fi
ce4b584a85 Increased max possible max_allowed_packet to 1G
Small optimization to not do external locking of temporary MyISAM tables.
2002-09-19 17:49:41 +03:00