Bug Report: show vitess_migrations
not supported from inside a transaction
#16242
Labels
show vitess_migrations
not supported from inside a transaction
#16242
Overview of the Issue
Since #13726, vtgates are forwarding
show vitess_migrations
queries to the tablet instead of executingselect
s on the MySQLs.However, as
txConnExec
does not supportPlanShowMigrations
, if executed from within a transaction, the queries fail with something like:vttablet: rpc error: code = Internal desc = [BUG] ShowMigrations unexpected plan type (CallerID: userData1)
This is a regression from the previous behaviour where
show vitess_migrations
would succeed from within a transaction.It is not unreasonable for this to be ran from within a transaction (and
txConExec
already accounts for some other read types likeselect
s andshow
s), e.g. in Rails, eachActiveSupport::TestCase
test is wrapped in an implicit transaction and this regression makes any assertions on the result of this query impossible without turning off transactional testing.Would it be worth supporting this new plan type from within the context of a transaction on the tablet?
Reproduction Steps
On any schema, with v18.0.0, on a vtgate console
Should fail with the error described above.
On v17 and earlier, it would succeed.
Binary Version
Operating System and Environment details
Linux 69eaf41a9693 6.8.8-300.fc40.aarch64 #1 SMP PREEMPT_DYNAMIC Sat Apr 27 18:11:03 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Log Fragments
No response
The text was updated successfully, but these errors were encountered: