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;
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
add a comment |
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
add a comment |
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
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
mysql innodb
edited Mar 24 at 22:04
Keyang Ma
asked Mar 24 at 18:54
Keyang MaKeyang Ma
186
186
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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/
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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/
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
add a comment |
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/
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
add a comment |
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/
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/
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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