will DB_TRX_ID hidden field modified smaller than it use be?Can I concatenate multiple MySQL rows into one field?Why is this a deadlock (MySQL using InnoDB)Does the order of fields in a WHERE clause affect performance in MySQL?MySQL 'select for update' behaviourReference - What does this error mean in PHP?ORDER BY “ENUM field” with an calculated field in MYSQLDoes locking a row in MySQL/InnoDB always lock all associated index records as well?MySQL InnoDB deadlock between select for update and insertMySQL lock and statements that lock rows using a unique indexHigh level algorithm that MySQL MVCC uses to build the previous snapshot

貧しい【まずしい】 poor 貧乏【びんぼう】な poor What's the difference?

Does Disney no longer produce hand-drawn cartoon films?

Why didn't Voldemort recognize that Dumbledore was affected by his curse?

Longest bridge/tunnel that can be cycled over/through?

Electricity free spaceship

Skin Effect of resistors

English word for "product of tinkering"

What is the color of artificial intelligence?

How come the nude protesters were not arrested?

US doctor working in Tripoli wants me to open online account

Who are the Missing Members of this Noble Family?

If every company in the economy earns zero economic profit, can they contribute to real economic growth?

Fixing obscure 8080 emulator bug?

Why does Sin[b-a] simplify to -Sin[a-b]?

What is the actual quality of machine translations?

Are there any important biographies of nobodies?

Let M and N be single-digit integers. If the product 2M5 x 13N is divisible by 36, how many ordered pairs (M,N) are possible?

How can I end combat quickly when the outcome is inevitable?

Determining fair price for profitable mobile app business

Can I utilise a baking stone to make crepes?

Does the Long March-11 increase its thrust after clearing the launch tower?

Winning Strategy for the Magician and his Apprentice

Is White controlling this game?

How can I get an unreasonable manager to approve time off?



will DB_TRX_ID hidden field modified smaller than it use be?


Can I concatenate multiple MySQL rows into one field?Why is this a deadlock (MySQL using InnoDB)Does the order of fields in a WHERE clause affect performance in MySQL?MySQL 'select for update' behaviourReference - What does this error mean in PHP?ORDER BY “ENUM field” with an calculated field in MYSQLDoes locking a row in MySQL/InnoDB always lock all associated index records as well?MySQL InnoDB deadlock between select for update and insertMySQL lock and statements that lock rows using a unique indexHigh level algorithm that MySQL MVCC uses to build the previous snapshot






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















according to mysql reference, 6-byte transaction ID field will be added in the cluster index record and will be set to the value the transaction which create/modifed it.
my question is:
let say transaction 1, 2 are active in mysql and 2 modified a record, meanwhile set its transaction ID to 2. release the lock and exit. then transaction 1 entered in and modified the same record again, will transaction ID be modified smaller than 2 to 1?










share|improve this question






























    1















    according to mysql reference, 6-byte transaction ID field will be added in the cluster index record and will be set to the value the transaction which create/modifed it.
    my question is:
    let say transaction 1, 2 are active in mysql and 2 modified a record, meanwhile set its transaction ID to 2. release the lock and exit. then transaction 1 entered in and modified the same record again, will transaction ID be modified smaller than 2 to 1?










    share|improve this question


























      1












      1








      1








      according to mysql reference, 6-byte transaction ID field will be added in the cluster index record and will be set to the value the transaction which create/modifed it.
      my question is:
      let say transaction 1, 2 are active in mysql and 2 modified a record, meanwhile set its transaction ID to 2. release the lock and exit. then transaction 1 entered in and modified the same record again, will transaction ID be modified smaller than 2 to 1?










      share|improve this question
















      according to mysql reference, 6-byte transaction ID field will be added in the cluster index record and will be set to the value the transaction which create/modifed it.
      my question is:
      let say transaction 1, 2 are active in mysql and 2 modified a record, meanwhile set its transaction ID to 2. release the lock and exit. then transaction 1 entered in and modified the same record again, will transaction ID be modified smaller than 2 to 1?







      mysql innodb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 22:04







      Keyang Ma

















      asked Mar 24 at 18:54









      Keyang MaKeyang Ma

      186




      186






















          1 Answer
          1






          active

          oldest

          votes


















          0














          If you're interested in InnoDB internal storage formats, you might like to get Jeremy Cole's Innodb_ruby tool.



          I tried creating a table test.foo with 1 row, and updated the row with a series of transactions. I can then use Jeremy Cole's script to dump the page:



          innodb_space -s ibdata1 -T test/foo -p 3 page-dump

          ...

          records:
          :format=>:compact,
          :offset=>125,
          :header=>
          :next=>112,
          :type=>:conventional,
          :heap_number=>2,
          :n_owned=>0,
          :min_rec=>false,
          :deleted=>false,
          :nulls=>[],
          :lengths=>,
          :externs=>[],
          :length=>5,
          :next=>112,
          :type=>:clustered,
          :key=>[:name=>"id", :type=>"BIGINT UNSIGNED", :value=>7],
          :row=>[],
          :sys=>
          [:name=>"DB_TRX_ID", :type=>"TRX_ID", :value=>2843,
          :name=>"DB_ROLL_PTR",
          :type=>"ROLL_PTR",
          :value=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272],
          :length=>21,
          :transaction_id=>2843,
          :roll_pointer=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272


          You can see under the :sys key there's the DB_TRX_ID. As I make further updates to the row, this value is changed. You can try it yourself and see how the value changes.



          Read Jeremy's series of blog posts to understand more about the InnoDB format:



          Here's a list of his blog posts: https://blog.jcole.us/innodb/






          share|improve this answer























          • My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

            – Bill Karwin
            Mar 25 at 12:23






          • 1





            my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

            – Keyang Ma
            Mar 25 at 20:46











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          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: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fstackoverflow.com%2fquestions%2f55327342%2fwill-db-trx-id-hidden-field-modified-smaller-than-it-use-be%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














          If you're interested in InnoDB internal storage formats, you might like to get Jeremy Cole's Innodb_ruby tool.



          I tried creating a table test.foo with 1 row, and updated the row with a series of transactions. I can then use Jeremy Cole's script to dump the page:



          innodb_space -s ibdata1 -T test/foo -p 3 page-dump

          ...

          records:
          :format=>:compact,
          :offset=>125,
          :header=>
          :next=>112,
          :type=>:conventional,
          :heap_number=>2,
          :n_owned=>0,
          :min_rec=>false,
          :deleted=>false,
          :nulls=>[],
          :lengths=>,
          :externs=>[],
          :length=>5,
          :next=>112,
          :type=>:clustered,
          :key=>[:name=>"id", :type=>"BIGINT UNSIGNED", :value=>7],
          :row=>[],
          :sys=>
          [:name=>"DB_TRX_ID", :type=>"TRX_ID", :value=>2843,
          :name=>"DB_ROLL_PTR",
          :type=>"ROLL_PTR",
          :value=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272],
          :length=>21,
          :transaction_id=>2843,
          :roll_pointer=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272


          You can see under the :sys key there's the DB_TRX_ID. As I make further updates to the row, this value is changed. You can try it yourself and see how the value changes.



          Read Jeremy's series of blog posts to understand more about the InnoDB format:



          Here's a list of his blog posts: https://blog.jcole.us/innodb/






          share|improve this answer























          • My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

            – Bill Karwin
            Mar 25 at 12:23






          • 1





            my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

            – Keyang Ma
            Mar 25 at 20:46















          0














          If you're interested in InnoDB internal storage formats, you might like to get Jeremy Cole's Innodb_ruby tool.



          I tried creating a table test.foo with 1 row, and updated the row with a series of transactions. I can then use Jeremy Cole's script to dump the page:



          innodb_space -s ibdata1 -T test/foo -p 3 page-dump

          ...

          records:
          :format=>:compact,
          :offset=>125,
          :header=>
          :next=>112,
          :type=>:conventional,
          :heap_number=>2,
          :n_owned=>0,
          :min_rec=>false,
          :deleted=>false,
          :nulls=>[],
          :lengths=>,
          :externs=>[],
          :length=>5,
          :next=>112,
          :type=>:clustered,
          :key=>[:name=>"id", :type=>"BIGINT UNSIGNED", :value=>7],
          :row=>[],
          :sys=>
          [:name=>"DB_TRX_ID", :type=>"TRX_ID", :value=>2843,
          :name=>"DB_ROLL_PTR",
          :type=>"ROLL_PTR",
          :value=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272],
          :length=>21,
          :transaction_id=>2843,
          :roll_pointer=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272


          You can see under the :sys key there's the DB_TRX_ID. As I make further updates to the row, this value is changed. You can try it yourself and see how the value changes.



          Read Jeremy's series of blog posts to understand more about the InnoDB format:



          Here's a list of his blog posts: https://blog.jcole.us/innodb/






          share|improve this answer























          • My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

            – Bill Karwin
            Mar 25 at 12:23






          • 1





            my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

            – Keyang Ma
            Mar 25 at 20:46













          0












          0








          0







          If you're interested in InnoDB internal storage formats, you might like to get Jeremy Cole's Innodb_ruby tool.



          I tried creating a table test.foo with 1 row, and updated the row with a series of transactions. I can then use Jeremy Cole's script to dump the page:



          innodb_space -s ibdata1 -T test/foo -p 3 page-dump

          ...

          records:
          :format=>:compact,
          :offset=>125,
          :header=>
          :next=>112,
          :type=>:conventional,
          :heap_number=>2,
          :n_owned=>0,
          :min_rec=>false,
          :deleted=>false,
          :nulls=>[],
          :lengths=>,
          :externs=>[],
          :length=>5,
          :next=>112,
          :type=>:clustered,
          :key=>[:name=>"id", :type=>"BIGINT UNSIGNED", :value=>7],
          :row=>[],
          :sys=>
          [:name=>"DB_TRX_ID", :type=>"TRX_ID", :value=>2843,
          :name=>"DB_ROLL_PTR",
          :type=>"ROLL_PTR",
          :value=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272],
          :length=>21,
          :transaction_id=>2843,
          :roll_pointer=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272


          You can see under the :sys key there's the DB_TRX_ID. As I make further updates to the row, this value is changed. You can try it yourself and see how the value changes.



          Read Jeremy's series of blog posts to understand more about the InnoDB format:



          Here's a list of his blog posts: https://blog.jcole.us/innodb/






          share|improve this answer













          If you're interested in InnoDB internal storage formats, you might like to get Jeremy Cole's Innodb_ruby tool.



          I tried creating a table test.foo with 1 row, and updated the row with a series of transactions. I can then use Jeremy Cole's script to dump the page:



          innodb_space -s ibdata1 -T test/foo -p 3 page-dump

          ...

          records:
          :format=>:compact,
          :offset=>125,
          :header=>
          :next=>112,
          :type=>:conventional,
          :heap_number=>2,
          :n_owned=>0,
          :min_rec=>false,
          :deleted=>false,
          :nulls=>[],
          :lengths=>,
          :externs=>[],
          :length=>5,
          :next=>112,
          :type=>:clustered,
          :key=>[:name=>"id", :type=>"BIGINT UNSIGNED", :value=>7],
          :row=>[],
          :sys=>
          [:name=>"DB_TRX_ID", :type=>"TRX_ID", :value=>2843,
          :name=>"DB_ROLL_PTR",
          :type=>"ROLL_PTR",
          :value=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272],
          :length=>21,
          :transaction_id=>2843,
          :roll_pointer=>
          :is_insert=>true, :rseg_id=>20, :undo_log=>:page=>335, :offset=>272


          You can see under the :sys key there's the DB_TRX_ID. As I make further updates to the row, this value is changed. You can try it yourself and see how the value changes.



          Read Jeremy's series of blog posts to understand more about the InnoDB format:



          Here's a list of his blog posts: https://blog.jcole.us/innodb/







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 22:21









          Bill KarwinBill Karwin

          391k65526682




          391k65526682












          • My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

            – Bill Karwin
            Mar 25 at 12:23






          • 1





            my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

            – Keyang Ma
            Mar 25 at 20:46

















          • My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

            – Bill Karwin
            Mar 25 at 12:23






          • 1





            my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

            – Keyang Ma
            Mar 25 at 20:46
















          My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

          – Bill Karwin
          Mar 25 at 12:23





          My pleasure. Remember it is traditional on Stack Overflow to upvote an answer that helps you, or mark as "accepted" the answer that really answers your question fully. See stackoverflow.com/help/someone-answers

          – Bill Karwin
          Mar 25 at 12:23




          1




          1





          my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

          – Keyang Ma
          Mar 25 at 20:46





          my bad. I first vote the answer and it turns out that I'm the new comer for the stack overflow and my vote can't be used to influence the rank. so I just give up other actions like accepted the answer.

          – Keyang Ma
          Mar 25 at 20:46



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • 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%2fstackoverflow.com%2fquestions%2f55327342%2fwill-db-trx-id-hidden-field-modified-smaller-than-it-use-be%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

          Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

          밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

          1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴