Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1086329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:47:58+00:00 2026-05-16T22:47:58+00:00

I have a number of tests that run against a MySQL database which is

  • 0

I have a number of tests that run against a MySQL database which is pre-loaded with schemas and example data from a set of SQL files. Some of these tests, during their run, also create new data in the database.

Normally, tests are responsible for cleaning up after themselves (and thus not polluting the database environment for other tests). However, it appears that some of these tests aren’t fully doing so, and thus leaving behind additional/modified records where they shouldn’t.

Due to the complex set of code that is being tested, it isn’t feasible to have a single transaction running for the entire test, so I can’t just have MySQL roll everything back (there are both multiple cursors and multiple replicated DB servers involved, among other factors).

I’d like to have a way of more easily identifying these tests that are polluting the DB, but because it is allowable for tests to write to the DB (as long as they remove things afterwards), I can’t just look at all alterations to the DB – I need only the effective changes, with canceling-out modifications removed.

One thought I had was that if there were a straightforward way to compare the contents of one table against another, I could do so after running each test, comparing the contents of a table initialized with the fixture to the contents of the table after the test.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:47:59+00:00Added an answer on May 16, 2026 at 10:47 pm

    Some various suggestions that I’ve gotten through other channels so far:

    • CHECKSUM TABLE – this would be almost perfect for my needs, except that it only works for MyISAM tables (we use InnoDB).

    • SHOW TABLE STATUS – this provides Data_length, which might work as a simplistic comparison. If I can’t find anything better, this might suffice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a series of functional tests against a web application that correctly run,
I have a Maven project which performs a number of time consuming tests as
I have a number of projects in a solution file that have unit tests
I have a number input that should trigger jQuery on every change. To do
I have an extremely odd problem in my JUnit tests that I just can't
I've got an MVC web application with associated controller tests that run under a
Greetings, I have a large number of fitnesse tests for a project (1000+). Over
I have an assembly that I've built on Windows I want to run the
I have an interval that runs every 3 seconds to check for new data.
I have a number of test classes and methods that copy a particular directory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.