apache / apache/incubator-seata
不支持insert into select操作
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
经定位问题发生在BaseInsertExecutor.parsePkValuesFromStatement()
if (statementProxy instanceof PreparedStatementProxy) {
PreparedStatementProxy preparedStatementProxy = (PreparedStatementProxy) statementProxy;
List> insertRows = recognizer.getInsertRows(pkIndexMap.values());
if (insertRows != null && !insertRows.isEmpty()) {
问题发生在上述代码最后一个if处,!insertRows.isEmpty()为false,导致无法为pkValuesMap赋值,以致
if (pkValuesMap.isEmpty()) {
throw new ShouldNeverHappenException();
}
seata服务端版本1.3.0,客户端1.3.0、1.4.2
数据库:MySQL 5.7.12,驱动8.0.22
Contributor guide
Research direction
Start in BaseInsertExecutor.parsePkValuesFromStatement() and inspect how INSERT INTO SELECT is handled when recognizer.getInsertRows(...) returns an empty list. Reproduce the reported operation with MySQL 5.7.12 using the Seata 1.3.0 or 1.4.2 client, then verify that pkValuesMap is populated without triggering ShouldNeverHappenException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100