2004-07-08 15:54:07 +02:00
SET NAMES binary;
2004-10-20 14:04:43 +02:00
drop database if exists mysqltest;
2005-03-27 15:46:06 +02:00
drop database if exists mysqltest_1;
2003-07-22 22:00:51 +02:00
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
2004-10-20 14:04:43 +02:00
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
2003-07-22 22:00:51 +02:00
flush privileges;
2005-03-18 12:32:28 +01:00
grant all privileges on `my\_1`.* to mysqltest_1@localhost with grant option;
2005-03-22 15:54:18 +01:00
grant create user on *.* to mysqltest_1@localhost;
2005-03-18 12:32:28 +01:00
create user mysqltest_2@localhost;
grant select on `my\_1`.* to mysqltest_2@localhost;
grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass';
ERROR 42000: You must have privileges to update tables in the mysql database to be able to change passwords for others
grant update on mysql.* to mysqltest_1@localhost;
grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass';
grant select on `my\_1`.* to mysqltest_3@localhost;
grant insert on mysql.* to mysqltest_1@localhost;
grant select on `my\_1`.* to mysqltest_3@localhost;
grant select on `my\_1`.* to mysqltest_4@localhost identified by 'pass';
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
2003-07-22 22:00:51 +02:00
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
2005-03-22 15:54:18 +01:00
grant create user on *.* to mysqltest_1@localhost;
2003-07-22 22:00:51 +02:00
select current_user();
current_user()
mysqltest_1@localhost
2003-07-22 22:21:23 +02:00
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
2004-06-16 05:18:20 +02:00
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'my_%'
2004-11-02 15:45:26 +01:00
set @@sql_mode='NO_AUTO_CREATE_USER';
select @@sql_mode;
@@sql_mode
NO_AUTO_CREATE_USER
grant select on `my\_1`.* to mysqltest_4@localhost with grant option;
2005-03-23 19:18:25 +01:00
ERROR 42000: Can't find any matching row in the user table
2004-11-02 15:45:26 +01:00
grant select on `my\_1`.* to mysqltest_4@localhost identified by 'mypass'
with grant option;
2003-07-22 22:21:23 +02:00
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
2005-03-22 15:54:18 +01:00
GRANT CREATE USER ON *.* TO 'mysqltest_1'@'localhost'
2003-07-22 22:21:23 +02:00
GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
show grants for mysqltest_2@localhost;
2005-03-23 19:18:25 +01:00
Grants for mysqltest_2@localhost
GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost'
GRANT ALL PRIVILEGES ON `my\_1`.* TO 'mysqltest_2'@'localhost' WITH GRANT OPTION
2003-07-22 22:00:51 +02:00
show grants for mysqltest_3@localhost;
2003-07-22 22:21:23 +02:00
ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'localhost'
2003-07-22 22:00:51 +02:00
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
2005-03-27 15:46:06 +02:00
create database mysqltest_1;
grant all privileges on `mysqltest\_1`.* to mysqltest_1@localhost with grant option;
select current_user();
current_user()
mysqltest_1@localhost
show databases;
Database
2005-03-30 00:24:58 +02:00
information_schema
2005-03-27 15:46:06 +02:00
mysqltest_1
test
grant all privileges on `mysqltest_1`.* to mysqltest_1@localhost with grant option;
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest_1'
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON `mysqltest\_1`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
drop database mysqltest_1;
flush privileges;
2004-10-20 14:04:43 +02:00
create database mysqltest;
grant INSERT, SELECT on mysqltest.* to mysqltest_1@localhost;
flush privileges;
use mysqltest;
create table t1 (id int primary key, data varchar(255));
show grants for current_user();
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT, INSERT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
insert into t1 values (1, 'I can''t change it!');
update t1 set data='I can change it!' where id = 1;
2004-12-31 17:59:43 +01:00
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
2004-10-20 14:04:43 +02:00
insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!';
2004-12-31 17:59:43 +01:00
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1'
2004-10-20 14:04:43 +02:00
select * from t1;
id data
1 I can't change it!
drop table t1;
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
flush privileges;
2004-12-31 17:59:43 +01:00
create table t1 (a int, b int);
grant select (a) on t1 to mysqltest_1@localhost with grant option;
grant select (a,b) on t1 to mysqltest_2@localhost;
2005-03-23 19:18:25 +01:00
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't1'
2004-12-31 17:59:43 +01:00
grant select on t1 to mysqltest_3@localhost;
2005-03-23 19:18:25 +01:00
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1'
2004-12-31 17:59:43 +01:00
drop table t1;
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
drop database mysqltest;
use test;
2005-12-28 14:43:50 +01:00
create user mysqltest_1@host1;
create user mysqltest_2@host2;
create user mysqltest_3@host3;
create user mysqltest_4@host4;
create user mysqltest_5@host5;
create user mysqltest_6@host6;
create user mysqltest_7@host7;
2005-12-28 09:31:40 +01:00
flush privileges;
drop user mysqltest_3@host3;
drop user mysqltest_1@host1, mysqltest_2@host2, mysqltest_4@host4,
mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7;
2006-08-10 04:23:41 +02:00
create database mysqltest_1;
grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
set sql_log_off = 1;
2006-08-10 18:39:18 +02:00
ERROR 42000: Access denied; you need the SUPER privilege for this operation
2006-08-10 04:23:41 +02:00
set sql_log_bin = 0;
2006-08-10 18:39:18 +02:00
ERROR 42000: Access denied; you need the SUPER privilege for this operation
2006-08-10 04:23:41 +02:00
delete from mysql.user where user like 'mysqltest\_1';
delete from mysql.db where user like 'mysqltest\_1';
drop database mysqltest_1;
flush privileges;
2004-11-25 21:55:49 +01:00
set sql_mode='maxdb';
drop table if exists t1, t2;
create table t1(c1 int);
create table t2(c1 int, c2 int);
create user 'mysqltest_1';
create user 'mysqltest_1';
2004-11-27 23:07:30 +01:00
ERROR HY000: Operation CREATE USER failed for 'mysqltest_1'@'%'
2004-11-25 21:55:49 +01:00
create user 'mysqltest_2' identified by 'Mysqltest-2';
create user 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff';
grant select on *.* to 'mysqltest_2';
grant insert on test.* to 'mysqltest_2';
grant update on test.t1 to 'mysqltest_2';
grant update (c2) on test.t2 to 'mysqltest_2';
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
host user password
% mysqltest_1
% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
host db user
% test mysqltest_2
select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
host db user table_name
% test mysqltest_2 t1
% test mysqltest_2 t2
select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
host db user table_name column_name
% test mysqltest_2 t2 c2
show grants for 'mysqltest_1';
Grants for mysqltest_1@%
GRANT USAGE ON *.* TO 'mysqltest_1'@'%'
show grants for 'mysqltest_2';
Grants for mysqltest_2@%
GRANT SELECT ON *.* TO 'mysqltest_2'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
GRANT INSERT ON "test".* TO 'mysqltest_2'@'%'
GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_2'@'%'
GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%'
drop user 'mysqltest_1';
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
host user password
% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
host db user
% test mysqltest_2
select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
host db user table_name
% test mysqltest_2 t1
% test mysqltest_2 t2
select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
host db user table_name column_name
% test mysqltest_2 t2 c2
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
rename user 'mysqltest_2' to 'mysqltest_1';
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
host user password
% mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff
select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user;
host db user
% test mysqltest_1
select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name;
host db user table_name
% test mysqltest_1 t1
% test mysqltest_1 t2
select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name;
host db user table_name column_name
% test mysqltest_1 t2 c2
show grants for 'mysqltest_1';
Grants for mysqltest_1@%
GRANT SELECT ON *.* TO 'mysqltest_1'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
GRANT INSERT ON "test".* TO 'mysqltest_1'@'%'
GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%'
GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%'
drop user 'mysqltest_1', 'mysqltest_3';
2004-11-26 11:18:20 +01:00
drop user 'mysqltest_1';
2004-11-27 23:07:30 +01:00
ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%'
2004-11-25 21:55:49 +01:00
drop table t1, t2;
insert into mysql.db set user='mysqltest_1', db='%', host='%';
flush privileges;
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
revoke all privileges, grant option from 'mysqltest_1';
2005-11-24 01:36:28 +01:00
ERROR HY000: Can't revoke all privileges for one or more of the requested users
2004-11-25 21:55:49 +01:00
drop user 'mysqltest_1';
select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user;
host db user
insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1';
flush privileges;
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
drop user 'mysqltest_1';
select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name;
host db user table_name
insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1';
flush privileges;
show grants for 'mysqltest_1';
ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%'
drop user 'mysqltest_1';
select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name;
host db user table_name column_name
create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
create user 'mysqltest_1', 'mysqltest_2' identified by 'Mysqltest-2', 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff';
rename user 'mysqltest_1' to 'mysqltest_1a', 'mysqltest_2' TO 'mysqltest_2a', 'mysqltest_3' TO 'mysqltest_3a';
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
2004-11-27 23:07:30 +01:00
ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%','mysqltest_2'@'%','mysqltest_3'@'%'
2004-11-25 21:55:49 +01:00
drop user 'mysqltest_1a', 'mysqltest_2a', 'mysqltest_3a';
create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
create user 'mysqltest_1a', 'mysqltest_2', 'mysqltest_3a';
2004-11-27 23:07:30 +01:00
ERROR HY000: Operation CREATE USER failed for 'mysqltest_2'@'%'
2004-11-25 21:55:49 +01:00
rename user 'mysqltest_1a' to 'mysqltest_1b', 'mysqltest_2a' TO 'mysqltest_2b', 'mysqltest_3a' TO 'mysqltest_3b';
2004-11-27 23:07:30 +01:00
ERROR HY000: Operation RENAME USER failed for 'mysqltest_2a'@'%'
2004-11-25 21:55:49 +01:00
drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3';
drop user 'mysqltest_1b', 'mysqltest_2b', 'mysqltest_3b';
2004-11-27 23:07:30 +01:00
ERROR HY000: Operation DROP USER failed for 'mysqltest_2b'@'%'
2004-11-25 21:55:49 +01:00
create user 'mysqltest_2' identified by 'Mysqltest-2';
drop user 'mysqltest_2' identified by 'Mysqltest-2';
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 'identified by 'Mysqltest-2'' at line 1
Add new option "check-testcases" to mysql-test-run.pl
Cleanup the sideeffects from most of the testcases with sideeffects.
mysql-test/mysql-test-run.pl:
Add option "check-testcases" to mysql-test-run.pl
Will execute "include/check-testcase.test" once before each tescase and record the output into "var/tmp/check-testcase.result"
After the teastcase it will run again and this time compare the output with previously recorded file.
mysql-test/r/analyze.result:
Drop table t1 at end of test
mysql-test/r/create_select_tmp.result:
Drop table t1 at end of test
mysql-test/r/ctype_cp932.result:
Drop table t1 at end of test
mysql-test/r/ctype_recoding.result:
Drop table t1 at end of test
mysql-test/r/grant2.result:
Drop user mysqltest_2 and mysqltest_A@'%'
mysql-test/r/join_outer.result:
Drop view v1 to cleanup
mysql-test/r/ps_1general.result:
Drop table t1 at end of test
mysql-test/r/query_cache.result:
Drop function "f1"
mysql-test/r/read_only.result:
Reset the "read_only" flag
mysql-test/r/rpl000001.result:
Remove user "blafasel2"
mysql-test/r/rpl000017.result:
Remove user "replicate"
mysql-test/r/rpl_failed_optimize.result:
Drop table t1 to cleanup
mysql-test/r/rpl_flush_tables.result:
Drop tables t3, t4, t5
mysql-test/r/rpl_ignore_revoke.result:
Delete user "user_foo"
mysql-test/r/rpl_insert_id.result:
Drop table t1 to cleanup
mysql-test/r/rpl_loaddata.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_loaddata_rule_m.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_loaddata_rule_s.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_misc_functions.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_multi_update3.result:
Drop tyable t1 and t2 to cleanup
mysql-test/r/rpl_replicate_do.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_skip_error.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_slave_status.result:
Drop tyable t1 to cleanup
mysql-test/r/sp-prelocking.result:
Drop view v1 and tables t1, t2, t3 and t4 to cleanup
mysql-test/r/sp-security.result:
Delete users to cleanup
Delete remaining traces in tables_priv and procs_priv
mysql-test/r/subselect_innodb.result:
Drop procedure p1 to cleanup
mysql-test/r/trigger-compat.result:
Drop trigger wl2818_trg1 and wl2818_trg2.
Drop table t1, t2
Drop database mysqltest_db1
And the users "mysqltest_dfn@localhost" and "mysqltest_inv@localhost"
mysql-test/r/type_bit.result:
Drop tables t1 and t2 to cleanup
mysql-test/r/variables.result:
Set GLOBAL max_join_size to 10 as it originally was in variables-master.opt
mysql-test/r/view_grant.result:
Dop user "test@localhost" to cleanup
mysql-test/t/analyze.test:
Drop table t1 to cleanup
mysql-test/t/create_select_tmp.test:
Drop table t1 to cleanup
mysql-test/t/ctype_cp932.test:
Drop table t1 to cleanup
mysql-test/t/ctype_recoding.test:
Drop table t1 to cleanup
mysql-test/t/fulltext_var.test:
Restore the original ft_boolean_syntax
mysql-test/t/grant2.test:
Drop users "mysqltest_2" and "mysqltest_A@'%'" to cleanup
mysql-test/t/innodb_cache.test:
Reset query_cache_size to original value
mysql-test/t/join_outer.test:
Drop view v1 to cleanup
mysql-test/t/ps_1general.test:
Drop table t1 to cleanup
mysql-test/t/query_cache.test:
Drop function "f1" to cleanup
mysql-test/t/read_only.test:
Reset the readonly flag
mysql-test/t/rpl000001.test:
Delete user "blafasel2" to cleanup
mysql-test/t/rpl000017.test:
Delete user "replicate" to cleanup
mysql-test/t/rpl_failed_optimize.test:
Drop table t1 to cleanup
mysql-test/t/rpl_flush_tables.test:
Droip table t3, t4 and t5 to cleanup
mysql-test/t/rpl_ignore_revoke.test:
Delet user "user_foo" to cleanup
mysql-test/t/rpl_insert_id.test:
drop table t1 to cleanup
mysql-test/t/rpl_loaddata.test:
Drop table t1 to cleanup
mysql-test/t/rpl_loaddata_rule_m.test:
Drop table t1 to cleanup
mysql-test/t/rpl_loaddata_rule_s.test:
Drop table t1 to cleanup
mysql-test/t/rpl_misc_functions.test:
Drop table t1 to cleanup
mysql-test/t/rpl_multi_update3.test:
Drop table t1 and t2 to cleanup
mysql-test/t/rpl_replicate_do.test:
Drop table t1 to cleanup
mysql-test/t/rpl_skip_error.test:
Drop table t1 to cleanup
mysql-test/t/rpl_slave_status.test:
Drop table t1 to cleanup
mysql-test/t/sp-prelocking.test:
Drop table t1, t2 t3 and t4 to cleanup
Drop view v1
mysql-test/t/sp-security.test:
Delete test users from mysql.user, mysql.db, mysql.procs_priv and mysql.tables_priv
Drop table t1 to cleanup
mysql-test/t/subselect_innodb.test:
Drop procedure p1 to cleanup
mysql-test/t/trigger-compat.test:
Drop trigger wl2818_trg1 and wl2818_trg2 to cleanup
Drop table t1, t2
Drop users
drop database mysqltest_db1
mysql-test/t/type_bit.test:
drop table t1 and t2 to cleanup
mysql-test/t/variables-master.opt:
Increase max_join_size to 100.
mysql-test/t/variables.test:
Set max_join_size to 10, which was the original value in variables-master.opt
mysql-test/t/view_grant.test:
Drop the user "test@localhost"
mysql-test/include/check-testcase.test:
New BitKeeper file ``mysql-test/include/check-testcase.test''
2006-01-26 17:54:34 +01:00
drop user 'mysqltest_2';
2004-11-25 21:55:49 +01:00
create user '%@b'@'b';
show grants for '%@b'@'b';
Grants for %@b@b
GRANT USAGE ON *.* TO '%@b'@'b'
grant select on mysql.* to '%@b'@'b';
show grants for '%@b'@'b';
Grants for %@b@b
GRANT USAGE ON *.* TO '%@b'@'b'
GRANT SELECT ON "mysql".* TO '%@b'@'b'
rename user '%@b'@'b' to '%@a'@'a';
show grants for '%@b'@'b';
ERROR 42000: There is no such grant defined for user '%@b' on host 'b'
show grants for '%@a'@'a';
Grants for %@a@a
GRANT USAGE ON *.* TO '%@a'@'a'
GRANT SELECT ON "mysql".* TO '%@a'@'a'
drop user '%@a'@'a';
create user mysqltest_2@localhost;
2005-03-22 15:54:18 +01:00
grant create user on *.* to mysqltest_2@localhost;
2004-11-26 11:18:20 +01:00
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
2004-12-31 17:59:43 +01:00
ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user'
2004-11-25 21:55:49 +01:00
create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%';
drop user mysqltest_B@'%';
drop user mysqltest_2@localhost;
create user mysqltest_3@localhost;
2005-03-22 15:54:18 +01:00
grant INSERT,DELETE,UPDATE on mysql.* to mysqltest_3@localhost;
show grants;
Grants for mysqltest_3@localhost
GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost'
2004-11-26 11:18:20 +01:00
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
2005-03-22 15:54:18 +01:00
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
2004-11-25 21:55:49 +01:00
insert into mysql.user set host='%', user='mysqltest_B';
2005-01-15 02:09:35 +01:00
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
2004-11-25 21:55:49 +01:00
create user mysqltest_A@'%';
rename user mysqltest_B@'%' to mysqltest_C@'%';
2005-03-22 15:54:18 +01:00
drop user mysqltest_C@'%';
Add new option "check-testcases" to mysql-test-run.pl
Cleanup the sideeffects from most of the testcases with sideeffects.
mysql-test/mysql-test-run.pl:
Add option "check-testcases" to mysql-test-run.pl
Will execute "include/check-testcase.test" once before each tescase and record the output into "var/tmp/check-testcase.result"
After the teastcase it will run again and this time compare the output with previously recorded file.
mysql-test/r/analyze.result:
Drop table t1 at end of test
mysql-test/r/create_select_tmp.result:
Drop table t1 at end of test
mysql-test/r/ctype_cp932.result:
Drop table t1 at end of test
mysql-test/r/ctype_recoding.result:
Drop table t1 at end of test
mysql-test/r/grant2.result:
Drop user mysqltest_2 and mysqltest_A@'%'
mysql-test/r/join_outer.result:
Drop view v1 to cleanup
mysql-test/r/ps_1general.result:
Drop table t1 at end of test
mysql-test/r/query_cache.result:
Drop function "f1"
mysql-test/r/read_only.result:
Reset the "read_only" flag
mysql-test/r/rpl000001.result:
Remove user "blafasel2"
mysql-test/r/rpl000017.result:
Remove user "replicate"
mysql-test/r/rpl_failed_optimize.result:
Drop table t1 to cleanup
mysql-test/r/rpl_flush_tables.result:
Drop tables t3, t4, t5
mysql-test/r/rpl_ignore_revoke.result:
Delete user "user_foo"
mysql-test/r/rpl_insert_id.result:
Drop table t1 to cleanup
mysql-test/r/rpl_loaddata.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_loaddata_rule_m.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_loaddata_rule_s.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_misc_functions.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_multi_update3.result:
Drop tyable t1 and t2 to cleanup
mysql-test/r/rpl_replicate_do.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_skip_error.result:
Drop tyable t1 to cleanup
mysql-test/r/rpl_slave_status.result:
Drop tyable t1 to cleanup
mysql-test/r/sp-prelocking.result:
Drop view v1 and tables t1, t2, t3 and t4 to cleanup
mysql-test/r/sp-security.result:
Delete users to cleanup
Delete remaining traces in tables_priv and procs_priv
mysql-test/r/subselect_innodb.result:
Drop procedure p1 to cleanup
mysql-test/r/trigger-compat.result:
Drop trigger wl2818_trg1 and wl2818_trg2.
Drop table t1, t2
Drop database mysqltest_db1
And the users "mysqltest_dfn@localhost" and "mysqltest_inv@localhost"
mysql-test/r/type_bit.result:
Drop tables t1 and t2 to cleanup
mysql-test/r/variables.result:
Set GLOBAL max_join_size to 10 as it originally was in variables-master.opt
mysql-test/r/view_grant.result:
Dop user "test@localhost" to cleanup
mysql-test/t/analyze.test:
Drop table t1 to cleanup
mysql-test/t/create_select_tmp.test:
Drop table t1 to cleanup
mysql-test/t/ctype_cp932.test:
Drop table t1 to cleanup
mysql-test/t/ctype_recoding.test:
Drop table t1 to cleanup
mysql-test/t/fulltext_var.test:
Restore the original ft_boolean_syntax
mysql-test/t/grant2.test:
Drop users "mysqltest_2" and "mysqltest_A@'%'" to cleanup
mysql-test/t/innodb_cache.test:
Reset query_cache_size to original value
mysql-test/t/join_outer.test:
Drop view v1 to cleanup
mysql-test/t/ps_1general.test:
Drop table t1 to cleanup
mysql-test/t/query_cache.test:
Drop function "f1" to cleanup
mysql-test/t/read_only.test:
Reset the readonly flag
mysql-test/t/rpl000001.test:
Delete user "blafasel2" to cleanup
mysql-test/t/rpl000017.test:
Delete user "replicate" to cleanup
mysql-test/t/rpl_failed_optimize.test:
Drop table t1 to cleanup
mysql-test/t/rpl_flush_tables.test:
Droip table t3, t4 and t5 to cleanup
mysql-test/t/rpl_ignore_revoke.test:
Delet user "user_foo" to cleanup
mysql-test/t/rpl_insert_id.test:
drop table t1 to cleanup
mysql-test/t/rpl_loaddata.test:
Drop table t1 to cleanup
mysql-test/t/rpl_loaddata_rule_m.test:
Drop table t1 to cleanup
mysql-test/t/rpl_loaddata_rule_s.test:
Drop table t1 to cleanup
mysql-test/t/rpl_misc_functions.test:
Drop table t1 to cleanup
mysql-test/t/rpl_multi_update3.test:
Drop table t1 and t2 to cleanup
mysql-test/t/rpl_replicate_do.test:
Drop table t1 to cleanup
mysql-test/t/rpl_skip_error.test:
Drop table t1 to cleanup
mysql-test/t/rpl_slave_status.test:
Drop table t1 to cleanup
mysql-test/t/sp-prelocking.test:
Drop table t1, t2 t3 and t4 to cleanup
Drop view v1
mysql-test/t/sp-security.test:
Delete test users from mysql.user, mysql.db, mysql.procs_priv and mysql.tables_priv
Drop table t1 to cleanup
mysql-test/t/subselect_innodb.test:
Drop procedure p1 to cleanup
mysql-test/t/trigger-compat.test:
Drop trigger wl2818_trg1 and wl2818_trg2 to cleanup
Drop table t1, t2
Drop users
drop database mysqltest_db1
mysql-test/t/type_bit.test:
drop table t1 and t2 to cleanup
mysql-test/t/variables-master.opt:
Increase max_join_size to 100.
mysql-test/t/variables.test:
Set max_join_size to 10, which was the original value in variables-master.opt
mysql-test/t/view_grant.test:
Drop the user "test@localhost"
mysql-test/include/check-testcase.test:
New BitKeeper file ``mysql-test/include/check-testcase.test''
2006-01-26 17:54:34 +01:00
drop user mysqltest_A@'%';
2004-11-25 21:55:49 +01:00
drop user mysqltest_3@localhost;
2005-03-04 02:44:28 +01:00
set @@sql_mode='';
2005-03-03 01:30:24 +01:00
create database mysqltest_1;
create table mysqltest_1.t1 (i int);
insert into mysqltest_1.t1 values (1),(2),(3);
GRANT ALL ON mysqltest_1.t1 TO mysqltest_1@'127.0.0.0/255.0.0.0';
show grants for current_user();
Grants for mysqltest_1@127.0.0.0/255.0.0.0
GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.0/255.0.0.0'
GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO 'mysqltest_1'@'127.0.0.0/255.0.0.0'
select * from t1;
i
1
2
3
REVOKE ALL ON mysqltest_1.t1 FROM mysqltest_1@'127.0.0.0/255.0.0.0';
2005-08-23 00:48:50 +02:00
delete from mysql.user where user like 'mysqltest\_1';
flush privileges;
2005-03-03 01:30:24 +01:00
drop table mysqltest_1.t1;
2005-08-23 00:48:50 +02:00
grant all on mysqltest_1.* to mysqltest_1@'127.0.0.1';
select current_user();
current_user()
mysqltest_1@127.0.0.1
set password = password('changed');
select host, length(password) from mysql.user where user like 'mysqltest\_1';
host length(password)
127.0.0.1 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.1';
delete from mysql.user where user like 'mysqltest\_1';
flush privileges;
grant all on mysqltest_1.* to mysqltest_1@'127.0.0.0/255.0.0.0';
select current_user();
current_user()
mysqltest_1@127.0.0.0/255.0.0.0
set password = password('changed');
select host, length(password) from mysql.user where user like 'mysqltest\_1';
host length(password)
127.0.0.0/255.0.0.0 41
revoke all on mysqltest_1.* from mysqltest_1@'127.0.0.0/255.0.0.0';
delete from mysql.user where user like 'mysqltest\_1';
flush privileges;
2005-03-03 01:30:24 +01:00
drop database mysqltest_1;
2005-08-23 00:48:50 +02:00
set password = password("changed");
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
2005-09-01 14:52:59 +02:00
lock table mysql.user write;
Update tests and result files after running with new mysqltest that better detects problems with test files
mysql-test/r/csv.result:
Update after add of missing semicolon
mysql-test/r/drop.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_block_commit.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_read_lock_kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/grant2.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/handler.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/innodb_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/lock_multi.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/multi_update.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/mysqltest.result:
Update result
mysql-test/r/query_cache.result:
Update after add of missing semicolon
mysql-test/r/query_cache_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp-threads.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp_notembedded.result:
Update after add of missing semicolon
mysql-test/r/type_blob.result:
Remove extra drop table
mysql-test/t/csv.test:
Add missing semicolon
mysql-test/t/query_cache.test:
Add missing semicolon
mysql-test/t/sp-error.test:
Remove "tab" from end of error declaration
mysql-test/t/sp.test:
Wrong delimiter, used ; instead of |
mysql-test/t/sp_notembedded.test:
Wrong delimiter, used ; instead of |
mysql-test/t/view_grant.test:
An incomplete error name specification was used.
2006-10-04 13:09:37 +02:00
flush privileges;
grant all on *.* to 'mysqltest_1'@'localhost';
2005-09-01 14:52:59 +02:00
unlock tables;
lock table mysql.user write;
Update tests and result files after running with new mysqltest that better detects problems with test files
mysql-test/r/csv.result:
Update after add of missing semicolon
mysql-test/r/drop.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_block_commit.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_read_lock_kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/grant2.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/handler.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/innodb_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/lock_multi.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/multi_update.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/mysqltest.result:
Update result
mysql-test/r/query_cache.result:
Update after add of missing semicolon
mysql-test/r/query_cache_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp-threads.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp_notembedded.result:
Update after add of missing semicolon
mysql-test/r/type_blob.result:
Remove extra drop table
mysql-test/t/csv.test:
Add missing semicolon
mysql-test/t/query_cache.test:
Add missing semicolon
mysql-test/t/sp-error.test:
Remove "tab" from end of error declaration
mysql-test/t/sp.test:
Wrong delimiter, used ; instead of |
mysql-test/t/sp_notembedded.test:
Wrong delimiter, used ; instead of |
mysql-test/t/view_grant.test:
An incomplete error name specification was used.
2006-10-04 13:09:37 +02:00
set password for 'mysqltest_1'@'localhost' = password('');
revoke all on *.* from 'mysqltest_1'@'localhost';
2005-09-01 14:52:59 +02:00
unlock tables;
drop user 'mysqltest_1'@'localhost';
2006-02-27 16:41:58 +01:00
create database TESTDB;
create table t2(a int);
create temporary table t1 as select * from mysql.user;
delete from mysql.user where host='localhost';
2006-02-28 13:54:32 +01:00
INSERT INTO mysql.user (host, user, password) VALUES
('%','mysqltest_1',password('password'));
2006-02-27 16:41:58 +01:00
Warnings:
2006-02-28 13:54:32 +01:00
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
Warning 1364 Field 'x509_subject' doesn't have a default value
INSERT INTO mysql.db (host, db, user, select_priv) VALUES
('%','TESTDB','mysqltest_1','Y');
2006-02-27 16:41:58 +01:00
FLUSH PRIVILEGES;
create database TEStdb;
2006-03-02 11:01:58 +01:00
Got one of the listed errors
2006-02-27 16:41:58 +01:00
delete from mysql.user;
delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
insert into mysql.user select * from t1;
drop table t1, t2;
drop database TESTDB;
flush privileges;
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).
mysql-test/r/func_time.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/gis.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/grant2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/innodb_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/ps.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/query_cache.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/query_cache_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/rpl_sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Move test for SF-calls in different replication modes to its own file, rpl_sf.
mysql-test/r/rpl_sp_effects.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/timezone2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/func_time.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/gis.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/grant2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/innodb_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/ps.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp_effects.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/timezone2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
sql/item_func.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
If 'log_bin_trust_function_creators' variable is set, don't throw an error
on calling a non-deterministc function in statement-based replication (SBR).
sql/sql_parse.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP)
while doing statement-based replication (SBR), as the routine body is
executed statement-by-statement.
mysql-test/r/rpl_sf.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
mysql-test/t/rpl_sf.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
2006-11-17 21:30:28 +01:00
SET GLOBAL log_bin_trust_function_creators = 1;
2006-04-18 10:46:17 +02:00
grant all privileges on test.* to `a@`@localhost;
grant execute on * to `a@`@localhost;
create table t2 (s1 int);
insert into t2 values (1);
drop function if exists f2;
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).
mysql-test/r/func_time.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/gis.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/grant2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/innodb_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/ps.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/query_cache.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/query_cache_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/rpl_sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Move test for SF-calls in different replication modes to its own file, rpl_sf.
mysql-test/r/rpl_sp_effects.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/timezone2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/func_time.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/gis.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/grant2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/innodb_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/ps.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp_effects.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/timezone2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
sql/item_func.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
If 'log_bin_trust_function_creators' variable is set, don't throw an error
on calling a non-deterministc function in statement-based replication (SBR).
sql/sql_parse.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP)
while doing statement-based replication (SBR), as the routine body is
executed statement-by-statement.
mysql-test/r/rpl_sf.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
mysql-test/t/rpl_sf.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
2006-11-17 21:30:28 +01:00
create function f2 () returns int
begin declare v int; select s1 from t2 into v; return v; end//
2006-04-18 10:46:17 +02:00
select f2();
f2()
1
drop function f2;
drop table t2;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost;
2006-04-18 18:10:47 +02:00
drop user `a@`@localhost;
2007-06-11 15:14:16 +02:00
grant all on `mysqltest\_%`.* to mysqltest_1@localhost with grant option;
grant usage on *.* to mysqltest_2@localhost;
create database mysqltest_1;
use mysqltest_1;
create table t1 (f1 int);
grant create on `mysqltest\_1`.* to mysqltest_2@localhost;
grant select on mysqltest_1.t1 to mysqltest_2@localhost;
create database mysqltest_3;
ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest_3'
use mysqltest_1;
create table t2(f1 int);
select * from t1;
f1
drop database mysqltest_1;
revoke all privileges, grant option from mysqltest_1@localhost;
revoke all privileges, grant option from mysqltest_2@localhost;
drop user mysqltest_1@localhost;
drop user mysqltest_2@localhost;
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).
mysql-test/r/func_time.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/gis.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/grant2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/innodb_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/ps.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/query_cache.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/query_cache_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/rpl_sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Move test for SF-calls in different replication modes to its own file, rpl_sf.
mysql-test/r/rpl_sp_effects.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/timezone2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/func_time.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/gis.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/grant2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/innodb_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/ps.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp_effects.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/timezone2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
sql/item_func.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
If 'log_bin_trust_function_creators' variable is set, don't throw an error
on calling a non-deterministc function in statement-based replication (SBR).
sql/sql_parse.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP)
while doing statement-based replication (SBR), as the routine body is
executed statement-by-statement.
mysql-test/r/rpl_sf.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
mysql-test/t/rpl_sf.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
2006-11-17 21:30:28 +01:00
SET GLOBAL log_bin_trust_function_creators = 0;
2007-05-23 13:26:16 +02:00
drop database if exists mysqltest_1;
drop database if exists mysqltest_2;
drop user mysqltest_u1@localhost;
create database mysqltest_1;
create database mysqltest_2;
grant all on mysqltest_1.* to mysqltest_u1@localhost;
use mysqltest_2;
create table t1 (i int);
show create table mysqltest_2.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
create table t1 like mysqltest_2.t1;
ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1'
grant select on mysqltest_2.t1 to mysqltest_u1@localhost;
show create table mysqltest_2.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t1 like mysqltest_2.t1;
use test;
drop database mysqltest_1;
drop database mysqltest_2;
drop user mysqltest_u1@localhost;
2007-05-23 13:22:13 +02:00
End of 5.0 tests