Commit graph

243 commits

Author SHA1 Message Date
guilhem@mysql.com
9c73d91d54 WL#912 (more user control on relay logs):
FLUSH LOGS now rotates relay logs,
and a new variable max_relay_log_size.
Plus a very small bit of code cleaning.
2003-07-06 17:59:54 +02:00
guilhem@mysql.com
ace8a06323 I committed the same changeset in my tree yesterday, but broke the tree since,
so I commit again in a fresh tree.
Fix for bug#763 (Relay_log_space too big by 4 bytes),
plus comments and DBUG_PRINT, and we don't start replication
if --bootstrap.
2003-07-03 01:08:36 +02:00
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
monty@mashka.mysql.fi
048d545a58 Code/testcase cleanups 2003-07-01 13:29:55 +03:00
monty@narttu.mysql.fi
28e96d95c5 Simple code cleanup 2003-06-23 20:05:54 +03:00
guilhem@mysql.com
4deb135b0b Changed change_master() to use ER_MASTER_INFO (better display). 2003-06-17 23:19:38 +02:00
guilhem@mysql.com
3f33f17114 Fix for nightly build test failure (test update).
More messages.
Testcase for bug 651.
2003-06-16 15:49:54 +02:00
guilhem@mysql.com
80edc81ed0 Simplified a test.
thd->enter_cond() and exit_cond(), so that the I/O thread accepts to stop
when it's waiting for relay log space.
Reset ignore_log_space_limit to 0 when the SQL thread terminates.
2003-06-15 12:01:51 +02:00
guilhem@mysql.com
28d3c3d76f - Fix for bug 651: now a dying SQL slave threads wakes up any waiting MASTER_POS_WAIT().
Could not add a testcase for this: if the test goes into a MASTER_POS_WAIT, it waits
until this terminates (even doing "connection other_con" to launch "stop slave" is blocked).
- In MASTER_POS_WAIT() don't test if the I/O slave is running, but if the SQL thread
is running.
- Some DBUG info for this bugfix.
2003-06-14 16:40:00 +02:00
guilhem@mysql.com
96c8d91a0c More error messages. This is intended to help debugging; presently I have a
support issue with an unclear message which can have N reasons for appearing.
This should help us know at which point it failed, and get the errno when
my_open was involved (as the reason for the unclear message is often a
permission problem).
RESET SLAVE resets last_error and last_errno in SHOW SLAVE STATUS (without this,
rpl_loaddata.test, which is expected to generate an error in last_error, influenced
rpl_log_pos.test).
A small test update.
Added STOP SLAVE to mysql-test-run to get rid of several stupid error messages
which are printed while the master restarts and the slave attempts/manages to
connect to it and sends it nonsense binlog requests.
2003-06-10 23:29:49 +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
0058593c2d Test for bug 578. And a comment in slave.cc. 2003-06-05 17:02:00 +02:00
guilhem@mysql.com
4a80a6c7b9 One-line fix for bug 576 (DBUG_ASSERT failure when using CHANGE MASTER TO RELAY_LOG_POS=4).
Plus a changeset which I had committed but forgot to push (and this changeset is lost on
another computer, so I recreate it here). This changeset is "user-friendly SHOW BINLOG EVENTS
and CHANGE MASTER TO when log positions < 4 are used.
2003-06-03 23:13:06 +02:00
guilhem@mysql.com
4d5ae1d37c Clearer error message (in the customer's case, the relay log was corrupted,
not the master's binlog) (SW 1571).
2003-06-02 17:30:47 +02:00
guilhem@mysql.com
cf3cda2778 Removed bad mutex locking 2003-05-27 18:16:50 +02:00
guilhem@mysql.com
9ed9ad5374 - Fix for memory leak if the SQL slave thread is killed just after reading an event.
- A few more mutex locks and unlocks of rli.log_space_lock for doing clean reads of
rli.ignore_log_space_limit
- Broadcast after unlock, not before (small speed optimisation).
2003-05-25 23:09:46 +02:00
greg@mysql.com
24968f1ee3 Changes from Novell for NetWare platform 2003-04-24 20:48:54 -04: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
monty@mashka.mysql.fi
8edc752573 Simple fixes (nothing notable) 2003-03-12 01:40:06 +02:00
monty@narttu.mysql.fi
fae2711297 merge 2003-03-10 14:13:46 +02:00
monty@narttu.mysql.fi
e98a4473b4 Fix that round(0.1,1) == round(0.1,1) 2003-03-10 12:00:19 +02:00
guilhem@mysql.com
c6f241636f Clearer error message when one forgot to grant REPLICATION SLAVE :
now we'll have something like this :
030308 18:46:58  Slave I/O thread: connected to master 'gb@localhost:3306',  replication started in log 'FIRST' at position 4
030308 18:46:58  While trying to obtain the list of slaves from the master 'localhost:3306', user 'gb' got the following error: 'Access denied. You need the REPLICATION SLAVE privilege for this operation'
030308 18:46:58  Slave I/O thread exiting, read up to log 'FIRST', position 4
instead of "Error updating slave list: Query error".
This fixes bug #80.
2003-03-08 18:53:32 +01:00
guilhem@mysql.com
6b4f438ddb Replication: small bug fixes in mysql-test-run.sh and in replication code (more reinitializations)
+ fix for #70 
+ test result fix for LOAD DATA LOCAL bug #82
2003-03-03 14:57:02 +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@narttu.mysql.fi
a0d2a621ed Added detection if pthread_attr_getstacksize() exists
Fixed bug in RAND() usage in mysqlbinlog
2003-02-27 17:35:51 +02:00
monty@mashka.mysql.fi
cf9668fd37 Added START TRANSACTION syntax
Added ALL as parameter option for all group functions.
Make join handling uniform. This allows us to use ',', JOIN and INNER JOIN the same way.
Sort NULL last if DESC is used (ANSI SQL 99 requirement)
2003-02-06 16:55:59 +02: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
fb4572a498 Merge with 3.23 to get bug fix for SHOW PROCESSLIST + running thread 2003-01-19 01:31:43 +02:00
monty@mashka.mysql.fi
dd4d4cc8b5 Only set thd->query to 0 if LOCK_thread_count is hold
This fixes a possible core dump problem in SHOW PROCESSLIST
2003-01-18 23:38:55 +02:00
monty@mashka.mysql.fi
89ef355b9e Fix for bug in LOAD DATA INFILE and replication
Fix for SHOW VARIABLES in embedded server
2003-01-08 11:24:39 +02:00
monty@mashka.mysql.fi
ee59eb2418 Portability fixes
Fixed test suite for HPUX 10.20 and MacOSX
2003-01-07 16:53:10 +02:00
monty@mashka.mysql.fi
b5aa9ae0c7 Changed thd variables max_join_size and select_limit to type ha_rows.
This fixed some optimization problems when using -DBIG_TABLES
Portabilty fixes for OpenUnix and HPUX
Added C and C++ version numbers to mysqlbug
2002-12-20 14:58:27 +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.
890b39bb68 merge 2002-11-07 12:49:01 +02:00
monty@hundin.mysql.fi
65badfff1a Put temporary files in binlog cache when using BEGIN/COMMIT
Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions
New variables @@rand_seed1 and @@rand_seed2 (used by replication)
DROP TEMPORARY TABLE
2002-11-07 04:02:37 +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@hundin.mysql.fi
2bcd60e113 Merge 2002-10-31 10:44:20 +02:00
monty@mashka.mysql.fi
5343d4c969 Added --skip-safemalloc to mysqltest
Added bug fix from 3.23 for AIX 4.3.3 and gcc 3.x
Small change in EXCHANGE output
Propagate open-files-limit from mysqld_safe -> mysqld
Fixed speed bug in GROUP BY
Added quotes around database name in CREATE DATABASE db_name (for binary log)
2002-10-29 22:56:30 +02:00
monty@hundin.mysql.fi
1e0538324d Added back old LARGEFILE handling
Fixed reference to freed memory in acl_init()/grant_init()
Fixed possible memory leak. (Could only happen in very strange circumstances)
Fixed bug in ALTER TABLE with BDB tables
Updated mysql-test for valgrind
2002-10-29 21:59:03 +02:00
monty@mashka.mysql.fi
755d4952af Change name -> alias in TABLE_LIST.
Added missing mutex-lock around critical section in GRANT handling.
2002-09-21 21:36:23 +03:00
monty@mashka.mysql.fi
cb8580a2cd Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name.
This should fix some issues where --lower-case-table-names doesn't work properly under windows.
2002-09-20 14:05:18 +03: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
0281a6b160 Fixed searching after ssl directories.
Fixed that GRANT ... REQUIRE options are not forgot when doing new GRANT
Changed fn_ext to point at first '.' after directory.
FLUSH LOGS removed numerical extension for all future update logs.
Fixed the mysqld --help reports right values for --datadir and --bind-address
--log-binary=a.b.c now properly strips of .b.c
Fix that one can DROP UDF functions that was not loaded at startup
Made AND optional in REQUIRE
Added REQUIRE NONE
2002-09-05 16:17:08 +03:00
miguel@hegel.br
8c71a53b9c Small fixes 2002-08-27 10:55:12 -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@hundin.mysql.fi
a5edb20042 Fixed timing problem with rpl000001 replication test.
Fixed configure problems with HPUX and openbsd
SHOW SLAVE STATUS returns empty set if slave is not initialized
SHOW MASTER STATUS returns empty set if binary logging is not enabled.
Fixed shutdown problem on Solaris.
2002-08-18 16:04:26 +03:00