Commit graph

49 commits

Author SHA1 Message Date
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
7fb417d0ba Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out

Problem: using "mysqlbinlog | mysql" for recoveries the connection_id() 
result may differ from what was used when issuing the statement.

Fix: if there is a connection_id() in a statement, write to binlog
SET pseudo_thread_id= XXX; before it and use the value later on.
2007-08-01 15:27:03 +05:00
gshchepa/uchum@gleb.loc
1b5d893122 Fixed bug #28293.
Occasionally mysqlbinlog --hexdump failed with error:
  ERROR 1064 (42000) at line ...: You have an error in your
  SQL syntax; check the manual that corresponds to your MySQL
  server version for the right syntax to use near
  'Query thread_id=... exec_time=... error_code=...

When the length of hexadecimal dump of binlog header was
divisible by 16, commentary sign '#' after header was lost.
The Log_event::print_header function has been modified to always
finish hexadecimal binlog header with "\n# ".
2007-06-21 02:11:28 +05:00
msvensson@pilot.blaudden
d96319299b Add correct replace 2007-03-31 17:18:03 +02:00
msvensson@pilot.blaudden
75ab386731 After merge fixes 2007-03-01 20:59:08 +01:00
msvensson@pilot.blaudden
f5778fc73e Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-01 18:12:56 +01:00
bar@mysql.com
c75a0d6a17 Fix for wrong replace command. 2007-03-01 12:26:07 +04:00
bar@mysql.com
08d2203077 Additional fix for bug N 15126
Replacing local directory.
2007-03-01 11:23:12 +04:00
bar@mysql.com
c48a5e8bd1 After merge fix 2007-02-28 17:32:18 +04:00
bar@mysql.com
7e38927a38 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.0.b15126
2007-02-28 17:17:06 +04:00
bar@mysql.com
dd0c43d5fa Bug#15126 character_set_database is not replicated (LOAD DATA INFILE need it)
This patch fixes problem that LOAD DATA could use different
character sets when loading files on master and on slave sides:
- Adding replication of thd->variables.collation_database
- Adding optional character set clause into LOAD DATA

Note, the second way, with explicit CHARACTER SET clause
should be the recommended way to load data using an alternative
character set.
The old way, using "SET @@character_set_database=xxx" should be
gradually depricated.
2007-02-28 17:06:57 +04:00
kaa@polly.local
b7e6df7cc9 Merge polly.local:/tmp/maint/bug25137/my50-bug25137
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint
2007-02-20 22:23:51 +03:00
kaa@polly.local
315819fed0 Bug#18743: Several test cases fails if "classic" configuration in 5.0
The problem happened because those tests were using "cp932" and "ucs2" without checking whether these character sets are available. This fix moves test parts to make character set specific parts be tested only if they are:
- some parts were moved to "ctype_ucs.test" and "ctype_cp932.test"
- some parts were moved to the newly added tests "innodb-ucs2.test", "mysqlbinglog-cp932.test" and "sp-ucs2.test"
2007-02-19 13:57:06 +03:00
monty@mysql.com/narttu.mysql.fi
807526ff79 Fixed compiler warnings
Fixed wrong merge that disabled 'make test'
Renamed all suppress files to end in '.supp'
Don't give "skipped %d bytes from file" warnings in 5.0
2007-01-22 15:52:15 +02:00
bar@mysql.com/bar.intranet.mysql.r18.ru
cedafa8dec Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/usr/home/bar/mysql-5.0.b22645
2006-12-14 14:19:30 +04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
b66f34bd19 Bug#22645 LC_TIME_NAMES: Statement not replicated
Implementing event based replication of LC_TIME_NAMES for 5.0
(as a replacement of previously made ONE_SHOT replication)
2006-12-07 09:31:53 +04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
a70028a855 Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
Problem: when loading mysqlbinlog dumps, CREATE PROCEDURE having semicolons
in their bodies failed.
Fix: Using safe delimiter "/*!*/;" to dump log entries.
2006-11-28 16:26:15 +04:00
aelkin@dl145k.mysql.com
e9570047a4 BUG#14157: utf8 encoding in binlog without set character_set_client
missed table to drop after merge from 4.1
2006-05-31 12:51:21 +02:00
lars@mysql.com
a29504cbcb Test used a charset not available on many platforms 2006-05-16 10:01:07 +02:00
aelkin@mysql.com
c90ae2d2e5 Merge mysql.com:/usr_rh9/home/elkin.rh9/4.1
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
2006-05-14 11:35:33 +03:00
aelkin@mysql.com
226d978ae8 BUG#14157: utf8 encoding in binlog without set character_set_client e.g DROP temporary
Binlog lacks encoding info about DROPped temporary table.

Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, that automatically, but not the client, who generates the query
the binlog should be updated on the server's encoding for the coming DROP.
The `write_binlog_with_system_charset()' is introduced to replace similar problematic places in the code.
2006-05-09 23:01:31 +03:00
aelkin@mysql.com
14ced05e55 BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1.
2006-02-10 15:12:27 +02:00
aelkin@mysql.com
dd2a44c497 BUG#16217 forced to introduce a separate mysql client command to adopt its
internal charset to one associated with currently being handled query. 
To note such a query can come from interactive client either.

There was a discussion within replication team and Monty who's suggestion won.
It avoids straightforward parsing of all `set' queries that could affect client side 
character set. 
According to the idea, mysql client does not parse `set' queries but rather cares of
`charset new_cs_name' command.
This command is generated by mysqlbinlog in form of exclaiming comment (Lars' suggestion)
so that enlightened clients like `mysql' knows what to do with it.

Interactive human can switch between many multi-byte charsets during the session 
providing the command explicitly. 
To note that setting new internal mysql's charset does not
trigger sending any `SET' sql statement to the server.
2006-02-09 16:23:09 +02:00
msvensson@neptunus.(none)
09ec2919a1 Make it possible to run mysql-test-run.pl with default test suite in different vardir. 2006-01-24 08:30:54 +01:00
guilhem@mysql.com
fd9a6f9750 Tell the user that this ROLLBACK is added by mysqlbinlog (so that he does not wonder if it's present in binlog). This was brought up by Salle - thanks Salle. 2005-09-30 10:58:24 +02:00
lars@mysql.com
ed7eac5973 Added clarification comment regarding added ROLLBACK to mysqlbinlog output 2005-09-21 14:27:41 +02: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
624aaa4b09 result fixes after my change to mysqlbinlog (which was accidentally
pushed some minutes ago)
2005-02-23 19:59:25 +01:00
serg@serg.mylan
1bc6ae8913 portability fixes 2005-02-20 20:08:33 +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
5ddb6354a5 after merge fixes 2005-02-16 17:34:02 +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
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
monty@mysql.com
5b3c418b48 After merge fixes
Note: The following tests fails
- fulltext (Sergei has promised to fix)
- rpl_charset (Guilhem should fix)
- rpl_timezone (Dimitray has promised to fix)

Sanja needs to check out the calling of close_thread_tables() in sp_head.cc
2004-07-15 04:19:07 +03:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
guilhem@mysql.com
2b20e84ff8 Making DROP TABLE IF EXISTS, DROP DATABASE IF EXISTS, DELETE FROM, UPDATE be logged to
binlog even if they changed nothing, and a test for this.
This is useful when users use these commands to clean up their master and slave by issuing
one command on master (assume master and slave have slightly different data for some
reason and you want to clean up both).
Note that I have not changed multi-table DELETE and multi-table UPDATE because their
error-reporting mechanism is more complicated.
2004-06-09 16:07:01 +02:00
pem@mysql.comhem.se
d42b145817 Post-merge fixes, some quite complex. client/mysqlbinlog.cc and sql/log_event.cc
merged manually by guilhem.
2004-04-28 12:08:54 +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
monty@mysql.com
91a8546112 Portability fixes & fixing of test suite 2004-03-12 09:15:08 +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
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
vva@eagle.mysql.r18.ru
0333f7b10f fixed bug #1378 "mysqlbinlog for remote host is broken" 2004-02-06 20:57:11 +04:00
guilhem@gbichot2
d67bbe72c2 Now merge is done.
For previous commit I had run only rpl* tests, here the other ones had a 
few surprises. Latest status:
- all tests pass
- all replication tests pass with Valgrind
This is the final-final commit & push.
Doc remains.
2003-12-20 00:38:30 +01:00
ram@gw.mysql.r18.ru
de9d246548 Fixes for mysql tests. 2003-10-31 16:37:36 +04: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
dlenev@mysql.com
977c7b2d65 Test for mysqlbinlog
Particularly for BUG#1340 mysqlbinlog coredumps when reading Exec
event without seeing Create_file event before
2003-09-24 23:25:58 +04:00