id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
,ref_id BIGINT UNSIGNED NOT NULL
,data_type ENUM( 'S', 'R' ) DEFAULT 'S'
- ,`key` TEXT NOT NULL
- ,value TEXT
- ,class TEXT
+ ,`key` LONGTEXT NOT NULL
+ ,value LONGTEXT
+ ,class LONGTEXT
,FOREIGN KEY (ref_id) REFERENCES refs (id)
ON DELETE CASCADE ON UPDATE CASCADE
,UNIQUE INDEX (ref_id, `key` (900) )
# See whether or not we are storing ourselves to ourself.
# Write the sector as data in this reference (keyed by $key)
- my $value_sector = $self->load_sector( $tmpvar->_base_offset );
+ my $value_sector = $self->load_sector( $tmpvar->_base_offset, 'refs' );
$sector->write_data({
key => $key,
- key_md5 => $self->_apply_digest( $key ),
+# key_md5 => $self->_apply_digest( $key ),
value => $value_sector,
});
$value_sector->increment_refcount;
ok(
($test_key eq $key1) ||
($test_key eq $key2) ||
- ($test_key eq $key3)
+ ($test_key eq $key3),
+ "First key found",
);
$test_key = $db->next_key($test_key);
ok(
($test_key eq $key1) ||
($test_key eq $key2) ||
- ($test_key eq $key3)
+ ($test_key eq $key3),
+ "Second key found",
);
$test_key = $db->next_key($test_key);
ok(
($test_key eq $key1) ||
($test_key eq $key2) ||
- ($test_key eq $key3)
+ ($test_key eq $key3),
+ "Third key found",
);
$test_key = $db->next_key($test_key);
- ok( !$test_key );
+ ok( !$test_key, "No fourth key" );
}
done_testing;