-
Notifications
You must be signed in to change notification settings - Fork 126
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-25352] Add a user schema to your stored procedures for consistency with other objects #5258
Merged
jongmin-won
merged 33 commits into
CUBRID:feature/plcsql-p1n
from
jongmin-won:feature/plcsql-CBRD-25352
Aug 5, 2024
Merged
[CBRD-25352] Add a user schema to your stored procedures for consistency with other objects #5258
jongmin-won
merged 33 commits into
CUBRID:feature/plcsql-p1n
from
jongmin-won:feature/plcsql-CBRD-25352
Aug 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… feature/plcsql-p1n branch to add a user schema to a stored procedure.
…ditionally, class methods are system tables and do not require user_schema. ex) 'add_user', 'drop_user', 'find_user'
…Additionally, Resolves an error where the CALL PROCEDURE/FUNCTION statement does not work correctly.
…ocedure object, 2) select hello(); Modified so that [user_name.]hello is displayed when an error message occurs because the corresponding sp cannot be found during execution.
…ion user when executing a CREATE OR REPLACE PROCEDURE/FUNCTION, 2) Add user_schema to SP when performing a schema unload
…ames() to simplify it.
…d within an if-else-statement when the CALL statement is executed. 2) Added a part to remove the owner and user_schema when the unloaddb utility is executed as a general user, provided that the owner and user_schema are the same.
8140d1b
to
4fabc96
Compare
… 발생하도록 수정 ex) u1 사용자가 create function u2.hello 수행할 경우
…stem method 와 user method (Function& Stored_procedure) 구분을 grammar.y에서 확인하도록 수정
…st에 세션 변수가 있는 경우, csql_grammar.y에서는 세션 변수에 클래스, 객체 또는 상수 중 어떤 값이 포함되어 있는지 알 수 없습니다. 따라서, pt_bind_names()에서 java_stored_procedure가 아니고 on_call_target 값이 있으면 method로 간주하여 [user_schema]를 제거합니다.
…y value 로 잘 못 수정되는 부분 수정, 2) PT_FUNCTION 노드를 수행시 generic_name 값을 항상 downcase 하도록 수정
…x) select HELLO(); -> Query stmt: select HELLO() from dual dual
…evelop과 같이 data_type 토큰을 sp_param_type 토큰으로 변경했습니다.
ctshim
reviewed
Jul 15, 2024
hgryoo
reviewed
Jul 19, 2024
hgryoo
reviewed
Jul 19, 2024
hyunikn
reviewed
Jul 22, 2024
hyunikn
reviewed
Jul 22, 2024
hyunikn
reviewed
Jul 22, 2024
hyunikn
reviewed
Jul 22, 2024
hyunikn
reviewed
Jul 22, 2024
…value in System pl/csql has been modified as follows. [public].[dbms_output].[System_pl_csql_name] 3) We have decided to integrate the unload_schema code modification into another issue (separated for unload integration testing).
hyunikn
approved these changes
Jul 24, 2024
…ma specified in the manual is 222 bytes, but the actual error message is displayed as 223 bytes. Therefore, I have modified the error message.
ctshim
reviewed
Jul 29, 2024
ctshim
reviewed
Jul 29, 2024
ctshim
approved these changes
Jul 29, 2024
…ique_name in the change_sp_owner method.
…trdup to generate the sp_info.unique_name value, but failed to release the memory. To rectify this, we have added code to free the memory.
…on character ('\0') when performing downcase.
hgryoo
approved these changes
Aug 2, 2024
beyondykk9
approved these changes
Aug 5, 2024
jongmin-won
added a commit
to CUBRID/cubrid-testcases
that referenced
this pull request
Nov 18, 2024
…DBC, the SQL syntax included in the error message no longer displays [user_schema]. (#1967) http://jira.cubrid.org/browse/CBRD-25416 In a past PR (CUBRID/cubrid#5258), functionality was added to allow the use of [user_schema] in SPs, and the TC was modified accordingly. However, in PR (CUBRID/cubrid#5615), the logic was updated so that [user_schema] is removed from SPs in JDBC error messages.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
http://jira.cubrid.org/browse/CBRD-25352
Purpose
We will implement a feature to create a User Schema in Java Stored Procedure to ensure consistency with other objects such as tables, triggers, serial, servers, and synonyms.
Implementation
N/A
Remarks
AS-IS
CALL login ('test_user1', '') ON CLASS db_user;
CREATE FUNCTION function_hello() RETURN STRING AS LANGUAGE JAVA NAME 'SpCubrid.HelloCubrid() return java.lang.String';
CALL login ('dba', '') ON CLASS db_user;
SELECT function_hello() FROM db_root;
TO-BE
CALL login ('test_user1', '') ON CLASS db_user;
CREATE FUNCTION function_hello() RETURN STRING AS LANGUAGE JAVA NAME 'SpCubrid.HelloCubrid() return java.lang.String';
CALL login ('dba', '') ON CLASS db_user;
SELECT test_user1.function_hello() FROM db_root;