~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/suite/perfschema/t/bad_option_4.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Tests for PERFORMANCE_SCHEMA
 
2
# Check error handling for invalid server start options
 
3
 
 
4
--source include/not_embedded.inc
 
5
--source include/have_perfschema.inc
 
6
 
 
7
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_4.txt;
 
8
--error 0,1
 
9
--remove_file $outfile
 
10
--error 1
 
11
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -h bad_option_h_param > $outfile 2>&1
 
12
 
 
13
perl;
 
14
    use strict;
 
15
    use warnings;
 
16
    my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_4.txt";
 
17
    open(FILE, "<", $fname) or die;
 
18
    my @lines= <FILE>;
 
19
    # those must be in the file for the test to pass
 
20
    my @patterns=
 
21
      ("Can't change dir to.*bad_option_h_param",
 
22
       "Aborting");
 
23
    foreach my $one_line (@lines)
 
24
    {
 
25
      foreach my $one_pattern (@patterns)
 
26
      {
 
27
        # print pattern, not line, to get a stable output
 
28
        print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/);
 
29
      }
 
30
    }
 
31
    close FILE;
 
32
EOF
 
33
--remove_file $outfile
 
34