config root man

Current Path : /compat/linux/proc/self/root/home/usr.opt/mysql57/mysql-test/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/home/usr.opt/mysql57/mysql-test/t/acl_tables_errors_debug.test

# Test requires debug binary
--source include/have_debug.inc
# Test should not be run for embedded server
--source include/not_embedded.inc

SET @old_debug= @@SESSION.debug;

# mysql.user table

SET DEBUG='+d, se_error_replace_user_table_read';
--error ER_LOCK_WAIT_TIMEOUT
CREATE USER 'foo'@'localhost' IDENTIFIED BY 'abcd';
SET DEBUG='-d, se_error_replace_user_table_read';

SET DEBUG='+d, se_error_replace_user_table_add';
--error ER_LOCK_WAIT_TIMEOUT
CREATE USER 'foo'@'localhost' IDENTIFIED BY 'abcd';
SET DEBUG='-d, se_error_replace_user_table_add';

CREATE USER 'foo'@'localhost' IDENTIFIED BY 'abcd';

SET DEBUG='+d, se_error_replace_user_table_update';
--error ER_LOCK_WAIT_TIMEOUT
ALTER USER 'foo'@'localhost' PASSWORD EXPIRE;
SET DEBUG='-d, se_error_replace_user_table_update';

# mysql.db table

SET DEBUG='+d, se_error_replace_db_table_read';
--error ER_LOCK_WAIT_TIMEOUT
GRANT SELECT ON mysql.* TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_db_table_read';

SET DEBUG='+d, se_error_replace_db_table_add';
--error ER_LOCK_WAIT_TIMEOUT
GRANT SELECT ON mysql.* TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_db_table_add';

GRANT SELECT ON mysql.* TO 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_db_table_update';
--error ER_LOCK_WAIT_TIMEOUT
GRANT UPDATE ON mysql.* TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_db_table_update';

SET DEBUG='+d, se_error_replace_db_table_delete';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE SELECT, UPDATE ON mysql.* FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_db_table_delete';

REVOKE SELECT, UPDATE ON mysql.* FROM 'foo'@'localhost';
# mysql.proxies_priv table

CREATE USER 'bar'@'localhost';

SET DEBUG='+d, se_error_replace_proxies_priv_table_read';
--error ER_LOCK_WAIT_TIMEOUT
GRANT PROXY ON 'foo'@'localhost' TO 'bar'@'localhost';
SET DEBUG='-d, se_error_replace_proxies_priv_table_read';

SET DEBUG='+d, se_error_replace_proxies_priv_table_add';
--error ER_LOCK_WAIT_TIMEOUT
GRANT PROXY ON 'foo'@'localhost' TO 'bar'@'localhost';
SET DEBUG='-d, se_error_replace_proxies_priv_table_add';

GRANT PROXY ON 'foo'@'localhost' TO 'bar'@'localhost';

SET DEBUG='+d, se_error_replace_proxies_priv_table_update';
--error ER_LOCK_WAIT_TIMEOUT
GRANT PROXY ON 'foo'@'localhost' TO 'bar'@'localhost';
SET DEBUG='-d, se_error_replace_proxies_priv_table_update';

SET DEBUG='+d, se_error_replace_proxies_priv_table_delete';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE PROXY ON 'foo'@'localhost' FROM 'bar'@'localhost';
SET DEBUG='-d, se_error_replace_proxies_priv_table_delete';

# mysql.columns_priv table

CREATE TABLE test.t1(c1 int, c2 int);

SET DEBUG='+d, se_error_replace_column_table_read';
--error ER_LOCK_WAIT_TIMEOUT
GRANT SELECT(c1) ON test.t1 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_read';

SET DEBUG='+d, se_error_replace_column_table_add';
--error ER_LOCK_WAIT_TIMEOUT
GRANT SELECT(c1) ON test.t1 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_add';

GRANT SELECT(c1) ON test.t1 TO 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_column_table_update';
--error ER_LOCK_WAIT_TIMEOUT
GRANT UPDATE(c1) ON test.t1 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_update';

# Required for MyISAM
REVOKE UPDATE ON test.t1 FROM 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_column_table_delete';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE SELECT(c1) ON test.t1 FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_delete';

GRANT SELECT(c1), UPDATE(c1) ON test.t1 TO 'foo'@'localhost';
FLUSH PRIVILEGES;

SET DEBUG='+d, se_error_replace_column_table_revoke_read';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE SELECT ON test.t1 FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_revoke_read';

GRANT SELECT(c1) ON test.t1 TO 'foo'@'localhost';
FLUSH PRIVILEGES;

SET DEBUG='+d, se_error_replace_column_table_revoke_update';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE UPDATE ON test.t1 FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_revoke_update';
REVOKE UPDATE ON test.t1 FROM 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_column_table_revoke_delete';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE SELECT ON test.t1 FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_revoke_delete';

GRANT SELECT(c1) ON test.t1 TO 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_column_table_revoke_read_next';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE SELECT ON test.t1 FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_column_table_revoke_read_next';

DROP TABLE test.t1;

# mysql.tables_priv table

CREATE TABLE test.t2(c1 int, c2 int);

SET DEBUG='+d, se_error_replace_table_table_read';
--error ER_LOCK_WAIT_TIMEOUT
GRANT SELECT ON test.t2 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_table_table_read';

SET DEBUG='+d, se_error_replace_table_table_add';
--error ER_LOCK_WAIT_TIMEOUT
GRANT SELECT ON test.t2 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_table_table_add';
GRANT SELECT ON test.t2 TO 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_table_table_update';
--error ER_LOCK_WAIT_TIMEOUT
GRANT UPDATE ON test.t2 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_table_table_update';

DROP TABLE test.t2;

# mysql.procs_priv table

CREATE PROCEDURE test.p1()
  SELECT 1;

SET DEBUG='+d, se_error_replace_routine_table_read';
--error ER_LOCK_WAIT_TIMEOUT
GRANT EXECUTE ON PROCEDURE test.p1 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_routine_table_read';

SET DEBUG='+d, se_error_replace_routine_table_add';
--error ER_LOCK_WAIT_TIMEOUT
GRANT EXECUTE ON PROCEDURE test.p1 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_routine_table_add';
GRANT EXECUTE ON PROCEDURE test.p1 TO 'foo'@'localhost';

SET DEBUG='+d, se_error_replace_routine_table_update';
--error ER_LOCK_WAIT_TIMEOUT
GRANT ALTER ROUTINE ON PROCEDURE test.p1 TO 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_routine_table_update';

SET DEBUG='+d, se_error_replace_routine_table_delete';
--error ER_LOCK_WAIT_TIMEOUT
REVOKE ALL PRIVILEGES ON PROCEDURE test.p1 FROM 'foo'@'localhost';
SET DEBUG='-d, se_error_replace_routine_table_delete';

# rename user

SET DEBUG='+d, se_error_modify_grant_table_update';
--error ER_LOCK_WAIT_TIMEOUT
RENAME USER 'foo'@'localhost' TO 'foo_new'@'localhost';
SET DEBUG='-d, se_error_modify_grant_table_update';

SET DEBUG='+d, se_error_handle_grant_table_read';
--error ER_LOCK_WAIT_TIMEOUT
RENAME USER 'foo'@'localhost' TO 'foo_new'@'localhost';
SET DEBUG='-d, se_error_handle_grant_table_read';

SET DEBUG='+d, se_error_handle_grant_table_rnd_read';
--error ER_LOCK_WAIT_TIMEOUT
RENAME USER 'foo'@'localhost' TO 'foo_new'@'localhost';
SET DEBUG='-d, se_error_handle_grant_table_rnd_read';

# drop user

SET DEBUG='+d, se_error_modify_grant_table_delete';
--error ER_LOCK_WAIT_TIMEOUT
DROP USER 'foo'@'localhost';
SET DEBUG='-d, se_error_modify_grant_table_delete';

DROP PROCEDURE test.p1;
DROP USER 'foo'@'localhost';

# flush privileges

CREATE TABLE t1(a INT);
CREATE USER 'foo'@'localhost';
GRANT UPDATE (a) ON t1 TO 'foo'@'localhost';

SET DEBUG='+d, se_error_grant_table_init_read';
--error ER_LOCK_WAIT_TIMEOUT
FLUSH PRIVILEGES;
SET DEBUG='-d, se_error_grant_table_init_read';

SET DEBUG='+d, se_error_grant_table_init_read_next';
--error ER_LOCK_WAIT_TIMEOUT
FLUSH PRIVILEGES;
SET DEBUG='-d, se_error_grant_table_init_read_next';

CREATE PROCEDURE p() SET @x = 1;
GRANT EXECUTE ON PROCEDURE p TO 'foo'@'localhost';

SET DEBUG='+d, se_error_grant_load_read';
--error ER_LOCK_WAIT_TIMEOUT
FLUSH PRIVILEGES;
SET DEBUG='-d, se_error_grant_load_read';

SET DEBUG='+d, se_error_grant_load_read_next';
--error ER_LOCK_WAIT_TIMEOUT
FLUSH PRIVILEGES;
SET DEBUG='-d, se_error_grant_load_read_next';

SET DEBUG='+d, se_error_grant_load_procs_read';
--error ER_LOCK_WAIT_TIMEOUT
FLUSH PRIVILEGES;
SET DEBUG='-d, se_error_grant_load_procs_read';

SET DEBUG='+d, se_error_grant_load_procs_read_next';
--error ER_LOCK_WAIT_TIMEOUT
FLUSH PRIVILEGES;
SET DEBUG='-d, se_error_grant_load_procs_read_next';

DROP USER 'foo'@'localhost';
DROP TABLE t1;
DROP PROCEDURE p;

# Cleanup
SET DEBUG= @old_global_debug;
DROP USER 'bar'@'localhost';

Man Man