diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-12 16:52:09 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-15 22:23:10 +0200 |
commit | a65623b3eb2695069791aa21d278b8bc751a560e (patch) | |
tree | ad75e96d5165f1ff7446b584f27ee248df248025 /mysql-test/suite/csv | |
parent | 71b45032421fe47fceabe419c63e79c44794428d (diff) | |
download | mariadb-git-a65623b3eb2695069791aa21d278b8bc751a560e.tar.gz |
MDEV-11883 MariaDB crashes with out-of-memory when query information_schema
CSV engine didn't expect CSM files to be read-only
Diffstat (limited to 'mysql-test/suite/csv')
-rw-r--r-- | mysql-test/suite/csv/read_only.result | 30 | ||||
-rw-r--r-- | mysql-test/suite/csv/read_only.test | 19 |
2 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/suite/csv/read_only.result b/mysql-test/suite/csv/read_only.result new file mode 100644 index 00000000000..d6936681f65 --- /dev/null +++ b/mysql-test/suite/csv/read_only.result @@ -0,0 +1,30 @@ +create table t1 (a int not null) engine=csv; +insert t1 values (1),(2); +flush tables; +select * from information_schema.tables where table_schema='test'; +TABLE_CATALOG def +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE NULL +VERSION NULL +ROW_FORMAT NULL +TABLE_ROWS NULL +AVG_ROW_LENGTH NULL +DATA_LENGTH NULL +MAX_DATA_LENGTH NULL +INDEX_LENGTH NULL +DATA_FREE NULL +AUTO_INCREMENT NULL +CREATE_TIME NULL +UPDATE_TIME NULL +CHECK_TIME NULL +TABLE_COLLATION NULL +CHECKSUM NULL +CREATE_OPTIONS NULL +TABLE_COMMENT File './test/t1.CSM' not found (Errcode: 13 "Permission denied") +Warnings: +Level Warning +Code 29 +Message File './test/t1.CSM' not found (Errcode: 13 "Permission denied") +drop table t1; diff --git a/mysql-test/suite/csv/read_only.test b/mysql-test/suite/csv/read_only.test new file mode 100644 index 00000000000..2af209182d0 --- /dev/null +++ b/mysql-test/suite/csv/read_only.test @@ -0,0 +1,19 @@ +# +# MDEV-11883 MariaDB crashes with out-of-memory when query information_schema +# +source include/have_csv.inc; + +let datadir=`select @@datadir`; + +create table t1 (a int not null) engine=csv; +insert t1 values (1),(2); +flush tables; + +chmod 0400 $datadir/test/t1.CSM; +chmod 0400 $datadir/test/t1.CSV; + +--replace_result $datadir ./ +query_vertical select * from information_schema.tables where table_schema='test'; + +drop table t1; + |