mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Relax the restriction on using bytes 0x80 through 0xbf as the first
character of an identifier. Enhancements to ALTER TABLE tests for tables with strange names or stange column names. (CVS 4008) FossilOrigin-Name: 262a3e6339b31f269f8f07e43d295b90827e2779
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.431 2007/05/15 03:56:49 drh Exp $
|
||||
** $Id: build.c,v 1.432 2007/05/15 14:34:32 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1562,16 +1562,13 @@ void sqlite3EndTable(
|
||||
#ifndef SQLITE_OMIT_ALTERTABLE
|
||||
if( !p->pSelect ){
|
||||
const char *zName = (const char *)pParse->sNameToken.z;
|
||||
int nName, i, nUtfChar;
|
||||
int nName;
|
||||
assert( !pSelect && pCons && pEnd );
|
||||
if( pCons->z==0 ){
|
||||
pCons = pEnd;
|
||||
}
|
||||
nName = (const char *)pCons->z - zName;
|
||||
for(i=nUtfChar=0; i<nName; i++){
|
||||
if( (zName[i]&0xc0)!=0x80 ) nUtfChar++;
|
||||
}
|
||||
p->addColOffset = 13 + nUtfChar;
|
||||
p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user