-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix max_transaction_time #4135
Fix max_transaction_time #4135
Changes from 1 commit
b2312c0
1df86c7
0aa6081
66e7f1d
069140f
bd7f890
1902eb5
aac20d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4968,6 +4968,9 @@ int MySQL_Session::handler() { | |
if (active_transactions == 0) | ||
transaction_started_at = 0; // reset it | ||
} | ||
} else { | ||
transaction_started_at = thread->curtime; | ||
active_transactions = NumActiveTransactions(); | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @renecannao what do you think about putting this code inside a function and calling it here and also when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you want to reset the timer if there is an error in the middle of a transaction? I am going back to what I wrote before: [...] at the beginning of the query |
||
handler_rc0_Process_GTID(myconn); | ||
|
@@ -5077,12 +5080,6 @@ int MySQL_Session::handler() { | |
handler_minus1_HandleBackendConnection(myds, myconn); | ||
} | ||
} else { | ||
if (active_transactions == 0) { | ||
active_transactions=NumActiveTransactions(); | ||
if (active_transactions > 0) { | ||
transaction_started_at = thread->curtime; | ||
} | ||
} | ||
switch (rc) { | ||
// rc==1 , query is still running | ||
// start sending to frontend if mysql_thread___threshold_resultset_size is reached | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code means that when a query completes, and
active_transactions==0
,transaction_started_at
is set to current time even if there is no transaction.