CoolFace
Modelpublic

AryaWu/sqlite

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
wal_injectable_functions.json282 linesDownload Raw Back to injectable_functions
1[2  {3    "function_name": "sehExceptionFilter",4    "function_signature": "static int sehExceptionFilter(Wal *pWal, int eCode, EXCEPTION_POINTERS *p)",5    "test_filename": "tests_wal_sehExceptionFilter.c"6  },7  {8    "function_name": "sehInjectFault",9    "function_signature": "static void sehInjectFault(Wal *pWal)",10    "test_filename": "tests_wal_sehInjectFault.c"11  },12  {13    "function_name": "walIndexPageRealloc",14    "function_signature": "static SQLITE_NOINLINE int walIndexPageRealloc(\n  Wal *pWal,               /* The WAL context */\n  int iPage,               /* The page we seek */\n  volatile u32 **ppPage    /* Write the page pointer here */\n)",15    "test_filename": "tests_wal_walIndexPageRealloc.c"16  },17  {18    "function_name": "walIndexPage",19    "function_signature": "static int walIndexPage(\n  Wal *pWal,               /* The WAL context */\n  int iPage,               /* The page we seek */\n  volatile u32 **ppPage    /* Write the page pointer here */\n)",20    "test_filename": "tests_wal_walIndexPage.c"21  },22  {23    "function_name": "walChecksumBytes",24    "function_signature": "static void walChecksumBytes(\n  int nativeCksum, /* True for native byte-order, false for non-native */\n  u8 *a,           /* Content to be checksummed */\n  int nByte,       /* Bytes of content in a[].  Must be a multiple of 8. */\n  const u32 *aIn,  /* Initial checksum value input */\n  u32 *aOut        /* OUT: Final checksum value output */\n)",25    "test_filename": "tests_wal_walChecksumBytes.c"26  },27  {28    "function_name": "walIndexWriteHdr",29    "function_signature": "static SQLITE_NO_TSAN void walIndexWriteHdr(Wal *pWal)",30    "test_filename": "tests_wal_walIndexWriteHdr.c"31  },32  {33    "function_name": "walEncodeFrame",34    "function_signature": "static void walEncodeFrame(\n  Wal *pWal,                      /* The write-ahead log */\n  u32 iPage,                      /* Database page number for frame */\n  u32 nTruncate,                  /* New db size (or 0 for non-commit frames) */\n  u8 *aData,                      /* Pointer to page data */\n  u8 *aFrame                      /* OUT: Write encoded frame here */\n)",35    "test_filename": "tests_wal_walEncodeFrame.c"36  },37  {38    "function_name": "walDecodeFrame",39    "function_signature": "static int walDecodeFrame(\n  Wal *pWal,                      /* The write-ahead log */\n  u32 *piPage,                    /* OUT: Database page number for frame */\n  u32 *pnTruncate,                /* OUT: New db size (or 0 if not commit) */\n  u8 *aData,                      /* Pointer to page data (for checksum) */\n  u8 *aFrame                      /* Frame data */\n)",40    "test_filename": "tests_wal_walDecodeFrame.c"41  },42  {43    "function_name": "walLockShared",44    "function_signature": "static int walLockShared(Wal *pWal, int lockIdx)",45    "test_filename": "tests_wal_walLockShared.c"46  },47  {48    "function_name": "walLockExclusive",49    "function_signature": "static int walLockExclusive(Wal *pWal, int lockIdx, int n)",50    "test_filename": "tests_wal_walLockExclusive.c"51  },52  {53    "function_name": "walUnlockExclusive",54    "function_signature": "static void walUnlockExclusive(Wal *pWal, int lockIdx, int n)",55    "test_filename": "tests_wal_walUnlockExclusive.c"56  },57  {58    "function_name": "walHashGet",59    "function_signature": "static int walHashGet(\n  Wal *pWal,                      /* WAL handle */\n  int iHash,                      /* Find the iHash'th table */\n  WalHashLoc *pLoc                /* OUT: Hash table location */\n)",60    "test_filename": "tests_wal_walHashGet.c"61  },62  {63    "function_name": "walFramePage",64    "function_signature": "static int walFramePage(u32 iFrame)",65    "test_filename": "tests_wal_walFramePage.c"66  },67  {68    "function_name": "walCleanupHash",69    "function_signature": "static void walCleanupHash(Wal *pWal)",70    "test_filename": "tests_wal_walCleanupHash.c"71  },72  {73    "function_name": "walIndexAppend",74    "function_signature": "static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage)",75    "test_filename": "tests_wal_walIndexAppend.c"76  },77  {78    "function_name": "walIndexRecover",79    "function_signature": "static int walIndexRecover(Wal *pWal)",80    "test_filename": "tests_wal_walIndexRecover.c"81  },82  {83    "function_name": "walIndexClose",84    "function_signature": "static void walIndexClose(Wal *pWal, int isDelete)",85    "test_filename": "tests_wal_walIndexClose.c"86  },87  {88    "function_name": "sqlite3WalOpen",89    "function_signature": "int sqlite3WalOpen(\n  sqlite3_vfs *pVfs,              /* vfs module to open wal and wal-index */\n  sqlite3_file *pDbFd,            /* The open database file */\n  const char *zWalName,           /* Name of the WAL file */\n  int bNoShm,                     /* True to run in heap-memory mode */\n  i64 mxWalSize,                  /* Truncate WAL to this size on reset */\n  Wal **ppWal                     /* OUT: Allocated Wal handle */\n)",90    "test_filename": "tests_wal_sqlite3WalOpen.c"91  },92  {93    "function_name": "walIteratorNext",94    "function_signature": "static int walIteratorNext(\n  WalIterator *p,               /* Iterator */\n  u32 *piPage,                  /* OUT: The page number of the next page */\n  u32 *piFrame                  /* OUT: Wal frame index of next page */\n)",95    "test_filename": "tests_wal_walIteratorNext.c"96  },97  {98    "function_name": "walMerge",99    "function_signature": "static void walMerge(\n  const u32 *aContent,            /* Pages in wal - keys for the sort */\n  ht_slot *aLeft,                 /* IN: Left hand input list */\n  int nLeft,                      /* IN: Elements in array *paLeft */\n  ht_slot **paRight,              /* IN/OUT: Right hand input list */\n  int *pnRight,                   /* IN/OUT: Elements in *paRight */\n  ht_slot *aTmp                   /* Temporary buffer */\n)",100    "test_filename": "tests_wal_walMerge.c"101  },102  {103    "function_name": "walMergesort",104    "function_signature": "static void walMergesort(\n  const u32 *aContent,            /* Pages in wal */\n  ht_slot *aBuffer,               /* Buffer of at least *pnList items to use */\n  ht_slot *aList,                 /* IN/OUT: List to sort */\n  int *pnList                     /* IN/OUT: Number of elements in aList[] */\n)",105    "test_filename": "tests_wal_walMergesort.c"106  },107  {108    "function_name": "walIteratorInit",109    "function_signature": "static int walIteratorInit(Wal *pWal, u32 nBackfill, WalIterator **pp)",110    "test_filename": "tests_wal_walIteratorInit.c"111  },112  {113    "function_name": "walEnableBlocking",114    "function_signature": "static int walEnableBlocking(Wal *pWal)",115    "test_filename": "tests_wal_walEnableBlocking.c"116  },117  {118    "function_name": "sqlite3WalWriteLock",119    "function_signature": "int sqlite3WalWriteLock(Wal *pWal, int bLock)",120    "test_filename": "tests_wal_sqlite3WalWriteLock.c"121  },122  {123    "function_name": "walBusyLock",124    "function_signature": "static int walBusyLock(\n  Wal *pWal,                      /* WAL connection */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int lockIdx,                    /* Offset of first byte to lock */\n  int n                           /* Number of bytes to lock */\n)",125    "test_filename": "tests_wal_walBusyLock.c"126  },127  {128    "function_name": "walRestartHdr",129    "function_signature": "static void walRestartHdr(Wal *pWal, u32 salt1)",130    "test_filename": "tests_wal_walRestartHdr.c"131  },132  {133    "function_name": "walCheckpoint",134    "function_signature": "static int walCheckpoint(\n  Wal *pWal,                      /* Wal connection */\n  sqlite3 *db,                    /* Check for interrupts on this handle */\n  int eMode,                      /* One of PASSIVE, FULL or RESTART */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int sync_flags,                 /* Flags for OsSync() (or 0) */\n  u8 *zBuf                        /* Temporary buffer to use */\n)",135    "test_filename": "tests_wal_walCheckpoint.c"136  },137  {138    "function_name": "walLimitSize",139    "function_signature": "static void walLimitSize(Wal *pWal, i64 nMax)",140    "test_filename": "tests_wal_walLimitSize.c"141  },142  {143    "function_name": "walHandleException",144    "function_signature": "static int walHandleException(Wal *pWal)",145    "test_filename": "tests_wal_walHandleException.c"146  },147  {148    "function_name": "walAssertLockmask",149    "function_signature": "static int walAssertLockmask(Wal *pWal)",150    "test_filename": "tests_wal_walAssertLockmask.c"151  },152  {153    "function_name": "sqlite3WalClose",154    "function_signature": "int sqlite3WalClose(\n  Wal *pWal,                      /* Wal to close */\n  sqlite3 *db,                    /* For interrupt flag */\n  int sync_flags,                 /* Flags to pass to OsSync() (or 0) */\n  int nBuf,\n  u8 *zBuf                        /* Buffer of at least nBuf bytes */\n)",155    "test_filename": "tests_wal_sqlite3WalClose.c"156  },157  {158    "function_name": "walIndexTryHdr",159    "function_signature": "static SQLITE_NO_TSAN int walIndexTryHdr(Wal *pWal, int *pChanged)",160    "test_filename": "tests_wal_walIndexTryHdr.c"161  },162  {163    "function_name": "walIndexReadHdr",164    "function_signature": "static int walIndexReadHdr(Wal *pWal, int *pChanged)",165    "test_filename": "tests_wal_walIndexReadHdr.c"166  },167  {168    "function_name": "walBeginShmUnreliable",169    "function_signature": "static int walBeginShmUnreliable(Wal *pWal, int *pChanged)",170    "test_filename": "tests_wal_walBeginShmUnreliable.c"171  },172  {173    "function_name": "walTryBeginRead",174    "function_signature": "static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int *pCnt)",175    "test_filename": "tests_wal_walTryBeginRead.c"176  },177  {178    "function_name": "walSnapshotRecover",179    "function_signature": "static int walSnapshotRecover(\n  Wal *pWal,                      /* WAL handle */\n  void *pBuf1,                    /* Temp buffer pWal->szPage bytes in size */\n  void *pBuf2                     /* Temp buffer pWal->szPage bytes in size */\n)",180    "test_filename": null181  },182  {183    "function_name": "sqlite3WalSnapshotRecover",184    "function_signature": "int sqlite3WalSnapshotRecover(Wal *pWal)",185    "test_filename": "tests_wal_sqlite3WalSnapshotRecover.c"186  },187  {188    "function_name": "walBeginReadTransaction",189    "function_signature": "static int walBeginReadTransaction(Wal *pWal, int *pChanged)",190    "test_filename": "tests_wal_walBeginReadTransaction.c"191  },192  {193    "function_name": "sqlite3WalEndReadTransaction",194    "function_signature": "void sqlite3WalEndReadTransaction(Wal *pWal)",195    "test_filename": "tests_wal_sqlite3WalEndReadTransaction.c"196  },197  {198    "function_name": "walFindFrame",199    "function_signature": "static int walFindFrame(\n  Wal *pWal,                      /* WAL handle */\n  Pgno pgno,                      /* Database page number to read data for */\n  u32 *piRead                     /* OUT: Frame number (or zero) */\n)",200    "test_filename": "tests_wal_walFindFrame.c"201  },202  {203    "function_name": "sqlite3WalReadFrame",204    "function_signature": "int sqlite3WalReadFrame(\n  Wal *pWal,                      /* WAL handle */\n  u32 iRead,                      /* Frame to read */\n  int nOut,                       /* Size of buffer pOut in bytes */\n  u8 *pOut                        /* Buffer to write page data to */\n)",205    "test_filename": "tests_wal_sqlite3WalReadFrame.c"206  },207  {208    "function_name": "sqlite3WalBeginWriteTransaction",209    "function_signature": "int sqlite3WalBeginWriteTransaction(Wal *pWal)",210    "test_filename": "tests_wal_sqlite3WalBeginWriteTransaction.c"211  },212  {213    "function_name": "sqlite3WalUndo",214    "function_signature": "int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx)",215    "test_filename": "tests_wal_sqlite3WalUndo.c"216  },217  {218    "function_name": "sqlite3WalSavepointUndo",219    "function_signature": "int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData)",220    "test_filename": "tests_wal_sqlite3WalSavepointUndo.c"221  },222  {223    "function_name": "walRestartLog",224    "function_signature": "static int walRestartLog(Wal *pWal)",225    "test_filename": "tests_wal_walRestartLog.c"226  },227  {228    "function_name": "walWriteToLog",229    "function_signature": "static int walWriteToLog(\n  WalWriter *p,              /* WAL to write to */\n  void *pContent,            /* Content to be written */\n  int iAmt,                  /* Number of bytes to write */\n  sqlite3_int64 iOffset      /* Start writing at this offset */\n)",230    "test_filename": "tests_wal_walWriteToLog.c"231  },232  {233    "function_name": "walWriteOneFrame",234    "function_signature": "static int walWriteOneFrame(\n  WalWriter *p,               /* Where to write the frame */\n  PgHdr *pPage,               /* The page of the frame to be written */\n  int nTruncate,              /* The commit flag.  Usually 0.  >0 for commit */\n  sqlite3_int64 iOffset       /* Byte offset at which to write */\n)",235    "test_filename": "tests_wal_walWriteOneFrame.c"236  },237  {238    "function_name": "walRewriteChecksums",239    "function_signature": "static int walRewriteChecksums(Wal *pWal, u32 iLast)",240    "test_filename": null241  },242  {243    "function_name": "walFrames",244    "function_signature": "static int walFrames(\n  Wal *pWal,                      /* Wal handle to write to */\n  int szPage,                     /* Database page-size in bytes */\n  PgHdr *pList,                   /* List of dirty pages to write */\n  Pgno nTruncate,                 /* Database size after this commit */\n  int isCommit,                   /* True if this is a commit */\n  int sync_flags                  /* Flags to pass to OsSync() (or 0) */\n)",245    "test_filename": "tests_wal_walFrames.c"246  },247  {248    "function_name": "sqlite3WalFrames",249    "function_signature": "int sqlite3WalFrames(\n  Wal *pWal,                      /* Wal handle to write to */\n  int szPage,                     /* Database page-size in bytes */\n  PgHdr *pList,                   /* List of dirty pages to write */\n  Pgno nTruncate,                 /* Database size after this commit */\n  int isCommit,                   /* True if this is a commit */\n  int sync_flags                  /* Flags to pass to OsSync() (or 0) */\n)",250    "test_filename": "tests_wal_sqlite3WalFrames.c"251  },252  {253    "function_name": "sqlite3WalCheckpoint",254    "function_signature": "int sqlite3WalCheckpoint(\n  Wal *pWal,                      /* Wal connection */\n  sqlite3 *db,                    /* Check this handle's interrupt flag */\n  int eMode,                      /* PASSIVE, FULL, RESTART, or TRUNCATE */\n  int (*xBusy)(void*),            /* Function to call when busy */\n  void *pBusyArg,                 /* Context argument for xBusyHandler */\n  int sync_flags,                 /* Flags to sync db file with (or 0) */\n  int nBuf,                       /* Size of temporary buffer */\n  u8 *zBuf,                       /* Temporary buffer to use */\n  int *pnLog,                     /* OUT: Number of frames in WAL */\n  int *pnCkpt                     /* OUT: Number of backfilled frames in WAL */\n)",255    "test_filename": "tests_wal_sqlite3WalCheckpoint.c"256  },257  {258    "function_name": "sqlite3WalExclusiveMode",259    "function_signature": "int sqlite3WalExclusiveMode(Wal *pWal, int op)",260    "test_filename": "tests_wal_sqlite3WalExclusiveMode.c"261  },262  {263    "function_name": "sqlite3WalSnapshotGet",264    "function_signature": "int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot)",265    "test_filename": "tests_wal_sqlite3WalSnapshotGet.c"266  },267  {268    "function_name": "sqlite3WalSnapshotOpen",269    "function_signature": "void sqlite3WalSnapshotOpen(\n  Wal *pWal,\n  sqlite3_snapshot *pSnapshot\n)",270    "test_filename": "tests_wal_sqlite3WalSnapshotOpen.c"271  },272  {273    "function_name": "sqlite3_snapshot_cmp",274    "function_signature": "int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2)",275    "test_filename": "tests_wal_sqlite3_snapshot_cmp.c"276  },277  {278    "function_name": "sqlite3WalSnapshotCheck",279    "function_signature": "int sqlite3WalSnapshotCheck(Wal *pWal, sqlite3_snapshot *pSnapshot)",280    "test_filename": "tests_wal_sqlite3WalSnapshotCheck.c"281  }282]