mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Add the SQLITE_TESTCTRL_RESULT_INTREAL test-control and use it to create
the intreal() SQL function in testfixture. Write a few simple tests to prove this all works. TH3 will hold most of the INTREAL tests, probably. FossilOrigin-Name: c9838731325e0ca73bd8784c10c74ae043fed7861e6de269fd90e29fa4a19955
This commit is contained in:
@@ -563,6 +563,21 @@ void sqlite3_result_error_nomem(sqlite3_context *pCtx){
|
||||
sqlite3OomFault(pCtx->pOut->db);
|
||||
}
|
||||
|
||||
#ifndef SQLITE_UNTESTABLE
|
||||
/* Force the INT64 value currently stored as the result to be
|
||||
** a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL
|
||||
** test-control.
|
||||
*/
|
||||
void sqlite3ResultIntReal(sqlite3_context *pCtx){
|
||||
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
||||
if( pCtx->pOut->flags & MEM_Int ){
|
||||
pCtx->pOut->flags &= ~MEM_Int;
|
||||
pCtx->pOut->flags |= MEM_IntReal;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
** This function is called after a transaction has been committed. It
|
||||
** invokes callbacks registered with sqlite3_wal_hook() as required.
|
||||
|
Reference in New Issue
Block a user