?

Log in

No account? Create an account

Filesystem Engine, MySQL, Google

« previous entry | next entry »
May. 1st, 2007 | 09:20 am

For years Slashdot trolls would just complain that MySQL was nothing more then an interface to the filesystem.

So what does someone go off and do?

Create exactly that.

http://code.google.com/p/mysql-filesystem-engine/

The engine was written by Google's Chip Turner and can process any file that the database has access too (though exactly how the parsing works I am unsure about, I've only read the code related to the actual engine). The example given is this:

mysql> CREATE TABLE LoadAverage (
load1 DECIMAL(3, 2),
load5 DECIMAL(3, 2),
load15 DECIMAL(3, 2),
active_processes VARCHAR(12),
lastpid INTEGER) ENGINE=FILESYSTEM connection="file:///proc/loadavg";
Query OK, 0 rows affected (0.00 sec)

mysql> select * from LoadAverage;
+-------+-------+--------+------------------+---------+
| load1 | load5 | load15 | active_processes | lastpid |
+-------+-------+--------+------------------+---------+
| 0.00 | 0.00 | 0.00 | 1/97 | 6061 |
+-------+-------+--------+------------------+---------+
1 row in set (0.00 sec)

Link | Leave a comment | Share

Comments {0}