Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
MDEV-11883 MariaDB crashes with out-of-memory when query information_…
…schema CSV engine didn't expect CSM files to be read-only
- Loading branch information
Showing
3 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters