Commit graph

31 commits

Author SHA1 Message Date
knielsen@mysql.com
c15158e108 Remove hard-coded ../var/.. path in test mix_innodb_myisam_binlog,
fails with --vardir option.
2006-02-20 09:34:02 +01:00
guilhem@mysql.com
32a5692733 In previous push, a DROP TABLE at the end of test was missing. 2006-02-18 21:08:41 +01:00
guilhem@mysql.com
4c5d18b150 Fix for BUG#16559 "Replication Problems with Non transactional tables inside an interrupted trans.":
problem was: when a connection disconnects having an open transaction affecting MyISAM and InnoDB, the ROLLBACK event stored in the binary log
contained a non-zero error code (1053 because of the disconnection), so when slave applied the transaction, slave complained that its ROLLBACK succeeded
(error_code=0) while master's had 1053, so slave stopped. But internally generated binlog events such as this ROLLBACK
should always have 0 as error code, as is true in 4.1 and was accidentally broken in 5.0,
so that there is no false alarm.
2006-02-18 17:19:16 +01:00
jimw@mysql.com
2ff5c55896 Fix mix_innodb_myisam_binlog test and results after merge 2005-11-17 20:17:49 -08:00
jimw@mysql.com
f8ce7bc01e Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-11-17 13:37:30 -08:00
sasha@asksasha.com
eac88b685c fixed the race condition in the test case for BUG#7947 2005-11-16 21:17:38 -07:00
sasha@asksasha.com
9986a357ec merged in the test case for BUG#7947 2005-11-15 13:38:06 -07:00
sasha@asksasha.com
637c800191 changed select release_lock() to do release_lock() to avoid having to compare the
non-deterministic result in the test case for BUG#7947
the bug fix for BUG#7947 now fixed the result of mix_innodb_myisam_binlog test, which
in the past was missing DO RELEASE_LOCK() in the output of SHOW BINLOG EVENTS
2005-11-07 20:51:30 -07:00
jimw@mysql.com
c18307e8a2 Cleanup tests and results after merge from 4.1 of embedded
server testing cleanups.
2005-04-04 12:43:58 -07:00
gbichot@quadita2.mysql.com
ead47f4701 WWe now store the catalog in Query_log_event in binlog WITHOUT its end zero.
This saves one byte per Query_log_event on disk compared to 5.0.[0..3]. Compatibility problems with 5.0.x where x<4
are explained in the comments in log_event.cc. Putting back s/my_open(O_TRUNC)/(my_delete+my_create) change which had
been wiped away by somebody doing a wrong 4.1->5.0 merge (which happened just
before 5.0.3 :( ). Applying it to new events for LOAD DATA INFILE.
If slave fails in Execute_load_query_log_event::exec_event(),
don't delete the file (so that it's re-usable at next START SLAVE).
And (youpi!) fix for BUG#3247 "a partially completed LOAD DATA INFILE is not
executed at all on the slave" (storing an Execute_load_query_log_event
to binlog, with its error code, instead of Delete_file_log_event).
2005-03-25 14:51:17 +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
7110f21c39 Last part of fix for BUG#7998 "Replication should be more clever about when to replicate RELEASE_LOCK()" + fixes after merge 2005-03-02 17:52:38 +01:00
serg@serg.mylan
383c6e312a don't log BEGIN in auto-commit mode
correct end_log_pos for Xid_log_event
2005-02-23 18:26:49 +01:00
serg@serg.mylan
5ddb6354a5 after merge fixes 2005-02-16 17:34:02 +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
serg@serg.mylan
3c5060981f query_id and my_xid -> ulonglong
fix for binlog+autocommit+tclog
comments, style fixes
2005-01-27 22:38:56 +01:00
serg@serg.mylan
1034677f94 XA (not completely polished out yet) 2005-01-16 13:16:23 +01:00
monty@mysql.com
e0f1e6af36 Portability fix for gcc 2.95.3
After merge fixes
2004-11-12 21:24:16 +02:00
monty@mysql.com
addd1a0da8 Merge with 4.1 2004-11-12 19:58:24 +02:00
monty@mysql.com
e9c3887b58 After merge fixes 2004-11-12 17:44:17 +02:00
monty@mysql.com
9252656d49 merge with 4.0 2004-11-12 11:17:53 +02:00
guilhem@mysql.com
1869cd9f83 Fix for BUG##5714 "Insert into MyISAM table and select ... for update]":
the fact that the transaction log is empty does not mean we're not in a transaction
(it could be BEGIN; SELECT * FOR UPDATE FROM ibtable: then we don't want to commit now, even if
the statement is a MyISAM update).
With a testcase.
2004-11-04 19:19:23 +01:00
monty@mishka.local
91ff64e107 Added options --auto-increment-increment and --auto-increment-offset.
This allows one to setup a master <-> master replication with non conflicting auto-increment series.
Cleaned up binary log code to make it easyer to add new state variables.
Added simpler 'upper level' logic for artificial events (events that should not cause cleanups on slave).
Simplified binary log handling.
Changed how auto_increment works together with to SET INSERT_ID=# to make it more predictable: Now the inserted rows in a multi-row statement are set independent of the existing rows in the table. (Before only InnoDB did this correctly)
2004-09-15 22:10:31 +03: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
antony@ltantony.rdg.cyberkinetica.homeunix.net
fcf96dbb18 WorkLog#1323
Deprecate the use of TYPE=... Preferred syntax is ENGINE=
2003-12-10 04:31:42 +00: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@mashka.mysql.fi
c477002fd4 Fix results for mix_innodb_myisam_binlog
Optimize calls to current_thd
2003-09-12 05:54:12 +03:00
monty@mashka.mysql.fi
73f66f68fd merge with 4.0.15 2003-09-11 20:24:14 +03:00
monty@mashka.mysql.fi
45aa92c574 After merge fixes.
Note that mix_innodb_myisam_binlog and union fails after this patch (Will be fixed shortly by maintaners of this code)
2003-09-11 19:06:23 +03:00
monty@mashka.mysql.fi
99490870e6 Cleaned up last bug fixes
Fix bug in SHOW GRANTS when there is a column privilege but no table privilege
2003-09-09 20:06:50 +03:00
guilhem@mysql.com
759a3c1e3c 2 minor edits, plus
fix for BUG#1113 "INSERT into non-trans table SELECT ; ROLLBACK" does not send warning"
and
fix for BUG#873 "In transaction, INSERT to non-trans table is written too early to binlog".
Now we don't always write the non-trans update immediately to the binlog;
if there is something in the binlog cache we write it to the binlog cache
(because the non-trans update could depend on a trans table which was modified
earlier in the transaction); then in case of ROLLBACK, we write the binlog
cache to the binlog, wrapped with BEGIN/ROLLBACK.
This guarantees that the slave does the same updates.
For ROLLBACK TO SAVEPOINT: when we execute a SAVEPOINT command we write it
to the binlog cache. At ROLLBACK TO SAVEPOINT, if some non-trans table was updated,
we write ROLLBACK TO SAVEPOINT to the binlog cache; when the transaction
terminates (COMMIT/ROLLBACK), the binlog cache will be flushed to the binlog
(because of the non-trans update) so we'll have SAVEPOINT and ROLLBACK TO
SAVEPOINT in the binlog.

Apart from this rare case of updates of mixed table types in transaction, the
usual way is still clear the binlog cache at ROLLBACK, or chop it at
ROLLBACK TO SAVEPOINT (meaning the SAVEPOINT command is also chopped, which
is fine).
Note that BUG#873 encompasses subbugs 1) and 2) of BUG#333 "3 binlogging bugs when doing INSERT with mixed InnoDB/MyISAM".
2003-08-22 15:39:24 +02:00