diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /plugin/handler_socket/regtest/test_01_lib/test20.pl | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream.tar.xz mariadb-10.5-upstream.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | plugin/handler_socket/regtest/test_01_lib/test20.pl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugin/handler_socket/regtest/test_01_lib/test20.pl b/plugin/handler_socket/regtest/test_01_lib/test20.pl new file mode 100644 index 00000000..96307e0a --- /dev/null +++ b/plugin/handler_socket/regtest/test_01_lib/test20.pl @@ -0,0 +1,33 @@ +#!/usr/bin/env perl + +# vim:sw=2:ai + +# test for a bug that table mdl is not released when open_index is failed + +BEGIN { + push @INC, "../common/"; +}; + +use strict; +use warnings; +use hstest; + +my $dbh = hstest::init_testdb(); +my $dbname = $hstest::conf{dbname}; +my $table = 'hstesttbl'; + +$dbh->do("drop table if exists $table"); + +my $hs = hstest::get_hs_connection(); +my $r = $hs->open_index(1, $dbname, $table, '', 'k,v'); # fails +print "open_index 1st r=$r\n"; +undef $hs; + +$dbh->do( + "create table $table (k varchar(30) primary key, v varchar(30) not null) " . + "engine = innodb"); + +$hs = hstest::get_hs_connection(); +$r = $hs->open_index(1, $dbname, $table, '', 'k,v'); # success +print "open_index 2nd r=$r\n"; + |