Hello and thanks for the suggestion.
I did SHOW TABLES on the store database and saw the column that the error is complaining
about (cores_session).
mysql> show tables LIKE 'core_session';
+--------------------------------+
| Tables_in_store (core_session) |
+--------------------------------+
| core_session |
+--------------------------------+
1 row in set (0.00 sec)
I then tried to perform SELECT * FROM core_session and I got an error claiming that it
didn't exist:
mysql> select * from core_session;
ERROR 1146 (42S02): Table 'store.core_session' doesn't exist
So I dropped the database entirely from the slave and performed a mysqldump of the store
database on the master. I made sure to see that the store database did not exist in the
datadir with an ls. I then went to the master and dumped the store database with
mysqldump and scp'd it over to the slave and imported it.
At that point I was able to select from the table when I used the store database:
mysql> show tables like 'core_session';
+--------------------------------+
| Tables_in_store (core_session) |
+--------------------------------+
| core_session |
+--------------------------------+
1 row in set (0.01 sec)
mysql> select * from core_session \G
*************************** 1. row ***************************
session_id: n4f3dbeshk6bi3huq7un33kn81
website_id: NULL
session_expires: 1307832104
session_data:
core|a:4:{s:23:"_session_validator_data";a:4:{s:11:"remote_addr";s:12:"192.168.1.24";s:8:"http_via";s:0:"";s:20:"http_x_forwarded_for";s:0:"";s:15:"http_user_agent";s:101:"Mozilla/5.0
(X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68
Safari/534.24";}s:13:"session_hosts";a:1:{s:18:"stage.jokefire.com";b:1;}s:8:"messages";O:34:"Mage_Core_Model_Message_Collection":2:{s:12:"
* _messages";a:0:{}s:20:" *
_lastAddedMessage";N;}s:9:"_form_key";s:16:"aQEVPDvIqcu5Fjo1";}_cookie_revalidate|d:1307831563;adminhtml|a:4:{s:23:"_session_validator_data";a:4:{s:11:"remote_addr";s:12:"192.168.1.24";s:8:"http_via";s:0:"";s:20:"http_x_forwarded_for";s:0:"";s:15:"http_user_agent";s:101:"Mozilla/5.0
(X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68
Safari/534.24";}s:13:"session_hosts";a:1:{s:18:"stage.jokefire.com";b:1;}s:6:"locale";s:5:"en_US";s:8:"messages";O:34:"Mage_Core_Model_Message_Collection":2:{s:12:"
* _messages";a:0:{}s:20:" *
_lastAddedMessage";N;}}admin|a:2:{s:23:"_session_validator_data";a:4:{s:11:"remote_addr";s:12:"192.168.1.24";s:8:"http_via";s:0:"";s:20:"http_x_forwarded_for";s:0:"";s:15:"http_user_agent";s:101:"Mozilla/5.0
(X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68
Safari/534.24";}s:13:"session_hosts";a:1:{s:18:"stage.jokefire.com";b:1;}}
1 row in set (0.00 sec)
I then performed the SQL actual that the error was complaining about manually:
Last_SQL_Error: Error 'Table 'store.core_session' doesn't exist' on query. Default
database: 'store'. Query: 'DELETE FROM `core_session` WHERE `session_expires` <
'1307804417''
mysql> DELETE FROM core_session WHERE session_expires;
Query OK, 1 row affected (0.03 sec)
It looks like it worked:
mysql> SELECT * FROM core_session WHERE 'session_expires' < '1307804417';
Empty set (0.00 sec)
I then stopped the slave and ran
SET GLOBAL sql_slave_skip_counter = 1;
and it looks like that error was clear. There was a new error there, but what I gather at
this point is that you basically go down the list of errors that pop up until they go
away. Yes this is a test lab I've setup and not production, but I'm guessing this is what
you would do in a production situation.
Thanks again for your input!
Tim
----- Original Message -----
From: "Johan De Meersman" <vegivamp@stripped>
To: "Tim Dunphy" <bluethundr@stripped>
Cc: replication@stripped
Sent: Saturday, June 11, 2011 5:21:24 PM
Subject: Re: cannot reset replication error
At first sight, the diagnosis would be that there are no new statements on the master
after the one that caused the error, so the "last error" remains in view.
It would be a good thing if you were to fix the cause of the error, though:
Last_SQL_Error: Error 'Table 'jfwiki.site_stats' doesn't exist'
Also, I hope you know that sql_slave_skip_counter doesn't actually fix your replication -
it merely skips the errorring statement and continues replication. The change the
errorring statement should have introduced but didn't, doesn't magically materialize.
----- Original Message -----
> From: "Tim Dunphy" <bluethundr@stripped>
> To: replication@stripped
> Sent: Saturday, 11 June, 2011 4:49:47 PM
> Subject: cannot reset replication error
>
> hello!
>
> I am attempting to reset the error message on a slave. however when
> I try to do this using the SET GLOBAL sql_slave_skip_counter = N
> command it is having no effect. Replication is not broken on the
> slave and the binlog pointer is keeping pace with the master.
>
>
>
>
> ## still seeing resolved replication errors
>
> Slave_IO_State: Waiting for master to send event
>
>
> Last_Errno: 1146
> Last_Error: Error 'Table 'jfwiki.site_stats'
> doesn't exist' on query. Default database:
> 'jfwiki'. Query: 'UPDATE /*
> SiteStatsUpdate::doUpdate 192.168.1.24 */
> `site_stats` SET ss_total_views=ss_total_views+1'
> Skip_Counter: 0
> Exec_Master_Log_Pos: 41551
> Relay_Log_Space: 452249
> Until_Condition: None
>
> Last_SQL_Errno: 1146
> Last_SQL_Error: Error 'Table 'jfwiki.site_stats'
> doesn't exist' on query. Default database: 'jfwiki'.
> Query: 'UPDATE /* SiteStatsUpdate::doUpdate
> 192.168.1.24 */ `site_stats` SET
> ss_total_views=ss_total_views+1'
> Replicate_Ignore_Server_Ids:
>
>
> ## trying to reset the error
>
> mysql> stop slave;
> Query OK, 0 rows affected (0.01 sec)
>
> mysql> SET GLOBAL sql_slave_skip_counter = 1;
> Query OK, 0 rows affected (0.00 sec)
>
>
> mysql> start slave;
> Query OK, 0 rows affected (0.00 sec)
>
>
> ## error remains
>
>
> Slave_IO_State: Waiting for master to send event
>
>
> Last_Errno: 1146
> Last_Error: Error 'Table 'jfwiki.site_stats'
> doesn't exist' on query. Default database:
> 'jfwiki'. Query: 'UPDATE /*
> SiteStatsUpdate::doUpdate 192.168.1.24 */
> `site_stats` SET ss_total_views=ss_total_views+1'
> Skip_Counter: 0
> Exec_Master_Log_Pos: 41551
> Relay_Log_Space: 452249
> Until_Condition: None
>
> Last_SQL_Errno: 1146
> Last_SQL_Error: Error 'Table 'jfwiki.site_stats'
> doesn't exist' on query. Default database: 'jfwiki'.
> Query: 'UPDATE /* SiteStatsUpdate::doUpdate
> 192.168.1.24 */ `site_stats` SET
> ss_total_views=ss_total_views+1'
> Replicate_Ignore_Server_Ids:
>
>
> ## binlog pointer is keeping pace with the master
>
> File: mysqld-bin.000002
> Position: 665042
>
> ---------------------------------
> Read_Master_Log_Pos: 665042
>
>
> Thank you for any tips you might be able to share on this!
>
> tim
>
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel