Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
32 views

Query is not fetching the latest data from MySQL while using FOR UPDATE clauses

I have a table which locks rows as per accountId and a lock status column having values 0 and 1. CREATE TABLE lock ( id INT(11), accountId INT(11), isLocked TINYINT(2), ); The requirement is ...
Avijit Saxena's user avatar
0 votes
1 answer
37 views

Rollback Transaction in Mysql Query

DELIMITER ;; CREATE DEFINER=root@localhost PROCEDURE ExecuteDataFill(IN p_internalCompanyId INT) BEGIN DECLARE u_cursor CURSOR FOR SELECT name, address, area, pincode, city, state, ...
Chayan Chakraborty's user avatar
0 votes
0 answers
28 views

Handling InnoDB Behavior for Non-repeatable Reads with Auxiliary Indexes

Suppose there is a table t with columns id (primary key) and name, where name has an auxiliary index. The table contains three rows: 1 green, 2 red, and 3 black. Assume I open transaction A and ...
Rezero's user avatar
  • 168
0 votes
0 answers
57 views

MySQL 8.0 upgrade/ spike in synch/mutex/innodb/trx_sys_mutex causes application outage

We upgrade mysql from 5.7 to 8.0 on AWS aurora Problem we are facing is frequent outage of an application. we observed that there is spike for synch/mutex/innodb/trx_sys_mutex Performance insights
Rdba's user avatar
  • 13
1 vote
0 answers
34 views

On duplicate key check if the other column is the same

I have a table with the following schema: CREATE TABLE T ( id BIGINT UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT, key BIGINT UNSIGNED NOT NULL, val BIGINT UNSIGNED NOT NULL, ); I need to ...
wingerse's user avatar
  • 3,740
2 votes
1 answer
110 views

Transaction isolation level for financial transactions

Let's assume we have an application that must transfer funds from account A to account B. Let's assume that database is MySQL (though I'd appreciant an answer for Postgres too). Account A balance: 20 ...
snowindy's user avatar
  • 3,221
0 votes
0 answers
37 views

Strange MySQL Deadlock

I have a queue system where the design can be summarized as these tables - queue every new item goes to this table, a service keep reading this table to process the data "log_yyyyMMdd" ...
Chor Wai Chun's user avatar
0 votes
0 answers
31 views

JavaEE scheduled task wait for transaction commit

I have some Tasks which are stored in a database (MySQL). Task basically makes an API call to a remote system, which throws an exception if two Tasks try to execute concurrently. This is the current ...
yoyo-san's user avatar
1 vote
1 answer
35 views

Fatest query to lock down a snapshot in MySQL for REPEATABLE READ transaction

Per the MySQL documentation, for a transaction with the REPEATABLE READ isolation level: Consistent reads within the same transaction read the snapshot established by the first read. I want to ...
IsaIkari's user avatar
  • 1,056
0 votes
1 answer
35 views

Running a program on different computers with different users that access a central database simultaneously - VB.NET XAMPP/MySQL

We're creating a VB.NET program that will be used on several computers with one central database that is on XAMPP/MySQL. Here's my question: User1 who's in computer1 wants to edit a row in table 1 to ...
Ann XR's user avatar
  • 1
0 votes
0 answers
47 views

Gap locks using InnoDB

I am facing deadlock issues which I suspect is from gap lock that is issued when my select for update doesn't find a row Hi everyone. Currently I am facing a deadlock issue between two inserts into my ...
HomeLighter's user avatar
0 votes
0 answers
21 views

Lock Acquisition Order in MYSQL [duplicate]

I need a clear picture about lock acquisition order when performing certain queries. Below is the example, I tried. +-------+----------------------------------------------------------------------------...
Vigneswari's user avatar
0 votes
0 answers
20 views

How to add the transaction and rollback for the query in the repository layer for the python api

In my service layer I have one function, def model_service(data): inserted_data=model_repository().new_insert_query() update_data=model_repository().new_update_query(data) return ...
karthika kannan's user avatar
2 votes
0 answers
72 views

How to correctly set the lock in MySQL?

There are two tables: site (id, name, url), page (id, code, content, path, site_id). The site table has a record with id = 1. The page table is empty. I'm trying to insert a new record into the Page ...
Vasyabylba's user avatar
0 votes
1 answer
145 views

There is no active transaction

I want to call a stored procedure which creates a dynamic view within a transaction in Laravel: Laravel: try { DB::transaction(function() use ($raison_sociale_clean, $coming) { ...
Aicha 's user avatar

15 30 50 per page
1
2 3 4 5
143