Brian "Krow" Aker (krow) wrote,
Brian "Krow" Aker
krow

Filesystem Engine, MySQL, Google

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)
Subscribe
  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments