Re: Replication bug?
Logan, David (SST - Adelaide) [EMAIL PROTECTED] wrote: We are trying to put a monitoring solution in place at a client and have come up against something during testing. If the replication user disappears off the master and the slave cannot log in, the Slave_IO_Thread still shows running and no error in the last error number field. Does anybody know if this is intentional? I can't find any references to this in the doco. We will check. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Replication bug?
Yes, I confirm, it's a bug. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Replication bug?
David, I haven't ever attempted to delete the slave user on the master, and since I only run replication on 4.1 boxes and not 4.0 boxes, I won't be able to help much. But I would probably submit it to http://bugs.mysql.com and they can verify that it is a bug. But they will probably not recommend deleting the slave user again. :) Donny -Original Message- From: Logan, David (SST - Adelaide) [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 8:53 PM To: MySQL List Subject: Replication bug? Hi Folks, We are trying to put a monitoring solution in place at a client and have come up against something during testing. If the replication user disappears off the master and the slave cannot log in, the Slave_IO_Thread still shows running and no error in the last error number field. Does anybody know if this is intentional? I can't find any references to this in the doco. This is MySQL 4.0.20 and RH Advanced Server 2.1 After deleting the user on the master, the following message appears in the log but the slave status shows a healthy relationship. 40902 10:54:13 Slave I/O thread: error connecting to master '[EMAIL PROTECTED]:3307': Error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' errno: 1045 mysql show slave status \G *** 1. row ** Master_Host: hpim202-98.aus.hp.com Master_User: repl Master_Port: 3307 Connect_retry: 60 Master_Log_File: hpim202-98-bin.001 Read_Master_Log_Pos: 913879 Relay_Log_File: MAU023W-relay-bin.010 Relay_Log_Pos: 305 Relay_Master_Log_File: hpim202-98-bin.001 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_do_db: Replicate_ignore_db: Last_errno: 0 Last_error: Skip_counter: 0 Exec_master_log_pos: 913879 Relay_log_space: 301 1 row in set (0.00 sec) Regards David Logan Database Administrator HP Managed Services 139 Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: replication bug? - replace into db.table being recorded in the
On Tuesday 04 March 2003 22:34, Andrew Braithwaite wrote: This is quite an involved one... Using MySQL 4.0.11 on linux I have two logical db's on the same machine, lets say db1 and db2. I have perl apps doing the following: replace into db2.tablename . In my.cnf I have the line binlog-do-db= db1 The queries are being performed OK on db2, but they're being included in the replication bin-log. I also have inserts in the similar form of insert into db2.tablename . that work fine and don't show up in the same bin-log! Any ideas? Is this a bug? No, it's not a bug. From the manual: Tells the master that it should log updates to the binary log if the current (i.e. selected) database is 'database_name'. All others databases which are not explicitly mentioned are ignored. Note that if you use this you should ensure that you only do updates in the current database. So, if your current database is db1 and you do REPLACE on db2 this command is also written to the binary logs. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication bug?
On Mon, Jan 13, 2003 at 09:41:12AM +1000, Jason Brooke wrote: No, I've been ignored on this problem for 18 months now, for some reason. Quite peculiar. The limitations of replicate-do-db are documented in: http://www.mysql.com/doc/en/Replication_Options.html I found out about this limitation the hard way, just like you seem to have done. Since we don't control the scripts that use the database, we couldn't use replicate-do-db. It just takes too much time to fix the problems when someone forgets about this limitation. Regards, Fred. - Original Message - From: Ross Davis - DataAnywhere.net [EMAIL PROTECTED] To: 'Jason Brooke' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, January 13, 2003 9:16 AM Subject: RE: Replication bug? Did you ever get any confirmation that it will be added to the official bug list? -Original Message- From: Jason Brooke [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 3:14 AM To: Ross Davis - DataAnywhere.net Cc: [EMAIL PROTECTED] Subject: Re: Replication bug? Yes this is the same issue I've reported previously. Unless literally 'select' the database, the query is never written to the binary log. - Original Message - From: Ross Davis - DataAnywhere.net [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 12, 2003 12:38 PM Subject: Replication bug? I think I have found a replication bug. We are using Mysql-Max 3.23.53 in a master and multiple slave situation. That is working fine. We are using InnoDB We have found a workaround to the problem but I thought you should know about it. We have 2 databases on the system call them dba and dbb. If I have a connection to dba and and then run the following query the update happens on the master but not on the slaves!!! replace into dbb.tablename set field='somevalue' ... The key to the problem is not the replace into, but the fact that we are connected to one database and working on another. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Fred van Engen XB Networks B.V. email: [EMAIL PROTECTED]Televisieweg 2 tel: +31 36 5462400 1322 AC Almere fax: +31 36 5462424 The Netherlands - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Replication bug?
I don't think I have anything that should cause this. Here is my my.ini from the the slave. The tables that are being excluded are not listed. [mysqld] basedir=C:/mysql datadir=C:/mysql/data set-variable=max_allowed_packet=16M log-slave-updates log-bin # Replication variables master-host=x.x.x.x master-user=sasassas master-password=x master-port=3306 server-id=2 # Exclude some tables that we don't want here! replicate-wild-ignore-table=ra_scanner.system replicate-wild-ignore-table=ra_scanner.local_scan_log - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication bug?
Yes this is the same issue I've reported previously. Unless literally 'select' the database, the query is never written to the binary log. - Original Message - From: Ross Davis - DataAnywhere.net [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 12, 2003 12:38 PM Subject: Replication bug? I think I have found a replication bug. We are using Mysql-Max 3.23.53 in a master and multiple slave situation. That is working fine. We are using InnoDB We have found a workaround to the problem but I thought you should know about it. We have 2 databases on the system call them dba and dbb. If I have a connection to dba and and then run the following query the update happens on the master but not on the slaves!!! replace into dbb.tablename set field='somevalue' ... The key to the problem is not the replace into, but the fact that we are connected to one database and working on another. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Replication bug?
Yes, the slaves are doing the replication. (didn't know you could set it up any other way) As far as I am concerned this is a BIG bug. Anything that happens on the master should replicate to the slaves. Any chance this could get fixed in the next release? -Original Message- From: Frederick R. Doncillo [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 11, 2003 10:58 PM To: Ross Davis - DataAnywhere.net Cc: [EMAIL PROTECTED] Subject: Re: Replication bug? Are the slaves doing the replication process? If not, you may try it that way. Slaves should do the updating and must request from the server and not the server to the slave. :-) Fred. Ross Davis - DataAnywhere.net wrote: I think I have found a replication bug. We are using Mysql-Max 3.23.53 in a master and multiple slave situation. That is working fine. We are using InnoDB We have found a workaround to the problem but I thought you should know about it. We have 2 databases on the system call them dba and dbb. If I have a connection to dba and and then run the following query the update happens on the master but not on the slaves!!! replace into dbb.tablename set field='somevalue' ... The key to the problem is not the replace into, but the fact that we are connected to one database and working on another. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication bug?
No, I've been ignored on this problem for 18 months now, for some reason. Quite peculiar. - Original Message - From: Ross Davis - DataAnywhere.net [EMAIL PROTECTED] To: 'Jason Brooke' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, January 13, 2003 9:16 AM Subject: RE: Replication bug? Did you ever get any confirmation that it will be added to the official bug list? -Original Message- From: Jason Brooke [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 12, 2003 3:14 AM To: Ross Davis - DataAnywhere.net Cc: [EMAIL PROTECTED] Subject: Re: Replication bug? Yes this is the same issue I've reported previously. Unless literally 'select' the database, the query is never written to the binary log. - Original Message - From: Ross Davis - DataAnywhere.net [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 12, 2003 12:38 PM Subject: Replication bug? I think I have found a replication bug. We are using Mysql-Max 3.23.53 in a master and multiple slave situation. That is working fine. We are using InnoDB We have found a workaround to the problem but I thought you should know about it. We have 2 databases on the system call them dba and dbb. If I have a connection to dba and and then run the following query the update happens on the master but not on the slaves!!! replace into dbb.tablename set field='somevalue' ... The key to the problem is not the replace into, but the fact that we are connected to one database and working on another. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication bug?
Are the slaves doing the replication process? If not, you may try it that way. Slaves should do the updating and must request from the server and not the server to the slave. :-) Fred. Ross Davis - DataAnywhere.net wrote: I think I have found a replication bug. We are using Mysql-Max 3.23.53 in a master and multiple slave situation. That is working fine. We are using InnoDB We have found a workaround to the problem but I thought you should know about it. We have 2 databases on the system call them dba and dbb. If I have a connection to dba and and then run the following query the update happens on the master but not on the slaves!!! replace into dbb.tablename set field='somevalue' ... The key to the problem is not the replace into, but the fact that we are connected to one database and working on another. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: REPLICATION BUG
The bug manifests itself in the following situation. A temporary table has been created on the master server. A query is executed using an alias for that temporary table. The connection is dropped without explicitly dropping that temporary table. In the binary log, mysql records a drop of the temporary table using the table alias. When the replication server reads this command, it is unaware of a table of this name and replication is dropped. ... Release: mysql-3.23.41 (Source distribution) This bug seems to have been fixed in 3.23.46. From the change log: --- D.2.2 Changes in release 3.23.46 Fixed problem with aliased temporary tables replication --- / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: replication bug
False alarm!! Turns out one of my engineers was using 'LOAD DATA INTO TABLE' instead of inserts. Thanks for all of the replies. - Original Message - From: Will French [EMAIL PROTECTED] To: Gabe E. Nydick [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 10:11 AM Subject: RE: replication bug I assume that you have already scanned the MySQL manual section 4.10.4 Replication Features and Known Problems to see if anything listed there as a problem is relevant to your situation. I found a couple of gotchas there that caused me some problems. -Original Message- From: Gabe E. Nydick [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 12:44 PM To: [EMAIL PROTECTED] Subject: Re: replication bug I have found that if I do manual changes to the table, it replicates. If the applications my company wrote make changes, they don't replicate. I am having the programmers find where they went sloppy. - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Gabe E. Nydick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 12:47 AM Subject: Re: replication bug On Tue, Sep 18, 2001 at 10:17:26PM -0700, Jeremy Zawodny wrote: On Tue, Sep 18, 2001 at 09:54:51PM -0700, Gabe E. Nydick wrote: I have a large set of tables that are 1-way replicating to an identical machine as the master db, and for some reason 1 table doesn't make it into the binary log. Why would updates to 1 specific table not make it into the binary log? What's the relvant section of your my.cnf file on the master look like? Just bin-log, or is there more there? Err, log-bin, not bin-log. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 13 days, processed 242,448,830 queries (213/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: replication bug
On Tue, Sep 18, 2001 at 10:17:26PM -0700, Jeremy Zawodny wrote: On Tue, Sep 18, 2001 at 09:54:51PM -0700, Gabe E. Nydick wrote: I have a large set of tables that are 1-way replicating to an identical machine as the master db, and for some reason 1 table doesn't make it into the binary log. Why would updates to 1 specific table not make it into the binary log? What's the relvant section of your my.cnf file on the master look like? Just bin-log, or is there more there? Err, log-bin, not bin-log. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 13 days, processed 242,448,830 queries (213/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: replication bug
server-id=1 log-bin=/usr/local/mysql-3.23.39/bin-log/db1-bin those are the only replication settings. Have you possibly heard of bad programming practices in Perl/DBI that would cause a query not to make it into the bin-log? - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Gabe E. Nydick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 12:47 AM Subject: Re: replication bug On Tue, Sep 18, 2001 at 10:17:26PM -0700, Jeremy Zawodny wrote: On Tue, Sep 18, 2001 at 09:54:51PM -0700, Gabe E. Nydick wrote: I have a large set of tables that are 1-way replicating to an identical machine as the master db, and for some reason 1 table doesn't make it into the binary log. Why would updates to 1 specific table not make it into the binary log? What's the relvant section of your my.cnf file on the master look like? Just bin-log, or is there more there? Err, log-bin, not bin-log. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 13 days, processed 242,448,830 queries (213/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: replication bug
I have found that if I do manual changes to the table, it replicates. If the applications my company wrote make changes, they don't replicate. I am having the programmers find where they went sloppy. - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Gabe E. Nydick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 12:47 AM Subject: Re: replication bug On Tue, Sep 18, 2001 at 10:17:26PM -0700, Jeremy Zawodny wrote: On Tue, Sep 18, 2001 at 09:54:51PM -0700, Gabe E. Nydick wrote: I have a large set of tables that are 1-way replicating to an identical machine as the master db, and for some reason 1 table doesn't make it into the binary log. Why would updates to 1 specific table not make it into the binary log? What's the relvant section of your my.cnf file on the master look like? Just bin-log, or is there more there? Err, log-bin, not bin-log. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 13 days, processed 242,448,830 queries (213/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: replication bug
I assume that you have already scanned the MySQL manual section 4.10.4 Replication Features and Known Problems to see if anything listed there as a problem is relevant to your situation. I found a couple of gotchas there that caused me some problems. -Original Message- From: Gabe E. Nydick [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 12:44 PM To: [EMAIL PROTECTED] Subject: Re: replication bug I have found that if I do manual changes to the table, it replicates. If the applications my company wrote make changes, they don't replicate. I am having the programmers find where they went sloppy. - Original Message - From: Jeremy Zawodny [EMAIL PROTECTED] To: Gabe E. Nydick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, September 19, 2001 12:47 AM Subject: Re: replication bug On Tue, Sep 18, 2001 at 10:17:26PM -0700, Jeremy Zawodny wrote: On Tue, Sep 18, 2001 at 09:54:51PM -0700, Gabe E. Nydick wrote: I have a large set of tables that are 1-way replicating to an identical machine as the master db, and for some reason 1 table doesn't make it into the binary log. Why would updates to 1 specific table not make it into the binary log? What's the relvant section of your my.cnf file on the master look like? Just bin-log, or is there more there? Err, log-bin, not bin-log. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 13 days, processed 242,448,830 queries (213/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication bug - PATCH
On Tuesday 10 April 2001 10:55, Sasha Pachev wrote: Scott: See my comments below regarding the replication bug you have reported. error from log file: 010410 15:18:20 Slave: connected to master 'navrep@hsNavYkfPrd4:3306', replication started in log 'hsNavYkfPrd4-bin.060' at position 14290269 ERROR: 1064 You have an error in your SQL syntax near '' at line 1 010410 15:18:34 Slave: did not get the expected error running query from master - expected: 'Got an error reading communication packets', got 'no error' 010410 15:18:34 Slave: error running query 'drop table scratch.#sql-6fd2_9b3' 010410 15:18:34 Error running query, slave aborted. Fix the problem, and re-start the slave thread with "mysqladmin start-slave". We stopped at log 'hsNavYkfPrd4-bin.060' position 14298032 010410 15:18:34 Slave thread exiting, replication stopped in log 'hsNavYkfPrd4-bin.060' at position 14298032 Found the problem - if somehow there was a temporary table left over in the temporary tables list of the the thread that was created internally by MySQL to process some query, on disconnect the record of it being dropped was erroneously made in the binary log. This is why you see the slave trying to drop a table with a very strange name - scratch.#sql-6fd2_9b3. The patch below not only takes care of the left over internal temp table bug, but also addresses the issue of dealing with updates that only partially complete because of some unusual conditions or errors, eg killed thread. If the slave sees a query in the log that completed with an abnormal error, it will now just abort and wait for the DBA to verify data integrity and restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START; . The patch will be present in 3.23.37: --- 1.73/sql/sql_base.ccSun Apr 1 16:45:24 2001 +++ edited/sql_base.cc Tue Apr 10 11:44:37 2001 @@ -497,13 +497,14 @@ TABLE *table,*next; uint init_query_buf_size = 11, query_buf_size; // "drop table " char* query, *p; + bool found_user_tables = 0; + LINT_INIT(p); query_buf_size = init_query_buf_size; for (table=thd-temporary_tables ; table ; table=table-next) { query_buf_size += table-key_length; - } if(query_buf_size == init_query_buf_size) @@ -519,15 +520,20 @@ { if(query) // we might be out of memory, but this is not fatal { - p = strxmov(p,table-table_cache_key,".", + // skip temporary tables not created directly by the user + if(table-table_name[0] != '#') + { + p = strxmov(p,table-table_cache_key,".", table-table_name,",", NullS); - // here we assume table_cache_key always starts - // with \0 terminated db name + // here we assume table_cache_key always starts + // with \0 terminated db name + found_user_tables = 1; + } } next=table-next; close_temporary(table); } - if (query mysql_bin_log.is_open()) + if (query found_user_tables mysql_bin_log.is_open()) { uint save_query_len = thd-query_length; *--p = 0; --- 1.94/sql/slave.cc Tue Mar 13 23:07:11 2001 +++ edited/slave.cc Tue Apr 10 19:48:11 2001 @@ -59,6 +59,8 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db, const char* table_name); inline char* rewrite_db(char* db); +static int check_expected_error(THD* thd, int expected_error); + static void free_table_ent(TABLE_RULE_ENT* e) { my_free((gptr) e, MYF(0)); @@ -834,6 +836,27 @@ return len - 1; } +static int check_expected_error(THD* thd, int expected_error) +{ + switch(expected_error) +{ +case ER_NET_READ_ERROR: +case ER_NET_ERROR_ON_WRITE: +case ER_SERVER_SHUTDOWN: +case ER_NEW_ABORTING_CONNECTION: + my_snprintf(last_slave_error, sizeof(last_slave_error), +"Slave: query '%s' partially completed on the master \ +and was aborted. There is a chance that your master is inconsistent at this \ +point. If you are sure that your master is ok, run this query manually on the\+ slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1;\ + SLAVE START;", thd-query); + last_slave_errno = expected_error; + sql_print_error(last_slave_error); + return 1; +default: + return 0; +} +} static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len) { @@ -883,22 +906,38 @@ thd-net.last_errno = 0; thd-net.last_error[0] = 0; thd-slave_proxy_id = qev-thread_id; // for temp tables - mysql_parse(thd, thd-query, q_len); - if ((expected_error = qev-error_code) != - (actual_error = thd-net.last_errno) expected_error) - { - const char* errmsg = "Slave: did not get the expected error\ + + // sanity check to make sure the master did not get a really bad + // error on the query + if(!check_expected_error(thd, (expected_error = qev-error_code))) +
Re: Re: Replication Bug in 3.23.33
Does this problem exist in 3.23.32?? Thanks for the bug report. The problem is a bug in the code that skips events when it sees a log entry with the same server id - something that can only happen in the bi-directional replicaiton setup. Fix: --- 1.85/sql/slave.cc Sat Jan 27 15:33:30 2001 +++ edited/slave.cc Wed Feb 14 12:35:34 2001 @@ -849,7 +849,8 @@ mi-inc_pos(event_len); flush_master_info(mi); - --slave_skip_counter; + if(slave_skip_counter) +--slave_skip_counter; delete ev; return 0;// avoid infinite update loops } --- Tenha uma conta de email GrĂ¡tis no ACBusca! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Re: Replication Bug in 3.23.33
On Thursday 15 February 2001 18:50, Rodolfo Sikora wrote: Does this problem exist in 3.23.32?? Thanks for the bug report. The problem is a bug in the code that skips events when it sees a log entry with the same server id - something that can only happen in the bi-directional replicaiton setup. Fix: --- 1.85/sql/slave.cc Sat Jan 27 15:33:30 2001 +++ edited/slave.ccWed Feb 14 12:35:34 2001 @@ -849,7 +849,8 @@ mi-inc_pos(event_len); flush_master_info(mi); - --slave_skip_counter; + if(slave_skip_counter) + --slave_skip_counter; delete ev; return 0;// avoid infinite update loops } This one does not, but there is a bigger one - restarting the slave does not work. -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication Bug in 3.23.33
On Wednesday 14 February 2001 09:19, Matt Hahnfeld wrote: After downgrading to 3.23.30, replication worked fine without the problem posted below. This appears to be a bug in the newest version (3.23.33) only. The failed tests were run under mysql-3.23.33-pc-linux-gnu-i686 (binary distribution). The same tests succeeded under mysql-3.23.30-gamma-pc-linux-gnu-i686 (binary distribution) with no problems. -- Forwarded message -- Date: Tue, 13 Feb 2001 14:33:47 -0500 (EST) From: Matt Hahnfeld [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Strange Replication Problem in 3.23.33 (bug?) I set up two MySQL servers to run in a failover configuration. Because queries will only ever be submitted to one server at a time, I decided to use a makeshift two-way replication scheme under MySQL as descibed in the MySQL manual. First server (wallace) has this: server-id=1 log-bin master-host=gromit master-user=repl master-password=password log-slave-updates Second server (gromit) has this: server-id=2 log-bin master-host=wallace master-user=repl master-password=password log-slave-updates I started by mirroring both data directories. Then I started both servers and all looked fine. Logs indicate no errors. When I inserted some data on wallace, gromit replicated them just fine. But when I tried to insert data on gromit, wallace never got the changes. The weird thing is, no real errors appeared in the logs. Then I did a "SHOW SLAVE STATUS" on wallace and saw "Skip_counter" was set to 4294967295!!! Strange, I thought, so I ran "STOP SLAVE", "SET SQL_SLAVE_SKIP_COUNTER=0", and "START SLAVE" on wallace. Suddenly changes made on gromit were reflected on wallace. But then I tried to insert data on wallace again and the same thing happened. This time gromit never got the changes. When I ran "SHOW SLAVE STATUS" on gromit, it indicated 4294967293. To get it to work, I had to run "SET SQL_SLAVE_SKIP_COUNTER=0" on gromit. I just don't get it... Why are the skip counters being reset to thse crazy high numbers? Thanks for the bug report. The problem is a bug in the code that skips events when it sees a log entry with the same server id - something that can only happen in the bi-directional replicaiton setup. Fix: --- 1.85/sql/slave.cc Sat Jan 27 15:33:30 2001 +++ edited/slave.cc Wed Feb 14 12:35:34 2001 @@ -849,7 +849,8 @@ mi-inc_pos(event_len); flush_master_info(mi); - --slave_skip_counter; + if(slave_skip_counter) +--slave_skip_counter; delete ev; return 0;// avoid infinite update loops } -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Replication Bug in 3.23.33
On Wednesday 14 February 2001 12:58, Matt Hahnfeld wrote: Wow, that was fast! Thanks!! We mean what we say - the better the bug report, the quicker the fix :-) --Matt On Wed, 14 Feb 2001, Sasha Pachev wrote: On Wednesday 14 February 2001 09:19, Matt Hahnfeld wrote: After downgrading to 3.23.30, replication worked fine without the problem posted below. This appears to be a bug in the newest version (3.23.33) only. The failed tests were run under mysql-3.23.33-pc-linux-gnu-i686 (binary distribution). The same tests succeeded under mysql-3.23.30-gamma-pc-linux-gnu-i686 (binary distribution) with no problems. -- Forwarded message -- Date: Tue, 13 Feb 2001 14:33:47 -0500 (EST) From: Matt Hahnfeld [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Strange Replication Problem in 3.23.33 (bug?) I set up two MySQL servers to run in a failover configuration. Because queries will only ever be submitted to one server at a time, I decided to use a makeshift two-way replication scheme under MySQL as descibed in the MySQL manual. First server (wallace) has this: server-id=1 log-bin master-host=gromit master-user=repl master-password=password log-slave-updates Second server (gromit) has this: server-id=2 log-bin master-host=wallace master-user=repl master-password=password log-slave-updates I started by mirroring both data directories. Then I started both servers and all looked fine. Logs indicate no errors. When I inserted some data on wallace, gromit replicated them just fine. But when I tried to insert data on gromit, wallace never got the changes. The weird thing is, no real errors appeared in the logs. Then I did a "SHOW SLAVE STATUS" on wallace and saw "Skip_counter" was set to 4294967295!!! Strange, I thought, so I ran "STOP SLAVE", "SET SQL_SLAVE_SKIP_COUNTER=0", and "START SLAVE" on wallace. Suddenly changes made on gromit were reflected on wallace. But then I tried to insert data on wallace again and the same thing happened. This time gromit never got the changes. When I ran "SHOW SLAVE STATUS" on gromit, it indicated 4294967293. To get it to work, I had to run "SET SQL_SLAVE_SKIP_COUNTER=0" on gromit. I just don't get it... Why are the skip counters being reset to thse crazy high numbers? Thanks for the bug report. The problem is a bug in the code that skips events when it sees a log entry with the same server id - something that can only happen in the bi-directional replicaiton setup. Fix: --- 1.85/sql/slave.cc Sat Jan 27 15:33:30 2001 +++ edited/slave.cc Wed Feb 14 12:35:34 2001 @@ -849,7 +849,8 @@ mi-inc_pos(event_len); flush_master_info(mi); - --slave_skip_counter; + if(slave_skip_counter) +--slave_skip_counter; delete ev; return 0;// avoid infinite update loops } -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php