Bug #11723 | update with join fails or crash slave when in replication | ||
---|---|---|---|
Submitted: | 4 Jul 2005 14:11 | Modified: | 30 Aug 2005 20:33 |
Reporter: | jerry nieuviarts | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 4.1.6 to 4.1.12 | OS: | Linux (linux mandrake 10.2) |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[4 Jul 2005 14:11]
jerry nieuviarts
[4 Jul 2005 17:00]
MySQL Verification Team
I was unable to repeat this issue with both servers built from BK source: mysql> update mots join (select sum(occurrence) as occu,idmot from -> liaision_mot_recherche group by idmot) as tmp on mots.id=idmot set -> occurrence=occu -> ; Query OK, 5 rows affected (0.03 sec) Rows matched: 5 Changed: 5 Warnings: 0 mysql> show master status\G *************************** 1. row *************************** File: hegel-bin.000001 Position: 2945 Binlog_Do_DB: Binlog_Ignore_DB: 1 row in set (0.00 sec) mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: localhost Master_User: miguel Master_Port: 3306 Connect_Retry: 60 Master_Log_File: hegel-bin.000001 Read_Master_Log_Pos: 2945 Relay_Log_File: hegel-relay-bin.000001 Relay_Log_Pos: 2628 Relay_Master_Log_File: hegel-bin.000001 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 2945 Relay_Log_Space: 2628 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 1 row in set (0.00 sec) mysql>
[4 Jul 2005 20:54]
jerry nieuviarts
Do you want me to give you some extra report ?
[12 Jul 2005 8:46]
jerry nieuviarts
when i issue a process list, here is the output | 3 | system user | | shopper2 | Connect | 1290 | Opening tables | update produit join (select idproduit ,min(prix) as min_prix,count(*) as nbr_prix from prix where valide=1 and bundle=0 and idproduit>0 and prix>0 group by idproduit) as table_prix on produit.idproduit=table_prix.idproduit set produit.prix=table_prix.min_prix,produit.nombreprix=table_prix.nbr_prix And the slave thread keep locked on "opening tables"
[25 Jul 2005 10:59]
jerry nieuviarts
Happy to see the bug have been reopened. The problem is still here. I can do test for you if necessary
[15 Aug 2005 20:48]
jerry nieuviarts
I have tested the 4.1.13 built and we came back to initial bug ie : the replication don't crash but the update don't modify anything. Thus, if we send the query manually on the slaven, everything works fine.
[30 Aug 2005 17:49]
MySQL Verification Team
I still was unable to repeat the test case provide: master >INSERT INTO `mots` VALUES (10, 'tous', 412); Query OK, 1 row affected (0.02 sec) master >update mots join (select sum(occurrence) as occu,idmot from -> liaision_mot_recherche group by idmot) as tmp on mots.id=idmot set -> occurrence=occu; Query OK, 5 rows affected (0.02 sec) Rows matched: 5 Changed: 5 Warnings: 0 master >select version(); +------------------+ | version() | +------------------+ | 4.1.15-debug-log | +------------------+ 1 row in set (0.00 sec) slave >show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: localhost Master_User: miguel Master_Port: 3306 Connect_Retry: 60 Master_Log_File: hegel-bin.000004 Read_Master_Log_Pos: 2685 Relay_Log_File: hegel-relay-bin.000001 Relay_Log_Pos: 2653 Relay_Master_Log_File: hegel-bin.000004 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: mysql.% Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 2685 Relay_Log_Space: 2653 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 1 row in set (0.00 sec) slave >show processlist\G *************************** 1. row *************************** Id: 1 User: root Host: localhost db: db1 Command: Query Time: 0 State: NULL Info: show processlist *************************** 2. row *************************** Id: 2 User: system user Host: db: NULL Command: Connect Time: 614 State: Waiting for master to send event Info: NULL *************************** 3. row *************************** Id: 3 User: system user Host: db: NULL Command: Connect Time: 406 State: Has read all relay log; waiting for the slave I/O thread to update it Info: NULL 3 rows in set (0.00 sec) slave >select version(); +------------------+ | version() | +------------------+ | 4.1.15-debug-log | +------------------+ 1 row in set (0.00 sec) If you can provide your my.cnf files I will test again, maybe some configuration variable is masking my test. Thanks in advance.
[30 Aug 2005 19:33]
jerry nieuviarts
It seems that this is the same bug as : http://bugs.mysql.com/?id=12618 and this one as a test file that have been used to reproduce the bug by the mysql team. Perhaps you could check it.
[30 Aug 2005 20:33]
MySQL Verification Team
Yes the bug http://bugs.mysql.com/?id=12618 I got the behavior you reported, my slave client hanged when doing the select query. However you test case I was unable to repeat.