table: fix cannot find the temp table when it's created in a transaction#35663
table: fix cannot find the temp table when it's created in a transaction#35663ti-chi-bot merged 3 commits intopingcap:masterfrom
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/686e4851babec07dbafaaddf135075174ce6e6dd |
tiancaiamao
left a comment
There was a problem hiding this comment.
This may cause more object allocation in the hot code path and affect the performance.
I think it's fine because each session only allocates it once. @tiancaiamao |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: ce5522b |
TiDB MergeCI notify🔴 Bad News! New failing [2] after this pr merged.
|
* upstream/master: (38 commits) planner: disable collate clause support for enum or set column (pingcap#35684) *: Provide a util to "pause" session in uint test (pingcap#35529) ddl: implement the core for multi-schema change (pingcap#35429) parser: XXXDatabaseStmt now use CIStr for DB name (pingcap#35668) *: remove real tikv test on github actions (pingcap#35710) lightning: support disable scheduler by key range (pingcap#34130) Revert "planner: fix the wrong cost formula of MPPExchanger" (pingcap#35707) ddl, owner: refresh ddl sequence cache after becoming the owner (pingcap#35516) store/copr: fix tiflash integration test by disable paging on tiflash (pingcap#35674) planner: new cost formula for IndexJoin (pingcap#35671) BR: fix backup ranges total time summary log (pingcap#35552) raw_restore: fix the issue that raw restore rewrite the t prefix keys (pingcap#35641) table: fix cannot find the temp table when it's created in a transaction (pingcap#35663) metrics: replace histogram with counter for DistSQLCoprCache (pingcap#35514) *: enable exportloopref (pingcap#35680) types: fix bad error message for numeric conversion issue#32744 (pingcap#34047) *: enable ineffassign (pingcap#35670) config, sysvar: map `max-server-connections` to `max_connections` (pingcap#35453) *: enable durationcheck for nogo linter (pingcap#35661) *: fix issue of cast string as time is incompatible with MySQL (pingcap#35455) ...
What problem does this PR solve?
Issue Number: close #35644
Problem Summary:
If a temporary table is created inside a transaction, it cannot be accessed, because:
LocalTemporaryTablesobject fromSessionVars. ButgetLocalTemporaryTables()returnsnilinstead of aLocalTemporaryTablesobject at that time.LocalTemporaryTablesobject onSessionVars.LocalTemporaryTablesobject because it only referencesnil.What is changed and how it works?
getLocalTemporaryTables()always returns a map.Check List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.