Commit graph

385 commits

Author SHA1 Message Date
tnurnberg@sin.intern.azundris.com
131db8123f Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
windows fixies
2007-06-27 09:30:29 +02:00
tnurnberg@sin.intern.azundris.com
874ccf025d Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
end_log_pos data within a transaction are relative to
the start of the transaction rather than absolute.
we fix those groups in situ before writing the log out.

additional comments and handling for groups with very
large single events, as suggested by Guilhem.
2007-06-25 18:41:17 +02:00
tnurnberg@sin.intern.azundris.com
25af844f6f Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
fix binlog-writing so that end_log_pos is given correctly even
within transactions for both SHOW BINLOG and SHOW MASTER STATUS,
that is as absolute values (from log start) rather than relative
values (from transaction's start).
---
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/22540/50-22540
2007-06-25 11:34:23 +02:00
msvensson@pilot.blaudden
0246ca9281 Remove dangerous "remove warning" hack, cast to long
will truncate the time value on systems where "long" are 32bit,
instead use time_t as datatype
2007-04-27 15:33:48 +02:00
jani@ua141d10.elisa.omakaista.fi
335153121b Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-04-12 12:50:02 +03:00
tsmith@siva.hindu.god
024be23a82 Fix warning on Windows 2007-03-28 19:49:30 -06:00
tsmith@siva.hindu.god
979102de3b Remove warning when compiling libmysqld/log.cc 2007-03-28 17:50:06 -06:00
msvensson@pilot.blaudden
0302f48c2d Merge pilot.blaudden:/home/msvensson/mysql/bug27490/my50-bug27490
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-28 18:43:39 +02:00
msvensson@pilot.blaudden
b82b20cd83 Bug#27490 Function to log to NT event log could allocate memory
- Change 'print_buffer_to_nt_event_log' to overwrite the string
if the buffer is not long enough to hold the ending CR/LF's
- Make functions static
- Remove the "hack" intended to force 'print_buffer_to_nt_event_log'
 never to use "new"
2007-03-28 10:12:33 +02:00
aelkin/elkin@andrepl.(none)
2afa90b5c5 Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where
SF() modified non-ta table.
As the result of this artifact it was not possible to detect whether there were any side-effects when
top-level query ends. 
If the top level query table was not modified and the bit is lost there would be no binlogging.

Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags
telling whether the current query and the current transaction modified any non-ta table.
The flags stmt, all are dropped at the end of the query and the transaction.
2007-03-23 17:12:58 +02: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
lars/lthalmann@mysql.com/dl145j.mysql.com
2f5a2b2476 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-03-01 11:37:28 +01:00
jani@ua141d10.elisa.omakaista.fi
bcbc0031eb Fixed compiler warnings. 2007-02-28 22:23:35 +02:00
cbell/Chuck@mysql_cab_desk.
e9481608c3 Merge cbell@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql_cab_desk.:C:/source/c++/mysql-5.0-rpl
2007-02-26 14:30:44 -05:00
lars/lthalmann@mysql.com/dl145j.mysql.com
1a09fb81fc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-02-25 00:10:51 +01:00
cbell/Chuck@mysql_cab_desk.
9017512bd6 Merge mysql_cab_desk.:C:/source/c++/mysql-5.0-rpl
into  mysql_cab_desk.:C:/source/c++/mysql-5.0_BUG_20141
2007-02-23 13:00:08 -05:00
cbell/Chuck@mysql_cab_desk.
4c6ced9fc5 BUG#20141 "User-defined variables are not replicated properly for SF/
Triggers in SBR mode."
BUG#14914 "SP: Uses of session variables in routines are not always
           replicated"
BUG#25167 "Dupl. usage of user-variables in trigger/function is not
           replicated correctly"

User-defined variables used inside of stored functions/triggers in
statements which did not update tables directly were not replicated.
We also had problems with replication of user-defined variables which
were used in triggers (or stored functions called from table-updating
statements) more than once.

This patch addresses the first issue by enabling logging of all
references to user-defined variables in triggers/stored functions
and not only references from table-updating statements.

The second issue stemmed from the fact that for user-defined
variables used from triggers or stored functions called from
table-updating statements we were writing binlog events for each
reference instead of only one event for the first reference.
This problem is already solved for stored functions called from
non-updating statements with help of "event unioning" mechanism.
So the patch simply extends this mechanism to the case affected.
It also fixes small problem in this mechanism which caused wrong
logging of references to user-variables in cases when non-updating
statement called several stored functions which used the same
variable and some of these function calls were omitted from binlog
as they were not updating any tables.
2007-02-23 12:58:56 -05:00
msvensson@pilot.blaudden
6caa0a232e Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Part 2, add @@hostname system variable
2007-02-20 16:24:38 +01:00
guilhem@gbichot3.local
2f75c9cd69 Backport from the Falcon tree.
When opening/creating the transaction coordinator's log, if binlog is
used, the tc log is the binlog so we use the binlog's name; otherwise
we use the mmap-based log, named after the mandatory argument of the
--log-tc option (meant for that).
2007-02-15 15:50:56 +01:00
monty@mysql.com/narttu.mysql.fi
a04157fbb3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-01-22 14:04:40 +02:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
monty@mysql.com/narttu.mysql.fi
88dd873de0 Fixed compiler warnings detected by option -Wshadow and -Wunused:
- Removed not used variables and functions
- Added #ifdef around code that is not used
- Renamed variables and functions to avoid conflicts
- Removed some not used arguments

Fixed some class/struct warnings in ndb
Added define IS_LONGDATA() to simplify code in libmysql.c

I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
2006-12-15 00:51:37 +02:00
monty@mysql.com/narttu.mysql.fi
3d40956039 Fixed portability issue in my_thr_init.c (was added in my last push)
Fixed compiler warnings (detected by VC++):
- Removed not used variables
- Added casts
- Fixed wrong assignments to bool
- Fixed wrong calls with bool arguments
- Added missing argument to store(longlong), which caused wrong store method to be called.
2006-11-30 18:25:05 +02:00
msvensson@neptunus.(none)
225b3e480b Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-10-03 20:28:59 +02:00
kroki/tomash@moonlight.intranet
8798b462b5 Fix for the patch for bug#21726: Incorrect result with multiple
invocations of LAST_INSERT_ID.

Reding of LAST_INSERT_ID inside stored function wasn't noted by caller,
and no LAST_INSERT_ID_EVENT was issued for binary log.

The solution is to add THD::last_insert_id_used_bin_log, which is much
like THD::last_insert_id_used, but is reset only for upper-level
statements.  This new variable is used to issue LAST_INSERT_ID_EVENT.
2006-10-03 13:38:16 +04:00
tsmith/tim@siva.hindu.god
b7d0ec2422 WL #3516: MySQL Enterprise: implement Version Display Specification
Print version_comment after server version in:
mysql.cc:  Welcome message and 'status' command output
log.cc: Top of log files
2006-09-29 12:52:48 -06:00
jonas@perch.ndb.mysql.com
fe808115e9 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-09-04 14:34:42 +02:00
jonas@perch.ndb.mysql.com
7ff631e890 Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/50-work
2006-09-04 13:46:56 +02:00
jonas@perch.ndb.mysql.com
96ff8b4c52 bug#21965 - replication
fix deadlock if master switches log file in parallell with "show master logs"
2006-09-04 13:43:34 +02:00
holyfoot/hf@mysql.com/deer.(none)
75be244cc7 Merge mysql.com:/home/hf/work/mysql-4.1.13717
into  mysql.com:/home/hf/work/mysql-5.0-mrg
2006-08-20 20:46:26 +05:00
holyfoot/hf@mysql.com/deer.(none)
21f721c6f5 bug #13717 embedded library dumps warnings on STDERR directly
Here i just disabled STDERR warnings in embedded server
Later we should get more defined about logs in the embedded server
2006-08-01 15:18:21 +05:00
lars@mysql.com
0e45d26993 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
2006-06-29 14:14:08 +02:00
aivanov@mysql.com
7dc30c68f4 Fixing BUG#17719 "Delete of binlog files fails on Windows"
and BUG#19208 "Test 'rpl000017' hangs on Windows".
 Both bugs are caused by attempting to delete an opened
 file and to create immediatedly a new one with the same
 name. On Windows it can be supported only on NT-platforms
 (by using FILE_SHARE_DELETE mode and with renaming the
 file before deletion). Because deleting not-closed files
 is not supported on all platforms (e.g. Win 98|ME) this
 is to be considered harmful and should be eliminated by
 a "code redesign".
2006-06-28 10:21:01 +04:00
cmiller@zippy.(none)
7b63337d31 Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit
mode

This is a modification of serg's and guilhem's suggestion in the bug report,
in that it also causes the transaction log to be written to disc.
2006-06-12 08:54:45 -04:00
lars@mysql.com
9a12ddcf5e BUG#18116: Changed of how mutex is handled for XA and rotating binlog 2006-03-31 11:48:08 +02: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
bell@sanja.is.com.ua
7f162c7899 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
2005-11-21 21:15:48 +02:00
bell@sanja.is.com.ua
806f9e24ff Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
2005-11-20 20:47:07 +02:00
SergeyV@selena.
00990f9774 Fixes bug #13377. my_open() & my_create() functions changed to use
my_sopen() on win32 which allows to use FILE_SHARE_DELETE flag to 
allow deleting opened files. my_sopen() implementation is added to
support this functionality.
2005-11-14 16:01:10 +03:00
brian@zim.(none)
510d0f24c8 Added handlerton flag to make storage engines invisable via flag. 2005-11-10 08:24:21 -08:00
monty@mysql.com
303f6b4a7a Reorder struct elements to be more optimal for 64 bit computers
(Main reason for reordering was to get rid of compiler warnings for order of element initialization)
2005-11-04 15:12:22 +02:00
monty@mysql.com
f2f4bf5240 wait_for_update must unlock mutex.
(Fixed failure in rpl0000008.test)
2005-11-02 19:28:49 +02:00
monty@mysql.com
1b3ed12017 Fixes during review of pushed code
Added back missing return in mysql_delete()
2005-10-27 15:15:01 +03:00
SergeyV@selena.
b357caab3d Bug #13377. Small update, code formatting. 2005-10-17 19:36:20 +04:00
SergeyV@selena.
3dec6a3b14 Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0
into  selena.:H:/MYSQL/src/#13377-mysql-5.0
2005-10-17 19:09:12 +04:00
SergeyV@selena.
221a501120 Small update for #13377 patch 2005-10-17 19:03:54 +04:00
guilhem@mysql.com
4252b546b3 Merge mysql.com:/home/mysql_src/mysql-4.1
into  mysql.com:/home/mysql_src/mysql-5.0;
a very bad automerge (issues with non-ascii chars), plus some hard conflicts I'll fix by hand in a next cset
2005-10-12 21:58:02 +02:00
guilhem@mysql.com
4c1c9db823 Fix for BUG#13023: "SQL Thread is up but doesn't move forward". Details in slave.cc;
in short we now record whenever the slave I/O thread ignores a master's event because of its server id,
and use this info in the slave SQL thread to advance Exec_master_log_pos. Because if we
do not, this variable stays at the position of the last executed event, i.e. the last *non-ignored*
executed one, which may not be the last of the master's binlog (and so the slave *looks* behind
the master though it's data-wise it's not).
2005-10-12 13:29:55 +02:00
serg@serg.mylan
b05a6d8fda don't "init" binlog if opt_bin_log is not set
(bug#13791 - mysqld crashes at startup in TC_LOG_MMAP::open)
2005-10-06 19:05:34 +02:00
jani@ua141d10.elisa.omakaista.fi
a1b609f010 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
2005-10-04 19:53:07 +03:00