Commit graph

583 commits

Author SHA1 Message Date
guilhem@mysql.com
a6ceb59491 fixes after merge of 4.1. 2005-10-13 00:29:23 +02: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
03ed3231af slave.cc:
SCCS merged
2005-10-12 21:25:04 +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
monty@mysql.com
5513ab69b7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-12 00:59:52 +03:00
monty@mysql.com
f5fdf3e87a Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
2005-10-12 00:58:22 +03:00
guilhem@mysql.com
554970c058 To help people avoid BUG#2122 "changing hostname confuses master or slave" until it's fixed,
we now issue a warning (at slave's server startup only) when a relay log is named
using the implicit hostname-relay-bin naming. Like we already do for binlogs.
2005-10-11 15:01:24 +02:00
serg@serg.mylan
2e2d18b7cf Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.1
2005-10-09 19:10:19 +02:00
serg@serg.mylan
e91712d9bb pthread_handler_decl() changed to be ctags-friendly
(and contain extern "C" when necessary)
2005-10-08 16:39:55 +02:00
tomas@poseidon.ndb.mysql.com
620b7bafb0 Merge 2005-10-06 10:54:07 +02:00
jani@ua141d10.elisa.omakaista.fi
4099872e2c Fixed several boolean type options used in my_long_options[].
Some options were declared as 'bool', but since those are being
handled in my_getopt.c, bool can be machine dependent. To make
sure it works in all circumstances, the type should be my_bool
for C (not C++) programs.
2005-10-04 19:52:12 +03:00
SergeyV@selena.
7d0d7826bb Fixes bug #13377. Added code to close active log files in case
of log reset condition.
2005-10-03 20:34:42 +04:00
serg@serg.mylan
306aa15391 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-merged
2005-09-21 17:42:44 +02:00
serg@serg.mylan
23f35495ac merged 2005-09-21 12:37:51 +02:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
sasha@asksasha.com
00eae49b5c fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present): the problem originally was that the tables in auxilliary_tables did not have 
the correct real_name, which caused problems in the second call to tables_ok(). 
The fix corrects the real_name problem, and also sets the updating flag properly, 
which makes the second call to tables_ok() unnecessary.
2005-09-14 06:31:38 -06:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
02056f8e3a Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-25 13:11:38 -04:00
acurtis@xiphis.org
b9476f7d50 Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/merge-5.0
2005-08-11 12:18:53 +01:00
monty@mysql.com
99cb083549 Review of new pushed code
- Fixed some error condtion when handling dates with 'T'
- Added extra test for bug #11867 (Wrong result with "... WHERE ROW( a, b ) IN ( SELECT DISTINCT a, b WHERE ...)" to show it's not yet fixed
- Safety fixes and cleanups
2005-08-09 00:13:49 +03:00
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
69acde961f Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-05 18:01:34 -04:00
jimw@mysql.com
8d591d0189 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-01 17:08:38 -07:00
sasha@asksasha.com
fa7897c62a updates for BUG#10780 - fixed slave I/O thread running status to No while attempting
to connect
2005-07-29 21:00:28 -06:00
sasha@asksasha.com
08faad4a4b patch for bug 10780 2005-07-28 19:08:01 -06:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
24d45c5c30 Merge mysql.com:/home/my/mysql-4.0
into  mysql.com:/home/my/mysql-4.1
2005-07-27 13:24:59 +03:00
monty@mysql.com
4098c40d87 Review fixes:
Fixed portability problem with bool in C programs
Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
my_sleep() -> pthread_cond_timedwait()
2005-07-26 17:55:58 +03:00
ndbdev@dl145b.mysql.com
e6d3d73ce0 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-07-22 13:53:59 +02:00
stewart@mysql.com
0eb6a68e2c Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main
2005-07-18 15:02:21 +10:00
tomas@poseidon.ndb.mysql.com
911d878ca9 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1
2005-07-15 15:08:38 +02:00
konstantin@mysql.com
9c6f14aa3d Get rid of checking for ETIME return value of pthread_cond_timedwait.
ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on 
Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT.
The standard requirement is that the only additional return value
of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT.
Let us not bloat the application code with redundant checks,
and if we're ever to work on a platform that returns a non-standard 
value, we should write a wrapper for that platform (like we do, e.g., for
Windows).
2005-07-14 19:42:56 +04:00
stewart@mysql.com
0e304e4d02 Merge mysql.com:/home/stewart/Documents/MySQL/4.1/main
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main
2005-07-14 17:43:35 +10:00
stewart@mysql.com
dab8149226 Merge mysql.com:/home/stewart/Documents/MySQL/4.0/main
into  mysql.com:/home/stewart/Documents/MySQL/4.1/main
2005-07-14 17:35:41 +10:00
stewart@mysql.com
d5cb88cec2 BUG#11384 drop database causes mysqld to core
Only reproducable in 5.1-wl2325, although the missing code is missing from 4.0 and up.
2005-07-14 17:33:35 +10:00
lars@mysql.com
30b76e5d78 Manual merge 2005-07-13 04:00:55 +02:00
lars@mysql.com
6db2602ad0 Merge mysql.com:/home/bkroot/mysql-4.1
into  mysql.com:/home/bk/mysql-5.0
2005-07-13 02:13:04 +02:00
lars@mysql.com
dc55af92ff BUG#6987: Added note when stat is failing on relay log, added mutex for log rotatation. 2005-07-12 06:01:26 +02:00
ndbdev@dl145b.mysql.com
dcef1c7532 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-06-22 19:07:29 +02:00
svoj@mysql.com
74373e7d54 WL#2286 - Compile MySQL w/YASSL support
Fix GCC 4.0 link failure.
Better CXX_VERSION guessing.
2005-06-22 14:08:28 +05:00
tulin@dl145b.mysql.com
b217fc0692 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-06-20 12:42:39 +02:00
svoj@mysql.com
7660f609e6 WL#2286 - Compile MySQL w/YASSL support
Fix for yaSSL link failures with Forte Developer 7, MIPSpro Compilers, Compaq C++.
These compilers have problem with implicit template instantiation in archives
(libyassl.a, libtaocrypt.a). Instantiate templates explicitly.

Fix for yaSSL link failure on powermacg5 (gcc 3.3). When -O3 is specified gcc inlines
__cxa_pure_virtual. This is wrong behavior, __cxa_pure_virtual must never be inlined.
2005-06-19 21:46:44 +05:00
tomas@poseidon.ndb.mysql.com
2dca9d5953 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1
2005-06-02 10:44:48 +02:00
brian@zim.(none)
113a99626d Merge of 4.1->5.0. This contained the fixes for GCC 4.0 2005-06-01 21:56:30 -07:00
brian@zim.(none)
ba9b9f8993 Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed a number of dumb things in ha_tina. 2005-06-01 17:34:10 -07:00
lars@mysql.com
05cbb3962c Manual merge 5.0->5.1 2005-05-06 15:04:07 +02:00
gbichot@quadita2.mysql.com
b72ae4fe57 Approximative fixes for BUG#2610,2611,9100 i.e. WL#2146 binlogging/replication of routines (stored procs and functions).
Approximative, because it's using our binlogging way (what we call "query"-level) and this is not as good as record-level binlog (5.1) would be. It imposes several
  limitations to routines, and has caveats (which I'll document, and for which the server will try to issue errors but that is not always possible).
  Reason I don't propagate caller info to the binlog as planned is that on master and slave
  users may be different; even with that some caveats would remain.
2005-05-05 14:20:53 +02:00
patg@patrick.local
8e0eb65f9a 5.0 to 5.1 merge 2005-04-01 12:32:17 -08:00
gbichot@quadita2.mysql.com
5acca04c7c merge from 4.1 2005-03-24 14:32:40 +01:00
gbichot@quadita2.mysql.com
19499229ed "After Monty's review" changes to the fix for BUG#8325 "Deadlock in replication thread stops replication":
s/sleep/safe_sleep (thread safe); sleep 0/1/2/3/4/5/5/5 (get slave less late);
no message on error log (deadlock is too common sometimes), a global counter
instead (SHOW STATUS LIKE 'slave_retried_transactions').
Plus a fix for libmysql/Makefile.shared
2005-03-23 19:19:36 +01:00
gbichot@production.mysql.com
fc7234cb4a disabling rpl_timezone.test if --ps-protocol, as binlogging of CONVERT_TZ(,,@@time_zone)
fails there; until we find reason (me and possibly Konstantin).
2005-03-22 11:38:51 +01: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
lars@mysql.com
efb077502d Merge 2005-03-21 23:05:55 +01:00
lars@mysql.com
c6d85289ab WL#2472:
Renamed Table_filter to Rpl_filter
Eliminated very annoying memory leak
2005-03-21 22:09:42 +01:00
lars@mysql.com
7ed7fc7f58 WL#2472: Addendum: Fixes after Mats review 2005-03-10 14:36:48 +01:00
serg@serg.mylan
c49928447d Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-03-09 13:02:51 +01:00
serg@serg.mylan
1e09c15a8b don't close binlog in the destructor - use explictit MYSQL_LOG::cleanup for this 2005-03-09 12:29:51 +01:00
lars@mysql.com
26787260b7 WL#2472: Refactoring of replication and binlog filtering.
Needed to be able to have multiple masters connected 
to same slave server with different filters.
2005-03-08 21:12:35 +01:00
guilhem@mysql.com
c4ac232d17 First part of fix for BUG#7998 "Replication should be more clever about when to replicate RELEASE_LOCK()"
(next part is updating test results)
2005-03-02 16:37:54 +01:00
guilhem@mysql.com
c6cedf52e3 Merge 2005-03-02 14:46:19 +01:00
guilhem@mysql.com
11a1c83c03 Fix for BUG#8325 "Deadlock in replication thread stops replication":
in slave SQL thread: if a transaction fails because of InnoDB deadlock or innodb_lock_wait_timeout exceeded,
optionally retry the transaction a certain number of times (new variable --slave_transaction_retries).
2005-03-02 11:29:48 +01:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02: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
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
acurtis@pcgem.rdg.cyberkinetica.com
0b1f98e83e Ensure that slaves have normal COMMIT behaviour after WL#1967 2005-02-07 13:15:48 +00: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
fb78bfebe4 open binlog index file *before* tc_log->open() and binlog itself *after* 2005-02-01 15:36:48 +01:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
79240013b2 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-01-24 15:50:13 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
guilhem@mysql.com
78b7ec0258 slave.cc:
5.0 has a different way of knowing if master is < 3.23.57
2005-01-18 14:46:26 +01:00
guilhem@mysql.com
5fbdd9bdcd Merge mysql.com:/home/mysql_src/mysql-4.1-clean
into mysql.com:/home/mysql_src/mysql-5.0-clean
2005-01-18 11:06:37 +01:00
guilhem@mysql.com
5e43cf86a6 Fix for BUG#7965 "Slave_IO_State Stuck at 'Checking Master Version'":
Working around hang of master < 3.23.50 on SELECT @@unknown_var
(to enable 3.23.49->4.1.10 replication)
2005-01-17 21:26:14 +01:00
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
guilhem@mysql.com
3287e82f09 Very minor fixes for Seconds_Behind_Master column of SHOW SLAVE STATUS. 2004-12-16 22:38:42 +01:00
guilhem@mysql.com
ea99ce4e09 A change of behaviour of Seconds_Behind_Master from SHOW SLAVE STATUS. It's going into 4.1
because old behaviour was somewhat nonsensical (kind of bug). Changes are that if repl threads are
down or disconnected the column will be NULL, and if master is idle the column will not grow indefinitely anymore.
2004-12-16 18:12:22 +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
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00
lars@mysql.com
f900433bbe Due to a compiler bug, slave.cc:tables_ok() sometimes wrongly returns
1 if the return type is int or int_fast8_t.  The test case that showed
this problem is rpl000001 and the tested version was MySQL 5.0.2.  The
compiler with the problem is GCC 3.0.4 runing on "Linux bitch 2.4.18
#2 Thu Apr 11 14:37:17 EDT 2002 sparc64 unknown".

By changing the return type to bool the problem disappear.  (Another
way to make the problem disappear is to simply print the returned
value with printf("%d",?).  The printed returned value is always 0 in
the test cases I have run.)  This is only a partial solution to the
problem, since someone could later change the return type of the
function back to int or some other type that does not work.
2004-12-03 15:18:25 +01:00
serg@serg.mylan
b460059988 merged 2004-11-28 20:42:04 +01:00
serg@serg.mylan
96729c62be merged 2004-11-28 18:19:01 +01:00
tomas@poseidon.ndb.mysql.com
97c8234b46 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
2004-11-26 13:44:49 +00:00
monty@mysql.com
eb304bd49f Fixes while reviewing code
(Cleanups and better bug fixes)
2004-11-26 02:31:22 +02:00
mats@mysql.com
9ffb3fd39c Merge 2004-11-25 12:23:41 +01:00
mats@mysql.com
c06cae0f55 Fix for Bug#6148. Only rewind read position in binary log when the
slave SQL thread is started.
2004-11-25 09:26:45 +01:00
serg@serg.mylan
e68bd85b77 merged 2004-11-17 18:04:36 +01:00
guilhem@mysql.com
d34421c127 Fixes for compilation errors in Windows (casts from uint32* to uint*) in repl and charset code.
Moving the part of user_var.test using UCS2 to ctype_ucs.test
2004-11-17 16:41:30 +01:00
bell@sanja.is.com.ua
7210195f1e now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement
2004-11-13 19:35:51 +02:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
bell@sanja.is.com.ua
31f7811183 post-review fixes 2004-11-12 14:34:00 +02:00
brian@avenger.(none)
f05daf02ba Resolved merge from 4.1 -> 5.0 (mainly Guilhem's work with mysqldump) 2004-11-11 18:58:57 -08:00
monty@mysql.com
7d78fd077a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-11-11 00:36:56 +02:00
monty@mysql.com
c7e85ef9b9 More debugging
Print position in normal log for Binlog dump
2004-11-10 18:07:39 +02:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
bell@sanja.is.com.ua
4714a6e744 errors without code removed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
2004-10-20 04:04:37 +03:00
guilhem@mysql.com
41b808d224 Optimization: in the replication slave, we can avoid doing one strlen() per event's execution,
as we already have db_len in Log_event. Only if rewrite_db() changed the db we need a strlen
(so we now do the strlen() in rewrite_db). Plus a test (we had none for --replicate-rewrite-db :( ).
2004-10-19 22:27:19 +02: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
serg@serg.mylan
9a1456b45a few s/sql_print_error/sql_print_information/ 2004-09-08 10:45:50 +02:00
serg@serg.mylan
323e683cbf merged 2004-09-07 21:30:28 +02:00
guilhem@mysql.com
168e4c9c6b when we update thd->db in replication, it's safer to update thd->db_length too.
This does not fix any known bug, but is still a good idea.
2004-09-07 14:57:54 +02:00