1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Constant ORDER BY or GROUP BY expressions are an error. (CVS 352)

FossilOrigin-Name: 035984a5b00b4a1a6505405f40b15c7695283c0a
This commit is contained in:
drh
2002-01-22 14:11:29 +00:00
parent 7613bfae56
commit 9208643d2a
10 changed files with 95 additions and 29 deletions

View File

@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.35 2002/01/14 09:28:20 drh Exp $
** $Id: util.c,v 1.36 2002/01/22 14:11:30 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -551,6 +551,8 @@ static int sortStrCmp(const char *atext, const char *btext, int useCase){
if( (ca=map[*a++])!=(cb=map[*b++]) ) break;
cclass = stateMachine[cclass*N_CHAR_CLASS + charClass[ca]];
}while( ca!=0 );
if( ca>='[' && ca<='`' ) cb = b[-1];
if( cb>='[' && cb<='`' ) ca = a[-1];
}
switch( cclass ){
case 0: