Reputation: 31
When I try to use SHOW FULL FIELDS FROM
or some other SHOW COLUMNS syntax query I get this strange error message:
MariaDB [mysql]> show full fields from user;
ERROR 1036 (HY000): Table '/tmp/#sql_126_0.MAI' is read only
Tmp dir is present and has 777
permissions.
Changing tmp dir in my.cnf
doesn't help.
Chown
ing that dir to mysql user doesn't help either.
Steps to reproduce:
apk add mysql mysql-client
) or use readily available imagedocker run --name mariadb_container mariadb_image
docker exec -ti mariadb_container mysql -A
SHOW FULL FIELDS FROM some_table
queryAny suggestions on how to trace that problem?
Upvotes: 3
Views: 2677
Reputation: 33422
Warning: this is a working theory, not confirmed by any independent sources.
There are 3 points of failure that may explain why the bug is reproducible under the very specific conditions (CentOS 7
, docker
, alpine
, mariadb 10.1.22+
):
/proc/self/fd/%d
permissions for container threads and setuid/proc/
-based realpath
implementation in musl
librarymi_open
race condition security issueLinks to discussions:
readlink
behaviorrealpath
Links to code:
3.12+
)4.4+
)Approaches to fix:
musl
realpath
implementationmi_open
implementation (specifically changes to this file in 10.1.22)Workarounds:
Upvotes: 4
Reputation: 1
You should try to downgrade your Mariadb to version 10.1.17 (worked for me)
Upvotes: 0