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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:51:03+00:00 2026-06-12T02:51:03+00:00

Currently we have a database where STATEMENT bin log format works fine. Now we

  • 0

Currently we have a database where STATEMENT bin log format works fine.
Now we are adding a new table with an auto increment value.
This auto increment column is no purpose for the business logic.
We have added this as part of our primary key.
Here offer_expiry_time is the first part of primary key since we have all our queries as range queries based on expiry time range.

Assume our table looks similar to this:

CREATE TABLE offer_expiry_info  
    offer_expiry_time BIGINT UNSIGNED NOT NULL null,  
    purchase_id INT UNSIGNED auto_increment,
    PRIMARY KEY (offer_expiry_time, purchase_id),
    KEY idx_purchase_id (purchase_id)
)ENGINE = INNOBB;

Now our concerns are:

  1. Will STATEMENT level bin log format work for this table?
    (even we are fine with different values for auto increment columns across replications). Basically Will STATEMENT level ever work?

  2. If it works what are the issues that might occur while bringing up a failed db machine?

  3. If STATEMENT mode will not work, then can we use specific(MIXED) replication mode for this table alone? Can the rest of the tables in the same database can have STATEMENT mode?

  4. This may be a very silly question as i am not aware of how mysql handles replication. Is it possible to specify the replication mode based on the query type? (For insert queries do ROW level replication and for DELETE queries perform STATEMENT level replication)

    The question 4 is because we do perform deletion based on range based delete and hence will have a better performance if we can have STATEMENT replication for delete queries.

DELETE FROM order_expiry_info WHERE offer_expiry_time "LESS THAN" SOME TIME

Since we do batch inserts, STATEMENT level replication will help us a lot.
Is it possible to have the tables with auto increment columns have STATEMENT level bin log format?

[edited]
Also we do have another issue with the transaction isolation level.
ERROR: "Getting the error Binary logging not possible. Message: Transaction level ‘REA
D-UNCOMMITTED’ in InnoDB is not safe for binlog mode ‘STATEMENT’"

Any suggestion would be very much helpful?

  • 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-12T02:51:04+00:00Added an answer on June 12, 2026 at 2:51 am

    Yes those scenarios will work fine with the statement binlogs.

    If you can access the logs, you will see that certain values are logged before each statements to ensure things like the timestamp and auto increment values will be preserved appropriately.

    I have been using statement based replication for years without an issue in any of these areas. I would suggest sticking with that and only considering row based or mixed replication if a specific performance situation arises that may need them.

    Please note there are certain types of usage which are not safe with statement based replication, but simple auto increment usage isn’t one of them.

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

Sidebar

Related Questions

I currently have a very simple MySQL database (articlesDB) with 1 table (articles) and
I'm trying to normalize a mysql database.... I currently have a table that contains
I have a database table which currently holds geometric data in SRID 27700 (British
I have a database wherein per day a table is created to log process
I currently have a database table called civic_zip_code with zip, city, state, latitude, longitude
Currently I have database with the following associations: One Client to Many Intakes One
Currently I have a database of Courses, and it has 6 columns: class Course(models.Model):
Currently I have a database with the following relationships: One Client has multiple Entities
I currently have a MySQL database which I was hoping to use to store
I currently have a Postgres 8.4 database that contains a varchar(10000) column. I'd like

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.