Select this item:
When you scroll down you'll find this entry:
This is the file I'm working with.
Please excuse the mistake.
august@AMD4:~/workspace/MySQL-Src/mysql-5.5.8$ cmake -DWITH_DEBUG=1 -DMYSQL_DATADIR=/home/august/MySQL/data -DCMAKE_INSTALL_PREFIX=/home/august/MySQL/pgm
august@AMD4:~/workspace/MariaDB/mariadb-10.0.4$ cmake -DCMAKE_BUILD_TYPE=Debug -DMYSQL_DATADIR=/home/august/MariaDB/data -DCMAKE_INSTALL_PREFIX=/home/august/MariaDB/pgm
131125 15:33:04 [Note] /home/august/workspace/MySQL-Src/mysql-5.5.8/sql/mysqld: ready for connections.
Version: '5.5.8-debug' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Source distribution
august@AMD4:~/MySQL/pgm$ bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.8-debug Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> show plugins;
+-----------------------+--------+--------------------+----------------+---------+
| Name | Status | Type | Library | License |
+-----------------------+--------+--------------------+----------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| FCWTEXT | ACTIVE | STORAGE ENGINE | ha_fcwtext.so | GPL |
| DBF | ACTIVE | STORAGE ENGINE | ha_dbf.so | GPL |
| MYC | ACTIVE | STORAGE ENGINE | ha_myc.so | GPL |
| MYC2 | ACTIVE | STORAGE ENGINE | ha_myc2.so | GPL |
| maxtempl | ACTIVE | STORAGE ENGINE | ha_maxtempl.so | GPL |
+-----------------------+--------+--------------------+----------------+---------+
22 rows in set (0,00 sec)
mysql>
mysql> install plugin dummy soname 'ha_dummy.so';
Query OK, 0 rows affected (0,09 sec)
mysql> show plugins;
+-----------------------+--------+--------------------+----------------+---------+
| Name | Status | Type | Library | License |
+-----------------------+--------+--------------------+----------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| FCWTEXT | ACTIVE | STORAGE ENGINE | ha_fcwtext.so | GPL |
| DBF | ACTIVE | STORAGE ENGINE | ha_dbf.so | GPL |
| MYC | ACTIVE | STORAGE ENGINE | ha_myc.so | GPL |
| MYC2 | ACTIVE | STORAGE ENGINE | ha_myc2.so | GPL |
| maxtempl | ACTIVE | STORAGE ENGINE | ha_maxtempl.so | GPL |
| DUMMY | ACTIVE | STORAGE ENGINE | ha_dummy.so | GPL |
+-----------------------+--------+--------------------+----------------+---------+
23 rows in set (0,00 sec)
mysql>
OK, it's there (scroll to the end of the list and you will see it - I changed the output to bold).mysql> create database Test;
Query OK, 1 row affected (0,01 sec)
mysql> use Test;
Database changed
mysql> create table DummyTest (
-> col1 char(10),
-> col2 decimal(5,2),
-> col3 varchar(32)
-> ) engine=DUMMY
-> ;
Query OK, 0 rows affected (0,04 sec)
mysql> show tables;
+----------------+
| Tables_in_Test |
+----------------+
| DummyTest |
+----------------+
1 row in set (0,00 sec)
mysql> describe DummyTest;
+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| col1 | char(10) | YES | | NULL | |
| col2 | decimal(5,2) | YES | | NULL | |
| col3 | varchar(32) | YES | | NULL | |
+-------+--------------+------+-----+---------+-------+
3 rows in set (0,00 sec)
mysql>
august@AMD4:~/MySQL/data/Test$ ls -l
insgesamt 16
-rw-rw---- 1 august august 65 Nov 20 16:50 db.opt
-rw-rw---- 1 august august 8620 Nov 20 16:53 DummyTest.frm
august@AMD4:~/MySQL/data/Test$
As you can see there are only 2 files: one contains internal-information about the database Test and the other contains create-information about the table DummyTest. There is no data- or index-file, it's really a silly engine.mysql> insert into DummyTest values ( 'ABC', 5.2, 'Test' );
Query OK, 1 row affected (0,00 sec)
mysql> select * from DummyTest;
Empty set (0,00 sec)
mysql> select count(*) from DummyTest;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0,00 sec)
mysql> delete from DummyTest where col1='ABC';
Query OK, 0 rows affected (0,00 sec)
mysql> update DummyTest set col2=7.2 where col3 = 'Test';
Query OK, 0 rows affected (0,01 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql>
mysql> truncate table DummyTest;
Query OK, 0 rows affected (0,00 sec)
mysql> drop table DummyTest;
Query OK, 0 rows affected (0,00 sec)
mysql> show tables;
Empty set (0,00 sec)
mysql> drop database Test;
Query OK, 0 rows affected (0,06 sec)
mysql> uninstall plugin DUMMY;
Query OK, 0 rows affected (0,03 sec)
mysql> quit
Bye
august@AMD4:~/MySQL/pgm$
SET(DUMMY_PLUGIN_DYNAMIC "ha_dummy")
SET(DUMMY_SOURCES ha_dummy.cc ha_dummy.h)
MYSQL_ADD_PLUGIN(dummy ${DUMMY_SOURCES} STORAGE_ENGINE MODULE_ONLY)
this means changing all occurrences of EXAMPLE into DUMMY (and example into dummy). Save this file.MySQL: © Oracle and/or its affiliates. All rights reserved. MariaDB: © MySQL AB & MySQL Finland AB & TCX DataKonsult AB Micorsoft Windows: © Microsoft Corporation. All rights reserved. Micorsoft Word: © Microsoft Corporation. All rights reserved. Linux: ™ by Linus Torvalds, the trademark is owned by The Linux Foundationthe source-code is published under the terms of the GPLUbuntu: © 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd. Eclipse: © 2013 The Eclipse Foundation. All Rights Reserved. LibreOffice: is licensed under the terms of the LGPLv3.
© Bubec (http://www.bubec.de)