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

Fix a problem in GROUP BY with multiple columns. (CVS 255)

FossilOrigin-Name: 22132ce18cad31482cdb9b380cedc3f53bc532b8
This commit is contained in:
drh
2001-09-18 22:17:44 +00:00
parent 1eaa2694bf
commit db5ed6d55d
5 changed files with 146 additions and 23 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.25 2001/09/16 00:13:27 drh Exp $
** $Id: util.c,v 1.26 2001/09/18 22:17:44 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -390,10 +390,10 @@ static unsigned char UpperToLower[] = {
*/
int sqliteHashNoCase(const char *z, int n){
int h = 0;
int c;
if( n<=0 ) n = strlen(z);
while( n-- > 0 && (c = *z++)!=0 ){
h = (h<<3) ^ h ^ UpperToLower[c];
while( n > 0 ){
h = (h<<3) ^ h ^ UpperToLower[*z++];
n--;
}
if( h<0 ) h = -h;
return h;