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

Return an error if localtime_r() fails within one of the date/time functions. Fix for [bd484a090c].

FossilOrigin-Name: 76ae8257efc1df6e20ce5718d4824adbbde423ec
This commit is contained in:
dan
2011-06-21 12:47:30 +00:00
parent 3dcf39afa0
commit c17d696c14
8 changed files with 203 additions and 38 deletions

View File

@@ -2903,6 +2903,17 @@ int sqlite3_test_control(int op, ...){
break;
}
/* sqlite3_test_control(SQLITE_TESTCTRL_LOCALTIME_FAULT, int onoff);
**
** If parameter onoff is non-zero, configure the wrappers so that all
** subsequent calls to localtime() and variants fail. If onoff is zero,
** undo this setting.
*/
case SQLITE_TESTCTRL_LOCALTIME_FAULT: {
sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
break;
}
}
va_end(ap);
#endif /* SQLITE_OMIT_BUILTIN_TEST */