Y-sir opened a new issue, #34284:
URL: https://github.com/apache/shardingsphere/issues/34284

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.5.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy          MySQL  5.7.44-log
   
   ### Expected behavior
   Execution Success
   
   ### Actual behavior
   Execution failed with error Usage question that isn't answered in docs or 
discussion
   
   ### Reason analyze (If you can)
   The situation is like this. When I connect to the proxy database and execute 
the update statement, an error is reported: Lock wait timeout exceeded; try 
restarting transaction
   I did not find the wrong SQL because no errors were reported in the proxy 
library before the update statement was executed. However, I checked the 
proxied MySQL database, which is the source database, to see if there were any 
uncommitted transactions in the source database.
   
   1、Use `SHOW ENGINE INNODB STATUS;` to check whether there are any 
uncommitted transactions, as shown below
   
   
![image](https://github.com/user-attachments/assets/d2bebf75-0c86-4f2d-9b8a-7f808aa407b1)
   
   It was found that two transactions of MySQL thread id 935711 and MySQL 
thread id 935688 were not committed.
   
   
   2、Use `SELECT * FROM information_schema.innodb_trx WHERE trx_mysql_thread_id 
IN (SELECT trx_mysql_thread_id FROM information_schema.innodb_trx WHERE trx_id 
IN (SELECT trx_id FROM information_schema.innodb_trx));
   ` to query the SQL statements of threads 935711 and 935688. The result is as 
shown in the figure below. trx_query is null, which is the SQL statement 
executed by the record.
   
   
![image](https://github.com/user-attachments/assets/5c50b71d-8bb6-4a91-971b-b450137b92db)
   
   I cannot provide the steps to reproduce the problem because there is no 
error in the program. Only when the update statement is executed will the error 
"Lock wait timeout exceeded; try restarting transaction" be reported. However, 
I do not know which statement caused the lock to be generated. I would like to 
ask if anyone has encountered this situation before?
   
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
notifications-unsubscr...@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to