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

  • Home
  • SEARCH
  • 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 8184285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:27:04+00:00 2026-06-07T01:27:04+00:00

I am using Django and MySQL. I need to be able to do what

  • 0

I am using Django and MySQL. I need to be able to do what in Oracle is called an autonomous transaction, that is, committing only part of a transaction (or, rather, having a transaction within a transaction). I need this for two cases (although I’m thinking that the solution will be the same):

  1. Error logging. I log errors in an error table and want to commit these inserts even if I rollback all other transactions.

  2. I use a table to create a sequence (using TABLE sequence and LAST_INSERT_ID() as described here: http://dev.mysql.com/doc/refman/5.0/en/information-functions.html). I want to get/update this sequence and then commit the statement, thereby unlocking the table for other transactions that need the sequence. It’s fine if the table gets incremented even if I rollback the other transactions.

  • 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-06-07T01:27:05+00:00Added an answer on June 7, 2026 at 1:27 am

    Interesting subject, apparently there’s no such thing in mysql but a guy recommends to use (for your log table problem) a myisam table, so since it is outside transactions, the data gets posted anyway.


    I am adding a second answer since I just figured out this alternative: what you could do is to handle the log transaction from another connection with another user in your database.

    Mysql handles the connection pool per user so it will never use the same connection for the main operations and the log operations, allowing you to commit the logs connection independently.

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

Sidebar

Related Questions

I'm using Django + internal database(mysql). but, I need to query to another external
I'm building a system using django, Sphinx and MySQL that's very quickly becoming quite
I'm having the following problem using Django with MySQL 5.5.22. Given a table with
I'm writing a migration using Django's South, and it can only work on MySQL
I'm using Django 1.3 with the MySQL 5.5 database backend. My assumption was that
I'm developing an online website (using Django and Mysql). I have a Tests table
I using Django tagging project. That is was very stable project. Working on django
I need to create and save image thumbnails in database. I am using django
I am using Django with MySql. I have a CharField with max length of
I'm using django-mptt to manage a simple CMS, with a model called Page ,

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.