Implementation of a MySQL storage engine in ver 8.0.27 for macos11 on x86_64
- clone the mysql source tree from mysql-server github page(reference 1)
cmake #InsertPathHere#/mysql-server
(adjust "#InsertPathHere#", this cmake has to be done outside of mysql-server directory, I am using a directory named mysql-work; reference 11)cd mysql-work/storage
cp -r example nakamori
- rename the files (e.g. ha_example.cc to ha_nakamori.cc) and replace 'EXAMPLE' and 'example' to 'NAKAMORI' and 'nakamori' in the files (including CMakeLists.txt)
make nakamori
in mysql-work directorysudo mv ./plugin_output_directory/ha_nakamori.so /usr/local/mysql/lib/plugin
in mysql-work directorymysql -u root -p
install plugin nakamori soname 'ha_nakamori.so'
If MySQL ommits errors related to binary log format when you send queries, try running SET SESSION binlog_format = 'STATEMENT';
mysql/mysql-server
https://github.com/mysql/mysql-server/tree/8.0/storage/example
第84回 ストレージエンジンをビルドしてみる
https://gihyo.jp/dev/serial/01/mysql-road-construction-news/0084
Chapter 23 Writing a Custom Storage Engine
https://dev.mysql.com/doc/internals/en/custom-engine.html
C言語でテキストファイルを読み込み特定の1行を削除する
http://ithat.me/2015/10/02/clang-text-file-line-delete
MySQL のストレージエンジンについて調べた
https://takatoshiono.hatenablog.com/entry/2015/06/26/234053
takatoshiono/mysql-mycsv
https://github.com/takatoshiono/mysql-mycsv
MySQL 8.0.27 Source Code Documentation
https://dev.mysql.com/doc/dev/mysql-server/latest/
MySQLのストレージエンジンを自作してみる
https://norikone.hatenablog.com/entry/2018/12/29/MySQL%E3%81%AE%E3%82%B9%E3%83%88%E3%83%AC%E3%83%BC%E3%82%B8%E3%82%A8%E3%83%B3%E3%82%B8%E3%83%B3%E3%82%92%E8%87%AA%E4%BD%9C%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B
Writing a MySQL Storage Engine from Scratch
https://www.codeproject.com/Articles/1107279/Writing-a-MySQL-Storage-Engine-from-Scratch
詳解 MySQL
https://www.amazon.co.jp/exec/obidos/ASIN/4873113431/takatoshiono-22/
ConoHaの上でひたすらMySQLをビルドする簡単なおしごと in 2019年
https://yoku0825.blogspot.com/2019/12/conohamysql-in-2019.html