403Webshell
Server IP : 49.212.180.16  /  Your IP : 13.58.219.150
Web Server : Apache
System : FreeBSD www2606.sakura.ne.jp 13.0-RELEASE-p14 FreeBSD 13.0-RELEASE-p14 #2: Mon Dec 9 13:54:55 JST 2024 root@www5301.sakura.ne.jp:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
User : utannto ( 1076)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/rs/mysql/5.1/mysql-test/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/rs/mysql/5.1/mysql-test/t/read_only_innodb.test
# should work with embedded server after mysqltest is fixed
-- source include/not_embedded.inc
-- source include/have_innodb.inc

#
# BUG#11733: COMMITs should not happen if read-only is set
#

--disable_warnings
DROP TABLE IF EXISTS table_11733 ;
--enable_warnings

# READ_ONLY does nothing to SUPER users
# so we use a non-SUPER one:

grant CREATE, SELECT, DROP on *.* to test@localhost;

connect (con1,localhost,test,,test);

connection default;
set global read_only=0;

# Any transactional engine will do
create table table_11733 (a int) engine=InnoDb;

connection con1;
BEGIN;
insert into table_11733 values(11733);

connection default;
set global read_only=1;

connection con1;
select @@global.read_only;
select * from table_11733 ;
-- error ER_OPTION_PREVENTS_STATEMENT
COMMIT;

connection default;
set global read_only=0;
drop table table_11733 ;
drop user test@localhost;

disconnect con1;

#
# Bug #35732: read-only blocks SELECT statements in InnoDB
#
# Test 1: read only mode
GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
connect(con1, localhost, test, , test);

connection default;
CREATE TABLE t1(a INT) ENGINE=INNODB;
INSERT INTO t1 VALUES (0), (1);
SET GLOBAL read_only=1;

connection con1;
SELECT * FROM t1;
BEGIN;
SELECT * FROM t1;
COMMIT;

connection default;
SET GLOBAL read_only=0;

#
# Test 2: global read lock
#
FLUSH TABLES WITH READ LOCK;

connection con1;
SELECT * FROM t1;
BEGIN;
SELECT * FROM t1;
COMMIT;

connection default;
UNLOCK TABLES;
DROP TABLE t1;
DROP USER test@localhost;

disconnect con1;

--echo echo End of 5.1 tests 

Youez - 2016 - github.com/yon3zu
LinuXploit