mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
ef415ceb14
test "length" first (otherwise when "length" is 0, the *from invalid access still triggers a Valgrind warning). I wrote to the Valgrind authors in case this is something fixable in Valgrind (normally the decision to issue a warning is based on the simulated CPU condition code, which should not be undefined here).
43 lines
1.9 KiB
Text
43 lines
1.9 KiB
Text
DROP TABLE IF EXISTS t1,t2,t3;
|
|
grant CREATE, SELECT, DROP on *.* to test@localhost;
|
|
set global read_only=0;
|
|
create table t1 (a int);
|
|
insert into t1 values(1);
|
|
create table t2 select * from t1;
|
|
set global read_only=1;
|
|
create table t3 (a int);
|
|
drop table t3;
|
|
select @@global.read_only;
|
|
@@global.read_only
|
|
1
|
|
create table t3 (a int);
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
insert into t1 values(1);
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
update t1 set a=1 where 1=0;
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
update t1,t2 set t1.a=t2.a+1 where t1.a=t2.a;
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
delete t1,t2 from t1,t2 where t1.a=t2.a;
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
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;
|
|
update t1,t3 set t1.a=t3.a+1 where t1.a=t3.a;
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
update t1,t3 set t3.a=t1.a+1 where t1.a=t3.a;
|
|
update t4,t3 set t4.a=t3.a+1 where t4.a=t3.a;
|
|
delete t1 from t1,t3 where t1.a=t3.a;
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
delete t3 from t1,t3 where t1.a=t3.a;
|
|
delete t4 from t3,t4 where t4.a=t3.a;
|
|
create temporary table t1 (a int);
|
|
insert into t1 values(1);
|
|
update t1,t3 set t1.a=t3.a+1 where t1.a=t3.a;
|
|
delete t1 from t1,t3 where t1.a=t3.a;
|
|
drop table t1;
|
|
insert into t1 values(1);
|
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
|
drop table t1,t2;
|
|
drop user test@localhost;
|