-
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-24620] Add new csql session command 'connect' #4134
Conversation
I am fixing the process when the db_name, host_name, user_name are is NULL. |
@eido5 , |
src/executables/csql.c
Outdated
char *user_name = NULL; | ||
char *host_name = NULL; | ||
char *p = NULL; | ||
CSQL_ARGUMENT csql_new_arg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using 3 variables (db_name, user_name, passwd) instead of csql_new_arg?
How about directly assigning the three variables to csql_arg after login?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because csql_arg.user_name is const * char, so we must use same structure and then copy it.
I tried what you suggest but it didn't work.
We need to completely hand over screen control to libedit for csql. If the database is offline, readline should be called by changing the prompt to '!csql> ' instead of outputting '!' and passing it to readline with prompt "csql> ". Please refer following diff as an example:
|
SA mode handling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, everything is ok.
Thank you for your efforts!
) http://jira.cubrid.org/browse/CBRD-24620 Description -The user typing that the below command to connect other users is not intuitive, while the CSQL session is connected; -CALL login ('user_name', 'password') ON CLASS db_user; So, we should add the session command user to use more intuitive while the CSQL session is connected. -;connect user_name db_name@host_name This can helps user to connect more intuitive while the CSQL session is connected. Remarks -This PR is to avoid possible memory leak of [CBRD-24620] Add new csql session command 'connect' #4134 pointed out by valgrind.
http://jira.cubrid.org/browse/CBRD-24620
Description
The user typing that the below command to connect other users is not intuitive, while the CSQL session is connected;
CALL login ('user_name', 'password') ON CLASS db_user;
So, we should add the session command user to use more intuitive while the CSQL session is connected.
;connect user_name db_name@host_name
This can helps user to connect more intuitive while the CSQL session is connected
Implementation
Remarks
N/A