fix M-SQL group by and order by

pull/1/head
deffpuzzl 2018-06-25 09:09:45 +08:00
parent e2aa4f8af2
commit 25ad40756d
2 changed files with 2 additions and 3 deletions

View File

@ -62,7 +62,6 @@
#include <dlfcn.h>
#include <stdbool.h>
#include <libgen.h>
#define _GNU_SOURCE
#include <dirent.h>
typedef short int sint;

View File

@ -2988,7 +2988,7 @@ long _lSelectSyntax(SATvm *pstSavm, char *pszSQL, char *pszFile, char *pszDem
return RC_FAIL;
}
if((p = strcasestr(szWhere, "group")) || (p = strcasestr(szWhere, "order")))
if((p = strcasestr(szWhere, " group ")) || (p = strcasestr(szWhere, " order ")))
{
strcpy(szAdorn, p);
memset(p, 0, sizeof(szWhere) - (p - szWhere));
@ -3008,7 +3008,7 @@ long _lSelectSyntax(SATvm *pstSavm, char *pszSQL, char *pszFile, char *pszDem
}
sltrim(szTable);
if((p = strcasestr(szTable, "group")) || (p = strcasestr(szTable, "order")))
if((p = strcasestr(szTable, " group ")) || (p = strcasestr(szTable, " order ")))
{
strcpy(szAdorn, p);
memset(p, 0, sizeof(szTable) - (p - szTable));