Commit 530a83a1 authored by Matthias Leich's avatar Matthias Leich

1. Fix for Bug#58600 main.not_embedded_server test does not cleanup properly

   - remove the superfluous file
   - add an preemptive removal of the outfile before the
     SELECT ... INTO OUTFILE ...
2. Remove an already disabled subtest
   It's functionality is covered by tests in the suite funcs_1.
3. Adjust the formatting within some sub testcase to the formatting used
   in all other sub testcases
parent da9cb6e1
......@@ -7,13 +7,13 @@ slave_skip_errors OFF
#
# FLUSH PRIVILEGES should not implicitly unlock locked tables.
#
drop table if exists t1;
create table t1 (c1 int);
lock tables t1 read;
flush privileges;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT);
LOCK TABLES t1 READ;
FLUSH PRIVILEGES;
ERROR HY000: Table 'host' was not locked with LOCK TABLES
unlock tables;
drop table t1;
UNLOCK TABLES;
DROP TABLE t1;
#
# Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
#
......@@ -28,7 +28,7 @@ CREATE FUNCTION f() RETURNS INT RETURN 1;
GRANT FILE ON *.* TO 'nopriv_user'@'localhost';
FLUSH PRIVILEGES;
connection: con1
SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest';
SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE '<outfile>';
ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
......
......@@ -4,31 +4,7 @@
-- source include/not_embedded.inc
# The following fails sporadically because 'check-testcase' runs
# queries before this test and there is no way to guarantee that any
# previous process finishes. The purpose of the test is not clearly
# stated, there is no reference to any bug report, and "select from
# I_S from prepared statement" doesn't look like something that's
# really imporant to test. I'm commenting out this for now. If
# anyone wants to keep this, please fix the race and motivate why we
# need to test this. If you see this comment and it is after mid-2009
# or so, feel free to remove this test from the file. /Sven
#
#
## Show full process list with prepare
## To not show other connections, this must be the first test and we must
## have a server restart before this one
##
## We don't have any 4.1 tests as we use I_S to query the PROCESSLIST to
## exclude system threads that may/may not be active in the server
## (namely the ndb injector thread)
##
## End of 4.1 tests
#
#prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' ';
#--replace_column 1 number 6 time 3 localhost
#execute stmt1;
#deallocate prepare stmt1;
# End of 4.1 tests
call mtr.add_suppression("Can't open and lock privilege tables: Table 'host' was not locked with LOCK TABLES");
......@@ -46,14 +22,14 @@ SHOW VARIABLES like 'slave_skip_errors';
--echo # FLUSH PRIVILEGES should not implicitly unlock locked tables.
--echo #
--disable_warnings
drop table if exists t1;
DROP TABLE IF EXISTS t1;
--enable_warnings
create table t1 (c1 int);
lock tables t1 read;
CREATE TABLE t1 (c1 INT);
LOCK TABLES t1 READ;
--error ER_TABLE_NOT_LOCKED
flush privileges;
unlock tables;
drop table t1;
FLUSH PRIVILEGES;
UNLOCK TABLES;
DROP TABLE t1;
--echo #
--echo # Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
......@@ -83,8 +59,18 @@ connect (con1,localhost,nopriv_user,,);
connection con1;
--echo connection: con1
let outfile=$MYSQLTEST_VARDIR/tmp/mytest;
--error 0,1
--remove_file $outfile
--replace_result $outfile <outfile>
--error ER_PROCACCESS_DENIED_ERROR
SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest';
eval SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE '$outfile';
# A removal of the outfile is necessary, at least today (2010-12-07), because
# the outfile is created even if the SELECT statement fails.
# If the server is improved in the future this may not happen.
# ==> Do not fail if the outfile does not exist.
--error 0,1
--remove_file $outfile
--error ER_PROCACCESS_DENIED_ERROR
INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
......
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