~giuseppe-maxia/mysql-sandbox/mysql-sandbox-3

« back to all changes in this revision

Viewing changes to t/user_privileges.sb.pl

  • Committer: g.maxia at gmail
  • Date: 2015-08-02 15:15:16 UTC
  • Revision ID: g.maxia@gmail.com-20150802151516-3blys2q56v788sc1
- Added default name for relay log files.
- Added 'show_binlog' script in each sandbox
- improved tests by getting all the version components from a single function call
- Added GTID initialization options for MySQL 5.6, 5.7, and MariaDB 10
- Added GTID enabling test for MySQL 5.6 and 5.7
- added and improved more tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#
5
5
 
6
6
my $TEST_VERSION = $ENV{TEST_VERSION};
7
 
my ($bare_version, $version) = get_bare_version ($TEST_VERSION);
 
7
my ($bare_version, $version, $major, $minor, $rev) = get_bare_version ($TEST_VERSION);
8
8
my $SANDBOX_HOME= $ENV{SANDBOX_HOME} || "$ENV{HOME}/sandboxes";
9
9
my $password_field='password';
10
10
 
11
 
if ($TEST_VERSION =~ /5\.(\d+)\.(\d+)/)
 
11
if ( (($major ==5) &&  ($minor > 7) )
 
12
        or 
 
13
    ( ($major ==5) && ($minor == 7) && ($rev > 5) ) 
 
14
   )
 
15
# Starting with MySQL 5.7.6, the 'password' column in the user table is gone
 
16
# There is , instead, a column named 'authentication_string'
12
17
{
13
 
    my $minor=$1;
14
 
    my $rev=$2;
15
 
    # Starting with MySQL 5.7.6, the 'password' column in the user table is gone
16
 
    # There is , instead, a column named 'authentication_string'
17
 
    if ( ($minor > 7) 
18
 
            or 
19
 
        ( ($minor == 7) && ($rev > 5)) 
20
 
       )
21
 
    {
22
 
        $password_field='authentication_string';
23
 
    }
 
18
    $password_field='authentication_string';
24
19
}
25
20
 
26
21