[MDEV-26601] Incorrect use of O_TMPFILE Created: 2021-09-14 Updated: 2021-09-14 Resolved: 2021-09-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.5.10, 10.4.21 |
| Fix Version/s: | 10.4.22, 10.5.13, 10.6.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Fabian Vogt | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | not-10.3 | ||
| Environment: |
openSUSE Tumbleweed |
||
| Issue Links: |
|
||||||||
| Description |
|
I noticed this line in mysql.err:
However, /tmp is a tmpfs which does support O_TMPFILE. The issue is that mysqld calls open incorrectly:
Either O_CREAT or O_TMPFILE can be specified, but not both at the same time. This effectively makes the O_TMPFILE support dead code. |
| Comments |
| Comment by Daniel Black [ 2021-09-14 ] | ||||||||||||||||||||||||
|
Thanks Fabian. I never noticed because of the description in https://man7.org/linux/man-pages/man2/open.2.html Local test:
where /tmp/ is a tmpfs. | ||||||||||||||||||||||||
| Comment by Fabian Vogt [ 2021-09-14 ] | ||||||||||||||||||||||||
|
Great!
Yes, it's really not clear on that topic. I actually did the same error while writing a test program for this, which in some way made it easier for me to spot the bug with strace |