Let's begin our more detailed survey of the internal workings of the MySQL server by examining what the core subsystems of the server do. Now there are a number of these things, they're basically utilities within the server and they're shared among other subsystems who need access to the services that these things provide. They're designed to be general but within a specific kind of a purpose. For example we have one for log management and that is a general way of dealing with logs. And the reason that they made it general is so that if we want to create a new kind of a log, the basics of storing information for a logging system and writing to a file on the outside of the server and a number of other things are already in place. All we have to do in our programming for this new log that we want to create is to determine what it is that we want to store, where we're going to get that from, what format we want to store it in and what kind of a file we want to store it in and where we want that file to be placed. Or perhaps what variable we want to use to know where to place that file. So that would just be an example of one kind of internal subsystem here in this shared core group of subsystems. So what are some of these things? Let's take a look at those. The core subsystems then include these things. One of the basic ones is the built-in Function Library. So all those functions that we can use within our expressions can be called from anywhere within the MySQL server where we need to execute an expression of some kind. Any place where we need to evaluate things they can call into the function library in case there's a function and a calculation that someone has provided. There is another core subsystem for network communications. It knows how to communicate with other things out there, how to reach out from the server, how to receive communications from the server, listening to a port and so on. There's another one for thread management. So we'll see the threads talked about in some ways within MySQL server as processes. But threads also have resources on them, a thread is simply a storage location inside of the MySQL server. We'll learn later that it starts out at 192K but it can build up as we add more variables to it and as we add more caches to it and more temporary items, the threads can blow up to be quite large temporarily and then come back down to another size. But these things are managed by this core subsystem. There's another core subsystem for access and privilege management and so we would use that when we're detecting that someone wants to log in. We also would use that anytime that someone wants to issue an SQL Command of some kind that touches something that has to have privileges attached to it. Whether it's accessing a database accessing a table, accessing columns in a table in some way. Then this core subsystem will come into play briefly to manage that. We don't have to write that code again and again and again different places. We have this one location where that code resides. There's another one for cache and buffer management. So we have certain caches that are built-in, that are named caches but if there was another kind of a cache that the developers of MySQL came up with, then they would be able to simply access this part of the server for defining much of what is going to go into that cache. The same thing goes for temporary buffers. And then finally there's the log management one that I mentioned before. All of these things are part of what we call the core subsystems. Some people will call them the shared subsystems but they are modules inside of the MySQL server that perform certain functions and we just call these things from wherever else they need to be used.
| Course: | MySQL 5 Administration-Part 1 |
| Author: | David Swain |
| SKU: | 34307 |
| ISBN: | 978-1-61866-086-2 |
| Release Date: | 2012-12-31 |
| Duration: | 16 hrs / 171 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |