Commit 936f6a47 authored by unknown's avatar unknown

Merge mleich@bk-internal.mysql.com:/home/bk/mysql-5.1-build

into  four.local.lan:/WORK/merge/mysql-5.1-WL3982

parents 236c2ec7 a79b35d3
############## suite/funcs_1/datadict/datadict_priv.inc ################
# #
# DDL and DML operations on information_schema tables #
# #
# Creation: #
# 2007-08 hhunger Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# #
# Last update: #
# 2007-08-14 mleich Some cleanup #
# #
########################################################################
# These variables have to be set before sourcing this file.
#
# information_schema table to be tested
# let $table= processlist;
#
# columns of the information_schema table e.g. to use in a select.
# let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO;
#
# Where clause for an update.
# let $update_where= WHERE id=1 ;
#
# Column to be used in the SET of an update.
# let $set_column= user='any_user' ;
#
# Where clause of a delete.
# let $delete_where= WHERE id=1 ;
#
# Column to be dropped.
# let $drop_column= user;
#
# Column to be indexed
# let $index_col= user;
# data access
eval CREATE TEMPORARY TABLE test.t_$table AS SELECT * FROM $table;
eval UPDATE test.t_$table SET user='horst' $update_where ;
--error ER_DBACCESS_DENIED_ERROR
eval INSERT INTO $table SELECT * FROM test.t_$table;
# bug#30208: CREATE TABLE ...LIKE does not accept dbname.tablename:unknown database
eval DROP TABLE test.t_$table;
--error ER_VIEW_NONUPD_CHECK
eval CREATE VIEW test.v_$table ($columns) AS SELECT * FROM $table WITH CHECK OPTION;
eval CREATE VIEW test.v_$table ($columns) AS SELECT * FROM $table;
--error ER_DBACCESS_DENIED_ERROR
eval UPDATE test.v_$TABLE SET TIME=NOW() WHERE id = 1;
eval DROP VIEW test.v_$table;
--error ER_DBACCESS_DENIED_ERROR
eval UPDATE $table SET $set_column $update_where;
--error ER_DBACCESS_DENIED_ERROR
eval DELETE FROM $table $delete_where;
# change privileges
--error ER_DBACCESS_DENIED_ERROR
eval REVOKE ALL ON $table FROM current_user;
--error ER_DBACCESS_DENIED_ERROR
eval GRANT INSERT,UPDATE ON $table TO current_user;
SHOW GRANTS;
#----------------------------------------------------------------------
# table access
--error ER_DBACCESS_DENIED_ERROR
eval CREATE INDEX i_$table ON $table ($index_col);
--error ER_DBACCESS_DENIED_ERROR
eval DROP TABLE $table;
--error ER_DBACCESS_DENIED_ERROR
eval ALTER TABLE $table DROP COLUMN $drop_column;
--error ER_DBACCESS_DENIED_ERROR
eval ALTER TABLE $table ADD COLUMN (my_column INT);
--error ER_UNKNOWN_TABLE
eval RENAME TABLE $table TO new_$table;
--error ER_DBACCESS_DENIED_ERROR
eval RENAME TABLE $table TO files;
--error ER_UNKNOWN_TABLE
eval CREATE TABLE new_$table AS SELECT * FROM $table;
#----------------------------------------------------------------------
# database access
--error ER_DBACCESS_DENIED_ERROR
DROP DATABASE information_schema;
--error ER_DBACCESS_DENIED_ERROR
RENAME DATABASE information_schema TO info_schema;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
########## suite/funcs_1/t/a_processlist_priv_no_prot.test #############
# #
# Testing of privileges around #
# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
# #
# The prepared statement variant of this test is #
# suite/funcs_1/t/b_processlist_priv_ps.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_priv.inc #
# #
# Note(mleich): #
# The name "a_process..." with the unusual prefix "a_" is #
# caused by the fact that this test should run as first test, that #
# means direct after server startup. Otherwise the connection IDs #
# within the processlist would differ. #
# #
# Creation: #
# 2007-08-14 mleich Create this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# One subtest is skipped because of
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
let $fixed_bug_30395= 0;
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
+ $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
--source suite/funcs_1/datadict/processlist_priv.inc
########### suite/funcs_1/t/a_processlist_val_no_prot.test #############
# #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# #
# The prepared statement variant of this test is #
# suite/funcs_1/t/b_processlist_val_ps.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_val.inc #
# #
# Note(mleich): #
# The name "a_process..." with the unusual prefix "a_" is #
# caused by the fact that this test should run as second test, that #
# means direct after server startup and a_processlist_priv_no_prot. #
# Otherwise the connection IDs within the processlist would differ. #
# #
# Creation: #
# 2007-08-09 mleich Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL
+ $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
--source suite/funcs_1/datadict/processlist_val.inc
########### suite/funcs_1/t/b_processlist_priv_ps.test #################
# #
# Testing of privileges around #
# SELECT ... PROCESSLIST/SHOW PROCESSLIST #
# #
# The no (ps/sp/view/cursor) protocol variant of this test is #
# suite/funcs_1/t/a_processlist_priv_no_prot.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_priv.inc #
# #
# Note(mleich): #
# The name "b_process..." with the unusual prefix "b_" is #
# caused by the fact that this test should run as first test, that #
# means direct after server startup. Otherwise the connection IDs #
# within the processlist would differ. #
# #
# Creation: #
# 2007-08-14 mleich Create this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# One subtest is skipped because of
# Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ...
let $fixed_bug_30395= 0;
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
OR $PS_PROTOCOL = 0`)
{
--skip Test requires: ps-protocol enabled, other protocols disabled
}
--source suite/funcs_1/datadict/processlist_priv.inc
############## suite/funcs_1/t/b_processlist_val_ps.test ###############
# #
# Testing of values within INFORMATION_SCHEMA.PROCESSLIST #
# #
# The no (ps/sp/view/cursor) protocol variant of this test is #
# suite/funcs_1/t/a_processlist_val_no_prot.test. #
# #
# There is important documentation within #
# suite/funcs_1/datadict/processlist_val.inc #
# #
# Note(mleich): #
# The name "b_process..." with the unusual prefix "b_" is #
# caused by the fact that this test should run as second test, that #
# means direct after server startup and b_processlist_priv_ps. #
# Otherwise the connection IDs within the processlist would differ. #
# #
# Creation: #
# 2007-08-09 mleich Implement this test as part of #
# WL#3982 Test information_schema.processlist #
# #
########################################################################
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
OR $PS_PROTOCOL = 0`)
{
--skip Test requires: ps-protocol enabled, other protocols disabled
}
--source suite/funcs_1/datadict/processlist_val.inc
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