(query string, callIndex int)
| 1477 | execCalls []string |
| 1478 | execCtxCalls []string |
| 1479 | } |
| 1480 | |
| 1481 | func (e *abortedExecAlterViewRecoveryExecutor) execResult(query string, _ int) (ExecResult, error) { |
| 1482 | trimmed := strings.TrimSpace(query) |
| 1483 | switch trimmed { |
| 1484 | case "ROLLBACK": |
| 1485 | return &fakeExecResult{}, nil |
| 1486 | case e.originalQuery: |
| 1487 | // Count attempts explicitly: statement execution and ROLLBACK now share |
| 1488 | // ExecContext, so a positional index over the recorded calls is no longer |
| 1489 | // a reliable way to tell the first attempt from the retry. |
| 1490 | e.originalAttempts++ |
| 1491 | if e.originalAttempts == 1 { |
| 1492 | return nil, errors.New("TransactionContext Error: Current transaction is aborted (please ROLLBACK)") |
| 1493 | } |
| 1494 | return nil, errors.New("Binder Error: cannot use alter table on a view because this object is not a table; use ALTER VIEW instead") |
| 1495 | case e.rewritten: |
| 1496 | return &fakeExecResult{}, nil |
| 1497 | default: |
no outgoing calls
no test coverage detected