8
push @INC, "../common/";
15
my $dbh = hstest::init_testdb();
16
my $table = 'hstesttbl';
19
"create table $table (k varchar(30) primary key, v varchar(30) not null) " .
25
my $sth = $dbh->prepare("insert into $table values (?,?)");
26
for (my $i = 0; $i < $tablesize; ++$i) {
28
my $v = "v" . int(rand(1000)) . $i;
29
$sth->execute($k, $v);
33
my $hs = hstest::get_hs_connection();
34
my $dbname = $hstest::conf{dbname};
35
$hs->open_index(1, $dbname, $table, '', 'k,v');
37
dump_rec($hs, 1, 'k5'); # found
38
dump_rec($hs, 1, 'k000000'); # notfound
41
my ($hs, $idxid, $key) = @_;
42
my $r = $hs->execute_single($idxid, '=', [ $key ], 1, 0);