Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25416] When a query containing a stored procedure fails using JDBC, the SQL syntax included in the error message no longer displays [user_schema]. #1967

Merged

Conversation

jongmin-won
Copy link
Contributor

@jongmin-won jongmin-won commented Nov 15, 2024

http://jira.cubrid.org/browse/CBRD-25416

1. JDBC를 사용하여 SP를 사용한 쿼리가 실패하면 오류 메시지에 포함된 SQL 구문에 [user_schema]가 표시되지 않습니다.

과거 PR(CUBRID/cubrid#5258) 에서 SP 에 [user_schema]를 사용할 수 있게 기능을 추가하며 TC를 수정 했으나,
PR(CUBRID/cubrid#5615) 에서 로직이 수정돼 JDBC 에러 메세지에서 SP의 [user_schema]가 제거되도록 변경 됐습니다.

  • csql 에서 실행할 경우, 에러 메세지는 아래와 같이 출력 됩니다.
csql> call t( DATETIME'10/31/2023', DATETIME'13/31/2008' );

ERROR: before '  ); '
Invalid utime: '13/31/2008'.

Repro

create or replace procedure t(i_min DATETIME, i_max DATETIME ) as
var_min DATETIME := i_min;
var_max DATETIME := i_max;
begin
dbms_output.put_line('i_min=' || var_min);
dbms_output.put_line('i_max=' || var_max);
end;

call t( DATETIME'10/31/2023', DATETIME'13/31/2008' );

Answer

Error:-494
Semantic: before '  ); '
Invalid utime: '13/31/2008'. call [dba.t](datetime '10/31/2023')

Result

Error:-494
Semantic: before '  ); '
Invalid utime: '13/31/2008'. call t(datetime '10/31/2023')

…syntax included in the error message no longer displays [user_schema].
@jongmin-won jongmin-won self-assigned this Nov 15, 2024
@jongmin-won jongmin-won merged commit 8fa1b7d into CUBRID:feature/plcsql-p1 Nov 18, 2024
hgryoo added a commit that referenced this pull request Dec 12, 2024
…op (#2000)

http://jira.cubrid.org/browse/CBRD-25184

## 1. PL/CSQL Enhancements

### 1.1 New Test Cases
- **[CBRD-24519]** Added test cases for PL/CSQL (Cases 10–23).
  - **Pull Requests**: #1769, #1779, #1894, #1903, #1907, #1912, #1918, #1922, #1924, #1925
  - **Details**:
    - Covered scenarios involving OUT parameters, runtime exceptions, and keyword-built-in function overlaps (e.g., `CURRENT_USER`).
    - Validated stored procedure behavior with user schema prefixes.

- **[CBRD-25261]** Modified answers for PL/CSQL tests.
  - **Pull Request**: #1761
  - Adjusted for grammar refinements and future merges.

### 1.2 System Changes
- **[CBRD-25184]** Revised answers due to grammar changes.
  - **Pull Requests**: #1770, #1878, #2001
  - **Changes**:
    - Updates for keywords (e.g., `REVERSE`), user schema handling, and new system catalog columns.

---

## 2. Bug Fixes

### 2.1 Error Handling
- **[CBRD-25303]** Fixed issues in ADDTIME() with invalid XASL content.
  - **Pull Request**: #1973

- **[CBRD-25273]** Modified test case for ADDDATE() returning NULL.
  - **Pull Request**: #1974

### 2.2 Typographical Fixes
- **[CBRD-24707]** Resolved large-scale test failures due to typos.
  - **Pull Request**: #1897

---

## 3. Test Improvements for Errors

### 3.1 VARCHAR Conversion
- **[CBRD-25345]** Added SQL test for errors converting VARCHAR to TIME/TIMESTAMP.
  - **Pull Request**: #1975

### 3.2 Error Messaging
- **[CBRD-25673]** Improved error message consistency in JDBC.
  - **Pull Request**: #1958

- **[CBRD-25416]** Resolved stored procedure syntax display issues.
  - **Pull Requests**: #1963, #1967

---

## 4. Stored Procedure System Updates

### 4.1 Schema Updates
- **[CBRD-25352]** Introduced user schema for stored procedures.
  - **Pull Request**: #1824

### 4.2 Authorization Handling
- **[CBRD-24786]** Updated answers for `SHOW GRANTS` and `db_auth` behavior.
  - **Pull Requests**: #1823, #1802

## Contributors Overview (excluding merge commits)
- **Song Won-ryong** (@swi0110) - 28 commits
- **Hyung-Gyu Ryoo** (@hgryoo) - 26 commits
- **junsklee** (@junsklee) - 7 commits
- **jongmin-won** (@jongmin-won) - 6 commit
- **zionyun** (@zionyun) - 1 commit
- **kwonhoil** (@kwonhoil) - 1 commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants