# Test of the READ_ONLY global variable: # check that it blocks updates unless they are only on temporary tables. # should work with embedded server after mysqltest is fixed -- source include/not_embedded.inc create table t1 (a int); insert into t1 values(1); # READ_ONLY does nothing to SUPER users # so we use a non-SUPER one: grant CREATE, SELECT, DROP on *.* to test@localhost; connection default; set global read_only=1; create table t3 (a int); drop table t3; connect (con1,localhost,test,,test); connection con1; # With temp tables updates should be accepted: create temporary table t3 (a int); create temporary table t4 (a int) select * from t3; insert into t3 values(1); insert into t4 select * from t3; # a non-temp table updated: --error 1290 update t1,t3 set t1.a=t3.a+1 where t1.a=t3.a; # no non-temp table updated (just swapped): update t1,t3 set t3.a=t1.a+1 where t1.a=t3.a;