• unknown's avatar
    Its funny, I am reading through the forums and someone asks "Can I please have... · b0b86ec1
    unknown authored
    Its funny, I am reading through the forums and someone asks "Can I please have a REPLACE INTO, instead an INSERT INTO?" and I remember how often I have used a sed script to modify MySQL dumps to have exactly that.
    So, use --replace and instead of getting INSERT INTO you will INSTEAD get REPLACE INTO. Buyer beward, REPLACE is a MySQL SQL, so you will not end up with a dump that can be used for other databases.
    
    Though I hear you could just use a sed line to modify it back :)
    
    
    client/client_priv.h:
      New option for --replace
    client/mysqldump.c:
      Added option for REPLACE INTO instead of INSERT INTO
    mysql-test/r/mysqldump.result:
      Updated REsultes for replace into
    mysql-test/t/mysqldump.test:
      Added new test for --replace
    b0b86ec1
mysqldump.test 30.9 KB