Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/sqlite3mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,27 +437,27 @@ mcRegisterCodecExtensions(sqlite3* db, char** pzErrMsg, const sqlite3_api_routin
rc = (codecParameterTable != NULL) ? SQLITE_OK : SQLITE_NOMEM;
if (rc == SQLITE_OK)
{
rc = sqlite3_create_function(db, "sqlite3mc_config", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC,
rc = sqlite3_create_function(db, "sqlite3mc_config", 1, SQLITE_UTF8 | SQLITE_DIRECTONLY,
codecParameterTable, sqlite3mcConfigParams, 0, 0);
}
if (rc == SQLITE_OK)
{
rc = sqlite3_create_function(db, "sqlite3mc_config", 2, SQLITE_UTF8 | SQLITE_DETERMINISTIC,
rc = sqlite3_create_function(db, "sqlite3mc_config", 2, SQLITE_UTF8 | SQLITE_DIRECTONLY,
codecParameterTable, sqlite3mcConfigParams, 0, 0);
}
if (rc == SQLITE_OK)
{
rc = sqlite3_create_function(db, "sqlite3mc_config", 3, SQLITE_UTF8 | SQLITE_DETERMINISTIC,
rc = sqlite3_create_function(db, "sqlite3mc_config", 3, SQLITE_UTF8 | SQLITE_DIRECTONLY,
codecParameterTable, sqlite3mcConfigParams, 0, 0);
}
if (rc == SQLITE_OK)
{
rc = sqlite3_create_function(db, "sqlite3mc_codec_data", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC,
rc = sqlite3_create_function(db, "sqlite3mc_codec_data", 1, SQLITE_UTF8 | SQLITE_DIRECTONLY,
NULL, sqlite3mcCodecDataSql, 0, 0);
}
if (rc == SQLITE_OK)
{
rc = sqlite3_create_function(db, "sqlite3mc_codec_data", 2, SQLITE_UTF8 | SQLITE_DETERMINISTIC,
rc = sqlite3_create_function(db, "sqlite3mc_codec_data", 2, SQLITE_UTF8 | SQLITE_DIRECTONLY,
NULL, sqlite3mcCodecDataSql, 0, 0);
}
if (rc == SQLITE_OK)
Expand Down Expand Up @@ -931,8 +931,8 @@ static const sqlite3mc_core_routines sqlite3mcCoreApis =
sqlite3_preupdate_count,
sqlite3_preupdate_depth,
sqlite3_preupdate_hook,
sqlite3_preupdate_new,
sqlite3_preupdate_old,
sqlite3_preupdate_new,
#else
0,
0,
Expand Down Expand Up @@ -965,8 +965,8 @@ static const sqlite3mc_core_routines sqlite3mcCoreApis =
#endif
#if SQLITE_OS_WIN == 1
sqlite3_win32_set_directory,
sqlite3_win32_set_directory16,
sqlite3_win32_set_directory8,
sqlite3_win32_set_directory16,
#else
0,
0,
Expand Down
4 changes: 2 additions & 2 deletions src/sqlite3mc_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ static int mcWriteMainJournal(sqlite3_file* pFile, const void* buffer, int count
** Encrypt the page buffer, but only if the page number is valid
*/
void* bufferEncrypted = sqlite3mcCodec(codec, (char*) buffer, pageNo, 7);
rc = sqlite3mcGetCodecLastError(mcFile->codec);
rc = sqlite3mcGetCodecLastError(codec);
if (rc == SQLITE_OK)
{
rc = REALFILE(pFile)->pMethods->xWrite(REALFILE(pFile), bufferEncrypted, pageSize, offset);
Expand Down Expand Up @@ -1741,7 +1741,7 @@ static int mcWriteSubJournal(sqlite3_file* pFile, const void* buffer, int count,
** Encrypt the page buffer, but only if the page number is valid
*/
void* bufferEncrypted = sqlite3mcCodec(codec, (char*) buffer, pageNo, 7);
rc = sqlite3mcGetCodecLastError(mcFile->codec);
rc = sqlite3mcGetCodecLastError(codec);
if (rc == SQLITE_OK)
{
rc = REALFILE(pFile)->pMethods->xWrite(REALFILE(pFile), bufferEncrypted, pageSize, offset);
Expand Down
Loading