mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add error checking: Do not allow functions other than those in the
percentile extension to use the ordered-set aggregate notation. FossilOrigin-Name: 317d901429303340290334dbe7680a36339df0a50b586e3f71b6c5e5eba6d411
This commit is contained in:
@ -436,14 +436,12 @@ int sqlite3_percentile_init(
|
||||
#endif
|
||||
(void)pzErrMsg; /* Unused parameter */
|
||||
rc = sqlite3_create_window_function(db, "percentile", 2,
|
||||
SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
|
||||
percentStep, percentFinal,
|
||||
percentValue, percentInverse, 0);
|
||||
SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_SELFORDER1, 0,
|
||||
percentStep, percentFinal, percentValue, percentInverse, 0);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_create_window_function(db, "median", 1,
|
||||
SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
|
||||
percentStep, percentFinal,
|
||||
percentValue, percentInverse, 0);
|
||||
SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_SELFORDER1, 0,
|
||||
percentStep, percentFinal, percentValue, percentInverse, 0);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user