From eaee2d6e7b283965c9b2fdc9e2813c9977ce4963 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Oct 2005 09:44:25 +0200 Subject: ndb - prelim perl scripts to autotest BitKeeper/deleted/.del-ndb_range_bounds.pl~ff7e47a35fb44c74: Delete: mysql-test/ndb/ndb_range_bounds.pl --- mysql-test/ndb/ndb_range_bounds.pl | 138 ------------------------------------- 1 file changed, 138 deletions(-) delete mode 100644 mysql-test/ndb/ndb_range_bounds.pl (limited to 'mysql-test/ndb') diff --git a/mysql-test/ndb/ndb_range_bounds.pl b/mysql-test/ndb/ndb_range_bounds.pl deleted file mode 100644 index 75b7f8a33e1..00000000000 --- a/mysql-test/ndb/ndb_range_bounds.pl +++ /dev/null @@ -1,138 +0,0 @@ -# -# test range scan bounds -# output to mysql-test/t/ndb_range_bounds.test -# -# give option --all to generate all cases -# - -use strict; -use integer; -use Getopt::Long; - -my $opt_all = 0; -my $opt_cnt = 5; -GetOptions("all" => \$opt_all, "cnt=i" => \$opt_cnt) - or die "options are: --all --cnt=N"; - -my $table = 't'; - -print < 1, - 'exp' => '9 = 9', - 'cnt' => scalar @$val, - }; -} - -sub mkone ($$$\@) { - my($col, $op, $key, $val) = @_; - my $cnt = scalar cut($op, $key, @$val); - return { - 'exp' => "$col $op $key", - 'cnt' => $cnt, - }; -} - -sub mktwo ($$$$$\@) { - my($col, $op1, $key1, $op2, $key2, $val) = @_; - my $cnt = scalar cut($op2, $key2, cut($op1, $key1, @$val)); - return { - 'exp' => "$col $op1 $key1 and $col $op2 $key2", - 'cnt' => $cnt, - }; -} - -sub mkall ($$$\@) { - my($col, $key1, $key2, $val) = @_; - my @a = (); - my $p = mkdummy(@$val); - push(@a, $p) if $opt_all; - my @ops = qw(< <= = >= >); - for my $op (@ops) { - my $p = mkone($col, $op, $key1, @$val); - push(@a, $p) if $opt_all || $p->{cnt} != 0; - } - my @ops1 = $opt_all ? @ops : qw(= >= >); - my @ops2 = $opt_all ? @ops : qw(<= <); - for my $op1 (@ops1) { - for my $op2 (@ops2) { - my $p = mktwo($col, $op1, $key1, $op2, $key2, @$val); - push(@a, $p) if $opt_all || $p->{cnt} != 0; - } - } - return \@a; -} - -for my $nn ("bcd", "") { - my %nn; - for my $x (qw(b c d)) { - $nn{$x} = $nn =~ /$x/ ? "not null" : "null"; - } - print <{cnt} * @val * @val; - print "select count(*) - $cnt1 from $table"; - print " where $p1->{exp};\n"; - for my $p2 (@$a2) { - my $cnt2 = $p1->{cnt} * $p2->{cnt} * @val; - print "select count(*) - $cnt2 from $table"; - print " where $p1->{exp} and $p2->{exp};\n"; - for my $p3 (@$a3) { - my $cnt3 = $p1->{cnt} * $p2->{cnt} * $p3->{cnt}; - print "select count(*) - $cnt3 from $table"; - print " where $p1->{exp} and $p2->{exp} and $p3->{exp};\n"; - } - } - } - print <