Commit 4634c225 authored by Yoni Fogel's avatar Yoni Fogel

Data is padded with spaces instead of 0-filled

for test_db_secondary
Addresses #68

git-svn-id: file:///svn/tokudb@812 c7de825b-a66e-492c-adef-691d508d4ae1
parent e872764d
...@@ -29,7 +29,7 @@ struct student_record { ...@@ -29,7 +29,7 @@ struct student_record {
char last_name[15]; char last_name[15];
char first_name[15]; char first_name[15];
}; };
#define SPACES " "
DB *dbp; DB *dbp;
DB *sdbp; DB *sdbp;
DB_TXN *const null_txn = 0; DB_TXN *const null_txn = 0;
...@@ -77,9 +77,10 @@ void second_setup() { ...@@ -77,9 +77,10 @@ void second_setup() {
void setup_student(struct student_record *s) { void setup_student(struct student_record *s) {
memset(s, 0, sizeof(struct student_record)); memset(s, 0, sizeof(struct student_record));
memcpy(&s->student_id, "WC42", strlen("WC42")); memcpy(&s->student_id, "WC42" SPACES, sizeof(s->student_id));
memcpy(&s->last_name, "Churchill", strlen("Churchill")); //Padded with enough spaces to fill out last/first name.
memcpy(&s->first_name, "Winston", strlen("Winston")); memcpy(&s->last_name, "Churchill" SPACES, sizeof(s->last_name));
memcpy(&s->first_name, "Winston" SPACES, sizeof(s->first_name));
} }
void insert_test() { void insert_test() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment