mysql - MySQL 使用什么文件系统?
问题描述
在 Linux 操作系统上将数据库数据保存到磁盘时,MySQL 是否使用 fread、read、mmap 或其他文件系统?或者 MySQL 是否正在做一个测试以查看使用哪一个?这与保存配置数据无关。我对实际的数据库感兴趣,最好是 InnoDB。
谢谢你的帮助。
编辑:更具体地说,我对 MySQL 中的 c/c++ 源代码感兴趣,它执行将数据保存到 InnoDB 数据库的实际调用。可能的选项包括 fread、read、mmap 等。
解决方案
On Linux systems all POSIX fileystems will work. fread is a libc construct that will translate to underlying syscalls like read
, mmap
, write
etc.
The read, mmap, write operations are implemented in a Linux VFS (virtual file system) layer before those map to specific operations in the filesystem code. So any POSIX filesystem will work with MySQL.
The only filesystem test I've seen in the MySQL code is a fallocate
syscall which isn't implemented on all filesystems (especially when it was first added, its probably significantly available now). There is an implementation workaround when fallocate
isn't available.
推荐阅读
- python - pdf文件的texttract作业失败
- c# - 如何在网页的选项卡中显示文本文件的内容?
- google-sheets - 获取最大值对应的名称
- firebase - Flutter Web、web_entrypoint.dart 打破 Chrome 空白屏幕
- r - 制作一个可管道化的函数
- oracle - 如何使用 Datapump 将模式从 oracle 11g(linux) 导出到 windows(19c)
- python - 从具有多个重复值的一列创建饼图
- docker - Virtualbox 中的 Docker Swarm 设置
- r - 将列表中未列出的矩阵转换回矩阵
- java - 如何降级JDK?