Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Comments

top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Extend the SQL language? (44 comments)

As far as aggregate functions go, yes. The UDFs covered in Chapter 2 will do this. But if you want to modify the underlying SQL language (by adding new keywords that aren't functions for example) then no, this cannot yet be done with plugins.

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Using Existing Plugins (44 comments)

Not yet unfortunately, it would be quicker to edit the parts of the MySQL source than to try this via. a plugin right now. There is a book called Understanding MySQL Internals that could help with this if it something you wanted to look in to. I know that is something they want to eventually do at MySQL (and something we want to eventually do for Drizzle too), but it is much harder to implement than it sounds.

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Using Existing Plugins (44 comments)

Ah, I see what you mean. Not yet, it would be a real gem if you could alter the lexical parser in a plugin but it is really difficult to do at the moment. The closest alternative would probably be mysql-proxy, in which you could write a LUA script to intercept that and do what you wanted.

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Potential Security Nightmare (44 comments)

Unfortunately no... Well, you have the standard private/protected/etc... for the C++ parts. But I suspect it would not be difficult to get around those. The basic API has basic pre-defined functions, but for the more complex types (such as storage engines) you need to include some aspects of the original MySQL source code when compiling. The original idea of the MySQL Plugin API was to make it easier for people who already (or intend to) hack in raw code to the MySQL source. So the plugin is dynamically linked in like any other library, and if it crashes then the MySQL daemon crashes. I suspect (without any firm evidence) that the kind of security you are talking about would have a significant performance trade-off. It should also be noted that (at the moment) the plugins need to be compiled specifically for your version of MySQL, so in most cases you will see the source first. There is the initial work for 'services' which will end the need for this in many cases in MySQL 5.5 and MariaDB and this is talked about in the Appendix. I hope that kind of answers your question there :)

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Using Existing Plugins (44 comments)

'Feature' is a very broad definition. But if you are talking about functions you could use Stored Functions and/or UDFs. These would, however, need a different name for the function call. Andrew Hutchings (co-author)

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Table Index Plugin? (44 comments)

At the moment you have two options. The first is the Full-Text parser plugins, but this probably won't help you if you are handling INTs and may not quite be flexible enough for what you are looking for. If this is what you are interested in you may want to look at how products like Sphinx search engine does it, as that has a MySQL plugin. The second is indeed the storage engine plugin API. You could theoretically take an existing engine (such as the InnoDB plugin) and modify it in plugin form to work however you choose. Andrew Hutchings (co-author)

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:authentication plugins? (44 comments)

Yes, this plugin type is in MariaDB and should be coming to MySQL soon. There are examples in the Appendix of the book. As a side note we already have authentication plugins in Drizzle (what I work on now). Andrew Hutchings (co-author)

more than 3 years ago
top

MySQL 5.1 Plugin Development

TheLinuxJedi Re:Potential Security Nightmare (44 comments)

Yes, as with many plugin APIs there is the possibility of poor or malicious code opening up an attack vector. Off the top of my head I suspect the biggest risk would be from say bad string process in the Full-Text parser plugins which crashes the server. I would expect most plugins to come from in-house development where there is a special need for a unique setup and this type of user would be hacking code on the server anyway with the same (or worse) security implications. Andrew Hutchings (co-author)

more than 3 years ago

Submissions

Journals

TheLinuxJedi has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>