fix case; adjust sqlstr

This commit is contained in:
Bob Liu 2023-11-10 14:21:41 +08:00
parent dbb271507e
commit 9f4f340622
3 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql select 'a;b' as x\G
sql select 'a;b' as x
if $rows != 1 then
return -1
endi

View File

@ -202,6 +202,11 @@ void shellRunSingleCommandImp(char *command) {
fname = sptr + 2;
while (*fname == ' ') fname++;
*sptr = '\0';
cptr = strstr(fname, ";");
if (cptr != NULL) {
*cptr = '\0';
}
}
if ((sptr = strstr(command, "\\G")) != NULL) {

View File

@ -236,22 +236,17 @@ void shellRunSingleCommandWebsocketImp(char *command) {
bool printMode = false;
if ((sptr = strstr(command, ">>")) != NULL) {
cptr = strstr(command, ";");
if (cptr != NULL) {
*cptr = '\0';
}
fname = sptr + 2;
while (*fname == ' ') fname++;
*sptr = '\0';
}
if ((sptr = strstr(command, "\\G")) != NULL) {
cptr = strstr(command, ";");
cptr = strstr(fname, ";");
if (cptr != NULL) {
*cptr = '\0';
}
}
if ((sptr = strstr(command, "\\G")) != NULL) {
*sptr = '\0';
printMode = true; // When output to a file, the switch does not work.
}