Blame tests/p_mysql/75_mysqld55_grant_test.sh

Christoph Galuschka 72f89d
#!/bin/sh
Christoph Galuschka 72f89d
# Author: Athmane Madjoudj <athmanem@gmail.com>
Christoph Galuschka 36e953
#	  Christoph Galuschka <tigalch@tigalch.org>
Christoph Galuschka 72f89d
Christoph Galuschka 9f77d9
t_Log "Running $0 - MySQL55 GRANT privileges test"
Christoph Galuschka 72f89d
Christoph Galuschka 36e953
if [ $centos_ver -gt 5 ]
Christoph Galuschka 110e92
then
Christoph Galuschka 36e953
  t_Log 'mysql55 is only supported on C5, skipping'
Christoph Galuschka 110e92
  t_CheckExitStatus 0       
Christoph Galuschka 110e92
  exit 0
Christoph Galuschka 110e92
fi
Christoph Galuschka 110e92
Christoph Galuschka 72f89d
mysql -u root -e 'create database mysql_test;'  > /dev/null 2>&1
Christoph Galuschka 72f89d
mysql -u root -e "grant all on mysql_test.* to mysql_test@localhost identified by 'mysqltest'"  > /dev/null 2>&1
Christoph Galuschka 72f89d
mysql -u root -e "flush privileges;" > /dev/null 2>&1
Christoph Galuschka 72f89d
mysql -u mysql_test -pmysqltest mysql_test -e 'create table test_table(id int);' > /dev/null 2>&1
Christoph Galuschka 72f89d
ret_val=$?
Christoph Galuschka 72f89d
Christoph Galuschka 72f89d
# Clean up
Christoph Galuschka 72f89d
mysql -u root -e 'drop database mysql_test;'  > /dev/null 2>&1
Christoph Galuschka 72f89d
Christoph Galuschka 72f89d
t_CheckExitStatus $ret_val