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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:24:10+00:00 2026-05-29T16:24:10+00:00

I have created database table. But there is a strange thing I can insert

  • 0

I have created database table. But there is a strange thing I can insert row into table, but when I want to delete or update database row it throws an error:

/* SQL Error (1205): Lock wait timeout
exceeded; try restarting transaction
*/

In other tables there is no errors, and everything works pretty fine.

Here is a table structure:

CREATE TABLE `cruises` (
    `id` BIGINT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    `enable_text` ENUM('true','false') NOT NULL,
    `enable_file` ENUM('true','false') NOT NULL,
    `title` VARCHAR(256) NOT NULL,
    `full_text` MEDIUMTEXT NOT NULL,
    `description` VARCHAR(256) NULL,
    `date_of_departure` DATE NOT NULL,
    `number_of_nights` INT(10) UNSIGNED NOT NULL,
    `point_of_departure` VARCHAR(256) NOT NULL,
    `cruise_type` BIGINT(10) UNSIGNED NOT NULL,
    `cruises_document_id` BIGINT(10) UNSIGNED NOT NULL,
    `price` FLOAT(5,0) UNSIGNED NOT NULL,
    PRIMARY KEY (`id`),
    INDEX `FK_cruises_cruises_types` (`cruise_type`),
    INDEX `FK_cruises_cruises_documents` (`cruises_document_id`),
    CONSTRAINT `FK_cruises_cruises_documents` FOREIGN KEY (`cruises_document_id`) REFERENCES `cruises_documents` (`id`),
    CONSTRAINT `FK_cruises_cruises_types` FOREIGN KEY (`cruise_type`) REFERENCES `cruises_types` (`id`)
)
ENGINE=InnoDB
ROW_FORMAT=DEFAULT

I have tried this thing on 2 different databases, but the same problem appears all the time. Any ideas?

  • 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-29T16:24:10+00:00Added an answer on May 29, 2026 at 4:24 pm

    This is problem of lock contention, which ultimately result in a time-out on one of the lock. Here are a few suggestions:

    • Make sure you have the correct indexes which result in row-level locks not table-level lock. This will reduce the contention.
    • Make sure you have indexes on the foreign key constraints. To check the relational constraints during insert or update, some database lock the whole referenced table if there is no such index (don’t know if this is the case of MySQL)
    • If problem is still here, try to make the transaction faster/smaller. Again, this will reduce the contention on the database.
    • Increase the timeout but keep the value reasonable

    Also check if you are obtaining two connections. Because of that two transaction will get mixed and you will get above error!!!

    Also check this link.. this might help you…

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

Sidebar

Related Questions

I have the following database table created thus: CREATE TABLE AUCTIONS ( ARTICLE_NO VARCHAR(20),
I have created a table on an Oracle 10g database with this structure :
I have the following table in a SQLite3 database: CREATE TABLE overlap_results ( neighbors_of_annotation
I have created a MySQL database using MySQL Workbench. It has about 20 tables.
I have implemented a linked list as a self-referencing database table: CREATE TABLE LinkedList(
I have designed database tables (normalised, on an MS SQL server) and created a
I have mysql database structure like below: CREATE TABLE test ( id int(11) NOT
I have an Access database in which I drop the table and then create
I have an SQLite database. I created the tables and filled them with a
I am playing with wpf and when i have created database it is created

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.