Strange replication bug

Strange replication bug

am 23.06.2003 11:54:30 von lars-goran.forsberg

------=_NextPart_000_00A4_01C3397E.3495F050
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hi!

I seem to have encountered a strange bug on the slave in version 4.0.13.
I am running a simple client that is inserting and updating a table on the
master while the slave replication threads are stopped. After it has been
running for 10-15 minutes I execute FLUSH LOGS a couple of times on
the master. After this I stop the client, and execute START SLAVE on the
slave database. Everything seems to be replicated just fine. All queries
are copied to the relay log quite fast. The slave SQL thread lags behind
a bit, which also seem normal. When the slave SQL thread gets close to
beginning execution in a new master log file however, it seems to go
crazy. The slave mysqld process begins to hog lots of CPU power, and
the slave SQL thread slows down to VERY slow pace on the SQL query
exectution. We have seen this problem on both Windows 2000 and HP-UX 11i,
using the official MySQL binaries.

I have attached output from the mysql client on the slave database, where
I have been executing SHOW SLAVE STATUS 5-20 seconds apart. Before the
output included in the file, it has been replicating for quite a while
without any problems. The output is from just before it starts to go crazy
until it has replicated up to date. When the replication is done, the slave
mysqld process no longer hogs the CPU.

I hope you can reproduce the problem from this information. I have been
able to reproduce the problem 4 of 5 attempts on my Windows 2000 workstation
when I tested today.

Regards,
Lars-Göran Forsberg

------=_NextPart_000_00A4_01C3397E.3495F050
Content-Type: text/plain;
name="slave_status.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="slave_status.txt"

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 82530201 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 82191876 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 91716633 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 91378308 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.01 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889177 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95550852 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889177 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95550852 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889274 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95550949 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889274 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95550949 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889371 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95551046 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889371 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95551046 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889468 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95551143 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889565 | query-bin.030
| Yes | Yes | |
| 0 | | 0 | 95551240 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889742 | query-bin.031
| Yes | Yes | |
| 0 | | 0 | 4 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889742 | query-bin.031
| Yes | Yes | |
| 0 | | 0 | 4 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95889919 | query-bin.032
| Yes | Yes | |
| 0 | | 0 | 4 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95890016 | query-bin.032
| Yes | Yes | |
| 0 | | 0 | 101 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95890193 | query-bin.033
| Yes | Yes | |
| 0 | | 0 | 4 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95890193 | query-bin.033
| Yes | Yes | |
| 0 | | 0 | 4 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95890290 | query-bin.033
| Yes | Yes | |
| 0 | | 0 | 101 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95890387 | query-bin.033
| Yes | Yes | |
| 0 | | 0 | 198 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)

mysql> show slave status;
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| Master_Host | Master_User | Master_Port | Connect_retry | =
Master_Log_File | Re
ad_Master_Log_Pos | Relay_Log_File | Relay_Log_Pos | =
Relay_Master_Log_File
| Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | =
Replicate_ignore_db
| Last_errno | Last_error | Skip_counter | Exec_master_log_pos | =
Relay_log_space
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
| 127.0.0.1 | root | 3306 | 30 | =
query-bin.033 | 29
6 | ksd-42-relay-bin.004 | 95890485 | query-bin.033
| Yes | Yes | |
| 0 | | 0 | 296 | =
95890485
|
+-------------+-------------+-------------+---------------+- -------------=
---+---
------------------+----------------------+---------------+-- -------------=
-------
-+------------------+-------------------+-----------------+- -------------=
-------
+------------+------------+--------------+------------------ ---+---------=
-------
-+
1 row in set (0.00 sec)



------=_NextPart_000_00A4_01C3397E.3495F050
Content-Type: text/plain; charset=us-ascii

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
------=_NextPart_000_00A4_01C3397E.3495F050--

Re: Strange replication bug

am 23.06.2003 13:18:41 von Sinisa Milivojevic

Lars-Göran Forsberg writes:
> Hi!
>=20
> I seem to have encountered a strange bug on the slave in version 4.0.=
13.
> I am running a simple client that is inserting and updating a table o=
n the
> master while the slave replication threads are stopped. After it has =
been
> running for 10-15 minutes I execute FLUSH LOGS a couple of times on
> the master. After this I stop the client, and execute START SLAVE on =
the
> slave database. Everything seems to be replicated just fine. All quer=
ies
> are copied to the relay log quite fast. The slave SQL thread lags beh=
ind
> a bit, which also seem normal. When the slave SQL thread gets close t=
o
> beginning execution in a new master log file however, it seems to go
> crazy. The slave mysqld process begins to hog lots of CPU power, and
> the slave SQL thread slows down to VERY slow pace on the SQL query
> exectution. We have seen this problem on both Windows 2000 and HP-UX =
11i,
> using the official MySQL binaries.
>=20


[skip]

> I have attached output from the mysql client on the slave database, w=
here
> I have been executing SHOW SLAVE STATUS 5-20 seconds apart. Before th=
e
> output included in the file, it has been replicating for quite a whil=
e
> without any problems. The output is from just before it starts to go =
crazy
> until it has replicated up to date. When the replication is done, the=
slave
> mysqld process no longer hogs the CPU.
>=20
> I hope you can reproduce the problem from this information. I have be=
en
> able to reproduce the problem 4 of 5 attempts on my Windows 2000 work=
station
> when I tested today.
>=20
> Regards,
> Lars-Göran Forsberg

Hi!

This list is dedicated to reproducible test cases, and based on the
above we can not reproduce a problem.

We require all settings and all queries that are run.

--=20

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=3Dm=
smi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic >
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinat=
or
<___/ www.mysql.com Larnaca, Cyprus


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs@m.gmane.org