Commit graph

58 commits

Author SHA1 Message Date
pem@mysql.com
b3f153507e Added missing (char*) casts in bzero calls.
(Needed for platforms with the traditional bzero prototype.)
Fixes BUG#460.
2003-07-03 01:08:34 +02:00
guilhem@mysql.com
60fb005e5e Fix for bug 254 :
we now make a distinction between if the master is < 3.23.57, 3.23 && >=57, and 4.x
(before the 2 3.23 were one). This is because in 3.23.57 we have a way to distinguish between
a Start_log_event written at server startup and one written at FLUSH LOGS, so we
have a way to know if the slave must drop old temp tables or not.
Change: mi->old_format was bool, now it's enum (to handle 3 cases). However, functions
which had 'bool old_format' as an argument have their prototypes unchanged, because
the old old_format == 0 now corresponds to the enum value BINLOG_FORMAT_CURRENT which
is equal to 0, so boolean tests are left untouched. The only case were we use mi->old_format
as an enum instead of casting it implicitly to a bool, is in Start_log_event::exec_event,
where we want to distinguish between the 3 possible enum values.
2003-06-06 16:41:28 +02:00
guilhem@mysql.com
87e1c552ed New variable rli->ignore_log_space_limit to resolve
a deadlock between I/O and SQL threads in replication
when relay_log_space is too small. This fixes bug #79.
2003-03-17 22:51:56 +01:00
guilhem@mysql.com
e66992aef5 Replication: simplification of init_relay_log_pos: always initialize,
remove variable rli->log_pos_current.
2003-03-02 00:45:19 +01:00
monty@mashka.mysql.fi
689578a099 Fixes for Netware
Call pthread_mutex_destroy() on not used mutex.
Changed comments in .h and .c files from // -> /* */
Added detection of mutex on which one didn't call pthread_mutex_destroy()
Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression"
Added optimisation for ORDER BY NULL
2003-01-28 08:38:28 +02:00
monty@mashka.mysql.fi
fa7a94ed14 Added timeout for wait_for_master_pos
Fixed comparision of log-binary name to handle comparison when file name extension wraps from .999 to .1000
Don't replicate CREATE/DROP DATABASE if wild_xxx_table=database.% is used.
2003-01-25 15:07:51 +02:00
monty@mashka.mysql.fi
5022e56cba Ensure that BEGIN / COMMIT is handled properly if slave dies
Added syntax support for
CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1;
2002-12-11 15:46:39 +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
monty@mashka.mysql.fi
f3a186c905 Portability fixes.
Improve mysql-test to be more robust.
Fix that GRANT doesn't delete SSL options
Change innobase_flush_log_at_trx_commit to uint.
Don't rotate logs if we read a rotate log entry from the master.
2002-09-11 06:40:08 +03:00
monty@mashka.mysql.fi
04723cf74d Give better error from reconnect()
Fixed hang in start_slave_threads() when thread dies quickly.
2002-08-24 05:44:16 +03:00
monty@hundin.mysql.fi
7dac7062fa Changed relay_log_space to ulonglong
Removed compiler warnings.
2002-08-23 15:14:01 +03:00
monty@hundin.mysql.fi
f36f9d00ff Fixed bug in wait_for_update() that I had introduced.
Changed option variables to my_bool (to avoid bugs in my_getopt())
Added new thread specific mutex LOCK_delete to be able to free LOCK_thread_count early.
Changed usage of LOCK_thread_count -> LOCK_status for statistics variables
2002-08-22 16:50:58 +03:00
monty@hundin.mysql.fi
03b0179af9 Use our version of RWLOCKS on UNIXWARE 7
More DBUG info for replication
Better error messages from replication
Fixed bug in replication code when connecting to 'localhost' (time was not released properly)
Block ALARM signal on Linux for signal handler thread (Fixes problem with running mysqld with --debug)
Removed warning when setting an AUTO_INCREMENT field to NULL
2002-08-21 22:04:22 +03:00
monty@mashka.mysql.fi
2c4fa340cc Lots of code fixes to the replication code (especially the binary logging and index log file handling)
Fixed bugs in my last changeset that made MySQL hard to compile.
Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables.
Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions
Extended my_chsize() to allow one to specify a filler character.
Extend vio_blocking to return the old state (This made some usage of this function much simpler)
Added testing for some functions that they caller have got the required mutexes before calling the function.
Use setrlimit() to ensure that we can write core file if one specifies --core-file.
Added --slave-compressed-protocol
Made 2 the minimum length for ft_min_word_len
Added variables foreign_key_checks & unique_checks.
Less logging from replication code (if not started with --log-warnings)
Changed that SHOW INNODB STATUS requre the SUPER privilege
More DBUG statements and a lot of new code comments
2002-08-08 03:12:02 +03:00
monty@mashka.mysql.fi
bc035c71f1 Merge with 3.23.51
Fixed wrong usage of sprintf() in ha_innodb.cc
2002-07-25 22:46:28 +03:00
salle@geopard.online.bg
b472f401b1 Some
C++ comments cleanup
2002-07-17 15:17:20 +03:00
heikki@hundin.mysql.fi
a4b29743bc slave.h, slave.cc:
Do not flush the position to master.info file if we have a transaction open
2002-06-22 20:00:32 +03:00
monty@mashka.mysql.fi
2aecdd1a91 Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked)
This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
2002-06-11 11:20:31 +03:00
monty@hundin.mysql.fi
e4130b11c9 removed init_count from IO_CACHE.
Added missing mutex_unlock to slave replication code.
2002-06-05 23:04:38 +03:00
jani@hynda.(none)
ff7016e962 Fixed a bug. 2002-05-29 15:29:42 +03:00
monty@hundin.mysql.fi
7d276c3bb8 Portability fix 2002-04-30 16:40:46 +03:00
sasha@mysql.sashanet.com
08623f050c replication bugfixes 2002-04-25 07:33:02 -06:00
sasha@mysql.sashanet.com
d7b7e09293 reckless slave option
bison 1.34 yacc rule compliance
more robust handling of relay log corruption
2002-04-15 17:09:30 -06:00
sasha@mysql.sashanet.com
14603a3620 relay_log_space_limit
DBUG_ macro cleanup
buffer boundary cleanup
This changeset, although not fully tested, works for me better than 
anything I've had so far, including what is in the repository. I will 
push it unless something crashes while I am writing this :-)
2002-04-01 21:46:23 -07:00
sasha@mysql.sashanet.com
be388422eb replication updates. This changeset seems to be working fine on test systems.
If no problems are discovered in the next week, this will make the replication
code ready for 4.0.2 release.
2002-03-30 12:36:05 -07:00
sasha@mysql.sashanet.com
a664ca007d fixed the use of unitialized variable - code now works on the test system
of one of our users which replicates from a live server. So I now have a
lot of confidence in it and will push. It passes all tests, so I if I broke
somebody's code in 3.23 merge this is your fault - you should have had a good test
case :-)
2002-03-02 22:00:37 -07:00
sasha@mysql.sashanet.com
6980a24e9d fixes for slave backward compat
fixed bug in LOAD DATA FROM MASTER
fixed rpl000001.result
Slave now replicates 3.23 master, with the exception of LOAD DATA INFILE, 
which is still buggy. Will push this one after the pull/merge
2002-02-07 15:29:46 -07:00
monty@hundin.mysql.fi
6a1b08cbd4 Added --sql-mode=NO_UNSIGNED_SUBTRACTION 2002-01-30 15:32:48 +02:00
monty@hundin.mysql.fi
be46289855 New error messages
Test of unsigned BIGINT values
Fixes for queries-per-hour
Cleanup of replication code (comments and portability fixes)
Make most of the binary log code 4G clean
Changed syntax for GRANT ... QUERIES PER HOUR
2002-01-29 18:32:16 +02:00
sasha@mysql.sashanet.com
7275dcef35 misc replication bugfixes including some needed modifications in IO_CACHE
likely() and unlikely() branch prediction compiler hint macros
clean-up of comments
2002-01-26 22:26:24 -07:00
sasha@mysql.sashanet.com
8e43ad12c3 post-merge fixes, including slave-skip-errors backport
fixed too quick timeout in mysql-test-run which caused a race with the
 new server getting started before the old one completely finished 
 shutdown. This should fix the pid warning we've been getting as well as
 inconsistent results when running tests with the manager
2002-01-22 15:05:11 -07:00
sasha@mysql.sashanet.com
56129ce634 Here comes a nasty patch, although I am not ready to push it yet. I will
first pull, merge,test, and get it to work.

The main change is the new replication code - now we have two slave threads
SQL thread and I/O thread. I have also re-written a lot of the code to 
prepare for multi-master implementation. 

I also documented IO_CACHE quite extensively and to some extend, THD class.
2002-01-19 19:16:52 -07:00
sasha@mysql.sashanet.com
f7acf09d9c slave-skip-errors
added extra/mysql_install.c - will work on it in 4.0, but it does not hurt
to have it sit in 3.23 tree for now since it will eventually be backported 
to 3.23 anyway
2001-12-12 18:55:33 -07:00
sasha@mysql.sashanet.com
beaf95b09d work to enable reading 3.23 logs - not yet finished
moved fail-safe replication routines from sql_repl.cc to repl_failsafe.cc
write start event only in the first log
2001-11-10 22:24:12 -07:00
monty@work.mysql.com
1805368556 merge 2001-10-03 18:00:38 +02:00
monty@hundin.mysql.fi
f5a53594c8 Added usage of --master-retry-count to make mysql-test-run safer. 2001-10-03 16:27:20 +03:00
sasha@mysql.sashanet.com
09eda84f2e LOAD DATA INFILE is now replicated properly, except for cleanup on
Stop event and bugs the test suite could not catch
Did some big restructuring of binlog event classes - most important
change is that now each event class has exec_event method and one does
not need to modify slave core code to add a new event. Slave code is
now much smaller and easier to read
2001-08-03 15:57:53 -06:00
sasha@mysql.sashanet.com
b5f76be024 merged with 3.23 2001-07-17 16:23:36 -06:00
sasha@mysql.sashanet.com
14c23716a6 added slave_net_timeout 2001-07-17 14:22:52 -06:00
sasha@mysql.sashanet.com
5527f9bfc3 mysql-test/t/rpl_sporadic_master.test
fixed test case to produce same results on txn-enabled binary. 
    temporary fix - permanent fix is it make mysqld behave the same with
    MyISAM on auto_increment insert after delete from tbl_name regardless
    of how the binary was compiled
sql/slave.cc
    fixed concurrency bug with log_seq
sql/slave.h
    last_log_seq needs to be updated atomically with pos
sql/sql_repl.cc
    cleared up comment and fixed concurrency bug
2001-07-10 18:08:37 -06:00
sasha@mysql.sashanet.com
27561841d1 merged latest changes in 3.23 2001-07-07 15:35:23 -06:00
monty@tik.mysql.fi
19a99dd3fd dded volatile to replication variable 2001-07-07 23:26:06 +03:00
sasha@mysql.sashanet.com
a91ac47cde show master forced rotate info in SHOW BINLOG EVENTS
mark a master-forced rotate with a special flag
2001-06-23 19:37:24 -06:00
sasha@mysql.sashanet.com
a817bd3862 A slave now can optionally register with the master providing the
info on how to connect to the slave for the clients that connect to
the master, but would like to know where the slaves are
2001-05-30 18:50:56 -06:00
sasha@mysql.sashanet.com
8f6b34f950 updates for LOAD DATA FROM MASTER + some cleanup of replication code 2001-05-28 19:18:23 -06:00
monty@donna.mysql.fi
add70fc1ba Changed pthread_mutex_init() to use new MY_MUTEX_INIT.. macro
(For glibc 2.2)
2001-03-26 01:05:04 +03:00
sasha@mysql.sashanet.com
a2b6410965 untested changes to close socket on slave stop for OS's that do not
interrupt I/O after thr_alarm_kill()

test case for order by desc coredump
2001-03-12 20:17:32 -07:00
monty@donna.mysql.fi
98c70da357 Fixed test cases for innobase
Fixed bug introduced with last ORDER BY optimization
Changed log position to longlong to avoid warnings.
2001-03-07 23:50:44 +02:00
sasha@mysql.sashanet.com
4b9fdfc3f2 ulonglong -> uint32 for log offset
more verbose messages when slave thread exits
2001-02-26 22:27:20 -07:00
sasha@mysql.sashanet.com
e8ffda5397 Added last_errno and last_error to show slave status
slave will skip the first SQL_SLAVE_SKIP_COUNTER events on start - 
this is needed to recover from broken replication when the next log
event(s) should just be skipped.
Rotate binlogs when max_binlog_size is reached
2001-01-24 09:15:34 -07:00