1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Optimization to the round() SQL function for large input values without a

fractional part.

FossilOrigin-Name: e95138f5f4febde598f39e031d6e4f4d5ad0adbd8dcdd34fd0baaa78ab393417
This commit is contained in:
drh
2019-05-30 13:47:10 +00:00
parent 05921223c2
commit 84422db987
4 changed files with 14 additions and 12 deletions

View File

@@ -404,6 +404,8 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
int i;
incr = 2;
assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
testcase( enc==SQLITE_UTF16LE );
testcase( enc==SQLITE_UTF16BE );
for(i=3-enc; i<length && z[i]==0; i+=2){}
if( i<length ) eType = -100;
zEnd = &z[i^1];