Jump to content

How to only open connection to Slave from specified time


jeger003

Recommended Posts

Thanks! what about this issue? I get this error when I run a query:

 

 

Error 'Table 'rdb.rest' doesn't exist' on query. Default database: 'ftd_store'. Query:...

when I run this:

 

 

 

INSERT INTO ftd_store.sdnt(dom,art,ttl,ttl_count,last_updated)

SELECT * FROM

(

SELECT dom,art,ttl,COUNT(OKey) AS ttlCount, NOW()

FROM rdb.rest

WHERE dom = dom_val

GROUP BY art,ttl

ORDER BY dom,ttlCount DESC

LIMIT 200

) aliasResults ON DUPLICATE KEY UPDATE ttl_count = ttlCount, last_updated = NOW();

Link to comment
Share on other sites

  • 2 weeks later...

That's because you're not supposed to write statements that refer to multiple databases when using replication -- it's just asking for trouble, and it's well documented.

 

As for the slave thread, the whole point is to keep the lag to a minimum -- don't try and mess with it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.