pt-table-checksum show wrong DIFF












0















I'm try to use pt-table-checksum tool. I have Master/Slave tables, and I add some rows to the slave to check it.



pt-table-checksum --ignore-databases mysql S=/tmp/5.6.22_3306_Master/data/mysql.sock --user=SlaveUser --password=1234


produce this result:



            TS ERRORS  DIFFS     ROWS  CHUNKS SKIPPED    TIME TABLE
07-21T16:47:35 0 0 8 1 0 0.008 test.Countries
07-21T16:47:35 0 0 0 1 0 0.006 test.Persons


When I run this query (SELECT * FROM percona.checksums WHERE db not like 'mysql';) on the slave I can see the difference:



enter image description here



How I can see the right result and the diff with pt-table-checksum?



Thanks!










share|improve this question














bumped to the homepage by Community 20 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I'm try to use pt-table-checksum tool. I have Master/Slave tables, and I add some rows to the slave to check it.



    pt-table-checksum --ignore-databases mysql S=/tmp/5.6.22_3306_Master/data/mysql.sock --user=SlaveUser --password=1234


    produce this result:



                TS ERRORS  DIFFS     ROWS  CHUNKS SKIPPED    TIME TABLE
    07-21T16:47:35 0 0 8 1 0 0.008 test.Countries
    07-21T16:47:35 0 0 0 1 0 0.006 test.Persons


    When I run this query (SELECT * FROM percona.checksums WHERE db not like 'mysql';) on the slave I can see the difference:



    enter image description here



    How I can see the right result and the diff with pt-table-checksum?



    Thanks!










    share|improve this question














    bumped to the homepage by Community 20 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I'm try to use pt-table-checksum tool. I have Master/Slave tables, and I add some rows to the slave to check it.



      pt-table-checksum --ignore-databases mysql S=/tmp/5.6.22_3306_Master/data/mysql.sock --user=SlaveUser --password=1234


      produce this result:



                  TS ERRORS  DIFFS     ROWS  CHUNKS SKIPPED    TIME TABLE
      07-21T16:47:35 0 0 8 1 0 0.008 test.Countries
      07-21T16:47:35 0 0 0 1 0 0.006 test.Persons


      When I run this query (SELECT * FROM percona.checksums WHERE db not like 'mysql';) on the slave I can see the difference:



      enter image description here



      How I can see the right result and the diff with pt-table-checksum?



      Thanks!










      share|improve this question














      I'm try to use pt-table-checksum tool. I have Master/Slave tables, and I add some rows to the slave to check it.



      pt-table-checksum --ignore-databases mysql S=/tmp/5.6.22_3306_Master/data/mysql.sock --user=SlaveUser --password=1234


      produce this result:



                  TS ERRORS  DIFFS     ROWS  CHUNKS SKIPPED    TIME TABLE
      07-21T16:47:35 0 0 8 1 0 0.008 test.Countries
      07-21T16:47:35 0 0 0 1 0 0.006 test.Persons


      When I run this query (SELECT * FROM percona.checksums WHERE db not like 'mysql';) on the slave I can see the difference:



      enter image description here



      How I can see the right result and the diff with pt-table-checksum?



      Thanks!







      mysql percona pt-table-checksum






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 21 '16 at 13:53









      ElazarGElazarG

      1




      1





      bumped to the homepage by Community 20 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 20 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Manual states it clearly:




          If you wish, you can query the checksum tables manually to get a
          report of which tables and chunks have differences from the master.
          The following query will report every database and table with
          differences, along with a summary of the number of chunks and rows
          possibly affected:



          SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks
          FROM percona.checksums
          WHERE (
          master_cnt <> this_cnt
          OR master_crc <> this_crc
          OR ISNULL(master_crc) <> ISNULL(this_crc))
          GROUP BY db, tbl;


          The table referenced in that query is the checksum table, where the
          checksums are stored. Each row in the table contains the checksum of
          one chunk of data from some table in the server.




          To get the actual differences, you'd need to run pt-table-sync --print and determine the changes by the SQL queries it generates.






          share|improve this answer
























          • I saw on the manual. But yet, shouldn't I see difference on the output table?

            – ElazarG
            Jul 27 '16 at 7:08











          • yes but with the above query you'll get the summary of chunks and estimated rows affected.

            – jerichorivera
            Jul 27 '16 at 8:41











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f144550%2fpt-table-checksum-show-wrong-diff%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Manual states it clearly:




          If you wish, you can query the checksum tables manually to get a
          report of which tables and chunks have differences from the master.
          The following query will report every database and table with
          differences, along with a summary of the number of chunks and rows
          possibly affected:



          SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks
          FROM percona.checksums
          WHERE (
          master_cnt <> this_cnt
          OR master_crc <> this_crc
          OR ISNULL(master_crc) <> ISNULL(this_crc))
          GROUP BY db, tbl;


          The table referenced in that query is the checksum table, where the
          checksums are stored. Each row in the table contains the checksum of
          one chunk of data from some table in the server.




          To get the actual differences, you'd need to run pt-table-sync --print and determine the changes by the SQL queries it generates.






          share|improve this answer
























          • I saw on the manual. But yet, shouldn't I see difference on the output table?

            – ElazarG
            Jul 27 '16 at 7:08











          • yes but with the above query you'll get the summary of chunks and estimated rows affected.

            – jerichorivera
            Jul 27 '16 at 8:41
















          0














          Manual states it clearly:




          If you wish, you can query the checksum tables manually to get a
          report of which tables and chunks have differences from the master.
          The following query will report every database and table with
          differences, along with a summary of the number of chunks and rows
          possibly affected:



          SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks
          FROM percona.checksums
          WHERE (
          master_cnt <> this_cnt
          OR master_crc <> this_crc
          OR ISNULL(master_crc) <> ISNULL(this_crc))
          GROUP BY db, tbl;


          The table referenced in that query is the checksum table, where the
          checksums are stored. Each row in the table contains the checksum of
          one chunk of data from some table in the server.




          To get the actual differences, you'd need to run pt-table-sync --print and determine the changes by the SQL queries it generates.






          share|improve this answer
























          • I saw on the manual. But yet, shouldn't I see difference on the output table?

            – ElazarG
            Jul 27 '16 at 7:08











          • yes but with the above query you'll get the summary of chunks and estimated rows affected.

            – jerichorivera
            Jul 27 '16 at 8:41














          0












          0








          0







          Manual states it clearly:




          If you wish, you can query the checksum tables manually to get a
          report of which tables and chunks have differences from the master.
          The following query will report every database and table with
          differences, along with a summary of the number of chunks and rows
          possibly affected:



          SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks
          FROM percona.checksums
          WHERE (
          master_cnt <> this_cnt
          OR master_crc <> this_crc
          OR ISNULL(master_crc) <> ISNULL(this_crc))
          GROUP BY db, tbl;


          The table referenced in that query is the checksum table, where the
          checksums are stored. Each row in the table contains the checksum of
          one chunk of data from some table in the server.




          To get the actual differences, you'd need to run pt-table-sync --print and determine the changes by the SQL queries it generates.






          share|improve this answer













          Manual states it clearly:




          If you wish, you can query the checksum tables manually to get a
          report of which tables and chunks have differences from the master.
          The following query will report every database and table with
          differences, along with a summary of the number of chunks and rows
          possibly affected:



          SELECT db, tbl, SUM(this_cnt) AS total_rows, COUNT(*) AS chunks
          FROM percona.checksums
          WHERE (
          master_cnt <> this_cnt
          OR master_crc <> this_crc
          OR ISNULL(master_crc) <> ISNULL(this_crc))
          GROUP BY db, tbl;


          The table referenced in that query is the checksum table, where the
          checksums are stored. Each row in the table contains the checksum of
          one chunk of data from some table in the server.




          To get the actual differences, you'd need to run pt-table-sync --print and determine the changes by the SQL queries it generates.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 24 '16 at 10:52









          jerichoriverajerichorivera

          61745




          61745













          • I saw on the manual. But yet, shouldn't I see difference on the output table?

            – ElazarG
            Jul 27 '16 at 7:08











          • yes but with the above query you'll get the summary of chunks and estimated rows affected.

            – jerichorivera
            Jul 27 '16 at 8:41



















          • I saw on the manual. But yet, shouldn't I see difference on the output table?

            – ElazarG
            Jul 27 '16 at 7:08











          • yes but with the above query you'll get the summary of chunks and estimated rows affected.

            – jerichorivera
            Jul 27 '16 at 8:41

















          I saw on the manual. But yet, shouldn't I see difference on the output table?

          – ElazarG
          Jul 27 '16 at 7:08





          I saw on the manual. But yet, shouldn't I see difference on the output table?

          – ElazarG
          Jul 27 '16 at 7:08













          yes but with the above query you'll get the summary of chunks and estimated rows affected.

          – jerichorivera
          Jul 27 '16 at 8:41





          yes but with the above query you'll get the summary of chunks and estimated rows affected.

          – jerichorivera
          Jul 27 '16 at 8:41


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f144550%2fpt-table-checksum-show-wrong-diff%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Liste der Baudenkmale in Friedland (Mecklenburg)

          Single-Malt-Whisky

          Czorneboh