https://github.com/aboev/smalldb
Sample storage engine for MySQL
https://github.com/aboev/smalldb
mysql storage-engine
Last synced: 5 months ago
JSON representation
Sample storage engine for MySQL
- Host: GitHub
- URL: https://github.com/aboev/smalldb
- Owner: aboev
- License: gpl-2.0
- Created: 2014-01-02T13:32:16.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-11T13:52:32.000Z (over 12 years ago)
- Last Synced: 2024-08-01T22:44:22.628Z (almost 2 years ago)
- Topics: mysql, storage-engine
- Language: C++
- Homepage:
- Size: 230 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## SmallDB
SmallDB - sample in-memory storage engine for MySQL
Supports basic CRUD operations, data is stored in a linked list
## Installation
Installation requires MySQL source code(same as installed version)
Following example is for MySQL Community 5.5.35
1. Download & untar MySQL source code
```
wget http://downloads.mysql.com/archives/get/file/mysql-5.5.35.tar.gz
tar -zxvf mysql-5.5.35.tar.gz
```
2. Clone smalldb into mysql-5.5.35/storage/smalldb directory
```
cd mysql-5.5.35
git clone https://github.com/aboev/smalldb.git storage/smalldb
```
3. Run cmake
```
cmake .
```
4. (Optional) Install & run MySQL if you don't have one. Please follow instructions on http://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html for post-install setup
```
make
make install
```
5. Compile smalldb
```
cd storage/smalldb
make
```
5. Copy smalldb.so file into MySQL plugin directory (You can check plugin directory through: SHOW VARIABLES LIKE "%plugin_dir%";)
```
cp ha_smalldb.so /opt/mysql/server-5.5.35/lib/plugin/
```
6. Install smalldb
```
mysql -u root -p -e 'INSTALL PLUGIN smalldb soname "ha_smalldb.so";'
```
Now you can define smalldb as storage engine:
```
CREATE TABLE tbl (col VARCHAR(255)) ENGINE = smalldb;
```