Commit 8e242e81 authored by Bjorn Munch's avatar Bjorn Munch

merge from 5.1-mtr

parents 82e2ca01 992f49c0
...@@ -188,6 +188,8 @@ static void init_re(void); ...@@ -188,6 +188,8 @@ static void init_re(void);
static int match_re(my_regex_t *, char *); static int match_re(my_regex_t *, char *);
static void free_re(void); static void free_re(void);
static uint opt_protocol=0;
DYNAMIC_ARRAY q_lines; DYNAMIC_ARRAY q_lines;
#include "sslopt-vars.h" #include "sslopt-vars.h"
...@@ -608,8 +610,11 @@ class LogFile { ...@@ -608,8 +610,11 @@ class LogFile {
if ((bytes= fread(buf, 1, sizeof(buf), m_file)) <= 0) if ((bytes= fread(buf, 1, sizeof(buf), m_file)) <= 0)
{ {
fprintf(stderr, "Failed to read from '%s', errno: %d\n", // ferror=0 will happen here if no queries executed yet
m_file_name, errno); if (ferror(m_file))
fprintf(stderr,
"Failed to read from '%s', errno: %d, feof:%d, ferror:%d\n",
m_file_name, errno, feof(m_file), ferror(m_file));
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -1081,6 +1086,7 @@ void handle_command_error(struct st_command *command, uint error) ...@@ -1081,6 +1086,7 @@ void handle_command_error(struct st_command *command, uint error)
command->first_word_len, command->query, error)); command->first_word_len, command->query, error));
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
if (command->expected_errors.count > 0)
die("command \"%.*s\" failed with wrong error: %d", die("command \"%.*s\" failed with wrong error: %d",
command->first_word_len, command->query, error); command->first_word_len, command->query, error);
} }
...@@ -1352,14 +1358,14 @@ void log_msg(const char *fmt, ...) ...@@ -1352,14 +1358,14 @@ void log_msg(const char *fmt, ...)
*/ */
void cat_file(DYNAMIC_STRING* ds, const char* filename) int cat_file(DYNAMIC_STRING* ds, const char* filename)
{ {
int fd; int fd;
size_t len; size_t len;
char buff[512]; char buff[512];
if ((fd= my_open(filename, O_RDONLY, MYF(0))) < 0) if ((fd= my_open(filename, O_RDONLY, MYF(0))) < 0)
die("Failed to open file '%s'", filename); return 1;
while((len= my_read(fd, (uchar*)&buff, while((len= my_read(fd, (uchar*)&buff,
sizeof(buff), MYF(0))) > 0) sizeof(buff), MYF(0))) > 0)
{ {
...@@ -1383,6 +1389,7 @@ void cat_file(DYNAMIC_STRING* ds, const char* filename) ...@@ -1383,6 +1389,7 @@ void cat_file(DYNAMIC_STRING* ds, const char* filename)
dynstr_append_mem(ds, start, p-start); dynstr_append_mem(ds, start, p-start);
} }
my_close(fd, MYF(0)); my_close(fd, MYF(0));
return 0;
} }
...@@ -2376,6 +2383,9 @@ void eval_expr(VAR *v, const char *p, const char **p_end) ...@@ -2376,6 +2383,9 @@ void eval_expr(VAR *v, const char *p, const char **p_end)
if ((vp= var_get(p, p_end, 0, 0))) if ((vp= var_get(p, p_end, 0, 0)))
var_copy(v, vp); var_copy(v, vp);
/* Apparently it is not safe to assume null-terminated string */
v->str_val[v->str_val_len]= 0;
/* Make sure there was just a $variable and nothing else */ /* Make sure there was just a $variable and nothing else */
const char* end= *p_end + 1; const char* end= *p_end + 1;
if (end < expected_end) if (end < expected_end)
...@@ -2722,6 +2732,7 @@ void do_exec(struct st_command *command) ...@@ -2722,6 +2732,7 @@ void do_exec(struct st_command *command)
else else
{ {
dynstr_free(&ds_cmd); dynstr_free(&ds_cmd);
if (command->expected_errors.count > 0)
die("command \"%s\" failed with wrong error: %d", die("command \"%s\" failed with wrong error: %d",
command->first_argument, status); command->first_argument, status);
} }
...@@ -2867,6 +2878,41 @@ void do_system(struct st_command *command) ...@@ -2867,6 +2878,41 @@ void do_system(struct st_command *command)
} }
/*
SYNOPSIS
set_wild_chars
set true to set * etc. as wild char, false to reset
DESCRIPTION
Auxiliary function to set "our" wild chars before calling wild_compare
This is needed because the default values are changed to SQL syntax
in mysqltest_embedded.
*/
void set_wild_chars (my_bool set)
{
static char old_many= 0, old_one, old_prefix;
if (set)
{
if (wild_many == '*') return; // No need
old_many= wild_many;
old_one= wild_one;
old_prefix= wild_prefix;
wild_many= '*';
wild_one= '?';
wild_prefix= 0;
}
else
{
if (! old_many) return; // Was not set
wild_many= old_many;
wild_one= old_one;
wild_prefix= old_prefix;
}
}
/* /*
SYNOPSIS SYNOPSIS
do_remove_file do_remove_file
...@@ -2943,6 +2989,10 @@ void do_remove_files_wildcard(struct st_command *command) ...@@ -2943,6 +2989,10 @@ void do_remove_files_wildcard(struct st_command *command)
dir_separator[0]= FN_LIBCHAR; dir_separator[0]= FN_LIBCHAR;
dir_separator[1]= 0; dir_separator[1]= 0;
dynstr_append(&ds_file_to_remove, dir_separator); dynstr_append(&ds_file_to_remove, dir_separator);
/* Set default wild chars for wild_compare, is changed in embedded mode */
set_wild_chars(1);
for (i= 0; i < (uint) dir_info->number_off_files; i++) for (i= 0; i < (uint) dir_info->number_off_files; i++)
{ {
file= dir_info->dir_entry + i; file= dir_info->dir_entry + i;
...@@ -2962,6 +3012,7 @@ void do_remove_files_wildcard(struct st_command *command) ...@@ -2962,6 +3012,7 @@ void do_remove_files_wildcard(struct st_command *command)
if (error) if (error)
break; break;
} }
set_wild_chars(0);
my_dirend(dir_info); my_dirend(dir_info);
end: end:
...@@ -3203,6 +3254,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname, ...@@ -3203,6 +3254,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
/* Note that my_dir sorts the list if not given any flags */ /* Note that my_dir sorts the list if not given any flags */
if (!(dir_info= my_dir(ds_dirname->str, MYF(0)))) if (!(dir_info= my_dir(ds_dirname->str, MYF(0))))
DBUG_RETURN(1); DBUG_RETURN(1);
set_wild_chars(1);
for (i= 0; i < (uint) dir_info->number_off_files; i++) for (i= 0; i < (uint) dir_info->number_off_files; i++)
{ {
file= dir_info->dir_entry + i; file= dir_info->dir_entry + i;
...@@ -3216,6 +3268,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname, ...@@ -3216,6 +3268,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
dynstr_append(ds, file->name); dynstr_append(ds, file->name);
dynstr_append(ds, "\n"); dynstr_append(ds, "\n");
} }
set_wild_chars(0);
my_dirend(dir_info); my_dirend(dir_info);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -3498,6 +3551,7 @@ void do_append_file(struct st_command *command) ...@@ -3498,6 +3551,7 @@ void do_append_file(struct st_command *command)
void do_cat_file(struct st_command *command) void do_cat_file(struct st_command *command)
{ {
int error;
static DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_filename;
const struct command_arg cat_file_args[] = { const struct command_arg cat_file_args[] = {
{ "filename", ARG_STRING, TRUE, &ds_filename, "File to read from" } { "filename", ARG_STRING, TRUE, &ds_filename, "File to read from" }
...@@ -3512,8 +3566,8 @@ void do_cat_file(struct st_command *command) ...@@ -3512,8 +3566,8 @@ void do_cat_file(struct st_command *command)
DBUG_PRINT("info", ("Reading from, file: %s", ds_filename.str)); DBUG_PRINT("info", ("Reading from, file: %s", ds_filename.str));
cat_file(&ds_res, ds_filename.str); error= cat_file(&ds_res, ds_filename.str);
handle_command_error(command, error);
dynstr_free(&ds_filename); dynstr_free(&ds_filename);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -3776,7 +3830,8 @@ void do_perl(struct st_command *command) ...@@ -3776,7 +3830,8 @@ void do_perl(struct st_command *command)
} }
error= pclose(res_file); error= pclose(res_file);
/* Remove the temporary file */ /* Remove the temporary file, but keep it if perl failed */
if (!error)
my_delete(temp_file_path, MYF(0)); my_delete(temp_file_path, MYF(0));
handle_command_error(command, WEXITSTATUS(error)); handle_command_error(command, WEXITSTATUS(error));
...@@ -4920,7 +4975,7 @@ int connect_n_handle_errors(struct st_command *command, ...@@ -4920,7 +4975,7 @@ int connect_n_handle_errors(struct st_command *command,
ds= &ds_res; ds= &ds_res;
/* Only log if an error is expected */ /* Only log if an error is expected */
if (!command->abort_on_error && if (command->expected_errors.count > 0 &&
!disable_query_log) !disable_query_log)
{ {
/* /*
...@@ -5161,11 +5216,13 @@ void do_connect(struct st_command *command) ...@@ -5161,11 +5216,13 @@ void do_connect(struct st_command *command)
#ifdef __WIN__ #ifdef __WIN__
if (con_pipe) if (con_pipe)
{ {
uint protocol= MYSQL_PROTOCOL_PIPE; opt_protocol= MYSQL_PROTOCOL_PIPE;
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
} }
#endif #endif
if (opt_protocol)
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
if (con_shm) if (con_shm)
{ {
...@@ -5337,7 +5394,19 @@ void do_block(enum block_cmd cmd, struct st_command* command) ...@@ -5337,7 +5394,19 @@ void do_block(enum block_cmd cmd, struct st_command* command)
/* Define inner block */ /* Define inner block */
cur_block++; cur_block++;
cur_block->cmd= cmd; cur_block->cmd= cmd;
cur_block->ok= (v.int_val ? TRUE : FALSE); if (v.int_val)
{
cur_block->ok= TRUE;
} else
/* Any non-empty string which does not begin with 0 is also TRUE */
{
p= v.str_val;
/* First skip any leading white space or unary -+ */
while (*p && ((my_isspace(charset_info, *p) || *p == '-' || *p == '+')))
p++;
cur_block->ok= (*p && *p != '0') ? TRUE : FALSE;
}
if (not_expr) if (not_expr)
cur_block->ok = !cur_block->ok; cur_block->ok = !cur_block->ok;
...@@ -5882,6 +5951,8 @@ static struct my_option my_long_options[] = ...@@ -5882,6 +5951,8 @@ static struct my_option my_long_options[] =
GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0}, GET_INT, REQUIRED_ARG, 128, 8, 5120, 0, 0, 0},
{"password", 'p', "Password to use when connecting to server.", {"password", 'p', "Password to use when connecting to server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection or 0 for default to, in " {"port", 'P', "Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, " "order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0 #if MYSQL_PORT_DEFAULT == 0
...@@ -6018,7 +6089,7 @@ void read_embedded_server_arguments(const char *name) ...@@ -6018,7 +6089,7 @@ void read_embedded_server_arguments(const char *name)
static my_bool static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt,
char *argument) char *argument)
{ {
switch(optid) { switch(optid) {
...@@ -6107,6 +6178,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -6107,6 +6178,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case 'V': case 'V':
print_version(); print_version();
exit(0); exit(0);
case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name);
break;
case '?': case '?':
usage(); usage();
exit(0); exit(0);
...@@ -7571,9 +7646,6 @@ void get_command_type(struct st_command* command) ...@@ -7571,9 +7646,6 @@ void get_command_type(struct st_command* command)
sizeof(saved_expected_errors)); sizeof(saved_expected_errors));
DBUG_PRINT("info", ("There are %d expected errors", DBUG_PRINT("info", ("There are %d expected errors",
command->expected_errors.count)); command->expected_errors.count));
command->abort_on_error= (command->expected_errors.count == 0 &&
abort_on_error);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -7860,6 +7932,9 @@ int main(int argc, char **argv) ...@@ -7860,6 +7932,9 @@ int main(int argc, char **argv)
mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR, mysql_options(&con->mysql, MYSQL_SET_CHARSET_DIR,
opt_charsets_dir); opt_charsets_dir);
if (opt_protocol)
mysql_options(&con->mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
#ifdef HAVE_OPENSSL #ifdef HAVE_OPENSSL
if (opt_use_ssl) if (opt_use_ssl)
...@@ -7918,6 +7993,10 @@ int main(int argc, char **argv) ...@@ -7918,6 +7993,10 @@ int main(int argc, char **argv)
command->type= Q_COMMENT; command->type= Q_COMMENT;
} }
/* (Re-)set abort_on_error for this command */
command->abort_on_error= (command->expected_errors.count == 0 &&
abort_on_error);
/* delimiter needs to be executed so we can continue to parse */ /* delimiter needs to be executed so we can continue to parse */
my_bool ok_to_do= cur_block->ok || command->type == Q_DELIMITER; my_bool ok_to_do= cur_block->ok || command->type == Q_DELIMITER;
/* /*
...@@ -8292,16 +8371,6 @@ int main(int argc, char **argv) ...@@ -8292,16 +8371,6 @@ int main(int argc, char **argv)
check_result(); check_result();
} }
} }
else
{
/*
No result_file_name specified, the result
has been printed to stdout, exit with error
unless script has called "exit" to indicate success
*/
if (abort_flag == 0)
die("Exit with failure! Call 'exit' in script to return with sucess");
}
} }
else else
{ {
......
...@@ -1910,7 +1910,7 @@ select hex(s1) from t4; ...@@ -1910,7 +1910,7 @@ select hex(s1) from t4;
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
} }
if (test_foreign_keys) if ($test_foreign_keys)
{ {
eval create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=$engine_type; eval create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=$engine_type;
eval create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=$engine_type; eval create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=$engine_type;
...@@ -2405,7 +2405,7 @@ drop table t1, t2, t3, t5, t6, t8, t9; ...@@ -2405,7 +2405,7 @@ drop table t1, t2, t3, t5, t6, t8, t9;
} }
# End transactional tests # End transactional tests
if (test_foreign_keys) if ($test_foreign_keys)
{ {
# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID" # bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
--error 1005 --error 1005
......
...@@ -188,6 +188,8 @@ sub new { ...@@ -188,6 +188,8 @@ sub new {
while ( my $line= <$F> ) { while ( my $line= <$F> ) {
chomp($line); chomp($line);
# Remove any trailing CR from Windows edited files
$line=~ s/\cM$//;
# [group] # [group]
if ( $line =~ /^\[(.*)\]/ ) { if ( $line =~ /^\[(.*)\]/ ) {
......
...@@ -30,6 +30,13 @@ sub get_basedir { ...@@ -30,6 +30,13 @@ sub get_basedir {
return $basedir; return $basedir;
} }
sub get_testdir {
my ($self, $group)= @_;
my $testdir= $group->if_exist('testdir') ||
$self->{ARGS}->{testdir};
return $testdir;
}
sub fix_charset_dir { sub fix_charset_dir {
my ($self, $config, $group_name, $group)= @_; my ($self, $config, $group_name, $group)= @_;
...@@ -142,8 +149,8 @@ sub fix_secure_file_priv { ...@@ -142,8 +149,8 @@ sub fix_secure_file_priv {
sub fix_std_data { sub fix_std_data {
my ($self, $config, $group_name, $group)= @_; my ($self, $config, $group_name, $group)= @_;
my $basedir= $self->get_basedir($group); my $testdir= $self->get_testdir($group);
return "$basedir/mysql-test/std_data"; return "$testdir/std_data";
} }
sub ssl_supported { sub ssl_supported {
......
...@@ -60,11 +60,12 @@ use My::Platform; ...@@ -60,11 +60,12 @@ use My::Platform;
my %running; my %running;
my $_verbose= 0; my $_verbose= 0;
my $start_exit= 0;
END { END {
# Kill any children still running # Kill any children still running
for my $proc (values %running){ for my $proc (values %running){
if ( $proc->is_child($$) ){ if ( $proc->is_child($$) and ! $start_exit){
#print "Killing: $proc\n"; #print "Killing: $proc\n";
if ($proc->wait_one(0)){ if ($proc->wait_one(0)){
$proc->kill(); $proc->kill();
...@@ -149,6 +150,11 @@ sub new { ...@@ -149,6 +150,11 @@ sub new {
push(@safe_args, "--"); push(@safe_args, "--");
push(@safe_args, $path); # The program safe_process should execute push(@safe_args, $path); # The program safe_process should execute
if ($start_exit) { # Bypass safe_process instead, start program directly
@safe_args= ();
$safe_path= $path;
}
push(@safe_args, @$$args); push(@safe_args, @$$args);
print "### safe_path: ", $safe_path, " ", join(" ", @safe_args), "\n" print "### safe_path: ", $safe_path, " ", join(" ", @safe_args), "\n"
...@@ -528,6 +534,13 @@ sub wait_all { ...@@ -528,6 +534,13 @@ sub wait_all {
} }
} }
#
# Set global flag to tell all safe_process to exit after starting child
#
sub start_exit {
$start_exit= 1;
}
# #
# Check if any process has exited, but don't wait. # Check if any process has exited, but don't wait.
......
...@@ -266,11 +266,11 @@ sub collect_one_suite($) ...@@ -266,11 +266,11 @@ sub collect_one_suite($)
} }
else else
{ {
$suitedir= my_find_dir($::basedir, $suitedir= my_find_dir($suitedir,
["mysql-test/suite", ["suite",
"mysql-test", ".",
# Look in storage engine specific suite dirs # Look in storage engine specific suite dirs
"storage/*/mysql-test-suites" "../storage/*/mysql-test-suites"
], ],
[$suite]); [$suite]);
} }
...@@ -584,7 +584,7 @@ sub optimize_cases { ...@@ -584,7 +584,7 @@ sub optimize_cases {
# Check that engine selected by # Check that engine selected by
# --default-storage-engine=<engine> is supported # --default-storage-engine=<engine> is supported
# ======================================================= # =======================================================
my %builtin_engines = ('myisam' => 1, 'memory' => 1); my %builtin_engines = ('myisam' => 1, 'memory' => 1, 'csv' => 1);
foreach my $opt ( @{$tinfo->{master_opt}} ) { foreach my $opt ( @{$tinfo->{master_opt}} ) {
my $default_engine= my $default_engine=
......
...@@ -124,7 +124,7 @@ sub mtr_report_test ($) { ...@@ -124,7 +124,7 @@ sub mtr_report_test ($) {
my $timest = format_time(); my $timest = format_time();
my $fail = "fail"; my $fail = "fail";
if ( $::opt_experimental ) if ( @$::experimental_test_cases )
{ {
# Find out if this test case is an experimental one, so we can treat # Find out if this test case is an experimental one, so we can treat
# the failure as an expected failure instead of a regression. # the failure as an expected failure instead of a regression.
......
This diff is collapsed.
...@@ -5138,7 +5138,7 @@ insert t1 values (1),(2),(3),(4),(5); ...@@ -5138,7 +5138,7 @@ insert t1 values (1),(2),(3),(4),(5);
truncate table t1; truncate table t1;
affected rows: 0 affected rows: 0
drop table t1; drop table t1;
create table t1 (v varchar(32) not null); create table t1 (v varchar(32) not null) engine=csv;
insert into t1 values ('def'),('abc'),('hij'),('3r4f'); insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1; select * from t1;
v v
...@@ -5146,14 +5146,14 @@ def ...@@ -5146,14 +5146,14 @@ def
abc abc
hij hij
3r4f 3r4f
alter table t1 change v v2 varchar(32); alter table t1 change v v2 varchar(32) not null;
select * from t1; select * from t1;
v2 v2
def def
abc abc
hij hij
3r4f 3r4f
alter table t1 change v2 v varchar(64); alter table t1 change v2 v varchar(64) not null;
select * from t1; select * from t1;
v v
def def
...@@ -5163,35 +5163,34 @@ hij ...@@ -5163,35 +5163,34 @@ hij
update t1 set v = 'lmn' where v = 'hij'; update t1 set v = 'lmn' where v = 'hij';
select * from t1; select * from t1;
v v
lmn
def def
abc abc
lmn
3r4f 3r4f
alter table t1 add i int auto_increment not null primary key first; alter table t1 add i int not null first;
select * from t1; select * from t1;
i v i v
1 def 0 lmn
2 abc 0 def
3 lmn 0 abc
4 3r4f 0 3r4f
update t1 set i=5 where i=3; update t1 set i=3 where v = 'abc';
select * from t1; select * from t1;
i v i v
1 def 3 abc
2 abc 0 lmn
5 lmn 0 def
4 3r4f 0 3r4f
alter table t1 change i i bigint; alter table t1 change i i bigint not null;
select * from t1; select * from t1;
i v i v
1 def 3 abc
2 abc 0 lmn
5 lmn 0 def
4 3r4f 0 3r4f
alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
i v i v
4 3r4f 3 abc
drop table t1; drop table t1;
create table bug15205 (val int(11) not null) engine=csv; create table bug15205 (val int(11) not null) engine=csv;
create table bug15205_2 (val int(11) not null) engine=csv; create table bug15205_2 (val int(11) not null) engine=csv;
......
...@@ -325,6 +325,7 @@ outer=2 ifval=0 ...@@ -325,6 +325,7 @@ outer=2 ifval=0
outer=1 ifval=1 outer=1 ifval=1
here is the sourced script here is the sourced script
ERROR 42S02: Table 'test.nowhere' doesn't exist ERROR 42S02: Table 'test.nowhere' doesn't exist
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'else' at line 1
In loop In loop
here is the sourced script here is the sourced script
...@@ -392,6 +393,9 @@ true-inner again ...@@ -392,6 +393,9 @@ true-inner again
true-outer true-outer
Counter is greater than 0, (counter=10) Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0) Counter is not 0, (counter=0)
Counter is true, (counter=alpha)
Beta is true
while with string, only once
1 1
Testing while with not Testing while with not
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
...@@ -446,7 +450,6 @@ OK ...@@ -446,7 +450,6 @@ OK
mysqltest: The test didn't produce any output mysqltest: The test didn't produce any output
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
show tables; show tables;
ERROR 3D000: No database selected ERROR 3D000: No database selected
Output from mysqltest-x.inc Output from mysqltest-x.inc
...@@ -572,7 +575,7 @@ if things work as expected ...@@ -572,7 +575,7 @@ if things work as expected
Some data Some data
for cat_file command for cat_file command
of mysqltest of mysqltest
mysqltest: At line 1: Failed to open file 'non_existing_file' mysqltest: At line 1: command "cat_file" failed with error 1
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists' mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file' mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file' mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
......
...@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost'; revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges; flush privileges;
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -91,7 +90,6 @@ USE db_storedproc_1; ...@@ -91,7 +90,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1 root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege. ...@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp3;
...@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20)) ...@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END// END//
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost'; grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer CREATE PROCEDURE sp5_s_i () sql security definer
...@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer ...@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000); insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp5_s_i(); CALL sp5_s_i();
...@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; ...@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
...@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER ...@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins'); insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -340,7 +332,6 @@ c1 ...@@ -340,7 +332,6 @@ c1
inserted outside SP inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -361,7 +352,6 @@ inserted from sp3166_s_i ...@@ -361,7 +352,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -379,7 +369,6 @@ inserted from sp3166_ins ...@@ -379,7 +369,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1 root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
......
...@@ -81,7 +81,6 @@ create user 'user_2'@'localhost'; ...@@ -81,7 +81,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
...@@ -94,7 +93,6 @@ DECLARE res INT; ...@@ -94,7 +93,6 @@ DECLARE res INT;
SET res = n * n; SET res = n * n;
RETURN res; RETURN res;
END// END//
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -113,7 +111,6 @@ fn31105( 9 ) ...@@ -113,7 +111,6 @@ fn31105( 9 )
81 81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000 ...@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 ); SELECT fn31105( 9 );
fn31105( 9 ) fn31105( 9 )
81 81
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
......
...@@ -85,8 +85,6 @@ show grants for test_yesprivs@localhost; ...@@ -85,8 +85,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2: Testcase 3.5.3.2:
----------------- -----------------
...@@ -161,8 +159,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; ...@@ -161,8 +159,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -222,8 +218,6 @@ show grants for test_yesprivs@localhost; ...@@ -222,8 +218,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -296,8 +290,6 @@ show grants for test_yesprivs@localhost; ...@@ -296,8 +290,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -351,8 +343,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; ...@@ -351,8 +343,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs; show grants for test_noprivs;
Grants for test_noprivs@% Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -407,8 +397,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; ...@@ -407,8 +397,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -464,8 +452,6 @@ show grants for test_yesprivs@localhost; ...@@ -464,8 +452,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -519,8 +505,6 @@ show grants for test_yesprivs@localhost; ...@@ -519,8 +505,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -565,8 +549,6 @@ show grants for test_noprivs@localhost; ...@@ -565,8 +549,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -611,7 +593,6 @@ Grants for test_yesprivs@localhost ...@@ -611,7 +593,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
......
...@@ -24,7 +24,6 @@ show grants for test_noprivs@localhost; ...@@ -24,7 +24,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create: no trigger privilege on db level for create:
-------------------------------------------- --------------------------------------------
...@@ -32,7 +31,6 @@ use priv_db; ...@@ -32,7 +31,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no'; set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db; use priv_db;
insert into t1 (f1) values ('insert-yes'); insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;
...@@ -253,8 +251,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; ...@@ -253,8 +251,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create: no trigger privilege on table level for create:
----------------------------------------------- -----------------------------------------------
...@@ -513,8 +509,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost; ...@@ -513,8 +509,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -563,7 +557,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost; ...@@ -563,7 +557,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -698,7 +691,6 @@ select f1 from t1 order by f1; ...@@ -698,7 +691,6 @@ select f1 from t1 order by f1;
f1 f1
insert-yes insert-yes
insert-yes insert-yes
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -767,9 +759,7 @@ Grants for test_noprivs@localhost ...@@ -767,9 +759,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
trigger privilege on one db1 db level, not on db2 trigger privilege on one db1 db level, not on db2
...@@ -982,7 +972,6 @@ create User test_useprivs@localhost; ...@@ -982,7 +972,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD'); set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1010,7 +999,6 @@ select f1 from t1 order by f1; ...@@ -1010,7 +999,6 @@ select f1 from t1 order by f1;
f1 f1
trig 1_1-yes trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_useprivs@localhost test_useprivs@localhost
...@@ -1206,7 +1194,6 @@ create table t1 (f1 char(20)) engine= innodb; ...@@ -1206,7 +1194,6 @@ create table t1 (f1 char(20)) engine= innodb;
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD'); set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1303,7 +1290,6 @@ create table t1 (f1 char(20)) engine= innodb; ...@@ -1303,7 +1290,6 @@ create table t1 (f1 char(20)) engine= innodb;
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD'); set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1375,8 +1361,6 @@ show grants for test_noprivs@localhost; ...@@ -1375,8 +1361,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column: update only on column:
---------------------- ----------------------
......
...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4: Testcase 3.5.4:
--------------- ---------------
......
...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests) Testcase 3.5.8.1: (implied in previous tests)
--------------------------------------------- ---------------------------------------------
......
...@@ -79,7 +79,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -79,7 +79,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost'; revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges; flush privileges;
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -92,7 +91,6 @@ USE db_storedproc_1; ...@@ -92,7 +91,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1 root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -113,7 +111,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege. ...@@ -113,7 +111,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp3;
...@@ -150,7 +147,6 @@ CREATE PROCEDURE sp4(v1 char(20)) ...@@ -150,7 +147,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END// END//
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -192,7 +188,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -192,7 +188,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost'; grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer CREATE PROCEDURE sp5_s_i () sql security definer
...@@ -208,7 +203,6 @@ CREATE PROCEDURE sp5_ins () sql security definer ...@@ -208,7 +203,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000); insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp5_s_i(); CALL sp5_s_i();
...@@ -306,7 +300,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; ...@@ -306,7 +300,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
...@@ -322,7 +315,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER ...@@ -322,7 +315,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins'); insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -341,7 +333,6 @@ c1 ...@@ -341,7 +333,6 @@ c1
inserted outside SP inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -362,7 +353,6 @@ inserted from sp3166_s_i ...@@ -362,7 +353,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -380,7 +370,6 @@ inserted from sp3166_ins ...@@ -380,7 +370,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1 root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
......
...@@ -82,7 +82,6 @@ create user 'user_2'@'localhost'; ...@@ -82,7 +82,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
...@@ -95,7 +94,6 @@ DECLARE res INT; ...@@ -95,7 +94,6 @@ DECLARE res INT;
SET res = n * n; SET res = n * n;
RETURN res; RETURN res;
END// END//
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -114,7 +112,6 @@ fn31105( 9 ) ...@@ -114,7 +112,6 @@ fn31105( 9 )
81 81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -135,7 +132,6 @@ a` a` 1000-01-01 -5000 a` -5000 ...@@ -135,7 +132,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 ); SELECT fn31105( 9 );
fn31105( 9 ) fn31105( 9 )
81 81
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
......
...@@ -86,8 +86,6 @@ show grants for test_yesprivs@localhost; ...@@ -86,8 +86,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2: Testcase 3.5.3.2:
----------------- -----------------
...@@ -162,8 +160,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; ...@@ -162,8 +160,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -223,8 +219,6 @@ show grants for test_yesprivs@localhost; ...@@ -223,8 +219,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -297,8 +291,6 @@ show grants for test_yesprivs@localhost; ...@@ -297,8 +291,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -352,8 +344,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; ...@@ -352,8 +344,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs; show grants for test_noprivs;
Grants for test_noprivs@% Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -408,8 +398,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; ...@@ -408,8 +398,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -465,8 +453,6 @@ show grants for test_yesprivs@localhost; ...@@ -465,8 +453,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -520,8 +506,6 @@ show grants for test_yesprivs@localhost; ...@@ -520,8 +506,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -566,8 +550,6 @@ show grants for test_noprivs@localhost; ...@@ -566,8 +550,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -612,7 +594,6 @@ Grants for test_yesprivs@localhost ...@@ -612,7 +594,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
......
...@@ -25,7 +25,6 @@ show grants for test_noprivs@localhost; ...@@ -25,7 +25,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create: no trigger privilege on db level for create:
-------------------------------------------- --------------------------------------------
...@@ -33,7 +32,6 @@ use priv_db; ...@@ -33,7 +32,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no'; set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db; use priv_db;
insert into t1 (f1) values ('insert-yes'); insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;
...@@ -254,8 +252,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; ...@@ -254,8 +252,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create: no trigger privilege on table level for create:
----------------------------------------------- -----------------------------------------------
...@@ -514,8 +510,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost; ...@@ -514,8 +510,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -564,7 +558,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost; ...@@ -564,7 +558,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -699,7 +692,6 @@ select f1 from t1 order by f1; ...@@ -699,7 +692,6 @@ select f1 from t1 order by f1;
f1 f1
insert-yes insert-yes
insert-yes insert-yes
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -768,9 +760,7 @@ Grants for test_noprivs@localhost ...@@ -768,9 +760,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
trigger privilege on one db1 db level, not on db2 trigger privilege on one db1 db level, not on db2
...@@ -983,7 +973,6 @@ create User test_useprivs@localhost; ...@@ -983,7 +973,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD'); set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1011,7 +1000,6 @@ select f1 from t1 order by f1; ...@@ -1011,7 +1000,6 @@ select f1 from t1 order by f1;
f1 f1
trig 1_1-yes trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_useprivs@localhost test_useprivs@localhost
...@@ -1207,7 +1195,6 @@ create table t1 (f1 char(20)) engine= memory; ...@@ -1207,7 +1195,6 @@ create table t1 (f1 char(20)) engine= memory;
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD'); set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1319,8 +1306,6 @@ show grants for test_noprivs@localhost; ...@@ -1319,8 +1306,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column: update only on column:
---------------------- ----------------------
......
...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4: Testcase 3.5.4:
--------------- ---------------
......
...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests) Testcase 3.5.8.1: (implied in previous tests)
--------------------------------------------- ---------------------------------------------
......
...@@ -79,7 +79,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -79,7 +79,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost'; revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges; flush privileges;
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -92,7 +91,6 @@ USE db_storedproc_1; ...@@ -92,7 +91,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1 root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -113,7 +111,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege. ...@@ -113,7 +111,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp3;
...@@ -150,7 +147,6 @@ CREATE PROCEDURE sp4(v1 char(20)) ...@@ -150,7 +147,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END// END//
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -192,7 +188,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -192,7 +188,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost'; grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer CREATE PROCEDURE sp5_s_i () sql security definer
...@@ -208,7 +203,6 @@ CREATE PROCEDURE sp5_ins () sql security definer ...@@ -208,7 +203,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000); insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp5_s_i(); CALL sp5_s_i();
...@@ -306,7 +300,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; ...@@ -306,7 +300,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
...@@ -322,7 +315,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER ...@@ -322,7 +315,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins'); insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -341,7 +333,6 @@ c1 ...@@ -341,7 +333,6 @@ c1
inserted outside SP inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -362,7 +353,6 @@ inserted from sp3166_s_i ...@@ -362,7 +353,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -380,7 +370,6 @@ inserted from sp3166_ins ...@@ -380,7 +370,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1 root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
......
...@@ -82,7 +82,6 @@ create user 'user_2'@'localhost'; ...@@ -82,7 +82,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
...@@ -95,7 +94,6 @@ DECLARE res INT; ...@@ -95,7 +94,6 @@ DECLARE res INT;
SET res = n * n; SET res = n * n;
RETURN res; RETURN res;
END// END//
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -114,7 +112,6 @@ fn31105( 9 ) ...@@ -114,7 +112,6 @@ fn31105( 9 )
81 81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -135,7 +132,6 @@ a` a` 1000-01-01 -5000 a` -5000 ...@@ -135,7 +132,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 ); SELECT fn31105( 9 );
fn31105( 9 ) fn31105( 9 )
81 81
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
......
...@@ -86,8 +86,6 @@ show grants for test_yesprivs@localhost; ...@@ -86,8 +86,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2: Testcase 3.5.3.2:
----------------- -----------------
...@@ -162,8 +160,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; ...@@ -162,8 +160,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -223,8 +219,6 @@ show grants for test_yesprivs@localhost; ...@@ -223,8 +219,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -297,8 +291,6 @@ show grants for test_yesprivs@localhost; ...@@ -297,8 +291,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -352,8 +344,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; ...@@ -352,8 +344,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs; show grants for test_noprivs;
Grants for test_noprivs@% Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -408,8 +398,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; ...@@ -408,8 +398,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -465,8 +453,6 @@ show grants for test_yesprivs@localhost; ...@@ -465,8 +453,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -520,8 +506,6 @@ show grants for test_yesprivs@localhost; ...@@ -520,8 +506,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -566,8 +550,6 @@ show grants for test_noprivs@localhost; ...@@ -566,8 +550,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -612,7 +594,6 @@ Grants for test_yesprivs@localhost ...@@ -612,7 +594,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
......
...@@ -25,7 +25,6 @@ show grants for test_noprivs@localhost; ...@@ -25,7 +25,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create: no trigger privilege on db level for create:
-------------------------------------------- --------------------------------------------
...@@ -33,7 +32,6 @@ use priv_db; ...@@ -33,7 +32,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no'; set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db; use priv_db;
insert into t1 (f1) values ('insert-yes'); insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;
...@@ -254,8 +252,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; ...@@ -254,8 +252,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create: no trigger privilege on table level for create:
----------------------------------------------- -----------------------------------------------
...@@ -514,8 +510,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost; ...@@ -514,8 +510,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -564,7 +558,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost; ...@@ -564,7 +558,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -699,7 +692,6 @@ select f1 from t1 order by f1; ...@@ -699,7 +692,6 @@ select f1 from t1 order by f1;
f1 f1
insert-yes insert-yes
insert-yes insert-yes
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -768,9 +760,7 @@ Grants for test_noprivs@localhost ...@@ -768,9 +760,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
trigger privilege on one db1 db level, not on db2 trigger privilege on one db1 db level, not on db2
...@@ -983,7 +973,6 @@ create User test_useprivs@localhost; ...@@ -983,7 +973,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD'); set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1011,7 +1000,6 @@ select f1 from t1 order by f1; ...@@ -1011,7 +1000,6 @@ select f1 from t1 order by f1;
f1 f1
trig 1_1-yes trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_useprivs@localhost test_useprivs@localhost
...@@ -1207,7 +1195,6 @@ create table t1 (f1 char(20)) engine= myisam; ...@@ -1207,7 +1195,6 @@ create table t1 (f1 char(20)) engine= myisam;
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD'); set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1319,8 +1306,6 @@ show grants for test_noprivs@localhost; ...@@ -1319,8 +1306,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column: update only on column:
---------------------- ----------------------
......
...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4: Testcase 3.5.4:
--------------- ---------------
......
...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -68,8 +68,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests) Testcase 3.5.8.1: (implied in previous tests)
--------------------------------------------- ---------------------------------------------
......
...@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -78,7 +78,6 @@ grant all on db_storedproc_1.* to 'user_1'@'localhost';
revoke create routine on db_storedproc_1.* from 'user_1'@'localhost'; revoke create routine on db_storedproc_1.* from 'user_1'@'localhost';
flush privileges; flush privileges;
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -91,7 +90,6 @@ USE db_storedproc_1; ...@@ -91,7 +90,6 @@ USE db_storedproc_1;
root@localhost db_storedproc_1 root@localhost db_storedproc_1
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege. ...@@ -112,7 +110,6 @@ Ensure that root always has the GRANT CREATE ROUTINE privilege.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
DROP PROCEDURE IF EXISTS sp3; DROP PROCEDURE IF EXISTS sp3;
...@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20)) ...@@ -149,7 +146,6 @@ CREATE PROCEDURE sp4(v1 char(20))
BEGIN BEGIN
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz'; SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
END// END//
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
USE db_storedproc_1; USE db_storedproc_1;
...@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -191,7 +187,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost'; grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges; flush privileges;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp5_s_i () sql security definer CREATE PROCEDURE sp5_s_i () sql security definer
...@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer ...@@ -207,7 +202,6 @@ CREATE PROCEDURE sp5_ins () sql security definer
BEGIN BEGIN
insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000); insert into db_storedproc_1.t3165 values ('inserted', 'from sp5_ins', 1000);
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp5_s_i(); CALL sp5_s_i();
...@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; ...@@ -305,7 +299,6 @@ GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc_1 user_1@localhost db_storedproc_1
CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER CREATE PROCEDURE sp3166_s_i () SQL SECURITY INVOKER
...@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER ...@@ -321,7 +314,6 @@ CREATE PROCEDURE sp3166_ins () SQL SECURITY INVOKER
BEGIN BEGIN
insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins'); insert into db_storedproc_1.t3166 values ('inserted from sp3166_ins');
END// END//
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -340,7 +332,6 @@ c1 ...@@ -340,7 +332,6 @@ c1
inserted outside SP inserted outside SP
GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -361,7 +352,6 @@ inserted from sp3166_s_i ...@@ -361,7 +352,6 @@ inserted from sp3166_s_i
inserted from sp3166_ins inserted from sp3166_ins
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -379,7 +369,6 @@ inserted from sp3166_ins ...@@ -379,7 +369,6 @@ inserted from sp3166_ins
root@localhost db_storedproc_1 root@localhost db_storedproc_1
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc_1,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc_1 user_2@localhost db_storedproc_1
CALL sp3166_s_i(); CALL sp3166_s_i();
......
...@@ -81,7 +81,6 @@ create user 'user_2'@'localhost'; ...@@ -81,7 +81,6 @@ create user 'user_2'@'localhost';
GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_1@localhost db_storedproc user_1@localhost db_storedproc
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
...@@ -94,7 +93,6 @@ DECLARE res INT; ...@@ -94,7 +93,6 @@ DECLARE res INT;
SET res = n * n; SET res = n * n;
RETURN res; RETURN res;
END// END//
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -113,7 +111,6 @@ fn31105( 9 ) ...@@ -113,7 +111,6 @@ fn31105( 9 )
81 81
GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
...@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000 ...@@ -134,7 +131,6 @@ a` a` 1000-01-01 -5000 a` -5000
SELECT fn31105( 9 ); SELECT fn31105( 9 );
fn31105( 9 ) fn31105( 9 )
81 81
connect(localhost,user_2,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
user_2@localhost db_storedproc user_2@localhost db_storedproc
CALL sp31102(); CALL sp31102();
......
...@@ -85,8 +85,6 @@ show grants for test_yesprivs@localhost; ...@@ -85,8 +85,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.3.2: Testcase 3.5.3.2:
----------------- -----------------
...@@ -161,8 +159,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; ...@@ -161,8 +159,6 @@ grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -222,8 +218,6 @@ show grants for test_yesprivs@localhost; ...@@ -222,8 +218,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -296,8 +290,6 @@ show grants for test_yesprivs@localhost; ...@@ -296,8 +290,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -351,8 +343,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; ...@@ -351,8 +343,6 @@ grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs; show grants for test_noprivs;
Grants for test_noprivs@% Grants for test_noprivs@%
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -407,8 +397,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; ...@@ -407,8 +397,6 @@ grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_noprivs@localhost test_noprivs@localhost
...@@ -464,8 +452,6 @@ show grants for test_yesprivs@localhost; ...@@ -464,8 +452,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -519,8 +505,6 @@ show grants for test_yesprivs@localhost; ...@@ -519,8 +505,6 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -565,8 +549,6 @@ show grants for test_noprivs@localhost; ...@@ -565,8 +549,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
show grants; show grants;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
...@@ -611,7 +593,6 @@ Grants for test_yesprivs@localhost ...@@ -611,7 +593,6 @@ Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost'
GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
......
...@@ -24,7 +24,6 @@ show grants for test_noprivs@localhost; ...@@ -24,7 +24,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on db level for create: no trigger privilege on db level for create:
-------------------------------------------- --------------------------------------------
...@@ -32,7 +31,6 @@ use priv_db; ...@@ -32,7 +31,6 @@ use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no'; set new.f1 = 'trig 1_1-no';
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv_db; use priv_db;
insert into t1 (f1) values ('insert-yes'); insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;
...@@ -253,8 +251,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; ...@@ -253,8 +251,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
no trigger privilege on table level for create: no trigger privilege on table level for create:
----------------------------------------------- -----------------------------------------------
...@@ -513,8 +509,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost; ...@@ -513,8 +509,6 @@ grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -563,7 +557,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost; ...@@ -563,7 +557,6 @@ revoke TRIGGER on *.* from test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -698,7 +691,6 @@ select f1 from t1 order by f1; ...@@ -698,7 +691,6 @@ select f1 from t1 order by f1;
f1 f1
insert-yes insert-yes
insert-yes insert-yes
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_yesprivs@localhost test_yesprivs@localhost
...@@ -767,9 +759,7 @@ Grants for test_noprivs@localhost ...@@ -767,9 +759,7 @@ Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost'
GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
use priv1_db; use priv1_db;
trigger privilege on one db1 db level, not on db2 trigger privilege on one db1 db level, not on db2
...@@ -982,7 +972,6 @@ create User test_useprivs@localhost; ...@@ -982,7 +972,6 @@ create User test_useprivs@localhost;
set password for test_useprivs@localhost = password('PWD'); set password for test_useprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1010,7 +999,6 @@ select f1 from t1 order by f1; ...@@ -1010,7 +999,6 @@ select f1 from t1 order by f1;
f1 f1
trig 1_1-yes trig 1_1-yes
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
connect(localhost,test_useprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
test_useprivs@localhost test_useprivs@localhost
...@@ -1206,7 +1194,6 @@ create table t1 (f1 char(20)) engine= ndb; ...@@ -1206,7 +1194,6 @@ create table t1 (f1 char(20)) engine= ndb;
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD'); set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1303,7 +1290,6 @@ create table t1 (f1 char(20)) engine= ndb; ...@@ -1303,7 +1290,6 @@ create table t1 (f1 char(20)) engine= ndb;
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
set password for test_yesprivs@localhost = password('PWD'); set password for test_yesprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
select current_user; select current_user;
current_user current_user
root@localhost root@localhost
...@@ -1375,8 +1361,6 @@ show grants for test_noprivs@localhost; ...@@ -1375,8 +1361,6 @@ show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost Grants for test_noprivs@localhost
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost'
connect(localhost,test_yesprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_noprivs,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
update only on column: update only on column:
---------------------- ----------------------
......
...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.4: Testcase 3.5.4:
--------------- ---------------
......
...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost; ...@@ -67,8 +67,6 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_general@localhost;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
connect(localhost,test_general,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
connect(localhost,test_super,PWD,test,MASTER_MYPORT,MASTER_MYSOCK);
Testcase 3.5.8.1: (implied in previous tests) Testcase 3.5.8.1: (implied in previous tests)
--------------------------------------------- ---------------------------------------------
......
...@@ -53,7 +53,6 @@ flush privileges; ...@@ -53,7 +53,6 @@ flush privileges;
DROP PROCEDURE IF EXISTS sp1; DROP PROCEDURE IF EXISTS sp1;
--enable_warnings --enable_warnings
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user1a, localhost, user_1, , db_storedproc_1); connect (user1a, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -75,7 +74,6 @@ USE db_storedproc_1; ...@@ -75,7 +74,6 @@ USE db_storedproc_1;
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost'; GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user1b, localhost, user_1, , db_storedproc_1); connect (user1b, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -120,7 +118,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost'; ...@@ -120,7 +118,6 @@ grant create routine on db_storedproc_1.* to 'user_1'@'localhost';
flush privileges; flush privileges;
# disconnect default; # disconnect default;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2, localhost, user_1, , db_storedproc_1); connect (user2, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -187,7 +184,6 @@ delimiter ;// ...@@ -187,7 +184,6 @@ delimiter ;//
#disconnect default; #disconnect default;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user3, localhost, user_1, , db_storedproc_1); connect (user3, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -234,7 +230,6 @@ grant SELECT on db_storedproc_1.* to 'user_2'@'localhost'; ...@@ -234,7 +230,6 @@ grant SELECT on db_storedproc_1.* to 'user_2'@'localhost';
grant execute on db_storedproc_1.* to 'user_2'@'localhost'; grant execute on db_storedproc_1.* to 'user_2'@'localhost';
flush privileges; flush privileges;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user5_1, localhost, user_1, , db_storedproc_1); connect (user5_1, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -258,7 +253,6 @@ delimiter ;// ...@@ -258,7 +253,6 @@ delimiter ;//
disconnect user5_1; disconnect user5_1;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user5_2, localhost, user_2, , db_storedproc_1); connect (user5_2, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -365,7 +359,6 @@ GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost'; ...@@ -365,7 +359,6 @@ GRANT SELECT ON db_storedproc_1.* TO 'user_2'@'localhost';
GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost'; GRANT EXECUTE ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_1, localhost, user_1, , db_storedproc_1); connect (user6_1, localhost, user_1, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -389,7 +382,6 @@ delimiter ;// ...@@ -389,7 +382,6 @@ delimiter ;//
disconnect user6_1; disconnect user6_1;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_2, localhost, user_2, , db_storedproc_1); connect (user6_2, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -407,7 +399,6 @@ GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost'; ...@@ -407,7 +399,6 @@ GRANT INSERT ON db_storedproc_1.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
disconnect user6_2; disconnect user6_2;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_3, localhost, user_2, , db_storedproc_1); connect (user6_3, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
CALL sp3166_s_i(); CALL sp3166_s_i();
...@@ -422,7 +413,6 @@ CALL sp3166_sel(); ...@@ -422,7 +413,6 @@ CALL sp3166_sel();
REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE SELECT ON db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_4, localhost, user_2, , db_storedproc_1); connect (user6_4, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
--error ER_TABLEACCESS_DENIED_ERROR --error ER_TABLEACCESS_DENIED_ERROR
...@@ -439,7 +429,6 @@ CALL sp3166_s_i(); ...@@ -439,7 +429,6 @@ CALL sp3166_s_i();
REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost'; REVOKE EXECUTE on db_storedproc_1.* FROM 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user6_5, localhost, user_2, , db_storedproc_1); connect (user6_5, localhost, user_2, , db_storedproc_1);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
--error ER_PROCACCESS_DENIED_ERROR --error ER_PROCACCESS_DENIED_ERROR
......
...@@ -58,7 +58,6 @@ GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost'; ...@@ -58,7 +58,6 @@ GRANT CREATE ROUTINE ON db_storedproc.* TO 'user_1'@'localhost';
GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost'; GRANT SELECT ON db_storedproc.* TO 'user_2'@'localhost';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_1, localhost, user_1, , db_storedproc); connect (user2_1, localhost, user_1, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -80,7 +79,6 @@ delimiter ;// ...@@ -80,7 +79,6 @@ delimiter ;//
disconnect user2_1; disconnect user2_1;
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_2, localhost, user_2, , db_storedproc); connect (user2_2, localhost, user_2, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
...@@ -102,7 +100,6 @@ FLUSH PRIVILEGES; ...@@ -102,7 +100,6 @@ FLUSH PRIVILEGES;
disconnect user2_2; disconnect user2_2;
# new connection # new connection
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_3, localhost, user_2, , db_storedproc); connect (user2_3, localhost, user_2, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
CALL sp31102(); CALL sp31102();
...@@ -121,7 +118,6 @@ FLUSH PRIVILEGES; ...@@ -121,7 +118,6 @@ FLUSH PRIVILEGES;
CALL sp31102(); CALL sp31102();
SELECT fn31105( 9 ); SELECT fn31105( 9 );
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (user2_4, localhost, user_2, , db_storedproc); connect (user2_4, localhost, user_2, , db_storedproc);
--source suite/funcs_1/include/show_connection.inc --source suite/funcs_1/include/show_connection.inc
CALL sp31102(); CALL sp31102();
......
...@@ -62,9 +62,7 @@ let $message= Testcase 3.5.3.2/6:; ...@@ -62,9 +62,7 @@ let $message= Testcase 3.5.3.2/6:;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -155,9 +153,7 @@ let $message=Testcase 3.5.3.7a:; ...@@ -155,9 +153,7 @@ let $message=Testcase 3.5.3.7a:;
grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection no_privs_424a; connection no_privs_424a;
...@@ -209,9 +205,7 @@ let $message= Testcase 3.5.3.7b:; ...@@ -209,9 +205,7 @@ let $message= Testcase 3.5.3.7b:;
grant UPDATE on priv_db.* to test_yesprivs@localhost; grant UPDATE on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -263,9 +257,7 @@ let $message= Testcase 3.5.3.7c; ...@@ -263,9 +257,7 @@ let $message= Testcase 3.5.3.7c;
grant UPDATE on priv_db.t1 to test_yesprivs@localhost; grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -316,9 +308,7 @@ let $message= Testcase 3.5.3.7d:; ...@@ -316,9 +308,7 @@ let $message= Testcase 3.5.3.7d:;
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs; show grants for test_noprivs;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -369,9 +359,7 @@ let $message= Testcase 3.5.3.8a:; ...@@ -369,9 +359,7 @@ let $message= Testcase 3.5.3.8a:;
grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -426,9 +414,7 @@ let $message= Testcase: 3.5.3.8b; ...@@ -426,9 +414,7 @@ let $message= Testcase: 3.5.3.8b;
grant SELECT on priv_db.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -482,9 +468,7 @@ let $message= Testcase 3.5.3.8c:; ...@@ -482,9 +468,7 @@ let $message= Testcase 3.5.3.8c:;
grant SELECT on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -534,9 +518,7 @@ let $message=Testcase: 3.5.3.8d:; ...@@ -534,9 +518,7 @@ let $message=Testcase: 3.5.3.8d:;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -592,7 +574,6 @@ let $message=Testcase: 3.5.3.x:; ...@@ -592,7 +574,6 @@ let $message=Testcase: 3.5.3.x:;
grant SELECT on priv_db.t2 to test_yesprivs@localhost; grant SELECT on priv_db.t2 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection yes_353x; connection yes_353x;
......
...@@ -36,10 +36,8 @@ let $message= ####### Testcase for column privileges of triggers: #######; ...@@ -36,10 +36,8 @@ let $message= ####### Testcase for column privileges of triggers: #######;
grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
# grant TRIGGER and UPDATE on column -> succeed # grant TRIGGER and UPDATE on column -> succeed
......
...@@ -37,7 +37,6 @@ let $message= Testcase for db level:; ...@@ -37,7 +37,6 @@ let $message= Testcase for db level:;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
# no trigger privilege->create trigger must fail: # no trigger privilege->create trigger must fail:
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
let $message= no trigger privilege on db level for create:; let $message= no trigger privilege on db level for create:;
--source include/show_msg.inc --source include/show_msg.inc
...@@ -47,7 +46,6 @@ let $message= no trigger privilege on db level for create:; ...@@ -47,7 +46,6 @@ let $message= no trigger privilege on db level for create:;
set new.f1 = 'trig 1_1-no'; set new.f1 = 'trig 1_1-no';
# user with minimum privs on t1->no trigger executed; # user with minimum privs on t1->no trigger executed;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
use priv_db; use priv_db;
insert into t1 (f1) values ('insert-yes'); insert into t1 (f1) values ('insert-yes');
......
...@@ -41,10 +41,8 @@ let $message= ####### Testcase for mix of db and table level: #######; ...@@ -41,10 +41,8 @@ let $message= ####### Testcase for mix of db and table level: #######;
grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
use priv1_db; use priv1_db;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
use priv1_db; use priv1_db;
......
...@@ -27,7 +27,6 @@ let $message= ######### Testcase for definer: ########; ...@@ -27,7 +27,6 @@ let $message= ######### Testcase for definer: ########;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
# create trigger with not existing definer shall deliver a warning: # create trigger with not existing definer shall deliver a warning:
......
...@@ -38,10 +38,8 @@ let $message= #### Testcase for mix of user(global) and db level: ####; ...@@ -38,10 +38,8 @@ let $message= #### Testcase for mix of user(global) and db level: ####;
grant SELECT,INSERT on *.* to test_noprivs@localhost; grant SELECT,INSERT on *.* to test_noprivs@localhost;
show grants for test_noprivs@localhost; show grants for test_noprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection yes_privs; connection yes_privs;
...@@ -83,7 +81,6 @@ let $message= trigger privilege on user level for create:; ...@@ -83,7 +81,6 @@ let $message= trigger privilege on user level for create:;
--disable_warnings --disable_warnings
disconnect yes_privs; disconnect yes_privs;
--enable_warnings --enable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
select current_user; select current_user;
use priv_db; use priv_db;
...@@ -184,7 +181,6 @@ let $message= trigger privilege on db level for create:; ...@@ -184,7 +181,6 @@ let $message= trigger privilege on db level for create:;
--disable_warnings --disable_warnings
disconnect yes_privs; disconnect yes_privs;
--enable_warnings --enable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
select current_user; select current_user;
use no_priv_db; use no_priv_db;
......
...@@ -32,7 +32,6 @@ let $message= #### Testcase for trigger privilege on execution time ########; ...@@ -32,7 +32,6 @@ let $message= #### Testcase for trigger privilege on execution time ########;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
...@@ -56,7 +55,6 @@ let $message= #### Testcase for trigger privilege on execution time ########; ...@@ -56,7 +55,6 @@ let $message= #### Testcase for trigger privilege on execution time ########;
select f1 from t1 order by f1; select f1 from t1 order by f1;
prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')'; prepare ins1 from 'insert into t1 (f1) values (''insert2-no'')';
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (use_privs,localhost,test_useprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (use_privs,localhost,test_useprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
select current_user; select current_user;
use priv_db; use priv_db;
......
...@@ -30,10 +30,8 @@ let $message= ######### Testcase for table level: ########; ...@@ -30,10 +30,8 @@ let $message= ######### Testcase for table level: ########;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
################ Section 3.5.3 ############ ################ Section 3.5.3 ############
......
...@@ -27,7 +27,6 @@ let $message= ######### Testcase for transactions: ########; ...@@ -27,7 +27,6 @@ let $message= ######### Testcase for transactions: ########;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
......
...@@ -22,9 +22,7 @@ let $message= Testcase: 3.5:; ...@@ -22,9 +22,7 @@ let $message= Testcase: 3.5:;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con1_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (con1_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con1_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (con1_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
......
...@@ -23,9 +23,7 @@ let $message= Testcase: 3.5:; ...@@ -23,9 +23,7 @@ let $message= Testcase: 3.5:;
create User test_super@localhost; create User test_super@localhost;
set password for test_super@localhost = password('PWD'); set password for test_super@localhost = password('PWD');
grant ALL on *.* to test_super@localhost with grant OPTION; grant ALL on *.* to test_super@localhost with grant OPTION;
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
connect (con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (con2_super,localhost,test_super,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection default; connection default;
......
...@@ -500,11 +500,7 @@ INSERT INTO t2 VALUES (),(); ...@@ -500,11 +500,7 @@ INSERT INTO t2 VALUES (),();
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2 CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE b =(SELECT a FROM t1 LIMIT 1); WHERE b =(SELECT a FROM t1 LIMIT 1);
--disable_query_log
--disable_result_log
CONNECT (con1, localhost, root,,); CONNECT (con1, localhost, root,,);
--enable_query_log
--enable_result_log
CONNECTION default; CONNECTION default;
DELIMITER |; DELIMITER |;
......
...@@ -1553,26 +1553,25 @@ drop table t1; ...@@ -1553,26 +1553,25 @@ drop table t1;
# whole alter table code is being tested all around the test suite already. # whole alter table code is being tested all around the test suite already.
# #
create table t1 (v varchar(32) not null); create table t1 (v varchar(32) not null) engine=csv;
insert into t1 values ('def'),('abc'),('hij'),('3r4f'); insert into t1 values ('def'),('abc'),('hij'),('3r4f');
select * from t1; select * from t1;
# Fast alter, no copy performed # Fast alter, no copy performed
alter table t1 change v v2 varchar(32); alter table t1 change v v2 varchar(32) not null;
select * from t1; select * from t1;
# Fast alter, no copy performed # Fast alter, no copy performed
alter table t1 change v2 v varchar(64); alter table t1 change v2 v varchar(64) not null;
select * from t1; select * from t1;
update t1 set v = 'lmn' where v = 'hij'; update t1 set v = 'lmn' where v = 'hij';
select * from t1; select * from t1;
# Regular alter table # Regular alter table
alter table t1 add i int auto_increment not null primary key first; alter table t1 add i int not null first;
select * from t1; select * from t1;
update t1 set i=5 where i=3; update t1 set i=3 where v = 'abc';
select * from t1; select * from t1;
alter table t1 change i i bigint; alter table t1 change i i bigint not null;
select * from t1; select * from t1;
alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','abc');
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
drop table t1; drop table t1;
# #
......
...@@ -325,6 +325,15 @@ eval select $mysql_errno as "after_!errno_masked_error" ; ...@@ -325,6 +325,15 @@ eval select $mysql_errno as "after_!errno_masked_error" ;
--error 1 --error 1
--exec echo "disable_abort_on_error; error 1000; select 3 from t1; error 1000; select 3 from t1;" | $MYSQL_TEST 2>&1 --exec echo "disable_abort_on_error; error 1000; select 3 from t1; error 1000; select 3 from t1;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
# Check some non-query statements that would fail
# ----------------------------------------------------------------------------
--exec illegal_command
--cat_file does_not_exist
--perl
exit(1);
EOF
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Switch the abort on error on and check the effect on $mysql_errno # Switch the abort on error on and check the effect on $mysql_errno
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
...@@ -863,7 +872,7 @@ while ($outer) ...@@ -863,7 +872,7 @@ while ($outer)
} }
# Test source in an if in a while which is false on 1st iteration # Test source in an if in a while which is false on 1st iteration
# Also test --error in same context # Also test --error and --disable_abort_on_error in same context
let $outer= 2; # Number of outer loops let $outer= 2; # Number of outer loops
let $ifval= 0; # false 1st time let $ifval= 0; # false 1st time
while ($outer) while ($outer)
...@@ -874,6 +883,10 @@ while ($outer) ...@@ -874,6 +883,10 @@ while ($outer)
--source $MYSQLTEST_VARDIR/tmp/sourced.inc --source $MYSQLTEST_VARDIR/tmp/sourced.inc
--error ER_NO_SUCH_TABLE --error ER_NO_SUCH_TABLE
SELECT * from nowhere; SELECT * from nowhere;
--disable_abort_on_error
# Statement giving a different error, to make sure we don't mask it
SELECT * FROM nowhere else;
--enable_abort_on_error
} }
dec $outer; dec $outer;
inc $ifval; inc $ifval;
...@@ -1092,6 +1105,36 @@ if (!$counter) ...@@ -1092,6 +1105,36 @@ if (!$counter)
echo Counter is not 0, (counter=0); echo Counter is not 0, (counter=0);
} }
# ----------------------------------------------------------------------------
# Test if with some non-numerics
# ----------------------------------------------------------------------------
let $counter=alpha;
if ($counter)
{
echo Counter is true, (counter=alpha);
}
let $counter= ;
if ($counter)
{
echo oops, space is true;
}
let $counter=-0;
if ($counter)
{
echo oops, -0 is true;
}
if (beta)
{
echo Beta is true;
}
let $counter=gamma;
while ($counter)
{
echo while with string, only once;
let $counter=000;
}
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Test while, { and } # Test while, { and }
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
...@@ -1437,7 +1480,6 @@ EOF ...@@ -1437,7 +1480,6 @@ EOF
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql; remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
# connect when "disable_abort_on_error" caused "connection not found" # connect when "disable_abort_on_error" caused "connection not found"
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--disable_abort_on_error --disable_abort_on_error
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
connection default; connection default;
...@@ -1724,7 +1766,16 @@ select 1; ...@@ -1724,7 +1766,16 @@ select 1;
--reap --reap
EOF EOF
--error 1 --error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1 # Must filter unpredictable extra warning from output
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in > $MYSQL_TMP_DIR/mysqltest.out 2>&1
--perl
my $dir= $ENV{'MYSQL_TMP_DIR'};
open (FILE, "$dir/mysqltest.out");
while (<FILE>) {
print unless /Note: net_clear/; # This shows up on rare occations
}
EOF
remove_file $MYSQL_TMP_DIR/mysqltest.out;
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in; remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;
drop table t1; drop table t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment