-
kevin.lewis@oracle.com authored
headers into the same place, ha_prototypes.h. But it had a nasty consequence that any change to the server code would cause almost a total rebuild of InnoDB. This patch fixes that by organizing the headers much better. It also applies a consistent set of rules to InnoDB header file inclusion, affecting almost all InnoDB files. It turns out that in order to avoid exessive compilation dependencies with GCC, SQL headers cannot be collected into a common header. Surrounding each include with macros defined in the 'cc' file works on MSVC, but not GCC. Summary of changes: ===================== * SQL level headers are found in the files where they are needed. * The main InnoDB environmental header, univ.i, is included first in all InnoDB headers except the InnoDB headers that univ.i includes. * Typically, univ.i is not included or needed in 'cc' source files since it gets included with the first InnoDB header. * ha_prototypes.h does not include any other headers, only 'univ.i'. It is a proxy header used to insulate InnoDB from the SQL server. It is independent of any SQL headers by using forward declarations. * Use ha_prototypes.h everywhere the prototyped functions are called. The most common is ib_logf(). * All InnoDB files include univ.i or ha_prototypes.h first, then the neccessary InnoDB headers and functions. * SQL header files are reduce and targeted a much as possible. * Since univ.i->my_global.h includes most system headers, they are no longer included where they are redundant. * Separate ICP_RESULT into its own SQL header called my_icp.h so that it can be included in ha_innodb.cc and row0sel.h without including the rest of what comes in my_compare.h. With this patch, most changes to SQL code do not cause a total rebuild. Approved by marko in rb#2422.
kevin.lewis@oracle.com authoredheaders into the same place, ha_prototypes.h. But it had a nasty consequence that any change to the server code would cause almost a total rebuild of InnoDB. This patch fixes that by organizing the headers much better. It also applies a consistent set of rules to InnoDB header file inclusion, affecting almost all InnoDB files. It turns out that in order to avoid exessive compilation dependencies with GCC, SQL headers cannot be collected into a common header. Surrounding each include with macros defined in the 'cc' file works on MSVC, but not GCC. Summary of changes: ===================== * SQL level headers are found in the files where they are needed. * The main InnoDB environmental header, univ.i, is included first in all InnoDB headers except the InnoDB headers that univ.i includes. * Typically, univ.i is not included or needed in 'cc' source files since it gets included with the first InnoDB header. * ha_prototypes.h does not include any other headers, only 'univ.i'. It is a proxy header used to insulate InnoDB from the SQL server. It is independent of any SQL headers by using forward declarations. * Use ha_prototypes.h everywhere the prototyped functions are called. The most common is ib_logf(). * All InnoDB files include univ.i or ha_prototypes.h first, then the neccessary InnoDB headers and functions. * SQL header files are reduce and targeted a much as possible. * Since univ.i->my_global.h includes most system headers, they are no longer included where they are redundant. * Separate ICP_RESULT into its own SQL header called my_icp.h so that it can be included in ha_innodb.cc and row0sel.h without including the rest of what comes in my_compare.h. With this patch, most changes to SQL code do not cause a total rebuild. Approved by marko in rb#2422.
Loading