A Little Noise

April 16, 2008

Proxy Projects

Filed under: MySQL — snoyes @ 6:05 pm

When I first heard of MySQL Proxy, I thought, “That’s way cool.”

Then I thought, “Neat toy, but I can’t think of anything I’d actually want it for. I can spell ‘SELECT’ without the client correcting me, and I’d just as soon use the built in logs. ”

Now I’m starting to gather ideas that might be practical:

– Accept INSERT/UPDATE/DELETE statements on information_schema tables, and transform them to the equivalent ALTER/CREATE/DROP statements (Freenode often sees questions about how to alter character sets on all tables at once, or how to drop all tables in a database)

– SELECT * EXCEPT (field list) (For those too lazy to type it all out)

– Check –safe-updates or –i-am-a-dummy. If set, change all SELECT * to SELECT * EXCEPT (any BLOB or TEXT column) (Since blobs are heavy) (This was Jan’s suggestion)

– Add CONNECT BY PRIOR syntax (for getting hierarchies out of adjacency lists)

– Aliases for custom-defined field types (so my_special_field becomes varchar(150))

Anything else you’d like to see in a Proxy script, but haven’t had a chance to write yet?

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress