<commit_before>// verify that the leaf split code can handle rows larger than nodesize

#include "test.h"

static void insert(DB *db, DB_TXN *txn, int k, int val_size) {
    int r;

    // generate the key
    char key_buffer[8];
    int newa = htonl(k);
    memcpy(key_buffer, &newa, sizeof newa);

    // generate the value
    char *val_buffer = toku_malloc(val_size); assert(val_buffer);
    memset(val_buffer, 0, val_size);
    
    DBT key = { .data = key_buffer, .size = sizeof key_buffer };
    DBT value = { .data = val_buffer, .size = val_size };
    r = db->put(db, txn, &key, &value, 0); assert(r == 0);

    toku_free(val_buffer);
}

int test_main(int argc, char * const argv[]) {
#if defined(TOKUDB)
    char *db_env_dir = "blobs.leafsplit.env.tokudb";
#else<commit_msg>#3461 test case with larger rows that crash the leaf splitter refs[t:3461]<commit_after>// verify that the leaf split code can handle rows larger than nodesize

#include "test.h"

static void insert(DB *db, DB_TXN *txn, int k, int val_size) {
    int r;

    // generate the key
    char key_buffer[8];
    int newa = htonl(k);
    memcpy(key_buffer, &newa, sizeof newa);

    // generate the value
    char *val_buffer = toku_malloc(val_size); assert(val_buffer);
    memset(val_buffer, 0, val_size);
    
    DBT key = { .data = key_buffer, .size = sizeof key_buffer };
    DBT value = { .data = val_buffer, .size = val_size };
    r = db->put(db, txn, &key, &value, 0); assert(r == 0);

    toku_free(val_buffer);
}

int test_main(int argc, char * const argv[]) {
#if defined(TOKUDB)
    char *db_env_dir = "blobs.leafsplit.env.tdb";
#else
{'fraction_non_alphanumeric': 0.13284132841328414, 'fraction_numerical': 0.00984009840098401, 'mean_word_length': 3.3502673796791442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5088373', 'n_tokens_mistral': 610, 'n_tokens_neox': 593, 'n_words': 176}