Skip to content

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Apr 24, 2025

When we initially implemented implicit commits, we did not exclude temporary tables. This PR addresses that issue.
These queries no longer implicitly commit the ongoing transaction:

  • create temporary table tmp_tbl(...),
  • insert into table tmp_tbl ...,
  • drop temporary table tmp_tbl

However drop table tmp_tbl will still cause an implicit commit even though tmp_tbl is defined as a temporary table (not sure if this is intentional from MySQL side).
Additionally, alter table tmp_tbl ... will also cause an implicit commit, but we don't support altering temporary tables (issue).

Fixes: dolthub/dolt#9149

Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Nice comments in the test – that was a big help in understanding the intent and expectations of the tests.

@jycor jycor merged commit 5b1a12f into main Apr 24, 2025
9 checks passed
@jycor jycor deleted the james/temp branch April 24, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CREATE TEMPORARY TABLE during a transaction causes a commit

3 participants