odc
odc copied to clipboard
[Bug]: comment issue when it is above a global variable in package
ODC version
版本号:4.2.3 Server: 4.2.3-20231225 Release Date: 2023-12-25
OB version
Server version: OceanBase 4.2.1.3 (r103030022024011313-c6afef2be5748fc54b1b0159b5224ae288491424) (Built Jan 13 2024 13:36:43)
What happened?
It show syntax error when run the scripts in ODC SQL windows
DELIMITER $$
CREATE OR REPLACE PACKAGE pkg_test_e IS
--comment
gn_test INT;
END pkg_test_e;
$$
执行以下 SQL 失败
CREATE OR REPLACE PACKAGE pkg_test_e IS --comme t gn_test INT; END pkg_test_e;
失败原因:
ErrorCode = 900, SQLState = 42000, Details = ORA-00900: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'INT' at line 5
What did you expect to happen?
It works well when executing the scripts on obclient command line:
obclient [TEST_USER_C]> DELIMITER $$
obclient [TEST_USER_C]> CREATE OR REPLACE PACKAGE pkg_test_e IS
->
-> --comment
-> gn_test INT;
->
-> END pkg_test_e;
-> $$
Query OK, 0 rows affected (0.093 sec)
obclient [TEST_USER_C]>
obclient [TEST_USER_C]> show errors$$
Empty set (0.039 sec)
Then check the DDL:
How can we reproduce it (as minimally and precisely as possible)?
Run the scripts in ODC SQL windows
DELIMITER $$
CREATE OR REPLACE PACKAGE pkg_test_e IS
--comment
gn_test INT;
END pkg_test_e;
$$
Anything else we need to know?
Remove the comment, it runs well.
Cloud
No response