mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Ensure tables cannot be created/dropped when btree cursors are open. (CVS 2085)
FossilOrigin-Name: 8e5c2e5df8b824f7efb27e776240f005c6f1f0ff
This commit is contained in:
10
src/date.c
10
src/date.c
@@ -16,7 +16,7 @@
|
||||
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
|
||||
** All other code has file scope.
|
||||
**
|
||||
** $Id: date.c,v 1.39 2004/11/09 16:13:33 danielk1977 Exp $
|
||||
** $Id: date.c,v 1.40 2004/11/10 11:55:12 danielk1977 Exp $
|
||||
**
|
||||
** NOTES:
|
||||
**
|
||||
@@ -938,7 +938,6 @@ static void currentTimeFunc(
|
||||
time_t t;
|
||||
char *zFormat = (char *)sqlite3_user_data(context);
|
||||
char zBuf[20];
|
||||
struct tm now;
|
||||
|
||||
#ifdef SQLITE_TEST
|
||||
/* This test variable is located in os_XXX.c */
|
||||
@@ -950,8 +949,11 @@ extern int sqlite3_current_time;
|
||||
t = sqlite3_current_time;
|
||||
}
|
||||
#endif
|
||||
localtime_r(&t, &now);
|
||||
strftime(zBuf, 20, zFormat, &now);
|
||||
|
||||
sqlite3OsEnterMutex();
|
||||
strftime(zBuf, 20, zFormat, gmtime(&t));
|
||||
sqlite3OsLeaveMutex();
|
||||
|
||||
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user