1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add the sqlite3Int64ToText() routine and use it to convert integers to text,

as it is much faster than the generic text formatter.

FossilOrigin-Name: 14eed318aa9e6e16d1aa13a9f34e3822aa135c39ba06c77df7743509fed6c95e
This commit is contained in:
drh
2020-07-21 18:25:19 +00:00
parent bbd620e22c
commit 82b0f106ce
6 changed files with 44 additions and 17 deletions

View File

@@ -1112,8 +1112,8 @@ static void strftimeFunc(
case 'm': sqlite3_snprintf(3, &z[j],"%02d",x.M); j+=2; break;
case 'M': sqlite3_snprintf(3, &z[j],"%02d",x.m); j+=2; break;
case 's': {
sqlite3_snprintf(30,&z[j],"%lld",
(i64)(x.iJD/1000 - 21086676*(i64)10000));
i64 iS = (i64)(x.iJD/1000 - 21086676*(i64)10000);
sqlite3Int64ToText(iS, &z[j]);
j += sqlite3Strlen30(&z[j]);
break;
}