Skip to content
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

Question: is it possible to use mytap to check deadlock issue? #54

Open
lanphan opened this issue Mar 25, 2021 · 5 comments
Open

Question: is it possible to use mytap to check deadlock issue? #54

lanphan opened this issue Mar 25, 2021 · 5 comments

Comments

@lanphan
Copy link

lanphan commented Mar 25, 2021

Hi all,

This project is great to offer the way to unit test SQL. I searched in this project and googled a lot, but still not found how to write mytap test to check deadlock issue, can you give me 1 example about this?

Thanks so much.

@hepabolu
Copy link
Owner

Can you be more specific? Can you describe the issue you want to test?

@lanphan
Copy link
Author

lanphan commented Mar 25, 2021

To be specific, I want to check deadlock caused by gap locking of mysql when simultaneously insert into same table based on different transaction isolation level (REPEATABLE READ vs. READ COMMITTED).

@sq6jnx
Copy link
Contributor

sq6jnx commented Mar 25, 2021

I am almost sure it's not possible. You had to have an option to perform assertions using more than one connection (or thread) in one time.

You will have to find another solution to use two connections in the same time.

@lanphan
Copy link
Author

lanphan commented Mar 25, 2021

Hi @sq6jnx sq,
Thanks for your response.
This limitation (open only 1 connection) is for myTap only, or for all TAP unit test framework for sql like pgTap also?
Do you have any advice about other SQL unit test framework?

Thanks.

@hepabolu
Copy link
Owner

The MyTAP framework uses only the available statements that MySQL provides, i.e. if you can't create a statement that can do what you want, then it cannot be done with the MyTAP framework.

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

No branches or pull requests

3 participants