1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-09 10:21:35 +03:00

Improved error messages when column integers in an ORDER BY clause are

out of range.

FossilOrigin-Name: bd960d937f8d6521c8ec4b7bd8a77a498dd432d4
This commit is contained in:
drh
2012-12-07 23:23:53 +00:00
parent 8e049633aa
commit 85d641f948
4 changed files with 20 additions and 10 deletions

View File

@@ -956,7 +956,7 @@ static int resolveOrderGroupBy(
/* The ORDER BY term is an integer constant. Again, set the column
** number so that sqlite3ResolveOrderGroupBy() will convert the
** order-by term to a copy of the result-set expression */
if( (iCol & ~0xffff)!=0 ){
if( iCol<1 || iCol>0xffff ){
resolveOutOfRangeError(pParse, zType, i+1, nResult);
return 1;
}