~tsarev/percona-server/5.5-processlist_rows_stats-sporadic_fails-fix

« back to all changes in this revision

Viewing changes to HandlerSocket-Plugin-for-MySQL/regtest/test_01_lib/test20.pl

Merge release branch, update version

Create release-5.5.12-20.3 with 5.5.12 changes and release branch from
5.5.11. Update versions to 5.5.12 and 20.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
# vim:sw=2:ai
 
4
 
 
5
# test for a bug that table mdl is not released when open_index is failed
 
6
 
 
7
BEGIN {
 
8
        push @INC, "../common/";
 
9
};
 
10
 
 
11
use strict;
 
12
use warnings;
 
13
use hstest;
 
14
 
 
15
my $dbh = hstest::init_testdb();
 
16
my $dbname = $hstest::conf{dbname};
 
17
my $table = 'hstesttbl';
 
18
 
 
19
$dbh->do("drop table if exists $table");
 
20
 
 
21
my $hs = hstest::get_hs_connection();
 
22
my $r = $hs->open_index(1, $dbname, $table, '', 'k,v'); # fails
 
23
print "open_index 1st r=$r\n";
 
24
undef $hs;
 
25
 
 
26
$dbh->do(
 
27
  "create table $table (k varchar(30) primary key, v varchar(30) not null) " .
 
28
  "engine = innodb");
 
29
 
 
30
$hs = hstest::get_hs_connection();
 
31
$r = $hs->open_index(1, $dbname, $table, '', 'k,v'); # success
 
32
print "open_index 2nd r=$r\n";
 
33