Forum Replies Created

Viewing 1 replies (of 1 total)
  • From what I can see, there are 2 unique keys, one composite key on the first 3 columns and one on all 4 columns.

    What is the purpose of this 2nd unique key?
    I am trying to use mysql replication and my logs are full of this message: The important part is “INSERT… ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe”

    [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. 
    INSERT... ON DUPLICATE KEY UPDATE  on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO wp_post_views (id, type, period, count)
    				VALUES (264430, 1, '201851', 1)
    				ON DUPLICATE KEY UPDATE count = count + 1 

    Can we safely delete this 2nd index? Or make it non unique ?
    I can’t see how it is being used.

    • This reply was modified 6 years, 2 months ago by superlapin.
    • This reply was modified 6 years, 2 months ago by superlapin.
    • This reply was modified 6 years, 2 months ago by superlapin.
Viewing 1 replies (of 1 total)