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 4039970
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:41:26+00:00 2026-05-20T12:41:26+00:00

Will out-of-transaction SELECT see only committed data? UPD. My database is MySQL UPD. I’m

  • 0

Will out-of-transaction SELECT see only committed data?

UPD. My database is MySQL

UPD. I’m interested in simple SELECT statement which comes without explicit transaction. What data will it see? How can I change it?

  • 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-20T12:41:27+00:00Added an answer on May 20, 2026 at 12:41 pm

    I assume you are asking regarding InnoDB, since MyISAM does not support transactions.

    There is no such thing as out of transaction, even with the default autocommit=1, every statement for itself is a transaction.

    The answer to your question depends on what you mean by only committed data.

    Say we have a table with a row:

    INSERT table (id, Counter, LastUpdates) VALUES (8, 100, '2011-03-08 22:04:00');
    

    While session A is modifying the row:

    START TRANSACTION;
    UPDATE table SET Count = 101, LastUpdates = NOW() WHERE id = 8;
    SLEEP(100);
    COMMIT;
    

    If session B issues a select before session A commits the transaction, what will happen is dependent on the transaction isolation level of session B.

    • READ UNCOMMITTED: session B will read the newly modified row (counter = 101).
    • READ COMMITTED / REPEATABLE READ (default): Session B will see the latest committed row (counter = 100).
    • SERIALIZABLE: session B will block until session A commits.

    Here is how a one can change the session transaction level without declaring a transaction.

    SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which data will be visible to SELECT statement executed out of explicit transaction? Won't
Anyone that can help me out will be very much appreciated. I seem to
Is there a NAnt task that will echo out all property names and values
So when you use scaffolding Rails will kick out some layouts that are xhtml
I have an Excel spreadsheet that will sit out on a network share drive.
Is there a cucumber command that will print out just the feature info and
I'm trying to write a regex that will parse out the directory and filename
I'm trying to complete a regular expression that will pull out matches based on
I'm trying to come up with an algorithm that will print out all possible
According to here , the C compiler will pad out values when writing a

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.