tables1.inc 1.15 KB
Newer Older
1 2 3 4
# suite/funcs_1/datadict/tables1.inc
#
# Auxiliary script to be sourced by
#    is_tables_mysql.test
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
5
#    is_tables_mysql_embedded.test
6 7 8 9 10 11 12 13 14
#    is_tables_is.test
#
# Author:
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
#                           testsuite funcs_1
#                   Create this script based on older scripts and new code.
#

--disable_warnings
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
15
DROP DATABASE IF EXISTS test1;
16
--enable_warnings
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
17
CREATE DATABASE test1;
18 19 20 21

--source suite/funcs_1/datadict/tables2.inc

# Create a low privileged user.
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
22
# Note: The database test1 is just a "home" for the low privileged user
23 24 25 26
#       and not in the focus of testing.
--error 0,ER_CANNOT_USER
DROP   USER testuser1@localhost;
CREATE USER testuser1@localhost;
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
27
GRANT SELECT ON test1.* TO testuser1@localhost;
28 29 30

--echo # Establish connection testuser1 (user=testuser1)
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
31
connect (testuser1,localhost,testuser1,,test1);
32 33 34 35 36 37
--source suite/funcs_1/datadict/tables2.inc

--echo # Switch to connection default and close connection testuser1
connection default;
disconnect testuser1;
DROP USER testuser1@localhost;
Matthias Leich mleich@mysql.com's avatar
Matthias Leich mleich@mysql.com committed
38
DROP DATABASE test1;