Hi Folks,
A new question has risen during the development of our storage engine.
In short the engine is providing a read-only view to the server filesystem.
One can issue (implemented via assisted discovery):
CREATE TABLE etc ENGINE=fsview ROOT=‘/etc’;
Then it’s possible to tell:
SELECT name, fsize FROM etc ORDER BY fsize DESC LIMIT 10
resulting in:
+-----------------+--------+
| name | fsize |
+-----------------+--------+
| ld.so.cache | 129417 |
| mailcap | 44732 |
| fb.modes | 24501 |
| mime.types | 24066 |
| brltty.conf | 22478 |
| services | 19558 |
| devscripts.conf | 18037 |
| ltrace.conf | 14867 |
| login.defs | 10551 |
| sensors3.conf | 10344 |
+-----------------+--------+
So far so good (the listing is not recursive).
An additional feature is to access subdirectories of the root (this is working
via automated discovery):
SELECT name, fsize FROM `etc/init.d`
This is not terribly wrong, but we’re thinking about the possiblity of
improving it somehow that:
SELECT name, fsize FROM etc WHERE path = “init.d”;
However we’re in a bit of trouble how we could improve the storage engine to be
able to handle this.
Of course we would not like to do a "deep enumeration" of the root directory
(full table scan) . So somehow we would like to access/use the information from
the where clause.
Can anybody recommend a way to solve that?
--
Andras Szabo
Sent with Airmail
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help : https://help.launchpad.net/ListHelp