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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:49:16+00:00 2026-05-20T14:49:16+00:00

The nid field on my Drupal node table jumped from from 254,107 to 500,220,117.

  • 0

The nid field on my Drupal node table jumped from from 254,107 to 500,220,117. What could have caused that? I haven’t messed up with the Auto_increment field.

I see very little leeway in the drupal_write_record and node_save function calls for any kind human errors that could cause this nid jump, node_save what accepts as an argument is a node object.

Could a badly built node object cause a jump in the Auto_increment field? i.e. that for some sort of weird bug the code switches the nid field with something else before passing it to node_save? If this were true, the bug would be in the code preceding the node_save, but it could also be inside a rougue hook_invoke_nodeapi, since node_save() calls this snippet at the beginning of the function:

// Let modules modify the node before it is saved to the database.
node_invoke_nodeapi($node, 'presave');

How would you go about setting a test for detecting this?

I will probably set up an exotic conditional breakpoint (or a couple of them) within node_save(), and particularly on the last line of db_query(). In db_query() the breakpoint will most likely contain a regular expression. Then I could set some sort of automated test that saves all kinds of node types into the database (thinking about the devel module) and see if something appears. If I find anything I will answer myself the question, unless someone else had a similar experience in the past and answers first.

  • 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-20T14:49:17+00:00Added an answer on May 20, 2026 at 2:49 pm

    Yeah, we can’t know without more information. What Drupal uses for it’s sequencing depends on the version you are using. See this for more info.

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

Sidebar

Related Questions

No related questions found

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.