Commit graph

183 commits

Author SHA1 Message Date
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)
d78308449e Fixed a bug in make test, non-debug version. 2002-05-29 15:20:36 +03: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
2e6b48afd3 replication updates and bugfixes. Still not perfect - there is some strange
memory corruption I can only repeat on one system.
2002-03-15 18:44:44 -07:00
sasha@mysql.sashanet.com
d993a1c0c4 slave start <options> to be able to do
slave start io_thread 
 slave start sql_thread
same for stop
2002-03-09 21:48:06 -07: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
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
monty@bitch.mysql.fi
d0ccff5090 New improved IO_CACHE 2001-11-28 02:55:52 +02:00
sasha@mysql.sashanet.com
6865885f21 replication updates in the manual
fixed typo on sql_repl.cc
added build-tags script for the benefit of the poor, sick, and afflicted, 
as Matt likes to say :-)
2001-11-24 22:48:57 -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
sasha@mysql.sashanet.com
b00eee622e more work on IO_CACHE
portability fixes for systems with broken syscalls that do not interrupt on 
a signal
temporary commit - will not be pushed, need to sync up
2001-11-03 16:54:00 -07:00
sasha@mysql.sashanet.com
be4dfd21dd cleanup
removal of duplicate code in mf_iocache.cc 
work on failsafe replication
work on SEQ_READ_APPEND io cache
2001-10-23 13:28:03 -06:00
sasha@mysql.sashanet.com
2d3f96b483 changed manager to use my_net_*
fixed bug in master - unregister slaves when they disconnect
2001-10-12 09:37:25 -06:00
sasha@mysql.sashanet.com
20ece90471 fixed slave to clean up load data infile temp files
instrumented the server with DBUG_SYNC_POINT() macro
2001-10-03 13:55:31 -06:00
monty@hundin.mysql.fi
0d72e5440f Portability fixes 2001-09-15 16:22:34 +03:00
monty@hundin.mysql.fi
52b83ea218 Fixed bug in UNION
Fixed replication bug in load_master_data
2001-09-14 19:50:56 +03:00
monty@work.mysql.com
447c18954e merge with 3.23.42 2001-09-02 18:38:33 +02:00
monty@hundin.mysql.fi
7f4aee1c90 Make killing of threads safer 2001-09-01 10:38:16 +03:00
monty@hundin.mysql.fi
e127a952a6 Portability fixes 2001-08-23 00:55:48 +03:00
sasha@mysql.sashanet.com
440bff2571 Merge work:/home/bk/mysql-4.0
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
2001-08-15 16:15:20 -06:00
sasha@mysql.sashanet.com
21424657e4 merged replication fixes from 3.23 2001-08-15 15:57:47 -06:00
sasha@mysql.sashanet.com
f6099e532e improvements for stopping the slave in SLAVE STOP and on shutdown 2001-08-15 15:41:52 -06:00
monty@hundin.mysql.fi
59e7c97dab Remove warnings and portability fixes
New global read lock code
Fixed bug in DATETIME with WHERE optimization
Made UNION code more general.
2001-08-14 20:33:49 +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
21a8aaa29d fixed race condition in automatic binlog rotation
remove extension from binary log if the user specifies one to avoid
    non-rotatable logs
fixed possible use of unitialized IO_CACHE in debug mode
2001-07-11 19:29:23 -06:00
sasha@mysql.sashanet.com
38d3bf5172 mysql-test/t/rpl_sporadic_master.test
use truncate table
sql/slave.cc
    fixed race condition on server shutdown
sql/sql_repl.cc
    fixed uninitialized use of io_cache
2001-07-10 20:35:42 -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
monty@tik.mysql.fi
fc81fdb4ba Redefinition of myisam_bulk_insert_tree_size
Removed new error message
Fixed test case for varbinary
Threads are again killable in "merge_buffers"
Cleanup of sql_repl.cc
SHOW OPEN TABLES now works when no tables are opened
2001-07-10 15:53:08 +03:00
sasha@mysql.sashanet.com
c01d4e1ef7 SHOW NEW MASTER FOR SLAVE WITH ... 2001-07-04 17:14:31 -06:00
sasha@mysql.sashanet.com
12b442b649 post-merge fix
fixed bug in LOAD DATA FROM MASTER
2001-06-29 09:55:21 -06:00
sasha@mysql.sashanet.com
242037992f merged with 3.23 replication updates 2001-06-28 19:48:49 -06:00
sasha@mysql.sashanet.com
e87028fda6 fixed typo 2001-06-28 19:17:04 -06:00
sasha@mysql.sashanet.com
2e4d264c27 fixed message in post-commit trigger
added debugging options to master to behave sporadically, and a 
test case to make sure the slave can deal with it
2001-06-28 18:22:29 -06:00
sasha@mysql.sashanet.com
51e3c5de88 --do-test option in mysql-test-run - will do only tests that match the pattern
updated rotate event to set new position along with the new log
2001-06-26 17:02:33 -06:00
sasha@mysql.sashanet.com
992f889878 added SHOW BINLOG EVENTS
fixed log sequence bugs
fixed bugs in handling Slave event
added test case with SHOW BINLOG EVENTS
have not fixed all the bugs - found some that are also in 3.23,
will fix them there first, then do pull and cleanup

will not push this changeset
2001-06-21 13:19:24 -06:00
sasha@mysql.sashanet.com
46de2a9fe4 Added event sequence number and flags to binlog
Documented/cleaned up log event code
Updated tests
2001-06-19 15:03:48 -06:00
sasha@mysql.sashanet.com
ad0b92f941 do not show user/pass for slave unless running with show-slave-auth-info
cleanup of register_slave_on_master()
2001-06-01 21:15:15 -06:00
sasha@mysql.sashanet.com
ef11c1032c worked around one bug in the new symlink code, but hit another
test case included ( drop) - currently fails, along with rpl000009
2001-06-01 15:13:02 -06:00
monty@work.mysql.com
e595fe3b34 Merge work.mysql.com:/home/bk/mysql
into work.mysql.com:/home/bk/mysql-4.0
2001-06-01 03:13:02 +02:00
sasha@mysql.sashanet.com
bd109ae97c fixed bug in CHANGE MASTER TO 2001-05-31 16:54:16 -06:00
monty@work.mysql.com
df56b252a7 merge 2001-05-31 12:56:05 +02: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
monty@donna.mysql.fi
3dc4b35a05 Fixed problems with decimals withing IF()
Force add of FN_LIBCHAR to symlinks on windows
2001-05-29 13:46:17 +03: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
sasha@mysql.sashanet.com
c6ceb04bd8 Docs/manual.texi
fixed bug
sql/sql_repl.cc
    undid virtual master change
2001-05-03 16:01:13 -06:00
sasha@mysql.sashanet.com
be8f18e020 fixed redundant repetition of use db in mysqlbinlog
added support for virtual master ( replicating from a directory with binlogs)
test case for backup/restore with virtual master
2001-04-24 17:39:26 -06:00
sasha@mysql.sashanet.com
0dd0d88e8f changed signal by fd close to signal by vio_close
added support for kill expr
fixed coredump in set @a := foo;
added testcase for user_var
added testcase for kill
2001-03-13 23:07:12 -07: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
sasha@mysql.sashanet.com
b7170cf9cc replication fixes 2001-02-19 23:08:24 -07:00
monty@donna.mysql.com
c40b10730e merge 2001-01-28 21:41:10 +02:00
sasha@mysql.sashanet.com
70f619856b fixed up lock counting code - Monty's suggestions
updated manual about table lock counter
fixed coredump in DROP DATABASE with long bogus name by non-root user
fixed bug in handling STOP immediately after ROTATE
added test case for buffer overrun on DROP DATABASE by non-root user
added test case for the STOP bug in replication
2001-01-27 15:33:31 -07:00
monty@donna.mysql.com
a7c5b9c211 Portability fixes for OPENBSD, OS2 and Windows 2001-01-27 01:20:56 +02:00
monty@donna.mysql.com
5218a03a1d Merge work:/my/mysql into donna.mysql.com:/home/my/bk/mysql 2001-01-25 22:38:53 +02:00
monty@donna.mysql.com
e2a8a99d01 Lots of manual changes
Changed 'static inline' to 'inline' for SCO new's compiler
2001-01-25 22:38:26 +02: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
monty@donna.mysql.com
b3392db290 Fixes for OSF1
Made test more reliable on slow machines
2001-01-22 15:33:34 +02:00
monty@donna.mysql.com
0f28f7a414 keep bk happy 2001-01-22 04:46:32 +02:00
sasha@mysql.sashanet.com
d0f4235a2e rpl000016.test sync
rpl000001.result	BitKeeper file /home/sasha/src/bk/mysql/mysql-test/r/rpl000001.result
ignore  	Added BitKeeper/tmp/bkr3sAHD to the ignore list
slave.h 	MASTER_POS_WAIT
lex.h   	MASTER_POS_WAIT
slave.cc	MASTER_POS_WAIT, do automagic restart on debugging abort, skip rotate events in 
slave.cc	debug abort count
sql_repl.cc	announce the log name at the start of the log with a fake rotate event
item_create.h	MASTER_POS_WAIT
item_func.cc	MASTER_POS_WAIT
item_func.h	MASTER_POS_WAIT
sql_class.h	enter_cond(), exit_cond() helper inliners
item_create.cc	added MASTER_POS_WAIT
mysql-test-run.sh	speed improvement fixes
rpl000007.test	sync
rpl000003.test	sleep -> sync
rpl000004.test	sleep -> sync, fixed clean up bug
rpl000014.test	sync
rpl000009.test	sync
rpl000013.test	sync
rpl000001.test	sleep -> sync
rpl000008.test	sync
rpl000006.test	sync on cleanup
rpl000011.test	sync
rpl000012.test	sync
rpl000005.test	sleep -> sync
rpl000010.test	sync
rpl000015.test	sync
rpl000002.test	sleep -> sync
rpl000014.result	we now know the master log name as soon as we connect
mysql.cc	added optional agrument to --wait
mysqltest.c	added save_master_pos and sync_with_master commands
2001-01-17 05:47:33 -07:00
sasha@mysql.sashanet.com
d9d49dfa44 client/mysqltest.c
fixed bug that created empty result files in no-record mode
mysql-test/t/rpl000007.test
    testing non-replication of load data infile when the table is excluded from replication
mysql-test/t/rpl000016.test
    test purge master logs
sql/slave.cc
    fix memory leaks found by  purge master logs test
sql/sql_repl.cc
    fixed race condition and delete before close bug in reset_slave()

Overall comments - coverage testing is a very good thing!
2000-12-14 20:17:18 -07:00
sasha@mysql.sashanet.com
b63444de1b client/mysqltest.c
added system command
myisammrg/myrg_open.c
    fixed coredump when opening an empty union table
sql/sql_repl.cc
    fixed warnings, remove confusing comment, fixed coredump in
    change master to when master.info was corrupted

added new replication test case
2000-12-14 17:43:13 -07:00
sasha@mysql.sashanet.com
6b004aa730 fixed 2000-12-13 09:58:26 -07:00
sasha@mysql.sashanet.com
3417aa25ad sql/sql_repl.cc
last fix in send_file() was wrong
2000-12-11 13:09:01 -07:00
sasha@mysql.sashanet.com
c8a915880b I hope I've fixed all the bugs by now, let's test it 2000-12-11 12:06:34 -07:00
sasha@mysql.sashanet.com
3cf810222a fixed up leaks found by --exit-info=256
better error diagnostic in SLAVE START
2000-12-09 14:28:51 -07:00
sasha@mysql.sashanet.com
2cd21162ca sql/mysqld.cc
fixed auto set of server id
sql/sql_repl.cc
    do not allow slave to replicate if master id was not supplied
sql/sql_repl.h
    fix for server_id
2000-12-08 12:50:57 -07:00
sasha@mysql.sashanet.com
a9ef0b4bf1 slave master.info FILE -> IO_CACHE
send_file() is more stack-friendly - changed large static buffer to alloc_root()
fixed my_b_seek() to work with WRITE_CACHE
test case to make sure the slave starts correctly after being stopped
truncated words file so the replication tests will take less time
2000-11-24 19:49:13 -07:00
sasha@mysql.sashanet.com
46400961f7 mysql-test/mysql-test-run
cleanup - remove unneeded daeamon restarts
sql/log_event.cc
    fixed bug - do not confuse confused slaves even further if they try to 
    read less than LOG_EVENT_HEADER_LEN before the end of file
sql/mysqlbinlog.cc
    give error if constructor fails
sql/mysqld.cc
    --disconnect-slave-event-count for replication debugging
sql/slave.cc
    --disconnect-slave-event-count
    cleanup to remove unneeded sleeps when things go wrong - sleep only 
    when we have to
sql/slave.h
    --disconnect-slave-event-count

test cases for ALTER TABLE ORDER BY and replication offset off by 22 
confusion mystery bug (both pass)
2000-11-22 00:23:31 -07:00
sasha@mysql.sashanet.com
be2a121e31 sql/log.cc
fixed bug in find_first_log
sql/mysqlbinlog.cc
    flose file only if we opened it
sql/slave.cc
    changed spacing
sql/sql_repl.cc
    fixed error message
2000-11-16 17:48:13 -07:00
monty@donna.mysql.com
a9097ca323 changed to use IO_CACHE instead of FILE 2000-11-16 03:58:58 +02:00
monty@narttu.mysql.fi
b689a1a752 merge 2000-11-16 00:24:11 +02:00
monty@narttu.mysql.fi
e69becf133 changed to use IO_CACHE instead of FILE 2000-11-15 23:00:06 +02:00
sasha@laptop.slkc.uswest.net
57093008c6 laptop commit 2000-11-11 14:57:35 -07:00
sasha@mysql.sashanet.com
2b05ed9d02 sql/item_strfunc.cc
fixed coredump in concat_ws
sql/item_strfunc.h
    fixed coredump in concat_ws
sql/mini_client.cc
    added mc_mysql_error()
sql/mini_client.h
    added mc_mysql_errno()
sql/mysqlbinlog.cc
    fixed bug in --postion for local files
sql/slave.cc
    more verbose message on bad net reads
sql/sql_repl.cc
    send errno on error in mysql_binlog_send
2000-11-06 19:39:13 -07:00
sasha@mysql.sashanet.com
67eef6a571 sql/slave.cc
mutex now initialized in the constructor
sql/sql_class.h
    intialize MASTER_INFO mutex in the constructor
sql/sql_repl.cc
    fixed typo in error message
    if the user does not specify offset in CHANGE MASTER TO, set it to skip magic number
repl-tests/test-repl-ts/repl-timestamp.master.reject
    New BitKeeper file ``repl-tests/test-repl-ts/repl-timestamp.master.reject''
2000-11-03 19:31:22 -07:00
sasha@mysql.sashanet.com
75cd25a579 fixed --skip-slave-thread bug
added PURGE MASTER LOGS TO and SHOW MASTER LOGS
fixed the output of SHOW MASTER STATUS
updated docs
2000-10-26 22:11:55 -06:00
monty@donna.mysql.com
7ac13c89e6 Fix of LEFT JOIN optimizer bug, problem with key cache on Windows and
a lot of portability issues.
2000-10-14 03:16:35 +03:00
sasha@mysql.sashanet.com
f452ab6f90 sql/log.cc
Added magic number to binlog
sql/log_event.cc
    distinquish bogus data from truncated logs
sql/log_event.h
    added magic number
    added LOG_READ_TRUNC error
sql/mysqlbinlog.cc
    fixed to handle magic number
    added O_BINARY to my_fopen
sql/mysqld.cc
    added code for replicate-rewrite-db
sql/slave.cc
    replicate-rewrite-db
    O_BINARY
    handle magic
sql/sql_class.h
    added i_string_pair class
sql/sql_repl.cc
    added magic
    better error messages
support-files/magic
    added magic for binlog

Added test case for replication of queries with error
2000-10-05 17:58:16 -06:00
monty@donna.mysql.com
a7c5cc01b3 Small fixes 2000-10-05 01:00:36 +03:00
sasha@mysql.sashanet.com
204ae84732 fixed mutex bug ( or lack of it) when reading log entries on COM_BINLOG_DUMP
added error_code to query event, and checking to see if we get the
expected error on the slave
removed obsolete code from slave.cc
2000-10-03 19:53:13 -06:00
sasha@mysql.sashanet.com
d7659f6063 skip updates with the same server id as self
kill zombie COM_BINLOG_DUMP with the same server id on connect
2000-10-02 17:59:12 -06:00
sasha@mysql.sashanet.com
cb4749d684 fixed compile error 2000-10-01 22:52:36 -06:00
sasha@mysql.sashanet.com
738358e139 added sql_repl.* officially - fixing an oops - forgot to actually add
it earlier
2000-10-01 21:28:21 -06:00